// Generated by Haxe 3.4.0
(function ($hx_exports, $global) { "use strict";
$hx_exports["openfl"] = $hx_exports["openfl"] || {};
$hx_exports["lime"] = $hx_exports["lime"] || {};
var $hxClasses = {},$estr = function() { return js_Boot.__string_rec(this,''); };
function $extend(from, fields) {
	function Inherit() {} Inherit.prototype = from; var proto = new Inherit();
	for (var name in fields) proto[name] = fields[name];
	if( fields.toString !== Object.prototype.toString ) proto.toString = fields.toString;
	return proto;
}
var flixel_util_IFlxDestroyable = function() { };
$hxClasses["flixel.util.IFlxDestroyable"] = flixel_util_IFlxDestroyable;
flixel_util_IFlxDestroyable.__name__ = ["flixel","util","IFlxDestroyable"];
flixel_util_IFlxDestroyable.prototype = {
	__class__: flixel_util_IFlxDestroyable
};
var flixel_FlxBasic = function() {
	this.flixelType = 0;
	this.exists = true;
	this.alive = true;
	this.visible = true;
	this.active = true;
	this.ID = -1;
};
$hxClasses["flixel.FlxBasic"] = flixel_FlxBasic;
flixel_FlxBasic.__name__ = ["flixel","FlxBasic"];
flixel_FlxBasic.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_FlxBasic.prototype = {
	destroy: function() {
		this.set_exists(false);
		this._cameras = null;
	}
	,kill: function() {
		this.set_alive(false);
		this.set_exists(false);
	}
	,revive: function() {
		this.set_alive(true);
		this.set_exists(true);
	}
	,update: function(elapsed) {
	}
	,draw: function() {
	}
	,toString: function() {
		var value = this.active;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "active";
		_this.value = value;
		var value1 = this.visible;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "visible";
		_this1.value = value1;
		var value2 = this.alive;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "alive";
		_this2.value = value2;
		var value3 = this.exists;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "exists";
		_this3.value = value3;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3]);
	}
	,set_visible: function(Value) {
		return this.visible = Value;
	}
	,set_active: function(Value) {
		return this.active = Value;
	}
	,set_exists: function(Value) {
		return this.exists = Value;
	}
	,set_alive: function(Value) {
		return this.alive = Value;
	}
	,get_camera: function() {
		if(this._cameras == null || this._cameras.length == 0) {
			return flixel_FlxCamera.defaultCameras[0];
		} else {
			return this._cameras[0];
		}
	}
	,set_camera: function(Value) {
		if(this._cameras == null) {
			this._cameras = [Value];
		} else {
			this._cameras[0] = Value;
		}
		return Value;
	}
	,get_cameras: function() {
		if(this._cameras == null) {
			return flixel_FlxCamera.defaultCameras;
		} else {
			return this._cameras;
		}
	}
	,set_cameras: function(Value) {
		return this._cameras = Value;
	}
	,__class__: flixel_FlxBasic
	,__properties__: {set_cameras:"set_cameras",get_cameras:"get_cameras",set_camera:"set_camera",get_camera:"get_camera",set_exists:"set_exists",set_alive:"set_alive",set_visible:"set_visible",set_active:"set_active"}
};
var flixel_util_IFlxPooled = function() { };
$hxClasses["flixel.util.IFlxPooled"] = flixel_util_IFlxPooled;
flixel_util_IFlxPooled.__name__ = ["flixel","util","IFlxPooled"];
flixel_util_IFlxPooled.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_IFlxPooled.prototype = {
	__class__: flixel_util_IFlxPooled
};
var flixel_util_IFlxPool = function() { };
$hxClasses["flixel.util.IFlxPool"] = flixel_util_IFlxPool;
flixel_util_IFlxPool.__name__ = ["flixel","util","IFlxPool"];
flixel_util_IFlxPool.prototype = {
	__class__: flixel_util_IFlxPool
};
var flixel_util_FlxPool_$flixel_$math_$FlxRect = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_math_FlxRect"] = flixel_util_FlxPool_$flixel_$math_$FlxRect;
flixel_util_FlxPool_$flixel_$math_$FlxRect.__name__ = ["flixel","util","FlxPool_flixel_math_FlxRect"];
flixel_util_FlxPool_$flixel_$math_$FlxRect.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$math_$FlxRect.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$math_$FlxRect
	,__properties__: {get_length:"get_length"}
};
var flixel_math_FlxRect = function(X,Y,Width,Height) {
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._inPool = false;
	this._weak = false;
	this.x = X;
	this.y = Y;
	this.width = Width;
	this.height = Height;
};
$hxClasses["flixel.math.FlxRect"] = flixel_math_FlxRect;
flixel_math_FlxRect.__name__ = ["flixel","math","FlxRect"];
flixel_math_FlxRect.__interfaces__ = [flixel_util_IFlxPooled];
flixel_math_FlxRect.__properties__ = {get_pool:"get_pool"}
flixel_math_FlxRect.get = function(X,Y,Width,Height) {
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = X;
	_this.y = Y;
	_this.width = Width;
	_this.height = Height;
	_this._inPool = false;
	return _this;
};
flixel_math_FlxRect.weak = function(X,Y,Width,Height) {
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = X;
	_this.y = Y;
	_this.width = Width;
	_this.height = Height;
	_this._inPool = false;
	_this._weak = true;
	return _this;
};
flixel_math_FlxRect.get_pool = function() {
	return flixel_math_FlxRect._pool;
};
flixel_math_FlxRect.prototype = {
	put: function() {
		if(!this._inPool) {
			this._inPool = true;
			this._weak = false;
			flixel_math_FlxRect._pool.putUnsafe(this);
		}
	}
	,putWeak: function() {
		if(this._weak) {
			if(!this._inPool) {
				this._inPool = true;
				this._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(this);
			}
		}
	}
	,setSize: function(Width,Height) {
		this.width = Width;
		this.height = Height;
		return this;
	}
	,setPosition: function(x,y) {
		this.x = x;
		this.y = y;
		return this;
	}
	,set: function(X,Y,Width,Height) {
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.x = X;
		this.y = Y;
		this.width = Width;
		this.height = Height;
		return this;
	}
	,copyFrom: function(Rect) {
		this.x = Rect.x;
		this.y = Rect.y;
		this.width = Rect.width;
		this.height = Rect.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		return this;
	}
	,copyTo: function(Rect) {
		Rect.x = this.x;
		Rect.y = this.y;
		Rect.width = this.width;
		Rect.height = this.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		return Rect;
	}
	,copyFromFlash: function(FlashRect) {
		this.x = FlashRect.x;
		this.y = FlashRect.y;
		this.width = FlashRect.width;
		this.height = FlashRect.height;
		return this;
	}
	,copyToFlash: function(FlashRect) {
		if(FlashRect == null) {
			FlashRect = new openfl_geom_Rectangle();
		}
		FlashRect.x = this.x;
		FlashRect.y = this.y;
		FlashRect.width = this.width;
		FlashRect.height = this.height;
		return FlashRect;
	}
	,overlaps: function(Rect) {
		var result = Rect.x + Rect.width > this.x && Rect.x < this.x + this.width && Rect.y + Rect.height > this.y && Rect.y < this.y + this.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		return result;
	}
	,containsPoint: function(Point) {
		var result = flixel_math_FlxMath.pointInFlxRect(Point.x,Point.y,this);
		if(Point._weak) {
			Point.put();
		}
		return result;
	}
	,union: function(Rect) {
		var minX = Math.min(this.x,Rect.x);
		var minY = Math.min(this.y,Rect.y);
		var maxX = Math.max(this.x + this.width,Rect.x + Rect.width);
		var maxY = Math.max(this.y + this.height,Rect.y + Rect.height);
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		this.x = minX;
		this.y = minY;
		this.width = maxX - minX;
		this.height = maxY - minY;
		return this;
	}
	,floor: function() {
		this.x = Math.floor(this.x);
		this.y = Math.floor(this.y);
		this.width = Math.floor(this.width);
		this.height = Math.floor(this.height);
		return this;
	}
	,ceil: function() {
		this.x = Math.ceil(this.x);
		this.y = Math.ceil(this.y);
		this.width = Math.ceil(this.width);
		this.height = Math.ceil(this.height);
		return this;
	}
	,round: function() {
		this.x = Math.round(this.x);
		this.y = Math.round(this.y);
		this.width = Math.round(this.width);
		this.height = Math.round(this.height);
		return this;
	}
	,fromTwoPoints: function(Point1,Point2) {
		var minX = Math.min(Point1.x,Point2.x);
		var minY = Math.min(Point1.y,Point2.y);
		var maxX = Math.max(Point1.x,Point2.x);
		var maxY = Math.max(Point1.y,Point2.y);
		if(Point1._weak) {
			Point1.put();
		}
		if(Point2._weak) {
			Point2.put();
		}
		this.x = minX;
		this.y = minY;
		this.width = maxX - minX;
		this.height = maxY - minY;
		return this;
	}
	,unionWithPoint: function(Point) {
		var minX = Math.min(this.x,Point.x);
		var minY = Math.min(this.y,Point.y);
		var maxX = Math.max(this.x + this.width,Point.x);
		var maxY = Math.max(this.y + this.height,Point.y);
		if(Point._weak) {
			Point.put();
		}
		this.x = minX;
		this.y = minY;
		this.width = maxX - minX;
		this.height = maxY - minY;
		return this;
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
		return this;
	}
	,destroy: function() {
	}
	,equals: function(rect) {
		var result = Math.abs(this.x - rect.x) <= 0.0000001 && Math.abs(this.y - rect.y) <= 0.0000001 && Math.abs(this.width - rect.width) <= 0.0000001 && Math.abs(this.height - rect.height) <= 0.0000001;
		if(rect._weak) {
			if(!rect._inPool) {
				rect._inPool = true;
				rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(rect);
			}
		}
		return result;
	}
	,intersection: function(rect,result) {
		if(result == null) {
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = 0;
			_this.height = 0;
			_this._inPool = false;
			result = _this;
		}
		var x0 = this.x < rect.x ? rect.x : this.x;
		var x1 = this.x + this.width > rect.x + rect.width ? rect.x + rect.width : this.x + this.width;
		if(x1 <= x0) {
			if(rect._weak) {
				if(!rect._inPool) {
					rect._inPool = true;
					rect._weak = false;
					flixel_math_FlxRect._pool.putUnsafe(rect);
				}
			}
			return result;
		}
		var y0 = this.y < rect.y ? rect.y : this.y;
		var y1 = this.y + this.height > rect.y + rect.height ? rect.y + rect.height : this.y + this.height;
		if(y1 <= y0) {
			if(rect._weak) {
				if(!rect._inPool) {
					rect._inPool = true;
					rect._weak = false;
					flixel_math_FlxRect._pool.putUnsafe(rect);
				}
			}
			return result;
		}
		if(rect._weak) {
			if(!rect._inPool) {
				rect._inPool = true;
				rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(rect);
			}
		}
		result.x = x0;
		result.y = y0;
		result.width = x1 - x0;
		result.height = y1 - y0;
		return result;
	}
	,toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		var value2 = this.width;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "w";
		_this2.value = value2;
		var value3 = this.height;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "h";
		_this3.value = value3;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3]);
	}
	,get_left: function() {
		return this.x;
	}
	,set_left: function(Value) {
		this.width -= Value - this.x;
		return this.x = Value;
	}
	,get_right: function() {
		return this.x + this.width;
	}
	,set_right: function(Value) {
		this.width = Value - this.x;
		return Value;
	}
	,get_top: function() {
		return this.y;
	}
	,set_top: function(Value) {
		this.height -= Value - this.y;
		return this.y = Value;
	}
	,get_bottom: function() {
		return this.y + this.height;
	}
	,set_bottom: function(Value) {
		this.height = Value - this.y;
		return Value;
	}
	,get_isEmpty: function() {
		if(this.width != 0) {
			return this.height == 0;
		} else {
			return true;
		}
	}
	,__class__: flixel_math_FlxRect
	,__properties__: {get_isEmpty:"get_isEmpty",set_bottom:"set_bottom",get_bottom:"get_bottom",set_top:"set_top",get_top:"get_top",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left"}
};
var flixel_FlxObject = function(X,Y,Width,Height) {
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	this._rect = _this;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this._point = point;
	this.path = null;
	this.collisonXDrag = true;
	this.allowCollisions = 4369;
	this.wasTouching = 0;
	this.touching = 0;
	this.health = 1;
	this.maxAngular = 10000;
	this.angularDrag = 0;
	this.angularAcceleration = 0;
	this.angularVelocity = 0;
	this.elasticity = 0;
	this.mass = 1;
	this.immovable = false;
	this.moves = true;
	this.angle = 0;
	this.pixelPerfectPosition = true;
	this.y = 0;
	this.x = 0;
	flixel_FlxBasic.call(this);
	this.set_x(X);
	this.set_y(Y);
	this.set_width(Width);
	this.set_height(Height);
	this.initVars();
};
$hxClasses["flixel.FlxObject"] = flixel_FlxObject;
flixel_FlxObject.__name__ = ["flixel","FlxObject"];
flixel_FlxObject.separate = function(Object1,Object2) {
	var separatedX = flixel_FlxObject.separateX(Object1,Object2);
	var separatedY = flixel_FlxObject.separateY(Object1,Object2);
	if(!separatedX) {
		return separatedY;
	} else {
		return true;
	}
};
flixel_FlxObject.updateTouchingFlags = function(Object1,Object2) {
	var touchingX = flixel_FlxObject.updateTouchingFlagsX(Object1,Object2);
	var touchingY = flixel_FlxObject.updateTouchingFlagsY(Object1,Object2);
	if(!touchingX) {
		return touchingY;
	} else {
		return true;
	}
};
flixel_FlxObject.computeOverlapX = function(Object1,Object2,checkMaxOverlap) {
	if(checkMaxOverlap == null) {
		checkMaxOverlap = true;
	}
	var overlap = 0;
	var obj1delta = Object1.x - Object1.last.x;
	var obj2delta = Object2.x - Object2.last.x;
	if(obj1delta != obj2delta) {
		var obj1deltaAbs = obj1delta > 0 ? obj1delta : -obj1delta;
		var obj2deltaAbs = obj2delta > 0 ? obj2delta : -obj2delta;
		var _this = flixel_FlxObject._firstSeparateFlxRect;
		var X = Object1.x - (obj1delta > 0 ? obj1delta : 0);
		var Y = Object1.last.y;
		var Width = Object1.get_width() + obj1deltaAbs;
		var Height = Object1.get_height();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		var _this1 = flixel_FlxObject._secondSeparateFlxRect;
		var X1 = Object2.x - (obj2delta > 0 ? obj2delta : 0);
		var Y1 = Object2.last.y;
		var Width1 = Object2.get_width() + obj2deltaAbs;
		var Height1 = Object2.get_height();
		_this1.x = X1;
		_this1.y = Y1;
		_this1.width = Width1;
		_this1.height = Height1;
		if(_this.x + _this.width > _this1.x && _this.x < _this1.x + _this1.width && _this.y + _this.height > _this1.y && _this.y < _this1.y + _this1.height) {
			var maxOverlap = checkMaxOverlap ? obj1deltaAbs + obj2deltaAbs + flixel_FlxObject.SEPARATE_BIAS : 0;
			if(obj1delta > obj2delta) {
				overlap = Object1.x + Object1.get_width() - Object2.x;
				if(checkMaxOverlap && overlap > maxOverlap || (Object1.allowCollisions & 16) == 0 || (Object2.allowCollisions & 1) == 0) {
					overlap = 0;
				} else {
					Object1.touching |= 16;
					Object2.touching |= 1;
				}
			} else if(obj1delta < obj2delta) {
				overlap = Object1.x - Object2.get_width() - Object2.x;
				if(checkMaxOverlap && -overlap > maxOverlap || (Object1.allowCollisions & 1) == 0 || (Object2.allowCollisions & 16) == 0) {
					overlap = 0;
				} else {
					Object1.touching |= 1;
					Object2.touching |= 16;
				}
			}
		}
	}
	return overlap;
};
flixel_FlxObject.separateX = function(Object1,Object2) {
	var obj1immovable = Object1.immovable;
	var obj2immovable = Object2.immovable;
	if(obj1immovable && obj2immovable) {
		return false;
	}
	if(Object1.flixelType == 3) {
		return Object1.overlapsWithCallback(Object2,flixel_FlxObject.separateX);
	}
	if(Object2.flixelType == 3) {
		return Object2.overlapsWithCallback(Object1,flixel_FlxObject.separateX,true);
	}
	var overlap = flixel_FlxObject.computeOverlapX(Object1,Object2);
	if(overlap != 0) {
		var obj1v = Object1.velocity.x;
		var obj2v = Object2.velocity.x;
		if(!obj1immovable && !obj2immovable) {
			overlap *= 0.5;
			Object1.set_x(Object1.x - overlap);
			Object2.set_x(Object2.x + overlap);
			var obj1velocity = Math.sqrt(obj2v * obj2v * Object2.mass / Object1.mass) * (obj2v > 0 ? 1 : -1);
			var obj2velocity = Math.sqrt(obj1v * obj1v * Object1.mass / Object2.mass) * (obj1v > 0 ? 1 : -1);
			var average = (obj1velocity + obj2velocity) * 0.5;
			obj1velocity -= average;
			obj2velocity -= average;
			Object1.velocity.set_x(average + obj1velocity * Object1.elasticity);
			Object2.velocity.set_x(average + obj2velocity * Object2.elasticity);
		} else if(!obj1immovable) {
			Object1.set_x(Object1.x - overlap);
			Object1.velocity.set_x(obj2v - obj1v * Object1.elasticity);
		} else if(!obj2immovable) {
			Object2.set_x(Object2.x + overlap);
			Object2.velocity.set_x(obj1v - obj2v * Object2.elasticity);
		}
		return true;
	}
	return false;
};
flixel_FlxObject.updateTouchingFlagsX = function(Object1,Object2) {
	if(Object1.flixelType == 3) {
		return Object1.overlapsWithCallback(Object2,flixel_FlxObject.updateTouchingFlagsX);
	}
	if(Object2.flixelType == 3) {
		return Object2.overlapsWithCallback(Object1,flixel_FlxObject.updateTouchingFlagsX,true);
	}
	return flixel_FlxObject.computeOverlapX(Object1,Object2,false) != 0;
};
flixel_FlxObject.computeOverlapY = function(Object1,Object2,checkMaxOverlap) {
	if(checkMaxOverlap == null) {
		checkMaxOverlap = true;
	}
	var overlap = 0;
	var obj1delta = Object1.y - Object1.last.y;
	var obj2delta = Object2.y - Object2.last.y;
	if(obj1delta != obj2delta) {
		var obj1deltaAbs = obj1delta > 0 ? obj1delta : -obj1delta;
		var obj2deltaAbs = obj2delta > 0 ? obj2delta : -obj2delta;
		var _this = flixel_FlxObject._firstSeparateFlxRect;
		var X = Object1.x;
		var Y = Object1.y - (obj1delta > 0 ? obj1delta : 0);
		var Width = Object1.get_width();
		var Height = Object1.get_height() + obj1deltaAbs;
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		var _this1 = flixel_FlxObject._secondSeparateFlxRect;
		var X1 = Object2.x;
		var Y1 = Object2.y - (obj2delta > 0 ? obj2delta : 0);
		var Width1 = Object2.get_width();
		var Height1 = Object2.get_height() + obj2deltaAbs;
		_this1.x = X1;
		_this1.y = Y1;
		_this1.width = Width1;
		_this1.height = Height1;
		if(_this.x + _this.width > _this1.x && _this.x < _this1.x + _this1.width && _this.y + _this.height > _this1.y && _this.y < _this1.y + _this1.height) {
			var maxOverlap = checkMaxOverlap ? obj1deltaAbs + obj2deltaAbs + flixel_FlxObject.SEPARATE_BIAS : 0;
			if(obj1delta > obj2delta) {
				overlap = Object1.y + Object1.get_height() - Object2.y;
				if(checkMaxOverlap && overlap > maxOverlap || (Object1.allowCollisions & 4096) == 0 || (Object2.allowCollisions & 256) == 0) {
					overlap = 0;
				} else {
					Object1.touching |= 4096;
					Object2.touching |= 256;
				}
			} else if(obj1delta < obj2delta) {
				overlap = Object1.y - Object2.get_height() - Object2.y;
				if(checkMaxOverlap && -overlap > maxOverlap || (Object1.allowCollisions & 256) == 0 || (Object2.allowCollisions & 4096) == 0) {
					overlap = 0;
				} else {
					Object1.touching |= 256;
					Object2.touching |= 4096;
				}
			}
		}
	}
	return overlap;
};
flixel_FlxObject.separateY = function(Object1,Object2) {
	var obj1immovable = Object1.immovable;
	var obj2immovable = Object2.immovable;
	if(obj1immovable && obj2immovable) {
		return false;
	}
	if(Object1.flixelType == 3) {
		return Object1.overlapsWithCallback(Object2,flixel_FlxObject.separateY);
	}
	if(Object2.flixelType == 3) {
		return Object2.overlapsWithCallback(Object1,flixel_FlxObject.separateY,true);
	}
	var overlap = flixel_FlxObject.computeOverlapY(Object1,Object2);
	if(overlap != 0) {
		var obj1delta = Object1.y - Object1.last.y;
		var obj2delta = Object2.y - Object2.last.y;
		var obj1v = Object1.velocity.y;
		var obj2v = Object2.velocity.y;
		if(!obj1immovable && !obj2immovable) {
			overlap *= 0.5;
			Object1.set_y(Object1.y - overlap);
			Object2.set_y(Object2.y + overlap);
			var obj1velocity = Math.sqrt(obj2v * obj2v * Object2.mass / Object1.mass) * (obj2v > 0 ? 1 : -1);
			var obj2velocity = Math.sqrt(obj1v * obj1v * Object1.mass / Object2.mass) * (obj1v > 0 ? 1 : -1);
			var average = (obj1velocity + obj2velocity) * 0.5;
			obj1velocity -= average;
			obj2velocity -= average;
			Object1.velocity.set_y(average + obj1velocity * Object1.elasticity);
			Object2.velocity.set_y(average + obj2velocity * Object2.elasticity);
		} else if(!obj1immovable) {
			Object1.set_y(Object1.y - overlap);
			Object1.velocity.set_y(obj2v - obj1v * Object1.elasticity);
			if(Object1.collisonXDrag && Object2.active && Object2.moves && obj1delta > obj2delta) {
				Object1.set_x(Object1.x + (Object2.x - Object2.last.x));
			}
		} else if(!obj2immovable) {
			Object2.set_y(Object2.y + overlap);
			Object2.velocity.set_y(obj1v - obj2v * Object2.elasticity);
			if(Object2.collisonXDrag && Object1.active && Object1.moves && obj1delta < obj2delta) {
				Object2.set_x(Object2.x + (Object1.x - Object1.last.x));
			}
		}
		return true;
	}
	return false;
};
flixel_FlxObject.updateTouchingFlagsY = function(Object1,Object2) {
	if(Object1.flixelType == 3) {
		return Object1.overlapsWithCallback(Object2,flixel_FlxObject.updateTouchingFlagsY);
	}
	if(Object2.flixelType == 3) {
		return Object2.overlapsWithCallback(Object1,flixel_FlxObject.updateTouchingFlagsY,true);
	}
	return flixel_FlxObject.computeOverlapY(Object1,Object2,false) != 0;
};
flixel_FlxObject.__super__ = flixel_FlxBasic;
flixel_FlxObject.prototype = $extend(flixel_FlxBasic.prototype,{
	initVars: function() {
		this.flixelType = 1;
		var X = this.x;
		var Y = this.y;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		this.last = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(1,1);
		point1._inPool = false;
		this.scrollFactor = point1;
		this.pixelPerfectPosition = flixel_FlxObject.defaultPixelPerfectPosition;
		var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
		point2._inPool = false;
		this.velocity = point2;
		var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
		point3._inPool = false;
		this.acceleration = point3;
		var point4 = flixel_math_FlxPoint._pool.get().set(0,0);
		point4._inPool = false;
		this.drag = point4;
		var point5 = flixel_math_FlxPoint._pool.get().set(10000,10000);
		point5._inPool = false;
		this.maxVelocity = point5;
	}
	,initMotionVars: function() {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		this.velocity = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		this.acceleration = point1;
		var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
		point2._inPool = false;
		this.drag = point2;
		var point3 = flixel_math_FlxPoint._pool.get().set(10000,10000);
		point3._inPool = false;
		this.maxVelocity = point3;
	}
	,destroy: function() {
		flixel_FlxBasic.prototype.destroy.call(this);
		this.velocity = flixel_util_FlxDestroyUtil.put(this.velocity);
		this.acceleration = flixel_util_FlxDestroyUtil.put(this.acceleration);
		this.drag = flixel_util_FlxDestroyUtil.put(this.drag);
		this.maxVelocity = flixel_util_FlxDestroyUtil.put(this.maxVelocity);
		this.scrollFactor = flixel_util_FlxDestroyUtil.put(this.scrollFactor);
		this.last = flixel_util_FlxDestroyUtil.put(this.last);
		this._point = flixel_util_FlxDestroyUtil.put(this._point);
		this._rect = flixel_util_FlxDestroyUtil.put(this._rect);
	}
	,update: function(elapsed) {
		this.last.set_x(this.x);
		this.last.set_y(this.y);
		if(this.path != null && this.path.active) {
			this.path.update(elapsed);
		}
		if(this.moves) {
			this.updateMotion(elapsed);
		}
		this.wasTouching = this.touching;
		this.touching = 0;
	}
	,updateMotion: function(elapsed) {
		var velocityDelta = 0.5 * (flixel_math_FlxVelocity.computeVelocity(this.angularVelocity,this.angularAcceleration,this.angularDrag,this.maxAngular,elapsed) - this.angularVelocity);
		this.angularVelocity += velocityDelta;
		var _g = this;
		_g.set_angle(_g.angle + this.angularVelocity * elapsed);
		this.angularVelocity += velocityDelta;
		velocityDelta = 0.5 * (flixel_math_FlxVelocity.computeVelocity(this.velocity.x,this.acceleration.x,this.drag.x,this.maxVelocity.x,elapsed) - this.velocity.x);
		var _g1 = this.velocity;
		_g1.set_x(_g1.x + velocityDelta);
		var delta = this.velocity.x * elapsed;
		var _g2 = this.velocity;
		_g2.set_x(_g2.x + velocityDelta);
		var _g3 = this;
		_g3.set_x(_g3.x + delta);
		velocityDelta = 0.5 * (flixel_math_FlxVelocity.computeVelocity(this.velocity.y,this.acceleration.y,this.drag.y,this.maxVelocity.y,elapsed) - this.velocity.y);
		var _g4 = this.velocity;
		_g4.set_y(_g4.y + velocityDelta);
		delta = this.velocity.y * elapsed;
		var _g5 = this.velocity;
		_g5.set_y(_g5.y + velocityDelta);
		var _g6 = this;
		_g6.set_y(_g6.y + delta);
	}
	,draw: function() {
	}
	,overlaps: function(ObjectOrGroup,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			return flixel_group_FlxTypedGroup.overlaps($bind(this,this.overlapsCallback),group,0,0,InScreenSpace,Camera);
		}
		if(ObjectOrGroup.flixelType == 3) {
			return ObjectOrGroup.overlaps(this,InScreenSpace,Camera);
		}
		var object = ObjectOrGroup;
		if(!InScreenSpace) {
			if(object.x + object.get_width() > this.x && object.x < this.x + this.get_width() && object.y + object.get_height() > this.y) {
				return object.y < this.y + this.get_height();
			} else {
				return false;
			}
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		var objectScreenPos = object.getScreenPosition(null,Camera);
		this.getScreenPosition(this._point,Camera);
		if(objectScreenPos.x + object.get_width() > this._point.x && objectScreenPos.x < this._point.x + this.get_width() && objectScreenPos.y + object.get_height() > this._point.y) {
			return objectScreenPos.y < this._point.y + this.get_height();
		} else {
			return false;
		}
	}
	,overlapsCallback: function(ObjectOrGroup,X,Y,InScreenSpace,Camera) {
		return this.overlaps(ObjectOrGroup,InScreenSpace,Camera);
	}
	,overlapsAt: function(X,Y,ObjectOrGroup,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			return flixel_group_FlxTypedGroup.overlaps($bind(this,this.overlapsAtCallback),group,X,Y,InScreenSpace,Camera);
		}
		if(ObjectOrGroup.flixelType == 3) {
			var tilemap = ObjectOrGroup;
			return tilemap.overlapsAt(tilemap.x - (X - this.x),tilemap.y - (Y - this.y),this,InScreenSpace,Camera);
		}
		var object = ObjectOrGroup;
		if(!InScreenSpace) {
			if(object.x + object.get_width() > X && object.x < X + this.get_width() && object.y + object.get_height() > Y) {
				return object.y < Y + this.get_height();
			} else {
				return false;
			}
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		var objectScreenPos = object.getScreenPosition(null,Camera);
		this.getScreenPosition(this._point,Camera);
		if(objectScreenPos.x + object.get_width() > this._point.x && objectScreenPos.x < this._point.x + this.get_width() && objectScreenPos.y + object.get_height() > this._point.y) {
			return objectScreenPos.y < this._point.y + this.get_height();
		} else {
			return false;
		}
	}
	,overlapsAtCallback: function(ObjectOrGroup,X,Y,InScreenSpace,Camera) {
		return this.overlapsAt(X,Y,ObjectOrGroup,InScreenSpace,Camera);
	}
	,overlapsPoint: function(point,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		if(!InScreenSpace) {
			if(point.x >= this.x && point.x < this.x + this.get_width() && point.y >= this.y) {
				return point.y < this.y + this.get_height();
			} else {
				return false;
			}
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		var xPos = point.x - Camera.scroll.x;
		var yPos = point.y - Camera.scroll.y;
		this.getScreenPosition(this._point,Camera);
		if(point._weak) {
			point.put();
		}
		if(xPos >= this._point.x && xPos < this._point.x + this.get_width() && yPos >= this._point.y) {
			return yPos < this._point.y + this.get_height();
		} else {
			return false;
		}
	}
	,inWorldBounds: function() {
		var tmp;
		var tmp1;
		if(this.x + this.get_width() > flixel_FlxG.worldBounds.x) {
			var _this = flixel_FlxG.worldBounds;
			tmp1 = this.x < _this.x + _this.width;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			tmp = this.y + this.get_height() > flixel_FlxG.worldBounds.y;
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this1 = flixel_FlxG.worldBounds;
			return this.y < _this1.y + _this1.height;
		} else {
			return false;
		}
	}
	,getScreenPosition: function(point,Camera) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		point.set(this.x,this.y);
		if(this.pixelPerfectPosition) {
			point.set_x(Math.floor(point.x));
			point.set_y(Math.floor(point.y));
		}
		var Y = Camera.scroll.y * this.scrollFactor.y;
		var _g = point;
		_g.set_x(_g.x - Camera.scroll.x * this.scrollFactor.x);
		var _g1 = point;
		_g1.set_y(_g1.y - Y);
		return point;
	}
	,getPosition: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		return point.set(this.x,this.y);
	}
	,getMidpoint: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		return point.set(this.x + this.get_width() * 0.5,this.y + this.get_height() * 0.5);
	}
	,getHitbox: function(rect) {
		if(rect == null) {
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = 0;
			_this.height = 0;
			_this._inPool = false;
			rect = _this;
		}
		var X = this.x;
		var Y = this.y;
		var Width = this.get_width();
		var Height = this.get_height();
		rect.x = X;
		rect.y = Y;
		rect.width = Width;
		rect.height = Height;
		return rect;
	}
	,reset: function(X,Y) {
		this.touching = 0;
		this.wasTouching = 0;
		this.setPosition(X,Y);
		this.last.set(this.x,this.y);
		this.velocity.set();
		this.revive();
	}
	,isOnScreen: function(Camera) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		this.getScreenPosition(this._point,Camera);
		if(this._point.x + this.get_width() > 0 && this._point.x < Camera.width && this._point.y + this.get_height() > 0) {
			return this._point.y < Camera.height;
		} else {
			return false;
		}
	}
	,isPixelPerfectRender: function(Camera) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		if(this.pixelPerfectRender == null) {
			return Camera.pixelPerfectRender;
		} else {
			return this.pixelPerfectRender;
		}
	}
	,isTouching: function(Direction) {
		return (this.touching & Direction) > 0;
	}
	,justTouched: function(Direction) {
		if((this.touching & Direction) > 0) {
			return (this.wasTouching & Direction) <= 0;
		} else {
			return false;
		}
	}
	,hurt: function(Damage) {
		this.health -= Damage;
		if(this.health <= 0) {
			this.kill();
		}
	}
	,screenCenter: function(axes) {
		if(axes == null) {
			axes = flixel_util_FlxAxes.XY;
		}
		if(axes != flixel_util_FlxAxes.Y) {
			this.set_x(flixel_FlxG.width / 2 - this.get_width() / 2);
		}
		if(axes != flixel_util_FlxAxes.X) {
			this.set_y(flixel_FlxG.height / 2 - this.get_height() / 2);
		}
		return this;
	}
	,setPosition: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.set_x(X);
		this.set_y(Y);
	}
	,setSize: function(Width,Height) {
		this.set_width(Width);
		this.set_height(Height);
	}
	,getBoundingBox: function(camera) {
		this.getScreenPosition(this._point,camera);
		var _this = this._rect;
		var X = this._point.x;
		var Y = this._point.y;
		var Width = this.get_width();
		var Height = this.get_height();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		if(this.isPixelPerfectRender(camera)) {
			var _this1 = this._rect;
			_this1.x = Math.floor(_this1.x);
			_this1.y = Math.floor(_this1.y);
			_this1.width = Math.floor(_this1.width);
			_this1.height = Math.floor(_this1.height);
		}
		return this._rect;
	}
	,toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		var value2 = this.get_width();
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "w";
		_this2.value = value2;
		var value3 = this.get_height();
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "h";
		_this3.value = value3;
		var value4 = this.visible;
		var _this4 = flixel_util_LabelValuePair._pool.get();
		_this4.label = "visible";
		_this4.value = value4;
		var value5 = this.velocity;
		var _this5 = flixel_util_LabelValuePair._pool.get();
		_this5.label = "velocity";
		_this5.value = value5;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3,_this4,_this5]);
	}
	,set_x: function(NewX) {
		return this.x = NewX;
	}
	,set_y: function(NewY) {
		return this.y = NewY;
	}
	,set_width: function(Width) {
		return this.width = Width;
	}
	,set_height: function(Height) {
		return this.height = Height;
	}
	,get_width: function() {
		return this.width;
	}
	,get_height: function() {
		return this.height;
	}
	,get_solid: function() {
		return (this.allowCollisions & 4369) > 0;
	}
	,set_solid: function(Solid) {
		this.set_allowCollisions(Solid ? 4369 : 0);
		return Solid;
	}
	,set_angle: function(Value) {
		return this.angle = Value;
	}
	,set_moves: function(Value) {
		return this.moves = Value;
	}
	,set_immovable: function(Value) {
		return this.immovable = Value;
	}
	,set_pixelPerfectRender: function(Value) {
		return this.pixelPerfectRender = Value;
	}
	,set_allowCollisions: function(Value) {
		return this.allowCollisions = Value;
	}
	,set_path: function(path) {
		if(this.path == path) {
			return path;
		}
		if(this.path != null) {
			this.path.object = null;
		}
		if(path != null) {
			path.object = this;
		}
		return this.path = path;
	}
	,__class__: flixel_FlxObject
	,__properties__: $extend(flixel_FlxBasic.prototype.__properties__,{set_path:"set_path",set_allowCollisions:"set_allowCollisions",set_solid:"set_solid",get_solid:"get_solid",set_immovable:"set_immovable",set_moves:"set_moves",set_angle:"set_angle",set_pixelPerfectRender:"set_pixelPerfectRender",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_y:"set_y",set_x:"set_x"})
});
var flixel_FlxSprite = function(X,Y,SimpleGraphic) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._facingFlip = new haxe_ds_IntMap();
	this._angleChanged = true;
	this._cosAngle = 1;
	this._sinAngle = 0;
	this._facingVerticalMult = 1;
	this._facingHorizontalMult = 1;
	this.useColorTransform = false;
	this.color = 16777215;
	this.flipY = false;
	this.flipX = false;
	this.facing = 16;
	this.alpha = 1.0;
	this.bakedRotationAngle = 0;
	this.numFrames = 0;
	this.frameHeight = 0;
	this.frameWidth = 0;
	this.dirty = true;
	this.antialiasing = false;
	this.useFramePixels = true;
	flixel_FlxObject.call(this,X,Y);
	this.set_useFramePixels(flixel_FlxG.renderBlit);
	if(SimpleGraphic != null) {
		this.loadGraphic(SimpleGraphic);
	}
};
$hxClasses["flixel.FlxSprite"] = flixel_FlxSprite;
flixel_FlxSprite.__name__ = ["flixel","FlxSprite"];
flixel_FlxSprite.__super__ = flixel_FlxObject;
flixel_FlxSprite.prototype = $extend(flixel_FlxObject.prototype,{
	initVars: function() {
		flixel_FlxObject.prototype.initVars.call(this);
		this.animation = new flixel_animation_FlxAnimationController(this);
		this._flashPoint = new openfl_geom_Point();
		this._flashRect = new openfl_geom_Rectangle();
		this._flashRect2 = new openfl_geom_Rectangle();
		this._flashPointZero = new openfl_geom_Point();
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		this.offset = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		this.origin = point1;
		var point2 = flixel_math_FlxPoint._pool.get().set(1,1);
		point2._inPool = false;
		this.scale = point2;
		var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
		point3._inPool = false;
		this._halfSize = point3;
		this._matrix = new flixel_math_FlxMatrix();
		this.colorTransform = new openfl_geom_ColorTransform();
	}
	,destroy: function() {
		flixel_FlxObject.prototype.destroy.call(this);
		this.animation = flixel_util_FlxDestroyUtil.destroy(this.animation);
		this.offset = flixel_util_FlxDestroyUtil.put(this.offset);
		this.origin = flixel_util_FlxDestroyUtil.put(this.origin);
		this.scale = flixel_util_FlxDestroyUtil.put(this.scale);
		this._halfSize = flixel_util_FlxDestroyUtil.put(this._halfSize);
		this.framePixels = flixel_util_FlxDestroyUtil.dispose(this.framePixels);
		this._flashPoint = null;
		this._flashRect = null;
		this._flashRect2 = null;
		this._flashPointZero = null;
		this._matrix = null;
		this.colorTransform = null;
		this.set_blend(null);
		this.set_frames(null);
		this.set_graphic(null);
		this._frame = flixel_util_FlxDestroyUtil.destroy(this._frame);
		this._frameGraphic = flixel_util_FlxDestroyUtil.destroy(this._frameGraphic);
		this.shader = null;
	}
	,clone: function() {
		return new flixel_FlxSprite().loadGraphicFromSprite(this);
	}
	,loadGraphicFromSprite: function(Sprite) {
		this.set_frames(Sprite.frames);
		this.bakedRotationAngle = Sprite.bakedRotationAngle;
		if(this.bakedRotationAngle > 0) {
			this.set_width(Sprite.get_width());
			this.set_height(Sprite.get_height());
			this.centerOffsets();
		}
		this.set_antialiasing(Sprite.antialiasing);
		this.animation.copyFrom(Sprite.animation);
		this.graphicLoaded();
		this.set_clipRect(Sprite.clipRect);
		return this;
	}
	,loadGraphic: function(Graphic,Animated,Width,Height,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Animated == null) {
			Animated = false;
		}
		var graph = flixel_FlxG.bitmap.add(Graphic,Unique,Key);
		if(graph == null) {
			return this;
		}
		if(Width == 0) {
			if(Animated) {
				Width = graph.height;
			} else {
				Width = graph.width;
			}
			if(Width > graph.width) {
				Width = graph.width;
			} else {
				Width = Width;
			}
		}
		if(Height == 0) {
			if(Animated) {
				Height = Width;
			} else {
				Height = graph.height;
			}
			if(Height > graph.height) {
				Height = graph.height;
			} else {
				Height = Height;
			}
		}
		if(Animated) {
			var point = flixel_math_FlxPoint._pool.get().set(Width,Height);
			point._inPool = false;
			this.set_frames(flixel_graphics_frames_FlxTileFrames.fromGraphic(graph,point));
		} else {
			this.set_frames(graph.get_imageFrame());
		}
		return this;
	}
	,loadRotatedGraphic: function(Graphic,Rotations,Frame,AntiAliasing,AutoBuffer,Key) {
		if(AutoBuffer == null) {
			AutoBuffer = false;
		}
		if(AntiAliasing == null) {
			AntiAliasing = false;
		}
		if(Frame == null) {
			Frame = -1;
		}
		if(Rotations == null) {
			Rotations = 16;
		}
		var brushGraphic = flixel_FlxG.bitmap.add(Graphic,false,Key);
		if(brushGraphic == null) {
			return this;
		}
		var brush = brushGraphic.bitmap;
		var key = brushGraphic.key;
		if(Frame >= 0) {
			var brushSize = brush.height;
			var framesNum = brush.width / brushSize | 0;
			if(framesNum > Frame) {
				Frame = Frame;
			} else {
				Frame %= framesNum;
			}
			key += ":" + Frame;
			var full = brush;
			brush = new openfl_display_BitmapData(brushSize,brushSize,true,0);
			this._flashRect.setTo(Frame * brushSize,0,brushSize,brushSize);
			brush.copyPixels(full,this._flashRect,this._flashPointZero);
		}
		key += ":" + Rotations + ":" + (AutoBuffer == null ? "null" : "" + AutoBuffer);
		var tempGraph = flixel_FlxG.bitmap._cache.get(key);
		if(tempGraph == null) {
			tempGraph = flixel_graphics_FlxGraphic.fromBitmapData(flixel_util_FlxBitmapDataUtil.generateRotations(brush,Rotations,AntiAliasing,AutoBuffer),false,key);
		}
		var max = brush.height > brush.width ? brush.height : brush.width;
		if(AutoBuffer) {
			max = max * 1.5 | 0;
		} else {
			max = max;
		}
		var point = flixel_math_FlxPoint._pool.get().set(max,max);
		point._inPool = false;
		this.set_frames(flixel_graphics_frames_FlxTileFrames.fromGraphic(tempGraph,point));
		if(AutoBuffer) {
			this.set_width(brush.width);
			this.set_height(brush.height);
			this.centerOffsets();
		}
		this.bakedRotationAngle = 360 / Rotations;
		this.animation.createPrerotated();
		return this;
	}
	,loadRotatedFrame: function(Frame,Rotations,AntiAliasing,AutoBuffer) {
		if(AutoBuffer == null) {
			AutoBuffer = false;
		}
		if(AntiAliasing == null) {
			AntiAliasing = false;
		}
		if(Rotations == null) {
			Rotations = 16;
		}
		var key = Frame.parent.key;
		if(Frame.name != null) {
			key += ":" + Frame.name;
		} else {
			var _this = Frame.frame;
			var value = _this.x;
			var _this1 = flixel_util_LabelValuePair._pool.get();
			_this1.label = "x";
			_this1.value = value;
			var value1 = _this.y;
			var _this2 = flixel_util_LabelValuePair._pool.get();
			_this2.label = "y";
			_this2.value = value1;
			var value2 = _this.width;
			var _this3 = flixel_util_LabelValuePair._pool.get();
			_this3.label = "w";
			_this3.value = value2;
			var value3 = _this.height;
			var _this4 = flixel_util_LabelValuePair._pool.get();
			_this4.label = "h";
			_this4.value = value3;
			key += ":" + flixel_util_FlxStringUtil.getDebugString([_this1,_this2,_this3,_this4]);
		}
		var graphic = flixel_FlxG.bitmap._cache.get(key);
		if(graphic == null) {
			graphic = flixel_graphics_FlxGraphic.fromBitmapData(Frame.paint(),false,key);
		}
		return this.loadRotatedGraphic(graphic,Rotations,-1,AntiAliasing,AutoBuffer);
	}
	,makeGraphic: function(Width,Height,Color,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Color == null) {
			Color = -1;
		}
		this.set_frames(flixel_FlxG.bitmap.create(Width,Height,Color,Unique,Key).get_imageFrame());
		return this;
	}
	,graphicLoaded: function() {
	}
	,resetSize: function() {
		this._flashRect.x = 0;
		this._flashRect.y = 0;
		this._flashRect.width = this.frameWidth;
		this._flashRect.height = this.frameHeight;
	}
	,resetFrameSize: function() {
		if(this.frame != null) {
			this.frameWidth = this.frame.sourceSize.x | 0;
			this.frameHeight = this.frame.sourceSize.y | 0;
		}
		this._halfSize.set(0.5 * this.frameWidth,0.5 * this.frameHeight);
		this._flashRect.x = 0;
		this._flashRect.y = 0;
		this._flashRect.width = this.frameWidth;
		this._flashRect.height = this.frameHeight;
	}
	,resetSizeFromFrame: function() {
		this.set_width(this.frameWidth);
		this.set_height(this.frameHeight);
	}
	,resetFrame: function() {
		this.set_frame(this.frame);
	}
	,setGraphicSize: function(Width,Height) {
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Width <= 0 && Height <= 0) {
			return;
		}
		var newScaleX = Width / this.frameWidth;
		var newScaleY = Height / this.frameHeight;
		this.scale.set(newScaleX,newScaleY);
		if(Width <= 0) {
			this.scale.set_x(newScaleY);
		} else if(Height <= 0) {
			this.scale.set_y(newScaleX);
		}
	}
	,updateHitbox: function() {
		this.set_width(Math.abs(this.scale.x) * this.frameWidth);
		this.set_height(Math.abs(this.scale.y) * this.frameHeight);
		this.offset.set(-0.5 * (this.get_width() - this.frameWidth),-0.5 * (this.get_height() - this.frameHeight));
		this.origin.set(this.frameWidth * 0.5,this.frameHeight * 0.5);
	}
	,resetHelpers: function() {
		if(this.frame != null) {
			this.frameWidth = this.frame.sourceSize.x | 0;
			this.frameHeight = this.frame.sourceSize.y | 0;
		}
		this._halfSize.set(0.5 * this.frameWidth,0.5 * this.frameHeight);
		this._flashRect.x = 0;
		this._flashRect.y = 0;
		this._flashRect.width = this.frameWidth;
		this._flashRect.height = this.frameHeight;
		this.set_width(this.frameWidth);
		this.set_height(this.frameHeight);
		this._flashRect2.x = 0;
		this._flashRect2.y = 0;
		if(this.graphic != null) {
			this._flashRect2.width = this.graphic.width;
			this._flashRect2.height = this.graphic.height;
		}
		this.origin.set(this.frameWidth * 0.5,this.frameHeight * 0.5);
		if(flixel_FlxG.renderBlit) {
			this.dirty = true;
			this.updateFramePixels();
		}
	}
	,update: function(elapsed) {
		flixel_FlxObject.prototype.update.call(this,elapsed);
		this.updateAnimation(elapsed);
	}
	,updateAnimation: function(elapsed) {
		this.animation.update(elapsed);
	}
	,checkEmptyFrame: function() {
		if(this._frame == null) {
			this.loadGraphic("flixel/images/logo/default.png");
		}
	}
	,draw: function() {
		this.checkEmptyFrame();
		if(this.alpha == 0 || this._frame.type == 2) {
			return;
		}
		if(this.dirty) {
			this.calcFrame(this.useFramePixels);
		}
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(!camera.visible || !camera.exists || !this.isOnScreen(camera)) {
				continue;
			}
			this.getScreenPosition(this._point,camera).subtractPoint(this.offset);
			if(this.isSimpleRender(camera)) {
				this.drawSimple(camera);
			} else {
				this.drawComplex(camera);
			}
		}
	}
	,drawSimple: function(camera) {
		if(this.isPixelPerfectRender(camera)) {
			var _this = this._point;
			_this.set_x(Math.floor(_this.x));
			_this.set_y(Math.floor(_this.y));
		}
		var _this1 = this._point;
		var FlashPoint = this._flashPoint;
		if(FlashPoint == null) {
			FlashPoint = new openfl_geom_Point();
		}
		FlashPoint.x = _this1.x;
		FlashPoint.y = _this1.y;
		camera.copyPixels(this._frame,this.framePixels,this._flashRect,this._flashPoint,this.colorTransform,this.blend,this.antialiasing);
	}
	,drawComplex: function(camera) {
		var doFlipX = this.flipX != this._frame.flipX;
		var doFlipY = this.flipY != this._frame.flipY;
		this._frame.prepareMatrix(this._matrix,0,this.animation._curAnim != null ? doFlipX != this.animation._curAnim.flipX : doFlipX,this.animation._curAnim != null ? doFlipY != this.animation._curAnim.flipY : doFlipY);
		this._matrix.translate(-this.origin.x,-this.origin.y);
		this._matrix.scale(this.scale.x,this.scale.y);
		if(this.bakedRotationAngle <= 0) {
			if(this._angleChanged) {
				var radians = this.angle * (Math.PI / 180);
				this._sinAngle = Math.sin(radians);
				this._cosAngle = Math.cos(radians);
				this._angleChanged = false;
			}
			if(this.angle != 0) {
				var _this = this._matrix;
				var cos = this._cosAngle;
				var sin = this._sinAngle;
				var a1 = _this.a * cos - _this.b * sin;
				_this.b = _this.a * sin + _this.b * cos;
				_this.a = a1;
				var c1 = _this.c * cos - _this.d * sin;
				_this.d = _this.c * sin + _this.d * cos;
				_this.c = c1;
				var tx1 = _this.tx * cos - _this.ty * sin;
				_this.ty = _this.tx * sin + _this.ty * cos;
				_this.tx = tx1;
			}
		}
		var _this1 = this._point;
		var Y = this.origin.y;
		_this1.set_x(_this1.x + this.origin.x);
		_this1.set_y(_this1.y + Y);
		this._matrix.translate(this._point.x,this._point.y);
		if(this.isPixelPerfectRender(camera)) {
			this._matrix.tx = Math.floor(this._matrix.tx);
			this._matrix.ty = Math.floor(this._matrix.ty);
		}
		camera.drawPixels(this._frame,this.framePixels,this._matrix,this.colorTransform,this.blend,this.antialiasing,this.shader);
	}
	,stamp: function(Brush,X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		Brush.drawFrame();
		if(this.graphic == null || Brush.graphic == null) {
			throw new js__$Boot_HaxeError("Cannot stamp to or from a FlxSprite with no graphics.");
		}
		var bitmapData = Brush.framePixels;
		if(this.isSimpleRenderBlit()) {
			this._flashPoint.x = X + this.frame.frame.x;
			this._flashPoint.y = Y + this.frame.frame.y;
			this._flashRect2.width = bitmapData.width;
			this._flashRect2.height = bitmapData.height;
			this.graphic.bitmap.copyPixels(bitmapData,this._flashRect2,this._flashPoint,null,null,true);
			this._flashRect2.width = this.graphic.bitmap.width;
			this._flashRect2.height = this.graphic.bitmap.height;
		} else {
			this._matrix.identity();
			this._matrix.translate(-Brush.origin.x,-Brush.origin.y);
			this._matrix.scale(Brush.scale.x,Brush.scale.y);
			if(Brush.angle != 0) {
				this._matrix.rotate(Brush.angle * (Math.PI / 180));
			}
			this._matrix.translate(X + this.frame.frame.x + Brush.origin.x,Y + this.frame.frame.y + Brush.origin.y);
			this.graphic.bitmap.draw(bitmapData,this._matrix,null,Brush.blend,null,Brush.antialiasing);
		}
		if(flixel_FlxG.renderBlit) {
			this.dirty = true;
			this.calcFrame();
		}
	}
	,drawFrame: function(Force) {
		if(Force == null) {
			Force = false;
		}
		if(flixel_FlxG.renderBlit) {
			if(Force || this.dirty) {
				this.dirty = true;
				this.calcFrame();
			}
		} else {
			this.dirty = true;
			this.calcFrame(true);
		}
	}
	,centerOffsets: function(AdjustPosition) {
		if(AdjustPosition == null) {
			AdjustPosition = false;
		}
		this.offset.set_x((this.frameWidth - this.get_width()) * 0.5);
		this.offset.set_y((this.frameHeight - this.get_height()) * 0.5);
		if(AdjustPosition) {
			var _g = this;
			_g.set_x(_g.x + this.offset.x);
			var _g1 = this;
			_g1.set_y(_g1.y + this.offset.y);
		}
	}
	,centerOrigin: function() {
		this.origin.set(this.frameWidth * 0.5,this.frameHeight * 0.5);
	}
	,replaceColor: function(Color,NewColor,FetchPositions) {
		if(FetchPositions == null) {
			FetchPositions = false;
		}
		var positions = flixel_util_FlxBitmapDataUtil.replaceColor(this.graphic.bitmap,Color,NewColor,FetchPositions);
		if(positions != null) {
			this.dirty = true;
		}
		return positions;
	}
	,setColorTransform: function(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier,redOffset,greenOffset,blueOffset,alphaOffset) {
		if(alphaOffset == null) {
			alphaOffset = 0;
		}
		if(blueOffset == null) {
			blueOffset = 0;
		}
		if(greenOffset == null) {
			greenOffset = 0;
		}
		if(redOffset == null) {
			redOffset = 0;
		}
		if(alphaMultiplier == null) {
			alphaMultiplier = 1.0;
		}
		if(blueMultiplier == null) {
			blueMultiplier = 1.0;
		}
		if(greenMultiplier == null) {
			greenMultiplier = 1.0;
		}
		if(redMultiplier == null) {
			redMultiplier = 1.0;
		}
		var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
		var Value = Math.round(redMultiplier * 255);
		color &= -16711681;
		color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(greenMultiplier * 255);
		color &= -65281;
		color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(blueMultiplier * 255);
		color &= -256;
		color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(255);
		color &= 16777215;
		color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		this.set_color(color & 16777215);
		this.set_alpha(alphaMultiplier);
		flixel_util_FlxColorTransformUtil.setMultipliers(this.colorTransform,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
		flixel_util_FlxColorTransformUtil.setOffsets(this.colorTransform,redOffset,greenOffset,blueOffset,alphaOffset);
		this.useColorTransform = this.alpha != 1 || this.color != 16777215 || flixel_util_FlxColorTransformUtil.hasRGBOffsets(this.colorTransform);
		this.dirty = true;
	}
	,updateColorTransform: function() {
		if(this.colorTransform == null) {
			this.colorTransform = new openfl_geom_ColorTransform();
		}
		this.useColorTransform = this.alpha != 1 || this.color != 16777215;
		if(this.useColorTransform) {
			flixel_util_FlxColorTransformUtil.setMultipliers(this.colorTransform,(this.color >> 16 & 255) / 255,(this.color >> 8 & 255) / 255,(this.color & 255) / 255,this.alpha);
		} else {
			flixel_util_FlxColorTransformUtil.setMultipliers(this.colorTransform,1,1,1,1);
		}
		this.dirty = true;
	}
	,pixelsOverlapPoint: function(point,Mask,Camera) {
		if(Mask == null) {
			Mask = 255;
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		this.getScreenPosition(this._point,Camera);
		this._point.subtractPoint(this.offset);
		this._flashPoint.x = point.x - Camera.scroll.x - this._point.x;
		this._flashPoint.y = point.y - Camera.scroll.y - this._point.y;
		if(point._weak) {
			point.put();
		}
		if(this._flashPoint.x < 0 || this._flashPoint.x > this.frameWidth || this._flashPoint.y < 0 || this._flashPoint.y > this.frameHeight) {
			return false;
		} else {
			return (this.updateFramePixels().getPixel32(this._flashPoint.x | 0,this._flashPoint.y | 0) >> 24 & 255) * this.alpha >= Mask;
		}
	}
	,calcFrame: function(RunOnCpp) {
		if(RunOnCpp == null) {
			RunOnCpp = false;
		}
		this.checkEmptyFrame();
		if(flixel_FlxG.renderTile && !RunOnCpp) {
			return;
		}
		this.updateFramePixels();
	}
	,updateFramePixels: function() {
		if(this._frame == null || !this.dirty) {
			return this.framePixels;
		}
		if(flixel_FlxG.renderTile && this._frameGraphic != null) {
			this.dirty = false;
			return this.framePixels;
		}
		var doFlipX = this.flipX != this._frame.flipX;
		var doFlipX1 = this.animation._curAnim != null ? doFlipX != this.animation._curAnim.flipX : doFlipX;
		var doFlipY = this.flipY != this._frame.flipY;
		var doFlipY1 = this.animation._curAnim != null ? doFlipY != this.animation._curAnim.flipY : doFlipY;
		if(!doFlipX1 && !doFlipY1 && this._frame.type == 0) {
			this.framePixels = this._frame.paint(this.framePixels,this._flashPointZero,false,true);
		} else {
			this.framePixels = this._frame.paintRotatedAndFlipped(this.framePixels,this._flashPointZero,0,doFlipX1,doFlipY1,false,true);
		}
		if(this.useColorTransform) {
			this.framePixels.colorTransform(this._flashRect,this.colorTransform);
		}
		if(flixel_FlxG.renderTile && this.useFramePixels) {
			this._frameGraphic = flixel_util_FlxDestroyUtil.destroy(this._frameGraphic);
			this._frameGraphic = flixel_graphics_FlxGraphic.fromBitmapData(this.framePixels,false,null,false);
			this._frame = this._frameGraphic.get_imageFrame().get_frame().copyTo(this._frame);
		}
		this.dirty = false;
		return this.framePixels;
	}
	,getGraphicMidpoint: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		return point.set(this.x + this.frameWidth * 0.5,this.y + this.frameHeight * 0.5);
	}
	,isOnScreen: function(Camera) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		var minX = this.x - this.offset.x - Camera.scroll.x * this.scrollFactor.x;
		var minY = this.y - this.offset.y - Camera.scroll.y * this.scrollFactor.y;
		if((this.angle == 0 || this.bakedRotationAngle > 0) && this.scale.x == 1 && this.scale.y == 1) {
			if(minX > Camera.width || minX + this.frameWidth < 0) {
				return false;
			}
			if(minY > Camera.height || minY + this.frameHeight < 0) {
				return false;
			}
		} else {
			var radiusX = this._halfSize.x;
			var radiusY = this._halfSize.y;
			var ox = this.origin.x;
			if(ox != radiusX) {
				radiusX = Math.max(Math.abs(this.frameWidth - ox),Math.abs(ox));
			}
			var oy = this.origin.y;
			if(oy != radiusY) {
				radiusY = Math.max(Math.abs(this.frameHeight - oy),Math.abs(oy));
			}
			radiusX *= Math.abs(this.scale.x);
			radiusY *= Math.abs(this.scale.y);
			var radius = Math.max(radiusX,radiusY);
			radius *= 1.41421356237;
			minX += ox;
			var maxX = minX + radius;
			minX -= radius;
			if(maxX < 0 || minX > Camera.width) {
				return false;
			}
			minY += oy;
			var maxY = minY + radius;
			minY -= radius;
			if(maxY < 0 || minY > Camera.height) {
				return false;
			}
		}
		return true;
	}
	,isSimpleRender: function(camera) {
		if(flixel_FlxG.renderTile) {
			return false;
		}
		return this.isSimpleRenderBlit(camera);
	}
	,isSimpleRenderBlit: function(camera) {
		var result = (this.angle == 0 || this.bakedRotationAngle > 0) && this.scale.x == 1 && this.scale.y == 1 && this.blend == null;
		if(result) {
			if(camera != null) {
				result = this.isPixelPerfectRender(camera);
			} else {
				result = this.pixelPerfectRender;
			}
		} else {
			result = false;
		}
		return result;
	}
	,setFacingFlip: function(Direction,FlipX,FlipY) {
		this._facingFlip.h[Direction] = { x : FlipX, y : FlipY};
	}
	,setFrames: function(Frames,saveAnimations) {
		if(saveAnimations == null) {
			saveAnimations = true;
		}
		if(saveAnimations) {
			var animations = this.animation._animations;
			var reverse = false;
			var index = 0;
			var frameIndex = this.animation.frameIndex;
			var currName = null;
			if(this.animation._curAnim != null) {
				reverse = this.animation._curAnim.reversed;
				index = this.animation._curAnim.curFrame;
				currName = this.animation._curAnim.name;
			}
			this.animation._animations = null;
			this.set_frames(Frames);
			this.set_frame(this.frames.frames[frameIndex]);
			this.animation._animations = animations;
			if(currName != null) {
				this.animation.play(currName,false,reverse,index);
			}
		} else {
			this.set_frames(Frames);
		}
		return this;
	}
	,get_pixels: function() {
		if(this.graphic == null) {
			return null;
		} else {
			return this.graphic.bitmap;
		}
	}
	,set_pixels: function(Pixels) {
		var key = flixel_FlxG.bitmap.findKeyForBitmap(Pixels);
		if(key == null) {
			key = flixel_FlxG.bitmap.getUniqueKey();
			this.set_graphic(flixel_FlxG.bitmap.add(Pixels,false,key));
		} else {
			this.set_graphic(flixel_FlxG.bitmap._cache.get(key));
		}
		this.set_frames(this.graphic.get_imageFrame());
		return Pixels;
	}
	,set_frame: function(Value) {
		this.frame = Value;
		if(this.frame != null) {
			if(this.frame != null) {
				this.frameWidth = this.frame.sourceSize.x | 0;
				this.frameHeight = this.frame.sourceSize.y | 0;
			}
			this._halfSize.set(0.5 * this.frameWidth,0.5 * this.frameHeight);
			this._flashRect.x = 0;
			this._flashRect.y = 0;
			this._flashRect.width = this.frameWidth;
			this._flashRect.height = this.frameHeight;
			this.dirty = true;
		} else if(this.frames != null && this.frames.frames != null && this.numFrames > 0) {
			this.frame = this.frames.frames[0];
			this.dirty = true;
		} else {
			return null;
		}
		if(flixel_FlxG.renderTile) {
			this._frameGraphic = flixel_util_FlxDestroyUtil.destroy(this._frameGraphic);
		}
		if(this.clipRect != null) {
			this._frame = this.frame.clipTo(this.clipRect,this._frame);
		} else {
			this._frame = this.frame.copyTo(this._frame);
		}
		return this.frame;
	}
	,set_facing: function(Direction) {
		var flip = this._facingFlip.h[Direction];
		if(flip != null) {
			this.set_flipX(flip.x);
			this.set_flipY(flip.y);
		}
		return this.facing = Direction;
	}
	,set_alpha: function(Alpha) {
		if(this.alpha == Alpha) {
			return Alpha;
		}
		var lowerBound = Alpha < 0 ? 0 : Alpha;
		this.alpha = lowerBound > 1 ? 1 : lowerBound;
		this.updateColorTransform();
		return this.alpha;
	}
	,set_color: function(Color) {
		if(this.color == Color) {
			return Color;
		}
		this.color = Color;
		this.updateColorTransform();
		return this.color;
	}
	,set_angle: function(Value) {
		var newAngle = this.angle != Value;
		var ret = flixel_FlxObject.prototype.set_angle.call(this,Value);
		if(newAngle) {
			this._angleChanged = true;
			this.animation.update(0);
		}
		return ret;
	}
	,updateTrig: function() {
		if(this._angleChanged) {
			var radians = this.angle * (Math.PI / 180);
			this._sinAngle = Math.sin(radians);
			this._cosAngle = Math.cos(radians);
			this._angleChanged = false;
		}
	}
	,set_blend: function(Value) {
		return this.blend = Value;
	}
	,set_graphic: function(Value) {
		var oldGraphic = this.graphic;
		if(this.graphic != Value && Value != null) {
			Value.set_useCount(Value.get_useCount() + 1);
		}
		if(oldGraphic != null && oldGraphic != Value) {
			oldGraphic.set_useCount(oldGraphic.get_useCount() - 1);
		}
		return this.graphic = Value;
	}
	,set_clipRect: function(rect) {
		if(rect != null) {
			rect.x = Math.round(rect.x);
			rect.y = Math.round(rect.y);
			rect.width = Math.round(rect.width);
			rect.height = Math.round(rect.height);
			this.clipRect = rect;
		} else {
			this.clipRect = null;
		}
		if(this.frames != null) {
			this.set_frame(this.frames.frames[this.animation.frameIndex]);
		}
		return rect;
	}
	,set_frames: function(Frames) {
		if(this.animation != null) {
			this.animation.destroyAnimations();
		}
		if(Frames != null) {
			this.set_graphic(Frames.parent);
			this.frames = Frames;
			this.set_frame(this.frames.frames[0]);
			this.numFrames = this.frames.frames.length;
			this.resetHelpers();
			this.bakedRotationAngle = 0;
			this.animation.set_frameIndex(0);
			this.graphicLoaded();
		} else {
			this.frames = null;
			this.set_frame(null);
			this.set_graphic(null);
		}
		this.set_clipRect(null);
		return Frames;
	}
	,set_flipX: function(Value) {
		if(flixel_FlxG.renderTile) {
			this._facingHorizontalMult = Value ? -1 : 1;
		}
		this.dirty = this.flipX != Value || this.dirty;
		return this.flipX = Value;
	}
	,set_flipY: function(Value) {
		if(flixel_FlxG.renderTile) {
			this._facingVerticalMult = Value ? -1 : 1;
		}
		this.dirty = this.flipY != Value || this.dirty;
		return this.flipY = Value;
	}
	,set_antialiasing: function(value) {
		return this.antialiasing = value;
	}
	,set_useFramePixels: function(value) {
		if(flixel_FlxG.renderTile) {
			if(value != this.useFramePixels) {
				this.useFramePixels = value;
				this.set_frame(this.frame);
				if(value) {
					this.updateFramePixels();
				}
			}
			return value;
		} else {
			this.useFramePixels = true;
			return true;
		}
	}
	,checkFlipX: function() {
		var doFlipX = this.flipX != this._frame.flipX;
		if(this.animation._curAnim != null) {
			return doFlipX != this.animation._curAnim.flipX;
		}
		return doFlipX;
	}
	,checkFlipY: function() {
		var doFlipY = this.flipY != this._frame.flipY;
		if(this.animation._curAnim != null) {
			return doFlipY != this.animation._curAnim.flipY;
		}
		return doFlipY;
	}
	,__class__: flixel_FlxSprite
	,__properties__: $extend(flixel_FlxObject.prototype.__properties__,{set_clipRect:"set_clipRect",set_color:"set_color",set_blend:"set_blend",set_flipY:"set_flipY",set_flipX:"set_flipX",set_facing:"set_facing",set_alpha:"set_alpha",set_graphic:"set_graphic",set_frames:"set_frames",set_frame:"set_frame",set_pixels:"set_pixels",get_pixels:"get_pixels",set_antialiasing:"set_antialiasing",set_useFramePixels:"set_useFramePixels"})
});
var AnimatedSprite = function(FileName) {
	flixel_FlxSprite.call(this);
	var jsondata = JSON.parse(openfl_Assets.getText(FileName));
	this.loadGraphic(jsondata.image,true,Std.parseInt(jsondata.width),Std.parseInt(jsondata.height));
	var _g = 0;
	var _g1 = Reflect.fields(jsondata.animation);
	while(_g < _g1.length) {
		var anim = _g1[_g];
		++_g;
		var d = Reflect.field(jsondata.animation,anim);
		this.animation.add(anim,d.f,Std.parseInt(d.speed),d.looped == "true");
	}
};
$hxClasses["AnimatedSprite"] = AnimatedSprite;
AnimatedSprite.__name__ = ["AnimatedSprite"];
AnimatedSprite.__super__ = flixel_FlxSprite;
AnimatedSprite.prototype = $extend(flixel_FlxSprite.prototype,{
	update: function(elapsed) {
		flixel_FlxSprite.prototype.update.call(this,elapsed);
	}
	,SetAnimation: function(newAnim,force) {
		if(force == null) {
			force = false;
		}
		this.animation.play(newAnim,force);
	}
	,__class__: AnimatedSprite
});
var ApplicationMain = function() { };
$hxClasses["ApplicationMain"] = ApplicationMain;
ApplicationMain.__name__ = ["ApplicationMain"];
ApplicationMain.config = null;
ApplicationMain.preloader = null;
ApplicationMain.create = function() {
	var app = new openfl_display_Application();
	app.create(ApplicationMain.config);
	ApplicationMain.preloader = new openfl_display_Preloader(new flixel_system_FlxPreloader());
	app.setPreloader(ApplicationMain.preloader);
	ApplicationMain.preloader.onComplete.add(ApplicationMain.init);
	var urls = [];
	var types = [];
	urls.push("assets/levels/t1.tmx");
	types.push("TEXT");
	urls.push("assets/levels/baseTiles.tsx");
	types.push("TEXT");
	urls.push("assets/levels/tf.tmx");
	types.push("TEXT");
	urls.push("assets/levels/t2.tmx");
	types.push("TEXT");
	urls.push("assets/levels/base.tmx");
	types.push("TEXT");
	urls.push("assets/levels/tf2.tmx");
	types.push("TEXT");
	urls.push("assets/images/health.png");
	types.push("IMAGE");
	urls.push("assets/images/health.json");
	types.push("TEXT");
	urls.push("assets/images/player.png");
	types.push("IMAGE");
	urls.push("assets/images/tiles.png");
	types.push("IMAGE");
	urls.push("assets/images/player.json");
	types.push("TEXT");
	urls.push("assets/images/arrows.png");
	types.push("IMAGE");
	urls.push("assets/sounds/waves2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/waves3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_3_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_3_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_0_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_2_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_0_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_1_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_4_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_1_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_0_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_1_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_0_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_3_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_0_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_2_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_2_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_3_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_0_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_3_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_1_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_1_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_0_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_3_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_3_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_2_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_2_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_2_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_0_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_2_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_4_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_4_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_4_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_2_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_2_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_4_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_2_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_4_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_2_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_0_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_4_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_2_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_3_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_1_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_1_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_2_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_0_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_0_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_2_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_4_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_4_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_3_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_4_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_3_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_3_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_0_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_2_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_0_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_1_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_4_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_0_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_1_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_1_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_1_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_1_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_1_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_0_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_3_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_4_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_3_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_2_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_1_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_1_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_4_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_3_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_4_0.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_1_0_3.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_2_1_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_3_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_3_3_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_4_1.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/m/sound_0_4_2.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/die.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/water.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/step.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/victory.ogg");
	types.push("SOUND");
	urls.push("assets/sounds/waves1.ogg");
	types.push("SOUND");
	urls.push("flixel/sounds/flixel.ogg");
	types.push("SOUND");
	urls.push("flixel/sounds/beep.ogg");
	types.push("SOUND");
	urls.push("Nokia Cellphone FC Small");
	types.push("FONT");
	urls.push("Monsterrat");
	types.push("FONT");
	urls.push("flixel/images/ui/button.png");
	types.push("IMAGE");
	urls.push("flixel/images/logo/default.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/check_mark.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/radio.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/chrome.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/button_arrow_up.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/button_arrow_down.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/swatch.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/button_thin.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/chrome_inset.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/chrome_light.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/radio_dot.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/tooltip_arrow.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/box.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/tab.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/button.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/tab_back.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/dropdown_mark.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/chrome_flat.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/minus_mark.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/finger_big.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/invis.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/check_box.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/button_arrow_left.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/finger_small.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/hilight.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/plus_mark.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/button_arrow_right.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/img/button_toggle.png");
	types.push("IMAGE");
	urls.push("flixel/flixel-ui/xml/defaults.xml");
	types.push("TEXT");
	urls.push("flixel/flixel-ui/xml/default_loading_screen.xml");
	types.push("TEXT");
	urls.push("flixel/flixel-ui/xml/default_popup.xml");
	types.push("TEXT");
	if(ApplicationMain.config.assetsPrefix != null) {
		var _g1 = 0;
		var _g = urls.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(types[i] != "FONT") {
				urls[i] = ApplicationMain.config.assetsPrefix + urls[i];
			}
		}
	}
	ApplicationMain.preloader.load(urls,types);
	app.exec();
};
ApplicationMain.init = function() {
	ApplicationMain.preloader = null;
	if(true) {
		ApplicationMain.start();
	}
};
ApplicationMain.main = function() {
	ApplicationMain.config = { build : "467", company : "HaxeFlixel", file : "Raft", fps : 60, name : "Raft", orientation : "", packageName : "com.example.myapp", version : "0.0.1", windows : [{ antialiasing : 0, background : 0, borderless : false, depthBuffer : false, display : 0, fullscreen : false, hardware : false, height : 480, parameters : "{}", resizable : false, stencilBuffer : true, title : "Raft", vsync : true, width : 800, x : null, y : null}]};
};
ApplicationMain.start = function() {
	var hasMain = false;
	var entryPoint = Type.resolveClass("Main");
	var _g = 0;
	var _g1 = Type.getClassFields(entryPoint);
	while(_g < _g1.length) {
		var methodName = _g1[_g];
		++_g;
		if(methodName == "main") {
			hasMain = true;
			break;
		}
	}
	lime_Assets.initialize();
	if(hasMain) {
		Reflect.field(entryPoint,"main").apply(entryPoint,[]);
	} else {
		Type.createInstance(DocumentClass,[]);
	}
	if(openfl_Lib.current.stage.window.__fullscreen) {
		openfl_Lib.current.stage.dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,true,true));
	}
	openfl_Lib.current.stage.dispatchEvent(new openfl_events_Event("resize",false,false));
};
var openfl_events_IEventDispatcher = function() { };
$hxClasses["openfl.events.IEventDispatcher"] = openfl_events_IEventDispatcher;
openfl_events_IEventDispatcher.__name__ = ["openfl","events","IEventDispatcher"];
openfl_events_IEventDispatcher.prototype = {
	__class__: openfl_events_IEventDispatcher
};
var openfl_events_EventDispatcher = function(target) {
	if(target != null) {
		this.__targetDispatcher = target;
	}
};
$hxClasses["openfl.events.EventDispatcher"] = openfl_events_EventDispatcher;
openfl_events_EventDispatcher.__name__ = ["openfl","events","EventDispatcher"];
openfl_events_EventDispatcher.__interfaces__ = [openfl_events_IEventDispatcher];
openfl_events_EventDispatcher.__sortByPriority = function(l1,l2) {
	if(l1.priority == l2.priority) {
		return 0;
	} else if(l1.priority > l2.priority) {
		return -1;
	} else {
		return 1;
	}
};
openfl_events_EventDispatcher.prototype = {
	addEventListener: function(type,listener,useCapture,priority,useWeakReference) {
		if(useWeakReference == null) {
			useWeakReference = false;
		}
		if(priority == null) {
			priority = 0;
		}
		if(useCapture == null) {
			useCapture = false;
		}
		if(this.__eventMap == null) {
			this.__dispatching = new haxe_ds_StringMap();
			this.__eventMap = new haxe_ds_StringMap();
			this.__newEventMap = new haxe_ds_StringMap();
		}
		var _this = this.__eventMap;
		if(!(__map_reserved[type] != null ? _this.existsReserved(type) : _this.h.hasOwnProperty(type))) {
			var list = [];
			list.push(new openfl_events__$EventDispatcher_Listener(listener,useCapture,priority));
			var _this1 = this.__eventMap;
			if(__map_reserved[type] != null) {
				_this1.setReserved(type,list);
			} else {
				_this1.h[type] = list;
			}
		} else {
			var list1;
			var _this2 = this.__dispatching;
			if((__map_reserved[type] != null ? _this2.getReserved(type) : _this2.h[type]) == true) {
				var _this3 = this.__newEventMap;
				if(!(__map_reserved[type] != null ? _this3.existsReserved(type) : _this3.h.hasOwnProperty(type))) {
					var _this4 = this.__eventMap;
					list1 = (__map_reserved[type] != null ? _this4.getReserved(type) : _this4.h[type]).slice();
					var _this5 = this.__newEventMap;
					if(__map_reserved[type] != null) {
						_this5.setReserved(type,list1);
					} else {
						_this5.h[type] = list1;
					}
				} else {
					var _this6 = this.__newEventMap;
					if(__map_reserved[type] != null) {
						list1 = _this6.getReserved(type);
					} else {
						list1 = _this6.h[type];
					}
				}
			} else {
				var _this7 = this.__eventMap;
				if(__map_reserved[type] != null) {
					list1 = _this7.getReserved(type);
				} else {
					list1 = _this7.h[type];
				}
			}
			var _g1 = 0;
			var _g = list1.length;
			while(_g1 < _g) if(Reflect.compareMethods(list1[_g1++].callback,listener)) {
				return;
			}
			list1.push(new openfl_events__$EventDispatcher_Listener(listener,useCapture,priority));
			list1.sort(openfl_events_EventDispatcher.__sortByPriority);
		}
	}
	,dispatchEvent: function(event) {
		if(this.__targetDispatcher != null) {
			event.target = this.__targetDispatcher;
		} else {
			event.target = this;
		}
		return this.__dispatchEvent(event);
	}
	,hasEventListener: function(type) {
		if(this.__eventMap == null) {
			return false;
		}
		var tmp;
		var _this = this.__dispatching;
		if((__map_reserved[type] != null ? _this.getReserved(type) : _this.h[type]) == true) {
			var _this1 = this.__newEventMap;
			if(__map_reserved[type] != null) {
				tmp = _this1.existsReserved(type);
			} else {
				tmp = _this1.h.hasOwnProperty(type);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this2 = this.__newEventMap;
			return (__map_reserved[type] != null ? _this2.getReserved(type) : _this2.h[type]).length > 0;
		} else {
			var _this3 = this.__eventMap;
			if(__map_reserved[type] != null) {
				return _this3.existsReserved(type);
			} else {
				return _this3.h.hasOwnProperty(type);
			}
		}
	}
	,removeEventListener: function(type,listener,useCapture) {
		if(useCapture == null) {
			useCapture = false;
		}
		if(this.__eventMap == null) {
			return;
		}
		var _this = this.__eventMap;
		var list = __map_reserved[type] != null ? _this.getReserved(type) : _this.h[type];
		if(list == null) {
			return;
		}
		var _this1 = this.__dispatching;
		var dispatching = (__map_reserved[type] != null ? _this1.getReserved(type) : _this1.h[type]) == true;
		if(dispatching) {
			var _this2 = this.__newEventMap;
			if(!(__map_reserved[type] != null ? _this2.existsReserved(type) : _this2.h.hasOwnProperty(type))) {
				var _this3 = this.__eventMap;
				list = (__map_reserved[type] != null ? _this3.getReserved(type) : _this3.h[type]).slice();
				var _this4 = this.__newEventMap;
				if(__map_reserved[type] != null) {
					_this4.setReserved(type,list);
				} else {
					_this4.h[type] = list;
				}
			} else {
				var _this5 = this.__newEventMap;
				if(__map_reserved[type] != null) {
					list = _this5.getReserved(type);
				} else {
					list = _this5.h[type];
				}
			}
		}
		var _g1 = 0;
		var _g = list.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(list[i].match(listener,useCapture)) {
				list.splice(i,1);
				break;
			}
		}
		if(!dispatching) {
			if(list.length == 0) {
				this.__eventMap.remove(type);
			}
			var _this6 = this.__eventMap;
			if(!new haxe_ds__$StringMap_StringMapIterator(_this6,_this6.arrayKeys()).hasNext()) {
				this.__eventMap = null;
				this.__newEventMap = null;
			}
		}
	}
	,toString: function() {
		var full = Type.getClassName(js_Boot.getClass(this));
		var $short = full.split(".").pop();
		return "[object " + $short + "]";
	}
	,willTrigger: function(type) {
		return this.hasEventListener(type);
	}
	,__dispatchEvent: function(event) {
		if(this.__eventMap == null || event == null) {
			return false;
		}
		var type = event.type;
		var list;
		var _this = this.__dispatching;
		if((__map_reserved[type] != null ? _this.getReserved(type) : _this.h[type]) == true) {
			var _this1 = this.__newEventMap;
			if(__map_reserved[type] != null) {
				list = _this1.getReserved(type);
			} else {
				list = _this1.h[type];
			}
			if(list == null) {
				return false;
			}
			list = list.slice();
		} else {
			var _this2 = this.__eventMap;
			if(__map_reserved[type] != null) {
				list = _this2.getReserved(type);
			} else {
				list = _this2.h[type];
			}
			if(list == null) {
				return false;
			}
			var _this3 = this.__dispatching;
			if(__map_reserved[type] != null) {
				_this3.setReserved(type,true);
			} else {
				_this3.h[type] = true;
			}
		}
		if(event.target == null) {
			if(this.__targetDispatcher != null) {
				event.target = this.__targetDispatcher;
			} else {
				event.target = this;
			}
		}
		event.currentTarget = this;
		var capture = event.eventPhase == 1;
		var index = 0;
		var listener;
		while(index < list.length) {
			listener = list[index];
			if(listener.useCapture == capture) {
				listener.callback(event);
				if(event.__isCanceledNow) {
					break;
				}
			}
			if(listener == list[index]) {
				++index;
			}
		}
		var tmp;
		if(this.__newEventMap != null) {
			var _this4 = this.__newEventMap;
			if(__map_reserved[type] != null) {
				tmp = _this4.existsReserved(type);
			} else {
				tmp = _this4.h.hasOwnProperty(type);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this5 = this.__newEventMap;
			var list1 = __map_reserved[type] != null ? _this5.getReserved(type) : _this5.h[type];
			if(list1.length > 0) {
				var _this6 = this.__eventMap;
				if(__map_reserved[type] != null) {
					_this6.setReserved(type,list1);
				} else {
					_this6.h[type] = list1;
				}
			} else {
				this.__eventMap.remove(type);
			}
			var _this7 = this.__eventMap;
			if(!new haxe_ds__$StringMap_StringMapIterator(_this7,_this7.arrayKeys()).hasNext()) {
				this.__eventMap = null;
				this.__newEventMap = null;
			} else {
				this.__newEventMap.remove(type);
			}
		}
		var key = event.type;
		var _this8 = this.__dispatching;
		if(__map_reserved[key] != null) {
			_this8.setReserved(key,false);
		} else {
			_this8.h[key] = false;
		}
		return true;
	}
	,__class__: openfl_events_EventDispatcher
};
var openfl_display_IBitmapDrawable = function() { };
$hxClasses["openfl.display.IBitmapDrawable"] = openfl_display_IBitmapDrawable;
openfl_display_IBitmapDrawable.__name__ = ["openfl","display","IBitmapDrawable"];
openfl_display_IBitmapDrawable.prototype = {
	__class__: openfl_display_IBitmapDrawable
};
var openfl_display_DisplayObject = function() {
	this.__cacheAsBitmapSmooth = true;
	this.__cacheAsBitmap = false;
	this.__maskCached = false;
	openfl_events_EventDispatcher.call(this);
	this.__alpha = 1;
	this.__transform = new openfl_geom_Matrix();
	this.__visible = true;
	this.__rotation = 0;
	this.__rotationSine = 0;
	this.__rotationCosine = 1;
	this.__renderTransform = new openfl_geom_Matrix();
	this.__offset = new openfl_geom_Point();
	this.__worldOffset = new openfl_geom_Point();
	this.__worldAlpha = 1;
	this.__worldTransform = new openfl_geom_Matrix();
	this.__worldColorTransform = new openfl_geom_ColorTransform();
	this.set_name("instance" + ++openfl_display_DisplayObject.__instanceCount);
};
$hxClasses["openfl.display.DisplayObject"] = openfl_display_DisplayObject;
openfl_display_DisplayObject.__name__ = ["openfl","display","DisplayObject"];
openfl_display_DisplayObject.__interfaces__ = [openfl_display_IBitmapDrawable];
openfl_display_DisplayObject.__super__ = openfl_events_EventDispatcher;
openfl_display_DisplayObject.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	getBounds: function(targetCoordinateSpace) {
		var matrix;
		if(targetCoordinateSpace != null) {
			matrix = this.__getWorldTransform().clone();
			matrix.concat(targetCoordinateSpace.__getWorldTransform().clone().invert());
		} else {
			matrix = openfl_geom_Matrix.__temp;
			matrix.identity();
		}
		var bounds = new openfl_geom_Rectangle();
		this.__getBounds(bounds,matrix);
		return bounds;
	}
	,getRect: function(targetCoordinateSpace) {
		return this.getBounds(targetCoordinateSpace);
	}
	,globalToLocal: function(pos) {
		pos = pos.clone();
		var _this = this.__getWorldTransform();
		var norm = _this.a * _this.d - _this.b * _this.c;
		if(norm == 0) {
			pos.x = -_this.tx;
			pos.y = -_this.ty;
		} else {
			var px = 1.0 / norm * (_this.c * (_this.ty - pos.y) + _this.d * (pos.x - _this.tx));
			pos.y = 1.0 / norm * (_this.a * (pos.y - _this.ty) + _this.b * (_this.tx - pos.x));
			pos.x = px;
		}
		return pos;
	}
	,hitTestObject: function(obj) {
		if(obj != null && obj.parent != null && this.parent != null) {
			return this.getBounds(this).intersects(obj.getBounds(this));
		}
		return false;
	}
	,hitTestPoint: function(x,y,shapeFlag) {
		if(shapeFlag == null) {
			shapeFlag = false;
		}
		if(this.parent != null) {
			var bounds = new openfl_geom_Rectangle();
			this.__getBounds(bounds,this.__getWorldTransform());
			return bounds.containsPoint(new openfl_geom_Point(x,y));
		}
		return false;
	}
	,localToGlobal: function(point) {
		return this.__getWorldTransform().transformPoint(point);
	}
	,__broadcast: function(event,notifyChilden) {
		if(this.__eventMap != null && this.hasEventListener(event.type)) {
			var result = openfl_events_EventDispatcher.prototype.__dispatchEvent.call(this,event);
			if(event.__isCanceled) {
				return true;
			}
			return result;
		}
		return false;
	}
	,__dispatchEvent: function(event) {
		var result = openfl_events_EventDispatcher.prototype.__dispatchEvent.call(this,event);
		if(event.__isCanceled) {
			return true;
		}
		if(event.bubbles && this.parent != null && this.parent != this) {
			event.eventPhase = 3;
			if(event.target == null) {
				event.target = this;
			}
			this.parent.__dispatchEvent(event);
		}
		return result;
	}
	,__enterFrame: function(deltaTime) {
	}
	,__getBounds: function(rect,matrix) {
		if(this.__graphics != null) {
			this.__graphics.__getBounds(rect,matrix);
		}
	}
	,__getCursor: function() {
		return null;
	}
	,__getInteractive: function(stack) {
		return false;
	}
	,__getLocalBounds: function(rect) {
		this.__getBounds(rect,this.__transform);
	}
	,__getRenderBounds: function(rect,matrix) {
		if(this.__scrollRect == null) {
			this.__getBounds(rect,matrix);
		} else {
			var r = openfl_geom_Rectangle.__temp;
			r.copyFrom(this.__scrollRect);
			r.__transform(r,matrix);
			rect.__expand(matrix.tx,matrix.ty,r.width,r.height);
		}
	}
	,__getWorldTransform: function() {
		if(this.__transformDirty || openfl_display_DisplayObject.__worldTransformDirty > 0) {
			var list = [];
			var current = this;
			var transformDirty = this.__transformDirty;
			if(this.parent == null) {
				if(transformDirty) {
					this.__update(true,false);
				}
			} else {
				while(current.parent != null) {
					list.push(current);
					current = current.parent;
					if(current.__transformDirty) {
						transformDirty = true;
					}
				}
			}
			if(transformDirty) {
				var i = list.length;
				while(--i >= 0) list[i].__update(true,false);
			}
		}
		return this.__worldTransform;
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(this.__graphics != null) {
			if(!hitObject.get_visible() || this.__isMask) {
				return false;
			}
			if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
				return false;
			}
			if(this.__graphics.__hitTest(x,y,shapeFlag,this.__getWorldTransform())) {
				if(stack != null && !interactiveOnly) {
					stack.push(hitObject);
				}
				return true;
			}
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		if(this.__graphics != null) {
			if(this.__graphics.__hitTest(x,y,true,this.__getWorldTransform())) {
				return true;
			}
		}
		return false;
	}
	,__renderCairo: function(renderSession) {
	}
	,__renderCairoMask: function(renderSession) {
		if(this.__graphics != null) {
			openfl__$internal_renderer_cairo_CairoGraphics.renderMask(this.__graphics,renderSession);
		}
	}
	,__renderCanvas: function(renderSession) {
		if(this.__graphics != null) {
			if(!(!this.__renderable || this.__worldAlpha <= 0)) {
				var graphics = this.__graphics;
				if(graphics != null) {
					openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession);
					if(graphics.__canvas != null) {
						var context = renderSession.context;
						var scrollRect = this.get_scrollRect();
						if(graphics.__bounds.width > 0 && graphics.__bounds.height > 0 && (scrollRect == null || scrollRect.width > 0 && scrollRect.height > 0)) {
							if(this.__mask != null) {
								renderSession.maskManager.pushMask(this.__mask);
							}
							context.globalAlpha = this.__worldAlpha;
							var transform = this.__renderTransform;
							if(renderSession.roundPixels) {
								context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
							} else {
								context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
							}
							if(scrollRect == null) {
								context.drawImage(graphics.__canvas,graphics.__bounds.x,graphics.__bounds.y);
							} else {
								context.drawImage(graphics.__canvas,Math.ceil(graphics.__bounds.x + scrollRect.x),Math.ceil(graphics.__bounds.y + scrollRect.y),scrollRect.width,scrollRect.height,Math.ceil(graphics.__bounds.x + scrollRect.x),Math.ceil(graphics.__bounds.y + scrollRect.y),scrollRect.width,scrollRect.height);
							}
							if(this.__mask != null) {
								renderSession.maskManager.popMask();
							}
						}
					}
				}
			}
		}
	}
	,__renderCanvasMask: function(renderSession) {
		if(this.__graphics != null) {
			openfl__$internal_renderer_canvas_CanvasGraphics.renderMask(this.__graphics,renderSession);
		}
	}
	,__renderDOM: function(renderSession) {
		if(this.__graphics != null) {
			var graphics = this.__graphics;
			if(this.stage != null && this.__worldVisible && this.__renderable && graphics != null) {
				if(graphics.__dirty || this.__worldAlphaChanged || this.__canvas == null && graphics.__canvas != null) {
					openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession);
					if(graphics.__canvas != null) {
						if(this.__canvas == null) {
							this.__canvas = window.document.createElement("canvas");
							this.__context = this.__canvas.getContext("2d");
							openfl__$internal_renderer_dom_DOMRenderer.initializeElement(this,this.__canvas,renderSession);
						}
						this.__canvas.width = graphics.__canvas.width;
						this.__canvas.height = graphics.__canvas.height;
						this.__context.globalAlpha = this.__worldAlpha;
						this.__context.drawImage(graphics.__canvas,0,0);
					} else if(this.__canvas != null) {
						renderSession.element.removeChild(this.__canvas);
						this.__canvas = null;
						this.__style = null;
					}
				}
				if(this.__canvas != null) {
					if(this.__worldTransformChanged || graphics.__transformDirty) {
						graphics.__transformDirty = false;
						var transform = openfl_geom_Matrix.__temp;
						transform.identity();
						transform.translate(graphics.__bounds.x,graphics.__bounds.y);
						transform.concat(this.__worldTransform);
						this.__style.setProperty(renderSession.transformProperty,renderSession.roundPixels ? "matrix3d(" + transform.a + ", " + transform.b + ", 0, 0, " + transform.c + ", " + transform.d + ", 0, 0, 0, 0, 1, 0, " + (transform.tx | 0) + ", " + (transform.ty | 0) + ", 0, 1)" : "matrix3d(" + transform.a + ", " + transform.b + ", 0, 0, " + transform.c + ", " + transform.d + ", 0, 0, 0, 0, 1, 0, " + transform.tx + ", " + transform.ty + ", 0, 1)",null);
					}
					openfl__$internal_renderer_dom_DOMRenderer.applyStyle(this,renderSession,false,false,true);
				}
			} else if(this.__canvas != null) {
				renderSession.element.removeChild(this.__canvas);
				this.__canvas = null;
				this.__style = null;
			}
		}
	}
	,__renderGL: function(renderSession) {
		if(!this.__renderable || this.__worldAlpha <= 0) {
			return;
		}
		if(this.__cacheAsBitmap) {
			var x = this.__cachedBitmapBounds.x;
			var y = this.__cachedBitmapBounds.y;
			var w = this.__cachedBitmapBounds.width;
			var h = this.__cachedBitmapBounds.height;
			if(this.__cacheGLMatrix == null) {
				this.__cacheGLMatrix = new openfl_geom_Matrix();
			}
			if(this.__cacheAsBitmapMatrix != null) {
				var bmpBounds = openfl_geom_Rectangle.__temp;
				this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
				x = bmpBounds.x;
				y = bmpBounds.y;
				w = bmpBounds.width;
				h = bmpBounds.height;
				this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
			} else {
				this.__cacheGLMatrix.identity();
			}
			if(!(w <= 0 && h <= 0)) {
				if(this.__updateCachedBitmap || this.__updateFilters) {
					if(this.__cachedFilterBounds != null) {
						w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
						h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
					}
					if(this.__cachedBitmap == null) {
						this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
					}
					this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
					var m = this.__cacheGLMatrix.clone();
					m.translate(-x,-y);
					var shader = this.__shader;
					this.__shader = null;
					this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
					this.__shader = shader;
					this.__updateCachedBitmap = false;
				}
				if(this.__updateFilters) {
					openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
					this.__updateFilters = false;
				}
				this.__cacheGLMatrix.invert();
				var _this = this.__cacheGLMatrix;
				_this.tx = x * _this.a + y * _this.c + _this.tx;
				_this.ty = x * _this.b + y * _this.d + _this.ty;
				this.__cacheGLMatrix.concat(this.__renderTransform);
				this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
				renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
			}
			return;
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
		if(this.__graphics != null) {
			if(this.__graphics.__hardware) {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.render(this,renderSession);
			} else {
				openfl__$internal_renderer_canvas_CanvasGraphics.render(this.__graphics,renderSession);
				openfl__$internal_renderer_opengl_GLRenderer.renderBitmap(this,renderSession);
			}
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__drawGraphicsGL: function(renderSession) {
		if(this.__graphics != null) {
			if(this.__graphics.__hardware) {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.render(this,renderSession);
			} else {
				openfl__$internal_renderer_canvas_CanvasGraphics.render(this.__graphics,renderSession);
				openfl__$internal_renderer_opengl_GLRenderer.renderBitmap(this,renderSession);
			}
		}
	}
	,__preRenderGL: function(renderSession) {
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
	}
	,__postRenderGL: function(renderSession) {
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__cacheGL: function(renderSession) {
		var x = this.__cachedBitmapBounds.x;
		var y = this.__cachedBitmapBounds.y;
		var w = this.__cachedBitmapBounds.width;
		var h = this.__cachedBitmapBounds.height;
		if(this.__cacheGLMatrix == null) {
			this.__cacheGLMatrix = new openfl_geom_Matrix();
		}
		if(this.__cacheAsBitmapMatrix != null) {
			var bmpBounds = openfl_geom_Rectangle.__temp;
			this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
			x = bmpBounds.x;
			y = bmpBounds.y;
			w = bmpBounds.width;
			h = bmpBounds.height;
			this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
		} else {
			this.__cacheGLMatrix.identity();
		}
		if(w <= 0 && h <= 0) {
			return;
		}
		if(this.__updateCachedBitmap || this.__updateFilters) {
			if(this.__cachedFilterBounds != null) {
				w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
				h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
			}
			if(this.__cachedBitmap == null) {
				this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
			}
			this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
			var m = this.__cacheGLMatrix.clone();
			m.translate(-x,-y);
			var shader = this.__shader;
			this.__shader = null;
			this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
			this.__shader = shader;
			this.__updateCachedBitmap = false;
		}
		if(this.__updateFilters) {
			openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
			this.__updateFilters = false;
		}
		this.__cacheGLMatrix.invert();
		var _this = this.__cacheGLMatrix;
		_this.tx = x * _this.a + y * _this.c + _this.tx;
		_this.ty = x * _this.b + y * _this.d + _this.ty;
		this.__cacheGLMatrix.concat(this.__renderTransform);
		this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
		renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
	}
	,__setStageReference: function(stage) {
		if(this.stage != stage) {
			if(this.stage != null) {
				if(this.stage.get_focus() == this) {
					this.stage.set_focus(null);
				}
				this.dispatchEvent(new openfl_events_Event("removedFromStage",false,false));
			}
			this.stage = stage;
			if(stage != null) {
				this.dispatchEvent(new openfl_events_Event("addedToStage",false,false));
			}
		}
	}
	,__setRenderDirty: function() {
		if(!this.__renderDirty) {
			this.__updateCachedBitmap = true;
			this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
			this.__renderDirty = true;
			openfl_display_DisplayObject.__worldRenderDirty++;
		}
	}
	,__setTransformDirty: function() {
		if(!this.__transformDirty) {
			this.__transformDirty = true;
			openfl_display_DisplayObject.__worldTransformDirty++;
		}
	}
	,__update: function(transformOnly,updateChildren,maskGraphics) {
		this.__renderable = this.get_visible() && this.get_scaleX() != 0 && this.get_scaleY() != 0 && !this.__isMask;
		this.__updateTransforms();
		if(this.parent != null && this.__isMask) {
			this.__maskCached = false;
		}
		if(updateChildren && this.__transformDirty) {
			this.__transformDirty = false;
			openfl_display_DisplayObject.__worldTransformDirty--;
		}
		if(!transformOnly && this.__mask != null && !this.__mask.__maskCached) {
			if(this.__maskGraphics == null) {
				this.__maskGraphics = new openfl_display_Graphics();
			}
			this.__maskGraphics.clear();
			this.__mask.__update(true,true,this.__maskGraphics);
			this.__mask.__maskCached = true;
		}
		if(maskGraphics != null) {
			this.__updateMask(maskGraphics);
		}
		if(!transformOnly && this.__cacheAsBitmap) {
			if(this.__updateCachedBitmap || this.__updateFilters) {
				if(this.__cachedBitmapBounds == null) {
					this.__cachedBitmapBounds = new openfl_geom_Rectangle();
				}
				if(this.cacheAsBitmapBounds != null) {
					this.__cachedBitmapBounds.copyFrom(this.cacheAsBitmapBounds);
				} else {
					this.__cachedBitmapBounds.setEmpty();
					this.__getRenderBounds(this.__cachedBitmapBounds,openfl_geom_Matrix.__identity);
				}
				if(this.__filters != null) {
					if(this.__cachedFilterBounds == null) {
						this.__cachedFilterBounds = new openfl_geom_Rectangle();
					}
					this.__cachedFilterBounds.setEmpty();
					openfl_filters_BitmapFilter.__expandBounds(this.__filters,this.__cachedFilterBounds,openfl_geom_Matrix.__identity);
					this.__cachedBitmapBounds.x += this.__cachedFilterBounds.x;
					this.__cachedBitmapBounds.y += this.__cachedFilterBounds.y;
				}
			}
		}
		if(!transformOnly) {
			if(!this.__worldColorTransform.__equals(this.get_transform().get_colorTransform())) {
				this.__worldColorTransform = this.get_transform().get_colorTransform().__clone();
			}
			if(this.parent != null) {
				this.__worldAlpha = this.get_alpha() * this.parent.__worldAlpha;
				this.__worldColorTransform.__combine(this.parent.__worldColorTransform);
				if(this.blendMode == null || this.blendMode == 10) {
					this.__blendMode = this.parent.__blendMode;
				}
				if(this.shader == null) {
					this.__shader = this.parent.__shader;
				}
			} else {
				this.__worldAlpha = this.get_alpha();
			}
			if(updateChildren && this.__renderDirty) {
				this.__renderDirty = false;
			}
		}
	}
	,__updateChildren: function(transformOnly) {
		this.__renderable = this.get_visible() && this.get_scaleX() != 0 && this.get_scaleY() != 0 && !this.__isMask;
		if(!this.__renderable && !this.__isMask) {
			return;
		}
		this.__worldAlpha = this.get_alpha();
		if(this.__transformDirty) {
			this.__transformDirty = false;
			openfl_display_DisplayObject.__worldTransformDirty--;
		}
	}
	,__updateMask: function(maskGraphics) {
		if(this.__graphics != null) {
			maskGraphics.__commands.overrideMatrix(this.__worldTransform);
			maskGraphics.__commands.append(this.__graphics.__commands);
			maskGraphics.set___dirty(true);
			maskGraphics.__visible = true;
			if(maskGraphics.__bounds == null) {
				maskGraphics.__bounds = new openfl_geom_Rectangle();
			}
			this.__graphics.__getBounds(maskGraphics.__bounds,openfl_geom_Matrix.__identity);
		}
	}
	,__updateTransforms: function(overrideTransform) {
		var overrided = overrideTransform != null;
		var local = overrided ? overrideTransform.clone() : this.__transform;
		if(this.__worldTransform == null) {
			this.__worldTransform = new openfl_geom_Matrix();
		}
		if(!overrided && this.parent != null) {
			var parentTransform = this.parent.__worldTransform;
			this.__worldTransform.a = local.a * parentTransform.a + local.b * parentTransform.c;
			this.__worldTransform.b = local.a * parentTransform.b + local.b * parentTransform.d;
			this.__worldTransform.c = local.c * parentTransform.a + local.d * parentTransform.c;
			this.__worldTransform.d = local.c * parentTransform.b + local.d * parentTransform.d;
			this.__worldTransform.tx = local.tx * parentTransform.a + local.ty * parentTransform.c + parentTransform.tx;
			this.__worldTransform.ty = local.tx * parentTransform.b + local.ty * parentTransform.d + parentTransform.ty;
			this.__worldOffset.copyFrom(this.parent.__worldOffset);
		} else {
			this.__worldTransform.copyFrom(local);
			this.__worldOffset.setTo(0,0);
		}
		if(this.__scrollRect != null) {
			this.__offset = this.__worldTransform.deltaTransformPoint(this.__scrollRect.get_topLeft());
			this.__worldOffset.offset(this.__offset.x,this.__offset.y);
		} else {
			this.__offset.setTo(0,0);
		}
		this.__renderTransform.copyFrom(this.__worldTransform);
		this.__renderTransform.translate(-this.__worldOffset.x,-this.__worldOffset.y);
	}
	,get_alpha: function() {
		return this.__alpha;
	}
	,set_alpha: function(value) {
		if(value > 1.0) {
			value = 1.0;
		}
		if(value != this.__alpha) {
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return this.__alpha = value;
	}
	,set_blendMode: function(value) {
		this.__blendMode = value;
		return this.blendMode = value;
	}
	,set_shader: function(value) {
		this.__shader = value;
		return this.shader = value;
	}
	,get_cacheAsBitmap: function() {
		return this.__cacheAsBitmap;
	}
	,set_cacheAsBitmap: function(value) {
		if(!this.__renderDirty) {
			this.__updateCachedBitmap = true;
			this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
			this.__renderDirty = true;
			openfl_display_DisplayObject.__worldRenderDirty++;
		}
		return this.__cacheAsBitmap = this.__forceCacheAsBitmap ? true : value;
	}
	,get_cacheAsBitmapMatrix: function() {
		return this.__cacheAsBitmapMatrix;
	}
	,set_cacheAsBitmapMatrix: function(value) {
		if(!this.__renderDirty) {
			this.__updateCachedBitmap = true;
			this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
			this.__renderDirty = true;
			openfl_display_DisplayObject.__worldRenderDirty++;
		}
		return this.__cacheAsBitmapMatrix = value.clone();
	}
	,get_cacheAsBitmapSmooth: function() {
		return this.__cacheAsBitmapSmooth;
	}
	,set_cacheAsBitmapSmooth: function(value) {
		return this.__cacheAsBitmapSmooth = value;
	}
	,get_filters: function() {
		if(this.__filters == null) {
			return [];
		} else {
			return this.__filters.slice();
		}
	}
	,set_filters: function(value) {
		if(value != null && value.length > 0) {
			this.__filters = value;
			this.__forceCacheAsBitmap = true;
			this.__cacheAsBitmap = true;
			this.__updateFilters = true;
		} else {
			this.__filters = null;
			this.__forceCacheAsBitmap = false;
			this.__cacheAsBitmap = false;
			this.__updateFilters = false;
		}
		if(!this.__renderDirty) {
			this.__updateCachedBitmap = true;
			this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
			this.__renderDirty = true;
			openfl_display_DisplayObject.__worldRenderDirty++;
		}
		return value;
	}
	,get_height: function() {
		var bounds = new openfl_geom_Rectangle();
		this.__getBounds(bounds,this.__transform);
		return bounds.height;
	}
	,set_height: function(value) {
		var bounds = new openfl_geom_Rectangle();
		var matrix = openfl_geom_Matrix.__temp;
		matrix.identity();
		this.__getBounds(bounds,matrix);
		if(value != bounds.height) {
			this.set_scaleY(value / bounds.height);
		} else {
			this.set_scaleY(1);
		}
		return value;
	}
	,get_mask: function() {
		return this.__mask;
	}
	,set_mask: function(value) {
		if(value != this.__mask) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		if(this.__mask != null) {
			this.__mask.__isMask = false;
			this.__mask.__maskCached = false;
			var _this = this.__mask;
			if(!_this.__transformDirty) {
				_this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			var _this1 = this.__mask;
			if(!_this1.__renderDirty) {
				_this1.__updateCachedBitmap = true;
				_this1.__updateFilters = _this1.get_filters() != null && _this1.get_filters().length > 0;
				_this1.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			this.__maskGraphics = null;
		}
		if(value != null) {
			value.__isMask = true;
		}
		return this.__mask = value;
	}
	,get_mouseX: function() {
		var mouseX = this.stage != null ? this.stage.__mouseX : openfl_Lib.current.stage.__mouseX;
		var mouseY = this.stage != null ? this.stage.__mouseY : openfl_Lib.current.stage.__mouseY;
		var _this = this.__getWorldTransform();
		var norm = _this.a * _this.d - _this.b * _this.c;
		if(norm == 0) {
			return -_this.tx;
		} else {
			return 1.0 / norm * (_this.c * (_this.ty - mouseY) + _this.d * (mouseX - _this.tx));
		}
	}
	,get_mouseY: function() {
		var mouseX = this.stage != null ? this.stage.__mouseX : openfl_Lib.current.stage.__mouseX;
		var mouseY = this.stage != null ? this.stage.__mouseY : openfl_Lib.current.stage.__mouseY;
		var _this = this.__getWorldTransform();
		var norm = _this.a * _this.d - _this.b * _this.c;
		if(norm == 0) {
			return -_this.ty;
		} else {
			return 1.0 / norm * (_this.a * (mouseY - _this.ty) + _this.b * (_this.tx - mouseX));
		}
	}
	,get_name: function() {
		return this.__name;
	}
	,set_name: function(value) {
		return this.__name = value;
	}
	,get_root: function() {
		if(this.stage != null) {
			return openfl_Lib.current;
		}
		return null;
	}
	,get_rotation: function() {
		return this.__rotation;
	}
	,set_rotation: function(value) {
		if(value != this.__rotation) {
			this.__rotation = value;
			var radians = this.__rotation * (Math.PI / 180);
			this.__rotationSine = Math.sin(radians);
			this.__rotationCosine = Math.cos(radians);
			var __scaleX = this.get_scaleX();
			var __scaleY = this.get_scaleY();
			this.__transform.a = this.__rotationCosine * __scaleX;
			this.__transform.b = this.__rotationSine * __scaleX;
			this.__transform.c = -this.__rotationSine * __scaleY;
			this.__transform.d = this.__rotationCosine * __scaleY;
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return value;
	}
	,get_scaleX: function() {
		if(this.__transform.b == 0) {
			return this.__transform.a;
		} else {
			return Math.sqrt(this.__transform.a * this.__transform.a + this.__transform.b * this.__transform.b);
		}
	}
	,set_scaleX: function(value) {
		if(this.__transform.c == 0) {
			if(value != this.__transform.a) {
				if(!this.__transformDirty) {
					this.__transformDirty = true;
					openfl_display_DisplayObject.__worldTransformDirty++;
				}
			}
			this.__transform.a = value;
		} else {
			var a = this.__rotationCosine * value;
			var b = this.__rotationSine * value;
			if(this.__transform.a != a || this.__transform.b != b) {
				if(!this.__transformDirty) {
					this.__transformDirty = true;
					openfl_display_DisplayObject.__worldTransformDirty++;
				}
			}
			this.__transform.a = a;
			this.__transform.b = b;
		}
		return value;
	}
	,get_scaleY: function() {
		if(this.__transform.c == 0) {
			return this.__transform.d;
		} else {
			return Math.sqrt(this.__transform.c * this.__transform.c + this.__transform.d * this.__transform.d);
		}
	}
	,set_scaleY: function(value) {
		if(this.__transform.c == 0) {
			if(value != this.__transform.d) {
				if(!this.__transformDirty) {
					this.__transformDirty = true;
					openfl_display_DisplayObject.__worldTransformDirty++;
				}
			}
			this.__transform.d = value;
		} else {
			var c = -this.__rotationSine * value;
			var d = this.__rotationCosine * value;
			if(this.__transform.d != d || this.__transform.c != c) {
				if(!this.__transformDirty) {
					this.__transformDirty = true;
					openfl_display_DisplayObject.__worldTransformDirty++;
				}
			}
			this.__transform.c = c;
			this.__transform.d = d;
		}
		return value;
	}
	,get_scrollRect: function() {
		if(this.__scrollRect == null) {
			return null;
		}
		return this.__scrollRect.clone();
	}
	,set_scrollRect: function(value) {
		if(value != this.__scrollRect) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return this.__scrollRect = value;
	}
	,get_transform: function() {
		if(this.__objectTransform == null) {
			this.__objectTransform = new openfl_geom_Transform(this);
		}
		return this.__objectTransform;
	}
	,set_transform: function(value) {
		if(value == null) {
			throw new js__$Boot_HaxeError(new openfl_errors_TypeError("Parameter transform must be non-null."));
		}
		if(this.__objectTransform == null) {
			this.__objectTransform = new openfl_geom_Transform(this);
		}
		if(!this.__transformDirty) {
			this.__transformDirty = true;
			openfl_display_DisplayObject.__worldTransformDirty++;
		}
		this.__objectTransform.set_matrix(value.get_matrix());
		this.__objectTransform.set_colorTransform(value.get_colorTransform().__clone());
		return this.__objectTransform;
	}
	,get_visible: function() {
		return this.__visible;
	}
	,set_visible: function(value) {
		if(value != this.__visible) {
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return this.__visible = value;
	}
	,get_width: function() {
		var bounds = new openfl_geom_Rectangle();
		this.__getBounds(bounds,this.__transform);
		return bounds.width;
	}
	,set_width: function(value) {
		var bounds = new openfl_geom_Rectangle();
		var matrix = openfl_geom_Matrix.__temp;
		matrix.identity();
		this.__getBounds(bounds,matrix);
		if(value != bounds.width) {
			this.set_scaleX(value / bounds.width);
		} else {
			this.set_scaleX(1);
		}
		return value;
	}
	,get_x: function() {
		return this.__transform.tx;
	}
	,set_x: function(value) {
		if(value != this.__transform.tx) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return this.__transform.tx = value;
	}
	,get_y: function() {
		return this.__transform.ty;
	}
	,set_y: function(value) {
		if(value != this.__transform.ty) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return this.__transform.ty = value;
	}
	,__class__: openfl_display_DisplayObject
	,__properties__: {set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",set_transform:"set_transform",get_transform:"get_transform",set_shader:"set_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_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_mask:"set_mask",get_mask:"get_mask",set_height:"set_height",get_height:"get_height",set_filters:"set_filters",get_filters:"get_filters",set_cacheAsBitmapSmooth:"set_cacheAsBitmapSmooth",get_cacheAsBitmapSmooth:"get_cacheAsBitmapSmooth",set_cacheAsBitmapMatrix:"set_cacheAsBitmapMatrix",get_cacheAsBitmapMatrix:"get_cacheAsBitmapMatrix",set_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",set_blendMode:"set_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}
});
var openfl_display_InteractiveObject = function() {
	openfl_display_DisplayObject.call(this);
	this.doubleClickEnabled = false;
	this.mouseEnabled = true;
	this.needsSoftKeyboard = false;
	this.__tabEnabled = false;
	this.tabIndex = -1;
};
$hxClasses["openfl.display.InteractiveObject"] = openfl_display_InteractiveObject;
openfl_display_InteractiveObject.__name__ = ["openfl","display","InteractiveObject"];
openfl_display_InteractiveObject.__super__ = openfl_display_DisplayObject;
openfl_display_InteractiveObject.prototype = $extend(openfl_display_DisplayObject.prototype,{
	requestSoftKeyboard: function() {
		openfl_Lib.notImplemented("InteractiveObject.requestSoftKeyboard");
		return false;
	}
	,__getInteractive: function(stack) {
		if(stack != null) {
			stack.push(this);
			if(this.parent != null) {
				this.parent.__getInteractive(stack);
			}
		}
		return true;
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(!hitObject.get_visible() || this.__isMask || interactiveOnly && !this.mouseEnabled) {
			return false;
		}
		return openfl_display_DisplayObject.prototype.__hitTest.call(this,x,y,shapeFlag,stack,interactiveOnly,hitObject);
	}
	,get_tabEnabled: function() {
		return this.__tabEnabled;
	}
	,set_tabEnabled: function(value) {
		return this.__tabEnabled = value;
	}
	,__class__: openfl_display_InteractiveObject
	,__properties__: $extend(openfl_display_DisplayObject.prototype.__properties__,{set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})
});
var openfl_display_DisplayObjectContainer = function() {
	openfl_display_InteractiveObject.call(this);
	this.mouseChildren = true;
	this.__children = [];
	this.__removedChildren = [];
};
$hxClasses["openfl.display.DisplayObjectContainer"] = openfl_display_DisplayObjectContainer;
openfl_display_DisplayObjectContainer.__name__ = ["openfl","display","DisplayObjectContainer"];
openfl_display_DisplayObjectContainer.__super__ = openfl_display_InteractiveObject;
openfl_display_DisplayObjectContainer.prototype = $extend(openfl_display_InteractiveObject.prototype,{
	addChild: function(child) {
		if(child != null) {
			if(child.parent != null) {
				child.parent.removeChild(child);
			}
			this.__children.push(child);
			child.parent = this;
			if(this.stage != null) {
				child.__setStageReference(this.stage);
			}
			if(!child.__transformDirty) {
				child.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!child.__renderDirty) {
				child.__updateCachedBitmap = true;
				child.__updateFilters = child.get_filters() != null && child.get_filters().length > 0;
				child.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			var event = new openfl_events_Event("added",true);
			event.target = child;
			child.__dispatchEvent(event);
		}
		return child;
	}
	,addChildAt: function(child,index) {
		if(index > this.__children.length || index < 0) {
			throw new js__$Boot_HaxeError("Invalid index position " + index);
		}
		if(child.parent == this) {
			HxOverrides.remove(this.__children,child);
		} else {
			if(child.parent != null) {
				child.parent.removeChild(child);
			}
			child.parent = this;
			if(this.stage != null) {
				child.__setStageReference(this.stage);
			}
			if(!child.__transformDirty) {
				child.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!child.__renderDirty) {
				child.__updateCachedBitmap = true;
				child.__updateFilters = child.get_filters() != null && child.get_filters().length > 0;
				child.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			var event = new openfl_events_Event("added",true);
			event.target = child;
			child.__dispatchEvent(event);
		}
		this.__children.splice(index,0,child);
		return child;
	}
	,areInaccessibleObjectsUnderPoint: function(point) {
		return false;
	}
	,contains: function(child) {
		while(child != this && child != null) child = child.parent;
		return child == this;
	}
	,getChildAt: function(index) {
		if(index >= 0 && index < this.__children.length) {
			return this.__children[index];
		}
		return null;
	}
	,getChildByName: function(name) {
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.get_name() == name) {
				return child;
			}
		}
		return null;
	}
	,getChildIndex: function(child) {
		var _g1 = 0;
		var _g = this.__children.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(this.__children[i] == child) {
				return i;
			}
		}
		return -1;
	}
	,getObjectsUnderPoint: function(point) {
		var stack = [];
		this.__hitTest(point.x,point.y,false,stack,false,this);
		stack.reverse();
		return stack;
	}
	,removeChild: function(child) {
		if(child != null && child.parent == this) {
			child.__dispatchEvent(new openfl_events_Event("removed",true));
			if(this.stage != null) {
				child.__setStageReference(null);
			}
			child.parent = null;
			HxOverrides.remove(this.__children,child);
			this.__removedChildren.push(child);
			if(!child.__transformDirty) {
				child.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!child.__renderDirty) {
				child.__updateCachedBitmap = true;
				child.__updateFilters = child.get_filters() != null && child.get_filters().length > 0;
				child.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return child;
	}
	,removeChildAt: function(index) {
		if(index >= 0 && index < this.__children.length) {
			return this.removeChild(this.__children[index]);
		}
		return null;
	}
	,removeChildren: function(beginIndex,endIndex) {
		if(endIndex == null) {
			endIndex = 2147483647;
		}
		if(beginIndex == null) {
			beginIndex = 0;
		}
		if(endIndex == 2147483647) {
			endIndex = this.__children.length - 1;
			if(endIndex < 0) {
				return;
			}
		}
		if(beginIndex > this.__children.length - 1) {
			return;
		} else if(endIndex < beginIndex || beginIndex < 0 || endIndex > this.__children.length) {
			throw new js__$Boot_HaxeError(new openfl_errors_RangeError("The supplied index is out of bounds."));
		}
		var numRemovals = endIndex - beginIndex;
		while(numRemovals >= 0) {
			this.removeChildAt(beginIndex);
			--numRemovals;
		}
	}
	,resolve: function(fieldName) {
		if(this.__children == null) {
			return null;
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.get_name() == fieldName) {
				return child;
			}
		}
		return null;
	}
	,setChildIndex: function(child,index) {
		if(index >= 0 && index <= this.__children.length && child.parent == this) {
			HxOverrides.remove(this.__children,child);
			this.__children.splice(index,0,child);
		}
	}
	,swapChildren: function(child1,child2) {
		if(child1.parent == this && child2.parent == this) {
			var index1 = this.__children.indexOf(child1);
			var index2 = this.__children.indexOf(child2);
			this.__children[index1] = child2;
			this.__children[index2] = child1;
		}
	}
	,swapChildrenAt: function(index1,index2) {
		var swap = this.__children[index1];
		this.__children[index1] = this.__children[index2];
		this.__children[index2] = swap;
		swap = null;
	}
	,__broadcast: function(event,notifyChilden) {
		if(event.target == null) {
			event.target = this;
		}
		var result = openfl_display_InteractiveObject.prototype.__broadcast.call(this,event,notifyChilden);
		if(!event.__isCanceled && notifyChilden) {
			var _g = 0;
			var _g1 = this.__children;
			while(_g < _g1.length) {
				var child = _g1[_g];
				++_g;
				child.__broadcast(event,true);
				if(event.__isCanceled) {
					return true;
				}
			}
		}
		return result;
	}
	,__enterFrame: function(deltaTime) {
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__enterFrame(deltaTime);
		}
	}
	,__getBounds: function(rect,matrix) {
		openfl_display_InteractiveObject.prototype.__getBounds.call(this,rect,matrix);
		if(this.__children.length == 0) {
			return;
		}
		if(matrix != null) {
			this.__updateTransforms(matrix);
			this.__updateChildren(true);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.get_scaleX() == 0 || child.get_scaleY() == 0) {
				continue;
			}
			child.__getBounds(rect,child.__worldTransform);
		}
		if(matrix != null) {
			this.__updateTransforms();
			this.__updateChildren(true);
		}
	}
	,__getRenderBounds: function(rect,matrix) {
		if(this.__scrollRect != null) {
			openfl_display_InteractiveObject.prototype.__getRenderBounds.call(this,rect,matrix);
			return;
		} else {
			openfl_display_InteractiveObject.prototype.__getBounds.call(this,rect,matrix);
		}
		if(this.__children.length == 0) {
			return;
		}
		if(matrix != null) {
			this.__updateTransforms(matrix);
			this.__updateChildren(true);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.get_scaleX() == 0 || child.get_scaleY() == 0 || child.__isMask) {
				continue;
			}
			child.__getRenderBounds(rect,child.__worldTransform);
		}
		if(matrix != null) {
			this.__updateTransforms();
			this.__updateChildren(true);
		}
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(!hitObject.get_visible() || this.__isMask || interactiveOnly && !this.mouseEnabled && !this.mouseChildren) {
			return false;
		}
		if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
			return false;
		}
		if(this.get_scrollRect() != null && !this.get_scrollRect().containsPoint(this.globalToLocal(new openfl_geom_Point(x,y)))) {
			return false;
		}
		var i = this.__children.length;
		if(interactiveOnly) {
			if(stack == null || !this.mouseChildren) {
				while(--i >= 0) if(this.__children[i].__hitTest(x,y,shapeFlag,null,true,this.__children[i])) {
					if(stack != null) {
						stack.push(hitObject);
					}
					return true;
				}
			} else if(stack != null) {
				var length = stack.length;
				var interactive = false;
				var hitTest = false;
				while(--i >= 0) {
					interactive = this.__children[i].__getInteractive(null);
					if(interactive || this.mouseEnabled && !hitTest) {
						if(this.__children[i].__hitTest(x,y,shapeFlag,stack,true,this.__children[i])) {
							hitTest = true;
							if(interactive) {
								break;
							}
						}
					}
				}
				if(hitTest) {
					stack.splice(length,0,hitObject);
					return true;
				}
			}
		} else {
			while(--i >= 0) this.__children[i].__hitTest(x,y,shapeFlag,stack,false,this.__children[i]);
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		var i = this.__children.length;
		while(--i >= 0) if(this.__children[i].__hitTestMask(x,y)) {
			return true;
		}
		return false;
	}
	,__renderCairo: function(renderSession) {
		if(!this.__renderable || this.__worldAlpha <= 0) {
			return;
		}
		openfl_display_InteractiveObject.prototype.__renderCairo.call(this,renderSession);
		if(this.get_scrollRect() != null) {
			renderSession.maskManager.pushRect(this.get_scrollRect(),this.__worldTransform);
		}
		if(this.__mask != null) {
			renderSession.maskManager.pushMask(this.__mask);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderCairo(renderSession);
		}
		if(this.__removedChildren.length > 0) {
			this.__removedChildren.splice(0,this.__removedChildren.length);
		}
		if(this.__mask != null) {
			renderSession.maskManager.popMask();
		}
		if(this.get_scrollRect() != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__renderCairoMask: function(renderSession) {
		if(this.__graphics != null) {
			openfl__$internal_renderer_cairo_CairoGraphics.renderMask(this.__graphics,renderSession);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderCairoMask(renderSession);
		}
	}
	,__renderCanvas: function(renderSession) {
		if(!this.__renderable || this.__worldAlpha <= 0) {
			return;
		}
		openfl_display_InteractiveObject.prototype.__renderCanvas.call(this,renderSession);
		if(this.get_scrollRect() != null) {
			renderSession.maskManager.pushRect(this.get_scrollRect(),this.__worldTransform);
		}
		if(this.__mask != null) {
			renderSession.maskManager.pushMask(this.__mask);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderCanvas(renderSession);
		}
		if(this.__removedChildren.length > 0) {
			this.__removedChildren.splice(0,this.__removedChildren.length);
		}
		if(this.__mask != null) {
			renderSession.maskManager.popMask();
		}
		if(this.get_scrollRect() != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__renderCanvasMask: function(renderSession) {
		if(this.__graphics != null) {
			openfl__$internal_renderer_canvas_CanvasGraphics.renderMask(this.__graphics,renderSession);
		}
		var bounds = new openfl_geom_Rectangle();
		this.__getBounds(bounds,this.__transform);
		renderSession.context.rect(0,0,bounds.width,bounds.height);
	}
	,__renderDOM: function(renderSession) {
		openfl_display_InteractiveObject.prototype.__renderDOM.call(this,renderSession);
		if(this.__mask != null) {
			renderSession.maskManager.pushMask(this.__mask);
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderDOM(renderSession);
		}
		var _g2 = 0;
		var _g11 = this.__removedChildren;
		while(_g2 < _g11.length) {
			var orphan = _g11[_g2];
			++_g2;
			if(orphan.stage == null) {
				orphan.__renderDOM(renderSession);
			}
		}
		if(this.__removedChildren.length > 0) {
			this.__removedChildren.splice(0,this.__removedChildren.length);
		}
		if(this.__mask != null) {
			renderSession.maskManager.popMask();
		}
	}
	,__renderGL: function(renderSession) {
		if(!this.__renderable || this.__worldAlpha <= 0) {
			return;
		}
		if(this.__cacheAsBitmap) {
			var x = this.__cachedBitmapBounds.x;
			var y = this.__cachedBitmapBounds.y;
			var w = this.__cachedBitmapBounds.width;
			var h = this.__cachedBitmapBounds.height;
			if(this.__cacheGLMatrix == null) {
				this.__cacheGLMatrix = new openfl_geom_Matrix();
			}
			if(this.__cacheAsBitmapMatrix != null) {
				var bmpBounds = openfl_geom_Rectangle.__temp;
				this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
				x = bmpBounds.x;
				y = bmpBounds.y;
				w = bmpBounds.width;
				h = bmpBounds.height;
				this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
			} else {
				this.__cacheGLMatrix.identity();
			}
			if(!(w <= 0 && h <= 0)) {
				if(this.__updateCachedBitmap || this.__updateFilters) {
					if(this.__cachedFilterBounds != null) {
						w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
						h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
					}
					if(this.__cachedBitmap == null) {
						this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
					}
					this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
					var m = this.__cacheGLMatrix.clone();
					m.translate(-x,-y);
					var shader = this.__shader;
					this.__shader = null;
					this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
					this.__shader = shader;
					this.__updateCachedBitmap = false;
				}
				if(this.__updateFilters) {
					openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
					this.__updateFilters = false;
				}
				this.__cacheGLMatrix.invert();
				var _this = this.__cacheGLMatrix;
				_this.tx = x * _this.a + y * _this.c + _this.tx;
				_this.ty = x * _this.b + y * _this.d + _this.ty;
				this.__cacheGLMatrix.concat(this.__renderTransform);
				this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
				renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
			}
			return;
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
		if(this.__graphics != null) {
			if(this.__graphics.__hardware) {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.render(this,renderSession);
			} else {
				openfl__$internal_renderer_canvas_CanvasGraphics.render(this.__graphics,renderSession);
				openfl__$internal_renderer_opengl_GLRenderer.renderBitmap(this,renderSession);
			}
		}
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__renderGL(renderSession);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
		if(this.__removedChildren.length > 0) {
			this.__removedChildren.splice(0,this.__removedChildren.length);
		}
	}
	,__setStageReference: function(stage) {
		if(this.stage != stage) {
			if(this.stage != null) {
				this.__dispatchEvent(new openfl_events_Event("removedFromStage",false,false));
			}
			this.stage = stage;
			if(stage != null) {
				this.__dispatchEvent(new openfl_events_Event("addedToStage",false,false));
			}
			if(this.__children != null) {
				var _g = 0;
				var _g1 = this.__children;
				while(_g < _g1.length) {
					var child = _g1[_g];
					++_g;
					child.__setStageReference(stage);
				}
			}
		}
	}
	,__update: function(transformOnly,updateChildren,maskGraphics) {
		openfl_display_InteractiveObject.prototype.__update.call(this,transformOnly,updateChildren,maskGraphics);
		if(!this.__renderable && !this.__isMask) {
			return;
		}
		if(updateChildren) {
			var _g = 0;
			var _g1 = this.__children;
			while(_g < _g1.length) {
				var child = _g1[_g];
				++_g;
				child.__update(transformOnly,true,maskGraphics);
			}
		}
	}
	,__updateChildren: function(transformOnly) {
		openfl_display_InteractiveObject.prototype.__updateChildren.call(this,transformOnly);
		var _g = 0;
		var _g1 = this.__children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			child.__update(transformOnly,true);
		}
	}
	,get_numChildren: function() {
		return this.__children.length;
	}
	,__class__: openfl_display_DisplayObjectContainer
	,__properties__: $extend(openfl_display_InteractiveObject.prototype.__properties__,{get_numChildren:"get_numChildren"})
});
var openfl_display_Sprite = function() {
	openfl_display_DisplayObjectContainer.call(this);
	this.buttonMode = false;
	this.useHandCursor = true;
	this.loaderInfo = openfl_display_LoaderInfo.create(null);
};
$hxClasses["openfl.display.Sprite"] = openfl_display_Sprite;
openfl_display_Sprite.__name__ = ["openfl","display","Sprite"];
openfl_display_Sprite.__super__ = openfl_display_DisplayObjectContainer;
openfl_display_Sprite.prototype = $extend(openfl_display_DisplayObjectContainer.prototype,{
	startDrag: function(lockCenter,bounds) {
		if(lockCenter == null) {
			lockCenter = false;
		}
		if(this.stage != null) {
			this.stage.__startDrag(this,lockCenter,bounds);
		}
	}
	,stopDrag: function() {
		if(this.stage != null) {
			this.stage.__stopDrag(this);
		}
	}
	,__getCursor: function() {
		if(this.buttonMode && this.useHandCursor) {
			return lime_ui_MouseCursor.POINTER;
		} else {
			return null;
		}
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(this.hitArea != null) {
			if(!this.hitArea.mouseEnabled) {
				this.hitArea.mouseEnabled = true;
				var hitTest = this.hitArea.__hitTest(x,y,shapeFlag,null,true,hitObject);
				this.hitArea.mouseEnabled = false;
				if(hitTest) {
					stack[stack.length] = hitObject;
				}
				return hitTest;
			}
		} else {
			if(!hitObject.get_visible() || this.__isMask || interactiveOnly && !this.mouseEnabled && !this.mouseChildren) {
				return false;
			}
			if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
				return false;
			}
			if(openfl_display_DisplayObjectContainer.prototype.__hitTest.call(this,x,y,shapeFlag,stack,interactiveOnly,hitObject)) {
				return interactiveOnly;
			} else if((!interactiveOnly || this.mouseEnabled) && this.__graphics != null && this.__graphics.__hitTest(x,y,shapeFlag,this.__getWorldTransform())) {
				if(stack != null) {
					stack.push(hitObject);
				}
				return true;
			}
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		if(openfl_display_DisplayObjectContainer.prototype.__hitTestMask.call(this,x,y)) {
			return true;
		} else if(this.__graphics != null && this.__graphics.__hitTest(x,y,true,this.__getWorldTransform())) {
			return true;
		}
		return false;
	}
	,get_graphics: function() {
		if(this.__graphics == null) {
			this.__graphics = new openfl_display_Graphics();
			this.__graphics.__owner = this;
		}
		return this.__graphics;
	}
	,get_tabEnabled: function() {
		if(!this.__tabEnabled) {
			return this.buttonMode;
		} else {
			return true;
		}
	}
	,__class__: openfl_display_Sprite
	,__properties__: $extend(openfl_display_DisplayObjectContainer.prototype.__properties__,{get_graphics:"get_graphics"})
});
var Main = function() {
	openfl_display_Sprite.call(this);
	this.addChild(new flixel_FlxGame(0,0,MenuState));
};
$hxClasses["Main"] = Main;
Main.__name__ = ["Main"];
Main.__super__ = openfl_display_Sprite;
Main.prototype = $extend(openfl_display_Sprite.prototype,{
	__class__: Main
});
var DocumentClass = function() {
	openfl_Lib.current.addChild(this);
	Main.call(this);
	this.dispatchEvent(new openfl_events_Event("addedToStage",false,false));
};
$hxClasses["DocumentClass"] = DocumentClass;
DocumentClass.__name__ = ["DocumentClass"];
DocumentClass.__super__ = Main;
DocumentClass.prototype = $extend(Main.prototype,{
	__class__: DocumentClass
});
var AssetPaths = function() { };
$hxClasses["AssetPaths"] = AssetPaths;
AssetPaths.__name__ = ["AssetPaths"];
var Character = function(FileName) {
	this.PY = 0;
	this.PX = 0;
	this.animType = "";
	flixel_FlxSprite.call(this);
	var jsondata = JSON.parse(openfl_Assets.getText(FileName));
	this.set_width(Std.parseInt(jsondata.width));
	this.set_height(Std.parseInt(jsondata.height));
	this.dying = false;
	this.loadGraphic(jsondata.image,true,32,32);
	var _g = 0;
	var _g1 = Reflect.fields(jsondata.animation);
	while(_g < _g1.length) {
		var anim = _g1[_g];
		++_g;
		var d = Reflect.field(jsondata.animation,anim);
		this.animation.add(anim,d.f,Std.parseInt(d.speed),d.looped == "true");
	}
	this.animation.play("idle");
	this.dir = 1;
};
$hxClasses["Character"] = Character;
Character.__name__ = ["Character"];
Character.__super__ = flixel_FlxSprite;
Character.prototype = $extend(flixel_FlxSprite.prototype,{
	updatePos: function() {
		this.set_x(this.PX * 32);
		this.set_y(this.PY * 32);
	}
	,setPos: function(pos) {
		this.PX = pos.x;
		this.PY = pos.y;
		this.updatePos();
	}
	,setPos2: function(x,y) {
		this.PX = x;
		this.PY = y;
		this.updatePos();
	}
	,update: function(elapsed) {
		var tx = this.PX * 32.0;
		var ty = this.PY * 32.0;
		var dx = tx - this.x;
		var dy = ty - this.y;
		if(Math.abs(dx) < 5) {
			this.set_x(tx);
		} else {
			var _g = this;
			_g.set_x(_g.x + (dx < 0 ? -5. : 5));
		}
		if(Math.abs(dy) < 5) {
			this.set_y(ty);
		} else {
			var _g1 = this;
			_g1.set_y(_g1.y + (dy < 0 ? -5. : 5));
		}
		if(this.animation.get_finished() && this.animType != "idle") {
			this.SetAnimation("idle");
		}
		flixel_FlxSprite.prototype.update.call(this,elapsed);
	}
	,die: function() {
		this.kill();
	}
	,SetAnimation: function(newAnim,force) {
		if(force == null) {
			force = false;
		}
		if(this.animType != newAnim || force) {
			this.animation.play(newAnim);
			this.animType = newAnim;
		}
	}
	,__class__: Character
});
var lime_AssetLibrary = function() {
	this.onChange = new lime_app_Event_$Void_$Void();
};
$hxClasses["lime.AssetLibrary"] = lime_AssetLibrary;
lime_AssetLibrary.__name__ = ["lime","AssetLibrary"];
lime_AssetLibrary.prototype = {
	exists: function(id,type) {
		return false;
	}
	,getAudioBuffer: function(id) {
		return null;
	}
	,getBytes: function(id) {
		return null;
	}
	,getFont: function(id) {
		return null;
	}
	,getImage: function(id) {
		return null;
	}
	,getPath: function(id) {
		return null;
	}
	,getText: function(id) {
		var bytes = this.getBytes(id);
		if(bytes == null) {
			return null;
		} else {
			return bytes.getString(0,bytes.length);
		}
	}
	,isLocal: function(id,type) {
		return true;
	}
	,list: function(type) {
		return null;
	}
	,load: function() {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis;
		});
	}
	,loadAudioBuffer: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getAudioBuffer(id);
		});
	}
	,loadBytes: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getBytes(id);
		});
	}
	,loadFont: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getFont(id);
		});
	}
	,loadImage: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getImage(id);
		});
	}
	,loadText: function(id) {
		return this.loadBytes(id).then(function(bytes) {
			return new lime_app_Future(function() {
				if(bytes == null) {
					return null;
				} else {
					return bytes.getString(0,bytes.length);
				}
			});
		});
	}
	,unload: function() {
	}
	,__class__: lime_AssetLibrary
};
var DefaultAssetLibrary = function() {
	this.type = new haxe_ds_StringMap();
	this.path = new haxe_ds_StringMap();
	this.className = new haxe_ds_StringMap();
	lime_AssetLibrary.call(this);
	openfl_text_Font.registerFont(_$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$nokiafc22_$ttf);
	openfl_text_Font.registerFont(_$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$monsterrat_$ttf);
	var _this = this.path;
	if(__map_reserved["assets/levels/t1.tmx"] != null) {
		_this.setReserved("assets/levels/t1.tmx","assets/levels/t1.tmx");
	} else {
		_this.h["assets/levels/t1.tmx"] = "assets/levels/t1.tmx";
	}
	var _this1 = this.type;
	var value = "TEXT";
	if(__map_reserved["assets/levels/t1.tmx"] != null) {
		_this1.setReserved("assets/levels/t1.tmx",value);
	} else {
		_this1.h["assets/levels/t1.tmx"] = value;
	}
	var _this2 = this.path;
	if(__map_reserved["assets/levels/baseTiles.tsx"] != null) {
		_this2.setReserved("assets/levels/baseTiles.tsx","assets/levels/baseTiles.tsx");
	} else {
		_this2.h["assets/levels/baseTiles.tsx"] = "assets/levels/baseTiles.tsx";
	}
	var _this3 = this.type;
	var value1 = "TEXT";
	if(__map_reserved["assets/levels/baseTiles.tsx"] != null) {
		_this3.setReserved("assets/levels/baseTiles.tsx",value1);
	} else {
		_this3.h["assets/levels/baseTiles.tsx"] = value1;
	}
	var _this4 = this.path;
	if(__map_reserved["assets/levels/tf.tmx"] != null) {
		_this4.setReserved("assets/levels/tf.tmx","assets/levels/tf.tmx");
	} else {
		_this4.h["assets/levels/tf.tmx"] = "assets/levels/tf.tmx";
	}
	var _this5 = this.type;
	var value2 = "TEXT";
	if(__map_reserved["assets/levels/tf.tmx"] != null) {
		_this5.setReserved("assets/levels/tf.tmx",value2);
	} else {
		_this5.h["assets/levels/tf.tmx"] = value2;
	}
	var _this6 = this.path;
	if(__map_reserved["assets/levels/t2.tmx"] != null) {
		_this6.setReserved("assets/levels/t2.tmx","assets/levels/t2.tmx");
	} else {
		_this6.h["assets/levels/t2.tmx"] = "assets/levels/t2.tmx";
	}
	var _this7 = this.type;
	var value3 = "TEXT";
	if(__map_reserved["assets/levels/t2.tmx"] != null) {
		_this7.setReserved("assets/levels/t2.tmx",value3);
	} else {
		_this7.h["assets/levels/t2.tmx"] = value3;
	}
	var _this8 = this.path;
	if(__map_reserved["assets/levels/base.tmx"] != null) {
		_this8.setReserved("assets/levels/base.tmx","assets/levels/base.tmx");
	} else {
		_this8.h["assets/levels/base.tmx"] = "assets/levels/base.tmx";
	}
	var _this9 = this.type;
	var value4 = "TEXT";
	if(__map_reserved["assets/levels/base.tmx"] != null) {
		_this9.setReserved("assets/levels/base.tmx",value4);
	} else {
		_this9.h["assets/levels/base.tmx"] = value4;
	}
	var _this10 = this.path;
	if(__map_reserved["assets/levels/tf2.tmx"] != null) {
		_this10.setReserved("assets/levels/tf2.tmx","assets/levels/tf2.tmx");
	} else {
		_this10.h["assets/levels/tf2.tmx"] = "assets/levels/tf2.tmx";
	}
	var _this11 = this.type;
	var value5 = "TEXT";
	if(__map_reserved["assets/levels/tf2.tmx"] != null) {
		_this11.setReserved("assets/levels/tf2.tmx",value5);
	} else {
		_this11.h["assets/levels/tf2.tmx"] = value5;
	}
	var _this12 = this.path;
	if(__map_reserved["assets/images/health.png"] != null) {
		_this12.setReserved("assets/images/health.png","assets/images/health.png");
	} else {
		_this12.h["assets/images/health.png"] = "assets/images/health.png";
	}
	var _this13 = this.type;
	var value6 = "IMAGE";
	if(__map_reserved["assets/images/health.png"] != null) {
		_this13.setReserved("assets/images/health.png",value6);
	} else {
		_this13.h["assets/images/health.png"] = value6;
	}
	var _this14 = this.path;
	if(__map_reserved["assets/images/health.json"] != null) {
		_this14.setReserved("assets/images/health.json","assets/images/health.json");
	} else {
		_this14.h["assets/images/health.json"] = "assets/images/health.json";
	}
	var _this15 = this.type;
	var value7 = "TEXT";
	if(__map_reserved["assets/images/health.json"] != null) {
		_this15.setReserved("assets/images/health.json",value7);
	} else {
		_this15.h["assets/images/health.json"] = value7;
	}
	var _this16 = this.path;
	if(__map_reserved["assets/images/player.png"] != null) {
		_this16.setReserved("assets/images/player.png","assets/images/player.png");
	} else {
		_this16.h["assets/images/player.png"] = "assets/images/player.png";
	}
	var _this17 = this.type;
	var value8 = "IMAGE";
	if(__map_reserved["assets/images/player.png"] != null) {
		_this17.setReserved("assets/images/player.png",value8);
	} else {
		_this17.h["assets/images/player.png"] = value8;
	}
	var _this18 = this.path;
	if(__map_reserved["assets/images/tiles.png"] != null) {
		_this18.setReserved("assets/images/tiles.png","assets/images/tiles.png");
	} else {
		_this18.h["assets/images/tiles.png"] = "assets/images/tiles.png";
	}
	var _this19 = this.type;
	var value9 = "IMAGE";
	if(__map_reserved["assets/images/tiles.png"] != null) {
		_this19.setReserved("assets/images/tiles.png",value9);
	} else {
		_this19.h["assets/images/tiles.png"] = value9;
	}
	var _this20 = this.path;
	if(__map_reserved["assets/images/player.json"] != null) {
		_this20.setReserved("assets/images/player.json","assets/images/player.json");
	} else {
		_this20.h["assets/images/player.json"] = "assets/images/player.json";
	}
	var _this21 = this.type;
	var value10 = "TEXT";
	if(__map_reserved["assets/images/player.json"] != null) {
		_this21.setReserved("assets/images/player.json",value10);
	} else {
		_this21.h["assets/images/player.json"] = value10;
	}
	var _this22 = this.path;
	if(__map_reserved["assets/images/arrows.png"] != null) {
		_this22.setReserved("assets/images/arrows.png","assets/images/arrows.png");
	} else {
		_this22.h["assets/images/arrows.png"] = "assets/images/arrows.png";
	}
	var _this23 = this.type;
	var value11 = "IMAGE";
	if(__map_reserved["assets/images/arrows.png"] != null) {
		_this23.setReserved("assets/images/arrows.png",value11);
	} else {
		_this23.h["assets/images/arrows.png"] = value11;
	}
	var _this24 = this.path;
	if(__map_reserved["assets/sounds/waves2.ogg"] != null) {
		_this24.setReserved("assets/sounds/waves2.ogg","assets/sounds/waves2.ogg");
	} else {
		_this24.h["assets/sounds/waves2.ogg"] = "assets/sounds/waves2.ogg";
	}
	var _this25 = this.type;
	var value12 = "SOUND";
	if(__map_reserved["assets/sounds/waves2.ogg"] != null) {
		_this25.setReserved("assets/sounds/waves2.ogg",value12);
	} else {
		_this25.h["assets/sounds/waves2.ogg"] = value12;
	}
	var _this26 = this.path;
	if(__map_reserved["assets/sounds/waves3.ogg"] != null) {
		_this26.setReserved("assets/sounds/waves3.ogg","assets/sounds/waves3.ogg");
	} else {
		_this26.h["assets/sounds/waves3.ogg"] = "assets/sounds/waves3.ogg";
	}
	var _this27 = this.type;
	var value13 = "SOUND";
	if(__map_reserved["assets/sounds/waves3.ogg"] != null) {
		_this27.setReserved("assets/sounds/waves3.ogg",value13);
	} else {
		_this27.h["assets/sounds/waves3.ogg"] = value13;
	}
	var _this28 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_3_0.ogg"] != null) {
		_this28.setReserved("assets/sounds/m/sound_1_3_0.ogg","assets/sounds/m/sound_1_3_0.ogg");
	} else {
		_this28.h["assets/sounds/m/sound_1_3_0.ogg"] = "assets/sounds/m/sound_1_3_0.ogg";
	}
	var _this29 = this.type;
	var value14 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_3_0.ogg"] != null) {
		_this29.setReserved("assets/sounds/m/sound_1_3_0.ogg",value14);
	} else {
		_this29.h["assets/sounds/m/sound_1_3_0.ogg"] = value14;
	}
	var _this30 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_3_1.ogg"] != null) {
		_this30.setReserved("assets/sounds/m/sound_2_3_1.ogg","assets/sounds/m/sound_2_3_1.ogg");
	} else {
		_this30.h["assets/sounds/m/sound_2_3_1.ogg"] = "assets/sounds/m/sound_2_3_1.ogg";
	}
	var _this31 = this.type;
	var value15 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_3_1.ogg"] != null) {
		_this31.setReserved("assets/sounds/m/sound_2_3_1.ogg",value15);
	} else {
		_this31.h["assets/sounds/m/sound_2_3_1.ogg"] = value15;
	}
	var _this32 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_0_1.ogg"] != null) {
		_this32.setReserved("assets/sounds/m/sound_1_0_1.ogg","assets/sounds/m/sound_1_0_1.ogg");
	} else {
		_this32.h["assets/sounds/m/sound_1_0_1.ogg"] = "assets/sounds/m/sound_1_0_1.ogg";
	}
	var _this33 = this.type;
	var value16 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_0_1.ogg"] != null) {
		_this33.setReserved("assets/sounds/m/sound_1_0_1.ogg",value16);
	} else {
		_this33.h["assets/sounds/m/sound_1_0_1.ogg"] = value16;
	}
	var _this34 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_2_0.ogg"] != null) {
		_this34.setReserved("assets/sounds/m/sound_3_2_0.ogg","assets/sounds/m/sound_3_2_0.ogg");
	} else {
		_this34.h["assets/sounds/m/sound_3_2_0.ogg"] = "assets/sounds/m/sound_3_2_0.ogg";
	}
	var _this35 = this.type;
	var value17 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_2_0.ogg"] != null) {
		_this35.setReserved("assets/sounds/m/sound_3_2_0.ogg",value17);
	} else {
		_this35.h["assets/sounds/m/sound_3_2_0.ogg"] = value17;
	}
	var _this36 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_0_0.ogg"] != null) {
		_this36.setReserved("assets/sounds/m/sound_2_0_0.ogg","assets/sounds/m/sound_2_0_0.ogg");
	} else {
		_this36.h["assets/sounds/m/sound_2_0_0.ogg"] = "assets/sounds/m/sound_2_0_0.ogg";
	}
	var _this37 = this.type;
	var value18 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_0_0.ogg"] != null) {
		_this37.setReserved("assets/sounds/m/sound_2_0_0.ogg",value18);
	} else {
		_this37.h["assets/sounds/m/sound_2_0_0.ogg"] = value18;
	}
	var _this38 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_1_1.ogg"] != null) {
		_this38.setReserved("assets/sounds/m/sound_1_1_1.ogg","assets/sounds/m/sound_1_1_1.ogg");
	} else {
		_this38.h["assets/sounds/m/sound_1_1_1.ogg"] = "assets/sounds/m/sound_1_1_1.ogg";
	}
	var _this39 = this.type;
	var value19 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_1_1.ogg"] != null) {
		_this39.setReserved("assets/sounds/m/sound_1_1_1.ogg",value19);
	} else {
		_this39.h["assets/sounds/m/sound_1_1_1.ogg"] = value19;
	}
	var _this40 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_4_3.ogg"] != null) {
		_this40.setReserved("assets/sounds/m/sound_1_4_3.ogg","assets/sounds/m/sound_1_4_3.ogg");
	} else {
		_this40.h["assets/sounds/m/sound_1_4_3.ogg"] = "assets/sounds/m/sound_1_4_3.ogg";
	}
	var _this41 = this.type;
	var value20 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_4_3.ogg"] != null) {
		_this41.setReserved("assets/sounds/m/sound_1_4_3.ogg",value20);
	} else {
		_this41.h["assets/sounds/m/sound_1_4_3.ogg"] = value20;
	}
	var _this42 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_1_2.ogg"] != null) {
		_this42.setReserved("assets/sounds/m/sound_1_1_2.ogg","assets/sounds/m/sound_1_1_2.ogg");
	} else {
		_this42.h["assets/sounds/m/sound_1_1_2.ogg"] = "assets/sounds/m/sound_1_1_2.ogg";
	}
	var _this43 = this.type;
	var value21 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_1_2.ogg"] != null) {
		_this43.setReserved("assets/sounds/m/sound_1_1_2.ogg",value21);
	} else {
		_this43.h["assets/sounds/m/sound_1_1_2.ogg"] = value21;
	}
	var _this44 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_0_0.ogg"] != null) {
		_this44.setReserved("assets/sounds/m/sound_3_0_0.ogg","assets/sounds/m/sound_3_0_0.ogg");
	} else {
		_this44.h["assets/sounds/m/sound_3_0_0.ogg"] = "assets/sounds/m/sound_3_0_0.ogg";
	}
	var _this45 = this.type;
	var value22 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_0_0.ogg"] != null) {
		_this45.setReserved("assets/sounds/m/sound_3_0_0.ogg",value22);
	} else {
		_this45.h["assets/sounds/m/sound_3_0_0.ogg"] = value22;
	}
	var _this46 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_1_3.ogg"] != null) {
		_this46.setReserved("assets/sounds/m/sound_0_1_3.ogg","assets/sounds/m/sound_0_1_3.ogg");
	} else {
		_this46.h["assets/sounds/m/sound_0_1_3.ogg"] = "assets/sounds/m/sound_0_1_3.ogg";
	}
	var _this47 = this.type;
	var value23 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_1_3.ogg"] != null) {
		_this47.setReserved("assets/sounds/m/sound_0_1_3.ogg",value23);
	} else {
		_this47.h["assets/sounds/m/sound_0_1_3.ogg"] = value23;
	}
	var _this48 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_0_2.ogg"] != null) {
		_this48.setReserved("assets/sounds/m/sound_1_0_2.ogg","assets/sounds/m/sound_1_0_2.ogg");
	} else {
		_this48.h["assets/sounds/m/sound_1_0_2.ogg"] = "assets/sounds/m/sound_1_0_2.ogg";
	}
	var _this49 = this.type;
	var value24 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_0_2.ogg"] != null) {
		_this49.setReserved("assets/sounds/m/sound_1_0_2.ogg",value24);
	} else {
		_this49.h["assets/sounds/m/sound_1_0_2.ogg"] = value24;
	}
	var _this50 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_3_2.ogg"] != null) {
		_this50.setReserved("assets/sounds/m/sound_0_3_2.ogg","assets/sounds/m/sound_0_3_2.ogg");
	} else {
		_this50.h["assets/sounds/m/sound_0_3_2.ogg"] = "assets/sounds/m/sound_0_3_2.ogg";
	}
	var _this51 = this.type;
	var value25 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_3_2.ogg"] != null) {
		_this51.setReserved("assets/sounds/m/sound_0_3_2.ogg",value25);
	} else {
		_this51.h["assets/sounds/m/sound_0_3_2.ogg"] = value25;
	}
	var _this52 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_0_0.ogg"] != null) {
		_this52.setReserved("assets/sounds/m/sound_1_0_0.ogg","assets/sounds/m/sound_1_0_0.ogg");
	} else {
		_this52.h["assets/sounds/m/sound_1_0_0.ogg"] = "assets/sounds/m/sound_1_0_0.ogg";
	}
	var _this53 = this.type;
	var value26 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_0_0.ogg"] != null) {
		_this53.setReserved("assets/sounds/m/sound_1_0_0.ogg",value26);
	} else {
		_this53.h["assets/sounds/m/sound_1_0_0.ogg"] = value26;
	}
	var _this54 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_2_3.ogg"] != null) {
		_this54.setReserved("assets/sounds/m/sound_0_2_3.ogg","assets/sounds/m/sound_0_2_3.ogg");
	} else {
		_this54.h["assets/sounds/m/sound_0_2_3.ogg"] = "assets/sounds/m/sound_0_2_3.ogg";
	}
	var _this55 = this.type;
	var value27 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_2_3.ogg"] != null) {
		_this55.setReserved("assets/sounds/m/sound_0_2_3.ogg",value27);
	} else {
		_this55.h["assets/sounds/m/sound_0_2_3.ogg"] = value27;
	}
	var _this56 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_2_2.ogg"] != null) {
		_this56.setReserved("assets/sounds/m/sound_3_2_2.ogg","assets/sounds/m/sound_3_2_2.ogg");
	} else {
		_this56.h["assets/sounds/m/sound_3_2_2.ogg"] = "assets/sounds/m/sound_3_2_2.ogg";
	}
	var _this57 = this.type;
	var value28 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_2_2.ogg"] != null) {
		_this57.setReserved("assets/sounds/m/sound_3_2_2.ogg",value28);
	} else {
		_this57.h["assets/sounds/m/sound_3_2_2.ogg"] = value28;
	}
	var _this58 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_3_2.ogg"] != null) {
		_this58.setReserved("assets/sounds/m/sound_2_3_2.ogg","assets/sounds/m/sound_2_3_2.ogg");
	} else {
		_this58.h["assets/sounds/m/sound_2_3_2.ogg"] = "assets/sounds/m/sound_2_3_2.ogg";
	}
	var _this59 = this.type;
	var value29 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_3_2.ogg"] != null) {
		_this59.setReserved("assets/sounds/m/sound_2_3_2.ogg",value29);
	} else {
		_this59.h["assets/sounds/m/sound_2_3_2.ogg"] = value29;
	}
	var _this60 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_0_1.ogg"] != null) {
		_this60.setReserved("assets/sounds/m/sound_0_0_1.ogg","assets/sounds/m/sound_0_0_1.ogg");
	} else {
		_this60.h["assets/sounds/m/sound_0_0_1.ogg"] = "assets/sounds/m/sound_0_0_1.ogg";
	}
	var _this61 = this.type;
	var value30 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_0_1.ogg"] != null) {
		_this61.setReserved("assets/sounds/m/sound_0_0_1.ogg",value30);
	} else {
		_this61.h["assets/sounds/m/sound_0_0_1.ogg"] = value30;
	}
	var _this62 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_3_3.ogg"] != null) {
		_this62.setReserved("assets/sounds/m/sound_1_3_3.ogg","assets/sounds/m/sound_1_3_3.ogg");
	} else {
		_this62.h["assets/sounds/m/sound_1_3_3.ogg"] = "assets/sounds/m/sound_1_3_3.ogg";
	}
	var _this63 = this.type;
	var value31 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_3_3.ogg"] != null) {
		_this63.setReserved("assets/sounds/m/sound_1_3_3.ogg",value31);
	} else {
		_this63.h["assets/sounds/m/sound_1_3_3.ogg"] = value31;
	}
	var _this64 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_1_2.ogg"] != null) {
		_this64.setReserved("assets/sounds/m/sound_3_1_2.ogg","assets/sounds/m/sound_3_1_2.ogg");
	} else {
		_this64.h["assets/sounds/m/sound_3_1_2.ogg"] = "assets/sounds/m/sound_3_1_2.ogg";
	}
	var _this65 = this.type;
	var value32 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_1_2.ogg"] != null) {
		_this65.setReserved("assets/sounds/m/sound_3_1_2.ogg",value32);
	} else {
		_this65.h["assets/sounds/m/sound_3_1_2.ogg"] = value32;
	}
	var _this66 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_1_0.ogg"] != null) {
		_this66.setReserved("assets/sounds/m/sound_3_1_0.ogg","assets/sounds/m/sound_3_1_0.ogg");
	} else {
		_this66.h["assets/sounds/m/sound_3_1_0.ogg"] = "assets/sounds/m/sound_3_1_0.ogg";
	}
	var _this67 = this.type;
	var value33 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_1_0.ogg"] != null) {
		_this67.setReserved("assets/sounds/m/sound_3_1_0.ogg",value33);
	} else {
		_this67.h["assets/sounds/m/sound_3_1_0.ogg"] = value33;
	}
	var _this68 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_0_1.ogg"] != null) {
		_this68.setReserved("assets/sounds/m/sound_2_0_1.ogg","assets/sounds/m/sound_2_0_1.ogg");
	} else {
		_this68.h["assets/sounds/m/sound_2_0_1.ogg"] = "assets/sounds/m/sound_2_0_1.ogg";
	}
	var _this69 = this.type;
	var value34 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_0_1.ogg"] != null) {
		_this69.setReserved("assets/sounds/m/sound_2_0_1.ogg",value34);
	} else {
		_this69.h["assets/sounds/m/sound_2_0_1.ogg"] = value34;
	}
	var _this70 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_3_0.ogg"] != null) {
		_this70.setReserved("assets/sounds/m/sound_3_3_0.ogg","assets/sounds/m/sound_3_3_0.ogg");
	} else {
		_this70.h["assets/sounds/m/sound_3_3_0.ogg"] = "assets/sounds/m/sound_3_3_0.ogg";
	}
	var _this71 = this.type;
	var value35 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_3_0.ogg"] != null) {
		_this71.setReserved("assets/sounds/m/sound_3_3_0.ogg",value35);
	} else {
		_this71.h["assets/sounds/m/sound_3_3_0.ogg"] = value35;
	}
	var _this72 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_3_1.ogg"] != null) {
		_this72.setReserved("assets/sounds/m/sound_1_3_1.ogg","assets/sounds/m/sound_1_3_1.ogg");
	} else {
		_this72.h["assets/sounds/m/sound_1_3_1.ogg"] = "assets/sounds/m/sound_1_3_1.ogg";
	}
	var _this73 = this.type;
	var value36 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_3_1.ogg"] != null) {
		_this73.setReserved("assets/sounds/m/sound_1_3_1.ogg",value36);
	} else {
		_this73.h["assets/sounds/m/sound_1_3_1.ogg"] = value36;
	}
	var _this74 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_2_0.ogg"] != null) {
		_this74.setReserved("assets/sounds/m/sound_2_2_0.ogg","assets/sounds/m/sound_2_2_0.ogg");
	} else {
		_this74.h["assets/sounds/m/sound_2_2_0.ogg"] = "assets/sounds/m/sound_2_2_0.ogg";
	}
	var _this75 = this.type;
	var value37 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_2_0.ogg"] != null) {
		_this75.setReserved("assets/sounds/m/sound_2_2_0.ogg",value37);
	} else {
		_this75.h["assets/sounds/m/sound_2_2_0.ogg"] = value37;
	}
	var _this76 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_2_1.ogg"] != null) {
		_this76.setReserved("assets/sounds/m/sound_2_2_1.ogg","assets/sounds/m/sound_2_2_1.ogg");
	} else {
		_this76.h["assets/sounds/m/sound_2_2_1.ogg"] = "assets/sounds/m/sound_2_2_1.ogg";
	}
	var _this77 = this.type;
	var value38 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_2_1.ogg"] != null) {
		_this77.setReserved("assets/sounds/m/sound_2_2_1.ogg",value38);
	} else {
		_this77.h["assets/sounds/m/sound_2_2_1.ogg"] = value38;
	}
	var _this78 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_2_2.ogg"] != null) {
		_this78.setReserved("assets/sounds/m/sound_1_2_2.ogg","assets/sounds/m/sound_1_2_2.ogg");
	} else {
		_this78.h["assets/sounds/m/sound_1_2_2.ogg"] = "assets/sounds/m/sound_1_2_2.ogg";
	}
	var _this79 = this.type;
	var value39 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_2_2.ogg"] != null) {
		_this79.setReserved("assets/sounds/m/sound_1_2_2.ogg",value39);
	} else {
		_this79.h["assets/sounds/m/sound_1_2_2.ogg"] = value39;
	}
	var _this80 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_0_3.ogg"] != null) {
		_this80.setReserved("assets/sounds/m/sound_0_0_3.ogg","assets/sounds/m/sound_0_0_3.ogg");
	} else {
		_this80.h["assets/sounds/m/sound_0_0_3.ogg"] = "assets/sounds/m/sound_0_0_3.ogg";
	}
	var _this81 = this.type;
	var value40 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_0_3.ogg"] != null) {
		_this81.setReserved("assets/sounds/m/sound_0_0_3.ogg",value40);
	} else {
		_this81.h["assets/sounds/m/sound_0_0_3.ogg"] = value40;
	}
	var _this82 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_2_0.ogg"] != null) {
		_this82.setReserved("assets/sounds/m/sound_1_2_0.ogg","assets/sounds/m/sound_1_2_0.ogg");
	} else {
		_this82.h["assets/sounds/m/sound_1_2_0.ogg"] = "assets/sounds/m/sound_1_2_0.ogg";
	}
	var _this83 = this.type;
	var value41 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_2_0.ogg"] != null) {
		_this83.setReserved("assets/sounds/m/sound_1_2_0.ogg",value41);
	} else {
		_this83.h["assets/sounds/m/sound_1_2_0.ogg"] = value41;
	}
	var _this84 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_4_3.ogg"] != null) {
		_this84.setReserved("assets/sounds/m/sound_3_4_3.ogg","assets/sounds/m/sound_3_4_3.ogg");
	} else {
		_this84.h["assets/sounds/m/sound_3_4_3.ogg"] = "assets/sounds/m/sound_3_4_3.ogg";
	}
	var _this85 = this.type;
	var value42 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_4_3.ogg"] != null) {
		_this85.setReserved("assets/sounds/m/sound_3_4_3.ogg",value42);
	} else {
		_this85.h["assets/sounds/m/sound_3_4_3.ogg"] = value42;
	}
	var _this86 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_4_0.ogg"] != null) {
		_this86.setReserved("assets/sounds/m/sound_0_4_0.ogg","assets/sounds/m/sound_0_4_0.ogg");
	} else {
		_this86.h["assets/sounds/m/sound_0_4_0.ogg"] = "assets/sounds/m/sound_0_4_0.ogg";
	}
	var _this87 = this.type;
	var value43 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_4_0.ogg"] != null) {
		_this87.setReserved("assets/sounds/m/sound_0_4_0.ogg",value43);
	} else {
		_this87.h["assets/sounds/m/sound_0_4_0.ogg"] = value43;
	}
	var _this88 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_4_0.ogg"] != null) {
		_this88.setReserved("assets/sounds/m/sound_2_4_0.ogg","assets/sounds/m/sound_2_4_0.ogg");
	} else {
		_this88.h["assets/sounds/m/sound_2_4_0.ogg"] = "assets/sounds/m/sound_2_4_0.ogg";
	}
	var _this89 = this.type;
	var value44 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_4_0.ogg"] != null) {
		_this89.setReserved("assets/sounds/m/sound_2_4_0.ogg",value44);
	} else {
		_this89.h["assets/sounds/m/sound_2_4_0.ogg"] = value44;
	}
	var _this90 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_2_1.ogg"] != null) {
		_this90.setReserved("assets/sounds/m/sound_1_2_1.ogg","assets/sounds/m/sound_1_2_1.ogg");
	} else {
		_this90.h["assets/sounds/m/sound_1_2_1.ogg"] = "assets/sounds/m/sound_1_2_1.ogg";
	}
	var _this91 = this.type;
	var value45 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_2_1.ogg"] != null) {
		_this91.setReserved("assets/sounds/m/sound_1_2_1.ogg",value45);
	} else {
		_this91.h["assets/sounds/m/sound_1_2_1.ogg"] = value45;
	}
	var _this92 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_2_1.ogg"] != null) {
		_this92.setReserved("assets/sounds/m/sound_0_2_1.ogg","assets/sounds/m/sound_0_2_1.ogg");
	} else {
		_this92.h["assets/sounds/m/sound_0_2_1.ogg"] = "assets/sounds/m/sound_0_2_1.ogg";
	}
	var _this93 = this.type;
	var value46 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_2_1.ogg"] != null) {
		_this93.setReserved("assets/sounds/m/sound_0_2_1.ogg",value46);
	} else {
		_this93.h["assets/sounds/m/sound_0_2_1.ogg"] = value46;
	}
	var _this94 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_4_2.ogg"] != null) {
		_this94.setReserved("assets/sounds/m/sound_1_4_2.ogg","assets/sounds/m/sound_1_4_2.ogg");
	} else {
		_this94.h["assets/sounds/m/sound_1_4_2.ogg"] = "assets/sounds/m/sound_1_4_2.ogg";
	}
	var _this95 = this.type;
	var value47 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_4_2.ogg"] != null) {
		_this95.setReserved("assets/sounds/m/sound_1_4_2.ogg",value47);
	} else {
		_this95.h["assets/sounds/m/sound_1_4_2.ogg"] = value47;
	}
	var _this96 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_2_2.ogg"] != null) {
		_this96.setReserved("assets/sounds/m/sound_0_2_2.ogg","assets/sounds/m/sound_0_2_2.ogg");
	} else {
		_this96.h["assets/sounds/m/sound_0_2_2.ogg"] = "assets/sounds/m/sound_0_2_2.ogg";
	}
	var _this97 = this.type;
	var value48 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_2_2.ogg"] != null) {
		_this97.setReserved("assets/sounds/m/sound_0_2_2.ogg",value48);
	} else {
		_this97.h["assets/sounds/m/sound_0_2_2.ogg"] = value48;
	}
	var _this98 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_4_0.ogg"] != null) {
		_this98.setReserved("assets/sounds/m/sound_3_4_0.ogg","assets/sounds/m/sound_3_4_0.ogg");
	} else {
		_this98.h["assets/sounds/m/sound_3_4_0.ogg"] = "assets/sounds/m/sound_3_4_0.ogg";
	}
	var _this99 = this.type;
	var value49 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_4_0.ogg"] != null) {
		_this99.setReserved("assets/sounds/m/sound_3_4_0.ogg",value49);
	} else {
		_this99.h["assets/sounds/m/sound_3_4_0.ogg"] = value49;
	}
	var _this100 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_2_3.ogg"] != null) {
		_this100.setReserved("assets/sounds/m/sound_2_2_3.ogg","assets/sounds/m/sound_2_2_3.ogg");
	} else {
		_this100.h["assets/sounds/m/sound_2_2_3.ogg"] = "assets/sounds/m/sound_2_2_3.ogg";
	}
	var _this101 = this.type;
	var value50 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_2_3.ogg"] != null) {
		_this101.setReserved("assets/sounds/m/sound_2_2_3.ogg",value50);
	} else {
		_this101.h["assets/sounds/m/sound_2_2_3.ogg"] = value50;
	}
	var _this102 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_0_3.ogg"] != null) {
		_this102.setReserved("assets/sounds/m/sound_3_0_3.ogg","assets/sounds/m/sound_3_0_3.ogg");
	} else {
		_this102.h["assets/sounds/m/sound_3_0_3.ogg"] = "assets/sounds/m/sound_3_0_3.ogg";
	}
	var _this103 = this.type;
	var value51 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_0_3.ogg"] != null) {
		_this103.setReserved("assets/sounds/m/sound_3_0_3.ogg",value51);
	} else {
		_this103.h["assets/sounds/m/sound_3_0_3.ogg"] = value51;
	}
	var _this104 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_4_2.ogg"] != null) {
		_this104.setReserved("assets/sounds/m/sound_2_4_2.ogg","assets/sounds/m/sound_2_4_2.ogg");
	} else {
		_this104.h["assets/sounds/m/sound_2_4_2.ogg"] = "assets/sounds/m/sound_2_4_2.ogg";
	}
	var _this105 = this.type;
	var value52 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_4_2.ogg"] != null) {
		_this105.setReserved("assets/sounds/m/sound_2_4_2.ogg",value52);
	} else {
		_this105.h["assets/sounds/m/sound_2_4_2.ogg"] = value52;
	}
	var _this106 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_2_2.ogg"] != null) {
		_this106.setReserved("assets/sounds/m/sound_2_2_2.ogg","assets/sounds/m/sound_2_2_2.ogg");
	} else {
		_this106.h["assets/sounds/m/sound_2_2_2.ogg"] = "assets/sounds/m/sound_2_2_2.ogg";
	}
	var _this107 = this.type;
	var value53 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_2_2.ogg"] != null) {
		_this107.setReserved("assets/sounds/m/sound_2_2_2.ogg",value53);
	} else {
		_this107.h["assets/sounds/m/sound_2_2_2.ogg"] = value53;
	}
	var _this108 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_3_3.ogg"] != null) {
		_this108.setReserved("assets/sounds/m/sound_2_3_3.ogg","assets/sounds/m/sound_2_3_3.ogg");
	} else {
		_this108.h["assets/sounds/m/sound_2_3_3.ogg"] = "assets/sounds/m/sound_2_3_3.ogg";
	}
	var _this109 = this.type;
	var value54 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_3_3.ogg"] != null) {
		_this109.setReserved("assets/sounds/m/sound_2_3_3.ogg",value54);
	} else {
		_this109.h["assets/sounds/m/sound_2_3_3.ogg"] = value54;
	}
	var _this110 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_1_0.ogg"] != null) {
		_this110.setReserved("assets/sounds/m/sound_0_1_0.ogg","assets/sounds/m/sound_0_1_0.ogg");
	} else {
		_this110.h["assets/sounds/m/sound_0_1_0.ogg"] = "assets/sounds/m/sound_0_1_0.ogg";
	}
	var _this111 = this.type;
	var value55 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_1_0.ogg"] != null) {
		_this111.setReserved("assets/sounds/m/sound_0_1_0.ogg",value55);
	} else {
		_this111.h["assets/sounds/m/sound_0_1_0.ogg"] = value55;
	}
	var _this112 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_1_1.ogg"] != null) {
		_this112.setReserved("assets/sounds/m/sound_3_1_1.ogg","assets/sounds/m/sound_3_1_1.ogg");
	} else {
		_this112.h["assets/sounds/m/sound_3_1_1.ogg"] = "assets/sounds/m/sound_3_1_1.ogg";
	}
	var _this113 = this.type;
	var value56 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_1_1.ogg"] != null) {
		_this113.setReserved("assets/sounds/m/sound_3_1_1.ogg",value56);
	} else {
		_this113.h["assets/sounds/m/sound_3_1_1.ogg"] = value56;
	}
	var _this114 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_2_3.ogg"] != null) {
		_this114.setReserved("assets/sounds/m/sound_1_2_3.ogg","assets/sounds/m/sound_1_2_3.ogg");
	} else {
		_this114.h["assets/sounds/m/sound_1_2_3.ogg"] = "assets/sounds/m/sound_1_2_3.ogg";
	}
	var _this115 = this.type;
	var value57 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_2_3.ogg"] != null) {
		_this115.setReserved("assets/sounds/m/sound_1_2_3.ogg",value57);
	} else {
		_this115.h["assets/sounds/m/sound_1_2_3.ogg"] = value57;
	}
	var _this116 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_0_1.ogg"] != null) {
		_this116.setReserved("assets/sounds/m/sound_3_0_1.ogg","assets/sounds/m/sound_3_0_1.ogg");
	} else {
		_this116.h["assets/sounds/m/sound_3_0_1.ogg"] = "assets/sounds/m/sound_3_0_1.ogg";
	}
	var _this117 = this.type;
	var value58 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_0_1.ogg"] != null) {
		_this117.setReserved("assets/sounds/m/sound_3_0_1.ogg",value58);
	} else {
		_this117.h["assets/sounds/m/sound_3_0_1.ogg"] = value58;
	}
	var _this118 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_0_3.ogg"] != null) {
		_this118.setReserved("assets/sounds/m/sound_2_0_3.ogg","assets/sounds/m/sound_2_0_3.ogg");
	} else {
		_this118.h["assets/sounds/m/sound_2_0_3.ogg"] = "assets/sounds/m/sound_2_0_3.ogg";
	}
	var _this119 = this.type;
	var value59 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_0_3.ogg"] != null) {
		_this119.setReserved("assets/sounds/m/sound_2_0_3.ogg",value59);
	} else {
		_this119.h["assets/sounds/m/sound_2_0_3.ogg"] = value59;
	}
	var _this120 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_2_3.ogg"] != null) {
		_this120.setReserved("assets/sounds/m/sound_3_2_3.ogg","assets/sounds/m/sound_3_2_3.ogg");
	} else {
		_this120.h["assets/sounds/m/sound_3_2_3.ogg"] = "assets/sounds/m/sound_3_2_3.ogg";
	}
	var _this121 = this.type;
	var value60 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_2_3.ogg"] != null) {
		_this121.setReserved("assets/sounds/m/sound_3_2_3.ogg",value60);
	} else {
		_this121.h["assets/sounds/m/sound_3_2_3.ogg"] = value60;
	}
	var _this122 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_4_1.ogg"] != null) {
		_this122.setReserved("assets/sounds/m/sound_3_4_1.ogg","assets/sounds/m/sound_3_4_1.ogg");
	} else {
		_this122.h["assets/sounds/m/sound_3_4_1.ogg"] = "assets/sounds/m/sound_3_4_1.ogg";
	}
	var _this123 = this.type;
	var value61 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_4_1.ogg"] != null) {
		_this123.setReserved("assets/sounds/m/sound_3_4_1.ogg",value61);
	} else {
		_this123.h["assets/sounds/m/sound_3_4_1.ogg"] = value61;
	}
	var _this124 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_4_2.ogg"] != null) {
		_this124.setReserved("assets/sounds/m/sound_3_4_2.ogg","assets/sounds/m/sound_3_4_2.ogg");
	} else {
		_this124.h["assets/sounds/m/sound_3_4_2.ogg"] = "assets/sounds/m/sound_3_4_2.ogg";
	}
	var _this125 = this.type;
	var value62 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_4_2.ogg"] != null) {
		_this125.setReserved("assets/sounds/m/sound_3_4_2.ogg",value62);
	} else {
		_this125.h["assets/sounds/m/sound_3_4_2.ogg"] = value62;
	}
	var _this126 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_3_0.ogg"] != null) {
		_this126.setReserved("assets/sounds/m/sound_0_3_0.ogg","assets/sounds/m/sound_0_3_0.ogg");
	} else {
		_this126.h["assets/sounds/m/sound_0_3_0.ogg"] = "assets/sounds/m/sound_0_3_0.ogg";
	}
	var _this127 = this.type;
	var value63 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_3_0.ogg"] != null) {
		_this127.setReserved("assets/sounds/m/sound_0_3_0.ogg",value63);
	} else {
		_this127.h["assets/sounds/m/sound_0_3_0.ogg"] = value63;
	}
	var _this128 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_4_3.ogg"] != null) {
		_this128.setReserved("assets/sounds/m/sound_2_4_3.ogg","assets/sounds/m/sound_2_4_3.ogg");
	} else {
		_this128.h["assets/sounds/m/sound_2_4_3.ogg"] = "assets/sounds/m/sound_2_4_3.ogg";
	}
	var _this129 = this.type;
	var value64 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_4_3.ogg"] != null) {
		_this129.setReserved("assets/sounds/m/sound_2_4_3.ogg",value64);
	} else {
		_this129.h["assets/sounds/m/sound_2_4_3.ogg"] = value64;
	}
	var _this130 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_3_2.ogg"] != null) {
		_this130.setReserved("assets/sounds/m/sound_1_3_2.ogg","assets/sounds/m/sound_1_3_2.ogg");
	} else {
		_this130.h["assets/sounds/m/sound_1_3_2.ogg"] = "assets/sounds/m/sound_1_3_2.ogg";
	}
	var _this131 = this.type;
	var value65 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_3_2.ogg"] != null) {
		_this131.setReserved("assets/sounds/m/sound_1_3_2.ogg",value65);
	} else {
		_this131.h["assets/sounds/m/sound_1_3_2.ogg"] = value65;
	}
	var _this132 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_3_3.ogg"] != null) {
		_this132.setReserved("assets/sounds/m/sound_3_3_3.ogg","assets/sounds/m/sound_3_3_3.ogg");
	} else {
		_this132.h["assets/sounds/m/sound_3_3_3.ogg"] = "assets/sounds/m/sound_3_3_3.ogg";
	}
	var _this133 = this.type;
	var value66 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_3_3.ogg"] != null) {
		_this133.setReserved("assets/sounds/m/sound_3_3_3.ogg",value66);
	} else {
		_this133.h["assets/sounds/m/sound_3_3_3.ogg"] = value66;
	}
	var _this134 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_0_0.ogg"] != null) {
		_this134.setReserved("assets/sounds/m/sound_0_0_0.ogg","assets/sounds/m/sound_0_0_0.ogg");
	} else {
		_this134.h["assets/sounds/m/sound_0_0_0.ogg"] = "assets/sounds/m/sound_0_0_0.ogg";
	}
	var _this135 = this.type;
	var value67 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_0_0.ogg"] != null) {
		_this135.setReserved("assets/sounds/m/sound_0_0_0.ogg",value67);
	} else {
		_this135.h["assets/sounds/m/sound_0_0_0.ogg"] = value67;
	}
	var _this136 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_2_0.ogg"] != null) {
		_this136.setReserved("assets/sounds/m/sound_0_2_0.ogg","assets/sounds/m/sound_0_2_0.ogg");
	} else {
		_this136.h["assets/sounds/m/sound_0_2_0.ogg"] = "assets/sounds/m/sound_0_2_0.ogg";
	}
	var _this137 = this.type;
	var value68 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_2_0.ogg"] != null) {
		_this137.setReserved("assets/sounds/m/sound_0_2_0.ogg",value68);
	} else {
		_this137.h["assets/sounds/m/sound_0_2_0.ogg"] = value68;
	}
	var _this138 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_0_2.ogg"] != null) {
		_this138.setReserved("assets/sounds/m/sound_0_0_2.ogg","assets/sounds/m/sound_0_0_2.ogg");
	} else {
		_this138.h["assets/sounds/m/sound_0_0_2.ogg"] = "assets/sounds/m/sound_0_0_2.ogg";
	}
	var _this139 = this.type;
	var value69 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_0_2.ogg"] != null) {
		_this139.setReserved("assets/sounds/m/sound_0_0_2.ogg",value69);
	} else {
		_this139.h["assets/sounds/m/sound_0_0_2.ogg"] = value69;
	}
	var _this140 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_1_3.ogg"] != null) {
		_this140.setReserved("assets/sounds/m/sound_2_1_3.ogg","assets/sounds/m/sound_2_1_3.ogg");
	} else {
		_this140.h["assets/sounds/m/sound_2_1_3.ogg"] = "assets/sounds/m/sound_2_1_3.ogg";
	}
	var _this141 = this.type;
	var value70 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_1_3.ogg"] != null) {
		_this141.setReserved("assets/sounds/m/sound_2_1_3.ogg",value70);
	} else {
		_this141.h["assets/sounds/m/sound_2_1_3.ogg"] = value70;
	}
	var _this142 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_4_1.ogg"] != null) {
		_this142.setReserved("assets/sounds/m/sound_1_4_1.ogg","assets/sounds/m/sound_1_4_1.ogg");
	} else {
		_this142.h["assets/sounds/m/sound_1_4_1.ogg"] = "assets/sounds/m/sound_1_4_1.ogg";
	}
	var _this143 = this.type;
	var value71 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_4_1.ogg"] != null) {
		_this143.setReserved("assets/sounds/m/sound_1_4_1.ogg",value71);
	} else {
		_this143.h["assets/sounds/m/sound_1_4_1.ogg"] = value71;
	}
	var _this144 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_0_2.ogg"] != null) {
		_this144.setReserved("assets/sounds/m/sound_3_0_2.ogg","assets/sounds/m/sound_3_0_2.ogg");
	} else {
		_this144.h["assets/sounds/m/sound_3_0_2.ogg"] = "assets/sounds/m/sound_3_0_2.ogg";
	}
	var _this145 = this.type;
	var value72 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_0_2.ogg"] != null) {
		_this145.setReserved("assets/sounds/m/sound_3_0_2.ogg",value72);
	} else {
		_this145.h["assets/sounds/m/sound_3_0_2.ogg"] = value72;
	}
	var _this146 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_1_2.ogg"] != null) {
		_this146.setReserved("assets/sounds/m/sound_2_1_2.ogg","assets/sounds/m/sound_2_1_2.ogg");
	} else {
		_this146.h["assets/sounds/m/sound_2_1_2.ogg"] = "assets/sounds/m/sound_2_1_2.ogg";
	}
	var _this147 = this.type;
	var value73 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_1_2.ogg"] != null) {
		_this147.setReserved("assets/sounds/m/sound_2_1_2.ogg",value73);
	} else {
		_this147.h["assets/sounds/m/sound_2_1_2.ogg"] = value73;
	}
	var _this148 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_1_0.ogg"] != null) {
		_this148.setReserved("assets/sounds/m/sound_1_1_0.ogg","assets/sounds/m/sound_1_1_0.ogg");
	} else {
		_this148.h["assets/sounds/m/sound_1_1_0.ogg"] = "assets/sounds/m/sound_1_1_0.ogg";
	}
	var _this149 = this.type;
	var value74 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_1_0.ogg"] != null) {
		_this149.setReserved("assets/sounds/m/sound_1_1_0.ogg",value74);
	} else {
		_this149.h["assets/sounds/m/sound_1_1_0.ogg"] = value74;
	}
	var _this150 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_1_1.ogg"] != null) {
		_this150.setReserved("assets/sounds/m/sound_0_1_1.ogg","assets/sounds/m/sound_0_1_1.ogg");
	} else {
		_this150.h["assets/sounds/m/sound_0_1_1.ogg"] = "assets/sounds/m/sound_0_1_1.ogg";
	}
	var _this151 = this.type;
	var value75 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_1_1.ogg"] != null) {
		_this151.setReserved("assets/sounds/m/sound_0_1_1.ogg",value75);
	} else {
		_this151.h["assets/sounds/m/sound_0_1_1.ogg"] = value75;
	}
	var _this152 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_1_3.ogg"] != null) {
		_this152.setReserved("assets/sounds/m/sound_3_1_3.ogg","assets/sounds/m/sound_3_1_3.ogg");
	} else {
		_this152.h["assets/sounds/m/sound_3_1_3.ogg"] = "assets/sounds/m/sound_3_1_3.ogg";
	}
	var _this153 = this.type;
	var value76 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_1_3.ogg"] != null) {
		_this153.setReserved("assets/sounds/m/sound_3_1_3.ogg",value76);
	} else {
		_this153.h["assets/sounds/m/sound_3_1_3.ogg"] = value76;
	}
	var _this154 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_1_3.ogg"] != null) {
		_this154.setReserved("assets/sounds/m/sound_1_1_3.ogg","assets/sounds/m/sound_1_1_3.ogg");
	} else {
		_this154.h["assets/sounds/m/sound_1_1_3.ogg"] = "assets/sounds/m/sound_1_1_3.ogg";
	}
	var _this155 = this.type;
	var value77 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_1_3.ogg"] != null) {
		_this155.setReserved("assets/sounds/m/sound_1_1_3.ogg",value77);
	} else {
		_this155.h["assets/sounds/m/sound_1_1_3.ogg"] = value77;
	}
	var _this156 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_0_2.ogg"] != null) {
		_this156.setReserved("assets/sounds/m/sound_2_0_2.ogg","assets/sounds/m/sound_2_0_2.ogg");
	} else {
		_this156.h["assets/sounds/m/sound_2_0_2.ogg"] = "assets/sounds/m/sound_2_0_2.ogg";
	}
	var _this157 = this.type;
	var value78 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_0_2.ogg"] != null) {
		_this157.setReserved("assets/sounds/m/sound_2_0_2.ogg",value78);
	} else {
		_this157.h["assets/sounds/m/sound_2_0_2.ogg"] = value78;
	}
	var _this158 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_3_2.ogg"] != null) {
		_this158.setReserved("assets/sounds/m/sound_3_3_2.ogg","assets/sounds/m/sound_3_3_2.ogg");
	} else {
		_this158.h["assets/sounds/m/sound_3_3_2.ogg"] = "assets/sounds/m/sound_3_3_2.ogg";
	}
	var _this159 = this.type;
	var value79 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_3_2.ogg"] != null) {
		_this159.setReserved("assets/sounds/m/sound_3_3_2.ogg",value79);
	} else {
		_this159.h["assets/sounds/m/sound_3_3_2.ogg"] = value79;
	}
	var _this160 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_4_1.ogg"] != null) {
		_this160.setReserved("assets/sounds/m/sound_2_4_1.ogg","assets/sounds/m/sound_2_4_1.ogg");
	} else {
		_this160.h["assets/sounds/m/sound_2_4_1.ogg"] = "assets/sounds/m/sound_2_4_1.ogg";
	}
	var _this161 = this.type;
	var value80 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_4_1.ogg"] != null) {
		_this161.setReserved("assets/sounds/m/sound_2_4_1.ogg",value80);
	} else {
		_this161.h["assets/sounds/m/sound_2_4_1.ogg"] = value80;
	}
	var _this162 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_3_3.ogg"] != null) {
		_this162.setReserved("assets/sounds/m/sound_0_3_3.ogg","assets/sounds/m/sound_0_3_3.ogg");
	} else {
		_this162.h["assets/sounds/m/sound_0_3_3.ogg"] = "assets/sounds/m/sound_0_3_3.ogg";
	}
	var _this163 = this.type;
	var value81 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_3_3.ogg"] != null) {
		_this163.setReserved("assets/sounds/m/sound_0_3_3.ogg",value81);
	} else {
		_this163.h["assets/sounds/m/sound_0_3_3.ogg"] = value81;
	}
	var _this164 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_2_1.ogg"] != null) {
		_this164.setReserved("assets/sounds/m/sound_3_2_1.ogg","assets/sounds/m/sound_3_2_1.ogg");
	} else {
		_this164.h["assets/sounds/m/sound_3_2_1.ogg"] = "assets/sounds/m/sound_3_2_1.ogg";
	}
	var _this165 = this.type;
	var value82 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_2_1.ogg"] != null) {
		_this165.setReserved("assets/sounds/m/sound_3_2_1.ogg",value82);
	} else {
		_this165.h["assets/sounds/m/sound_3_2_1.ogg"] = value82;
	}
	var _this166 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_1_2.ogg"] != null) {
		_this166.setReserved("assets/sounds/m/sound_0_1_2.ogg","assets/sounds/m/sound_0_1_2.ogg");
	} else {
		_this166.h["assets/sounds/m/sound_0_1_2.ogg"] = "assets/sounds/m/sound_0_1_2.ogg";
	}
	var _this167 = this.type;
	var value83 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_1_2.ogg"] != null) {
		_this167.setReserved("assets/sounds/m/sound_0_1_2.ogg",value83);
	} else {
		_this167.h["assets/sounds/m/sound_0_1_2.ogg"] = value83;
	}
	var _this168 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_1_0.ogg"] != null) {
		_this168.setReserved("assets/sounds/m/sound_2_1_0.ogg","assets/sounds/m/sound_2_1_0.ogg");
	} else {
		_this168.h["assets/sounds/m/sound_2_1_0.ogg"] = "assets/sounds/m/sound_2_1_0.ogg";
	}
	var _this169 = this.type;
	var value84 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_1_0.ogg"] != null) {
		_this169.setReserved("assets/sounds/m/sound_2_1_0.ogg",value84);
	} else {
		_this169.h["assets/sounds/m/sound_2_1_0.ogg"] = value84;
	}
	var _this170 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_4_3.ogg"] != null) {
		_this170.setReserved("assets/sounds/m/sound_0_4_3.ogg","assets/sounds/m/sound_0_4_3.ogg");
	} else {
		_this170.h["assets/sounds/m/sound_0_4_3.ogg"] = "assets/sounds/m/sound_0_4_3.ogg";
	}
	var _this171 = this.type;
	var value85 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_4_3.ogg"] != null) {
		_this171.setReserved("assets/sounds/m/sound_0_4_3.ogg",value85);
	} else {
		_this171.h["assets/sounds/m/sound_0_4_3.ogg"] = value85;
	}
	var _this172 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_3_0.ogg"] != null) {
		_this172.setReserved("assets/sounds/m/sound_2_3_0.ogg","assets/sounds/m/sound_2_3_0.ogg");
	} else {
		_this172.h["assets/sounds/m/sound_2_3_0.ogg"] = "assets/sounds/m/sound_2_3_0.ogg";
	}
	var _this173 = this.type;
	var value86 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_3_0.ogg"] != null) {
		_this173.setReserved("assets/sounds/m/sound_2_3_0.ogg",value86);
	} else {
		_this173.h["assets/sounds/m/sound_2_3_0.ogg"] = value86;
	}
	var _this174 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_4_0.ogg"] != null) {
		_this174.setReserved("assets/sounds/m/sound_1_4_0.ogg","assets/sounds/m/sound_1_4_0.ogg");
	} else {
		_this174.h["assets/sounds/m/sound_1_4_0.ogg"] = "assets/sounds/m/sound_1_4_0.ogg";
	}
	var _this175 = this.type;
	var value87 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_4_0.ogg"] != null) {
		_this175.setReserved("assets/sounds/m/sound_1_4_0.ogg",value87);
	} else {
		_this175.h["assets/sounds/m/sound_1_4_0.ogg"] = value87;
	}
	var _this176 = this.path;
	if(__map_reserved["assets/sounds/m/sound_1_0_3.ogg"] != null) {
		_this176.setReserved("assets/sounds/m/sound_1_0_3.ogg","assets/sounds/m/sound_1_0_3.ogg");
	} else {
		_this176.h["assets/sounds/m/sound_1_0_3.ogg"] = "assets/sounds/m/sound_1_0_3.ogg";
	}
	var _this177 = this.type;
	var value88 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_1_0_3.ogg"] != null) {
		_this177.setReserved("assets/sounds/m/sound_1_0_3.ogg",value88);
	} else {
		_this177.h["assets/sounds/m/sound_1_0_3.ogg"] = value88;
	}
	var _this178 = this.path;
	if(__map_reserved["assets/sounds/m/sound_2_1_1.ogg"] != null) {
		_this178.setReserved("assets/sounds/m/sound_2_1_1.ogg","assets/sounds/m/sound_2_1_1.ogg");
	} else {
		_this178.h["assets/sounds/m/sound_2_1_1.ogg"] = "assets/sounds/m/sound_2_1_1.ogg";
	}
	var _this179 = this.type;
	var value89 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_2_1_1.ogg"] != null) {
		_this179.setReserved("assets/sounds/m/sound_2_1_1.ogg",value89);
	} else {
		_this179.h["assets/sounds/m/sound_2_1_1.ogg"] = value89;
	}
	var _this180 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_3_1.ogg"] != null) {
		_this180.setReserved("assets/sounds/m/sound_0_3_1.ogg","assets/sounds/m/sound_0_3_1.ogg");
	} else {
		_this180.h["assets/sounds/m/sound_0_3_1.ogg"] = "assets/sounds/m/sound_0_3_1.ogg";
	}
	var _this181 = this.type;
	var value90 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_3_1.ogg"] != null) {
		_this181.setReserved("assets/sounds/m/sound_0_3_1.ogg",value90);
	} else {
		_this181.h["assets/sounds/m/sound_0_3_1.ogg"] = value90;
	}
	var _this182 = this.path;
	if(__map_reserved["assets/sounds/m/sound_3_3_1.ogg"] != null) {
		_this182.setReserved("assets/sounds/m/sound_3_3_1.ogg","assets/sounds/m/sound_3_3_1.ogg");
	} else {
		_this182.h["assets/sounds/m/sound_3_3_1.ogg"] = "assets/sounds/m/sound_3_3_1.ogg";
	}
	var _this183 = this.type;
	var value91 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_3_3_1.ogg"] != null) {
		_this183.setReserved("assets/sounds/m/sound_3_3_1.ogg",value91);
	} else {
		_this183.h["assets/sounds/m/sound_3_3_1.ogg"] = value91;
	}
	var _this184 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_4_1.ogg"] != null) {
		_this184.setReserved("assets/sounds/m/sound_0_4_1.ogg","assets/sounds/m/sound_0_4_1.ogg");
	} else {
		_this184.h["assets/sounds/m/sound_0_4_1.ogg"] = "assets/sounds/m/sound_0_4_1.ogg";
	}
	var _this185 = this.type;
	var value92 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_4_1.ogg"] != null) {
		_this185.setReserved("assets/sounds/m/sound_0_4_1.ogg",value92);
	} else {
		_this185.h["assets/sounds/m/sound_0_4_1.ogg"] = value92;
	}
	var _this186 = this.path;
	if(__map_reserved["assets/sounds/m/sound_0_4_2.ogg"] != null) {
		_this186.setReserved("assets/sounds/m/sound_0_4_2.ogg","assets/sounds/m/sound_0_4_2.ogg");
	} else {
		_this186.h["assets/sounds/m/sound_0_4_2.ogg"] = "assets/sounds/m/sound_0_4_2.ogg";
	}
	var _this187 = this.type;
	var value93 = "SOUND";
	if(__map_reserved["assets/sounds/m/sound_0_4_2.ogg"] != null) {
		_this187.setReserved("assets/sounds/m/sound_0_4_2.ogg",value93);
	} else {
		_this187.h["assets/sounds/m/sound_0_4_2.ogg"] = value93;
	}
	var _this188 = this.path;
	if(__map_reserved["assets/sounds/die.ogg"] != null) {
		_this188.setReserved("assets/sounds/die.ogg","assets/sounds/die.ogg");
	} else {
		_this188.h["assets/sounds/die.ogg"] = "assets/sounds/die.ogg";
	}
	var _this189 = this.type;
	var value94 = "SOUND";
	if(__map_reserved["assets/sounds/die.ogg"] != null) {
		_this189.setReserved("assets/sounds/die.ogg",value94);
	} else {
		_this189.h["assets/sounds/die.ogg"] = value94;
	}
	var _this190 = this.path;
	if(__map_reserved["assets/sounds/water.ogg"] != null) {
		_this190.setReserved("assets/sounds/water.ogg","assets/sounds/water.ogg");
	} else {
		_this190.h["assets/sounds/water.ogg"] = "assets/sounds/water.ogg";
	}
	var _this191 = this.type;
	var value95 = "SOUND";
	if(__map_reserved["assets/sounds/water.ogg"] != null) {
		_this191.setReserved("assets/sounds/water.ogg",value95);
	} else {
		_this191.h["assets/sounds/water.ogg"] = value95;
	}
	var _this192 = this.path;
	if(__map_reserved["assets/sounds/step.ogg"] != null) {
		_this192.setReserved("assets/sounds/step.ogg","assets/sounds/step.ogg");
	} else {
		_this192.h["assets/sounds/step.ogg"] = "assets/sounds/step.ogg";
	}
	var _this193 = this.type;
	var value96 = "SOUND";
	if(__map_reserved["assets/sounds/step.ogg"] != null) {
		_this193.setReserved("assets/sounds/step.ogg",value96);
	} else {
		_this193.h["assets/sounds/step.ogg"] = value96;
	}
	var _this194 = this.path;
	if(__map_reserved["assets/sounds/victory.ogg"] != null) {
		_this194.setReserved("assets/sounds/victory.ogg","assets/sounds/victory.ogg");
	} else {
		_this194.h["assets/sounds/victory.ogg"] = "assets/sounds/victory.ogg";
	}
	var _this195 = this.type;
	var value97 = "SOUND";
	if(__map_reserved["assets/sounds/victory.ogg"] != null) {
		_this195.setReserved("assets/sounds/victory.ogg",value97);
	} else {
		_this195.h["assets/sounds/victory.ogg"] = value97;
	}
	var _this196 = this.path;
	if(__map_reserved["assets/sounds/waves1.ogg"] != null) {
		_this196.setReserved("assets/sounds/waves1.ogg","assets/sounds/waves1.ogg");
	} else {
		_this196.h["assets/sounds/waves1.ogg"] = "assets/sounds/waves1.ogg";
	}
	var _this197 = this.type;
	var value98 = "SOUND";
	if(__map_reserved["assets/sounds/waves1.ogg"] != null) {
		_this197.setReserved("assets/sounds/waves1.ogg",value98);
	} else {
		_this197.h["assets/sounds/waves1.ogg"] = value98;
	}
	var _this198 = this.path;
	if(__map_reserved["flixel/sounds/flixel.ogg"] != null) {
		_this198.setReserved("flixel/sounds/flixel.ogg","flixel/sounds/flixel.ogg");
	} else {
		_this198.h["flixel/sounds/flixel.ogg"] = "flixel/sounds/flixel.ogg";
	}
	var _this199 = this.type;
	var value99 = "SOUND";
	if(__map_reserved["flixel/sounds/flixel.ogg"] != null) {
		_this199.setReserved("flixel/sounds/flixel.ogg",value99);
	} else {
		_this199.h["flixel/sounds/flixel.ogg"] = value99;
	}
	var _this200 = this.path;
	if(__map_reserved["flixel/sounds/beep.ogg"] != null) {
		_this200.setReserved("flixel/sounds/beep.ogg","flixel/sounds/beep.ogg");
	} else {
		_this200.h["flixel/sounds/beep.ogg"] = "flixel/sounds/beep.ogg";
	}
	var _this201 = this.type;
	var value100 = "SOUND";
	if(__map_reserved["flixel/sounds/beep.ogg"] != null) {
		_this201.setReserved("flixel/sounds/beep.ogg",value100);
	} else {
		_this201.h["flixel/sounds/beep.ogg"] = value100;
	}
	var _this202 = this.className;
	var value101 = _$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf;
	if(__map_reserved["flixel/fonts/nokiafc22.ttf"] != null) {
		_this202.setReserved("flixel/fonts/nokiafc22.ttf",value101);
	} else {
		_this202.h["flixel/fonts/nokiafc22.ttf"] = value101;
	}
	var _this203 = this.type;
	var value102 = "FONT";
	if(__map_reserved["flixel/fonts/nokiafc22.ttf"] != null) {
		_this203.setReserved("flixel/fonts/nokiafc22.ttf",value102);
	} else {
		_this203.h["flixel/fonts/nokiafc22.ttf"] = value102;
	}
	var _this204 = this.className;
	var value103 = _$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf;
	if(__map_reserved["flixel/fonts/monsterrat.ttf"] != null) {
		_this204.setReserved("flixel/fonts/monsterrat.ttf",value103);
	} else {
		_this204.h["flixel/fonts/monsterrat.ttf"] = value103;
	}
	var _this205 = this.type;
	var value104 = "FONT";
	if(__map_reserved["flixel/fonts/monsterrat.ttf"] != null) {
		_this205.setReserved("flixel/fonts/monsterrat.ttf",value104);
	} else {
		_this205.h["flixel/fonts/monsterrat.ttf"] = value104;
	}
	var _this206 = this.path;
	if(__map_reserved["flixel/images/ui/button.png"] != null) {
		_this206.setReserved("flixel/images/ui/button.png","flixel/images/ui/button.png");
	} else {
		_this206.h["flixel/images/ui/button.png"] = "flixel/images/ui/button.png";
	}
	var _this207 = this.type;
	var value105 = "IMAGE";
	if(__map_reserved["flixel/images/ui/button.png"] != null) {
		_this207.setReserved("flixel/images/ui/button.png",value105);
	} else {
		_this207.h["flixel/images/ui/button.png"] = value105;
	}
	var _this208 = this.path;
	if(__map_reserved["flixel/images/logo/default.png"] != null) {
		_this208.setReserved("flixel/images/logo/default.png","flixel/images/logo/default.png");
	} else {
		_this208.h["flixel/images/logo/default.png"] = "flixel/images/logo/default.png";
	}
	var _this209 = this.type;
	var value106 = "IMAGE";
	if(__map_reserved["flixel/images/logo/default.png"] != null) {
		_this209.setReserved("flixel/images/logo/default.png",value106);
	} else {
		_this209.h["flixel/images/logo/default.png"] = value106;
	}
	var _this210 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/check_mark.png"] != null) {
		_this210.setReserved("flixel/flixel-ui/img/check_mark.png","flixel/flixel-ui/img/check_mark.png");
	} else {
		_this210.h["flixel/flixel-ui/img/check_mark.png"] = "flixel/flixel-ui/img/check_mark.png";
	}
	var _this211 = this.type;
	var value107 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/check_mark.png"] != null) {
		_this211.setReserved("flixel/flixel-ui/img/check_mark.png",value107);
	} else {
		_this211.h["flixel/flixel-ui/img/check_mark.png"] = value107;
	}
	var _this212 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/radio.png"] != null) {
		_this212.setReserved("flixel/flixel-ui/img/radio.png","flixel/flixel-ui/img/radio.png");
	} else {
		_this212.h["flixel/flixel-ui/img/radio.png"] = "flixel/flixel-ui/img/radio.png";
	}
	var _this213 = this.type;
	var value108 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/radio.png"] != null) {
		_this213.setReserved("flixel/flixel-ui/img/radio.png",value108);
	} else {
		_this213.h["flixel/flixel-ui/img/radio.png"] = value108;
	}
	var _this214 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/chrome.png"] != null) {
		_this214.setReserved("flixel/flixel-ui/img/chrome.png","flixel/flixel-ui/img/chrome.png");
	} else {
		_this214.h["flixel/flixel-ui/img/chrome.png"] = "flixel/flixel-ui/img/chrome.png";
	}
	var _this215 = this.type;
	var value109 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/chrome.png"] != null) {
		_this215.setReserved("flixel/flixel-ui/img/chrome.png",value109);
	} else {
		_this215.h["flixel/flixel-ui/img/chrome.png"] = value109;
	}
	var _this216 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/button_arrow_up.png"] != null) {
		_this216.setReserved("flixel/flixel-ui/img/button_arrow_up.png","flixel/flixel-ui/img/button_arrow_up.png");
	} else {
		_this216.h["flixel/flixel-ui/img/button_arrow_up.png"] = "flixel/flixel-ui/img/button_arrow_up.png";
	}
	var _this217 = this.type;
	var value110 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/button_arrow_up.png"] != null) {
		_this217.setReserved("flixel/flixel-ui/img/button_arrow_up.png",value110);
	} else {
		_this217.h["flixel/flixel-ui/img/button_arrow_up.png"] = value110;
	}
	var _this218 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/button_arrow_down.png"] != null) {
		_this218.setReserved("flixel/flixel-ui/img/button_arrow_down.png","flixel/flixel-ui/img/button_arrow_down.png");
	} else {
		_this218.h["flixel/flixel-ui/img/button_arrow_down.png"] = "flixel/flixel-ui/img/button_arrow_down.png";
	}
	var _this219 = this.type;
	var value111 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/button_arrow_down.png"] != null) {
		_this219.setReserved("flixel/flixel-ui/img/button_arrow_down.png",value111);
	} else {
		_this219.h["flixel/flixel-ui/img/button_arrow_down.png"] = value111;
	}
	var _this220 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/swatch.png"] != null) {
		_this220.setReserved("flixel/flixel-ui/img/swatch.png","flixel/flixel-ui/img/swatch.png");
	} else {
		_this220.h["flixel/flixel-ui/img/swatch.png"] = "flixel/flixel-ui/img/swatch.png";
	}
	var _this221 = this.type;
	var value112 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/swatch.png"] != null) {
		_this221.setReserved("flixel/flixel-ui/img/swatch.png",value112);
	} else {
		_this221.h["flixel/flixel-ui/img/swatch.png"] = value112;
	}
	var _this222 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/button_thin.png"] != null) {
		_this222.setReserved("flixel/flixel-ui/img/button_thin.png","flixel/flixel-ui/img/button_thin.png");
	} else {
		_this222.h["flixel/flixel-ui/img/button_thin.png"] = "flixel/flixel-ui/img/button_thin.png";
	}
	var _this223 = this.type;
	var value113 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/button_thin.png"] != null) {
		_this223.setReserved("flixel/flixel-ui/img/button_thin.png",value113);
	} else {
		_this223.h["flixel/flixel-ui/img/button_thin.png"] = value113;
	}
	var _this224 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/chrome_inset.png"] != null) {
		_this224.setReserved("flixel/flixel-ui/img/chrome_inset.png","flixel/flixel-ui/img/chrome_inset.png");
	} else {
		_this224.h["flixel/flixel-ui/img/chrome_inset.png"] = "flixel/flixel-ui/img/chrome_inset.png";
	}
	var _this225 = this.type;
	var value114 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/chrome_inset.png"] != null) {
		_this225.setReserved("flixel/flixel-ui/img/chrome_inset.png",value114);
	} else {
		_this225.h["flixel/flixel-ui/img/chrome_inset.png"] = value114;
	}
	var _this226 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/chrome_light.png"] != null) {
		_this226.setReserved("flixel/flixel-ui/img/chrome_light.png","flixel/flixel-ui/img/chrome_light.png");
	} else {
		_this226.h["flixel/flixel-ui/img/chrome_light.png"] = "flixel/flixel-ui/img/chrome_light.png";
	}
	var _this227 = this.type;
	var value115 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/chrome_light.png"] != null) {
		_this227.setReserved("flixel/flixel-ui/img/chrome_light.png",value115);
	} else {
		_this227.h["flixel/flixel-ui/img/chrome_light.png"] = value115;
	}
	var _this228 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/radio_dot.png"] != null) {
		_this228.setReserved("flixel/flixel-ui/img/radio_dot.png","flixel/flixel-ui/img/radio_dot.png");
	} else {
		_this228.h["flixel/flixel-ui/img/radio_dot.png"] = "flixel/flixel-ui/img/radio_dot.png";
	}
	var _this229 = this.type;
	var value116 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/radio_dot.png"] != null) {
		_this229.setReserved("flixel/flixel-ui/img/radio_dot.png",value116);
	} else {
		_this229.h["flixel/flixel-ui/img/radio_dot.png"] = value116;
	}
	var _this230 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/tooltip_arrow.png"] != null) {
		_this230.setReserved("flixel/flixel-ui/img/tooltip_arrow.png","flixel/flixel-ui/img/tooltip_arrow.png");
	} else {
		_this230.h["flixel/flixel-ui/img/tooltip_arrow.png"] = "flixel/flixel-ui/img/tooltip_arrow.png";
	}
	var _this231 = this.type;
	var value117 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/tooltip_arrow.png"] != null) {
		_this231.setReserved("flixel/flixel-ui/img/tooltip_arrow.png",value117);
	} else {
		_this231.h["flixel/flixel-ui/img/tooltip_arrow.png"] = value117;
	}
	var _this232 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/box.png"] != null) {
		_this232.setReserved("flixel/flixel-ui/img/box.png","flixel/flixel-ui/img/box.png");
	} else {
		_this232.h["flixel/flixel-ui/img/box.png"] = "flixel/flixel-ui/img/box.png";
	}
	var _this233 = this.type;
	var value118 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/box.png"] != null) {
		_this233.setReserved("flixel/flixel-ui/img/box.png",value118);
	} else {
		_this233.h["flixel/flixel-ui/img/box.png"] = value118;
	}
	var _this234 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/tab.png"] != null) {
		_this234.setReserved("flixel/flixel-ui/img/tab.png","flixel/flixel-ui/img/tab.png");
	} else {
		_this234.h["flixel/flixel-ui/img/tab.png"] = "flixel/flixel-ui/img/tab.png";
	}
	var _this235 = this.type;
	var value119 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/tab.png"] != null) {
		_this235.setReserved("flixel/flixel-ui/img/tab.png",value119);
	} else {
		_this235.h["flixel/flixel-ui/img/tab.png"] = value119;
	}
	var _this236 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/button.png"] != null) {
		_this236.setReserved("flixel/flixel-ui/img/button.png","flixel/flixel-ui/img/button.png");
	} else {
		_this236.h["flixel/flixel-ui/img/button.png"] = "flixel/flixel-ui/img/button.png";
	}
	var _this237 = this.type;
	var value120 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/button.png"] != null) {
		_this237.setReserved("flixel/flixel-ui/img/button.png",value120);
	} else {
		_this237.h["flixel/flixel-ui/img/button.png"] = value120;
	}
	var _this238 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/tab_back.png"] != null) {
		_this238.setReserved("flixel/flixel-ui/img/tab_back.png","flixel/flixel-ui/img/tab_back.png");
	} else {
		_this238.h["flixel/flixel-ui/img/tab_back.png"] = "flixel/flixel-ui/img/tab_back.png";
	}
	var _this239 = this.type;
	var value121 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/tab_back.png"] != null) {
		_this239.setReserved("flixel/flixel-ui/img/tab_back.png",value121);
	} else {
		_this239.h["flixel/flixel-ui/img/tab_back.png"] = value121;
	}
	var _this240 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/dropdown_mark.png"] != null) {
		_this240.setReserved("flixel/flixel-ui/img/dropdown_mark.png","flixel/flixel-ui/img/dropdown_mark.png");
	} else {
		_this240.h["flixel/flixel-ui/img/dropdown_mark.png"] = "flixel/flixel-ui/img/dropdown_mark.png";
	}
	var _this241 = this.type;
	var value122 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/dropdown_mark.png"] != null) {
		_this241.setReserved("flixel/flixel-ui/img/dropdown_mark.png",value122);
	} else {
		_this241.h["flixel/flixel-ui/img/dropdown_mark.png"] = value122;
	}
	var _this242 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/chrome_flat.png"] != null) {
		_this242.setReserved("flixel/flixel-ui/img/chrome_flat.png","flixel/flixel-ui/img/chrome_flat.png");
	} else {
		_this242.h["flixel/flixel-ui/img/chrome_flat.png"] = "flixel/flixel-ui/img/chrome_flat.png";
	}
	var _this243 = this.type;
	var value123 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/chrome_flat.png"] != null) {
		_this243.setReserved("flixel/flixel-ui/img/chrome_flat.png",value123);
	} else {
		_this243.h["flixel/flixel-ui/img/chrome_flat.png"] = value123;
	}
	var _this244 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/minus_mark.png"] != null) {
		_this244.setReserved("flixel/flixel-ui/img/minus_mark.png","flixel/flixel-ui/img/minus_mark.png");
	} else {
		_this244.h["flixel/flixel-ui/img/minus_mark.png"] = "flixel/flixel-ui/img/minus_mark.png";
	}
	var _this245 = this.type;
	var value124 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/minus_mark.png"] != null) {
		_this245.setReserved("flixel/flixel-ui/img/minus_mark.png",value124);
	} else {
		_this245.h["flixel/flixel-ui/img/minus_mark.png"] = value124;
	}
	var _this246 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/finger_big.png"] != null) {
		_this246.setReserved("flixel/flixel-ui/img/finger_big.png","flixel/flixel-ui/img/finger_big.png");
	} else {
		_this246.h["flixel/flixel-ui/img/finger_big.png"] = "flixel/flixel-ui/img/finger_big.png";
	}
	var _this247 = this.type;
	var value125 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/finger_big.png"] != null) {
		_this247.setReserved("flixel/flixel-ui/img/finger_big.png",value125);
	} else {
		_this247.h["flixel/flixel-ui/img/finger_big.png"] = value125;
	}
	var _this248 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/invis.png"] != null) {
		_this248.setReserved("flixel/flixel-ui/img/invis.png","flixel/flixel-ui/img/invis.png");
	} else {
		_this248.h["flixel/flixel-ui/img/invis.png"] = "flixel/flixel-ui/img/invis.png";
	}
	var _this249 = this.type;
	var value126 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/invis.png"] != null) {
		_this249.setReserved("flixel/flixel-ui/img/invis.png",value126);
	} else {
		_this249.h["flixel/flixel-ui/img/invis.png"] = value126;
	}
	var _this250 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/check_box.png"] != null) {
		_this250.setReserved("flixel/flixel-ui/img/check_box.png","flixel/flixel-ui/img/check_box.png");
	} else {
		_this250.h["flixel/flixel-ui/img/check_box.png"] = "flixel/flixel-ui/img/check_box.png";
	}
	var _this251 = this.type;
	var value127 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/check_box.png"] != null) {
		_this251.setReserved("flixel/flixel-ui/img/check_box.png",value127);
	} else {
		_this251.h["flixel/flixel-ui/img/check_box.png"] = value127;
	}
	var _this252 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/button_arrow_left.png"] != null) {
		_this252.setReserved("flixel/flixel-ui/img/button_arrow_left.png","flixel/flixel-ui/img/button_arrow_left.png");
	} else {
		_this252.h["flixel/flixel-ui/img/button_arrow_left.png"] = "flixel/flixel-ui/img/button_arrow_left.png";
	}
	var _this253 = this.type;
	var value128 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/button_arrow_left.png"] != null) {
		_this253.setReserved("flixel/flixel-ui/img/button_arrow_left.png",value128);
	} else {
		_this253.h["flixel/flixel-ui/img/button_arrow_left.png"] = value128;
	}
	var _this254 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/finger_small.png"] != null) {
		_this254.setReserved("flixel/flixel-ui/img/finger_small.png","flixel/flixel-ui/img/finger_small.png");
	} else {
		_this254.h["flixel/flixel-ui/img/finger_small.png"] = "flixel/flixel-ui/img/finger_small.png";
	}
	var _this255 = this.type;
	var value129 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/finger_small.png"] != null) {
		_this255.setReserved("flixel/flixel-ui/img/finger_small.png",value129);
	} else {
		_this255.h["flixel/flixel-ui/img/finger_small.png"] = value129;
	}
	var _this256 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/hilight.png"] != null) {
		_this256.setReserved("flixel/flixel-ui/img/hilight.png","flixel/flixel-ui/img/hilight.png");
	} else {
		_this256.h["flixel/flixel-ui/img/hilight.png"] = "flixel/flixel-ui/img/hilight.png";
	}
	var _this257 = this.type;
	var value130 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/hilight.png"] != null) {
		_this257.setReserved("flixel/flixel-ui/img/hilight.png",value130);
	} else {
		_this257.h["flixel/flixel-ui/img/hilight.png"] = value130;
	}
	var _this258 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/plus_mark.png"] != null) {
		_this258.setReserved("flixel/flixel-ui/img/plus_mark.png","flixel/flixel-ui/img/plus_mark.png");
	} else {
		_this258.h["flixel/flixel-ui/img/plus_mark.png"] = "flixel/flixel-ui/img/plus_mark.png";
	}
	var _this259 = this.type;
	var value131 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/plus_mark.png"] != null) {
		_this259.setReserved("flixel/flixel-ui/img/plus_mark.png",value131);
	} else {
		_this259.h["flixel/flixel-ui/img/plus_mark.png"] = value131;
	}
	var _this260 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/button_arrow_right.png"] != null) {
		_this260.setReserved("flixel/flixel-ui/img/button_arrow_right.png","flixel/flixel-ui/img/button_arrow_right.png");
	} else {
		_this260.h["flixel/flixel-ui/img/button_arrow_right.png"] = "flixel/flixel-ui/img/button_arrow_right.png";
	}
	var _this261 = this.type;
	var value132 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/button_arrow_right.png"] != null) {
		_this261.setReserved("flixel/flixel-ui/img/button_arrow_right.png",value132);
	} else {
		_this261.h["flixel/flixel-ui/img/button_arrow_right.png"] = value132;
	}
	var _this262 = this.path;
	if(__map_reserved["flixel/flixel-ui/img/button_toggle.png"] != null) {
		_this262.setReserved("flixel/flixel-ui/img/button_toggle.png","flixel/flixel-ui/img/button_toggle.png");
	} else {
		_this262.h["flixel/flixel-ui/img/button_toggle.png"] = "flixel/flixel-ui/img/button_toggle.png";
	}
	var _this263 = this.type;
	var value133 = "IMAGE";
	if(__map_reserved["flixel/flixel-ui/img/button_toggle.png"] != null) {
		_this263.setReserved("flixel/flixel-ui/img/button_toggle.png",value133);
	} else {
		_this263.h["flixel/flixel-ui/img/button_toggle.png"] = value133;
	}
	var _this264 = this.path;
	if(__map_reserved["flixel/flixel-ui/xml/defaults.xml"] != null) {
		_this264.setReserved("flixel/flixel-ui/xml/defaults.xml","flixel/flixel-ui/xml/defaults.xml");
	} else {
		_this264.h["flixel/flixel-ui/xml/defaults.xml"] = "flixel/flixel-ui/xml/defaults.xml";
	}
	var _this265 = this.type;
	var value134 = "TEXT";
	if(__map_reserved["flixel/flixel-ui/xml/defaults.xml"] != null) {
		_this265.setReserved("flixel/flixel-ui/xml/defaults.xml",value134);
	} else {
		_this265.h["flixel/flixel-ui/xml/defaults.xml"] = value134;
	}
	var _this266 = this.path;
	if(__map_reserved["flixel/flixel-ui/xml/default_loading_screen.xml"] != null) {
		_this266.setReserved("flixel/flixel-ui/xml/default_loading_screen.xml","flixel/flixel-ui/xml/default_loading_screen.xml");
	} else {
		_this266.h["flixel/flixel-ui/xml/default_loading_screen.xml"] = "flixel/flixel-ui/xml/default_loading_screen.xml";
	}
	var _this267 = this.type;
	var value135 = "TEXT";
	if(__map_reserved["flixel/flixel-ui/xml/default_loading_screen.xml"] != null) {
		_this267.setReserved("flixel/flixel-ui/xml/default_loading_screen.xml",value135);
	} else {
		_this267.h["flixel/flixel-ui/xml/default_loading_screen.xml"] = value135;
	}
	var _this268 = this.path;
	if(__map_reserved["flixel/flixel-ui/xml/default_popup.xml"] != null) {
		_this268.setReserved("flixel/flixel-ui/xml/default_popup.xml","flixel/flixel-ui/xml/default_popup.xml");
	} else {
		_this268.h["flixel/flixel-ui/xml/default_popup.xml"] = "flixel/flixel-ui/xml/default_popup.xml";
	}
	var _this269 = this.type;
	var value136 = "TEXT";
	if(__map_reserved["flixel/flixel-ui/xml/default_popup.xml"] != null) {
		_this269.setReserved("flixel/flixel-ui/xml/default_popup.xml",value136);
	} else {
		_this269.h["flixel/flixel-ui/xml/default_popup.xml"] = value136;
	}
	var assetsPrefix = null;
	if(ApplicationMain.config != null && Object.prototype.hasOwnProperty.call(ApplicationMain.config,"assetsPrefix")) {
		assetsPrefix = ApplicationMain.config.assetsPrefix;
	}
	if(assetsPrefix != null) {
		var k = this.path.keys();
		while(k.hasNext()) {
			var k1 = k.next();
			var _this270 = this.path;
			var value137 = assetsPrefix + (__map_reserved[k1] != null ? _this270.getReserved(k1) : _this270.h[k1]);
			var _this271 = this.path;
			if(__map_reserved[k1] != null) {
				_this271.setReserved(k1,value137);
			} else {
				_this271.h[k1] = value137;
			}
		}
	}
};
$hxClasses["DefaultAssetLibrary"] = DefaultAssetLibrary;
DefaultAssetLibrary.__name__ = ["DefaultAssetLibrary"];
DefaultAssetLibrary.__super__ = lime_AssetLibrary;
DefaultAssetLibrary.prototype = $extend(lime_AssetLibrary.prototype,{
	exists: function(id,type) {
		var requestedType = type != null ? js_Boot.__cast(type , String) : null;
		var _this = this.type;
		var assetType = __map_reserved[id] != null ? _this.getReserved(id) : _this.h[id];
		if(assetType != null) {
			if(assetType == requestedType || (requestedType == "SOUND" || requestedType == "MUSIC") && (assetType == "MUSIC" || assetType == "SOUND")) {
				return true;
			}
			if(requestedType == "BINARY" || requestedType == null || assetType == "BINARY" && requestedType == "TEXT") {
				return true;
			}
		}
		return false;
	}
	,getAudioBuffer: function(id) {
		return null;
	}
	,getBytes: function(id) {
		var _this = this.path;
		var key = __map_reserved[id] != null ? _this.getReserved(id) : _this.h[id];
		var _this1 = lime_app_Preloader.loaders;
		var loader = __map_reserved[key] != null ? _this1.getReserved(key) : _this1.h[key];
		if(loader == null) {
			return null;
		}
		var bytes = loader.bytes;
		if(bytes != null) {
			return bytes;
		} else {
			return null;
		}
	}
	,getFont: function(id) {
		var _this = this.className;
		return js_Boot.__cast(Type.createInstance(__map_reserved[id] != null ? _this.getReserved(id) : _this.h[id],[]) , lime_text_Font);
	}
	,getImage: function(id) {
		var _this = this.path;
		var key = __map_reserved[id] != null ? _this.getReserved(id) : _this.h[id];
		var _this1 = lime_app_Preloader.images;
		return lime_graphics_Image.fromImageElement(__map_reserved[key] != null ? _this1.getReserved(key) : _this1.h[key]);
	}
	,getPath: function(id) {
		var _this = this.path;
		if(__map_reserved[id] != null) {
			return _this.getReserved(id);
		} else {
			return _this.h[id];
		}
	}
	,getText: function(id) {
		var _this = this.path;
		var key = __map_reserved[id] != null ? _this.getReserved(id) : _this.h[id];
		var _this1 = lime_app_Preloader.loaders;
		var loader = __map_reserved[key] != null ? _this1.getReserved(key) : _this1.h[key];
		if(loader == null) {
			return null;
		}
		var bytes = loader.bytes;
		if(bytes != null) {
			return bytes.getString(0,bytes.length);
		} else {
			return null;
		}
	}
	,isLocal: function(id,type) {
		if(type != null) {
			js_Boot.__cast(type , String);
		}
		return true;
	}
	,list: function(type) {
		var requestedType = type != null ? js_Boot.__cast(type , String) : null;
		var items = [];
		var id = this.type.keys();
		while(id.hasNext()) {
			var id1 = id.next();
			if(requestedType == null || this.exists(id1,type)) {
				items.push(id1);
			}
		}
		return items;
	}
	,loadAudioBuffer: function(id) {
		var _gthis = this;
		var promise = new lime_app_Promise();
		promise.completeWith(new lime_app_Future(function() {
			return _gthis.getAudioBuffer(id);
		}));
		return promise.future;
	}
	,loadBytes: function(id) {
		var promise = new lime_app_Promise();
		var _this = this.path;
		if(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id)) {
			var request = new lime_net_HTTPRequest();
			var _this1 = this.path;
			promise.completeWith(request.load((__map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id]) + "?" + lime_Assets.cache.version));
		} else {
			promise.complete(this.getBytes(id));
		}
		return promise.future;
	}
	,loadImage: function(id) {
		var promise = new lime_app_Promise();
		var _this = this.path;
		if(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id)) {
			var image = new Image();
			image.onload = function(_) {
				var tmp = lime_graphics_Image.fromImageElement(image);
				promise.complete(tmp);
			};
			image.onerror = $bind(promise,promise.error);
			var _this1 = this.path;
			image.src = (__map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id]) + "?" + lime_Assets.cache.version;
		} else {
			var tmp1 = this.getImage(id);
			promise.complete(tmp1);
		}
		return promise.future;
	}
	,loadText: function(id) {
		var promise = new lime_app_Promise();
		var _this = this.path;
		if(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id)) {
			var request = new lime_net_HTTPRequest();
			var _this1 = this.path;
			var future = request.load((__map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id]) + "?" + lime_Assets.cache.version);
			future.onProgress(function(progress) {
				promise.progress(progress);
			});
			future.onError(function(msg) {
				promise.error(msg);
			});
			future.onComplete(function(bytes) {
				var tmp = bytes.getString(0,bytes.length);
				promise.complete(tmp);
			});
		} else {
			var tmp1 = this.getText(id);
			promise.complete(tmp1);
		}
		return promise.future;
	}
	,__class__: DefaultAssetLibrary
});
var lime_text_Font = function(name) {
	if(name != null) {
		this.name = name;
	}
	if(this.__fontPath != null) {
		this.__fromFile(this.__fontPath);
	}
};
$hxClasses["lime.text.Font"] = lime_text_Font;
lime_text_Font.__name__ = ["lime","text","Font"];
lime_text_Font.fromBytes = function(bytes) {
	var font = new lime_text_Font();
	font.__fromBytes(bytes);
	return font;
};
lime_text_Font.fromFile = function(path) {
	var font = new lime_text_Font();
	font.__fromFile(path);
	return font;
};
lime_text_Font.prototype = {
	decompose: function() {
		return null;
	}
	,getGlyph: function(character) {
		return -1;
	}
	,getGlyphs: function(characters) {
		if(characters == null) {
			characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^`'\"/\\&*()[]{}<>|:;_-+=?,. ";
		}
		return null;
	}
	,getGlyphMetrics: function(glyph) {
		return null;
	}
	,renderGlyph: function(glyph,fontSize) {
		return null;
	}
	,renderGlyphs: function(glyphs,fontSize) {
		return null;
	}
	,__fromBytes: function(bytes) {
		this.__fontPath = null;
	}
	,__fromFile: function(path) {
		this.__fontPath = path;
	}
	,__setSize: function(size) {
	}
	,get_ascender: function() {
		return 0;
	}
	,get_descender: function() {
		return 0;
	}
	,get_height: function() {
		return 0;
	}
	,get_numGlyphs: function() {
		return 0;
	}
	,get_underlinePosition: function() {
		return 0;
	}
	,get_underlineThickness: function() {
		return 0;
	}
	,get_unitsPerEM: function() {
		return 0;
	}
	,__class__: lime_text_Font
	,__properties__: {get_unitsPerEM:"get_unitsPerEM",get_underlineThickness:"get_underlineThickness",get_underlinePosition:"get_underlinePosition",get_numGlyphs:"get_numGlyphs",get_height:"get_height",get_descender:"get_descender",get_ascender:"get_ascender"}
};
var _$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf = function() {
	lime_text_Font.call(this);
	this.name = "Nokia Cellphone FC Small";
};
$hxClasses["__ASSET__flixel_fonts_nokiafc22_ttf"] = _$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf;
_$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf.__name__ = ["__ASSET__flixel_fonts_nokiafc22_ttf"];
_$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf.__super__ = lime_text_Font;
_$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf.prototype = $extend(lime_text_Font.prototype,{
	__class__: _$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf
});
var _$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf = function() {
	lime_text_Font.call(this);
	this.name = "Monsterrat";
};
$hxClasses["__ASSET__flixel_fonts_monsterrat_ttf"] = _$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf;
_$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf.__name__ = ["__ASSET__flixel_fonts_monsterrat_ttf"];
_$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf.__super__ = lime_text_Font;
_$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf.prototype = $extend(lime_text_Font.prototype,{
	__class__: _$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf
});
var openfl_text_Font = function(name) {
	lime_text_Font.call(this,name);
};
$hxClasses["openfl.text.Font"] = openfl_text_Font;
openfl_text_Font.__name__ = ["openfl","text","Font"];
openfl_text_Font.enumerateFonts = function(enumerateDeviceFonts) {
	if(enumerateDeviceFonts == null) {
		enumerateDeviceFonts = false;
	}
	return openfl_text_Font.__registeredFonts;
};
openfl_text_Font.fromBytes = function(bytes) {
	var font = new openfl_text_Font();
	font.__fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes));
	return font;
};
openfl_text_Font.fromFile = function(path) {
	var font = new openfl_text_Font();
	font.__fromFile(path);
	return font;
};
openfl_text_Font.registerFont = function(font) {
	var instance = js_Boot.__cast(Type.createInstance(font,[]) , openfl_text_Font);
	if(instance != null) {
		openfl_text_Font.__registeredFonts.push(instance);
	}
};
openfl_text_Font.__fromLimeFont = function(value) {
	var font = new openfl_text_Font();
	font.name = value.name;
	font.src = value.src;
	return font;
};
openfl_text_Font.__super__ = lime_text_Font;
openfl_text_Font.prototype = $extend(lime_text_Font.prototype,{
	get_fontName: function() {
		return this.name;
	}
	,set_fontName: function(value) {
		return this.name = value;
	}
	,__class__: openfl_text_Font
	,__properties__: $extend(lime_text_Font.prototype.__properties__,{set_fontName:"set_fontName",get_fontName:"get_fontName"})
});
var _$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$nokiafc22_$ttf = function() {
	var font = new _$_$ASSET_$_$flixel_$fonts_$nokiafc22_$ttf();
	this.src = font.src;
	this.name = font.name;
	openfl_text_Font.call(this);
};
$hxClasses["__ASSET__OPENFL__flixel_fonts_nokiafc22_ttf"] = _$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$nokiafc22_$ttf;
_$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$nokiafc22_$ttf.__name__ = ["__ASSET__OPENFL__flixel_fonts_nokiafc22_ttf"];
_$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$nokiafc22_$ttf.__super__ = openfl_text_Font;
_$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$nokiafc22_$ttf.prototype = $extend(openfl_text_Font.prototype,{
	__class__: _$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$nokiafc22_$ttf
});
var _$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$monsterrat_$ttf = function() {
	var font = new _$_$ASSET_$_$flixel_$fonts_$monsterrat_$ttf();
	this.src = font.src;
	this.name = font.name;
	openfl_text_Font.call(this);
};
$hxClasses["__ASSET__OPENFL__flixel_fonts_monsterrat_ttf"] = _$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$monsterrat_$ttf;
_$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$monsterrat_$ttf.__name__ = ["__ASSET__OPENFL__flixel_fonts_monsterrat_ttf"];
_$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$monsterrat_$ttf.__super__ = openfl_text_Font;
_$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$monsterrat_$ttf.prototype = $extend(openfl_text_Font.prototype,{
	__class__: _$_$ASSET_$_$OPENFL_$_$flixel_$fonts_$monsterrat_$ttf
});
var EReg = function(r,opt) {
	this.r = new RegExp(r,opt.split("u").join(""));
};
$hxClasses["EReg"] = EReg;
EReg.__name__ = ["EReg"];
EReg.prototype = {
	match: function(s) {
		if(this.r.global) {
			this.r.lastIndex = 0;
		}
		this.r.m = this.r.exec(s);
		this.r.s = s;
		return this.r.m != null;
	}
	,matched: function(n) {
		if(this.r.m != null && n >= 0 && n < this.r.m.length) {
			return this.r.m[n];
		} else {
			throw new js__$Boot_HaxeError("EReg::matched");
		}
	}
	,matchedPos: function() {
		if(this.r.m == null) {
			throw new js__$Boot_HaxeError("No string matched");
		}
		return { pos : this.r.m.index, len : this.r.m[0].length};
	}
	,split: function(s) {
		var d = "#__delim__#";
		return s.replace(this.r,d).split(d);
	}
	,__class__: EReg
};
var flixel_group_FlxTypedGroup = function(MaxSize) {
	if(MaxSize == null) {
		MaxSize = 0;
	}
	this._marker = 0;
	this.length = 0;
	flixel_FlxBasic.call(this);
	this.members = [];
	this.set_maxSize(Math.abs(MaxSize) | 0);
	this.flixelType = 2;
};
$hxClasses["flixel.group.FlxTypedGroup"] = flixel_group_FlxTypedGroup;
flixel_group_FlxTypedGroup.__name__ = ["flixel","group","FlxTypedGroup"];
flixel_group_FlxTypedGroup.overlaps = function(Callback,Group,X,Y,InScreenSpace,Camera) {
	var result = false;
	if(Group != null) {
		var i = 0;
		var l = Group.length;
		var basic;
		while(i < l) {
			basic = Group.members[i++];
			if(basic != null && Callback(basic,X,Y,InScreenSpace,Camera)) {
				result = true;
				break;
			}
		}
	}
	return result;
};
flixel_group_FlxTypedGroup.resolveGroup = function(ObjectOrGroup) {
	var group = null;
	if(ObjectOrGroup != null) {
		if(ObjectOrGroup.flixelType == 2) {
			group = ObjectOrGroup;
		} else if(ObjectOrGroup.flixelType == 4) {
			group = ObjectOrGroup.group;
		}
	}
	return group;
};
flixel_group_FlxTypedGroup.__super__ = flixel_FlxBasic;
flixel_group_FlxTypedGroup.prototype = $extend(flixel_FlxBasic.prototype,{
	destroy: function() {
		flixel_FlxBasic.prototype.destroy.call(this);
		if(this.members != null) {
			var i = 0;
			var basic = null;
			while(i < this.length) {
				basic = this.members[i++];
				if(basic != null) {
					basic.destroy();
				}
			}
			this.members = null;
		}
	}
	,update: function(elapsed) {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists && basic.active) {
				basic.update(elapsed);
			}
		}
	}
	,draw: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists && basic.visible) {
				basic.draw();
			}
		}
	}
	,add: function(Object) {
		if(Object == null) {
			return null;
		}
		if(this.members.indexOf(Object) >= 0) {
			return Object;
		}
		var index = this.getFirstNull();
		if(index != -1) {
			this.members[index] = Object;
			if(index >= this.length) {
				this.length = index + 1;
			}
			return Object;
		}
		if(this.maxSize > 0 && this.length >= this.maxSize) {
			return Object;
		}
		this.members.push(Object);
		this.length++;
		return Object;
	}
	,insert: function(position,object) {
		if(object == null) {
			return null;
		}
		if(this.members.indexOf(object) >= 0) {
			return object;
		}
		if(position < this.length && this.members[position] == null) {
			this.members[position] = object;
			return object;
		}
		if(this.maxSize > 0 && this.length >= this.maxSize) {
			return object;
		}
		this.members.splice(position,0,object);
		this.length++;
		return object;
	}
	,recycle: function(ObjectClass,ObjectFactory,Force,Revive) {
		if(Revive == null) {
			Revive = true;
		}
		if(Force == null) {
			Force = false;
		}
		var basic = null;
		if(this.maxSize > 0) {
			if(this.length < this.maxSize) {
				var object = null;
				if(ObjectFactory != null) {
					object = ObjectFactory();
					this.add(object);
				} else if(ObjectClass != null) {
					object = Type.createInstance(ObjectClass,[]);
					this.add(object);
				}
				return object;
			} else {
				basic = this.members[this._marker++];
				if(this._marker >= this.maxSize) {
					this._marker = 0;
				}
				if(Revive) {
					basic.revive();
				}
				return basic;
			}
		} else {
			basic = this.getFirstAvailable(ObjectClass,Force);
			if(basic != null) {
				if(Revive) {
					basic.revive();
				}
				return basic;
			}
			var object1 = null;
			if(ObjectFactory != null) {
				object1 = ObjectFactory();
				this.add(object1);
			} else if(ObjectClass != null) {
				object1 = Type.createInstance(ObjectClass,[]);
				this.add(object1);
			}
			return object1;
		}
	}
	,recycleCreateObject: function(ObjectClass,ObjectFactory) {
		var object = null;
		if(ObjectFactory != null) {
			object = ObjectFactory();
			this.add(object);
		} else if(ObjectClass != null) {
			object = Type.createInstance(ObjectClass,[]);
			this.add(object);
		}
		return object;
	}
	,remove: function(Object,Splice) {
		if(Splice == null) {
			Splice = false;
		}
		if(this.members == null) {
			return null;
		}
		var index = this.members.indexOf(Object);
		if(index < 0) {
			return null;
		}
		if(Splice) {
			this.members.splice(index,1);
		} else {
			this.members[index] = null;
		}
		return Object;
	}
	,replace: function(OldObject,NewObject) {
		var index = this.members.indexOf(OldObject);
		if(index < 0) {
			return null;
		}
		this.members[index] = NewObject;
		return NewObject;
	}
	,sort: function(Function,Order) {
		if(Order == null) {
			Order = -1;
		}
		var f = Function;
		var a1 = Order;
		var tmp = function(a2,a3) {
			return f(a1,a2,a3);
		};
		this.members.sort(tmp);
	}
	,getFirstAvailable: function(ObjectClass,Force) {
		if(Force == null) {
			Force = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && !basic.exists && (ObjectClass == null || js_Boot.__instanceof(basic,ObjectClass))) {
				if(Force && Type.getClassName(basic == null ? null : js_Boot.getClass(basic)) != Type.getClassName(ObjectClass)) {
					continue;
				}
				return this.members[i - 1];
			}
		}
		return null;
	}
	,getFirstNull: function() {
		var i = 0;
		while(i < this.length) {
			if(this.members[i] == null) {
				return i;
			}
			++i;
		}
		return -1;
	}
	,getFirstExisting: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists) {
				return basic;
			}
		}
		return null;
	}
	,getFirstAlive: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists && basic.alive) {
				return basic;
			}
		}
		return null;
	}
	,getFirstDead: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && !basic.alive) {
				return basic;
			}
		}
		return null;
	}
	,countLiving: function() {
		var i = 0;
		var count = -1;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null) {
				if(count < 0) {
					count = 0;
				}
				if(basic.exists && basic.alive) {
					++count;
				}
			}
		}
		return count;
	}
	,countDead: function() {
		var i = 0;
		var count = -1;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null) {
				if(count < 0) {
					count = 0;
				}
				if(!basic.alive) {
					++count;
				}
			}
		}
		return count;
	}
	,getRandom: function(StartIndex,Length) {
		if(Length == null) {
			Length = 0;
		}
		if(StartIndex == null) {
			StartIndex = 0;
		}
		if(StartIndex < 0) {
			StartIndex = 0;
		}
		if(Length <= 0) {
			Length = this.length;
		}
		return flixel_FlxG.random.getObject_flixel_group_FlxTypedGroup_T(this.members,null,StartIndex,Length);
	}
	,clear: function() {
		this.length = 0;
		flixel_util_FlxArrayUtil.clearArray(this.members);
	}
	,kill: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists) {
				basic.kill();
			}
		}
		flixel_FlxBasic.prototype.kill.call(this);
	}
	,revive: function() {
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && !basic.exists) {
				basic.revive();
			}
		}
		flixel_FlxBasic.prototype.revive.call(this);
	}
	,iterator: function(filter) {
		return new flixel_group_FlxTypedGroupIterator(this.members,filter);
	}
	,forEach: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEach(Function,Recurse);
					}
				}
				Function(basic);
			}
		}
	}
	,forEachAlive: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists && basic.alive) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEachAlive(Function,Recurse);
					}
				}
				Function(basic);
			}
		}
	}
	,forEachDead: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && !basic.alive) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEachDead(Function,Recurse);
					}
				}
				Function(basic);
			}
		}
	}
	,forEachExists: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null && basic.exists) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEachExists(Function,Recurse);
					}
				}
				Function(basic);
			}
		}
	}
	,forEachOfType: function(ObjectClass,Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		var i = 0;
		var basic = null;
		while(i < this.length) {
			basic = this.members[i++];
			if(basic != null) {
				if(Recurse) {
					var group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						group.forEachOfType(ObjectClass,Function,Recurse);
					}
				}
				if(js_Boot.__instanceof(basic,ObjectClass)) {
					Function(basic);
				}
			}
		}
	}
	,set_maxSize: function(Size) {
		this.maxSize = Math.abs(Size) | 0;
		if(this._marker >= this.maxSize) {
			this._marker = 0;
		}
		if(this.maxSize == 0 || this.members == null || this.maxSize >= this.length) {
			return this.maxSize;
		}
		var i = this.maxSize;
		var l = this.length;
		var basic = null;
		while(i < l) {
			basic = this.members[i++];
			if(basic != null) {
				basic.destroy();
			}
		}
		flixel_util_FlxArrayUtil.setLength_flixel_group_FlxTypedGroup_T(this.members,this.maxSize);
		this.length = this.members.length;
		return this.maxSize;
	}
	,__class__: flixel_group_FlxTypedGroup
	,__properties__: $extend(flixel_FlxBasic.prototype.__properties__,{set_maxSize:"set_maxSize"})
});
var flixel_FlxState = function(MaxSize) {
	this._requestSubStateReset = false;
	this.destroySubStates = true;
	this.persistentDraw = true;
	this.persistentUpdate = false;
	flixel_group_FlxTypedGroup.call(this,MaxSize);
};
$hxClasses["flixel.FlxState"] = flixel_FlxState;
flixel_FlxState.__name__ = ["flixel","FlxState"];
flixel_FlxState.__super__ = flixel_group_FlxTypedGroup;
flixel_FlxState.prototype = $extend(flixel_group_FlxTypedGroup.prototype,{
	create: function() {
	}
	,draw: function() {
		if(this.persistentDraw || this.subState == null) {
			flixel_group_FlxTypedGroup.prototype.draw.call(this);
		}
		if(this.subState != null) {
			this.subState.draw();
		}
	}
	,openSubState: function(SubState) {
		this._requestSubStateReset = true;
		this._requestedSubState = SubState;
	}
	,closeSubState: function() {
		this._requestSubStateReset = true;
	}
	,resetSubState: function() {
		if(this.subState != null) {
			if(this.subState.closeCallback != null) {
				this.subState.closeCallback();
			}
			if(this.destroySubStates) {
				this.subState.destroy();
			}
		}
		this.subState = this._requestedSubState;
		this._requestedSubState = null;
		if(this.subState != null) {
			if(!this.persistentUpdate) {
				flixel_FlxG.inputs.onStateSwitch();
			}
			this.subState._parentState = this;
			if(!this.subState._created) {
				this.subState._created = true;
				this.subState.create();
			}
		}
	}
	,destroy: function() {
		if(this.subState != null) {
			this.subState.destroy();
			this.subState = null;
		}
		flixel_group_FlxTypedGroup.prototype.destroy.call(this);
	}
	,switchTo: function(nextState) {
		return true;
	}
	,onFocusLost: function() {
	}
	,onFocus: function() {
	}
	,onResize: function(Width,Height) {
	}
	,tryUpdate: function(elapsed) {
		if(this.persistentUpdate || this.subState == null) {
			this.update(elapsed);
		}
		if(this._requestSubStateReset) {
			this._requestSubStateReset = false;
			this.resetSubState();
		} else if(this.subState != null) {
			this.subState.tryUpdate(elapsed);
		}
	}
	,get_bgColor: function() {
		return flixel_FlxG.cameras.get_bgColor();
	}
	,set_bgColor: function(Value) {
		return flixel_FlxG.cameras.set_bgColor(Value);
	}
	,__class__: flixel_FlxState
	,__properties__: $extend(flixel_group_FlxTypedGroup.prototype.__properties__,{set_bgColor:"set_bgColor",get_bgColor:"get_bgColor"})
});
var flixel_FlxSubState = function(BGColor) {
	if(BGColor == null) {
		BGColor = 0;
	}
	this._created = false;
	flixel_FlxState.call(this);
	this.closeCallback = null;
	if(flixel_FlxG.renderTile) {
		this._bgSprite = new flixel_system_FlxBGSprite();
	}
	this.set_bgColor(BGColor);
};
$hxClasses["flixel.FlxSubState"] = flixel_FlxSubState;
flixel_FlxSubState.__name__ = ["flixel","FlxSubState"];
flixel_FlxSubState.__super__ = flixel_FlxState;
flixel_FlxSubState.prototype = $extend(flixel_FlxState.prototype,{
	draw: function() {
		if(flixel_FlxG.renderBlit) {
			var _g = 0;
			var _g1 = this.get_cameras();
			while(_g < _g1.length) {
				var camera = _g1[_g];
				++_g;
				camera.fill(this._bgColor);
			}
		} else {
			this._bgSprite.draw();
		}
		flixel_FlxState.prototype.draw.call(this);
	}
	,destroy: function() {
		flixel_FlxState.prototype.destroy.call(this);
		this.closeCallback = null;
		this._parentState = null;
		this._bgSprite = null;
	}
	,close: function() {
		if(this._parentState != null && this._parentState.subState == this) {
			this._parentState.closeSubState();
		}
	}
	,get_bgColor: function() {
		return this._bgColor;
	}
	,set_bgColor: function(Value) {
		if(flixel_FlxG.renderTile && this._bgSprite != null) {
			this._bgSprite.get_pixels().setPixel32(0,0,Value);
		}
		return this._bgColor = Value;
	}
	,__class__: flixel_FlxSubState
});
var EscMenu = function(_game) {
	this.game = _game;
	flixel_FlxSubState.call(this);
};
$hxClasses["EscMenu"] = EscMenu;
EscMenu.__name__ = ["EscMenu"];
EscMenu.__super__ = flixel_FlxSubState;
EscMenu.prototype = $extend(flixel_FlxSubState.prototype,{
	create: function() {
		var _gthis = this;
		flixel_FlxG.mouse.set_visible(true);
		this.btnRestart = new flixel_ui_FlxButton(0,10,"Restart",function() {
			_gthis.game.reset();
		});
		this.add(this.btnRestart);
		this.btnRestart.set_x(flixel_FlxG.width / 2 - this.btnRestart.get_width() / 2);
		this.btnExit = new flixel_ui_FlxButton(0,40,"Exit",function() {
			var nextState = new MenuState();
			if(flixel_FlxG.game._state.switchTo(nextState)) {
				flixel_FlxG.game._requestedState = nextState;
			}
		});
		this.add(this.btnExit);
		this.btnExit.set_x(flixel_FlxG.width / 2 - this.btnExit.get_width() / 2);
		this.btnContinue = new flixel_ui_FlxButton(0,70,"Continue",function() {
			_gthis.game.closeSubState();
		});
		this.add(this.btnContinue);
		this.btnContinue.set_x(flixel_FlxG.width / 2 - this.btnContinue.get_width() / 2);
	}
	,update: function(elapsed) {
		var _this = flixel_FlxG.keys.justPressed;
		if(_this.keyManager.checkStatus(27,_this.status)) {
			this.game.closeSubState();
		}
		flixel_FlxSubState.prototype.update.call(this,elapsed);
	}
	,__class__: EscMenu
});
var GameRules = function(delay,timeStep) {
	this.delay = delay;
	this.timeStep = timeStep;
};
$hxClasses["GameRules"] = GameRules;
GameRules.__name__ = ["GameRules"];
GameRules.prototype = {
	__class__: GameRules
};
var GameState = function(levelPath,scoreInfo,callback) {
	this.autoTick = true;
	this.endPoint = new IntPoint(100,100);
	this.startPoint = new IntPoint();
	this.clock = 0;
	this.tiledLevel = null;
	this.levelPath = levelPath;
	this.initialScore = scoreInfo.copy();
	this.callback = callback;
	flixel_FlxState.call(this);
};
$hxClasses["GameState"] = GameState;
GameState.__name__ = ["GameState"];
GameState.__super__ = flixel_FlxState;
GameState.prototype = $extend(flixel_FlxState.prototype,{
	doSound: function(path) {
		flixel_FlxG.sound.play(path,1,false,null,false).persist = true;
	}
	,reset: function() {
		var nextState = new GameState(this.levelPath,this.initialScore,this.callback);
		if(flixel_FlxG.game._state.switchTo(nextState)) {
			flixel_FlxG.game._requestedState = nextState;
		}
	}
	,onWin: function() {
		this.doSound("assets/sounds/victory.ogg");
		if(this.callback != null) {
			this.callback(true);
		} else {
			var nextState = new MenuState();
			if(flixel_FlxG.game._state.switchTo(nextState)) {
				flixel_FlxG.game._requestedState = nextState;
			}
		}
	}
	,loose: function() {
		this.doSound("assets/sounds/die.ogg");
		this.reset();
	}
	,create: function() {
		flixel_FlxState.prototype.create.call(this);
		this.waves = [];
		this.backgroundLayers = new flixel_group_FlxTypedGroup();
		this.add(this.backgroundLayers);
		this.add(this.playerLayer = new flixel_group_FlxTypedGroup());
		this.tiledLevel = new TiledLevel(this.levelPath,this);
		this.backgroundLayers.add(this.tiledLevel.backgroundLayer);
		this.add(this.tiledLevel.objectLayerMap);
		this.W = this.tiledLevel.objectLayerMap.widthInTiles;
		this.H = this.tiledLevel.objectLayerMap.heightInTiles;
		this.rules = GameRules.DEFAULT_RULES;
		this.player = new Player(this);
		this.playerLayer.add(this.player);
		this.player.setPos(this.startPoint);
		flixel_FlxG.camera.follow(this.player);
		this.moves = new Queue1(this.rules);
		this.timeAccumulator = 0;
		this.initWaveLayer();
		this.guiLayer = new flixel_group_FlxTypedSpriteGroup();
		this.add(this.guiLayer);
		this.guiLayer.scrollFactor.set_x(0);
		this.guiLayer.scrollFactor.set_y(0);
		this.queueIndicator = new QueueIndicator(this.moves);
		this.guiLayer.add(this.queueIndicator);
		var healthIndicator = new HealthIndicator(this.player);
		this.guiLayer.add(healthIndicator);
		healthIndicator.set_x(flixel_FlxG.width - 50);
	}
	,initWaveLayer: function() {
		this.waveLayer = new flixel_tile_FlxTilemap();
		var tmp = [];
		var S = this.H * this.W;
		var _g1 = 0;
		while(_g1 < S) {
			++_g1;
			tmp.push(0);
		}
		this.waveLayer.loadMapFromArray(tmp,this.W,this.H,"assets/images/tiles.png",32,32,flixel_tile_FlxTilemapAutoTiling.OFF,0,1,1);
		this.add(this.waveLayer);
		this.waveSound = [];
		var _g11 = 0;
		var _g = this.waves.length;
		while(_g11 < _g) {
			++_g11;
			this.waveSound.push(flixel_FlxG.sound.load("assets/sounds/waves1.ogg",0.5,true));
		}
	}
	,getWaterTile: function(dir,end) {
		var tiles = end ? [[105,106,107,108],[103,123,143,163],[165,166,167,168],[100,120,140,160]][dir] : [[101,102,121,122,141,142,161,162],[125,126,127,128,145,146,147,148]][dir & 1];
		return tiles[Std.random(tiles.length)] + 100;
	}
	,updateWaves: function() {
		var S = this.H * this.W;
		var _g1 = 0;
		while(_g1 < S) this.waveLayer.setTileByIndex(_g1++,0,false);
		var waveId = -1;
		var _g = 0;
		var _g11 = this.waves;
		while(_g < _g11.length) {
			var wave = _g11[_g];
			++_g;
			++waveId;
			var dir = wave.dir;
			var h = wave.size.y;
			var w = wave.size.x;
			if(dir == 0 || dir == 2) {
				w = wave.size.y;
				h = wave.size.x;
			}
			var x0 = 0;
			var y0 = 0;
			var dxv = 0;
			var dyv = 0;
			var dxh = 0;
			var dyh = 0;
			switch(dir) {
			case 0:
				x0 = wave.p0.x;
				y0 = wave.p0.y + wave.size.y - 1;
				dxv = 1;
				dyv = 0;
				dxh = 0;
				dyh = -1;
				break;
			case 1:
				x0 = wave.p0.x;
				y0 = wave.p0.y;
				dxv = 0;
				dyv = 1;
				dxh = 1;
				dyh = 0;
				break;
			case 2:
				x0 = wave.p0.x;
				y0 = wave.p0.y;
				dxv = 1;
				dyv = 0;
				dxh = 0;
				dyh = 1;
				break;
			case 3:
				x0 = wave.p0.x + wave.size.x - 1;
				y0 = wave.p0.y;
				dxv = 0;
				dyv = 1;
				dxh = -1;
				dyh = 0;
				break;
			}
			var moves = wave.getMoves(this.clock);
			if(moves < 0) {
				continue;
			}
			var _g3 = 0;
			var _g2 = h;
			while(_g3 < _g2) {
				var i = _g3++;
				var d;
				switch(wave.type) {
				case 0:
					var r = moves % (2 * (w + 1));
					if(r <= w) {
						r = r;
					} else {
						r = w - (r - (w + 1));
					}
					if(h > 2 && (i == 0 || i == h - 1)) {
						--r;
					}
					d = r;
					break;
				case 1:
					if(moves <= w) {
						d = moves;
					} else {
						d = w;
					}
					break;
				default:
					d = 0;
				}
				if(d < 0) {
					d = 0;
				}
				if(d > w) {
					d = w;
				}
				if(i * 2 == (h & -2)) {
					var sound = this.waveSound[waveId];
					sound.proximity(32 * (x0 + dxv * i + dxh * d),32 * (y0 + dyv * i + dyh * d),this.player,Math.max(128,32 * (1 + h / 2)));
					if(sound._channel == null) {
						sound.play(null,sound._length * Math.random());
					}
				}
				var _g6 = 0;
				var _g5 = d;
				while(_g6 < _g5) {
					var j = _g6++;
					var tileId = this.getWaterTile(dir,j == d - 1);
					this.waveLayer.setTile(x0 + dxv * i + dxh * j,y0 + dyv * i + dyh * j,tileId,j == d - 1 && i == h - 1);
				}
			}
		}
	}
	,processKeyboard: function() {
		var _this = flixel_FlxG.keys.justPressed;
		if(_this.keyManager.checkStatus(27,_this.status)) {
			if(this.subState == null) {
				this.openSubState(new EscMenu(this));
			}
		}
		var _this1 = flixel_FlxG.keys.justPressed;
		if(_this1.keyManager.checkStatus(39,_this1.status)) {
			this.moves.push(MoveType.Right);
		}
		var _this2 = flixel_FlxG.keys.justPressed;
		if(_this2.keyManager.checkStatus(38,_this2.status)) {
			this.moves.push(MoveType.Up);
		}
		var _this3 = flixel_FlxG.keys.justPressed;
		if(_this3.keyManager.checkStatus(40,_this3.status)) {
			this.moves.push(MoveType.Down);
		}
		var _this4 = flixel_FlxG.keys.justPressed;
		if(_this4.keyManager.checkStatus(37,_this4.status)) {
			this.moves.push(MoveType.Left);
		}
		var _this5 = flixel_FlxG.keys.justPressed;
		if(_this5.keyManager.checkStatus(82,_this5.status)) {
			this.reset();
		}
	}
	,IsWater: function(px,py) {
		var tile = this.tiledLevel.groundLayer.get_tileArray();
		if(this.tiledLevel.gidType[tile[px + py * this.tiledLevel.groundLayer.width]] == MapType.Water) {
			return true;
		}
		if(this.waveLayer.getTile(px,py) > 0) {
			return true;
		}
		return false;
	}
	,GetObject: function(px,py) {
		var tile = this.tiledLevel.objectLayerMap.getTile(px,py);
		if(tile == 0) {
			return null;
		}
		if(this.tiledLevel.objectGidMap.h.hasOwnProperty(tile)) {
			return this.tiledLevel.objectGidMap.h[tile];
		}
		return null;
	}
	,SetObject: function(px,py,obj) {
		if(obj == null || obj.length == 0) {
			this.tiledLevel.objectLayerMap.setTile(px,py,0);
		} else {
			var _this = this.tiledLevel.objectStringMap;
			this.tiledLevel.objectLayerMap.setTile(px,py,__map_reserved[obj] != null ? _this.getReserved(obj) : _this.h[obj]);
		}
	}
	,update: function(elapsed) {
		this.processKeyboard();
		this.timeAccumulator += elapsed;
		while(this.timeAccumulator >= this.rules.timeStep) {
			this.timeAccumulator -= this.rules.timeStep;
			if(this.autoTick) {
				this.step();
			}
		}
		this.queueIndicator.refresh((this.rules.timeStep - this.timeAccumulator) / this.rules.timeStep);
		flixel_FlxState.prototype.update.call(this,elapsed);
	}
	,step: function() {
		this.player.step(this.moves.pop());
		this.updateWaves();
		this.clock += 1;
	}
	,__class__: GameState
});
var flixel_group_FlxTypedSpriteGroup = function(X,Y,MaxSize) {
	if(MaxSize == null) {
		MaxSize = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._skipTransformChildren = false;
	flixel_FlxSprite.call(this,X,Y);
	this.group = new flixel_group_FlxTypedGroup(MaxSize);
	this._sprites = this.group.members;
};
$hxClasses["flixel.group.FlxTypedSpriteGroup"] = flixel_group_FlxTypedSpriteGroup;
flixel_group_FlxTypedSpriteGroup.__name__ = ["flixel","group","FlxTypedSpriteGroup"];
flixel_group_FlxTypedSpriteGroup.__super__ = flixel_FlxSprite;
flixel_group_FlxTypedSpriteGroup.prototype = $extend(flixel_FlxSprite.prototype,{
	transformChildren_openfl_display_BlendMode: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,transformChildren_Int: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,transformChildren_Float: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,transformChildren_Bool: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,transformChildren_Array_flixel_FlxCamera: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,multiTransformChildren_Float: function(FunctionArray,ValueArray) {
		if(this.group == null) {
			return;
		}
		var numProps = FunctionArray.length;
		if(numProps > ValueArray.length) {
			return;
		}
		var lambda;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null && sprite.exists) {
				var _g3 = 0;
				while(_g3 < numProps) {
					var i = _g3++;
					lambda = FunctionArray[i];
					lambda(sprite,ValueArray[i]);
				}
			}
		}
	}
	,transformChildren_flixel_math_FlxPoint: function(Function,Value) {
		if(this.group == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				Function(sprite,Value);
			}
		}
	}
	,initVars: function() {
		this.flixelType = 4;
		this.offset = new flixel_math_FlxCallbackPoint($bind(this,this.offsetCallback));
		this.origin = new flixel_math_FlxCallbackPoint($bind(this,this.originCallback));
		this.scale = new flixel_math_FlxCallbackPoint($bind(this,this.scaleCallback));
		this.scrollFactor = new flixel_math_FlxCallbackPoint($bind(this,this.scrollFactorCallback));
		this.scale.set(1,1);
		this.scrollFactor.set(1,1);
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		this.velocity = point;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		this.acceleration = point1;
		var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
		point2._inPool = false;
		this.drag = point2;
		var point3 = flixel_math_FlxPoint._pool.get().set(10000,10000);
		point3._inPool = false;
		this.maxVelocity = point3;
	}
	,destroy: function() {
		this.offset = flixel_util_FlxDestroyUtil.destroy(this.offset);
		this.origin = flixel_util_FlxDestroyUtil.destroy(this.origin);
		this.scale = flixel_util_FlxDestroyUtil.destroy(this.scale);
		this.scrollFactor = flixel_util_FlxDestroyUtil.destroy(this.scrollFactor);
		this.group = flixel_util_FlxDestroyUtil.destroy(this.group);
		this._sprites = null;
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,clone: function() {
		var newGroup = new flixel_group_FlxTypedSpriteGroup(this.x,this.y,this.group.maxSize);
		var _g = 0;
		var _g1 = this.group.members;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				newGroup.add(sprite.clone());
			}
		}
		return newGroup;
	}
	,isOnScreen: function(Camera) {
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null && sprite.exists && sprite.visible && sprite.isOnScreen(Camera)) {
				return true;
			}
		}
		return false;
	}
	,overlapsPoint: function(point,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var result = false;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null && sprite.exists && sprite.visible) {
				if(!result) {
					result = sprite.overlapsPoint(point,InScreenSpace,Camera);
				} else {
					result = true;
				}
			}
		}
		return result;
	}
	,pixelsOverlapPoint: function(point,Mask,Camera) {
		if(Mask == null) {
			Mask = 255;
		}
		var result = false;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null && sprite.exists && sprite.visible) {
				if(!result) {
					result = sprite.pixelsOverlapPoint(point,Mask,Camera);
				} else {
					result = true;
				}
			}
		}
		return result;
	}
	,update: function(elapsed) {
		this.group.update(elapsed);
		if(this.moves) {
			this.updateMotion(elapsed);
		}
	}
	,draw: function() {
		this.group.draw();
	}
	,replaceColor: function(Color,NewColor,FetchPositions) {
		if(FetchPositions == null) {
			FetchPositions = false;
		}
		var positions = null;
		if(FetchPositions) {
			positions = [];
		}
		var spritePositions;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				spritePositions = sprite.replaceColor(Color,NewColor,FetchPositions);
				if(FetchPositions) {
					positions = positions.concat(spritePositions);
				}
			}
		}
		return positions;
	}
	,add: function(Sprite) {
		var sprite = Sprite;
		sprite.set_x(sprite.x + this.x);
		sprite.set_y(sprite.y + this.y);
		sprite.set_alpha(sprite.alpha * this.alpha);
		var _this = sprite.scrollFactor;
		var point = this.scrollFactor;
		_this.set_x(point.x);
		_this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
		sprite.set_cameras(this._cameras);
		return this.group.add(Sprite);
	}
	,recycle: function(ObjectClass,ObjectFactory,Force) {
		if(Force == null) {
			Force = false;
		}
		return this.group.recycle(ObjectClass,ObjectFactory,Force);
	}
	,remove: function(Sprite,Splice) {
		if(Splice == null) {
			Splice = false;
		}
		var sprite = Sprite;
		sprite.set_x(sprite.x - this.x);
		sprite.set_y(sprite.y - this.y);
		sprite.set_cameras(null);
		return this.group.remove(Sprite,Splice);
	}
	,replace: function(OldObject,NewObject) {
		return this.group.replace(OldObject,NewObject);
	}
	,sort: function(Function,Order) {
		if(Order == null) {
			Order = -1;
		}
		var f = Function;
		var a1 = Order;
		var tmp = function(a2,a3) {
			return f(a1,a2,a3);
		};
		this.group.members.sort(tmp);
	}
	,getFirstAvailable: function(ObjectClass,Force) {
		if(Force == null) {
			Force = false;
		}
		return this.group.getFirstAvailable(ObjectClass,Force);
	}
	,getFirstNull: function() {
		return this.group.getFirstNull();
	}
	,getFirstExisting: function() {
		return this.group.getFirstExisting();
	}
	,getFirstAlive: function() {
		return this.group.getFirstAlive();
	}
	,getFirstDead: function() {
		return this.group.getFirstDead();
	}
	,countLiving: function() {
		return this.group.countLiving();
	}
	,countDead: function() {
		return this.group.countDead();
	}
	,getRandom: function(StartIndex,Length) {
		if(Length == null) {
			Length = 0;
		}
		if(StartIndex == null) {
			StartIndex = 0;
		}
		return this.group.getRandom(StartIndex,Length);
	}
	,iterator: function(filter) {
		return new flixel_group_FlxTypedGroupIterator(this.group.members,filter);
	}
	,forEach: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEach(Function,Recurse);
	}
	,forEachAlive: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEachAlive(Function,Recurse);
	}
	,forEachDead: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEachDead(Function,Recurse);
	}
	,forEachExists: function(Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEachExists(Function,Recurse);
	}
	,forEachOfType: function(ObjectClass,Function,Recurse) {
		if(Recurse == null) {
			Recurse = false;
		}
		this.group.forEachOfType(ObjectClass,Function,Recurse);
	}
	,clear: function() {
		this.group.clear();
	}
	,kill: function() {
		flixel_FlxSprite.prototype.kill.call(this);
		this.group.kill();
	}
	,revive: function() {
		flixel_FlxSprite.prototype.revive.call(this);
		this.group.revive();
	}
	,reset: function(X,Y) {
		this.revive();
		this.setPosition(X,Y);
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var sprite = _g1[_g];
			++_g;
			if(sprite != null) {
				sprite.reset(X,Y);
			}
		}
	}
	,setPosition: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.multiTransformChildren_Float([$bind(this,this.xTransform),$bind(this,this.yTransform)],[X - this.x,Y - this.y]);
		this._skipTransformChildren = true;
		this.set_x(X);
		this.set_y(Y);
		this._skipTransformChildren = false;
	}
	,set_cameras: function(Value) {
		if(this.get_cameras() != Value) {
			this.transformChildren_Array_flixel_FlxCamera($bind(this,this.camerasTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_cameras.call(this,Value);
	}
	,set_exists: function(Value) {
		if(this.exists != Value) {
			this.transformChildren_Bool($bind(this,this.existsTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_exists.call(this,Value);
	}
	,set_visible: function(Value) {
		if(this.exists && this.visible != Value) {
			this.transformChildren_Bool($bind(this,this.visibleTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_visible.call(this,Value);
	}
	,set_active: function(Value) {
		if(this.exists && this.active != Value) {
			this.transformChildren_Bool($bind(this,this.activeTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_active.call(this,Value);
	}
	,set_alive: function(Value) {
		if(this.alive != Value) {
			this.transformChildren_Bool($bind(this,this.aliveTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_alive.call(this,Value);
	}
	,set_x: function(Value) {
		if(!this._skipTransformChildren && this.exists && this.x != Value) {
			this.transformChildren_Float($bind(this,this.xTransform),Value - this.x);
		}
		return this.x = Value;
	}
	,set_y: function(Value) {
		if(!this._skipTransformChildren && this.exists && this.y != Value) {
			this.transformChildren_Float($bind(this,this.yTransform),Value - this.y);
		}
		return this.y = Value;
	}
	,set_angle: function(Value) {
		if(this.exists && this.angle != Value) {
			this.transformChildren_Float($bind(this,this.angleTransform),Value - this.angle);
		}
		return this.angle = Value;
	}
	,set_alpha: function(Value) {
		var lowerBound = Value < 0 ? 0 : Value;
		if(lowerBound > 1) {
			Value = 1;
		} else {
			Value = lowerBound;
		}
		if(this.exists && this.alpha != Value) {
			this.transformChildren_Float($bind(this,this.alphaTransform),this.alpha > 0 ? Value / this.alpha : 0);
		}
		return this.alpha = Value;
	}
	,set_facing: function(Value) {
		if(this.exists && this.facing != Value) {
			this.transformChildren_Int($bind(this,this.facingTransform),Value);
		}
		return this.facing = Value;
	}
	,set_flipX: function(Value) {
		if(this.exists && this.flipX != Value) {
			this.transformChildren_Bool($bind(this,this.flipXTransform),Value);
		}
		return this.flipX = Value;
	}
	,set_flipY: function(Value) {
		if(this.exists && this.flipY != Value) {
			this.transformChildren_Bool($bind(this,this.flipYTransform),Value);
		}
		return this.flipY = Value;
	}
	,set_moves: function(Value) {
		if(this.exists && this.moves != Value) {
			this.transformChildren_Bool($bind(this,this.movesTransform),Value);
		}
		return this.moves = Value;
	}
	,set_immovable: function(Value) {
		if(this.exists && this.immovable != Value) {
			this.transformChildren_Bool($bind(this,this.immovableTransform),Value);
		}
		return this.immovable = Value;
	}
	,set_solid: function(Value) {
		if(this.exists && (this.allowCollisions & 4369) > 0 != Value) {
			this.transformChildren_Bool($bind(this,this.solidTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_solid.call(this,Value);
	}
	,set_color: function(Value) {
		if(this.exists && this.color != Value) {
			this.transformChildren_Int($bind(this,this.gColorTransform),Value);
		}
		return this.color = Value;
	}
	,set_blend: function(Value) {
		if(this.exists && this.blend != Value) {
			this.transformChildren_openfl_display_BlendMode($bind(this,this.blendTransform),Value);
		}
		return this.blend = Value;
	}
	,set_pixelPerfectRender: function(Value) {
		if(this.exists && this.pixelPerfectRender != Value) {
			this.transformChildren_Bool($bind(this,this.pixelPerfectTransform),Value);
		}
		return flixel_FlxSprite.prototype.set_pixelPerfectRender.call(this,Value);
	}
	,set_width: function(Value) {
		return Value;
	}
	,get_width: function() {
		if(this.group.length == 0) {
			return 0;
		}
		var minX = Infinity;
		var maxX = -Infinity;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var member = _g1[_g];
			++_g;
			if(member == null) {
				continue;
			}
			var minMemberX = member.x;
			var maxMemberX = minMemberX + member.get_width();
			if(maxMemberX > maxX) {
				maxX = maxMemberX;
			}
			if(minMemberX < minX) {
				minX = minMemberX;
			}
		}
		return maxX - minX;
	}
	,set_height: function(Value) {
		return Value;
	}
	,get_height: function() {
		if(this.group.length == 0) {
			return 0;
		}
		var minY = Infinity;
		var maxY = -Infinity;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var member = _g1[_g];
			++_g;
			if(member == null) {
				continue;
			}
			var minMemberY = member.y;
			var maxMemberY = minMemberY + member.get_height();
			if(maxMemberY > maxY) {
				maxY = maxMemberY;
			}
			if(minMemberY < minY) {
				minY = minMemberY;
			}
		}
		return maxY - minY;
	}
	,get_length: function() {
		return this.group.length;
	}
	,get_maxSize: function() {
		return this.group.maxSize;
	}
	,set_maxSize: function(Size) {
		return this.group.set_maxSize(Size);
	}
	,get_members: function() {
		return this.group.members;
	}
	,xTransform: function(Sprite,X) {
		Sprite.set_x(Sprite.x + X);
	}
	,yTransform: function(Sprite,Y) {
		Sprite.set_y(Sprite.y + Y);
	}
	,angleTransform: function(Sprite,Angle) {
		Sprite.set_angle(Sprite.angle + Angle);
	}
	,alphaTransform: function(Sprite,Alpha) {
		Sprite.set_alpha(Sprite.alpha * Alpha);
	}
	,facingTransform: function(Sprite,Facing) {
		Sprite.set_facing(Facing);
	}
	,flipXTransform: function(Sprite,FlipX) {
		Sprite.set_flipX(FlipX);
	}
	,flipYTransform: function(Sprite,FlipY) {
		Sprite.set_flipY(FlipY);
	}
	,movesTransform: function(Sprite,Moves) {
		Sprite.set_moves(Moves);
	}
	,pixelPerfectTransform: function(Sprite,PixelPerfect) {
		Sprite.set_pixelPerfectRender(PixelPerfect);
	}
	,gColorTransform: function(Sprite,Color) {
		Sprite.set_color(Color);
	}
	,blendTransform: function(Sprite,Blend) {
		Sprite.set_blend(Blend);
	}
	,immovableTransform: function(Sprite,Immovable) {
		Sprite.set_immovable(Immovable);
	}
	,visibleTransform: function(Sprite,Visible) {
		Sprite.set_visible(Visible);
	}
	,activeTransform: function(Sprite,Active) {
		Sprite.set_active(Active);
	}
	,solidTransform: function(Sprite,Solid) {
		Sprite.set_solid(Solid);
	}
	,aliveTransform: function(Sprite,Alive) {
		Sprite.set_alive(Alive);
	}
	,existsTransform: function(Sprite,Exists) {
		Sprite.set_exists(Exists);
	}
	,camerasTransform: function(Sprite,Cameras) {
		Sprite.set_cameras(Cameras);
	}
	,offsetTransform: function(Sprite,Offset) {
		var _this = Sprite.offset;
		_this.set_x(Offset.x);
		_this.set_y(Offset.y);
		if(Offset._weak) {
			Offset.put();
		}
	}
	,originTransform: function(Sprite,Origin) {
		var _this = Sprite.origin;
		_this.set_x(Origin.x);
		_this.set_y(Origin.y);
		if(Origin._weak) {
			Origin.put();
		}
	}
	,scaleTransform: function(Sprite,Scale) {
		var _this = Sprite.scale;
		_this.set_x(Scale.x);
		_this.set_y(Scale.y);
		if(Scale._weak) {
			Scale.put();
		}
	}
	,scrollFactorTransform: function(Sprite,ScrollFactor) {
		var _this = Sprite.scrollFactor;
		_this.set_x(ScrollFactor.x);
		_this.set_y(ScrollFactor.y);
		if(ScrollFactor._weak) {
			ScrollFactor.put();
		}
	}
	,offsetCallback: function(Offset) {
		this.transformChildren_flixel_math_FlxPoint($bind(this,this.offsetTransform),Offset);
	}
	,originCallback: function(Origin) {
		this.transformChildren_flixel_math_FlxPoint($bind(this,this.originTransform),Origin);
	}
	,scaleCallback: function(Scale) {
		this.transformChildren_flixel_math_FlxPoint($bind(this,this.scaleTransform),Scale);
	}
	,scrollFactorCallback: function(ScrollFactor) {
		this.transformChildren_flixel_math_FlxPoint($bind(this,this.scrollFactorTransform),ScrollFactor);
	}
	,loadGraphicFromSprite: function(Sprite) {
		return this;
	}
	,loadGraphic: function(Graphic,Animated,Width,Height,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Animated == null) {
			Animated = false;
		}
		return this;
	}
	,loadRotatedGraphic: function(Graphic,Rotations,Frame,AntiAliasing,AutoBuffer,Key) {
		if(AutoBuffer == null) {
			AutoBuffer = false;
		}
		if(AntiAliasing == null) {
			AntiAliasing = false;
		}
		if(Frame == null) {
			Frame = -1;
		}
		if(Rotations == null) {
			Rotations = 16;
		}
		return this;
	}
	,makeGraphic: function(Width,Height,Color,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Color == null) {
			Color = -1;
		}
		return this;
	}
	,set_pixels: function(Value) {
		return Value;
	}
	,set_frame: function(Value) {
		return Value;
	}
	,get_pixels: function() {
		return null;
	}
	,calcFrame: function(RunOnCpp) {
		if(RunOnCpp == null) {
			RunOnCpp = false;
		}
	}
	,resetHelpers: function() {
	}
	,stamp: function(Brush,X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
	}
	,set_frames: function(Frames) {
		return Frames;
	}
	,updateColorTransform: function() {
	}
	,__class__: flixel_group_FlxTypedSpriteGroup
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{set_maxSize:"set_maxSize",get_maxSize:"get_maxSize",get_length:"get_length",get_members:"get_members"})
});
var HealthIndicator = function(player) {
	flixel_group_FlxTypedSpriteGroup.call(this);
	this.player = player;
	this.lastHealth = player.health;
	this.text = new flixel_text_FlxText(32,10,100,Std.string(this.lastHealth));
	this.add(this.text);
	this.icon = new AnimatedSprite("assets/images/health.json");
	this.add(this.icon);
};
$hxClasses["HealthIndicator"] = HealthIndicator;
HealthIndicator.__name__ = ["HealthIndicator"];
HealthIndicator.__super__ = flixel_group_FlxTypedSpriteGroup;
HealthIndicator.prototype = $extend(flixel_group_FlxTypedSpriteGroup.prototype,{
	update: function(elapsed) {
		if(this.player.health != this.lastHealth) {
			this.lastHealth = this.player.health;
			this.text.set_text(Std.string(this.lastHealth));
			this.icon.SetAnimation("beep",true);
		} else if(this.player.health == 1) {
			this.icon.SetAnimation("pulse");
		} else {
			var curAnim = this.icon.animation._curAnim;
			if(curAnim != null && curAnim.name == "pulse") {
				this.icon.SetAnimation("idle");
			}
		}
		flixel_group_FlxTypedSpriteGroup.prototype.update.call(this,elapsed);
	}
	,__class__: HealthIndicator
});
var HxOverrides = function() { };
$hxClasses["HxOverrides"] = HxOverrides;
HxOverrides.__name__ = ["HxOverrides"];
HxOverrides.strDate = function(s) {
	var _g = s.length;
	switch(_g) {
	case 8:
		var k = s.split(":");
		var d = new Date();
		d["setTime"](0);
		d["setUTCHours"](k[0]);
		d["setUTCMinutes"](k[1]);
		d["setUTCSeconds"](k[2]);
		return d;
	case 10:
		var k1 = s.split("-");
		return new Date(k1[0],k1[1] - 1,k1[2],0,0,0);
	case 19:
		var k2 = s.split(" ");
		var y = k2[0].split("-");
		var t = k2[1].split(":");
		return new Date(y[0],y[1] - 1,y[2],t[0],t[1],t[2]);
	default:
		throw new js__$Boot_HaxeError("Invalid date format : " + s);
	}
};
HxOverrides.cca = function(s,index) {
	var x = s.charCodeAt(index);
	if(x != x) {
		return undefined;
	}
	return x;
};
HxOverrides.substr = function(s,pos,len) {
	if(len == null) {
		len = s.length;
	} else if(len < 0) {
		if(pos == 0) {
			len = s.length + len;
		} else {
			return "";
		}
	}
	return s.substr(pos,len);
};
HxOverrides.remove = function(a,obj) {
	var i = a.indexOf(obj);
	if(i == -1) {
		return false;
	}
	a.splice(i,1);
	return true;
};
HxOverrides.iter = function(a) {
	return { cur : 0, arr : a, hasNext : function() {
		return this.cur < this.arr.length;
	}, next : function() {
		return this.arr[this.cur++];
	}};
};
var IntIterator = function(min,max) {
	this.min = min;
	this.max = max;
};
$hxClasses["IntIterator"] = IntIterator;
IntIterator.__name__ = ["IntIterator"];
IntIterator.prototype = {
	hasNext: function() {
		return this.min < this.max;
	}
	,next: function() {
		return this.min++;
	}
	,__class__: IntIterator
};
var IntPoint = function(x,y) {
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.x = x;
	this.y = y;
};
$hxClasses["IntPoint"] = IntPoint;
IntPoint.__name__ = ["IntPoint"];
IntPoint.prototype = {
	add: function(b) {
		this.x += b.x;
		this.y += b.y;
	}
	,set: function(x,y) {
		this.x = x;
		this.y = y;
	}
	,__class__: IntPoint
};
var Lambda = function() { };
$hxClasses["Lambda"] = Lambda;
Lambda.__name__ = ["Lambda"];
Lambda.array = function(it) {
	var a = [];
	var i = $iterator(it)();
	while(i.hasNext()) a.push(i.next());
	return a;
};
var LevelInfo = function() { };
$hxClasses["LevelInfo"] = LevelInfo;
LevelInfo.__name__ = ["LevelInfo"];
LevelInfo.next = function(current) {
	var _g1 = 0;
	var _g = LevelInfo.levels.length - 1;
	while(_g1 < _g) {
		var i = _g1++;
		if(LevelInfo.levels[i] == current) {
			return LevelInfo.levels[i + 1];
		}
	}
	return null;
};
var LevelSelector = function(_solved,continueLevels) {
	if(continueLevels == null) {
		continueLevels = false;
	}
	if(_solved == null) {
		_solved = 0;
	}
	this.levelSolved = _solved;
	this.continueLevels = continueLevels;
	flixel_FlxState.call(this);
};
$hxClasses["LevelSelector"] = LevelSelector;
LevelSelector.__name__ = ["LevelSelector"];
LevelSelector.__super__ = flixel_FlxState;
LevelSelector.prototype = $extend(flixel_FlxState.prototype,{
	create: function() {
		flixel_FlxG.mouse.set_visible(true);
		var btnBack = new flixel_ui_FlxButton(flixel_FlxG.width / 2,10,"Back",function() {
			var nextState = new MenuState();
			if(flixel_FlxG.game._state.switchTo(nextState)) {
				flixel_FlxG.game._requestedState = nextState;
			}
		});
		this.add(btnBack);
		btnBack.set_x(btnBack.x - btnBack.get_width() / 2);
		var btnResetProgress = new flixel_ui_FlxButton(flixel_FlxG.width / 2,40,"Reset progress",$bind(this,this.resetProgress));
		this.add(btnResetProgress);
		btnResetProgress.set_x(btnResetProgress.x - btnResetProgress.get_width() / 2);
		var continueText = new flixel_text_FlxText(flixel_FlxG.width / 2 - 100,60,200,"Pres space to continue");
		continueText.set_alignment("center");
		this.add(continueText);
		this.updateProgress();
		var cnt = LevelInfo.levels.length;
		var btnPerLine = Math.floor((flixel_FlxG.width - 40) / 30);
		var _g1 = 0;
		while(_g1 < cnt) {
			var i = [_g1++];
			var locked = i[0] > this.levelSolved;
			var btn = new flixel_addons_ui_FlxUIButton(20 + 30 * (i[0] % btnPerLine),80 + Math.floor(i[0] / btnPerLine) * 30,Std.string(i[0] + 1),!locked ? (function(i1) {
				return function() {
					var nextState1 = new GameState("assets/levels/" + LevelInfo.levels[i1[0]],new LongTermState(),(function(i2) {
						return function(result) {
							var nextState2 = new LevelSelector(result ? i2[0] + 1 : 0,true);
							if(flixel_FlxG.game._state.switchTo(nextState2)) {
								flixel_FlxG.game._requestedState = nextState2;
							}
						};
					})(i1));
					if(flixel_FlxG.game._state.switchTo(nextState1)) {
						flixel_FlxG.game._requestedState = nextState1;
					}
				};
			})(i) : null);
			btn.resize(20,20);
			if(locked) {
				btn.set_color(-65536);
			}
			this.add(btn);
		}
		flixel_FlxState.prototype.create.call(this);
	}
	,update: function(elapsed) {
		var _gthis = this;
		var tmp;
		var _this = flixel_FlxG.keys.pressed;
		if(!_this.keyManager.checkStatus(32,_this.status)) {
			tmp = this.continueLevels;
		} else {
			tmp = true;
		}
		if(tmp) {
			if(this.levelSolved < LevelInfo.levels.length) {
				var nextState = new GameState("assets/levels/" + LevelInfo.levels[this.levelSolved],new LongTermState(),function(result) {
					var levelCnt = result ? _gthis.levelSolved + 1 : 0;
					new LevelSelector(levelCnt);
					var nextState1 = new LevelSelector(levelCnt,true);
					if(flixel_FlxG.game._state.switchTo(nextState1)) {
						flixel_FlxG.game._requestedState = nextState1;
					}
				});
				if(flixel_FlxG.game._state.switchTo(nextState)) {
					flixel_FlxG.game._requestedState = nextState;
				}
			}
		}
		flixel_FlxState.prototype.update.call(this,elapsed);
	}
	,getSavedProgress: function() {
		var save = new flixel_util_FlxSave();
		save.bind("DS_S_1");
		if(save.data.progress != null) {
			return save.data.progress | 0;
		}
		return 0;
	}
	,updateProgress: function() {
		var oldProgress = this.getSavedProgress();
		if(oldProgress > this.levelSolved) {
			this.levelSolved = oldProgress;
		}
		var save = new flixel_util_FlxSave();
		save.bind("DS_S_1");
		save.data.progress = this.levelSolved;
		save.flush();
	}
	,resetProgress: function() {
		var save = new flixel_util_FlxSave();
		save.bind("DS_S_1");
		save.erase();
		var nextState = new LevelSelector();
		if(flixel_FlxG.game._state.switchTo(nextState)) {
			flixel_FlxG.game._requestedState = nextState;
		}
	}
	,__class__: LevelSelector
});
var List = function() {
	this.length = 0;
};
$hxClasses["List"] = List;
List.__name__ = ["List"];
List.prototype = {
	add: function(item) {
		var x = new _$List_ListNode(item,null);
		if(this.h == null) {
			this.h = x;
		} else {
			this.q.next = x;
		}
		this.q = x;
		this.length++;
	}
	,pop: function() {
		if(this.h == null) {
			return null;
		}
		var x = this.h.item;
		this.h = this.h.next;
		if(this.h == null) {
			this.q = null;
		}
		this.length--;
		return x;
	}
	,iterator: function() {
		return new _$List_ListIterator(this.h);
	}
	,__class__: List
};
var _$List_ListNode = function(item,next) {
	this.item = item;
	this.next = next;
};
$hxClasses["_List.ListNode"] = _$List_ListNode;
_$List_ListNode.__name__ = ["_List","ListNode"];
_$List_ListNode.prototype = {
	__class__: _$List_ListNode
};
var _$List_ListIterator = function(head) {
	this.head = head;
};
$hxClasses["_List.ListIterator"] = _$List_ListIterator;
_$List_ListIterator.__name__ = ["_List","ListIterator"];
_$List_ListIterator.prototype = {
	hasNext: function() {
		return this.head != null;
	}
	,next: function() {
		var val = this.head.item;
		this.head = this.head.next;
		return val;
	}
	,__class__: _$List_ListIterator
};
var LongTermState = function() {
	this.score = 0;
};
$hxClasses["LongTermState"] = LongTermState;
LongTermState.__name__ = ["LongTermState"];
LongTermState.prototype = {
	copy: function() {
		var result = new LongTermState();
		result.score = this.score;
		return result;
	}
	,__class__: LongTermState
};
var MapType = $hxClasses["MapType"] = { __ename__ : ["MapType"], __constructs__ : ["Empty","Sand","Water","Block","Object"] };
MapType.Empty = ["Empty",0];
MapType.Empty.toString = $estr;
MapType.Empty.__enum__ = MapType;
MapType.Sand = ["Sand",1];
MapType.Sand.toString = $estr;
MapType.Sand.__enum__ = MapType;
MapType.Water = ["Water",2];
MapType.Water.toString = $estr;
MapType.Water.__enum__ = MapType;
MapType.Block = ["Block",3];
MapType.Block.toString = $estr;
MapType.Block.__enum__ = MapType;
MapType.Object = ["Object",4];
MapType.Object.toString = $estr;
MapType.Object.__enum__ = MapType;
Math.__name__ = ["Math"];
var MenuState = function(MaxSize) {
	flixel_FlxState.call(this,MaxSize);
};
$hxClasses["MenuState"] = MenuState;
MenuState.__name__ = ["MenuState"];
MenuState.__super__ = flixel_FlxState;
MenuState.prototype = $extend(flixel_FlxState.prototype,{
	create: function() {
		var _gthis = this;
		flixel_FlxG.mouse.set_visible(true);
		var t1 = new flixel_text_FlxText(flixel_FlxG.width / 2,10,200,"Raft | Global Game Jam 2017");
		t1.set_x(t1.x - t1.get_width() / 2);
		this.add(t1);
		var b1 = new flixel_ui_FlxButton(flixel_FlxG.width / 2,50,"Start",function() {
			_gthis.newGame();
		});
		b1.set_x(b1.x - b1.get_width() / 2);
		this.add(b1);
		this.add(new flixel_text_FlxText(10,110,flixel_FlxG.width - 20,"Controls: \n Arrows - move(with delay) \n R - restart \n Alt+Enter - fullscreen(Desktop) \n 0/+/- - Control sound\n \n\n Created by : Karlis \n"));
	}
	,newGame: function() {
		var nextState = new LevelSelector();
		if(flixel_FlxG.game._state.switchTo(nextState)) {
			flixel_FlxG.game._requestedState = nextState;
		}
	}
	,__class__: MenuState
});
var Move = function(type) {
	this.type = type;
	this.bonus = 0;
};
$hxClasses["Move"] = Move;
Move.__name__ = ["Move"];
Move.prototype = {
	__class__: Move
};
var MoveQueue = function() { };
$hxClasses["MoveQueue"] = MoveQueue;
MoveQueue.__name__ = ["MoveQueue"];
MoveQueue.prototype = {
	__class__: MoveQueue
	,__properties__: {get_moveCount:"get_moveCount"}
};
var MoveType = $hxClasses["MoveType"] = { __ename__ : ["MoveType"], __constructs__ : ["Blank","Up","Right","Down","Left"] };
MoveType.Blank = ["Blank",0];
MoveType.Blank.toString = $estr;
MoveType.Blank.__enum__ = MoveType;
MoveType.Up = ["Up",1];
MoveType.Up.toString = $estr;
MoveType.Up.__enum__ = MoveType;
MoveType.Right = ["Right",2];
MoveType.Right.toString = $estr;
MoveType.Right.__enum__ = MoveType;
MoveType.Down = ["Down",3];
MoveType.Down.toString = $estr;
MoveType.Down.__enum__ = MoveType;
MoveType.Left = ["Left",4];
MoveType.Left.toString = $estr;
MoveType.Left.__enum__ = MoveType;
var NMEPreloader = function() {
	openfl_display_Sprite.call(this);
	var backgroundColor = this.getBackgroundColor();
	var color = 0;
	if(0.299 * (backgroundColor >> 16 & 255) + 0.587 * (backgroundColor >> 8 & 255) + 0.114 * (backgroundColor & 255) < 70) {
		color = 16777215;
	}
	var y = this.getHeight() / 2 - 3.5;
	var width = this.getWidth() - 60;
	this.outline = new openfl_display_Sprite();
	this.outline.get_graphics().beginFill(color,0.07);
	this.outline.get_graphics().drawRect(0,0,width,7);
	this.outline.set_x(30);
	this.outline.set_y(y);
	this.addChild(this.outline);
	this.progress = new openfl_display_Sprite();
	this.progress.get_graphics().beginFill(color,0.35);
	this.progress.get_graphics().drawRect(0,0,width - 4,3);
	this.progress.set_x(32);
	this.progress.set_y(y + 2);
	this.progress.set_scaleX(0);
	this.addChild(this.progress);
};
$hxClasses["NMEPreloader"] = NMEPreloader;
NMEPreloader.__name__ = ["NMEPreloader"];
NMEPreloader.__super__ = openfl_display_Sprite;
NMEPreloader.prototype = $extend(openfl_display_Sprite.prototype,{
	getBackgroundColor: function() {
		return 0;
	}
	,getHeight: function() {
		return 480;
	}
	,getWidth: function() {
		return 800;
	}
	,onInit: function() {
	}
	,onLoaded: function() {
		this.dispatchEvent(new openfl_events_Event("complete"));
	}
	,onUpdate: function(bytesLoaded,bytesTotal) {
		var percentLoaded = bytesLoaded / bytesTotal;
		if(percentLoaded > 1) {
			percentLoaded = 1;
		}
		this.progress.set_scaleX(percentLoaded);
	}
	,__class__: NMEPreloader
});
var Player = function(world) {
	Character.call(this,"assets/images/player.json");
	this.world = world;
	this.health = 5;
	this.loadSound();
};
$hxClasses["Player"] = Player;
Player.__name__ = ["Player"];
Player.__super__ = Character;
Player.prototype = $extend(Character.prototype,{
	loadSound: function() {
		this.waterSound = flixel_FlxG.sound.load("assets/sounds/water.ogg");
		this.tickSound = flixel_FlxG.sound.load("assets/sounds/step.ogg",0.4);
		this.dirSounds = [];
		var _g = 0;
		while(_g < 4) {
			var dir = _g++;
			var dirSound = [];
			this.dirSounds.push(dirSound);
			var _g1 = 0;
			while(_g1 < 5) {
				var i = _g1++;
				var bonusSounds = [];
				dirSound.push(bonusSounds);
				var _g2 = 0;
				while(_g2 < 4) bonusSounds.push(flixel_FlxG.sound.load("assets/sounds/m/sound_" + dir + "_" + i + "_" + _g2++ + ".ogg"));
			}
		}
	}
	,step: function(move) {
		var TX = this.PX;
		var TY = this.PY;
		var dir = 0;
		var hasMove = true;
		switch(move.type[1]) {
		case 0:
			hasMove = false;
			this.fail();
			break;
		case 1:
			--TY;
			dir = 0;
			break;
		case 2:
			++TX;
			dir = 1;
			break;
		case 3:
			++TY;
			dir = 2;
			break;
		case 4:
			--TX;
			dir = 3;
			break;
		}
		if(hasMove) {
			this.set_angle(dir * 90);
		}
		var canMove = true;
		if(TX < 0 || TY < 0 || TX >= this.world.W || TY >= this.world.H) {
			return;
		} else {
			var obj = this.world.GetObject(TX,TY);
			if(obj != null) {
				if(obj == "raft") {
					this.world.onWin();
				}
			}
			if(this.world.IsWater(TX,TY)) {
				canMove = false;
				this.SetAnimation("back");
				this.world.moves.flush();
				this.waterSound.play(true);
				this.hurt(1);
			}
		}
		if(canMove && hasMove) {
			this.PX = TX;
			this.PY = TY;
			var sound_id = move.bonus / 2 | 0;
			var sounds = this.dirSounds[dir][sound_id < 5 ? sound_id : 4];
			sounds[Std.random(sounds.length)].play();
			if(move.bonus >= 6 && this.health < 5) {
				this.health = Math.min(this.health + 1,5);
			}
		}
	}
	,kill: function() {
		this.world.loose();
		Character.prototype.kill.call(this);
	}
	,fail: function() {
		this.tickSound.play();
	}
	,update: function(elapsed) {
		Character.prototype.update.call(this,elapsed);
	}
	,__class__: Player
});
var Queue1 = function(rules) {
	this.rules = rules;
	this.queue = [];
};
$hxClasses["Queue1"] = Queue1;
Queue1.__name__ = ["Queue1"];
Queue1.__interfaces__ = [MoveQueue];
Queue1.prototype = {
	flush: function() {
		this.queue = [];
	}
	,pop: function() {
		var result = this.queue.shift();
		if(result == null) {
			return new Move(MoveType.Blank);
		}
		return result;
	}
	,get_moveCount: function() {
		return this.queue.length;
	}
	,getMove: function(i) {
		if(i < this.queue.length) {
			return this.queue[i];
		}
		return new Move(MoveType.Blank);
	}
	,push: function(type) {
		var fill = false;
		while(this.queue.length < this.rules.delay) {
			fill = true;
			this.queue.push(new Move(MoveType.Blank));
		}
		var move = new Move(type);
		if(!fill) {
			var i = this.queue.length - 1;
			while(i >= 0 && this.queue[i].type != MoveType.Blank) {
				--i;
				move.bonus++;
			}
		}
		this.queue.push(move);
	}
	,__class__: Queue1
	,__properties__: {get_moveCount:"get_moveCount"}
};
var QueueIndicator = function(queue) {
	this.arrowOffset = 0;
	flixel_group_FlxTypedSpriteGroup.call(this);
	this.queue = queue;
	this.arrowTiles = [];
	var tmpSprite = new flixel_FlxSprite();
	tmpSprite.loadGraphic("assets/images/arrows.png",true,32,32);
	var _g = 0;
	while(_g < 20) {
		++_g;
		var sprite = new flixel_FlxSprite();
		sprite.loadGraphicFromSprite(tmpSprite);
		this.arrowTiles.push(sprite);
		this.add(sprite);
	}
};
$hxClasses["QueueIndicator"] = QueueIndicator;
QueueIndicator.__name__ = ["QueueIndicator"];
QueueIndicator.__super__ = flixel_group_FlxTypedSpriteGroup;
QueueIndicator.prototype = $extend(flixel_group_FlxTypedSpriteGroup.prototype,{
	refresh: function(offset) {
		this.arrowOffset = offset * 32;
	}
	,update: function(elapsed) {
		var _g = 0;
		while(_g < 20) {
			var i = _g++;
			var sprite = this.arrowTiles[i];
			if(i < this.queue.get_moveCount()) {
				var move = this.queue.getMove(i);
				var moveId;
				switch(move.type[1]) {
				case 0:
					moveId = 0;
					break;
				case 1:
					moveId = 1;
					break;
				case 2:
					moveId = 2;
					break;
				case 3:
					moveId = 3;
					break;
				case 4:
					moveId = 4;
					break;
				}
				var bonus = move.bonus;
				sprite.set_x(i * 32 + this.arrowOffset);
				sprite.set_y(0);
				sprite.set_frame(sprite.frames.frames[moveId + 10 * (bonus < 5 ? bonus : 4)]);
				if(bonus >= 5) {
					var k = Math.min(bonus - 5.0,6);
					sprite.set_x(sprite.x + (Math.random() - 0.5) * k);
					sprite.set_y(sprite.y + (Math.random() - 0.5) * k);
				}
				sprite.set_visible(true);
			} else {
				sprite.set_x(i * 32 + this.arrowOffset);
				sprite.set_y(0);
				sprite.set_frame(sprite.frames.frames[0]);
				sprite.set_visible(false);
			}
		}
		flixel_group_FlxTypedSpriteGroup.prototype.update.call(this,elapsed);
	}
	,__class__: QueueIndicator
});
var Reflect = function() { };
$hxClasses["Reflect"] = Reflect;
Reflect.__name__ = ["Reflect"];
Reflect.field = function(o,field) {
	try {
		return o[field];
	} catch( e ) {
		haxe_CallStack.lastException = e;
		return null;
	}
};
Reflect.fields = function(o) {
	var a = [];
	if(o != null) {
		var hasOwnProperty = Object.prototype.hasOwnProperty;
		for( var f in o ) {
		if(f != "__id__" && f != "hx__closures__" && hasOwnProperty.call(o,f)) {
			a.push(f);
		}
		}
	}
	return a;
};
Reflect.isFunction = function(f) {
	if(typeof(f) == "function") {
		return !(f.__name__ || f.__ename__);
	} else {
		return false;
	}
};
Reflect.compare = function(a,b) {
	if(a == b) {
		return 0;
	} else if(a > b) {
		return 1;
	} else {
		return -1;
	}
};
Reflect.compareMethods = function(f1,f2) {
	if(f1 == f2) {
		return true;
	}
	if(!Reflect.isFunction(f1) || !Reflect.isFunction(f2)) {
		return false;
	}
	if(f1.scope == f2.scope && f1.method == f2.method) {
		return f1.method != null;
	} else {
		return false;
	}
};
Reflect.isObject = function(v) {
	if(v == null) {
		return false;
	}
	var t = typeof(v);
	if(!(t == "string" || t == "object" && v.__enum__ == null)) {
		if(t == "function") {
			return (v.__name__ || v.__ename__) != null;
		} else {
			return false;
		}
	} else {
		return true;
	}
};
Reflect.isEnumValue = function(v) {
	if(v != null) {
		return v.__enum__ != null;
	} else {
		return false;
	}
};
Reflect.deleteField = function(o,field) {
	if(!Object.prototype.hasOwnProperty.call(o,field)) {
		return false;
	}
	delete(o[field]);
	return true;
};
Reflect.makeVarArgs = function(f) {
	return function() {
		var a = Array.prototype.slice.call(arguments);
		return f(a);
	};
};
var Std = function() { };
$hxClasses["Std"] = Std;
Std.__name__ = ["Std"];
Std.string = function(s) {
	return js_Boot.__string_rec(s,"");
};
Std.parseInt = function(x) {
	var v = parseInt(x,10);
	if(v == 0 && (HxOverrides.cca(x,1) == 120 || HxOverrides.cca(x,1) == 88)) {
		v = parseInt(x);
	}
	if(isNaN(v)) {
		return null;
	}
	return v;
};
Std.random = function(x) {
	if(x <= 0) {
		return 0;
	} else {
		return Math.floor(Math.random() * x);
	}
};
var StringBuf = function() {
	this.b = "";
};
$hxClasses["StringBuf"] = StringBuf;
StringBuf.__name__ = ["StringBuf"];
StringBuf.prototype = {
	__class__: StringBuf
};
var StringTools = function() { };
$hxClasses["StringTools"] = StringTools;
StringTools.__name__ = ["StringTools"];
StringTools.htmlEscape = function(s,quotes) {
	s = s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
	if(quotes) {
		return s.split("\"").join("&quot;").split("'").join("&#039;");
	} else {
		return s;
	}
};
StringTools.startsWith = function(s,start) {
	if(s.length >= start.length) {
		return HxOverrides.substr(s,0,start.length) == start;
	} else {
		return false;
	}
};
StringTools.endsWith = function(s,end) {
	var elen = end.length;
	var slen = s.length;
	if(slen >= elen) {
		return HxOverrides.substr(s,slen - elen,elen) == end;
	} else {
		return false;
	}
};
StringTools.isSpace = function(s,pos) {
	var c = HxOverrides.cca(s,pos);
	if(!(c > 8 && c < 14)) {
		return c == 32;
	} else {
		return true;
	}
};
StringTools.ltrim = function(s) {
	var l = s.length;
	var r = 0;
	while(r < l && StringTools.isSpace(s,r)) ++r;
	if(r > 0) {
		return HxOverrides.substr(s,r,l - r);
	} else {
		return s;
	}
};
StringTools.rtrim = function(s) {
	var l = s.length;
	var r = 0;
	while(r < l && StringTools.isSpace(s,l - r - 1)) ++r;
	if(r > 0) {
		return HxOverrides.substr(s,0,l - r);
	} else {
		return s;
	}
};
StringTools.trim = function(s) {
	return StringTools.ltrim(StringTools.rtrim(s));
};
StringTools.replace = function(s,sub,by) {
	return s.split(sub).join(by);
};
StringTools.hex = function(n,digits) {
	var s = "";
	while(true) {
		s = "0123456789ABCDEF".charAt(n & 15) + s;
		n >>>= 4;
		if(!(n > 0)) {
			break;
		}
	}
	if(digits != null) {
		while(s.length < digits) s = "0" + s;
	}
	return s;
};
var flixel_addons_editors_tiled_TiledMap = function(data,rootPath) {
	if(rootPath == null) {
		rootPath = "";
	}
	this.rootPath = "";
	this.layerMap = new haxe_ds_StringMap();
	this.noLoadHash = new haxe_ds_StringMap();
	this.layers = [];
	this.tilesetArray = [];
	this.tilesets = new haxe_ds_StringMap();
	this.properties = new flixel_addons_editors_tiled_TiledPropertySet();
	var source = null;
	this.rootPath = rootPath;
	if(typeof(data) == "string") {
		source = new haxe_xml_Fast(Xml.parse(openfl_Assets.getText(data)));
	} else if(js_Boot.__instanceof(data,Xml)) {
		source = new haxe_xml_Fast(data);
	}
	source = source.node.resolve("map");
	this.loadAttributes(source);
	this.loadProperties(source);
	this.loadTilesets(source);
	this.loadLayers(source);
};
$hxClasses["flixel.addons.editors.tiled.TiledMap"] = flixel_addons_editors_tiled_TiledMap;
flixel_addons_editors_tiled_TiledMap.__name__ = ["flixel","addons","editors","tiled","TiledMap"];
flixel_addons_editors_tiled_TiledMap.prototype = {
	loadAttributes: function(source) {
		this.version = source.att.resolve("version") != null ? source.att.resolve("version") : "unknown";
		this.orientation = source.att.resolve("orientation") != null ? source.att.resolve("orientation") : "orthogonal";
		this.backgroundColor = source.has.resolve("backgroundcolor") && source.att.resolve("backgroundcolor") != null ? flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(source.att.resolve("backgroundcolor")) : 0;
		this.width = Std.parseInt(source.att.resolve("width"));
		this.height = Std.parseInt(source.att.resolve("height"));
		this.tileWidth = Std.parseInt(source.att.resolve("tilewidth"));
		this.tileHeight = Std.parseInt(source.att.resolve("tileheight"));
		this.fullWidth = this.width * this.tileWidth;
		this.fullHeight = this.height * this.tileHeight;
	}
	,loadProperties: function(source) {
		var _g_head = source.nodes.resolve("properties").h;
		while(_g_head != null) {
			var val = _g_head.item;
			_g_head = _g_head.next;
			this.properties.extend(val);
		}
		var noLoadStr = this.properties.keys.get("noload");
		if(noLoadStr != null) {
			var noLoadArr = new EReg("[,;|]","").split(noLoadStr);
			var _g = 0;
			while(_g < noLoadArr.length) {
				var s = noLoadArr[_g];
				++_g;
				var this1 = this.noLoadHash;
				var key = StringTools.trim(s);
				var _this = this1;
				if(__map_reserved[key] != null) {
					_this.setReserved(key,true);
				} else {
					_this.h[key] = true;
				}
			}
		}
	}
	,loadTilesets: function(source) {
		var _g_head = source.nodes.resolve("tileset").h;
		while(_g_head != null) {
			var val = _g_head.item;
			_g_head = _g_head.next;
			var name = val.has.resolve("name") ? val.att.resolve("name") : "";
			var _this = this.noLoadHash;
			if(!(__map_reserved[name] != null ? _this.existsReserved(name) : _this.h.hasOwnProperty(name))) {
				var ts = new flixel_addons_editors_tiled_TiledTileSet(val,this.rootPath);
				var key = ts.name;
				var _this1 = this.tilesets;
				if(__map_reserved[key] != null) {
					_this1.setReserved(key,ts);
				} else {
					_this1.h[key] = ts;
				}
				this.tilesetArray.push(ts);
			}
		}
	}
	,loadLayers: function(source) {
		var el = source.get_elements();
		while(el.hasNext()) {
			var el1 = el.next();
			var tmp;
			if(el1.has.resolve("name")) {
				var this1 = this.noLoadHash;
				var key = el1.att.resolve("name");
				var _this = this1;
				if(__map_reserved[key] != null) {
					tmp = _this.existsReserved(key);
				} else {
					tmp = _this.h.hasOwnProperty(key);
				}
			} else {
				tmp = false;
			}
			if(tmp) {
				continue;
			}
			var layer;
			switch(el1.get_name().toLowerCase()) {
			case "imagelayer":
				layer = new flixel_addons_editors_tiled_TiledImageLayer(el1,this);
				break;
			case "layer":
				layer = new flixel_addons_editors_tiled_TiledTileLayer(el1,this);
				break;
			case "objectgroup":
				layer = new flixel_addons_editors_tiled_TiledObjectLayer(el1,this);
				break;
			default:
				layer = null;
			}
			if(layer != null) {
				this.layers.push(layer);
				var key1 = layer.name;
				var _this1 = this.layerMap;
				if(__map_reserved[key1] != null) {
					_this1.setReserved(key1,layer);
				} else {
					_this1.h[key1] = layer;
				}
			}
		}
	}
	,getTileSet: function(name) {
		var _this = this.tilesets;
		if(__map_reserved[name] != null) {
			return _this.getReserved(name);
		} else {
			return _this.h[name];
		}
	}
	,getLayer: function(name) {
		var _this = this.layerMap;
		if(__map_reserved[name] != null) {
			return _this.getReserved(name);
		} else {
			return _this.h[name];
		}
	}
	,getGidOwner: function(gid) {
		var _this = this.tilesets;
		var set = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
		while(set.hasNext()) {
			var set1 = set.next();
			if(gid >= set1.firstGID && gid < set1.firstGID + set1.numTiles) {
				return set1;
			}
		}
		return null;
	}
	,__class__: flixel_addons_editors_tiled_TiledMap
};
var TiledLevel = function(tiledLevel,state) {
	this.objectStringMap = new haxe_ds_StringMap();
	this.objectGidMap = new haxe_ds_IntMap();
	this.gidType = [];
	flixel_addons_editors_tiled_TiledMap.call(this,tiledLevel,"assets/levels/");
	this.imagesLayer = new flixel_group_FlxTypedGroup();
	this.backgroundLayer = new flixel_group_FlxTypedGroup();
	flixel_FlxG.camera.setScrollBoundsRect(0,0,this.fullWidth,this.fullHeight,true);
	this.loadObjects(state);
	var _this = this.tilesets;
	var tileset = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
	while(tileset.hasNext()) {
		var tileset1 = tileset.next();
		var _g1 = tileset1.firstGID;
		var _g = tileset1.firstGID + tileset1.numTiles;
		while(_g1 < _g) {
			var i = _g1++;
			this.gidType[i] = MapType.Empty;
			var props = tileset1.getPropertiesByGid(i);
			if(props == null) {
				continue;
			}
			var type = props.keys.get("type");
			if(type != null) {
				if(type == "water") {
					this.gidType[i] = MapType.Water;
				} else if(type == "block") {
					this.gidType[i] = MapType.Block;
				} else if(type == "object") {
					this.gidType[i] = MapType.Object;
					var tileId2 = i - (tileset1.firstGID - 1);
					var objectType = props.keys.get("objectType");
					this.objectGidMap.h[tileId2] = objectType;
					var _this1 = this.objectStringMap;
					if(__map_reserved[objectType] != null) {
						_this1.setReserved(objectType,tileId2);
					} else {
						_this1.h[objectType] = tileId2;
					}
				}
			}
		}
	}
	var _g2 = 0;
	var _g11 = this.layers;
	while(_g2 < _g11.length) {
		var layer = _g11[_g2];
		++_g2;
		if(layer.type != flixel_addons_editors_tiled_TiledLayerType.TILE) {
			continue;
		}
		var tileLayer = layer;
		var tileSet = this.getLayerTileset(tileLayer);
		var imagePath = new haxe_io_Path(tileSet.imageSource);
		var processedPath = "assets/images/" + imagePath.file + "." + imagePath.ext;
		var tilemap = new flixel_addons_tile_FlxTilemapExt();
		tilemap.loadMapFromArray(tileLayer.get_tileArray(),this.width,this.height,processedPath,tileSet.tileWidth,tileSet.tileHeight,flixel_tile_FlxTilemapAutoTiling.OFF,tileSet.firstGID,1,1);
		this.backgroundLayer.add(tilemap);
		if(tileLayer.name == "ground") {
			this.groundLayer = tileLayer;
			this.backgroundLayer.add(tilemap);
		} else if(tileLayer.name == "objects") {
			this.objectLayer = tileLayer;
			this.objectLayerMap = tilemap;
		}
	}
};
$hxClasses["TiledLevel"] = TiledLevel;
TiledLevel.__name__ = ["TiledLevel"];
TiledLevel.__super__ = flixel_addons_editors_tiled_TiledMap;
TiledLevel.prototype = $extend(flixel_addons_editors_tiled_TiledMap.prototype,{
	getLayerTileset: function(ly) {
		var _g = 0;
		var _g1 = ly.get_tileArray();
		while(_g < _g1.length) {
			var tile = _g1[_g];
			++_g;
			if(tile > 0) {
				return this.getGidOwner(tile);
			}
		}
		return null;
	}
	,getAnimatedTile: function(props,tileset) {
		var special = new flixel_addons_tile_FlxTileSpecial(1,false,false,0);
		var n = props.animationFrames.length;
		var offset = Std.random(n);
		var _g = [];
		var _g2 = 0;
		while(_g2 < n) _g.push(props.animationFrames[(_g2++ + offset) % n].tileID + tileset.firstGID);
		special.addAnimation(_g,1000 / props.animationFrames[0].duration);
		return special;
	}
	,getPropertyOrDefault: function(prop,name,defaultValue) {
		var propV = prop.keys.get(name);
		if(propV != null) {
			return propV;
		}
		return defaultValue;
	}
	,readGameInfo: function(layer,state) {
		var _g = 0;
		var _g1 = layer.objects;
		while(_g < _g1.length) {
			var object = _g1[_g];
			++_g;
			var props = object.properties;
			if(props == null) {
				continue;
			}
			var typeProp = props.keys.get("type");
			if(typeProp == null) {
				continue;
			}
			var pos = new IntPoint((object.x + 1) / 32 | 0,(object.y + 1) / 32 | 0);
			if(typeProp == "start") {
				state.startPoint = pos;
			} else if(typeProp == "wave") {
				var wave = new Wave(pos.x,pos.y,(object.width + 31) / 32 | 0,(object.height + 31) / 32 | 0);
				var dirP = props.keys.get("dir");
				if(dirP != null) {
					wave.dir = Std.parseInt(dirP);
				}
				var typeP = props.keys.get("wtype");
				if(typeP != null) {
					wave.type = Std.parseInt(typeP);
				}
				wave.startOffset = Std.parseInt(this.getPropertyOrDefault(props,"offset","0"));
				wave.speedA = Std.parseInt(this.getPropertyOrDefault(props,"speedA","1"));
				wave.speedB = Std.parseInt(this.getPropertyOrDefault(props,"speedB","2"));
				state.waves.push(wave);
			}
		}
	}
	,loadObjects: function(state) {
		var _g = 0;
		var _g1 = this.layers;
		while(_g < _g1.length) {
			var layer = _g1[_g];
			++_g;
			if(layer.type != flixel_addons_editors_tiled_TiledLayerType.OBJECT) {
				continue;
			}
			if(layer.name == "info") {
				this.readGameInfo(layer,state);
			}
		}
	}
	,loadImages: function() {
		var _g = 0;
		var _g1 = this.layers;
		while(_g < _g1.length) {
			var layer = _g1[_g];
			++_g;
			if(layer.type != flixel_addons_editors_tiled_TiledLayerType.IMAGE) {
				continue;
			}
			var image = layer;
			var sprite = new flixel_FlxSprite(image.x,image.y,"assets/images/" + image.imagePath);
			this.imagesLayer.add(sprite);
		}
	}
	,__class__: TiledLevel
});
var ValueType = $hxClasses["ValueType"] = { __ename__ : ["ValueType"], __constructs__ : ["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"] };
ValueType.TNull = ["TNull",0];
ValueType.TNull.toString = $estr;
ValueType.TNull.__enum__ = ValueType;
ValueType.TInt = ["TInt",1];
ValueType.TInt.toString = $estr;
ValueType.TInt.__enum__ = ValueType;
ValueType.TFloat = ["TFloat",2];
ValueType.TFloat.toString = $estr;
ValueType.TFloat.__enum__ = ValueType;
ValueType.TBool = ["TBool",3];
ValueType.TBool.toString = $estr;
ValueType.TBool.__enum__ = ValueType;
ValueType.TObject = ["TObject",4];
ValueType.TObject.toString = $estr;
ValueType.TObject.__enum__ = ValueType;
ValueType.TFunction = ["TFunction",5];
ValueType.TFunction.toString = $estr;
ValueType.TFunction.__enum__ = ValueType;
ValueType.TClass = function(c) { var $x = ["TClass",6,c]; $x.__enum__ = ValueType; $x.toString = $estr; return $x; };
ValueType.TEnum = function(e) { var $x = ["TEnum",7,e]; $x.__enum__ = ValueType; $x.toString = $estr; return $x; };
ValueType.TUnknown = ["TUnknown",8];
ValueType.TUnknown.toString = $estr;
ValueType.TUnknown.__enum__ = ValueType;
var Type = function() { };
$hxClasses["Type"] = Type;
Type.__name__ = ["Type"];
Type.getSuperClass = function(c) {
	return c.__super__;
};
Type.getClassName = function(c) {
	var a = c.__name__;
	if(a == null) {
		return null;
	}
	return a.join(".");
};
Type.getEnumName = function(e) {
	var a = e.__ename__;
	return a.join(".");
};
Type.resolveClass = function(name) {
	var cl = $hxClasses[name];
	if(cl == null || !cl.__name__) {
		return null;
	}
	return cl;
};
Type.resolveEnum = function(name) {
	var e = $hxClasses[name];
	if(e == null || !e.__ename__) {
		return null;
	}
	return e;
};
Type.createInstance = function(cl,args) {
	var _g = args.length;
	switch(_g) {
	case 0:
		return new cl();
	case 1:
		return new cl(args[0]);
	case 2:
		return new cl(args[0],args[1]);
	case 3:
		return new cl(args[0],args[1],args[2]);
	case 4:
		return new cl(args[0],args[1],args[2],args[3]);
	case 5:
		return new cl(args[0],args[1],args[2],args[3],args[4]);
	case 6:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5]);
	case 7:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6]);
	case 8:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]);
	case 9:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8]);
	case 10:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9]);
	case 11:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10]);
	case 12:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11]);
	case 13:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11],args[12]);
	case 14:
		return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9],args[10],args[11],args[12],args[13]);
	default:
		throw new js__$Boot_HaxeError("Too many arguments");
	}
};
Type.createEmptyInstance = function(cl) {
	function empty() {}; empty.prototype = cl.prototype;
	return new empty();
};
Type.createEnum = function(e,constr,params) {
	var f = Reflect.field(e,constr);
	if(f == null) {
		throw new js__$Boot_HaxeError("No such constructor " + constr);
	}
	if(Reflect.isFunction(f)) {
		if(params == null) {
			throw new js__$Boot_HaxeError("Constructor " + constr + " need parameters");
		}
		return f.apply(e,params);
	}
	if(params != null && params.length != 0) {
		throw new js__$Boot_HaxeError("Constructor " + constr + " does not need parameters");
	}
	return f;
};
Type.getClassFields = function(c) {
	var a = Reflect.fields(c);
	HxOverrides.remove(a,"__name__");
	HxOverrides.remove(a,"__interfaces__");
	HxOverrides.remove(a,"__properties__");
	HxOverrides.remove(a,"__super__");
	HxOverrides.remove(a,"__meta__");
	HxOverrides.remove(a,"prototype");
	return a;
};
Type["typeof"] = function(v) {
	var _g = typeof(v);
	switch(_g) {
	case "boolean":
		return ValueType.TBool;
	case "function":
		if(v.__name__ || v.__ename__) {
			return ValueType.TObject;
		}
		return ValueType.TFunction;
	case "number":
		if(Math.ceil(v) == v % 2147483648.0) {
			return ValueType.TInt;
		}
		return ValueType.TFloat;
	case "object":
		if(v == null) {
			return ValueType.TNull;
		}
		var e = v.__enum__;
		if(e != null) {
			return ValueType.TEnum(e);
		}
		var c = js_Boot.getClass(v);
		if(c != null) {
			return ValueType.TClass(c);
		}
		return ValueType.TObject;
	case "string":
		return ValueType.TClass(String);
	case "undefined":
		return ValueType.TNull;
	default:
		return ValueType.TUnknown;
	}
};
Type.enumEq = function(a,b) {
	if(a == b) {
		return true;
	}
	try {
		if(a[0] != b[0]) {
			return false;
		}
		var _g1 = 2;
		var _g = a.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(!Type.enumEq(a[i],b[i])) {
				return false;
			}
		}
		var e = a.__enum__;
		if(e != b.__enum__ || e == null) {
			return false;
		}
	} catch( e1 ) {
		haxe_CallStack.lastException = e1;
		return false;
	}
	return true;
};
var _$UInt_UInt_$Impl_$ = {};
$hxClasses["_UInt.UInt_Impl_"] = _$UInt_UInt_$Impl_$;
_$UInt_UInt_$Impl_$.__name__ = ["_UInt","UInt_Impl_"];
_$UInt_UInt_$Impl_$.gt = function(a,b) {
	var aNeg = a < 0;
	if(aNeg != b < 0) {
		return aNeg;
	} else {
		return a > b;
	}
};
_$UInt_UInt_$Impl_$.toFloat = function(this1) {
	if(this1 < 0) {
		return 4294967296.0 + this1;
	} else {
		return this1 + 0.0;
	}
};
var Wave = function(x,y,w,h) {
	this.startOffset = 0;
	this.type = 0;
	this.dir = 1;
	this.speedB = 2;
	this.speedA = 1;
	this.size = new IntPoint();
	this.p0 = new IntPoint();
	var _this = this.p0;
	_this.x = x;
	_this.y = y;
	var _this1 = this.size;
	_this1.x = w;
	_this1.y = h;
};
$hxClasses["Wave"] = Wave;
Wave.__name__ = ["Wave"];
Wave.prototype = {
	getMoves: function(time) {
		if(time < this.startOffset) {
			return -1;
		}
		time -= this.startOffset;
		var reminder = time % this.speedB;
		var res = (time / this.speedB | 0) * this.speedA;
		res += reminder < this.speedA ? reminder : this.speedA;
		return res;
	}
	,__class__: Wave
};
var Xml = function(nodeType) {
	this.nodeType = nodeType;
	this.children = [];
	this.attributeMap = new haxe_ds_StringMap();
};
$hxClasses["Xml"] = Xml;
Xml.__name__ = ["Xml"];
Xml.parse = function(str) {
	return haxe_xml_Parser.parse(str);
};
Xml.createElement = function(name) {
	var xml = new Xml(Xml.Element);
	if(xml.nodeType != Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + xml.nodeType);
	}
	xml.nodeName = name;
	return xml;
};
Xml.createPCData = function(data) {
	var xml = new Xml(Xml.PCData);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createCData = function(data) {
	var xml = new Xml(Xml.CData);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createComment = function(data) {
	var xml = new Xml(Xml.Comment);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createDocType = function(data) {
	var xml = new Xml(Xml.DocType);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createProcessingInstruction = function(data) {
	var xml = new Xml(Xml.ProcessingInstruction);
	if(xml.nodeType == Xml.Document || xml.nodeType == Xml.Element) {
		throw new js__$Boot_HaxeError("Bad node type, unexpected " + xml.nodeType);
	}
	xml.nodeValue = data;
	return xml;
};
Xml.createDocument = function() {
	return new Xml(Xml.Document);
};
Xml.prototype = {
	get: function(att) {
		if(this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + this.nodeType);
		}
		var _this = this.attributeMap;
		if(__map_reserved[att] != null) {
			return _this.getReserved(att);
		} else {
			return _this.h[att];
		}
	}
	,set: function(att,value) {
		if(this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + this.nodeType);
		}
		var _this = this.attributeMap;
		if(__map_reserved[att] != null) {
			_this.setReserved(att,value);
		} else {
			_this.h[att] = value;
		}
	}
	,exists: function(att) {
		if(this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + this.nodeType);
		}
		var _this = this.attributeMap;
		if(__map_reserved[att] != null) {
			return _this.existsReserved(att);
		} else {
			return _this.h.hasOwnProperty(att);
		}
	}
	,attributes: function() {
		if(this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + this.nodeType);
		}
		return this.attributeMap.keys();
	}
	,elements: function() {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		var _g = [];
		var _g1 = 0;
		var _g2 = this.children;
		while(_g1 < _g2.length) {
			var child = _g2[_g1];
			++_g1;
			if(child.nodeType == Xml.Element) {
				_g.push(child);
			}
		}
		return HxOverrides.iter(_g);
	}
	,elementsNamed: function(name) {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		var _g = [];
		var _g1 = 0;
		var _g2 = this.children;
		while(_g1 < _g2.length) {
			var child = _g2[_g1];
			++_g1;
			var tmp;
			if(child.nodeType == Xml.Element) {
				if(child.nodeType != Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + child.nodeType);
				}
				tmp = child.nodeName == name;
			} else {
				tmp = false;
			}
			if(tmp) {
				_g.push(child);
			}
		}
		return HxOverrides.iter(_g);
	}
	,firstElement: function() {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		var _g = 0;
		var _g1 = this.children;
		while(_g < _g1.length) {
			var child = _g1[_g];
			++_g;
			if(child.nodeType == Xml.Element) {
				return child;
			}
		}
		return null;
	}
	,addChild: function(x) {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		if(x.parent != null) {
			x.parent.removeChild(x);
		}
		this.children.push(x);
		x.parent = this;
	}
	,removeChild: function(x) {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		if(HxOverrides.remove(this.children,x)) {
			x.parent = null;
			return true;
		}
		return false;
	}
	,insertChild: function(x,pos) {
		if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + this.nodeType);
		}
		if(x.parent != null) {
			HxOverrides.remove(x.parent.children,x);
		}
		this.children.splice(pos,0,x);
		x.parent = this;
	}
	,__class__: Xml
};
var flixel_IFlxBasic = function() { };
$hxClasses["flixel.IFlxBasic"] = flixel_IFlxBasic;
flixel_IFlxBasic.__name__ = ["flixel","IFlxBasic"];
flixel_IFlxBasic.prototype = {
	__class__: flixel_IFlxBasic
	,__properties__: {set_exists:"set_exists",set_alive:"set_alive",set_visible:"set_visible",set_active:"set_active"}
};
var openfl_VectorData = function() {
	this.length = 0;
};
$hxClasses["openfl.VectorData"] = openfl_VectorData;
openfl_VectorData.__name__ = ["openfl","VectorData"];
openfl_VectorData.prototype = {
	__class__: openfl_VectorData
};
var flixel_util_FlxPool_$flixel_$math_$FlxPoint = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_math_FlxPoint"] = flixel_util_FlxPool_$flixel_$math_$FlxPoint;
flixel_util_FlxPool_$flixel_$math_$FlxPoint.__name__ = ["flixel","util","FlxPool_flixel_math_FlxPoint"];
flixel_util_FlxPool_$flixel_$math_$FlxPoint.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$math_$FlxPoint.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$math_$FlxPoint
	,__properties__: {get_length:"get_length"}
};
var flixel_math_FlxPoint = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._inPool = false;
	this._weak = false;
	this.y = 0;
	this.x = 0;
	this.set(X,Y);
};
$hxClasses["flixel.math.FlxPoint"] = flixel_math_FlxPoint;
flixel_math_FlxPoint.__name__ = ["flixel","math","FlxPoint"];
flixel_math_FlxPoint.__interfaces__ = [flixel_util_IFlxPooled];
flixel_math_FlxPoint.__properties__ = {get_pool:"get_pool"}
flixel_math_FlxPoint.get = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	return point;
};
flixel_math_FlxPoint.weak = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	point._weak = true;
	return point;
};
flixel_math_FlxPoint.get_pool = function() {
	return flixel_math_FlxPoint._pool;
};
flixel_math_FlxPoint.prototype = {
	put: function() {
		if(!this._inPool) {
			this._inPool = true;
			this._weak = false;
			flixel_math_FlxPoint._pool.putUnsafe(this);
		}
	}
	,putWeak: function() {
		if(this._weak) {
			this.put();
		}
	}
	,set: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.set_x(X);
		this.set_y(Y);
		return this;
	}
	,add: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		var _g = this;
		_g.set_x(_g.x + X);
		var _g1 = this;
		_g1.set_y(_g1.y + Y);
		return this;
	}
	,addPoint: function(point) {
		var _g = this;
		_g.set_x(_g.x + point.x);
		var _g1 = this;
		_g1.set_y(_g1.y + point.y);
		if(point._weak) {
			point.put();
		}
		return this;
	}
	,subtract: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		var _g = this;
		_g.set_x(_g.x - X);
		var _g1 = this;
		_g1.set_y(_g1.y - Y);
		return this;
	}
	,subtractPoint: function(point) {
		var _g = this;
		_g.set_x(_g.x - point.x);
		var _g1 = this;
		_g1.set_y(_g1.y - point.y);
		if(point._weak) {
			point.put();
		}
		return this;
	}
	,scale: function(k) {
		var _g = this;
		_g.set_x(_g.x * k);
		var _g1 = this;
		_g1.set_y(_g1.y * k);
		return this;
	}
	,copyFrom: function(point) {
		this.set_x(point.x);
		this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
		return this;
	}
	,copyTo: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		point.set_x(this.x);
		point.set_y(this.y);
		return point;
	}
	,copyFromFlash: function(FlashPoint) {
		this.set_x(FlashPoint.x);
		this.set_y(FlashPoint.y);
		return this;
	}
	,copyToFlash: function(FlashPoint) {
		if(FlashPoint == null) {
			FlashPoint = new openfl_geom_Point();
		}
		FlashPoint.x = this.x;
		FlashPoint.y = this.y;
		return FlashPoint;
	}
	,addToFlash: function(FlashPoint) {
		FlashPoint.x += this.x;
		FlashPoint.y += this.y;
		return FlashPoint;
	}
	,subtractFromFlash: function(FlashPoint) {
		FlashPoint.x -= this.x;
		FlashPoint.y -= this.y;
		return FlashPoint;
	}
	,inCoords: function(RectX,RectY,RectWidth,RectHeight) {
		return flixel_math_FlxMath.pointInCoordinates(this.x,this.y,RectX,RectY,RectWidth,RectHeight);
	}
	,inRect: function(Rect) {
		return flixel_math_FlxMath.pointInFlxRect(this.x,this.y,Rect);
	}
	,distanceTo: function(point) {
		var dx = this.x - point.x;
		var dy = this.y - point.y;
		if(point._weak) {
			point.put();
		}
		return Math.sqrt(dx * dx + dy * dy);
	}
	,floor: function() {
		this.set_x(Math.floor(this.x));
		this.set_y(Math.floor(this.y));
		return this;
	}
	,ceil: function() {
		this.set_x(Math.ceil(this.x));
		this.set_y(Math.ceil(this.y));
		return this;
	}
	,round: function() {
		this.set_x(Math.round(this.x));
		this.set_y(Math.round(this.y));
		return this;
	}
	,rotate: function(Pivot,Angle) {
		var radians = Angle * (Math.PI / 180);
		var n = radians;
		n = radians * 0.3183098862;
		if(n > 1) {
			n -= Math.ceil(n) >> 1 << 1;
		} else if(n < -1) {
			n += Math.ceil(-n) >> 1 << 1;
		}
		var sin = n > 0 ? n * (3.1 + n * (0.5 + n * (-7.2 + n * 3.6))) : n * (3.1 - n * (0.5 + n * (7.2 + n * 3.6)));
		var n1 = radians + 1.570796327;
		n1 *= 0.3183098862;
		if(n1 > 1) {
			n1 -= Math.ceil(n1) >> 1 << 1;
		} else if(n1 < -1) {
			n1 += Math.ceil(-n1) >> 1 << 1;
		}
		var cos = n1 > 0 ? n1 * (3.1 + n1 * (0.5 + n1 * (-7.2 + n1 * 3.6))) : n1 * (3.1 - n1 * (0.5 + n1 * (7.2 + n1 * 3.6)));
		var dx = this.x - Pivot.x;
		var dy = this.y - Pivot.y;
		this.set_x(cos * dx - sin * dy + Pivot.x);
		this.set_y(sin * dx + cos * dy + Pivot.y);
		if(Pivot._weak) {
			Pivot.put();
		}
		return this;
	}
	,angleBetween: function(point) {
		var x = point.x - this.x;
		var y = point.y - this.y;
		var angle = 0;
		if(x != 0 || y != 0) {
			var c1 = Math.PI * 0.25;
			var ay = y < 0 ? -y : y;
			if(x >= 0) {
				angle = c1 - c1 * ((x - ay) / (x + ay));
			} else {
				angle = 3 * c1 - c1 * ((x + ay) / (ay - x));
			}
			angle = (y < 0 ? -angle : angle) * (180 / Math.PI);
			if(angle > 90) {
				angle -= 270;
			} else {
				angle += 90;
			}
		}
		if(point._weak) {
			point.put();
		}
		return angle;
	}
	,equals: function(point) {
		var result = Math.abs(this.x - point.x) <= 0.0000001 && Math.abs(this.y - point.y) <= 0.0000001;
		if(point._weak) {
			point.put();
		}
		return result;
	}
	,destroy: function() {
	}
	,transform: function(matrix) {
		return this.set(this.x * matrix.a + this.y * matrix.c + matrix.tx,this.x * matrix.b + this.y * matrix.d + matrix.ty);
	}
	,toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,set_x: function(Value) {
		return this.x = Value;
	}
	,set_y: function(Value) {
		return this.y = Value;
	}
	,__class__: flixel_math_FlxPoint
	,__properties__: {set_y:"set_y",set_x:"set_x"}
};
var openfl_display_LoaderInfo = function() {
	openfl_events_EventDispatcher.call(this);
	this.applicationDomain = openfl_system_ApplicationDomain.currentDomain;
	this.bytesLoaded = 0;
	this.bytesTotal = 0;
	this.childAllowsParent = true;
	this.parameters = { };
};
$hxClasses["openfl.display.LoaderInfo"] = openfl_display_LoaderInfo;
openfl_display_LoaderInfo.__name__ = ["openfl","display","LoaderInfo"];
openfl_display_LoaderInfo.create = function(loader) {
	var loaderInfo = new openfl_display_LoaderInfo();
	loaderInfo.uncaughtErrorEvents = new openfl_events_UncaughtErrorEvents();
	if(loader != null) {
		loaderInfo.loader = loader;
	} else {
		loaderInfo.url = openfl_display_LoaderInfo.__rootURL;
	}
	return loaderInfo;
};
openfl_display_LoaderInfo.__super__ = openfl_events_EventDispatcher;
openfl_display_LoaderInfo.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	__class__: openfl_display_LoaderInfo
});
var openfl_system_ApplicationDomain = function(parentDomain) {
	if(parentDomain != null) {
		this.parentDomain = parentDomain;
	} else {
		this.parentDomain = openfl_system_ApplicationDomain.currentDomain;
	}
};
$hxClasses["openfl.system.ApplicationDomain"] = openfl_system_ApplicationDomain;
openfl_system_ApplicationDomain.__name__ = ["openfl","system","ApplicationDomain"];
openfl_system_ApplicationDomain.prototype = {
	getDefinition: function(name) {
		return Type.resolveClass(name);
	}
	,hasDefinition: function(name) {
		return Type.resolveClass(name) != null;
	}
	,__class__: openfl_system_ApplicationDomain
};
var openfl_events_UncaughtErrorEvents = function() {
	openfl_events_EventDispatcher.call(this);
};
$hxClasses["openfl.events.UncaughtErrorEvents"] = openfl_events_UncaughtErrorEvents;
openfl_events_UncaughtErrorEvents.__name__ = ["openfl","events","UncaughtErrorEvents"];
openfl_events_UncaughtErrorEvents.__super__ = openfl_events_EventDispatcher;
openfl_events_UncaughtErrorEvents.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	__class__: openfl_events_UncaughtErrorEvents
});
var openfl_geom_Matrix = function(a,b,c,d,tx,ty) {
	if(ty == null) {
		ty = 0;
	}
	if(tx == null) {
		tx = 0;
	}
	if(d == null) {
		d = 1;
	}
	if(c == null) {
		c = 0;
	}
	if(b == null) {
		b = 0;
	}
	if(a == null) {
		a = 1;
	}
	this.a = a;
	this.b = b;
	this.c = c;
	this.d = d;
	this.tx = tx;
	this.ty = ty;
};
$hxClasses["openfl.geom.Matrix"] = openfl_geom_Matrix;
openfl_geom_Matrix.__name__ = ["openfl","geom","Matrix"];
openfl_geom_Matrix.prototype = {
	clone: function() {
		return new openfl_geom_Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty);
	}
	,concat: function(m) {
		var a1 = this.a * m.a + this.b * m.c;
		this.b = this.a * m.b + this.b * m.d;
		this.a = a1;
		var c1 = this.c * m.a + this.d * m.c;
		this.d = this.c * m.b + this.d * m.d;
		this.c = c1;
		var tx1 = this.tx * m.a + this.ty * m.c + m.tx;
		this.ty = this.tx * m.b + this.ty * m.d + m.ty;
		this.tx = tx1;
	}
	,copyColumnFrom: function(column,vector3D) {
		if(column > 2) {
			throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)");
		} else if(column == 0) {
			this.a = vector3D.x;
			this.c = vector3D.y;
		} else if(column == 1) {
			this.b = vector3D.x;
			this.d = vector3D.y;
		} else {
			this.tx = vector3D.x;
			this.ty = vector3D.y;
		}
	}
	,copyColumnTo: function(column,vector3D) {
		if(column > 2) {
			throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)");
		} else if(column == 0) {
			vector3D.x = this.a;
			vector3D.y = this.c;
			vector3D.z = 0;
		} else if(column == 1) {
			vector3D.x = this.b;
			vector3D.y = this.d;
			vector3D.z = 0;
		} else {
			vector3D.x = this.tx;
			vector3D.y = this.ty;
			vector3D.z = 1;
		}
	}
	,copyFrom: function(sourceMatrix) {
		this.a = sourceMatrix.a;
		this.b = sourceMatrix.b;
		this.c = sourceMatrix.c;
		this.d = sourceMatrix.d;
		this.tx = sourceMatrix.tx;
		this.ty = sourceMatrix.ty;
	}
	,copyRowFrom: function(row,vector3D) {
		if(row > 2) {
			throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)");
		} else if(row == 0) {
			this.a = vector3D.x;
			this.c = vector3D.y;
		} else if(row == 1) {
			this.b = vector3D.x;
			this.d = vector3D.y;
		} else {
			this.tx = vector3D.x;
			this.ty = vector3D.y;
		}
	}
	,copyRowTo: function(row,vector3D) {
		if(row > 2) {
			throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)");
		} else if(row == 0) {
			vector3D.x = this.a;
			vector3D.y = this.b;
			vector3D.z = this.tx;
		} else if(row == 1) {
			vector3D.x = this.c;
			vector3D.y = this.d;
			vector3D.z = this.ty;
		} else {
			vector3D.setTo(0,0,1);
		}
	}
	,createBox: function(scaleX,scaleY,rotation,tx,ty) {
		if(ty == null) {
			ty = 0;
		}
		if(tx == null) {
			tx = 0;
		}
		if(rotation == null) {
			rotation = 0;
		}
		if(rotation != 0) {
			var cos = Math.cos(rotation);
			var sin = Math.sin(rotation);
			this.a = cos * scaleX;
			this.b = sin * scaleY;
			this.c = -sin * scaleX;
			this.d = cos * scaleY;
		} else {
			this.a = scaleX;
			this.b = 0;
			this.c = 0;
			this.d = scaleY;
		}
		this.tx = tx;
		this.ty = ty;
	}
	,createGradientBox: function(width,height,rotation,tx,ty) {
		if(ty == null) {
			ty = 0;
		}
		if(tx == null) {
			tx = 0;
		}
		if(rotation == null) {
			rotation = 0;
		}
		this.a = width / 1638.4;
		this.d = height / 1638.4;
		if(rotation != 0) {
			var cos = Math.cos(rotation);
			var sin = Math.sin(rotation);
			this.b = sin * this.d;
			this.c = -sin * this.a;
			this.a *= cos;
			this.d *= cos;
		} else {
			this.b = 0;
			this.c = 0;
		}
		this.tx = tx + width / 2;
		this.ty = ty + height / 2;
	}
	,deltaTransformPoint: function(point) {
		return new openfl_geom_Point(point.x * this.a + point.y * this.c,point.x * this.b + point.y * this.d);
	}
	,equals: function(matrix) {
		if(matrix != null && this.tx == matrix.tx && this.ty == matrix.ty && this.a == matrix.a && this.b == matrix.b && this.c == matrix.c) {
			return this.d == matrix.d;
		} else {
			return false;
		}
	}
	,identity: function() {
		this.a = 1;
		this.b = 0;
		this.c = 0;
		this.d = 1;
		this.tx = 0;
		this.ty = 0;
	}
	,invert: function() {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			this.a = this.b = this.c = this.d = 0;
			this.tx = -this.tx;
			this.ty = -this.ty;
		} else {
			norm = 1.0 / norm;
			var a1 = this.d * norm;
			this.d = this.a * norm;
			this.a = a1;
			this.b *= -norm;
			this.c *= -norm;
			var tx1 = -this.a * this.tx - this.c * this.ty;
			this.ty = -this.b * this.tx - this.d * this.ty;
			this.tx = tx1;
		}
		return this;
	}
	,rotate: function(theta) {
		var cos = Math.cos(theta);
		var sin = Math.sin(theta);
		var a1 = this.a * cos - this.b * sin;
		this.b = this.a * sin + this.b * cos;
		this.a = a1;
		var c1 = this.c * cos - this.d * sin;
		this.d = this.c * sin + this.d * cos;
		this.c = c1;
		var tx1 = this.tx * cos - this.ty * sin;
		this.ty = this.tx * sin + this.ty * cos;
		this.tx = tx1;
	}
	,scale: function(sx,sy) {
		this.a *= sx;
		this.b *= sy;
		this.c *= sx;
		this.d *= sy;
		this.tx *= sx;
		this.ty *= sy;
	}
	,setRotation: function(theta,scale) {
		if(scale == null) {
			scale = 1;
		}
		this.a = Math.cos(theta) * scale;
		this.c = Math.sin(theta) * scale;
		this.b = -this.c;
		this.d = this.a;
	}
	,setTo: function(a,b,c,d,tx,ty) {
		this.a = a;
		this.b = b;
		this.c = c;
		this.d = d;
		this.tx = tx;
		this.ty = ty;
	}
	,to3DString: function(roundPixels) {
		if(roundPixels == null) {
			roundPixels = false;
		}
		if(roundPixels) {
			return "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)";
		} else {
			return "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(pos) {
		return new openfl_geom_Point(pos.x * this.a + pos.y * this.c + this.tx,pos.x * this.b + pos.y * this.d + this.ty);
	}
	,translate: function(dx,dy) {
		this.tx += dx;
		this.ty += dy;
	}
	,toArray: function(transpose) {
		if(transpose == null) {
			transpose = false;
		}
		if(this.__array == null) {
			this.__array = new Float32Array(9);
		}
		if(transpose) {
			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[8] = 1;
		} else {
			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 * 1000) / 1000;
		this.b = Math.round(this.b * 1000) / 1000;
		this.c = Math.round(this.c * 1000) / 1000;
		this.d = Math.round(this.d * 1000) / 1000;
		this.tx = Math.round(this.tx * 10) / 10;
		this.ty = Math.round(this.ty * 10) / 10;
	}
	,__toMatrix3: function() {
		return new lime_math_Matrix3(this.a,this.b,this.c,this.d,this.tx,this.ty);
	}
	,__transformInversePoint: function(point) {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			point.x = -this.tx;
			point.y = -this.ty;
		} else {
			var px = 1.0 / norm * (this.c * (this.ty - point.y) + this.d * (point.x - this.tx));
			point.y = 1.0 / norm * (this.a * (point.y - this.ty) + this.b * (this.tx - point.x));
			point.x = px;
		}
	}
	,__transformInverseX: function(px,py) {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			return -this.tx;
		} else {
			return 1.0 / norm * (this.c * (this.ty - py) + this.d * (px - this.tx));
		}
	}
	,__transformInverseY: function(px,py) {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			return -this.ty;
		} else {
			return 1.0 / norm * (this.a * (py - this.ty) + this.b * (this.tx - px));
		}
	}
	,__transformPoint: function(point) {
		var px = point.x;
		var py = point.y;
		point.x = px * this.a + py * this.c + this.tx;
		point.y = px * this.b + py * this.d + this.ty;
	}
	,__transformX: function(px,py) {
		return px * this.a + py * this.c + this.tx;
	}
	,__transformY: function(px,py) {
		return px * this.b + py * this.d + this.ty;
	}
	,__translateTransformed: function(px,py) {
		this.tx = px * this.a + py * this.c + this.tx;
		this.ty = px * this.b + py * this.d + this.ty;
	}
	,__class__: openfl_geom_Matrix
};
var openfl_geom_Point = function(x,y) {
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.x = x;
	this.y = y;
};
$hxClasses["openfl.geom.Point"] = openfl_geom_Point;
openfl_geom_Point.__name__ = ["openfl","geom","Point"];
openfl_geom_Point.distance = function(pt1,pt2) {
	var dx = pt1.x - pt2.x;
	var dy = pt1.y - pt2.y;
	return Math.sqrt(dx * dx + dy * dy);
};
openfl_geom_Point.interpolate = function(pt1,pt2,f) {
	return new openfl_geom_Point(pt2.x + f * (pt1.x - pt2.x),pt2.y + f * (pt1.y - pt2.y));
};
openfl_geom_Point.polar = function(len,angle) {
	return new openfl_geom_Point(len * Math.cos(angle),len * Math.sin(angle));
};
openfl_geom_Point.prototype = {
	add: function(v) {
		return new openfl_geom_Point(v.x + this.x,v.y + this.y);
	}
	,clone: function() {
		return new openfl_geom_Point(this.x,this.y);
	}
	,copyFrom: function(sourcePoint) {
		this.x = sourcePoint.x;
		this.y = sourcePoint.y;
	}
	,equals: function(toCompare) {
		if(toCompare != null && toCompare.x == this.x) {
			return toCompare.y == this.y;
		} else {
			return false;
		}
	}
	,normalize: function(thickness) {
		if(this.x == 0 && this.y == 0) {
			return;
		} else {
			var norm = thickness / Math.sqrt(this.x * this.x + this.y * this.y);
			this.x *= norm;
			this.y *= norm;
		}
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
	}
	,setTo: function(xa,ya) {
		this.x = xa;
		this.y = ya;
	}
	,subtract: function(v) {
		return new openfl_geom_Point(this.x - v.x,this.y - v.y);
	}
	,toString: function() {
		return "(x=" + this.x + ", y=" + this.y + ")";
	}
	,__toLimeVector2: function() {
		return new lime_math_Vector2(this.x,this.y);
	}
	,get_length: function() {
		return Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,__class__: openfl_geom_Point
	,__properties__: {get_length:"get_length"}
};
var openfl_geom_ColorTransform = function(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier,redOffset,greenOffset,blueOffset,alphaOffset) {
	if(alphaOffset == null) {
		alphaOffset = 0;
	}
	if(blueOffset == null) {
		blueOffset = 0;
	}
	if(greenOffset == null) {
		greenOffset = 0;
	}
	if(redOffset == null) {
		redOffset = 0;
	}
	if(alphaMultiplier == null) {
		alphaMultiplier = 1;
	}
	if(blueMultiplier == null) {
		blueMultiplier = 1;
	}
	if(greenMultiplier == null) {
		greenMultiplier = 1;
	}
	if(redMultiplier == null) {
		redMultiplier = 1;
	}
	this.redMultiplier = redMultiplier;
	this.greenMultiplier = greenMultiplier;
	this.blueMultiplier = blueMultiplier;
	this.alphaMultiplier = alphaMultiplier;
	this.redOffset = redOffset;
	this.greenOffset = greenOffset;
	this.blueOffset = blueOffset;
	this.alphaOffset = alphaOffset;
};
$hxClasses["openfl.geom.ColorTransform"] = openfl_geom_ColorTransform;
openfl_geom_ColorTransform.__name__ = ["openfl","geom","ColorTransform"];
openfl_geom_ColorTransform.prototype = {
	concat: function(second) {
		this.redMultiplier *= second.redMultiplier;
		this.greenMultiplier *= second.greenMultiplier;
		this.blueMultiplier *= second.blueMultiplier;
		this.alphaMultiplier *= second.alphaMultiplier;
		this.redOffset = second.redMultiplier * this.redOffset + second.redOffset;
		this.greenOffset = second.greenMultiplier * this.greenOffset + second.greenOffset;
		this.blueOffset = second.blueMultiplier * this.blueOffset + second.blueOffset;
		this.alphaOffset = second.alphaMultiplier * this.alphaOffset + second.alphaOffset;
	}
	,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 openfl_geom_ColorTransform(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset);
	}
	,__combine: function(ct) {
		this.redMultiplier *= ct.redMultiplier;
		this.greenMultiplier *= ct.greenMultiplier;
		this.blueMultiplier *= ct.blueMultiplier;
		this.alphaMultiplier *= ct.alphaMultiplier;
		this.redOffset += ct.redOffset;
		this.greenOffset += ct.greenOffset;
		this.blueOffset += ct.blueOffset;
		this.alphaOffset += ct.alphaOffset;
	}
	,__equals: function(ct,skipAlphaMultiplier) {
		if(skipAlphaMultiplier == null) {
			skipAlphaMultiplier = false;
		}
		if(ct != null && this.redMultiplier == ct.redMultiplier && this.greenMultiplier == ct.greenMultiplier && this.blueMultiplier == ct.blueMultiplier && (skipAlphaMultiplier || this.alphaMultiplier == ct.alphaMultiplier) && this.redOffset == ct.redOffset && this.greenOffset == ct.greenOffset && this.blueOffset == ct.blueOffset) {
			return this.alphaOffset == ct.alphaOffset;
		} else {
			return false;
		}
	}
	,__isDefault: function() {
		if(this.redMultiplier == 1 && this.greenMultiplier == 1 && this.blueMultiplier == 1 && this.alphaMultiplier == 1 && this.redOffset == 0 && this.greenOffset == 0 && this.blueOffset == 0) {
			return this.alphaOffset == 0;
		} else {
			return false;
		}
	}
	,get_color: function() {
		return (this.redOffset | 0) << 16 | (this.greenOffset | 0) << 8 | (this.blueOffset | 0);
	}
	,set_color: function(value) {
		this.redOffset = value >> 16 & 255;
		this.greenOffset = value >> 8 & 255;
		this.blueOffset = value & 255;
		this.redMultiplier = 0;
		this.greenMultiplier = 0;
		this.blueMultiplier = 0;
		return this.get_color();
	}
	,__toLimeColorMatrix: function() {
		var array = [this.redMultiplier,0,0,0,this.redOffset / 255,0,this.greenMultiplier,0,0,this.greenOffset / 255,0,0,this.blueMultiplier,0,this.blueOffset / 255,0,0,0,this.alphaMultiplier,this.alphaOffset / 255];
		var this1;
		if(array != null) {
			this1 = new Float32Array(array);
		} else {
			this1 = null;
		}
		return this1;
	}
	,__class__: openfl_geom_ColorTransform
	,__properties__: {set_color:"set_color",get_color:"get_color"}
};
var flixel_FlxCamera = function(X,Y,Width,Height,Zoom) {
	if(Zoom == null) {
		Zoom = 0;
	}
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._helperMatrix = new flixel_math_FlxMatrix();
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	this._bounds = _this;
	this._scrollRect = new openfl_display_Sprite();
	this.initialZoom = 1;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this._point = point;
	this._fxShakeAxes = flixel_util_FlxAxes.XY;
	this._fxShakeDuration = 0;
	this._fxShakeIntensity = 0;
	this._fxFadeAlpha = 0;
	this._fxFadeCompleted = true;
	this._fxFadeComplete = null;
	this._fxFadeIn = false;
	this._fxFadeDuration = 0;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	this._scrollTarget = point1;
	this._fxFadeColor = 0;
	this._fxFlashAlpha = 0;
	this._fxFlashComplete = null;
	this._fxFlashDuration = 0;
	this._fxFlashColor = 0;
	var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
	point2._inPool = false;
	this._flashOffset = point2;
	this._flashPoint = new openfl_geom_Point();
	this.filtersEnabled = true;
	var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
	point3._inPool = false;
	this.followLead = point3;
	this.antialiasing = false;
	this.color = -1;
	this.angle = 0;
	this.alpha = 1;
	this.height = 0;
	this.width = 0;
	this.flashSprite = new openfl_display_Sprite();
	this.useBgAlphaBlending = false;
	this.regen = false;
	var point4 = flixel_math_FlxPoint._pool.get().set(0,0);
	point4._inPool = false;
	this.scroll = point4;
	this.followLerp = 60 / flixel_FlxG.updateFramerate;
	var point5 = flixel_math_FlxPoint._pool.get().set(0,0);
	point5._inPool = false;
	this.targetOffset = point5;
	this.y = 0;
	this.x = 0;
	flixel_FlxBasic.call(this);
	this.set_x(X);
	this.set_y(Y);
	this.set_width(Width <= 0 ? flixel_FlxG.width : Width);
	this.set_height(Height <= 0 ? flixel_FlxG.height : Height);
	this._flashRect = new openfl_geom_Rectangle(0,0,this.width,this.height);
	this.flashSprite.addChild(this._scrollRect);
	this._scrollRect.set_scrollRect(new openfl_geom_Rectangle());
	this.pixelPerfectRender = flixel_FlxG.renderBlit;
	if(flixel_FlxG.renderBlit) {
		this.screen = new flixel_FlxSprite();
		this.buffer = new openfl_display_BitmapData(this.width,this.height,true,0);
		this.screen.set_pixels(this.buffer);
		this.screen.origin.set();
		this._flashBitmap = new openfl_display_Bitmap(this.buffer);
		this._scrollRect.addChild(this._flashBitmap);
		this._fill = new openfl_display_BitmapData(this.width,this.height,true,0);
	} else {
		this.canvas = new openfl_display_Sprite();
		this._scrollRect.addChild(this.canvas);
		this._transform = new openfl_geom_Matrix();
	}
	this.set_color(-1);
	this.set_zoom(Zoom);
	this.initialZoom = this.zoom;
	this.updateScrollRect();
	this.updateFlashOffset();
	this.updateFlashSpritePosition();
	this.updateInternalSpritePositions();
	this.bgColor = flixel_FlxG.cameras.get_bgColor();
};
$hxClasses["flixel.FlxCamera"] = flixel_FlxCamera;
flixel_FlxCamera.__name__ = ["flixel","FlxCamera"];
flixel_FlxCamera.defaultZoom = null;
flixel_FlxCamera.defaultCameras = null;
flixel_FlxCamera._storageTilesHead = null;
flixel_FlxCamera._storageTrianglesHead = null;
flixel_FlxCamera.__super__ = flixel_FlxBasic;
flixel_FlxCamera.prototype = $extend(flixel_FlxBasic.prototype,{
	startQuadBatch: function(graphic,colored,hasColorOffsets,blend,smooth,shader) {
		if(smooth == null) {
			smooth = false;
		}
		if(hasColorOffsets == null) {
			hasColorOffsets = false;
		}
		var itemToReturn = null;
		var blendInt = flixel_graphics_tile_FlxDrawBaseItem.blendToInt(blend);
		if(this._currentDrawItem != null && this._currentDrawItem.type == flixel_graphics_tile_FlxDrawItemType.TILES && this._headTiles.graphics == graphic && this._headTiles.colored == colored && this._headTiles.hasColorOffsets == hasColorOffsets && this._headTiles.blending == blendInt && this._headTiles.antialiasing == smooth && this._headTiles.shader == shader) {
			return this._headTiles;
		}
		if(flixel_FlxCamera._storageTilesHead != null) {
			itemToReturn = flixel_FlxCamera._storageTilesHead;
			var newHead = flixel_FlxCamera._storageTilesHead.nextTyped;
			itemToReturn.reset();
			flixel_FlxCamera._storageTilesHead = newHead;
		} else {
			itemToReturn = new flixel_graphics_tile_FlxDrawTilesItem();
		}
		itemToReturn.graphics = graphic;
		itemToReturn.antialiasing = smooth;
		itemToReturn.colored = colored;
		itemToReturn.hasColorOffsets = hasColorOffsets;
		itemToReturn.blending = blendInt;
		itemToReturn.shader = shader;
		itemToReturn.nextTyped = this._headTiles;
		this._headTiles = itemToReturn;
		if(this._headOfDrawStack == null) {
			this._headOfDrawStack = itemToReturn;
		}
		if(this._currentDrawItem != null) {
			this._currentDrawItem.next = itemToReturn;
		}
		this._currentDrawItem = itemToReturn;
		return itemToReturn;
	}
	,startTrianglesBatch: function(graphic,smoothing,isColored,blend) {
		if(isColored == null) {
			isColored = false;
		}
		if(smoothing == null) {
			smoothing = false;
		}
		if(this._currentDrawItem != null && this._currentDrawItem.type == flixel_graphics_tile_FlxDrawItemType.TRIANGLES && this._headTriangles.graphics == graphic && this._headTriangles.antialiasing == smoothing && this._headTriangles.colored == isColored && this._headTriangles.blending == flixel_graphics_tile_FlxDrawBaseItem.blendToInt(blend)) {
			return this._headTriangles;
		}
		return this.getNewDrawTrianglesItem(graphic,smoothing,isColored,blend);
	}
	,getNewDrawTrianglesItem: function(graphic,smoothing,isColored,blend) {
		if(isColored == null) {
			isColored = false;
		}
		if(smoothing == null) {
			smoothing = false;
		}
		var itemToReturn = null;
		var blendInt = flixel_graphics_tile_FlxDrawBaseItem.blendToInt(blend);
		if(flixel_FlxCamera._storageTrianglesHead != null) {
			itemToReturn = flixel_FlxCamera._storageTrianglesHead;
			var newHead = flixel_FlxCamera._storageTrianglesHead.nextTyped;
			itemToReturn.reset();
			flixel_FlxCamera._storageTrianglesHead = newHead;
		} else {
			itemToReturn = new flixel_graphics_tile_FlxDrawTrianglesItem();
		}
		itemToReturn.graphics = graphic;
		itemToReturn.antialiasing = smoothing;
		itemToReturn.colored = isColored;
		itemToReturn.blending = blendInt;
		itemToReturn.nextTyped = this._headTriangles;
		this._headTriangles = itemToReturn;
		if(this._headOfDrawStack == null) {
			this._headOfDrawStack = itemToReturn;
		}
		if(this._currentDrawItem != null) {
			this._currentDrawItem.next = itemToReturn;
		}
		this._currentDrawItem = itemToReturn;
		return itemToReturn;
	}
	,clearDrawStack: function() {
		var currTiles = this._headTiles;
		var newTilesHead;
		while(currTiles != null) {
			newTilesHead = currTiles.nextTyped;
			currTiles.reset();
			currTiles.nextTyped = flixel_FlxCamera._storageTilesHead;
			flixel_FlxCamera._storageTilesHead = currTiles;
			currTiles = newTilesHead;
		}
		var currTriangles = this._headTriangles;
		var newTrianglesHead;
		while(currTriangles != null) {
			newTrianglesHead = currTriangles.nextTyped;
			currTriangles.reset();
			currTriangles.nextTyped = flixel_FlxCamera._storageTrianglesHead;
			flixel_FlxCamera._storageTrianglesHead = currTriangles;
			currTriangles = newTrianglesHead;
		}
		this._currentDrawItem = null;
		this._headOfDrawStack = null;
		this._headTiles = null;
		this._headTriangles = null;
	}
	,render: function() {
		var currItem = this._headOfDrawStack;
		while(currItem != null) {
			currItem.render(this);
			currItem = currItem.next;
		}
	}
	,drawPixels: function(frame,pixels,matrix,transform,blend,smoothing,shader) {
		if(smoothing == null) {
			smoothing = false;
		}
		if(flixel_FlxG.renderBlit) {
			this.buffer.draw(pixels,matrix,null,blend,null,smoothing || this.antialiasing);
		} else {
			this.startQuadBatch(frame.parent,transform != null && flixel_util_FlxColorTransformUtil.hasRGBMultipliers(transform),transform != null && flixel_util_FlxColorTransformUtil.hasRGBAOffsets(transform),blend,smoothing,shader).addQuad(frame,matrix,transform);
		}
	}
	,copyPixels: function(frame,pixels,sourceRect,destPoint,transform,blend,smoothing,shader) {
		if(smoothing == null) {
			smoothing = false;
		}
		if(flixel_FlxG.renderBlit) {
			if(pixels != null) {
				this.buffer.copyPixels(pixels,sourceRect,destPoint,null,null,true);
			} else if(frame != null) {
				frame.paint(this.buffer,destPoint,true);
			}
		} else {
			this._helperMatrix.identity();
			this._helperMatrix.translate(destPoint.x + frame.offset.x,destPoint.y + frame.offset.y);
			this.startQuadBatch(frame.parent,transform != null && flixel_util_FlxColorTransformUtil.hasRGBMultipliers(transform),transform != null && flixel_util_FlxColorTransformUtil.hasRGBAOffsets(transform),blend,smoothing,shader).addQuad(frame,this._helperMatrix,transform);
		}
	}
	,drawTriangles: function(graphic,vertices,indices,uvtData,colors,position,blend,repeat,smoothing) {
		if(smoothing == null) {
			smoothing = false;
		}
		if(repeat == null) {
			repeat = false;
		}
		if(flixel_FlxG.renderBlit) {
			if(position == null) {
				position = flixel_FlxCamera.renderPoint.set();
			}
			var _this = this._bounds;
			_this.x = 0;
			_this.y = 0;
			_this.width = this.width;
			_this.height = this.height;
			var verticesLength = vertices.length;
			var currentVertexPosition = 0;
			var tempX;
			var tempY;
			var i = 0;
			var _this1 = flixel_FlxCamera.renderRect;
			_this1.x = 0;
			_this1.y = 0;
			_this1.width = 0;
			_this1.height = 0;
			var bounds = _this1;
			var this1 = flixel_FlxCamera.drawVertices;
			var pos = 0;
			var len = flixel_FlxCamera.drawVertices.length;
			if(pos < 0) {
				pos += this1.length;
			}
			if(pos + len > this1.length) {
				len = this1.length - pos;
			}
			if(len < 0) {
				len = 0;
			}
			var vectorData = new openfl_VectorData();
			vectorData.length = len;
			vectorData.fixed = false;
			vectorData.data = new Array(len);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos,vectorData.data,0,len);
			if(len > 0) {
				this1.length -= len;
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos + len,this1.data,pos,this1.length - pos);
			}
			while(i < verticesLength) {
				tempX = position.x + vertices[i];
				tempY = position.y + vertices[i + 1];
				var this2 = flixel_FlxCamera.drawVertices;
				var key = currentVertexPosition++;
				if(!this2.fixed) {
					if(key >= this2.length) {
						this2.length = key + 1;
					}
					if(this2.data.length < this2.length) {
						var length = this2.data.length + 10;
						var data = new Array(length);
						haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data,0,this2.data.length);
						this2.data = data;
					}
				}
				this2.data[key] = tempX;
				var this3 = flixel_FlxCamera.drawVertices;
				var key1 = currentVertexPosition++;
				if(!this3.fixed) {
					if(key1 >= this3.length) {
						this3.length = key1 + 1;
					}
					if(this3.data.length < this3.length) {
						var length1 = this3.data.length + 10;
						var data1 = new Array(length1);
						haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
						this3.data = data1;
					}
				}
				this3.data[key1] = tempY;
				if(i == 0) {
					bounds.x = tempX;
					bounds.y = tempY;
					bounds.width = 0;
					bounds.height = 0;
				} else {
					if(tempX < bounds.x) {
						bounds.width += bounds.x - tempX;
						bounds.x = tempX;
					}
					if(tempY < bounds.y) {
						bounds.height += bounds.y - tempY;
						bounds.y = tempY;
					}
					if(tempX > bounds.x + bounds.width) {
						bounds.width = tempX - bounds.x;
					}
					if(tempY > bounds.y + bounds.height) {
						bounds.height = tempY - bounds.y;
					}
				}
				i += 2;
			}
			if(position._weak) {
				position.put();
			}
			var _this2 = this._bounds;
			var result = bounds.x + bounds.width > _this2.x && bounds.x < _this2.x + _this2.width && bounds.y + bounds.height > _this2.y && bounds.y < _this2.y + _this2.height;
			if(bounds._weak) {
				if(!bounds._inPool) {
					bounds._inPool = true;
					bounds._weak = false;
					flixel_math_FlxRect._pool.putUnsafe(bounds);
				}
			}
			if(!result) {
				var this4 = flixel_FlxCamera.drawVertices;
				var pos1 = flixel_FlxCamera.drawVertices.length - verticesLength;
				var len1 = verticesLength;
				if(pos1 < 0) {
					pos1 += this4.length;
				}
				if(pos1 + len1 > this4.length) {
					len1 = this4.length - pos1;
				}
				if(len1 < 0) {
					len1 = 0;
				}
				var vectorData1 = new openfl_VectorData();
				vectorData1.length = len1;
				vectorData1.fixed = false;
				vectorData1.data = new Array(len1);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,pos1,vectorData1.data,0,len1);
				if(len1 > 0) {
					this4.length -= len1;
					haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,pos1 + len1,this4.data,pos1,this4.length - pos1);
				}
			} else {
				flixel_FlxCamera.trianglesSprite.get_graphics().clear();
				flixel_FlxCamera.trianglesSprite.get_graphics().beginBitmapFill(graphic.bitmap,null,repeat,smoothing);
				var tmp = flixel_FlxCamera.trianglesSprite.get_graphics();
				var tmp1 = flixel_FlxCamera.drawVertices;
				var vectorData2 = new openfl_VectorData();
				vectorData2.length = indices.length;
				vectorData2.fixed = true;
				vectorData2.data = indices.slice(0);
				var vectorData3 = new openfl_VectorData();
				vectorData3.length = uvtData.length;
				vectorData3.fixed = true;
				vectorData3.data = uvtData.slice(0);
				tmp.drawTriangles(tmp1,vectorData2,vectorData3);
				flixel_FlxCamera.trianglesSprite.get_graphics().endFill();
				this.buffer.draw(flixel_FlxCamera.trianglesSprite);
			}
			if(!bounds._inPool) {
				bounds._inPool = true;
				bounds._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(bounds);
			}
		} else {
			var _this3 = this._bounds;
			_this3.x = 0;
			_this3.y = 0;
			_this3.width = this.width;
			_this3.height = this.height;
			this.startTrianglesBatch(graphic,smoothing,colors != null && colors.length != 0,blend).addTriangles(vertices,indices,uvtData,colors,position,this._bounds);
		}
	}
	,destroy: function() {
		flixel_util_FlxDestroyUtil.removeChild(this.flashSprite,this._scrollRect);
		if(flixel_FlxG.renderBlit) {
			flixel_util_FlxDestroyUtil.removeChild(this._scrollRect,this._flashBitmap);
			this.screen = flixel_util_FlxDestroyUtil.destroy(this.screen);
			this.buffer = null;
			this._flashBitmap = null;
			this._fill = flixel_util_FlxDestroyUtil.dispose(this._fill);
		} else {
			flixel_util_FlxDestroyUtil.removeChild(this._scrollRect,this.canvas);
			if(this.canvas != null) {
				var _g1 = 0;
				var _g = this.canvas.get_numChildren();
				while(_g1 < _g) {
					++_g1;
					this.canvas.removeChildAt(0);
				}
				this.canvas = null;
			}
			if(this._headOfDrawStack != null) {
				this.clearDrawStack();
			}
			this._transform = null;
			this._helperMatrix = null;
		}
		this._bounds = null;
		this.scroll = flixel_util_FlxDestroyUtil.put(this.scroll);
		this.targetOffset = flixel_util_FlxDestroyUtil.put(this.targetOffset);
		this.deadzone = flixel_util_FlxDestroyUtil.put(this.deadzone);
		this.target = null;
		this.flashSprite = null;
		this._scrollRect = null;
		this._flashRect = null;
		this._flashPoint = null;
		this._fxFlashComplete = null;
		this._fxFadeComplete = null;
		this._fxShakeComplete = null;
		flixel_FlxBasic.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		if(this.target != null) {
			this.updateFollow();
		}
		this.updateScroll();
		this.updateFlash(elapsed);
		this.updateFade(elapsed);
		this.flashSprite.set_filters(this.filtersEnabled ? this._filters : null);
		this.updateFlashSpritePosition();
		this.updateShake(elapsed);
	}
	,updateScroll: function() {
		var zoom = this.zoom / flixel_FlxG.initialZoom;
		var minX = this.minScrollX == null ? null : this.minScrollX - (zoom - 1) * this.width / (2 * zoom);
		var maxX = this.maxScrollX == null ? null : this.maxScrollX + (zoom - 1) * this.width / (2 * zoom);
		var minY = this.minScrollY == null ? null : this.minScrollY - (zoom - 1) * this.height / (2 * zoom);
		var maxY = this.maxScrollY == null ? null : this.maxScrollY + (zoom - 1) * this.height / (2 * zoom);
		var Value = this.scroll.x;
		var Max = maxX != null ? maxX - this.width : null;
		var lowerBound = minX != null && Value < minX ? minX : Value;
		this.scroll.set_x(Max != null && lowerBound > Max ? Max : lowerBound);
		var Value1 = this.scroll.y;
		var Max1 = maxY != null ? maxY - this.height : null;
		var lowerBound1 = minY != null && Value1 < minY ? minY : Value1;
		this.scroll.set_y(Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1);
	}
	,updateFollow: function() {
		if(this.deadzone == null) {
			this.target.getMidpoint(this._point);
			this._point.addPoint(this.targetOffset);
			var point = this._point;
			this.scroll.set(point.x - this.width * 0.5,point.y - this.height * 0.5);
			if(point._weak) {
				point.put();
			}
		} else {
			var edge;
			var targetX = this.target.x + this.targetOffset.x;
			var targetY = this.target.y + this.targetOffset.y;
			if(this.style == flixel_FlxCameraFollowStyle.SCREEN_BY_SCREEN) {
				if(targetX >= this.scroll.x + this.width) {
					var _g = this._scrollTarget;
					_g.set_x(_g.x + this.width);
				} else if(targetX < this.scroll.x) {
					var _g1 = this._scrollTarget;
					_g1.set_x(_g1.x - this.width);
				}
				if(targetY >= this.scroll.y + this.height) {
					var _g2 = this._scrollTarget;
					_g2.set_y(_g2.y + this.height);
				} else if(targetY < this.scroll.y) {
					var _g3 = this._scrollTarget;
					_g3.set_y(_g3.y - this.height);
				}
			} else {
				edge = targetX - this.deadzone.x;
				if(this._scrollTarget.x > edge) {
					this._scrollTarget.set_x(edge);
				}
				edge = targetX + this.target.get_width() - this.deadzone.x - this.deadzone.width;
				if(this._scrollTarget.x < edge) {
					this._scrollTarget.set_x(edge);
				}
				edge = targetY - this.deadzone.y;
				if(this._scrollTarget.y > edge) {
					this._scrollTarget.set_y(edge);
				}
				edge = targetY + this.target.get_height() - this.deadzone.y - this.deadzone.height;
				if(this._scrollTarget.y < edge) {
					this._scrollTarget.set_y(edge);
				}
			}
			if(js_Boot.__instanceof(this.target,flixel_FlxSprite)) {
				if(this._lastTargetPosition == null) {
					var X = this.target.x;
					var Y = this.target.y;
					var point1 = flixel_math_FlxPoint._pool.get().set(X,Y);
					point1._inPool = false;
					this._lastTargetPosition = point1;
				}
				var _g4 = this._scrollTarget;
				_g4.set_x(_g4.x + (this.target.x - this._lastTargetPosition.x) * this.followLead.x);
				var _g5 = this._scrollTarget;
				_g5.set_y(_g5.y + (this.target.y - this._lastTargetPosition.y) * this.followLead.y);
				this._lastTargetPosition.set_x(this.target.x);
				this._lastTargetPosition.set_y(this.target.y);
			}
			if(this.followLerp >= 60 / flixel_FlxG.updateFramerate) {
				var _this = this.scroll;
				var point2 = this._scrollTarget;
				_this.set_x(point2.x);
				_this.set_y(point2.y);
				if(point2._weak) {
					point2.put();
				}
			} else {
				var _g6 = this.scroll;
				_g6.set_x(_g6.x + (this._scrollTarget.x - this.scroll.x) * this.followLerp * flixel_FlxG.updateFramerate / 60);
				var _g7 = this.scroll;
				_g7.set_y(_g7.y + (this._scrollTarget.y - this.scroll.y) * this.followLerp * flixel_FlxG.updateFramerate / 60);
			}
		}
	}
	,updateFlash: function(elapsed) {
		if(this._fxFlashAlpha > 0.0) {
			this._fxFlashAlpha -= elapsed / this._fxFlashDuration;
			if(this._fxFlashAlpha <= 0 && this._fxFlashComplete != null) {
				this._fxFlashComplete();
			}
		}
	}
	,updateFade: function(elapsed) {
		if(this._fxFadeCompleted) {
			return;
		}
		if(this._fxFadeIn) {
			this._fxFadeAlpha -= elapsed / this._fxFadeDuration;
			if(this._fxFadeAlpha <= 0.0) {
				this._fxFadeAlpha = 0.0;
				this.completeFade();
			}
		} else {
			this._fxFadeAlpha += elapsed / this._fxFadeDuration;
			if(this._fxFadeAlpha >= 1.0) {
				this._fxFadeAlpha = 1.0;
				this.completeFade();
			}
		}
	}
	,completeFade: function() {
		this._fxFadeCompleted = true;
		if(this._fxFadeComplete != null) {
			this._fxFadeComplete();
		}
	}
	,updateShake: function(elapsed) {
		if(this._fxShakeDuration > 0) {
			this._fxShakeDuration -= elapsed;
			if(this._fxShakeDuration <= 0) {
				if(this._fxShakeComplete != null) {
					this._fxShakeComplete();
				}
			} else {
				if(this._fxShakeAxes != flixel_util_FlxAxes.Y) {
					var _g = this.flashSprite;
					_g.set_x(_g.get_x() + flixel_FlxG.random["float"](-this._fxShakeIntensity * this.width,this._fxShakeIntensity * this.width) * this.zoom * flixel_FlxG.scaleMode.scale.x);
				}
				if(this._fxShakeAxes != flixel_util_FlxAxes.X) {
					var _g1 = this.flashSprite;
					_g1.set_y(_g1.get_y() + flixel_FlxG.random["float"](-this._fxShakeIntensity * this.height,this._fxShakeIntensity * this.height) * this.zoom * flixel_FlxG.scaleMode.scale.y);
				}
			}
		}
	}
	,updateFlashSpritePosition: function() {
		if(this.flashSprite != null) {
			this.flashSprite.set_x(this.x * flixel_FlxG.scaleMode.scale.x + this._flashOffset.x);
			this.flashSprite.set_y(this.y * flixel_FlxG.scaleMode.scale.y + this._flashOffset.y);
		}
	}
	,updateFlashOffset: function() {
		this._flashOffset.set_x(this.width * 0.5 * flixel_FlxG.scaleMode.scale.x * this.initialZoom);
		this._flashOffset.set_y(this.height * 0.5 * flixel_FlxG.scaleMode.scale.y * this.initialZoom);
	}
	,updateScrollRect: function() {
		var rect = this._scrollRect != null ? this._scrollRect.get_scrollRect() : null;
		if(rect != null) {
			rect.x = rect.y = 0;
			rect.width = this.width * this.initialZoom * flixel_FlxG.scaleMode.scale.x;
			rect.height = this.height * this.initialZoom * flixel_FlxG.scaleMode.scale.y;
			this._scrollRect.set_scrollRect(rect);
			this._scrollRect.set_x(-0.5 * rect.width);
			this._scrollRect.set_y(-0.5 * rect.height);
		}
	}
	,updateInternalSpritePositions: function() {
		if(flixel_FlxG.renderBlit) {
			if(this._flashBitmap != null) {
				this.regen = this.regen || this.width != this.buffer.width || this.height != this.buffer.height;
				this._flashBitmap.set_x(-0.5 * this.width * (this.scaleX - this.initialZoom) * flixel_FlxG.scaleMode.scale.x);
				this._flashBitmap.set_y(-0.5 * this.height * (this.scaleY - this.initialZoom) * flixel_FlxG.scaleMode.scale.y);
			}
		} else if(this.canvas != null) {
			this.canvas.set_x(-0.5 * this.width * (this.scaleX - this.initialZoom) * flixel_FlxG.scaleMode.scale.x);
			this.canvas.set_y(-0.5 * this.height * (this.scaleY - this.initialZoom) * flixel_FlxG.scaleMode.scale.y);
			this.canvas.set_scaleX(this.totalScaleX);
			this.canvas.set_scaleY(this.totalScaleY);
		}
	}
	,follow: function(Target,Style,Lerp) {
		if(Style == null) {
			Style = flixel_FlxCameraFollowStyle.LOCKON;
		}
		if(Lerp == null) {
			Lerp = 60 / flixel_FlxG.updateFramerate;
		}
		this.style = Style;
		this.target = Target;
		this.set_followLerp(Lerp);
		var helper;
		var w = 0;
		var h = 0;
		this._lastTargetPosition = null;
		switch(Style[1]) {
		case 0:
			if(this.target != null) {
				w = this.target.get_width();
				h = this.target.get_height();
			}
			var X = (this.width - w) / 2;
			var Y = (this.height - h) / 2 - h * 0.25;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = X;
			_this.y = Y;
			_this.width = w;
			_this.height = h;
			_this._inPool = false;
			this.deadzone = _this;
			break;
		case 1:
			var w1 = this.width / 8;
			var h1 = this.height / 3;
			var X1 = (this.width - w1) / 2;
			var Y1 = (this.height - h1) / 2 - h1 * 0.25;
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = X1;
			_this1.y = Y1;
			_this1.width = w1;
			_this1.height = h1;
			_this1._inPool = false;
			this.deadzone = _this1;
			break;
		case 2:
			helper = Math.max(this.width,this.height) / 4;
			var X2 = (this.width - helper) / 2;
			var Y2 = (this.height - helper) / 2;
			var _this2 = flixel_math_FlxRect._pool.get();
			_this2.x = X2;
			_this2.y = Y2;
			_this2.width = helper;
			_this2.height = helper;
			_this2._inPool = false;
			this.deadzone = _this2;
			break;
		case 3:
			helper = Math.max(this.width,this.height) / 8;
			var X3 = (this.width - helper) / 2;
			var Y3 = (this.height - helper) / 2;
			var _this3 = flixel_math_FlxRect._pool.get();
			_this3.x = X3;
			_this3.y = Y3;
			_this3.width = helper;
			_this3.height = helper;
			_this3._inPool = false;
			this.deadzone = _this3;
			break;
		case 4:
			var Width = this.width;
			var Height = this.height;
			var _this4 = flixel_math_FlxRect._pool.get();
			_this4.x = 0;
			_this4.y = 0;
			_this4.width = Width;
			_this4.height = Height;
			_this4._inPool = false;
			this.deadzone = _this4;
			break;
		case 5:
			this.deadzone = null;
			break;
		}
	}
	,snapToTarget: function() {
		this.updateFollow();
		var _this = this.scroll;
		var point = this._scrollTarget;
		_this.set_x(point.x);
		_this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
	}
	,focusOn: function(point) {
		this.scroll.set(point.x - this.width * 0.5,point.y - this.height * 0.5);
		if(point._weak) {
			point.put();
		}
	}
	,flash: function(Color,Duration,OnComplete,Force) {
		if(Force == null) {
			Force = false;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(Color == null) {
			Color = -1;
		}
		if(!Force && this._fxFlashAlpha > 0.0) {
			return;
		}
		this._fxFlashColor = Color;
		if(Duration <= 0) {
			Duration = 0.000001;
		}
		this._fxFlashDuration = Duration;
		this._fxFlashComplete = OnComplete;
		this._fxFlashAlpha = 1.0;
	}
	,fade: function(Color,Duration,FadeIn,OnComplete,Force) {
		if(Force == null) {
			Force = false;
		}
		if(FadeIn == null) {
			FadeIn = false;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(Color == null) {
			Color = -16777216;
		}
		if(!this._fxFadeCompleted && !Force) {
			return;
		}
		this._fxFadeColor = Color;
		if(Duration <= 0) {
			Duration = 0.000001;
		}
		this._fxFadeIn = FadeIn;
		this._fxFadeDuration = Duration;
		this._fxFadeComplete = OnComplete;
		this._fxFadeAlpha = this._fxFadeIn ? 0.999999 : 0.000001;
		this._fxFadeCompleted = false;
	}
	,shake: function(Intensity,Duration,OnComplete,Force,Axes) {
		if(Force == null) {
			Force = true;
		}
		if(Duration == null) {
			Duration = 0.5;
		}
		if(Intensity == null) {
			Intensity = 0.05;
		}
		if(Axes == null) {
			Axes = flixel_util_FlxAxes.XY;
		}
		if(!Force && this._fxShakeDuration > 0) {
			return;
		}
		this._fxShakeIntensity = Intensity;
		this._fxShakeDuration = Duration;
		this._fxShakeComplete = OnComplete;
		this._fxShakeAxes = Axes;
	}
	,stopFX: function() {
		this._fxFlashAlpha = 0.0;
		this._fxFadeAlpha = 0.0;
		this._fxShakeDuration = 0;
		this.updateFlashSpritePosition();
	}
	,setFilters: function(filters) {
		this._filters = filters;
	}
	,copyFrom: function(Camera) {
		this.setScrollBounds(Camera.minScrollX,Camera.maxScrollX,Camera.minScrollY,Camera.maxScrollY);
		this.target = Camera.target;
		if(this.target != null) {
			if(Camera.deadzone == null) {
				this.deadzone = null;
			} else {
				if(this.deadzone == null) {
					var _this = flixel_math_FlxRect._pool.get();
					_this.x = 0;
					_this.y = 0;
					_this.width = 0;
					_this.height = 0;
					_this._inPool = false;
					this.deadzone = _this;
				}
				var _this1 = this.deadzone;
				var Rect = Camera.deadzone;
				_this1.x = Rect.x;
				_this1.y = Rect.y;
				_this1.width = Rect.width;
				_this1.height = Rect.height;
				if(Rect._weak) {
					if(!Rect._inPool) {
						Rect._inPool = true;
						Rect._weak = false;
						flixel_math_FlxRect._pool.putUnsafe(Rect);
					}
				}
			}
		}
		return this;
	}
	,fill: function(Color,BlendAlpha,FxAlpha,graphics) {
		if(FxAlpha == null) {
			FxAlpha = 1.0;
		}
		if(BlendAlpha == null) {
			BlendAlpha = true;
		}
		if(flixel_FlxG.renderBlit) {
			if(BlendAlpha) {
				this._fill.fillRect(this._flashRect,Color);
				this.buffer.copyPixels(this._fill,this._flashRect,this._flashPoint,null,null,BlendAlpha);
			} else {
				this.buffer.fillRect(this._flashRect,Color);
			}
		} else {
			var targetGraphics = graphics == null ? this.canvas.get_graphics() : graphics;
			targetGraphics.beginFill(Color,FxAlpha);
			targetGraphics.drawRect(-1,-1,this.width + 2,this.height + 2);
			targetGraphics.endFill();
		}
	}
	,drawFX: function() {
		var alphaComponent;
		if(this._fxFlashAlpha > 0.0) {
			alphaComponent = this._fxFlashColor >> 24 & 255;
			if(flixel_FlxG.renderBlit) {
				this.fill((((alphaComponent <= 0 ? 255 : alphaComponent) * this._fxFlashAlpha | 0) << 24) + (this._fxFlashColor & 16777215));
			} else {
				this.fill(this._fxFlashColor & 16777215,true,(alphaComponent <= 0 ? 255 : alphaComponent) * this._fxFlashAlpha / 255,this.canvas.get_graphics());
			}
		}
		if(this._fxFadeAlpha > 0.0) {
			alphaComponent = this._fxFadeColor >> 24 & 255;
			if(flixel_FlxG.renderBlit) {
				this.fill((((alphaComponent <= 0 ? 255 : alphaComponent) * this._fxFadeAlpha | 0) << 24) + (this._fxFadeColor & 16777215));
			} else {
				this.fill(this._fxFadeColor & 16777215,true,(alphaComponent <= 0 ? 255 : alphaComponent) * this._fxFadeAlpha / 255,this.canvas.get_graphics());
			}
		}
	}
	,checkResize: function() {
		if(!flixel_FlxG.renderBlit && !this.regen) {
			return;
		}
		if(this.width != this.buffer.width || this.height != this.buffer.height) {
			var oldBuffer = this.screen.graphic;
			this.buffer = new openfl_display_BitmapData(this.width,this.height,true,0);
			this.screen.set_pixels(this.buffer);
			this.screen.origin.set();
			this._flashBitmap.bitmapData = this.buffer;
			this._flashRect.width = this.width;
			this._flashRect.height = this.height;
			this._fill = flixel_util_FlxDestroyUtil.dispose(this._fill);
			this._fill = new openfl_display_BitmapData(this.width,this.height,true,0);
			flixel_FlxG.bitmap.removeIfNoUse(oldBuffer);
		}
		this.regen = false;
	}
	,setSize: function(Width,Height) {
		this.set_width(Width);
		this.set_height(Height);
	}
	,setPosition: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.set_x(X);
		this.set_y(Y);
	}
	,setScrollBoundsRect: function(X,Y,Width,Height,UpdateWorld) {
		if(UpdateWorld == null) {
			UpdateWorld = false;
		}
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		if(UpdateWorld) {
			var _this = flixel_FlxG.worldBounds;
			_this.x = X;
			_this.y = Y;
			_this.width = Width;
			_this.height = Height;
		}
		this.setScrollBounds(X,X + Width,Y,Y + Height);
	}
	,setScrollBounds: function(MinX,MaxX,MinY,MaxY) {
		this.minScrollX = MinX;
		this.maxScrollX = MaxX;
		this.minScrollY = MinY;
		this.maxScrollY = MaxY;
		this.updateScroll();
	}
	,setScale: function(X,Y) {
		this.scaleX = X;
		this.scaleY = Y;
		this.totalScaleX = this.scaleX * flixel_FlxG.scaleMode.scale.x;
		this.totalScaleY = this.scaleY * flixel_FlxG.scaleMode.scale.y;
		if(flixel_FlxG.renderBlit) {
			this._flashBitmap.set_scaleX(this.totalScaleX);
			this._flashBitmap.set_scaleY(this.totalScaleY);
		} else {
			this._transform.identity();
			this._transform.scale(this.totalScaleX,this.totalScaleY);
		}
		this.updateFlashSpritePosition();
		this.updateScrollRect();
		this.updateInternalSpritePositions();
	}
	,onResize: function() {
		this.updateFlashOffset();
		this.setScale(this.scaleX,this.scaleY);
	}
	,set_followLerp: function(Value) {
		var Max = 60 / flixel_FlxG.updateFramerate;
		var lowerBound = Value < 0 ? 0 : Value;
		return this.followLerp = Max != null && lowerBound > Max ? Max : lowerBound;
	}
	,set_width: function(Value) {
		if(this.width != Value && Value > 0) {
			this.width = Value;
			this.updateFlashOffset();
			this.updateScrollRect();
			this.updateInternalSpritePositions();
			flixel_FlxG.cameras.cameraResized.dispatch(this);
		}
		return Value;
	}
	,set_height: function(Value) {
		if(this.height != Value && Value > 0) {
			this.height = Value;
			this.updateFlashOffset();
			this.updateScrollRect();
			this.updateInternalSpritePositions();
			flixel_FlxG.cameras.cameraResized.dispatch(this);
		}
		return Value;
	}
	,set_zoom: function(Zoom) {
		this.zoom = Zoom == 0 ? flixel_FlxCamera.defaultZoom : Zoom;
		this.setScale(this.zoom,this.zoom);
		return this.zoom;
	}
	,set_alpha: function(Alpha) {
		var lowerBound = Alpha < 0 ? 0 : Alpha;
		this.alpha = lowerBound > 1 ? 1 : lowerBound;
		if(flixel_FlxG.renderBlit) {
			this._flashBitmap.set_alpha(Alpha);
		} else {
			this.canvas.set_alpha(Alpha);
		}
		return Alpha;
	}
	,set_angle: function(Angle) {
		this.angle = Angle;
		this.flashSprite.set_rotation(Angle);
		return Angle;
	}
	,set_color: function(Color) {
		this.color = Color;
		var colorTransform;
		if(flixel_FlxG.renderBlit) {
			if(this._flashBitmap == null) {
				return Color;
			}
			colorTransform = this._flashBitmap.get_transform().get_colorTransform();
		} else {
			colorTransform = this.canvas.get_transform().get_colorTransform();
		}
		colorTransform.redMultiplier = (this.color >> 16 & 255) / 255;
		colorTransform.greenMultiplier = (this.color >> 8 & 255) / 255;
		colorTransform.blueMultiplier = (this.color & 255) / 255;
		if(flixel_FlxG.renderBlit) {
			this._flashBitmap.get_transform().set_colorTransform(colorTransform);
		} else {
			this.canvas.get_transform().set_colorTransform(colorTransform);
		}
		return Color;
	}
	,set_antialiasing: function(Antialiasing) {
		this.antialiasing = Antialiasing;
		if(flixel_FlxG.renderBlit) {
			this._flashBitmap.smoothing = Antialiasing;
		}
		return Antialiasing;
	}
	,set_x: function(x) {
		this.x = x;
		this.updateFlashSpritePosition();
		return x;
	}
	,set_y: function(y) {
		this.y = y;
		this.updateFlashSpritePosition();
		return y;
	}
	,set_visible: function(visible) {
		if(this.flashSprite != null) {
			this.flashSprite.set_visible(visible);
		}
		return this.visible = visible;
	}
	,__class__: flixel_FlxCamera
	,__properties__: $extend(flixel_FlxBasic.prototype.__properties__,{set_antialiasing:"set_antialiasing",set_color:"set_color",set_angle:"set_angle",set_alpha:"set_alpha",set_zoom:"set_zoom",set_height:"set_height",set_width:"set_width",set_followLerp:"set_followLerp",set_y:"set_y",set_x:"set_x"})
});
var flixel_FlxCameraFollowStyle = $hxClasses["flixel.FlxCameraFollowStyle"] = { __ename__ : ["flixel","FlxCameraFollowStyle"], __constructs__ : ["LOCKON","PLATFORMER","TOPDOWN","TOPDOWN_TIGHT","SCREEN_BY_SCREEN","NO_DEAD_ZONE"] };
flixel_FlxCameraFollowStyle.LOCKON = ["LOCKON",0];
flixel_FlxCameraFollowStyle.LOCKON.toString = $estr;
flixel_FlxCameraFollowStyle.LOCKON.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.PLATFORMER = ["PLATFORMER",1];
flixel_FlxCameraFollowStyle.PLATFORMER.toString = $estr;
flixel_FlxCameraFollowStyle.PLATFORMER.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.TOPDOWN = ["TOPDOWN",2];
flixel_FlxCameraFollowStyle.TOPDOWN.toString = $estr;
flixel_FlxCameraFollowStyle.TOPDOWN.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.TOPDOWN_TIGHT = ["TOPDOWN_TIGHT",3];
flixel_FlxCameraFollowStyle.TOPDOWN_TIGHT.toString = $estr;
flixel_FlxCameraFollowStyle.TOPDOWN_TIGHT.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.SCREEN_BY_SCREEN = ["SCREEN_BY_SCREEN",4];
flixel_FlxCameraFollowStyle.SCREEN_BY_SCREEN.toString = $estr;
flixel_FlxCameraFollowStyle.SCREEN_BY_SCREEN.__enum__ = flixel_FlxCameraFollowStyle;
flixel_FlxCameraFollowStyle.NO_DEAD_ZONE = ["NO_DEAD_ZONE",5];
flixel_FlxCameraFollowStyle.NO_DEAD_ZONE.toString = $estr;
flixel_FlxCameraFollowStyle.NO_DEAD_ZONE.__enum__ = flixel_FlxCameraFollowStyle;
var flixel_system_FlxVersion = function(Major,Minor,Patch) {
	this.major = Major;
	this.minor = Minor;
	this.patch = Patch;
};
$hxClasses["flixel.system.FlxVersion"] = flixel_system_FlxVersion;
flixel_system_FlxVersion.__name__ = ["flixel","system","FlxVersion"];
flixel_system_FlxVersion.prototype = {
	toString: function() {
		var sha = flixel_system_FlxVersion.sha;
		if(sha != "") {
			sha = "@" + sha.substring(0,7);
		}
		return "HaxeFlixel " + this.major + "." + this.minor + "." + this.patch + sha;
	}
	,__class__: flixel_system_FlxVersion
};
var flixel_system_frontEnds_BitmapFrontEnd = function() {
	this._lastUniqueKeyIndex = 0;
	this.reset();
};
$hxClasses["flixel.system.frontEnds.BitmapFrontEnd"] = flixel_system_frontEnds_BitmapFrontEnd;
flixel_system_frontEnds_BitmapFrontEnd.__name__ = ["flixel","system","frontEnds","BitmapFrontEnd"];
flixel_system_frontEnds_BitmapFrontEnd.prototype = {
	onAssetsReload: function(_) {
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			var obj = __map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1];
			if(obj != null && (obj.assetsClass != null || obj.assetsKey != null)) {
				obj.onAssetsReload();
			}
		}
	}
	,onContext: function() {
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			var obj = __map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1];
			if(obj != null && obj.isDumped) {
				obj.onContext();
			}
		}
	}
	,dumpCache: function() {
	}
	,undumpCache: function() {
	}
	,checkCache: function(Key) {
		return this._cache.get(Key) != null;
	}
	,create: function(Width,Height,Color,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		return flixel_graphics_FlxGraphic.fromRectangle(Width,Height,Color,Unique,Key);
	}
	,add: function(Graphic,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(js_Boot.__instanceof(Graphic,flixel_graphics_FlxGraphic)) {
			return flixel_graphics_FlxGraphic.fromGraphic(Graphic,Unique,Key);
		} else if(js_Boot.__instanceof(Graphic,openfl_display_BitmapData)) {
			return flixel_graphics_FlxGraphic.fromBitmapData(Graphic,Unique,Key);
		}
		return flixel_graphics_FlxGraphic.fromAssetKey(Std.string(Graphic),Unique,Key);
	}
	,addGraphic: function(graphic) {
		var key = graphic.key;
		var _this = this._cache;
		if(__map_reserved[key] != null) {
			_this.setReserved(key,graphic);
		} else {
			_this.h[key] = graphic;
		}
		return graphic;
	}
	,get: function(key) {
		var _this = this._cache;
		if(__map_reserved[key] != null) {
			return _this.getReserved(key);
		} else {
			return _this.h[key];
		}
	}
	,findKeyForBitmap: function(bmd) {
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			if((__map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1]).bitmap == bmd) {
				return key1;
			}
		}
		return null;
	}
	,getKeyForClass: function(source) {
		return Type.getClassName(source);
	}
	,generateKey: function(systemKey,userKey,unique) {
		if(unique == null) {
			unique = false;
		}
		var key = userKey;
		if(userKey == null) {
			key = systemKey;
		}
		if(unique || key == null) {
			key = this.getUniqueKey(key);
		}
		return key;
	}
	,getUniqueKey: function(baseKey) {
		if(baseKey == null) {
			baseKey = "pixels";
		}
		if(this._cache.get(baseKey) == null) {
			return baseKey;
		}
		var i = this._lastUniqueKeyIndex;
		var uniqueKey;
		while(true) {
			++i;
			uniqueKey = baseKey + i;
			if(!(this._cache.get(uniqueKey) != null)) {
				break;
			}
		}
		this._lastUniqueKeyIndex = i;
		return uniqueKey;
	}
	,getKeyWithSpacesAndBorders: function(baseKey,frameSize,frameSpacing,frameBorder,region) {
		var result = baseKey;
		if(region != null) {
			result = baseKey + ("_Region:" + region.x + "_" + region.y + "_" + region.width + "_" + region.height);
		}
		if(frameSize != null) {
			result += "_FrameSize:" + frameSize.x + "_" + frameSize.y;
		}
		if(frameSpacing != null) {
			result += "_Spaces:" + frameSpacing.x + "_" + frameSpacing.y;
		}
		if(frameBorder != null) {
			result += "_Border:" + frameBorder.x + "_" + frameBorder.y;
		}
		return result;
	}
	,remove: function(graphic) {
		if(graphic != null) {
			this.removeByKey(graphic.key);
		}
	}
	,removeByKey: function(key) {
		var tmp;
		if(key != null) {
			var _this = this._cache;
			if(__map_reserved[key] != null) {
				tmp = _this.existsReserved(key);
			} else {
				tmp = _this.h.hasOwnProperty(key);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this1 = this._cache;
			var obj = __map_reserved[key] != null ? _this1.getReserved(key) : _this1.h[key];
			openfl_Assets.cache.removeBitmapData(key);
			this._cache.remove(key);
			obj.destroy();
		}
	}
	,removeIfNoUse: function(graphic) {
		if(graphic != null && graphic.get_useCount() == 0 && !graphic.persist) {
			this.remove(graphic);
		}
	}
	,clearCache: function() {
		if(this._cache == null) {
			this._cache = new haxe_ds_StringMap();
		}
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			var obj = __map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1];
			if(obj != null && !obj.persist && obj.get_useCount() <= 0) {
				this.removeByKey(key1);
			}
		}
	}
	,reset: function() {
		if(this._cache == null) {
			this._cache = new haxe_ds_StringMap();
		}
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			if((__map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1]) != null) {
				this.removeByKey(key1);
			}
		}
	}
	,clearUnused: function() {
		var key = this._cache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var _this = this._cache;
			var obj = __map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1];
			if(obj != null && obj.get_useCount() <= 0 && !obj.persist && obj.get_destroyOnNoUse()) {
				this.removeByKey(key1);
			}
		}
	}
	,get_maxTextureSize: function() {
		return lime_graphics_opengl_GL.context.getParameter(3379);
	}
	,get_whitePixel: function() {
		if(this._whitePixel == null) {
			var bd = new openfl_display_BitmapData(10,10,true,-1);
			var graphic = flixel_FlxG.bitmap.add(bd,true,"whitePixels");
			graphic.persist = true;
			this._whitePixel = graphic.get_imageFrame().get_frame();
		}
		return this._whitePixel;
	}
	,__class__: flixel_system_frontEnds_BitmapFrontEnd
	,__properties__: {get_whitePixel:"get_whitePixel",get_maxTextureSize:"get_maxTextureSize"}
};
var flixel_system_frontEnds_BitmapLogFrontEnd = function() {
};
$hxClasses["flixel.system.frontEnds.BitmapLogFrontEnd"] = flixel_system_frontEnds_BitmapLogFrontEnd;
flixel_system_frontEnds_BitmapLogFrontEnd.__name__ = ["flixel","system","frontEnds","BitmapLogFrontEnd"];
flixel_system_frontEnds_BitmapLogFrontEnd.prototype = {
	add: function(Data,Name) {
		if(Name == null) {
			Name = "";
		}
	}
	,clear: function() {
	}
	,clearAt: function(Index) {
		if(Index == null) {
			Index = -1;
		}
	}
	,viewCache: function() {
	}
	,__class__: flixel_system_frontEnds_BitmapLogFrontEnd
};
var flixel_system_frontEnds_CameraFrontEnd = function() {
	this._cameraRect = new openfl_geom_Rectangle();
	this.useBufferLocking = false;
	this.cameraResized = new flixel_util__$FlxSignal_FlxSignal1();
	this.cameraRemoved = new flixel_util__$FlxSignal_FlxSignal1();
	this.cameraAdded = new flixel_util__$FlxSignal_FlxSignal1();
	this.list = [];
	flixel_FlxCamera.defaultCameras = this.list;
};
$hxClasses["flixel.system.frontEnds.CameraFrontEnd"] = flixel_system_frontEnds_CameraFrontEnd;
flixel_system_frontEnds_CameraFrontEnd.__name__ = ["flixel","system","frontEnds","CameraFrontEnd"];
flixel_system_frontEnds_CameraFrontEnd.prototype = {
	add: function(NewCamera) {
		flixel_FlxG.game.addChildAt(NewCamera.flashSprite,flixel_FlxG.game.getChildIndex(flixel_FlxG.game._inputContainer));
		flixel_FlxG.cameras.list.push(NewCamera);
		NewCamera.ID = flixel_FlxG.cameras.list.length - 1;
		this.cameraAdded.dispatch(NewCamera);
		return NewCamera;
	}
	,remove: function(Camera,Destroy) {
		if(Destroy == null) {
			Destroy = true;
		}
		var index = this.list.indexOf(Camera);
		if(Camera != null && index != -1) {
			flixel_FlxG.game.removeChild(Camera.flashSprite);
			this.list.splice(index,1);
		} else {
			return;
		}
		if(flixel_FlxG.renderTile) {
			var _g1 = 0;
			var _g = this.list.length;
			while(_g1 < _g) {
				var i = _g1++;
				this.list[i].ID = i;
			}
		}
		if(Destroy) {
			Camera.destroy();
		}
		this.cameraRemoved.dispatch(Camera);
	}
	,reset: function(NewCamera) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			this.remove(camera);
		}
		this.list.splice(0,this.list.length);
		if(NewCamera == null) {
			NewCamera = new flixel_FlxCamera(0,0,flixel_FlxG.width,flixel_FlxG.height);
		}
		flixel_FlxG.camera = this.add(NewCamera);
		NewCamera.ID = 0;
		flixel_FlxCamera.defaultCameras = this.list;
	}
	,flash: function(Color,Duration,OnComplete,Force) {
		if(Force == null) {
			Force = false;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(Color == null) {
			Color = -1;
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.flash(Color,Duration,OnComplete,Force);
		}
	}
	,fade: function(Color,Duration,FadeIn,OnComplete,Force) {
		if(Force == null) {
			Force = false;
		}
		if(FadeIn == null) {
			FadeIn = false;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(Color == null) {
			Color = -16777216;
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.fade(Color,Duration,FadeIn,OnComplete,Force);
		}
	}
	,shake: function(Intensity,Duration,OnComplete,Force,Axes) {
		if(Force == null) {
			Force = true;
		}
		if(Duration == null) {
			Duration = 0.5;
		}
		if(Intensity == null) {
			Intensity = 0.05;
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.shake(Intensity,Duration,OnComplete,Force,Axes);
		}
	}
	,lock: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(camera == null || !camera.exists || !camera.visible) {
				continue;
			}
			if(flixel_FlxG.renderBlit) {
				camera.checkResize();
			}
			if(flixel_FlxG.renderTile) {
				camera.clearDrawStack();
				camera.canvas.get_graphics().clear();
			}
			if(flixel_FlxG.renderBlit) {
				camera.fill(camera.bgColor,camera.useBgAlphaBlending);
				camera.screen.dirty = true;
			} else {
				camera.fill(camera.bgColor & 16777215,camera.useBgAlphaBlending,(camera.bgColor >> 24 & 255) / 255);
			}
		}
	}
	,render: function() {
		if(flixel_FlxG.renderTile) {
			var _g = 0;
			var _g1 = this.list;
			while(_g < _g1.length) {
				var camera = _g1[_g];
				++_g;
				if(camera != null && camera.exists && camera.visible) {
					camera.render();
				}
			}
		}
	}
	,unlock: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(camera == null || !camera.exists || !camera.visible) {
				continue;
			}
			camera.drawFX();
			if(flixel_FlxG.renderBlit) {
				camera.screen.dirty = true;
			}
		}
	}
	,update: function(elapsed) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(camera != null && camera.exists && camera.active) {
				camera.update(elapsed);
			}
		}
	}
	,resize: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.onResize();
		}
	}
	,get_bgColor: function() {
		if(flixel_FlxG.camera == null) {
			return -16777216;
		} else {
			return flixel_FlxG.camera.bgColor;
		}
	}
	,set_bgColor: function(Color) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			camera.bgColor = Color;
		}
		return Color;
	}
	,__class__: flixel_system_frontEnds_CameraFrontEnd
	,__properties__: {set_bgColor:"set_bgColor",get_bgColor:"get_bgColor"}
};
var flixel_system_frontEnds_ConsoleFrontEnd = function() {
	this.stepAfterCommand = true;
	this.autoPause = true;
};
$hxClasses["flixel.system.frontEnds.ConsoleFrontEnd"] = flixel_system_frontEnds_ConsoleFrontEnd;
flixel_system_frontEnds_ConsoleFrontEnd.__name__ = ["flixel","system","frontEnds","ConsoleFrontEnd"];
flixel_system_frontEnds_ConsoleFrontEnd.prototype = {
	registerFunction: function(FunctionAlias,Function) {
	}
	,registerObject: function(ObjectAlias,AnyObject) {
	}
	,registerClass: function(cl) {
	}
	,__class__: flixel_system_frontEnds_ConsoleFrontEnd
};
var flixel_system_frontEnds_DebuggerFrontEnd = function() {
	this.visible = false;
	this.visibilityChanged = new flixel_util__$FlxSignal_FlxSignal0();
	this.drawDebugChanged = new flixel_util__$FlxSignal_FlxSignal0();
	this.drawDebug = false;
	this.toggleKeys = [113,192,220];
	this.precision = 3;
};
$hxClasses["flixel.system.frontEnds.DebuggerFrontEnd"] = flixel_system_frontEnds_DebuggerFrontEnd;
flixel_system_frontEnds_DebuggerFrontEnd.__name__ = ["flixel","system","frontEnds","DebuggerFrontEnd"];
flixel_system_frontEnds_DebuggerFrontEnd.prototype = {
	setLayout: function(Layout) {
	}
	,resetLayout: function() {
	}
	,addButton: function(Alignment,Icon,UpHandler,ToggleMode,UpdateLayout) {
		if(UpdateLayout == null) {
			UpdateLayout = true;
		}
		if(ToggleMode == null) {
			ToggleMode = false;
		}
		return null;
	}
	,track: function(ObjectOrClass,WindowTitle) {
		return null;
	}
	,addTrackerProfile: function(Profile) {
	}
	,removeButton: function(Button,UpdateLayout) {
		if(UpdateLayout == null) {
			UpdateLayout = true;
		}
	}
	,set_drawDebug: function(Value) {
		if(this.drawDebug == Value) {
			return this.drawDebug;
		}
		this.drawDebug = Value;
		return this.drawDebug;
	}
	,set_visible: function(Value) {
		if(this.visible == Value) {
			return this.visible;
		}
		this.visible = Value;
		return this.visible;
	}
	,__class__: flixel_system_frontEnds_DebuggerFrontEnd
	,__properties__: {set_visible:"set_visible",set_drawDebug:"set_drawDebug"}
};
var flixel_system_frontEnds_HTML5FrontEnd = function() {
	this.browser = this.getBrowser();
	this.platform = this.getPlatform();
	this.onMobile = this.getOnMobile();
};
$hxClasses["flixel.system.frontEnds.HTML5FrontEnd"] = flixel_system_frontEnds_HTML5FrontEnd;
flixel_system_frontEnds_HTML5FrontEnd.__name__ = ["flixel","system","frontEnds","HTML5FrontEnd"];
flixel_system_frontEnds_HTML5FrontEnd.prototype = {
	getBrowser: function() {
		if(this.userAgentContains(" OPR/")) {
			return flixel_system_frontEnds_FlxBrowser.OPERA;
		} else if(this.userAgentContains("chrome",true)) {
			return flixel_system_frontEnds_FlxBrowser.CHROME;
		} else if(window.navigator.appName == "Netscape") {
			return flixel_system_frontEnds_FlxBrowser.FIREFOX;
		} else if(!(!document.documentMode)) {
			return flixel_system_frontEnds_FlxBrowser.INTERNET_EXPLORER;
		} else if(Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor") > 0) {
			return flixel_system_frontEnds_FlxBrowser.SAFARI;
		}
		return flixel_system_frontEnds_FlxBrowser.UNKNOWN;
	}
	,getPlatform: function() {
		if(this.userAgentContains("Win")) {
			return flixel_system_frontEnds_FlxPlatform.WINDOWS;
		} else if(this.userAgentContains("Mac") && !this.userAgentContains("iPad")) {
			return flixel_system_frontEnds_FlxPlatform.MAC;
		} else if(this.userAgentContains("Linux") && !this.userAgentContains("Android")) {
			return flixel_system_frontEnds_FlxPlatform.LINUX;
		} else if(this.userAgentContains("IEMobile")) {
			return flixel_system_frontEnds_FlxPlatform.WINDOWS_PHONE;
		} else if(this.userAgentContains("Android")) {
			return flixel_system_frontEnds_FlxPlatform.ANDROID;
		} else if(this.userAgentContains("BlackBerry")) {
			return flixel_system_frontEnds_FlxPlatform.BLACKBERRY;
		} else if(this.userAgentContains("iPhone")) {
			return flixel_system_frontEnds_FlxPlatform.IOS(flixel_system_frontEnds_FlxIOSDevice.IPHONE);
		} else if(this.userAgentContains("iPad")) {
			return flixel_system_frontEnds_FlxPlatform.IOS(flixel_system_frontEnds_FlxIOSDevice.IPAD);
		} else if(this.userAgentContains("iPod")) {
			return flixel_system_frontEnds_FlxPlatform.IOS(flixel_system_frontEnds_FlxIOSDevice.IPOD);
		} else {
			return flixel_system_frontEnds_FlxPlatform.UNKNOWN;
		}
	}
	,getOnMobile: function() {
		switch(this.platform[1]) {
		case 3:case 4:case 5:case 6:
			return true;
		default:
			return false;
		}
	}
	,userAgentContains: function(substring,toLowerCase) {
		if(toLowerCase == null) {
			toLowerCase = false;
		}
		var userAgent = window.navigator.userAgent;
		if(toLowerCase) {
			userAgent = userAgent.toLowerCase();
		}
		return userAgent.indexOf(substring) != -1;
	}
	,get_browserPosition: function() {
		if(this.browserPosition == null) {
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			this.browserPosition = point;
		}
		this.browserPosition.set(window.screenX,window.screenY);
		return this.browserPosition;
	}
	,get_browserWidth: function() {
		return window.innerWidth;
	}
	,get_browserHeight: function() {
		return window.innerHeight;
	}
	,__class__: flixel_system_frontEnds_HTML5FrontEnd
	,__properties__: {get_browserPosition:"get_browserPosition",get_browserHeight:"get_browserHeight",get_browserWidth:"get_browserWidth"}
};
var flixel_system_frontEnds_InputFrontEnd = function() {
	this.resetOnStateSwitch = true;
	this.list = [];
};
$hxClasses["flixel.system.frontEnds.InputFrontEnd"] = flixel_system_frontEnds_InputFrontEnd;
flixel_system_frontEnds_InputFrontEnd.__name__ = ["flixel","system","frontEnds","InputFrontEnd"];
flixel_system_frontEnds_InputFrontEnd.prototype = {
	replace_flixel_input_mouse_FlxMouse: function(Old,New) {
		var i = 0;
		var success = false;
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(input == Old) {
				this.list[i] = New;
				success = true;
				break;
			}
			++i;
		}
		if(success) {
			return New;
		}
		return null;
	}
	,add_flixel_input_gamepad_FlxGamepadManager: function(Input) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Input,true) == flixel_util_FlxStringUtil.getClassName(input,true)) {
				return Input;
			}
		}
		this.list.push(Input);
		return Input;
	}
	,add_flixel_input_touch_FlxTouchManager: function(Input) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Input,true) == flixel_util_FlxStringUtil.getClassName(input,true)) {
				return Input;
			}
		}
		this.list.push(Input);
		return Input;
	}
	,add_flixel_input_mouse_FlxMouse: function(Input) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Input,true) == flixel_util_FlxStringUtil.getClassName(input,true)) {
				return Input;
			}
		}
		this.list.push(Input);
		return Input;
	}
	,add_flixel_input_keyboard_FlxKeyboard: function(Input) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Input,true) == flixel_util_FlxStringUtil.getClassName(input,true)) {
				return Input;
			}
		}
		this.list.push(Input);
		return Input;
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.reset();
		}
	}
	,update: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.update();
		}
	}
	,onFocus: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.onFocus();
		}
	}
	,onFocusLost: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.onFocusLost();
		}
	}
	,onStateSwitch: function() {
		if(this.resetOnStateSwitch) {
			this.reset();
		}
	}
	,destroy: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input = flixel_util_FlxDestroyUtil.destroy(input);
		}
	}
	,__class__: flixel_system_frontEnds_InputFrontEnd
};
var flixel_system_frontEnds_LogFrontEnd = function() {
	this.redirectTraces = false;
	this._standardTraceFunction = haxe_Log.trace;
};
$hxClasses["flixel.system.frontEnds.LogFrontEnd"] = flixel_system_frontEnds_LogFrontEnd;
flixel_system_frontEnds_LogFrontEnd.__name__ = ["flixel","system","frontEnds","LogFrontEnd"];
flixel_system_frontEnds_LogFrontEnd.prototype = {
	add: function(Data) {
	}
	,warn: function(Data) {
	}
	,error: function(Data) {
	}
	,notice: function(Data) {
	}
	,advanced: function(Data,Style,FireOnce) {
		if(FireOnce == null) {
			FireOnce = false;
		}
	}
	,clear: function() {
	}
	,set_redirectTraces: function(Redirect) {
		haxe_Log.trace = Redirect ? $bind(this,this.processTraceData) : this._standardTraceFunction;
		return this.redirectTraces = Redirect;
	}
	,processTraceData: function(Data,Info) {
		var paramArray = [Data];
		if(Info.customParams != null) {
			var _g = 0;
			var _g1 = Info.customParams;
			while(_g < _g1.length) {
				var i = _g1[_g];
				++_g;
				paramArray.push(i);
			}
		}
	}
	,__class__: flixel_system_frontEnds_LogFrontEnd
	,__properties__: {set_redirectTraces:"set_redirectTraces"}
};
var haxe_Log = function() { };
$hxClasses["haxe.Log"] = haxe_Log;
haxe_Log.__name__ = ["haxe","Log"];
haxe_Log.trace = function(v,infos) {
	js_Boot.__trace(v,infos);
};
var js_Boot = function() { };
$hxClasses["js.Boot"] = js_Boot;
js_Boot.__name__ = ["js","Boot"];
js_Boot.__unhtml = function(s) {
	return s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
};
js_Boot.__trace = function(v,i) {
	var msg = i != null ? i.fileName + ":" + i.lineNumber + ": " : "";
	msg += js_Boot.__string_rec(v,"");
	if(i != null && i.customParams != null) {
		var _g = 0;
		var _g1 = i.customParams;
		while(_g < _g1.length) {
			var v1 = _g1[_g];
			++_g;
			msg += "," + js_Boot.__string_rec(v1,"");
		}
	}
	var d;
	var tmp;
	if(typeof(document) != "undefined") {
		d = document.getElementById("haxe:trace");
		tmp = d != null;
	} else {
		tmp = false;
	}
	if(tmp) {
		d.innerHTML += js_Boot.__unhtml(msg) + "<br/>";
	} else if(typeof console != "undefined" && console.log != null) {
		console.log(msg);
	}
};
js_Boot.getClass = function(o) {
	if((o instanceof Array) && o.__enum__ == null) {
		return Array;
	} else {
		var cl = o.__class__;
		if(cl != null) {
			return cl;
		}
		var name = js_Boot.__nativeClassName(o);
		if(name != null) {
			return js_Boot.__resolveNativeClass(name);
		}
		return null;
	}
};
js_Boot.__string_rec = function(o,s) {
	if(o == null) {
		return "null";
	}
	if(s.length >= 5) {
		return "<...>";
	}
	var t = typeof(o);
	if(t == "function" && (o.__name__ || o.__ename__)) {
		t = "object";
	}
	switch(t) {
	case "function":
		return "<function>";
	case "object":
		if(o instanceof Array) {
			if(o.__enum__) {
				if(o.length == 2) {
					return o[0];
				}
				var str = o[0] + "(";
				s += "\t";
				var _g1 = 2;
				var _g = o.length;
				while(_g1 < _g) {
					var i = _g1++;
					if(i != 2) {
						str += "," + js_Boot.__string_rec(o[i],s);
					} else {
						str += js_Boot.__string_rec(o[i],s);
					}
				}
				return str + ")";
			}
			var l = o.length;
			var i1;
			var str1 = "[";
			s += "\t";
			var _g11 = 0;
			var _g2 = l;
			while(_g11 < _g2) {
				var i2 = _g11++;
				str1 += (i2 > 0 ? "," : "") + js_Boot.__string_rec(o[i2],s);
			}
			str1 += "]";
			return str1;
		}
		var tostr;
		try {
			tostr = o.toString;
		} catch( e ) {
			haxe_CallStack.lastException = e;
			return "???";
		}
		if(tostr != null && tostr != Object.toString && typeof(tostr) == "function") {
			var s2 = o.toString();
			if(s2 != "[object Object]") {
				return s2;
			}
		}
		var k = null;
		var str2 = "{\n";
		s += "\t";
		var hasp = o.hasOwnProperty != null;
		for( var k in o ) {
		if(hasp && !o.hasOwnProperty(k)) {
			continue;
		}
		if(k == "prototype" || k == "__class__" || k == "__super__" || k == "__interfaces__" || k == "__properties__") {
			continue;
		}
		if(str2.length != 2) {
			str2 += ", \n";
		}
		str2 += s + k + " : " + js_Boot.__string_rec(o[k],s);
		}
		s = s.substring(1);
		str2 += "\n" + s + "}";
		return str2;
	case "string":
		return o;
	default:
		return String(o);
	}
};
js_Boot.__interfLoop = function(cc,cl) {
	if(cc == null) {
		return false;
	}
	if(cc == cl) {
		return true;
	}
	var intf = cc.__interfaces__;
	if(intf != null) {
		var _g1 = 0;
		var _g = intf.length;
		while(_g1 < _g) {
			var i = intf[_g1++];
			if(i == cl || js_Boot.__interfLoop(i,cl)) {
				return true;
			}
		}
	}
	return js_Boot.__interfLoop(cc.__super__,cl);
};
js_Boot.__instanceof = function(o,cl) {
	if(cl == null) {
		return false;
	}
	switch(cl) {
	case Array:
		if((o instanceof Array)) {
			return o.__enum__ == null;
		} else {
			return false;
		}
		break;
	case Bool:
		return typeof(o) == "boolean";
	case Dynamic:
		return true;
	case Float:
		return typeof(o) == "number";
	case Int:
		if(typeof(o) == "number") {
			return (o|0) === o;
		} else {
			return false;
		}
		break;
	case String:
		return typeof(o) == "string";
	default:
		if(o != null) {
			if(typeof(cl) == "function") {
				if(o instanceof cl) {
					return true;
				}
				if(js_Boot.__interfLoop(js_Boot.getClass(o),cl)) {
					return true;
				}
			} else if(typeof(cl) == "object" && js_Boot.__isNativeObj(cl)) {
				if(o instanceof cl) {
					return true;
				}
			}
		} else {
			return false;
		}
		if(cl == Class ? o.__name__ != null : false) {
			return true;
		}
		if(cl == Enum ? o.__ename__ != null : false) {
			return true;
		}
		return o.__enum__ == cl;
	}
};
js_Boot.__cast = function(o,t) {
	if(js_Boot.__instanceof(o,t)) {
		return o;
	} else {
		throw new js__$Boot_HaxeError("Cannot cast " + Std.string(o) + " to " + Std.string(t));
	}
};
js_Boot.__nativeClassName = function(o) {
	var name = js_Boot.__toStr.call(o).slice(8,-1);
	if(name == "Object" || name == "Function" || name == "Math" || name == "JSON") {
		return null;
	}
	return name;
};
js_Boot.__isNativeObj = function(o) {
	return js_Boot.__nativeClassName(o) != null;
};
js_Boot.__resolveNativeClass = function(name) {
	return $global[name];
};
var flixel_math_FlxRandom = function(InitialSeed) {
	this.internalSeed = 1;
	this._floatNormalRho = 0;
	this._twoPI = Math.PI * 2;
	this._floatNormalRand2 = 0;
	this._floatNormalRand1 = 0;
	this._hasFloatNormalSpare = false;
	this.initialSeed = 1;
	if(InitialSeed != null) {
		var lowerBound = InitialSeed < 1 ? 1 : InitialSeed;
		var NewSeed = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
		var lowerBound1 = NewSeed < 1 ? 1 : NewSeed;
		this.initialSeed = (this.internalSeed = (lowerBound1 > 2147483646 ? 2147483646 : lowerBound1) | 0) | 0;
	} else {
		var Value = Math.random() * 2147483647 | 0;
		var lowerBound2 = Value < 1 ? 1 : Value;
		var NewSeed1 = (lowerBound2 > 2147483646 ? 2147483646 : lowerBound2) | 0;
		var lowerBound3 = NewSeed1 < 1 ? 1 : NewSeed1;
		var NewSeed2 = (lowerBound3 > 2147483646 ? 2147483646 : lowerBound3) | 0;
		var lowerBound4 = NewSeed2 < 1 ? 1 : NewSeed2;
		this.initialSeed = (this.internalSeed = (lowerBound4 > 2147483646 ? 2147483646 : lowerBound4) | 0) | 0;
	}
};
$hxClasses["flixel.math.FlxRandom"] = flixel_math_FlxRandom;
flixel_math_FlxRandom.__name__ = ["flixel","math","FlxRandom"];
flixel_math_FlxRandom.rangeBound = function(Value) {
	var lowerBound = Value < 1 ? 1 : Value;
	return (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
};
flixel_math_FlxRandom.prototype = {
	getObject_flixel_group_FlxTypedGroup_T: function(Objects,WeightsArray,StartIndex,EndIndex) {
		if(StartIndex == null) {
			StartIndex = 0;
		}
		var selected = null;
		if(Objects.length != 0) {
			if(WeightsArray == null) {
				var _g = [];
				var _g2 = 0;
				var _g1 = Objects.length;
				while(_g2 < _g1) {
					++_g2;
					_g.push(1);
				}
				WeightsArray = _g;
			}
			if(EndIndex == null) {
				EndIndex = Objects.length - 1;
			}
			var Max = Objects.length - 1;
			var lowerBound = StartIndex < 0 ? 0 : StartIndex;
			StartIndex = (Max != null && lowerBound > Max ? Max : lowerBound) | 0;
			var Max1 = Objects.length - 1;
			var lowerBound1 = EndIndex < 0 ? 0 : EndIndex;
			EndIndex = (Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1) | 0;
			if(EndIndex < StartIndex) {
				StartIndex += EndIndex;
				EndIndex = StartIndex - EndIndex;
				StartIndex -= EndIndex;
			}
			if(EndIndex > WeightsArray.length - 1) {
				EndIndex = WeightsArray.length - 1;
			}
			var _g3 = [];
			var _g21 = StartIndex;
			var _g11 = EndIndex + 1;
			while(_g21 < _g11) _g3.push(WeightsArray[_g21++]);
			flixel_math_FlxRandom._arrayFloatHelper = _g3;
			selected = Objects[this.weightedPick(flixel_math_FlxRandom._arrayFloatHelper)];
		}
		return selected;
	}
	,resetInitialSeed: function() {
		var Value = Math.random() * 2147483647 | 0;
		var lowerBound = Value < 1 ? 1 : Value;
		var NewSeed = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
		var lowerBound1 = NewSeed < 1 ? 1 : NewSeed;
		var NewSeed1 = (lowerBound1 > 2147483646 ? 2147483646 : lowerBound1) | 0;
		var lowerBound2 = NewSeed1 < 1 ? 1 : NewSeed1;
		return this.initialSeed = (this.internalSeed = (lowerBound2 > 2147483646 ? 2147483646 : lowerBound2) | 0) | 0;
	}
	,'int': function(Min,Max,Excludes) {
		if(Max == null) {
			Max = 2147483647;
		}
		if(Min == null) {
			Min = 0;
		}
		if(Min == 0 && Max == 2147483647 && Excludes == null) {
			return (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) | 0;
		} else if(Min == Max) {
			return Min;
		} else {
			if(Min > Max) {
				Min += Max;
				Max = Min - Max;
				Min -= Max;
			}
			if(Excludes == null) {
				return Math.floor(Min + (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647 * (Max - Min + 1));
			} else {
				var result = 0;
				while(true) {
					result = Math.floor(Min + (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647 * (Max - Min + 1));
					if(!(Excludes.indexOf(result) >= 0)) {
						break;
					}
				}
				return result;
			}
		}
	}
	,'float': function(Min,Max,Excludes) {
		if(Max == null) {
			Max = 1;
		}
		if(Min == null) {
			Min = 0;
		}
		var result = 0;
		if(Min == 0 && Max == 1 && Excludes == null) {
			return (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647;
		} else if(Min == Max) {
			result = Min;
		} else {
			if(Min > Max) {
				Min += Max;
				Max = Min - Max;
				Min -= Max;
			}
			if(Excludes == null) {
				result = Min + (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647 * (Max - Min);
			} else {
				while(true) {
					result = Min + (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647 * (Max - Min);
					if(!(Excludes.indexOf(result) >= 0)) {
						break;
					}
				}
			}
		}
		return result;
	}
	,floatNormal: function(Mean,StdDev) {
		if(StdDev == null) {
			StdDev = 1;
		}
		if(Mean == null) {
			Mean = 0;
		}
		if(this._hasFloatNormalSpare) {
			this._hasFloatNormalSpare = false;
			return Mean + StdDev * this._floatNormalRho * this._floatNormalRand2;
		}
		this._hasFloatNormalSpare = true;
		var theta = this._twoPI * ((this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647);
		this._floatNormalRho = Math.sqrt(-2 * Math.log(1 - (this.internalSeed = this.internalSeed * 48271.0 % 2147483647) / 2147483647));
		this._floatNormalRand1 = Math.cos(theta);
		this._floatNormalRand2 = Math.sin(theta);
		return Mean + StdDev * this._floatNormalRho * this._floatNormalRand1;
	}
	,bool: function(Chance) {
		if(Chance == null) {
			Chance = 50;
		}
		return this["float"](0,100) < Chance;
	}
	,sign: function(Chance) {
		if(Chance == null) {
			Chance = 50;
		}
		if(this["float"](0,100) < Chance) {
			return 1;
		} else {
			return -1;
		}
	}
	,weightedPick: function(WeightsArray) {
		var totalWeight = 0;
		var pick = 0;
		var _g = 0;
		while(_g < WeightsArray.length) {
			var i = WeightsArray[_g];
			++_g;
			totalWeight += i;
		}
		totalWeight = this["float"](0,totalWeight);
		var _g1 = 0;
		var _g2 = WeightsArray.length;
		while(_g1 < _g2) {
			var i1 = _g1++;
			if(totalWeight < WeightsArray[i1]) {
				pick = i1;
				break;
			}
			totalWeight -= WeightsArray[i1];
		}
		return pick;
	}
	,color: function(Min,Max,Alpha,GreyScale) {
		if(GreyScale == null) {
			GreyScale = false;
		}
		var red;
		var green;
		var blue;
		var alpha;
		if(Min == null && Max == null) {
			red = this["int"](0,255);
			green = this["int"](0,255);
			blue = this["int"](0,255);
			if(Alpha == null) {
				alpha = this["int"](0,255);
			} else {
				alpha = Alpha;
			}
		} else if(Max == null) {
			red = this["int"](Min >> 16 & 255,255);
			if(GreyScale) {
				green = red;
			} else {
				green = this["int"](Min >> 8 & 255,255);
			}
			if(GreyScale) {
				blue = red;
			} else {
				blue = this["int"](Min & 255,255);
			}
			if(Alpha == null) {
				alpha = this["int"](Min >> 24 & 255,255);
			} else {
				alpha = Alpha;
			}
		} else if(Min == null) {
			red = this["int"](0,Max >> 16 & 255);
			if(GreyScale) {
				green = red;
			} else {
				green = this["int"](0,Max >> 8 & 255);
			}
			if(GreyScale) {
				blue = red;
			} else {
				blue = this["int"](0,Max & 255);
			}
			if(Alpha == null) {
				alpha = this["int"](0,Max >> 24 & 255);
			} else {
				alpha = Alpha;
			}
		} else {
			red = this["int"](Min >> 16 & 255,Max >> 16 & 255);
			if(GreyScale) {
				green = red;
			} else {
				green = this["int"](Min >> 8 & 255,Max >> 8 & 255);
			}
			if(GreyScale) {
				blue = red;
			} else {
				blue = this["int"](Min & 255,Max & 255);
			}
			if(Alpha == null) {
				alpha = this["int"](Min >> 24 & 255,Max >> 24 & 255);
			} else {
				alpha = Alpha;
			}
		}
		var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
		color &= -16711681;
		color |= (red > 255 ? 255 : red < 0 ? 0 : red) << 16;
		color &= -65281;
		color |= (green > 255 ? 255 : green < 0 ? 0 : green) << 8;
		color &= -256;
		color |= blue > 255 ? 255 : blue < 0 ? 0 : blue;
		color &= 16777215;
		color |= (alpha > 255 ? 255 : alpha < 0 ? 0 : alpha) << 24;
		return color;
	}
	,generate: function() {
		return this.internalSeed = this.internalSeed * 48271.0 % 2147483647;
	}
	,set_initialSeed: function(NewSeed) {
		var lowerBound = NewSeed < 1 ? 1 : NewSeed;
		var NewSeed1 = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
		var lowerBound1 = NewSeed1 < 1 ? 1 : NewSeed1;
		return this.initialSeed = (this.internalSeed = (lowerBound1 > 2147483646 ? 2147483646 : lowerBound1) | 0) | 0;
	}
	,get_currentSeed: function() {
		return this.internalSeed | 0;
	}
	,set_currentSeed: function(NewSeed) {
		var lowerBound = NewSeed < 1 ? 1 : NewSeed;
		return (this.internalSeed = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0) | 0;
	}
	,__class__: flixel_math_FlxRandom
	,__properties__: {set_currentSeed:"set_currentSeed",get_currentSeed:"get_currentSeed",set_initialSeed:"set_initialSeed"}
};
var flixel_util_FlxSave = function() {
	this._closeRequested = false;
};
$hxClasses["flixel.util.FlxSave"] = flixel_util_FlxSave;
flixel_util_FlxSave.__name__ = ["flixel","util","FlxSave"];
flixel_util_FlxSave.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_FlxSave.prototype = {
	destroy: function() {
		this._sharedObject = null;
		this.name = null;
		this.data = null;
		this._onComplete = null;
		this._closeRequested = false;
	}
	,bind: function(Name) {
		this.destroy();
		this.name = Name;
		try {
			this._sharedObject = openfl_net_SharedObject.getLocal(this.name);
		} catch( e ) {
			haxe_CallStack.lastException = e;
			if (e instanceof js__$Boot_HaxeError) e = e.val;
			if( js_Boot.__instanceof(e,openfl_errors_Error) ) {
				this.destroy();
				return false;
			} else throw(e);
		}
		this.data = this._sharedObject.data;
		return true;
	}
	,close: function(MinFileSize,OnComplete) {
		if(MinFileSize == null) {
			MinFileSize = 0;
		}
		this._closeRequested = true;
		return this.flush(MinFileSize,OnComplete);
	}
	,flush: function(MinFileSize,OnComplete) {
		if(MinFileSize == null) {
			MinFileSize = 0;
		}
		if(!this.checkBinding()) {
			return false;
		}
		this._onComplete = OnComplete;
		var result = null;
		try {
			result = this._sharedObject.flush();
		} catch( _ ) {
			haxe_CallStack.lastException = _;
			if (_ instanceof js__$Boot_HaxeError) _ = _.val;
			if( js_Boot.__instanceof(_,openfl_errors_Error) ) {
				return this.onDone(flixel_util_FlxSaveStatus.ERROR);
			} else throw(_);
		}
		return this.onDone(result == 0 ? flixel_util_FlxSaveStatus.SUCCESS : flixel_util_FlxSaveStatus.PENDING);
	}
	,erase: function() {
		if(!this.checkBinding()) {
			return false;
		}
		this._sharedObject.clear();
		this.data = { };
		return true;
	}
	,onDone: function(Result) {
		switch(Result[1]) {
		case 1:
			break;
		case 2:
			break;
		default:
		}
		if(this._onComplete != null) {
			this._onComplete(Result == flixel_util_FlxSaveStatus.SUCCESS);
		}
		if(this._closeRequested) {
			this.destroy();
		}
		return Result == flixel_util_FlxSaveStatus.SUCCESS;
	}
	,checkBinding: function() {
		if(this._sharedObject == null) {
			return false;
		}
		return true;
	}
	,__class__: flixel_util_FlxSave
};
var flixel_system_scaleModes_BaseScaleMode = function() {
	this.verticalAlign = flixel_util_FlxVerticalAlign.CENTER;
	this.horizontalAlign = flixel_util_FlxHorizontalAlign.CENTER;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this.deviceSize = point;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	this.gameSize = point1;
	var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
	point2._inPool = false;
	this.scale = point2;
	var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
	point3._inPool = false;
	this.offset = point3;
};
$hxClasses["flixel.system.scaleModes.BaseScaleMode"] = flixel_system_scaleModes_BaseScaleMode;
flixel_system_scaleModes_BaseScaleMode.__name__ = ["flixel","system","scaleModes","BaseScaleMode"];
flixel_system_scaleModes_BaseScaleMode.prototype = {
	onMeasure: function(Width,Height) {
		flixel_FlxG.width = flixel_FlxG.initialWidth;
		flixel_FlxG.height = flixel_FlxG.initialHeight;
		this.updateGameSize(Width,Height);
		this.updateDeviceSize(Width,Height);
		this.updateScaleOffset();
		this.updateGamePosition();
	}
	,updateGameSize: function(Width,Height) {
		this.gameSize.set(Width,Height);
	}
	,updateDeviceSize: function(Width,Height) {
		this.deviceSize.set(Width,Height);
	}
	,updateScaleOffset: function() {
		this.scale.set_x(this.gameSize.x / (flixel_FlxG.width * flixel_FlxG.initialZoom));
		this.scale.set_y(this.gameSize.y / (flixel_FlxG.height * flixel_FlxG.initialZoom));
		this.updateOffsetX();
		this.updateOffsetY();
	}
	,updateOffsetX: function() {
		var tmp;
		switch(this.horizontalAlign[1]) {
		case 0:
			tmp = 0;
			break;
		case 1:
			tmp = Math.ceil((this.deviceSize.x - this.gameSize.x) * 0.5);
			break;
		case 2:
			tmp = this.deviceSize.x - this.gameSize.x;
			break;
		}
		this.offset.set_x(tmp);
	}
	,updateOffsetY: function() {
		var tmp;
		switch(this.verticalAlign[1]) {
		case 0:
			tmp = 0;
			break;
		case 1:
			tmp = Math.ceil((this.deviceSize.y - this.gameSize.y) * 0.5);
			break;
		case 2:
			tmp = this.deviceSize.y - this.gameSize.y;
			break;
		}
		this.offset.set_y(tmp);
	}
	,updateGamePosition: function() {
		if(flixel_FlxG.game == null) {
			return;
		}
		flixel_FlxG.game.set_x(this.offset.x);
		flixel_FlxG.game.set_y(this.offset.y);
	}
	,set_horizontalAlign: function(value) {
		this.horizontalAlign = value;
		if(this.offset != null) {
			this.updateOffsetX();
			this.updateGamePosition();
		}
		return value;
	}
	,set_verticalAlign: function(value) {
		this.verticalAlign = value;
		if(this.offset != null) {
			this.updateOffsetY();
			this.updateGamePosition();
		}
		return value;
	}
	,__class__: flixel_system_scaleModes_BaseScaleMode
	,__properties__: {set_verticalAlign:"set_verticalAlign",set_horizontalAlign:"set_horizontalAlign"}
};
var flixel_system_scaleModes_RatioScaleMode = function(fillScreen) {
	if(fillScreen == null) {
		fillScreen = false;
	}
	flixel_system_scaleModes_BaseScaleMode.call(this);
	this.fillScreen = fillScreen;
};
$hxClasses["flixel.system.scaleModes.RatioScaleMode"] = flixel_system_scaleModes_RatioScaleMode;
flixel_system_scaleModes_RatioScaleMode.__name__ = ["flixel","system","scaleModes","RatioScaleMode"];
flixel_system_scaleModes_RatioScaleMode.__super__ = flixel_system_scaleModes_BaseScaleMode;
flixel_system_scaleModes_RatioScaleMode.prototype = $extend(flixel_system_scaleModes_BaseScaleMode.prototype,{
	updateGameSize: function(Width,Height) {
		var ratio = flixel_FlxG.width / flixel_FlxG.height;
		var scaleY = Width / Height < ratio;
		if(this.fillScreen) {
			scaleY = !scaleY;
		}
		if(scaleY) {
			this.gameSize.set_x(Width);
			this.gameSize.set_y(Math.floor(this.gameSize.x / ratio));
		} else {
			this.gameSize.set_y(Height);
			this.gameSize.set_x(Math.floor(this.gameSize.y * ratio));
		}
	}
	,__class__: flixel_system_scaleModes_RatioScaleMode
});
var flixel_system_frontEnds_SignalFrontEnd = function() {
	this.focusLost = new flixel_util__$FlxSignal_FlxSignal0();
	this.focusGained = new flixel_util__$FlxSignal_FlxSignal0();
	this.postDraw = new flixel_util__$FlxSignal_FlxSignal0();
	this.preDraw = new flixel_util__$FlxSignal_FlxSignal0();
	this.postUpdate = new flixel_util__$FlxSignal_FlxSignal0();
	this.preUpdate = new flixel_util__$FlxSignal_FlxSignal0();
	this.gameStarted = new flixel_util__$FlxSignal_FlxSignal0();
	this.postGameReset = new flixel_util__$FlxSignal_FlxSignal0();
	this.preGameReset = new flixel_util__$FlxSignal_FlxSignal0();
	this.gameResized = new flixel_util__$FlxSignal_FlxSignal2();
	this.preStateCreate = new flixel_util__$FlxSignal_FlxSignal1();
	this.stateSwitched = new flixel_util__$FlxSignal_FlxSignal0();
};
$hxClasses["flixel.system.frontEnds.SignalFrontEnd"] = flixel_system_frontEnds_SignalFrontEnd;
flixel_system_frontEnds_SignalFrontEnd.__name__ = ["flixel","system","frontEnds","SignalFrontEnd"];
flixel_system_frontEnds_SignalFrontEnd.prototype = {
	__class__: flixel_system_frontEnds_SignalFrontEnd
};
var flixel_system_frontEnds_WatchFrontEnd = function() {
};
$hxClasses["flixel.system.frontEnds.WatchFrontEnd"] = flixel_system_frontEnds_WatchFrontEnd;
flixel_system_frontEnds_WatchFrontEnd.__name__ = ["flixel","system","frontEnds","WatchFrontEnd"];
flixel_system_frontEnds_WatchFrontEnd.prototype = {
	add: function(object,field,displayName) {
	}
	,remove: function(object,field) {
	}
	,addQuick: function(displayName,value) {
	}
	,removeQuick: function(displayName) {
	}
	,addExpression: function(expression,displayName) {
	}
	,removeExpression: function(expression) {
	}
	,addMouse: function() {
	}
	,removeMouse: function() {
	}
	,__class__: flixel_system_frontEnds_WatchFrontEnd
};
var flixel_FlxG = function() { };
$hxClasses["flixel.FlxG"] = flixel_FlxG;
flixel_FlxG.__name__ = ["flixel","FlxG"];
flixel_FlxG.__properties__ = {set_mouse:"set_mouse",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_scaleMode:"set_scaleMode",get_onMobile:"get_onMobile",set_drawFramerate:"set_drawFramerate",set_updateFramerate:"set_updateFramerate",get_state:"get_state",get_stage:"get_stage"}
flixel_FlxG.camera = null;
flixel_FlxG.game = null;
flixel_FlxG.updateFramerate = null;
flixel_FlxG.drawFramerate = null;
flixel_FlxG.renderMethod = null;
flixel_FlxG.renderBlit = null;
flixel_FlxG.renderTile = null;
flixel_FlxG.width = null;
flixel_FlxG.height = null;
flixel_FlxG.mouse = null;
flixel_FlxG.touches = null;
flixel_FlxG.keys = null;
flixel_FlxG.gamepads = null;
flixel_FlxG.vcr = null;
flixel_FlxG.plugins = null;
flixel_FlxG.sound = null;
flixel_FlxG.resizeGame = function(Width,Height) {
	flixel_FlxG.scaleMode.onMeasure(Width,Height);
};
flixel_FlxG.resizeWindow = function(Width,Height) {
};
flixel_FlxG.resetGame = function() {
	flixel_FlxG.game._resetGame = true;
};
flixel_FlxG.switchState = function(nextState) {
	if(flixel_FlxG.game._state.switchTo(nextState)) {
		flixel_FlxG.game._requestedState = nextState;
	}
};
flixel_FlxG.resetState = function() {
	var o = flixel_FlxG.game._state;
	var nextState = Type.createInstance(o == null ? null : js_Boot.getClass(o),[]);
	if(flixel_FlxG.game._state.switchTo(nextState)) {
		flixel_FlxG.game._requestedState = nextState;
	}
};
flixel_FlxG.overlap = function(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback,ProcessCallback) {
	if(ObjectOrGroup1 == null) {
		ObjectOrGroup1 = flixel_FlxG.game._state;
	}
	if(ObjectOrGroup2 == ObjectOrGroup1) {
		ObjectOrGroup2 = null;
	}
	flixel_system_FlxQuadTree.divisions = flixel_FlxG.worldDivisions;
	var quadTree = flixel_system_FlxQuadTree.recycle(flixel_FlxG.worldBounds.x,flixel_FlxG.worldBounds.y,flixel_FlxG.worldBounds.width,flixel_FlxG.worldBounds.height);
	quadTree.load(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback,ProcessCallback);
	var result = quadTree.execute();
	quadTree.destroy();
	return result;
};
flixel_FlxG.pixelPerfectOverlap = function(Sprite1,Sprite2,AlphaTolerance,Camera) {
	if(AlphaTolerance == null) {
		AlphaTolerance = 255;
	}
	return flixel_util_FlxCollision.pixelPerfectCheck(Sprite1,Sprite2,AlphaTolerance,Camera);
};
flixel_FlxG.collide = function(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback) {
	return flixel_FlxG.overlap(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback,flixel_FlxObject.separate);
};
flixel_FlxG.addPostProcess = function(postProcess) {
	return postProcess;
};
flixel_FlxG.removePostProcess = function(postProcess) {
};
flixel_FlxG.openURL = function(URL,Target) {
	if(Target == null) {
		Target = "_blank";
	}
	var prefix = "";
	if(!new EReg("^https?://","").match(URL)) {
		prefix = "http://";
	}
	openfl_Lib.getURL(new openfl_net_URLRequest(prefix + URL),Target);
};
flixel_FlxG.init = function(Game,Width,Height,Zoom) {
	flixel_FlxG.game = Game;
	flixel_FlxG.width = Math.abs(Width) | 0;
	flixel_FlxG.height = Math.abs(Height) | 0;
	flixel_FlxG.initRenderMethod();
	flixel_FlxG.initialWidth = flixel_FlxG.width;
	flixel_FlxG.initialHeight = flixel_FlxG.height;
	flixel_FlxG.initialZoom = flixel_FlxCamera.defaultZoom = Zoom;
	flixel_FlxG.scaleMode.onMeasure(openfl_Lib.current.stage.stageWidth,openfl_Lib.current.stage.stageHeight);
	flixel_FlxG.keys = flixel_FlxG.inputs.add_flixel_input_keyboard_FlxKeyboard(new flixel_input_keyboard_FlxKeyboard());
	flixel_FlxG.set_mouse(flixel_FlxG.inputs.add_flixel_input_mouse_FlxMouse(new flixel_input_mouse_FlxMouse(flixel_FlxG.game._inputContainer)));
	flixel_FlxG.touches = flixel_FlxG.inputs.add_flixel_input_touch_FlxTouchManager(new flixel_input_touch_FlxTouchManager());
	flixel_FlxG.gamepads = flixel_FlxG.inputs.add_flixel_input_gamepad_FlxGamepadManager(new flixel_input_gamepad_FlxGamepadManager());
	flixel_FlxG.save.bind("flixel");
	flixel_FlxG.plugins = new flixel_system_frontEnds_PluginFrontEnd();
	flixel_FlxG.vcr = new flixel_system_frontEnds_VCRFrontEnd();
	flixel_FlxG.sound = new flixel_system_frontEnds_SoundFrontEnd();
};
flixel_FlxG.initRenderMethod = function() {
	flixel_FlxG.renderMethod = flixel_FlxRenderMethod.BLITTING;
	if(!openfl_Lib.application.config.windows[0].hardware) {
		flixel_FlxG.renderMethod = flixel_FlxRenderMethod.BLITTING;
	} else {
		var tmp;
		switch(openfl_Lib.current.stage.window.renderer.type[1]) {
		case 1:case 3:case 4:
			tmp = flixel_FlxRenderMethod.BLITTING;
			break;
		case 0:case 5:
			tmp = flixel_FlxRenderMethod.DRAW_TILES;
			break;
		default:
			tmp = flixel_FlxRenderMethod.BLITTING;
		}
		flixel_FlxG.renderMethod = tmp;
	}
	flixel_FlxG.renderBlit = flixel_FlxG.renderMethod == flixel_FlxRenderMethod.BLITTING;
	flixel_FlxG.renderTile = flixel_FlxG.renderMethod == flixel_FlxRenderMethod.DRAW_TILES;
	flixel_FlxObject.defaultPixelPerfectPosition = flixel_FlxG.renderBlit;
};
flixel_FlxG.reset = function() {
	var _this = flixel_FlxG.random;
	var Value = Math.random() * 2147483647 | 0;
	var lowerBound = Value < 1 ? 1 : Value;
	var NewSeed = (lowerBound > 2147483646 ? 2147483646 : lowerBound) | 0;
	var lowerBound1 = NewSeed < 1 ? 1 : NewSeed;
	var NewSeed1 = (lowerBound1 > 2147483646 ? 2147483646 : lowerBound1) | 0;
	var lowerBound2 = NewSeed1 < 1 ? 1 : NewSeed1;
	_this.initialSeed = (_this.internalSeed = (lowerBound2 > 2147483646 ? 2147483646 : lowerBound2) | 0) | 0;
	flixel_FlxG.bitmap.reset();
	flixel_FlxG.inputs.reset();
	flixel_FlxG.sound.destroy(true);
	flixel_FlxG.autoPause = true;
	flixel_FlxG.fixedTimestep = true;
	flixel_FlxG.timeScale = 1.0;
	flixel_FlxG.elapsed = 0;
	flixel_FlxG.maxElapsed = 0.1;
	var _this1 = flixel_FlxG.worldBounds;
	_this1.x = -10;
	_this1.y = -10;
	_this1.width = flixel_FlxG.width + 20;
	_this1.height = flixel_FlxG.height + 20;
	flixel_FlxG.worldDivisions = 6;
};
flixel_FlxG.set_scaleMode = function(ScaleMode) {
	flixel_FlxG.scaleMode = ScaleMode;
	flixel_FlxG.game.onResize(null);
	return ScaleMode;
};
flixel_FlxG.set_mouse = function(NewMouse) {
	if(flixel_FlxG.mouse == null) {
		flixel_FlxG.mouse = flixel_FlxG.inputs.add_flixel_input_mouse_FlxMouse(NewMouse);
		return flixel_FlxG.mouse;
	}
	var oldMouse = flixel_FlxG.mouse;
	var result = flixel_FlxG.inputs.replace_flixel_input_mouse_FlxMouse(oldMouse,NewMouse);
	if(result != null) {
		flixel_FlxG.mouse = result;
		oldMouse.destroy();
		return NewMouse;
	}
	return oldMouse;
};
flixel_FlxG.set_updateFramerate = function(Framerate) {
	flixel_FlxG.updateFramerate = Framerate;
	flixel_FlxG.game._stepMS = Math.abs(1000 / Framerate);
	flixel_FlxG.game._stepSeconds = flixel_FlxG.game._stepMS / 1000;
	if(flixel_FlxG.game._maxAccumulation < flixel_FlxG.game._stepMS) {
		flixel_FlxG.game._maxAccumulation = flixel_FlxG.game._stepMS;
	}
	return Framerate;
};
flixel_FlxG.set_drawFramerate = function(Framerate) {
	flixel_FlxG.drawFramerate = Math.abs(Framerate) | 0;
	if(flixel_FlxG.game.stage != null) {
		flixel_FlxG.game.stage.set_frameRate(flixel_FlxG.drawFramerate);
	}
	flixel_FlxG.game._maxAccumulation = 2000 / flixel_FlxG.drawFramerate - 1;
	if(flixel_FlxG.game._maxAccumulation < flixel_FlxG.game._stepMS) {
		flixel_FlxG.game._maxAccumulation = flixel_FlxG.game._stepMS;
	}
	return Framerate;
};
flixel_FlxG.get_fullscreen = function() {
	if(openfl_Lib.current.stage.get_displayState() != 0) {
		return openfl_Lib.current.stage.get_displayState() == 1;
	} else {
		return true;
	}
};
flixel_FlxG.set_fullscreen = function(Value) {
	openfl_Lib.current.stage.set_displayState(Value ? 0 : 2);
	return Value;
};
flixel_FlxG.get_stage = function() {
	return openfl_Lib.current.stage;
};
flixel_FlxG.get_state = function() {
	return flixel_FlxG.game._state;
};
flixel_FlxG.get_onMobile = function() {
	return flixel_FlxG.html5.onMobile;
};
var flixel_FlxRenderMethod = $hxClasses["flixel.FlxRenderMethod"] = { __ename__ : ["flixel","FlxRenderMethod"], __constructs__ : ["DRAW_TILES","BLITTING"] };
flixel_FlxRenderMethod.DRAW_TILES = ["DRAW_TILES",0];
flixel_FlxRenderMethod.DRAW_TILES.toString = $estr;
flixel_FlxRenderMethod.DRAW_TILES.__enum__ = flixel_FlxRenderMethod;
flixel_FlxRenderMethod.BLITTING = ["BLITTING",1];
flixel_FlxRenderMethod.BLITTING.toString = $estr;
flixel_FlxRenderMethod.BLITTING.__enum__ = flixel_FlxRenderMethod;
var flixel_FlxGame = function(GameWidth,GameHeight,InitialState,Zoom,UpdateFramerate,DrawFramerate,SkipSplash,StartFullscreen) {
	if(StartFullscreen == null) {
		StartFullscreen = false;
	}
	if(SkipSplash == null) {
		SkipSplash = false;
	}
	if(DrawFramerate == null) {
		DrawFramerate = 60;
	}
	if(UpdateFramerate == null) {
		UpdateFramerate = 60;
	}
	if(Zoom == null) {
		Zoom = 1;
	}
	if(GameHeight == null) {
		GameHeight = 0;
	}
	if(GameWidth == null) {
		GameWidth = 0;
	}
	this._resetGame = false;
	this._skipSplash = false;
	this._customFocusLostScreen = flixel_system_ui_FlxFocusLostScreen;
	this._customSoundTray = flixel_system_ui_FlxSoundTray;
	this._lostFocus = false;
	this._startTime = 0;
	this._total = 0;
	this._gameJustStarted = false;
	this.filtersEnabled = true;
	this.ticks = 0;
	this.focusLostFramerate = 10;
	openfl_display_Sprite.call(this);
	this._inputContainer = new openfl_display_Sprite();
	if(GameWidth == 0) {
		GameWidth = openfl_Lib.current.stage.stageWidth;
	}
	if(GameHeight == 0) {
		GameHeight = openfl_Lib.current.stage.stageHeight;
	}
	flixel_FlxG.init(this,GameWidth,GameHeight,Zoom);
	flixel_FlxG.set_updateFramerate(UpdateFramerate);
	flixel_FlxG.set_drawFramerate(DrawFramerate);
	this._accumulator = this._stepMS;
	this._skipSplash = SkipSplash;
	this._initialState = InitialState == null ? flixel_FlxState : InitialState;
	this.addEventListener("addedToStage",$bind(this,this.create));
};
$hxClasses["flixel.FlxGame"] = flixel_FlxGame;
flixel_FlxGame.__name__ = ["flixel","FlxGame"];
flixel_FlxGame.__super__ = openfl_display_Sprite;
flixel_FlxGame.prototype = $extend(openfl_display_Sprite.prototype,{
	setFilters: function(filters) {
		this._filters = filters;
	}
	,create: function(_) {
		if(this.stage == null) {
			return;
		}
		this.removeEventListener("addedToStage",$bind(this,this.create));
		this._startTime = this.getTimer();
		this._total = this.getTimer() - this._startTime;
		this.stage.scaleMode = 2;
		this.stage.align = 6;
		this.stage.set_frameRate(flixel_FlxG.drawFramerate);
		this.addChild(this._inputContainer);
		this.soundTray = Type.createInstance(this._customSoundTray,[]);
		this.addChild(this.soundTray);
		this._focusLostScreen = Type.createInstance(this._customFocusLostScreen,[]);
		this.addChild(this._focusLostScreen);
		this.stage.addEventListener("deactivate",$bind(this,this.onFocusLost));
		this.stage.addEventListener("activate",$bind(this,this.onFocus));
		flixel_FlxG.signals.preGameReset.dispatch();
		if(this._skipSplash || flixel_system_FlxSplash.nextState != null) {
			this._requestedState = Type.createInstance(this._initialState,[]);
			if(flixel_system_FlxSplash.nextState == null) {
				this._gameJustStarted = true;
			}
		} else {
			flixel_system_FlxSplash.nextState = this._initialState;
			this._requestedState = new flixel_system_FlxSplash();
			this._skipSplash = true;
		}
		flixel_FlxG.reset();
		flixel_FlxG.signals.postGameReset.dispatch();
		this.switchState();
		this.stage.addEventListener("enterFrame",$bind(this,this.onEnterFrame));
		this.stage.addEventListener("resize",$bind(this,this.onResize));
		this.resizeGame(openfl_Lib.current.stage.stageWidth,openfl_Lib.current.stage.stageHeight);
		openfl_Assets.addEventListener("change",($_=flixel_FlxG.bitmap,$bind($_,$_.onAssetsReload)));
	}
	,onFocus: function(_) {
		this._lostFocus = false;
		flixel_FlxG.signals.focusGained.dispatch();
		if(!flixel_FlxG.autoPause) {
			return;
		}
		if(this._focusLostScreen != null) {
			this._focusLostScreen.set_visible(false);
		}
		this.stage.set_frameRate(flixel_FlxG.drawFramerate);
		flixel_FlxG.sound.onFocus();
		var _g = 0;
		var _g1 = flixel_FlxG.inputs.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.onFocus();
		}
	}
	,onFocusLost: function(_) {
		this._lostFocus = true;
		flixel_FlxG.signals.focusLost.dispatch();
		if(!flixel_FlxG.autoPause) {
			return;
		}
		if(this._focusLostScreen != null) {
			this._focusLostScreen.set_visible(true);
		}
		this.stage.set_frameRate(this.focusLostFramerate);
		flixel_FlxG.sound.onFocusLost();
		var _g = 0;
		var _g1 = flixel_FlxG.inputs.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.onFocusLost();
		}
	}
	,onResize: function(_) {
		var width = openfl_Lib.current.stage.stageWidth;
		var height = openfl_Lib.current.stage.stageHeight;
		if(flixel_FlxG.renderTile) {
			flixel_FlxG.bitmap.onContext();
		}
		this.resizeGame(width,height);
	}
	,resizeGame: function(width,height) {
		flixel_FlxG.scaleMode.onMeasure(width,height);
		this._state.onResize(width,height);
		flixel_FlxG.signals.gameResized.dispatch(width,height);
		flixel_FlxG.cameras.resize();
		if(this._focusLostScreen != null) {
			this._focusLostScreen.draw();
		}
		if(this.soundTray != null) {
			this.soundTray.screenCenter();
		}
	}
	,onEnterFrame: function(_) {
		this.ticks = this.getTimer() - this._startTime;
		this._elapsedMS = this.ticks - this._total;
		this._total = this.ticks;
		if(this.soundTray != null && this.soundTray.active) {
			this.soundTray.update(this._elapsedMS);
		}
		if(!this._lostFocus || !flixel_FlxG.autoPause) {
			if(flixel_FlxG.vcr.paused) {
				if(flixel_FlxG.vcr.stepRequested) {
					flixel_FlxG.vcr.stepRequested = false;
				} else if(this._state == this._requestedState) {
					return;
				}
			}
			if(flixel_FlxG.fixedTimestep) {
				this._accumulator += this._elapsedMS;
				this._accumulator = this._accumulator > this._maxAccumulation ? this._maxAccumulation : this._accumulator;
				while(this._accumulator >= this._stepMS) {
					this.step();
					this._accumulator -= this._stepMS;
				}
			} else {
				this.step();
			}
			this.draw();
		}
	}
	,resetGame: function() {
		flixel_FlxG.signals.preGameReset.dispatch();
		if(this._skipSplash || flixel_system_FlxSplash.nextState != null) {
			this._requestedState = Type.createInstance(this._initialState,[]);
			if(flixel_system_FlxSplash.nextState == null) {
				this._gameJustStarted = true;
			}
		} else {
			flixel_system_FlxSplash.nextState = this._initialState;
			this._requestedState = new flixel_system_FlxSplash();
			this._skipSplash = true;
		}
		flixel_FlxG.reset();
		flixel_FlxG.signals.postGameReset.dispatch();
	}
	,switchState: function() {
		flixel_FlxG.cameras.reset();
		flixel_FlxG.inputs.onStateSwitch();
		flixel_FlxG.sound.destroy();
		flixel_FlxG.signals.stateSwitched.dispatch();
		if(this._state != null) {
			this._state.destroy();
		}
		flixel_FlxG.bitmap.clearCache();
		this._state = this._requestedState;
		flixel_FlxG.signals.preStateCreate.dispatch(this._state);
		this._state.create();
		if(this._gameJustStarted) {
			this.gameStart();
		}
	}
	,gameStart: function() {
		flixel_FlxG.signals.gameStarted.dispatch();
		this._gameJustStarted = false;
	}
	,step: function() {
		if(this._resetGame) {
			flixel_FlxG.signals.preGameReset.dispatch();
			if(this._skipSplash || flixel_system_FlxSplash.nextState != null) {
				this._requestedState = Type.createInstance(this._initialState,[]);
				if(flixel_system_FlxSplash.nextState == null) {
					this._gameJustStarted = true;
				}
			} else {
				flixel_system_FlxSplash.nextState = this._initialState;
				this._requestedState = new flixel_system_FlxSplash();
				this._skipSplash = true;
			}
			flixel_FlxG.reset();
			flixel_FlxG.signals.postGameReset.dispatch();
			this._resetGame = false;
		}
		this.update();
	}
	,handleReplayRequests: function() {
	}
	,update: function() {
		if(!this._state.active || !this._state.exists) {
			return;
		}
		if(this._state != this._requestedState) {
			this.switchState();
		}
		this.updateElapsed();
		flixel_FlxG.signals.preUpdate.dispatch();
		this.updateInput();
		flixel_FlxG.sound.update(flixel_FlxG.elapsed);
		var elapsed = flixel_FlxG.elapsed;
		var _g = 0;
		var _g1 = flixel_FlxG.plugins.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(plugin.exists && plugin.active) {
				plugin.update(elapsed);
			}
		}
		this._state.tryUpdate(flixel_FlxG.elapsed);
		var elapsed1 = flixel_FlxG.elapsed;
		var _g2 = 0;
		var _g11 = flixel_FlxG.cameras.list;
		while(_g2 < _g11.length) {
			var camera = _g11[_g2];
			++_g2;
			if(camera != null && camera.exists && camera.active) {
				camera.update(elapsed1);
			}
		}
		flixel_FlxG.signals.postUpdate.dispatch();
		flixel_util_FlxArrayUtil.clearArray(flixel_FlxG.swipes);
		this.set_filters(this.filtersEnabled ? this._filters : null);
	}
	,updateElapsed: function() {
		if(flixel_FlxG.fixedTimestep) {
			flixel_FlxG.elapsed = flixel_FlxG.timeScale * this._stepSeconds;
		} else {
			flixel_FlxG.elapsed = flixel_FlxG.timeScale * (this._elapsedMS / 1000);
			var max = flixel_FlxG.maxElapsed * flixel_FlxG.timeScale;
			if(flixel_FlxG.elapsed > max) {
				flixel_FlxG.elapsed = max;
			}
		}
	}
	,updateInput: function() {
		var _g = 0;
		var _g1 = flixel_FlxG.inputs.list;
		while(_g < _g1.length) {
			var input = _g1[_g];
			++_g;
			input.update();
		}
	}
	,draw: function() {
		if(!this._state.visible || !this._state.exists) {
			return;
		}
		flixel_FlxG.signals.preDraw.dispatch();
		if(flixel_FlxG.renderTile) {
			flixel_graphics_tile_FlxTilesheet._DRAWCALLS = 0;
		}
		var _g = 0;
		var _g1 = flixel_FlxG.cameras.list;
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(camera == null || !camera.exists || !camera.visible) {
				continue;
			}
			if(flixel_FlxG.renderBlit) {
				camera.checkResize();
			}
			if(flixel_FlxG.renderTile) {
				camera.clearDrawStack();
				camera.canvas.get_graphics().clear();
			}
			if(flixel_FlxG.renderBlit) {
				camera.fill(camera.bgColor,camera.useBgAlphaBlending);
				camera.screen.dirty = true;
			} else {
				camera.fill(camera.bgColor & 16777215,camera.useBgAlphaBlending,(camera.bgColor >> 24 & 255) / 255);
			}
		}
		var _g2 = 0;
		var _g11 = flixel_FlxG.plugins.list;
		while(_g2 < _g11.length) {
			var plugin = _g11[_g2];
			++_g2;
			if(plugin.exists && plugin.visible) {
				plugin.draw();
			}
		}
		this._state.draw();
		if(flixel_FlxG.renderTile) {
			if(flixel_FlxG.renderTile) {
				var _g3 = 0;
				var _g12 = flixel_FlxG.cameras.list;
				while(_g3 < _g12.length) {
					var camera1 = _g12[_g3];
					++_g3;
					if(camera1 != null && camera1.exists && camera1.visible) {
						camera1.render();
					}
				}
			}
		}
		var _g4 = 0;
		var _g13 = flixel_FlxG.cameras.list;
		while(_g4 < _g13.length) {
			var camera2 = _g13[_g4];
			++_g4;
			if(camera2 == null || !camera2.exists || !camera2.visible) {
				continue;
			}
			camera2.drawFX();
			if(flixel_FlxG.renderBlit) {
				camera2.screen.dirty = true;
			}
		}
		flixel_FlxG.signals.postDraw.dispatch();
	}
	,getTicks: function() {
		return this.getTimer() - this._startTime;
	}
	,getTimer: function() {
		return openfl_Lib.getTimer();
	}
	,__class__: flixel_FlxGame
});
var flixel_IFlxSprite = function() { };
$hxClasses["flixel.IFlxSprite"] = flixel_IFlxSprite;
flixel_IFlxSprite.__name__ = ["flixel","IFlxSprite"];
flixel_IFlxSprite.__interfaces__ = [flixel_IFlxBasic];
flixel_IFlxSprite.prototype = {
	__class__: flixel_IFlxSprite
	,__properties__: {set_immovable:"set_immovable",set_moves:"set_moves",set_facing:"set_facing",set_angle:"set_angle",set_alpha:"set_alpha",set_y:"set_y",set_x:"set_x"}
};
var flixel_addons_editors_tiled_TiledLayer = function(source,parent) {
	this.properties = new flixel_addons_editors_tiled_TiledPropertySet();
	this.map = parent;
	this.name = source.att.resolve("name");
	this.visible = source.has.resolve("visible") && source.att.resolve("visible") == "0" ? false : true;
	this.opacity = source.has.resolve("opacity") ? parseFloat(source.att.resolve("opacity")) : 1.0;
	this.offsetX = source.has.resolve("offsetx") ? parseFloat(source.att.resolve("offsetx")) : 0.0;
	this.offsetY = source.has.resolve("offsety") ? parseFloat(source.att.resolve("offsety")) : 0.0;
	this.loadProperties(source);
};
$hxClasses["flixel.addons.editors.tiled.TiledLayer"] = flixel_addons_editors_tiled_TiledLayer;
flixel_addons_editors_tiled_TiledLayer.__name__ = ["flixel","addons","editors","tiled","TiledLayer"];
flixel_addons_editors_tiled_TiledLayer.prototype = {
	loadProperties: function(source) {
		var _g_head = source.nodes.resolve("properties").h;
		while(_g_head != null) {
			var val = _g_head.item;
			_g_head = _g_head.next;
			this.properties.extend(val);
		}
	}
	,__class__: flixel_addons_editors_tiled_TiledLayer
};
var flixel_addons_editors_tiled_TiledImageLayer = function(source,parent) {
	flixel_addons_editors_tiled_TiledLayer.call(this,source,parent);
	this.type = flixel_addons_editors_tiled_TiledLayerType.IMAGE;
	this.imagePath = source.node.resolve("image").att.resolve("source");
	this.x = source.has.resolve("x") ? Std.parseInt(source.att.resolve("x")) : 0;
	this.y = source.has.resolve("y") ? Std.parseInt(source.att.resolve("y")) : 0;
};
$hxClasses["flixel.addons.editors.tiled.TiledImageLayer"] = flixel_addons_editors_tiled_TiledImageLayer;
flixel_addons_editors_tiled_TiledImageLayer.__name__ = ["flixel","addons","editors","tiled","TiledImageLayer"];
flixel_addons_editors_tiled_TiledImageLayer.__super__ = flixel_addons_editors_tiled_TiledLayer;
flixel_addons_editors_tiled_TiledImageLayer.prototype = $extend(flixel_addons_editors_tiled_TiledLayer.prototype,{
	__class__: flixel_addons_editors_tiled_TiledImageLayer
});
var flixel_addons_editors_tiled_TiledImageTile = function(Source) {
	var _g_head = Source.nodes.resolve("image").h;
	while(_g_head != null) {
		var val = _g_head.item;
		_g_head = _g_head.next;
		this.width = parseFloat(val.att.resolve("width"));
		this.height = parseFloat(val.att.resolve("height"));
		this.source = val.att.resolve("source");
	}
};
$hxClasses["flixel.addons.editors.tiled.TiledImageTile"] = flixel_addons_editors_tiled_TiledImageTile;
flixel_addons_editors_tiled_TiledImageTile.__name__ = ["flixel","addons","editors","tiled","TiledImageTile"];
flixel_addons_editors_tiled_TiledImageTile.prototype = {
	__class__: flixel_addons_editors_tiled_TiledImageTile
};
var flixel_addons_editors_tiled_TiledLayerType = $hxClasses["flixel.addons.editors.tiled.TiledLayerType"] = { __ename__ : ["flixel","addons","editors","tiled","TiledLayerType"], __constructs__ : ["TILE","OBJECT","IMAGE"] };
flixel_addons_editors_tiled_TiledLayerType.TILE = ["TILE",0];
flixel_addons_editors_tiled_TiledLayerType.TILE.toString = $estr;
flixel_addons_editors_tiled_TiledLayerType.TILE.__enum__ = flixel_addons_editors_tiled_TiledLayerType;
flixel_addons_editors_tiled_TiledLayerType.OBJECT = ["OBJECT",1];
flixel_addons_editors_tiled_TiledLayerType.OBJECT.toString = $estr;
flixel_addons_editors_tiled_TiledLayerType.OBJECT.__enum__ = flixel_addons_editors_tiled_TiledLayerType;
flixel_addons_editors_tiled_TiledLayerType.IMAGE = ["IMAGE",2];
flixel_addons_editors_tiled_TiledLayerType.IMAGE.toString = $estr;
flixel_addons_editors_tiled_TiledLayerType.IMAGE.__enum__ = flixel_addons_editors_tiled_TiledLayerType;
var flixel_addons_editors_tiled_TiledObject = function(source,parent) {
	this.xmlData = source;
	this.layer = parent;
	this.name = source.has.resolve("name") ? source.att.resolve("name") : "";
	this.type = source.has.resolve("type") ? source.att.resolve("type") : parent.properties.keys.exists("defaultType") ? parent.properties.keys.get("defaultType") : "";
	this.x = Std.parseInt(source.att.resolve("x"));
	this.y = Std.parseInt(source.att.resolve("y"));
	this.width = source.has.resolve("width") ? Std.parseInt(source.att.resolve("width")) : 0;
	this.height = source.has.resolve("height") ? Std.parseInt(source.att.resolve("height")) : 0;
	this.angle = source.has.resolve("rotation") ? parseFloat(source.att.resolve("rotation")) : 0;
	this.objectType = 0;
	this.shared = null;
	this.gid = -1;
	if(source.has.resolve("gid") && source.att.resolve("gid").length != 0) {
		this.gid = Std.parseInt(source.att.resolve("gid"));
		var _this = this.layer.map.tilesets;
		var set = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
		while(set.hasNext()) {
			this.shared = set.next().getPropertiesByGid(this.gid);
			if(this.shared != null) {
				break;
			}
		}
		this.objectType = 4;
	}
	this.properties = new flixel_addons_editors_tiled_TiledPropertySet();
	var _g_head = source.nodes.resolve("properties").h;
	while(_g_head != null) {
		var val = _g_head.item;
		_g_head = _g_head.next;
		this.properties.extend(val);
	}
	if(source.hasNode.resolve("ellipse")) {
		this.objectType = 1;
	} else if(source.hasNode.resolve("polygon")) {
		this.objectType = 2;
		this.getPoints(source.node.resolve("polygon"));
	} else if(source.hasNode.resolve("polyline")) {
		this.objectType = 3;
		this.getPoints(source.node.resolve("polyline"));
	}
};
$hxClasses["flixel.addons.editors.tiled.TiledObject"] = flixel_addons_editors_tiled_TiledObject;
flixel_addons_editors_tiled_TiledObject.__name__ = ["flixel","addons","editors","tiled","TiledObject"];
flixel_addons_editors_tiled_TiledObject.prototype = {
	getPoints: function(node) {
		this.points = [];
		var pointsStr = node.att.resolve("points").split(" ");
		var pair;
		var _g = 0;
		while(_g < pointsStr.length) {
			var p = pointsStr[_g];
			++_g;
			pair = p.split(",");
			var tmp = this.points;
			var X = parseFloat(pair[0]);
			var Y = parseFloat(pair[1]);
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			tmp.push(point);
		}
	}
	,get_flippedHorizontally: function() {
		return (this.gid & -2147483648) > 0;
	}
	,get_flippedVertically: function() {
		return (this.gid & 1073741824) > 0;
	}
	,__class__: flixel_addons_editors_tiled_TiledObject
	,__properties__: {get_flippedVertically:"get_flippedVertically",get_flippedHorizontally:"get_flippedHorizontally"}
};
var flixel_addons_editors_tiled_TiledObjectLayer = function(source,parent) {
	flixel_addons_editors_tiled_TiledLayer.call(this,source,parent);
	this.type = flixel_addons_editors_tiled_TiledLayerType.OBJECT;
	this.objects = [];
	this.color = source.has.resolve("color") ? flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(source.att.resolve("color")) : 0;
	this.loadObjects(source);
};
$hxClasses["flixel.addons.editors.tiled.TiledObjectLayer"] = flixel_addons_editors_tiled_TiledObjectLayer;
flixel_addons_editors_tiled_TiledObjectLayer.__name__ = ["flixel","addons","editors","tiled","TiledObjectLayer"];
flixel_addons_editors_tiled_TiledObjectLayer.__super__ = flixel_addons_editors_tiled_TiledLayer;
flixel_addons_editors_tiled_TiledObjectLayer.prototype = $extend(flixel_addons_editors_tiled_TiledLayer.prototype,{
	loadObjects: function(source) {
		var _g_head = source.nodes.resolve("object").h;
		while(_g_head != null) {
			var val = _g_head.item;
			_g_head = _g_head.next;
			this.objects.push(new flixel_addons_editors_tiled_TiledObject(val,this));
		}
	}
	,__class__: flixel_addons_editors_tiled_TiledObjectLayer
});
var flixel_addons_editors_tiled_TiledPropertySet = function() {
	this.keys = new haxe_ds_StringMap();
};
$hxClasses["flixel.addons.editors.tiled.TiledPropertySet"] = flixel_addons_editors_tiled_TiledPropertySet;
flixel_addons_editors_tiled_TiledPropertySet.__name__ = ["flixel","addons","editors","tiled","TiledPropertySet"];
flixel_addons_editors_tiled_TiledPropertySet.prototype = {
	get: function(Key) {
		return this.keys.get(Key);
	}
	,contains: function(Key) {
		var _this = this.keys;
		if(__map_reserved[Key] != null) {
			return _this.existsReserved(Key);
		} else {
			return _this.h.hasOwnProperty(Key);
		}
	}
	,resolve: function(Name) {
		var _this = this.keys;
		if(__map_reserved[Name] != null) {
			return _this.getReserved(Name);
		} else {
			return _this.h[Name];
		}
	}
	,keysIterator: function() {
		return this.keys.keys();
	}
	,extend: function(Source) {
		var _g_head = Source.nodes.resolve("property").h;
		while(_g_head != null) {
			var val = _g_head.item;
			_g_head = _g_head.next;
			var this1 = this.keys;
			var key = val.att.resolve("name");
			var value = val.att.resolve("value");
			var _this = this1;
			if(__map_reserved[key] != null) {
				_this.setReserved(key,value);
			} else {
				_this.h[key] = value;
			}
		}
	}
	,__class__: flixel_addons_editors_tiled_TiledPropertySet
};
var flixel_addons_editors_tiled_TiledTile = function(OriginalId) {
	this.isFlipVertically = false;
	this.isFlipHorizontally = false;
	this.tileID = OriginalId;
	this.tilesetID = this.tileID & 536870911;
	this.rotate = 0;
	this.resolveFlipAndRotation();
};
$hxClasses["flixel.addons.editors.tiled.TiledTile"] = flixel_addons_editors_tiled_TiledTile;
flixel_addons_editors_tiled_TiledTile.__name__ = ["flixel","addons","editors","tiled","TiledTile"];
flixel_addons_editors_tiled_TiledTile.prototype = {
	resolveFlipAndRotation: function() {
		var flipHorizontal = (this.tileID & -2147483648) != 0;
		var flipVertical = (this.tileID & 1073741824) != 0;
		if((this.tileID & 536870912) != 0) {
			if(flipHorizontal && flipVertical) {
				this.isFlipHorizontally = true;
				this.rotate = 2;
			} else if(flipHorizontal) {
				this.rotate = 1;
			} else if(flipVertical) {
				this.rotate = 2;
			} else {
				this.isFlipVertically = true;
				this.rotate = 2;
			}
		} else {
			this.isFlipHorizontally = flipHorizontal;
			this.isFlipVertically = flipVertical;
		}
	}
	,resolveTilesetID: function() {
		return this.tileID & 536870911;
	}
	,__class__: flixel_addons_editors_tiled_TiledTile
};
var flixel_addons_editors_tiled_TiledTileLayer = function(source,parent) {
	flixel_addons_editors_tiled_TiledLayer.call(this,source,parent);
	this.type = flixel_addons_editors_tiled_TiledLayerType.TILE;
	this.x = source.has.resolve("x") ? Std.parseInt(source.att.resolve("x")) : 0;
	this.y = source.has.resolve("y") ? Std.parseInt(source.att.resolve("y")) : 0;
	this.width = Std.parseInt(source.att.resolve("width"));
	this.height = Std.parseInt(source.att.resolve("height"));
	this.tiles = [];
	this.xmlData = source.node.resolve("data");
	if(this.xmlData == null) {
		throw new js__$Boot_HaxeError("Error loading TiledLayer level data");
	}
};
$hxClasses["flixel.addons.editors.tiled.TiledTileLayer"] = flixel_addons_editors_tiled_TiledTileLayer;
flixel_addons_editors_tiled_TiledTileLayer.__name__ = ["flixel","addons","editors","tiled","TiledTileLayer"];
flixel_addons_editors_tiled_TiledTileLayer.__super__ = flixel_addons_editors_tiled_TiledLayer;
flixel_addons_editors_tiled_TiledTileLayer.prototype = $extend(flixel_addons_editors_tiled_TiledLayer.prototype,{
	getByteArrayData: function() {
		var result = null;
		if(this.get_encoding() == "base64") {
			var compressed = false;
			result = this.base64ToByteArray(this.xmlData.get_innerData());
			result.__endian = 1;
			if(this.xmlData.has.resolve("compression")) {
				if(this.xmlData.att.resolve("compression") == "zlib") {
					compressed = true;
				} else {
					throw new js__$Boot_HaxeError("TiledLayer - data compression type not supported!");
				}
			}
			if(compressed) {
				throw new js__$Boot_HaxeError("HTML5 doesn't support compressed data! Use Base64 (uncompressed) when you save the map or install the library 'format' and use it");
			}
		} else {
			throw new js__$Boot_HaxeError("Must use base64 encoding in order to get tileArray data.");
		}
		result.__endian = 1;
		return result;
	}
	,base64ToByteArray: function(data) {
		var output = new openfl_utils_ByteArrayData(0);
		var lookup = [];
		var _g1 = 0;
		var _g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".length;
		while(_g1 < _g) {
			var c = _g1++;
			lookup[HxOverrides.cca("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c)] = c;
		}
		var i = 0;
		while(i < data.length - 3) {
			if(data.charAt(i) == " " || data.charAt(i) == "\n" || data.charAt(i) == "\r") {
				++i;
				continue;
			}
			var a0 = lookup[HxOverrides.cca(data,i)];
			var a1 = lookup[HxOverrides.cca(data,i + 1)];
			var a2 = lookup[HxOverrides.cca(data,i + 2)];
			var a3 = lookup[HxOverrides.cca(data,i + 3)];
			if(a1 < 64) {
				output.writeByte((a0 << 2) + ((a1 & 48) >> 4));
			}
			if(a2 < 64) {
				output.writeByte(((a1 & 15) << 4) + ((a2 & 60) >> 2));
			}
			if(a3 < 64) {
				output.writeByte(((a2 & 3) << 6) + a3);
			}
			i += 4;
		}
		output.position = 0;
		return output;
	}
	,resolveTile: function(globalTileId) {
		var tile = new flixel_addons_editors_tiled_TiledTile(globalTileId);
		var tilesetID = tile.tilesetID;
		var _this = this.map.tilesets;
		var tileset = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
		while(tileset.hasNext()) {
			var tileset1 = tileset.next();
			if(tilesetID >= tileset1.firstGID && tilesetID < tileset1.firstGID + tileset1.numTiles) {
				this.tiles.push(tile);
				return tilesetID;
			}
		}
		this.tiles.push(null);
		return 0;
	}
	,get_encoding: function() {
		if(this.encoding != null) {
			return this.encoding;
		} else {
			return this.xmlData.att.resolve("encoding");
		}
	}
	,get_csvData: function() {
		if(this.csvData == null) {
			if(this.xmlData.att.resolve("encoding") == "csv") {
				this.csvData = StringTools.ltrim(this.xmlData.get_innerData());
			} else {
				throw new js__$Boot_HaxeError("Must use CSV encoding in order to get CSV data.");
			}
		}
		return this.csvData;
	}
	,get_tileArray: function() {
		if(this.tileArray == null) {
			this.tileArray = [];
			if(this.get_encoding() == "csv") {
				var endline = this.get_csvData().indexOf("\r\n") != -1 ? "\r\n" : "\n";
				var rows = this.get_csvData().split(endline);
				var _g = 0;
				while(_g < rows.length) {
					var row = rows[_g];
					++_g;
					var cells = row.split(",");
					var _g1 = 0;
					while(_g1 < cells.length) {
						var cell = cells[_g1];
						++_g1;
						if(cell != "") {
							this.tileArray.push(Std.parseInt(cell));
						}
					}
				}
			} else {
				var mapData = this.getByteArrayData();
				if(mapData == null) {
					throw new js__$Boot_HaxeError("Must use Base64 encoding (with or without zlip compression) in order to get 1D Array.");
				}
				while((mapData.position | 0) < (openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(mapData) | 0)) this.tileArray.push(this.resolveTile(mapData.readUnsignedInt()));
			}
		}
		return this.tileArray;
	}
	,__class__: flixel_addons_editors_tiled_TiledTileLayer
	,__properties__: {get_tileArray:"get_tileArray",get_csvData:"get_csvData",get_encoding:"get_encoding"}
});
var flixel_addons_editors_tiled_TiledTilePropertySet = function(tileID) {
	flixel_addons_editors_tiled_TiledPropertySet.call(this);
	this.tileID = tileID;
	this.animationFrames = [];
};
$hxClasses["flixel.addons.editors.tiled.TiledTilePropertySet"] = flixel_addons_editors_tiled_TiledTilePropertySet;
flixel_addons_editors_tiled_TiledTilePropertySet.__name__ = ["flixel","addons","editors","tiled","TiledTilePropertySet"];
flixel_addons_editors_tiled_TiledTilePropertySet.__super__ = flixel_addons_editors_tiled_TiledPropertySet;
flixel_addons_editors_tiled_TiledTilePropertySet.prototype = $extend(flixel_addons_editors_tiled_TiledPropertySet.prototype,{
	addAnimationFrame: function(tileID,duration) {
		this.animationFrames.push({ tileID : tileID, duration : duration});
	}
	,__class__: flixel_addons_editors_tiled_TiledTilePropertySet
});
var flixel_addons_editors_tiled_TiledTileSet = function(data,rootPath) {
	if(rootPath == null) {
		rootPath = "";
	}
	var source;
	this.numTiles = 16777215;
	this.numRows = this.numCols = 1;
	if(js_Boot.__instanceof(data,haxe_xml_Fast)) {
		source = data;
	} else if(js_Boot.__instanceof(data,openfl_utils_ByteArrayData)) {
		source = new haxe_xml_Fast(Xml.parse(data.toString()));
		source = source.node.resolve("tileset");
	} else {
		throw new js__$Boot_HaxeError("Unknown TMX tileset format");
	}
	this.firstGID = source.has.resolve("firstgid") ? Std.parseInt(source.att.resolve("firstgid")) : 1;
	if(source.has.resolve("source")) {
		var sourcePath = rootPath + source.att.resolve("source");
		if(openfl_Assets.exists(sourcePath)) {
			source = new haxe_xml_Fast(Xml.parse(openfl_Assets.getText(sourcePath)));
			source = source.node.resolve("tileset");
		}
	}
	if(!source.has.resolve("source")) {
		var node;
		if(source.hasNode.resolve("image")) {
			node = source.node.resolve("image");
			this.imageSource = node.att.resolve("source");
		} else {
			node = source.node.resolve("tile");
			this.imageSource = "";
			this.tileImagesSources = [];
			var _g_head = source.nodes.resolve("tile").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				if(!val.has.resolve("id")) {
					continue;
				}
				var id = Std.parseInt(val.att.resolve("id"));
				this.tileImagesSources[id] = new flixel_addons_editors_tiled_TiledImageTile(val);
			}
		}
		this.name = source.att.resolve("name");
		var imgWidth = 0;
		if(node.has.resolve("width")) {
			imgWidth = Std.parseInt(node.att.resolve("width"));
		}
		var imgHeight = 0;
		if(node.has.resolve("height")) {
			imgHeight = Std.parseInt(node.att.resolve("height"));
		}
		if(source.has.resolve("tilewidth")) {
			this.tileWidth = Std.parseInt(source.att.resolve("tilewidth"));
		}
		if(source.has.resolve("tileheight")) {
			this.tileHeight = Std.parseInt(source.att.resolve("tileheight"));
		}
		if(source.has.resolve("spacing")) {
			this.spacing = Std.parseInt(source.att.resolve("spacing"));
		}
		if(source.has.resolve("margin")) {
			this.margin = Std.parseInt(source.att.resolve("margin"));
		}
		this.properties = new flixel_addons_editors_tiled_TiledPropertySet();
		var _g_head1 = source.nodes.resolve("properties").h;
		while(_g_head1 != null) {
			var val1 = _g_head1.item;
			_g_head1 = _g_head1.next;
			this.properties.extend(val1);
		}
		this.tileProps = [];
		var _g_head2 = source.nodes.resolve("tile").h;
		while(_g_head2 != null) {
			var val2 = _g_head2.item;
			_g_head2 = _g_head2.next;
			if(!val2.has.resolve("id")) {
				continue;
			}
			var id1 = Std.parseInt(val2.att.resolve("id"));
			this.tileProps[id1] = new flixel_addons_editors_tiled_TiledTilePropertySet(id1);
			var _this = this.tileProps[id1].keys;
			var value = id1 == null ? "null" : "" + id1;
			if(__map_reserved["id"] != null) {
				_this.setReserved("id",value);
			} else {
				_this.h["id"] = value;
			}
			var _g_head3 = val2.nodes.resolve("properties").h;
			while(_g_head3 != null) {
				var val3 = _g_head3.item;
				_g_head3 = _g_head3.next;
				this.tileProps[id1].extend(val3);
			}
			if(val2.hasNode.resolve("animation")) {
				var _g_head4 = val2.node.resolve("animation").nodes.resolve("frame").h;
				while(_g_head4 != null) {
					var val4 = _g_head4.item;
					_g_head4 = _g_head4.next;
					this.tileProps[id1].addAnimationFrame(Std.parseInt(val4.att.resolve("tileid")),parseFloat(val4.att.resolve("duration")));
				}
			}
		}
		if(this.tileWidth > 0 && this.tileHeight > 0) {
			this.numRows = imgWidth / this.tileWidth | 0;
			this.numCols = imgHeight / this.tileHeight | 0;
			this.numTiles = this.numRows * this.numCols;
		}
	}
};
$hxClasses["flixel.addons.editors.tiled.TiledTileSet"] = flixel_addons_editors_tiled_TiledTileSet;
flixel_addons_editors_tiled_TiledTileSet.__name__ = ["flixel","addons","editors","tiled","TiledTileSet"];
flixel_addons_editors_tiled_TiledTileSet.prototype = {
	hasGid: function(Gid) {
		if(Gid >= this.firstGID) {
			return Gid < this.firstGID + this.numTiles;
		} else {
			return false;
		}
	}
	,fromGid: function(Gid) {
		return Gid - (this.firstGID - 1);
	}
	,toGid: function(ID) {
		return this.firstGID + ID;
	}
	,getPropertiesByGid: function(Gid) {
		if(this.tileProps != null) {
			return this.tileProps[Gid - this.firstGID];
		}
		return null;
	}
	,getProperties: function(ID) {
		return this.tileProps[ID];
	}
	,getImageSourceByGid: function(Gid) {
		if(this.tileImagesSources != null) {
			return this.tileImagesSources[Gid - this.firstGID];
		}
		return null;
	}
	,getImageSource: function(ID) {
		return this.tileImagesSources[ID];
	}
	,getRect: function(ID) {
		return new openfl_geom_Rectangle(ID % this.numCols * this.tileWidth,ID / this.numCols * this.tileHeight);
	}
	,__class__: flixel_addons_editors_tiled_TiledTileSet
};
var flixel_addons_tile_FlxTileAnimation = function(Name,Frames,FrameRate,Looped,FramesData) {
	if(Looped == null) {
		Looped = true;
	}
	if(FrameRate == null) {
		FrameRate = 0;
	}
	this.name = Name;
	this.set_frameRate(FrameRate);
	this.frames = Frames;
	this.looped = Looped;
	this.framesData = FramesData;
};
$hxClasses["flixel.addons.tile.FlxTileAnimation"] = flixel_addons_tile_FlxTileAnimation;
flixel_addons_tile_FlxTileAnimation.__name__ = ["flixel","addons","tile","FlxTileAnimation"];
flixel_addons_tile_FlxTileAnimation.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_addons_tile_FlxTileAnimation.prototype = {
	destroy: function() {
		this.frames = null;
		this.framesData = null;
	}
	,set_frameRate: function(value) {
		this.delay = 0;
		this.frameRate = value;
		if(value > 0) {
			this.delay = 1.0 / value;
		}
		return value;
	}
	,__class__: flixel_addons_tile_FlxTileAnimation
	,__properties__: {set_frameRate:"set_frameRate"}
};
var flixel_addons_tile_FlxTileSpecial = function(TilesetId,FlipX,FlipY,Rotate) {
	this.dirty = true;
	this._frameTimer = 0.0;
	this._lastIndex = -1;
	this._currIndex = 0;
	this.currTileId = 0;
	this.flipY = false;
	this.flipX = false;
	flixel_FlxBasic.call(this);
	this.set_currTileId(TilesetId);
	this.flipX = FlipX;
	this.flipY = FlipY;
	this.rotate = Rotate;
	this._matrix = new flixel_math_FlxMatrix();
};
$hxClasses["flixel.addons.tile.FlxTileSpecial"] = flixel_addons_tile_FlxTileSpecial;
flixel_addons_tile_FlxTileSpecial.__name__ = ["flixel","addons","tile","FlxTileSpecial"];
flixel_addons_tile_FlxTileSpecial.__super__ = flixel_FlxBasic;
flixel_addons_tile_FlxTileSpecial.prototype = $extend(flixel_FlxBasic.prototype,{
	destroy: function() {
		flixel_FlxBasic.prototype.destroy.call(this);
		this.animation = flixel_util_FlxDestroyUtil.destroy(this.animation);
		this._currAnimParam = null;
		this._matrix = null;
		this.currFrame = null;
		this.set_frames(null);
	}
	,update: function(elapsed) {
		flixel_FlxBasic.prototype.update.call(this,elapsed);
		if(flixel_FlxG.renderBlit) {
			this.dirty = false;
		}
		if(this.animation != null && this.animation.delay > 0) {
			this._frameTimer += elapsed;
			if(this._frameTimer > this.animation.delay) {
				this._lastIndex = this._currIndex;
			}
			while(this._frameTimer > this.animation.delay) {
				this._frameTimer -= this.animation.delay;
				if(this._currIndex >= this.animation.frames.length - 1) {
					this._currIndex = 0;
				} else {
					this._currIndex++;
				}
			}
			this.set_currTileId(this.animation.frames[this._currIndex]);
			if(this.animation.framesData != null) {
				this._currAnimParam = this.animation.framesData[this._currIndex];
			}
			if(flixel_FlxG.renderBlit) {
				this.dirty = this._currIndex != this._lastIndex;
			}
		}
	}
	,isSpecial: function() {
		if(!(this.flipX || this.flipY || this.rotate != 0)) {
			return this.animation != null;
		} else {
			return true;
		}
	}
	,isFlipped: function() {
		if(!(this.flipX || this.flipY)) {
			return this.rotate != 0;
		} else {
			return true;
		}
	}
	,hasAnimation: function() {
		return this.animation != null;
	}
	,paint: function(bmd,at) {
		if(!flixel_FlxG.renderBlit) {
			return;
		}
		this._tmp_flipH = this.flipX;
		this._tmp_flipV = this.flipY;
		this._tmp_rot = this.rotate;
		if(this._currAnimParam != null) {
			this._tmp_flipH = this._currAnimParam.flipX;
			this._tmp_flipV = this._currAnimParam.flipY;
			this._tmp_rot = this._currAnimParam.rotate;
		}
		var rotation = 0;
		if(this._tmp_rot == 1) {
			rotation = 90;
		} else if(this._tmp_rot == 2) {
			rotation = -90;
		}
		this.currFrame.paintRotatedAndFlipped(bmd,at,rotation,this._tmp_flipH,this._tmp_flipV,true);
	}
	,addAnimation: function(tiles,frameRate,framesData) {
		if(frameRate == null) {
			frameRate = 30;
		}
		this.animation = new flixel_addons_tile_FlxTileAnimation("tileAnim",tiles,frameRate,true,framesData);
	}
	,fromSpriteAnimation: function(anim) {
		this.animation = new flixel_addons_tile_FlxTileAnimation(anim.name,Reflect.field(anim,"_frames"),anim.frameRate,anim.looped);
	}
	,getMatrix: function() {
		this._tmp_flipH = this.flipX;
		this._tmp_flipV = this.flipY;
		this._tmp_rot = this.rotate;
		if(this._currAnimParam != null) {
			this._tmp_flipH = this._currAnimParam.flipX;
			this._tmp_flipV = this._currAnimParam.flipY;
			this._tmp_rot = this._currAnimParam.rotate;
		}
		var rotation = 0;
		if(this._tmp_rot == 1) {
			rotation = 90;
		} else if(this._tmp_rot == 2) {
			rotation = -90;
		}
		this.currFrame.prepareMatrix(this._matrix,rotation,this._tmp_flipH,this._tmp_flipV);
		return this._matrix;
	}
	,set_frames: function(value) {
		this.frames = value;
		if(value != null) {
			this.currFrame = this.frames.frames[this.currTileId];
		}
		return this.frames;
	}
	,set_currTileId: function(value) {
		if(this.frames != null) {
			this.currFrame = this.frames.frames[value];
		}
		return this.currTileId = value;
	}
	,__class__: flixel_addons_tile_FlxTileSpecial
	,__properties__: $extend(flixel_FlxBasic.prototype.__properties__,{set_currTileId:"set_currTileId",set_frames:"set_frames"})
});
var flixel_tile_FlxBaseTilemap = function() {
	this._collideIndex = 0;
	this._drawIndex = 0;
	this._startingIndex = 0;
	this._tileObjects = [];
	this.totalTiles = 0;
	this.heightInTiles = 0;
	this.widthInTiles = 0;
	this.auto = flixel_tile_FlxTilemapAutoTiling.OFF;
	flixel_FlxObject.call(this);
	this.flixelType = 3;
	this.set_immovable(true);
	this.set_moves(false);
};
$hxClasses["flixel.tile.FlxBaseTilemap"] = flixel_tile_FlxBaseTilemap;
flixel_tile_FlxBaseTilemap.__name__ = ["flixel","tile","FlxBaseTilemap"];
flixel_tile_FlxBaseTilemap.__super__ = flixel_FlxObject;
flixel_tile_FlxBaseTilemap.prototype = $extend(flixel_FlxObject.prototype,{
	updateTile: function(Index) {
		throw new js__$Boot_HaxeError("updateTile must be implemented");
	}
	,cacheGraphics: function(TileWidth,TileHeight,TileGraphic) {
		throw new js__$Boot_HaxeError("cacheGraphics must be implemented");
	}
	,initTileObjects: function() {
		throw new js__$Boot_HaxeError("initTileObjects must be implemented");
	}
	,updateMap: function() {
		throw new js__$Boot_HaxeError("updateMap must be implemented");
	}
	,computeDimensions: function() {
		throw new js__$Boot_HaxeError("computeDimensions must be implemented");
	}
	,getTileIndexByCoords: function(Coord) {
		throw new js__$Boot_HaxeError("getTileIndexByCoords must be implemented");
	}
	,getTileCoordsByIndex: function(Index,Midpoint) {
		if(Midpoint == null) {
			Midpoint = true;
		}
		throw new js__$Boot_HaxeError("getTileCoordsByIndex must be implemented");
	}
	,ray: function(Start,End,Result,Resolution) {
		if(Resolution == null) {
			Resolution = 1;
		}
		throw new js__$Boot_HaxeError("ray must be implemented");
	}
	,overlapsWithCallback: function(Object,Callback,FlipCallbackParams,Position) {
		if(FlipCallbackParams == null) {
			FlipCallbackParams = false;
		}
		throw new js__$Boot_HaxeError("overlapsWithCallback must be implemented");
	}
	,setDirty: function(Dirty) {
		if(Dirty == null) {
			Dirty = true;
		}
		throw new js__$Boot_HaxeError("setDirty must be implemented");
	}
	,destroy: function() {
		this._data = null;
		flixel_FlxObject.prototype.destroy.call(this);
	}
	,loadMapFromCSV: function(MapData,TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		if(openfl_Assets.exists(MapData)) {
			MapData = openfl_Assets.getText(MapData);
		}
		this._data = [];
		var columns;
		var rows = new EReg("[ \t]*((\r\n)|\r|\n)[ \t]*","g").split(MapData).filter(function(line) {
			return line != "";
		});
		this.heightInTiles = rows.length;
		this.widthInTiles = 0;
		var row = 0;
		while(row < this.heightInTiles) {
			var rowString = rows[row];
			if(StringTools.endsWith(rowString,",")) {
				rowString = HxOverrides.substr(rowString,0,rowString.length - 1);
			}
			columns = rowString.split(",");
			if(columns.length == 0) {
				this.heightInTiles--;
				continue;
			}
			if(this.widthInTiles == 0) {
				this.widthInTiles = columns.length;
			}
			var column = 0;
			while(column < this.widthInTiles) {
				var columnString = columns[column];
				var curTile = Std.parseInt(columnString);
				if(curTile == null) {
					throw new js__$Boot_HaxeError("String in row " + row + ", column " + column + " is not a valid integer: \"" + columnString + "\"");
				}
				if(curTile < 0) {
					curTile = 0;
				}
				this._data.push(curTile);
				++column;
			}
			++row;
		}
		this.loadMapHelper(TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex);
		return this;
	}
	,loadMapFromArray: function(MapData,WidthInTiles,HeightInTiles,TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		this.widthInTiles = WidthInTiles;
		this.heightInTiles = HeightInTiles;
		this._data = MapData.slice();
		this.loadMapHelper(TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex);
		return this;
	}
	,loadMapFrom2DArray: function(MapData,TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		this.widthInTiles = MapData[0].length;
		this.heightInTiles = MapData.length;
		this._data = flixel_util_FlxArrayUtil.flatten2DArray_Int(MapData);
		this.loadMapHelper(TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex);
		return this;
	}
	,loadMapFromGraphic: function(MapGraphic,Invert,Scale,ColorMap,TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		if(Scale == null) {
			Scale = 1;
		}
		if(Invert == null) {
			Invert = false;
		}
		return this.loadMapFromCSV(flixel_util_FlxStringUtil.bitmapToCSV(flixel_system_FlxAssets.resolveBitmapData(MapGraphic),Invert,Scale,ColorMap),TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex);
	}
	,loadMapHelper: function(TileGraphic,TileWidth,TileHeight,AutoTile,StartingIndex,DrawIndex,CollideIndex) {
		if(CollideIndex == null) {
			CollideIndex = 1;
		}
		if(DrawIndex == null) {
			DrawIndex = 1;
		}
		if(StartingIndex == null) {
			StartingIndex = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		this.totalTiles = this._data.length;
		this.auto = AutoTile == null ? flixel_tile_FlxTilemapAutoTiling.OFF : AutoTile;
		this._startingIndex = StartingIndex <= 0 ? 0 : StartingIndex;
		if(this.auto != flixel_tile_FlxTilemapAutoTiling.OFF) {
			this._startingIndex = 1;
			DrawIndex = 1;
			CollideIndex = 1;
		}
		this._drawIndex = DrawIndex;
		this._collideIndex = CollideIndex;
		this.applyAutoTile();
		this.applyCustomRemap();
		this.randomizeIndices();
		this.cacheGraphics(TileWidth,TileHeight,TileGraphic);
		this.postGraphicLoad();
	}
	,postGraphicLoad: function() {
		this.initTileObjects();
		this.computeDimensions();
		this.updateMap();
	}
	,applyAutoTile: function() {
		if(this.auto != flixel_tile_FlxTilemapAutoTiling.OFF) {
			var i = 0;
			while(i < this.totalTiles) this.autoTile(i++);
		}
	}
	,applyCustomRemap: function() {
		var i = 0;
		if(this.customTileRemap != null) {
			while(i < this.totalTiles) {
				var oldIndex = this._data[i];
				var newIndex = oldIndex;
				if(oldIndex < this.customTileRemap.length) {
					newIndex = this.customTileRemap[oldIndex];
				}
				this._data[i] = newIndex;
				++i;
			}
		}
	}
	,randomizeIndices: function() {
		var i = 0;
		if(this._randomIndices != null) {
			var randLambda = this._randomLambda != null ? this._randomLambda : function() {
				return flixel_FlxG.random["float"]();
			};
			while(i < this.totalTiles) {
				var oldIndex = this._data[i];
				var j = 0;
				var newIndex = oldIndex;
				var _g = 0;
				var _g1 = this._randomIndices;
				while(_g < _g1.length) {
					var rand = _g1[_g];
					++_g;
					if(oldIndex == rand) {
						var k = randLambda() * this._randomChoices[j].length | 0;
						newIndex = this._randomChoices[j][k];
					}
					++j;
				}
				this._data[i] = newIndex;
				++i;
			}
		}
	}
	,autoTile: function(Index) {
		if(this._data[Index] == 0) {
			return;
		}
		this._data[Index] = 0;
		if(Index - this.widthInTiles < 0 || this._data[Index - this.widthInTiles] > 0) {
			this._data[Index] += 1;
		}
		if(Index % this.widthInTiles >= this.widthInTiles - 1 || this._data[Index + 1] > 0) {
			this._data[Index] += 2;
		}
		if((Index + this.widthInTiles | 0) >= this.totalTiles || this._data[Index + this.widthInTiles] > 0) {
			this._data[Index] += 4;
		}
		if(Index % this.widthInTiles <= 0 || this._data[Index - 1] > 0) {
			this._data[Index] += 8;
		}
		if(this.auto == flixel_tile_FlxTilemapAutoTiling.ALT && this._data[Index] == 15) {
			if(Index % this.widthInTiles > 0 && (Index + this.widthInTiles | 0) < this.totalTiles && this._data[Index + this.widthInTiles - 1] <= 0) {
				this._data[Index] = 1;
			}
			if(Index % this.widthInTiles > 0 && Index - this.widthInTiles >= 0 && this._data[Index - this.widthInTiles - 1] <= 0) {
				this._data[Index] = 2;
			}
			if(Index % this.widthInTiles < this.widthInTiles - 1 && Index - this.widthInTiles >= 0 && this._data[Index - this.widthInTiles + 1] <= 0) {
				this._data[Index] = 4;
			}
			if(Index % this.widthInTiles < this.widthInTiles - 1 && (Index + this.widthInTiles | 0) < this.totalTiles && this._data[Index + this.widthInTiles + 1] <= 0) {
				this._data[Index] = 8;
			}
		}
		this._data[Index] += 1;
	}
	,setCustomTileMappings: function(mappings,randomIndices,randomChoices,randomLambda) {
		this.customTileRemap = mappings;
		this._randomIndices = randomIndices;
		this._randomChoices = randomChoices;
		this._randomLambda = randomLambda;
		if(this._randomIndices != null && (this._randomChoices == null || this._randomChoices.length == 0)) {
			throw new js__$Boot_HaxeError("You must provide valid 'randomChoices' if you wish to randomize tilemap indicies, please read documentation of 'setCustomTileMappings' function.");
		}
	}
	,getTile: function(X,Y) {
		return this._data[Y * this.widthInTiles + X];
	}
	,getTileByIndex: function(Index) {
		return this._data[Index];
	}
	,getTileCollisions: function(Index) {
		return this._tileObjects[Index].allowCollisions;
	}
	,getTileInstances: function(Index) {
		var array = null;
		var i = 0;
		var l = this.widthInTiles * this.heightInTiles;
		while(i < l) {
			if(this._data[i] == Index) {
				if(array == null) {
					array = [];
				}
				array.push(i);
			}
			++i;
		}
		return array;
	}
	,setTile: function(X,Y,Tile,UpdateGraphics) {
		if(UpdateGraphics == null) {
			UpdateGraphics = true;
		}
		if(X >= this.widthInTiles || Y >= this.heightInTiles) {
			return false;
		}
		return this.setTileByIndex(Y * this.widthInTiles + X,Tile,UpdateGraphics);
	}
	,setTileByIndex: function(Index,Tile,UpdateGraphics) {
		if(UpdateGraphics == null) {
			UpdateGraphics = true;
		}
		if(Index >= this._data.length) {
			return false;
		}
		this._data[Index] = Tile;
		if(!UpdateGraphics) {
			return true;
		}
		this.setDirty();
		if(this.auto == flixel_tile_FlxTilemapAutoTiling.OFF) {
			this.updateTile(this._data[Index]);
			return true;
		}
		var i;
		var row = (Index / this.widthInTiles | 0) - 1;
		var rowLength = row + 3;
		var column = Index % this.widthInTiles - 1;
		var columnHeight = column + 3;
		while(row < rowLength) {
			column = columnHeight - 3;
			while(column < columnHeight) {
				if(row >= 0 && row < this.heightInTiles && column >= 0 && column < this.widthInTiles) {
					i = row * this.widthInTiles + column;
					this.autoTile(i);
					this.updateTile(this._data[i]);
				}
				++column;
			}
			++row;
		}
		return true;
	}
	,setTileProperties: function(Tile,AllowCollisions,Callback,CallbackFilter,Range) {
		if(Range == null) {
			Range = 1;
		}
		if(AllowCollisions == null) {
			AllowCollisions = 4369;
		}
		if(Range <= 0) {
			Range = 1;
		}
		var tile;
		var i = Tile;
		var l = Tile + Range;
		var maxIndex = this._tileObjects.length;
		if(l > maxIndex) {
			throw new js__$Boot_HaxeError("Index " + l + " exceeds the maximum tile index of " + maxIndex + ". Please verfiy the Tile (" + Tile + ") and Range (" + Range + ") parameters.");
		}
		while(i < l) {
			tile = this._tileObjects[i++];
			tile.set_allowCollisions(AllowCollisions);
			tile.callbackFunction = Callback;
			tile.filter = CallbackFilter;
		}
	}
	,getData: function(Simple) {
		if(Simple == null) {
			Simple = false;
		}
		if(!Simple) {
			return this._data;
		}
		var i = 0;
		var l = this._data.length;
		var data = [];
		flixel_util_FlxArrayUtil.setLength_Int(data,l);
		while(i < l) {
			data[i] = this._tileObjects[this._data[i]].allowCollisions > 0 ? 1 : 0;
			++i;
		}
		return data;
	}
	,findPath: function(Start,End,Simplify,RaySimplify,DiagonalPolicy) {
		if(DiagonalPolicy == null) {
			DiagonalPolicy = 2;
		}
		if(RaySimplify == null) {
			RaySimplify = false;
		}
		if(Simplify == null) {
			Simplify = true;
		}
		var startIndex = this.getTileIndexByCoords(Start);
		var endIndex = this.getTileIndexByCoords(End);
		if(this._tileObjects[this._data[startIndex]].allowCollisions > 0 || this._tileObjects[this._data[endIndex]].allowCollisions > 0) {
			return null;
		}
		var distances = this.computePathDistance(startIndex,endIndex,DiagonalPolicy);
		if(distances == null) {
			return null;
		}
		var points = [];
		this.walkPath(distances,endIndex,points);
		var node = points[points.length - 1];
		node.set_x(Start.x);
		node.set_y(Start.y);
		if(Start._weak) {
			Start.put();
		}
		node = points[0];
		node.set_x(End.x);
		node.set_y(End.y);
		if(End._weak) {
			End.put();
		}
		if(Simplify) {
			this.simplifyPath(points);
		}
		if(RaySimplify) {
			this.raySimplifyPath(points);
		}
		var path = [];
		var i = points.length - 1;
		while(i >= 0) {
			node = points[i--];
			if(node != null) {
				path.push(node);
			}
		}
		return path;
	}
	,computePathDistance: function(StartIndex,EndIndex,DiagonalPolicy,StopOnEnd) {
		if(StopOnEnd == null) {
			StopOnEnd = true;
		}
		var mapSize = this.widthInTiles * this.heightInTiles;
		var distances = [];
		flixel_util_FlxArrayUtil.setLength_Int(distances,mapSize);
		var i = 0;
		while(i < mapSize) {
			if(this._tileObjects[this._data[i]].allowCollisions != 0) {
				distances[i] = -2;
			} else {
				distances[i] = -1;
			}
			++i;
		}
		distances[StartIndex] = 0;
		var distance = 1;
		var neighbors = [StartIndex];
		var current;
		var currentIndex;
		var left;
		var right;
		var up;
		var down;
		var currentLength;
		var foundEnd = false;
		while(neighbors.length > 0) {
			current = neighbors;
			neighbors = [];
			i = 0;
			currentLength = current.length;
			while(i < currentLength) {
				currentIndex = current[i++];
				if(currentIndex == (EndIndex | 0)) {
					foundEnd = true;
					if(StopOnEnd) {
						neighbors = [];
						break;
					}
				}
				left = currentIndex % this.widthInTiles > 0;
				right = currentIndex % this.widthInTiles < this.widthInTiles - 1;
				up = currentIndex / this.widthInTiles > 0;
				down = currentIndex / this.widthInTiles < this.heightInTiles - 1;
				var index;
				if(up) {
					index = currentIndex - this.widthInTiles;
					if(distances[index] == -1) {
						distances[index] = distance;
						neighbors.push(index);
					}
				}
				if(right) {
					index = currentIndex + 1;
					if(distances[index] == -1) {
						distances[index] = distance;
						neighbors.push(index);
					}
				}
				if(down) {
					index = currentIndex + this.widthInTiles;
					if(distances[index] == -1) {
						distances[index] = distance;
						neighbors.push(index);
					}
				}
				if(left) {
					index = currentIndex - 1;
					if(distances[index] == -1) {
						distances[index] = distance;
						neighbors.push(index);
					}
				}
				if(DiagonalPolicy != 0) {
					var wideDiagonal = DiagonalPolicy == 2;
					if(up && right) {
						index = currentIndex - this.widthInTiles + 1;
						if(wideDiagonal && distances[index] == -1 && distances[currentIndex - this.widthInTiles] >= -1 && distances[currentIndex + 1] >= -1) {
							distances[index] = distance;
							neighbors.push(index);
						} else if(!wideDiagonal && distances[index] == -1) {
							distances[index] = distance;
							neighbors.push(index);
						}
					}
					if(right && down) {
						index = currentIndex + this.widthInTiles + 1;
						if(wideDiagonal && distances[index] == -1 && distances[currentIndex + this.widthInTiles] >= -1 && distances[currentIndex + 1] >= -1) {
							distances[index] = distance;
							neighbors.push(index);
						} else if(!wideDiagonal && distances[index] == -1) {
							distances[index] = distance;
							neighbors.push(index);
						}
					}
					if(left && down) {
						index = currentIndex + this.widthInTiles - 1;
						if(wideDiagonal && distances[index] == -1 && distances[currentIndex + this.widthInTiles] >= -1 && distances[currentIndex - 1] >= -1) {
							distances[index] = distance;
							neighbors.push(index);
						} else if(!wideDiagonal && distances[index] == -1) {
							distances[index] = distance;
							neighbors.push(index);
						}
					}
					if(up && left) {
						index = currentIndex - this.widthInTiles - 1;
						if(wideDiagonal && distances[index] == -1 && distances[currentIndex - this.widthInTiles] >= -1 && distances[currentIndex - 1] >= -1) {
							distances[index] = distance;
							neighbors.push(index);
						} else if(!wideDiagonal && distances[index] == -1) {
							distances[index] = distance;
							neighbors.push(index);
						}
					}
				}
			}
			++distance;
		}
		if(!foundEnd) {
			distances = null;
		}
		return distances;
	}
	,walkPath: function(Data,Start,Points) {
		Points.push(this.getTileCoordsByIndex(Start));
		if(Data[Start] == 0) {
			return;
		}
		var left = Start % this.widthInTiles > 0;
		var right = Start % this.widthInTiles < this.widthInTiles - 1;
		var up = Start / this.widthInTiles > 0;
		var down = Start / this.widthInTiles < this.heightInTiles - 1;
		var current = Data[Start];
		var i;
		if(up) {
			i = Start - this.widthInTiles;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(right) {
			i = Start + 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(down) {
			i = Start + this.widthInTiles;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(left) {
			i = Start - 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(up && right) {
			i = Start - this.widthInTiles + 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(right && down) {
			i = Start + this.widthInTiles + 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(left && down) {
			i = Start + this.widthInTiles - 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		if(up && left) {
			i = Start - this.widthInTiles - 1;
			if(i >= 0 && Data[i] >= 0 && Data[i] < current) {
				this.walkPath(Data,i,Points);
				return;
			}
		}
		return;
	}
	,simplifyPath: function(Points) {
		var deltaPrevious;
		var deltaNext;
		var last = Points[0];
		var node;
		var i = 1;
		var l = Points.length - 1;
		while(i < l) {
			node = Points[i];
			deltaPrevious = (node.x - last.x) / (node.y - last.y);
			deltaNext = (node.x - Points[i + 1].x) / (node.y - Points[i + 1].y);
			if(last.x == Points[i + 1].x || last.y == Points[i + 1].y || deltaPrevious == deltaNext) {
				Points[i] = null;
			} else {
				last = node;
			}
			++i;
		}
	}
	,raySimplifyPath: function(Points) {
		var source = Points[0];
		var lastIndex = -1;
		var node;
		var i = 1;
		var l = Points.length;
		while(i < l) {
			node = Points[i++];
			if(node == null) {
				continue;
			}
			if(this.ray(source,node,this._point)) {
				if(lastIndex >= 0) {
					Points[lastIndex] = null;
				}
			} else {
				source = Points[lastIndex];
			}
			lastIndex = i - 1;
		}
	}
	,overlaps: function(ObjectOrGroup,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			return flixel_group_FlxTypedGroup.overlaps($bind(this,this.tilemapOverlapsCallback),group,0,0,InScreenSpace,Camera);
		} else if(ObjectOrGroup.flixelType == 1 || ObjectOrGroup.flixelType == 3 ? this.overlapsWithCallback(ObjectOrGroup) : this.overlaps(ObjectOrGroup,false,null)) {
			return true;
		}
		return false;
	}
	,tilemapOverlapsCallback: function(ObjectOrGroup,X,Y,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		if(ObjectOrGroup.flixelType == 1 || ObjectOrGroup.flixelType == 3) {
			return this.overlapsWithCallback(ObjectOrGroup);
		} else {
			return this.overlaps(ObjectOrGroup,InScreenSpace,Camera);
		}
	}
	,overlapsAt: function(X,Y,ObjectOrGroup,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			return flixel_group_FlxTypedGroup.overlaps($bind(this,this.tilemapOverlapsAtCallback),group,X,Y,InScreenSpace,Camera);
		} else if(ObjectOrGroup.flixelType == 1 || ObjectOrGroup.flixelType == 3 ? this.overlapsWithCallback(ObjectOrGroup,null,false,this._point.set(X,Y)) : this.overlapsAt(X,Y,ObjectOrGroup,InScreenSpace,Camera)) {
			return true;
		}
		return false;
	}
	,tilemapOverlapsAtCallback: function(ObjectOrGroup,X,Y,InScreenSpace,Camera) {
		if(ObjectOrGroup.flixelType == 1 || ObjectOrGroup.flixelType == 3) {
			return this.overlapsWithCallback(ObjectOrGroup,null,false,this._point.set(X,Y));
		} else {
			return this.overlapsAt(X,Y,ObjectOrGroup,InScreenSpace,Camera);
		}
	}
	,overlapsPoint: function(WorldPoint,InScreenSpace,Camera) {
		if(InScreenSpace == null) {
			InScreenSpace = false;
		}
		if(!InScreenSpace) {
			return this.tileAtPointAllowsCollisions(WorldPoint);
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		WorldPoint.subtractPoint(Camera.scroll);
		if(WorldPoint._weak) {
			WorldPoint.put();
		}
		return this.tileAtPointAllowsCollisions(WorldPoint);
	}
	,tileAtPointAllowsCollisions: function(point) {
		var tileIndex = this.getTileIndexByCoords(point);
		if(tileIndex < 0 || tileIndex >= this._data.length) {
			return false;
		}
		return this._tileObjects[this._data[tileIndex]].allowCollisions > 0;
	}
	,getBounds: function(Bounds) {
		if(Bounds == null) {
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = 0;
			_this.height = 0;
			_this._inPool = false;
			Bounds = _this;
		}
		var X = this.x;
		var Y = this.y;
		var Width = this.get_width();
		var Height = this.get_height();
		Bounds.x = X;
		Bounds.y = Y;
		Bounds.width = Width;
		Bounds.height = Height;
		return Bounds;
	}
	,__class__: flixel_tile_FlxBaseTilemap
});
var flixel_tile_FlxTilemapBuffer = function(TileWidth,TileHeight,WidthInTiles,HeightInTiles,Camera,ScaleX,ScaleY) {
	if(ScaleY == null) {
		ScaleY = 1.0;
	}
	if(ScaleX == null) {
		ScaleX = 1.0;
	}
	this.antialiasing = false;
	this.columns = 0;
	this.rows = 0;
	this.dirty = false;
	this.height = 0;
	this.width = 0;
	this.y = 0;
	this.x = 0;
	this.updateColumns(TileWidth,WidthInTiles,ScaleX,Camera);
	this.updateRows(TileHeight,HeightInTiles,ScaleY,Camera);
	if(flixel_FlxG.renderBlit) {
		this.pixels = new openfl_display_BitmapData(this.columns * TileWidth | 0,this.rows * TileHeight | 0,true,0);
		this._flashRect = new openfl_geom_Rectangle(0,0,this.pixels.width,this.pixels.height);
		this._matrix = new openfl_geom_Matrix();
	}
	this.dirty = true;
};
$hxClasses["flixel.tile.FlxTilemapBuffer"] = flixel_tile_FlxTilemapBuffer;
flixel_tile_FlxTilemapBuffer.__name__ = ["flixel","tile","FlxTilemapBuffer"];
flixel_tile_FlxTilemapBuffer.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_tile_FlxTilemapBuffer.prototype = {
	destroy: function() {
		if(flixel_FlxG.renderBlit) {
			this.pixels = null;
			this.blend = null;
			this._matrix = null;
		}
	}
	,fill: function(Color) {
		if(Color == null) {
			Color = 0;
		}
		if(flixel_FlxG.renderBlit) {
			this.pixels.fillRect(this._flashRect,Color);
		}
	}
	,draw: function(Camera,FlashPoint,ScaleX,ScaleY) {
		if(ScaleY == null) {
			ScaleY = 1.0;
		}
		if(ScaleX == null) {
			ScaleX = 1.0;
		}
		if(this.isPixelPerfectRender(Camera)) {
			FlashPoint.x = Math.floor(FlashPoint.x);
			FlashPoint.y = Math.floor(FlashPoint.y);
		}
		if(this.isPixelPerfectRender(Camera) && (ScaleX == 1.0 && ScaleY == 1.0) && this.blend == null) {
			Camera.buffer.copyPixels(this.pixels,this._flashRect,FlashPoint,null,null,true);
		} else {
			this._matrix.identity();
			this._matrix.scale(ScaleX,ScaleY);
			this._matrix.translate(FlashPoint.x,FlashPoint.y);
			Camera.buffer.draw(this.pixels,this._matrix,null,this.blend,null,this.antialiasing);
		}
	}
	,colorTransform: function(Transform) {
		this.pixels.colorTransform(this._flashRect,Transform);
	}
	,updateColumns: function(TileWidth,WidthInTiles,ScaleX,Camera) {
		if(ScaleX == null) {
			ScaleX = 1.0;
		}
		if(WidthInTiles < 0) {
			WidthInTiles = 0;
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		this.columns = Math.ceil(Camera.width / (TileWidth * ScaleX)) + 1;
		if(this.columns > WidthInTiles) {
			this.columns = WidthInTiles;
		}
		this.width = this.columns * TileWidth * ScaleX | 0;
		this.dirty = true;
	}
	,updateRows: function(TileHeight,HeightInTiles,ScaleY,Camera) {
		if(ScaleY == null) {
			ScaleY = 1.0;
		}
		if(HeightInTiles < 0) {
			HeightInTiles = 0;
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		this.rows = Math.ceil(Camera.height / (TileHeight * ScaleY)) + 1;
		if(this.rows > HeightInTiles) {
			this.rows = HeightInTiles;
		}
		this.height = this.rows * TileHeight * ScaleY | 0;
		this.dirty = true;
	}
	,isPixelPerfectRender: function(Camera) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		if(this.pixelPerfectRender == null) {
			return Camera.pixelPerfectRender;
		} else {
			return this.pixelPerfectRender;
		}
	}
	,__class__: flixel_tile_FlxTilemapBuffer
};
var flixel_tile_FlxTilemap = function() {
	this._checkBufferChanges = false;
	this._scaledTileHeight = 0;
	this._scaledTileWidth = 0;
	this._tileHeight = 0;
	this._tileWidth = 0;
	this._buffers = [];
	this._flashRect = new openfl_geom_Rectangle();
	this._flashPoint = new openfl_geom_Point();
	this.blend = null;
	this.colorTransform = new openfl_geom_ColorTransform();
	this.alpha = 1.0;
	this.color = 16777215;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this.offset = point;
	this.antialiasing = false;
	this.useScaleHack = true;
	flixel_tile_FlxBaseTilemap.call(this);
	if(flixel_FlxG.renderTile) {
		this._helperPoint = new openfl_geom_Point();
		this._matrix = new flixel_math_FlxMatrix();
	}
	this.scale = new flixel_math_FlxCallbackPoint($bind(this,this.setScaleXCallback),$bind(this,this.setScaleYCallback),$bind(this,this.setScaleXYCallback));
	this.scale.set(1,1);
	flixel_FlxG.signals.gameResized.add($bind(this,this.onGameResized));
	flixel_FlxG.cameras.cameraAdded.add($bind(this,this.onCameraChanged));
	flixel_FlxG.cameras.cameraRemoved.add($bind(this,this.onCameraChanged));
	flixel_FlxG.cameras.cameraResized.add($bind(this,this.onCameraChanged));
};
$hxClasses["flixel.tile.FlxTilemap"] = flixel_tile_FlxTilemap;
flixel_tile_FlxTilemap.__name__ = ["flixel","tile","FlxTilemap"];
flixel_tile_FlxTilemap.__super__ = flixel_tile_FlxBaseTilemap;
flixel_tile_FlxTilemap.prototype = $extend(flixel_tile_FlxBaseTilemap.prototype,{
	destroy: function() {
		this._flashPoint = null;
		this._flashRect = null;
		this._tileObjects = flixel_util_FlxDestroyUtil.destroyArray(this._tileObjects);
		this._buffers = flixel_util_FlxDestroyUtil.destroyArray(this._buffers);
		if(!flixel_FlxG.renderBlit) {
			this._helperPoint = null;
			this._matrix = null;
		}
		this.set_frames(null);
		this.set_graphic(null);
		this.scale = flixel_util_FlxDestroyUtil.destroy(this.scale);
		this.offset = flixel_util_FlxDestroyUtil.put(this.offset);
		this.colorTransform = null;
		flixel_FlxG.signals.gameResized.remove($bind(this,this.onGameResized));
		flixel_FlxG.cameras.cameraAdded.remove($bind(this,this.onCameraChanged));
		flixel_FlxG.cameras.cameraRemoved.remove($bind(this,this.onCameraChanged));
		flixel_FlxG.cameras.cameraResized.remove($bind(this,this.onCameraChanged));
		this.shader = null;
		flixel_tile_FlxBaseTilemap.prototype.destroy.call(this);
	}
	,set_frames: function(value) {
		this.frames = value;
		if(value != null) {
			this._tileWidth = value.frames[0].sourceSize.x | 0;
			this._tileHeight = value.frames[0].sourceSize.y | 0;
			this._flashRect.setTo(0,0,this._tileWidth,this._tileHeight);
			this.set_graphic(value.parent);
			this.postGraphicLoad();
		}
		return value;
	}
	,onGameResized: function(_,_1) {
		this._checkBufferChanges = true;
	}
	,onCameraChanged: function(_) {
		this._checkBufferChanges = true;
	}
	,cacheGraphics: function(TileWidth,TileHeight,TileGraphic) {
		if(js_Boot.__instanceof(TileGraphic,flixel_graphics_frames_FlxFramesCollection)) {
			this.set_frames(TileGraphic);
			return;
		}
		var graph = flixel_FlxG.bitmap.add(TileGraphic);
		if(graph == null) {
			return;
		}
		this._tileWidth = TileWidth;
		if(this._tileWidth <= 0) {
			this._tileWidth = graph.height;
		}
		this._tileHeight = TileHeight;
		if(this._tileHeight <= 0) {
			this._tileHeight = this._tileWidth;
		}
		var X = this._tileWidth;
		var Y = this._tileHeight;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		this.set_frames(flixel_graphics_frames_FlxTileFrames.fromGraphic(graph,point));
	}
	,initTileObjects: function() {
		if(this.frames == null) {
			return;
		}
		this._tileObjects = flixel_util_FlxDestroyUtil.destroyArray(this._tileObjects);
		this._tileObjects = [];
		var length = this.frames.frames.length;
		length += this._startingIndex;
		var _g1 = 0;
		var _g = length;
		while(_g1 < _g) {
			var i = _g1++;
			this._tileObjects[i] = new flixel_tile_FlxTile(this,i,this._tileWidth,this._tileHeight,i >= this._drawIndex,i >= this._collideIndex ? this.allowCollisions : 0);
		}
	}
	,computeDimensions: function() {
		this._scaledTileWidth = this._tileWidth * this.scale.x;
		this._scaledTileHeight = this._tileHeight * this.scale.y;
		this.set_width(this.widthInTiles * this._scaledTileWidth);
		this.set_height(this.heightInTiles * this._scaledTileHeight);
	}
	,updateMap: function() {
		var numTiles = this._tileObjects.length;
		var _g1 = 0;
		while(_g1 < numTiles) this.updateTile(_g1++);
	}
	,draw: function() {
		if(this.graphic == null) {
			return;
		}
		if(this._checkBufferChanges) {
			this.refreshBuffers();
			this._checkBufferChanges = false;
		}
		var camera;
		var buffer;
		var l = this.get_cameras().length;
		var _g1 = 0;
		while(_g1 < l) {
			var i = _g1++;
			camera = this.get_cameras()[i];
			if(!camera.visible || !camera.exists) {
				continue;
			}
			if(this._buffers[i] == null) {
				var tmp = this._buffers;
				var buffer1 = new flixel_tile_FlxTilemapBuffer(this._tileWidth,this._tileHeight,this.widthInTiles,this.heightInTiles,camera,this.scale.x,this.scale.y);
				buffer1.pixelPerfectRender = this.pixelPerfectRender;
				buffer1.antialiasing = this.antialiasing;
				tmp[i] = buffer1;
			}
			buffer = this._buffers[i];
			if(flixel_FlxG.renderBlit) {
				var _this = this.getScreenPosition(this._point,camera).subtractPoint(this.offset);
				var Y = buffer.y;
				_this.set_x(_this.x + buffer.x);
				_this.set_y(_this.y + Y);
				buffer.dirty = buffer.dirty || this._point.x > 0 || this._point.y > 0 || this._point.x + buffer.width < camera.width || this._point.y + buffer.height < camera.height;
				if(buffer.dirty) {
					this.drawTilemap(buffer,camera);
				}
				var _this1 = this.getScreenPosition(this._point,camera).subtractPoint(this.offset);
				var Y1 = buffer.y;
				_this1.set_x(_this1.x + buffer.x);
				_this1.set_y(_this1.y + Y1);
				var FlashPoint = this._flashPoint;
				if(FlashPoint == null) {
					FlashPoint = new openfl_geom_Point();
				}
				FlashPoint.x = _this1.x;
				FlashPoint.y = _this1.y;
				buffer.draw(camera,this._flashPoint,this.scale.x,this.scale.y);
			} else {
				this.drawTilemap(buffer,camera);
			}
		}
	}
	,refreshBuffers: function() {
		var _g1 = 0;
		var _g = this.get_cameras().length;
		while(_g1 < _g) {
			var i = _g1++;
			var camera = this.get_cameras()[i];
			var buffer = this._buffers[i];
			flixel_tile_FlxTilemap._helperBuffer.updateColumns(this._tileWidth,this.widthInTiles,this.scale.x,camera);
			flixel_tile_FlxTilemap._helperBuffer.updateRows(this._tileHeight,this.heightInTiles,this.scale.y,camera);
			if(buffer == null || flixel_tile_FlxTilemap._helperBuffer.columns != buffer.columns || flixel_tile_FlxTilemap._helperBuffer.rows != buffer.rows) {
				if(buffer != null) {
					buffer.destroy();
				}
				var tmp = this._buffers;
				var buffer1 = new flixel_tile_FlxTilemapBuffer(this._tileWidth,this._tileHeight,this.widthInTiles,this.heightInTiles,camera,this.scale.x,this.scale.y);
				buffer1.pixelPerfectRender = this.pixelPerfectRender;
				buffer1.antialiasing = this.antialiasing;
				tmp[i] = buffer1;
			}
		}
	}
	,setDirty: function(Dirty) {
		if(Dirty == null) {
			Dirty = true;
		}
		if(flixel_FlxG.renderTile) {
			return;
		}
		var _g = 0;
		var _g1 = this._buffers;
		while(_g < _g1.length) {
			var buffer = _g1[_g];
			++_g;
			if(buffer != null) {
				buffer.dirty = Dirty;
			}
		}
	}
	,overlapsWithCallback: function(Object,Callback,FlipCallbackParams,Position) {
		if(FlipCallbackParams == null) {
			FlipCallbackParams = false;
		}
		var results = false;
		var xPos = this.x;
		var yPos = this.y;
		if(Position != null) {
			xPos = Position.x;
			yPos = Position.y;
		}
		var selectionX = Math.floor((Object.x - xPos) / this._scaledTileWidth);
		var selectionY = Math.floor((Object.y - yPos) / this._scaledTileHeight);
		var selectionWidth = selectionX + Math.ceil(Object.get_width() / this._scaledTileWidth) + 1;
		var selectionHeight = selectionY + Math.ceil(Object.get_height() / this._scaledTileHeight) + 1;
		var Max = this.widthInTiles;
		var lowerBound = selectionX < 0 ? 0 : selectionX;
		selectionX = (Max != null && lowerBound > Max ? Max : lowerBound) | 0;
		var Max1 = this.heightInTiles;
		var lowerBound1 = selectionY < 0 ? 0 : selectionY;
		selectionY = (Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1) | 0;
		var Max2 = this.widthInTiles;
		var lowerBound2 = selectionWidth < 0 ? 0 : selectionWidth;
		selectionWidth = (Max2 != null && lowerBound2 > Max2 ? Max2 : lowerBound2) | 0;
		var Max3 = this.heightInTiles;
		var lowerBound3 = selectionHeight < 0 ? 0 : selectionHeight;
		selectionHeight = (Max3 != null && lowerBound3 > Max3 ? Max3 : lowerBound3) | 0;
		var rowStart = selectionY * this.widthInTiles;
		var column;
		var tile;
		var overlapFound;
		var deltaX = xPos - this.last.x;
		var deltaY = yPos - this.last.y;
		var _g1 = selectionY;
		var _g = selectionHeight;
		while(_g1 < _g) {
			var row = _g1++;
			column = selectionX;
			while(column < selectionWidth) {
				var index = rowStart + column;
				if(index < 0 || index > this._data.length - 1) {
					++column;
					continue;
				}
				var dataIndex = this._data[index];
				if(dataIndex < 0) {
					++column;
					continue;
				}
				tile = this._tileObjects[dataIndex];
				tile.set_width(this._scaledTileWidth);
				tile.set_height(this._scaledTileHeight);
				tile.set_x(xPos + column * tile.get_width());
				tile.set_y(yPos + row * tile.get_height());
				tile.last.set_x(tile.x - deltaX);
				tile.last.set_y(tile.y - deltaY);
				if(Object.x + Object.get_width() > tile.x && Object.x < tile.x + tile.get_width() && Object.y + Object.get_height() > tile.y) {
					overlapFound = Object.y < tile.y + tile.get_height();
				} else {
					overlapFound = false;
				}
				if(tile.allowCollisions != 0) {
					if(Callback != null) {
						if(FlipCallbackParams) {
							overlapFound = Callback(Object,tile);
						} else {
							overlapFound = Callback(tile,Object);
						}
					}
				}
				if(overlapFound) {
					if(tile.callbackFunction != null && (tile.filter == null || js_Boot.__instanceof(Object,tile.filter))) {
						tile.mapIndex = rowStart + column;
						tile.callbackFunction(tile,Object);
					}
					if(tile.allowCollisions != 0) {
						results = true;
					}
				}
				++column;
			}
			rowStart += this.widthInTiles;
		}
		return results;
	}
	,getTileIndexByCoords: function(Coord) {
		var result = ((Coord.y - this.y) / this._scaledTileHeight | 0) * this.widthInTiles + ((Coord.x - this.x) / this._scaledTileWidth | 0);
		if(Coord._weak) {
			Coord.put();
		}
		return result;
	}
	,getTileCoordsByIndex: function(Index,Midpoint) {
		if(Midpoint == null) {
			Midpoint = true;
		}
		var X = this.x + Index % this.widthInTiles * this._scaledTileWidth;
		var Y = this.y + (Index / this.widthInTiles | 0) * this._scaledTileHeight;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		if(Midpoint) {
			point.set_x(point.x + this._scaledTileWidth * 0.5);
			point.set_y(point.y + this._scaledTileHeight * 0.5);
		}
		return point;
	}
	,getTileCoords: function(Index,Midpoint) {
		if(Midpoint == null) {
			Midpoint = true;
		}
		var array = null;
		var l = this.widthInTiles * this.heightInTiles;
		var _g1 = 0;
		while(_g1 < l) {
			var i = _g1++;
			if(this._data[i] == Index) {
				var X = this.x + i % this.widthInTiles * this._scaledTileWidth;
				var Y = this.y + (i / this.widthInTiles | 0) * this._scaledTileHeight;
				var point = flixel_math_FlxPoint._pool.get().set(X,Y);
				point._inPool = false;
				if(Midpoint) {
					point.set_x(point.x + this._scaledTileWidth * 0.5);
					point.set_y(point.y + this._scaledTileHeight * 0.5);
				}
				if(array == null) {
					array = [];
				}
				array.push(point);
			}
		}
		return array;
	}
	,follow: function(Camera,Border,UpdateWorld) {
		if(UpdateWorld == null) {
			UpdateWorld = true;
		}
		if(Border == null) {
			Border = 0;
		}
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		Camera.setScrollBoundsRect(this.x + Border * this._scaledTileWidth,this.y + Border * this._scaledTileHeight,this.get_width() - Border * this._scaledTileWidth * 2,this.get_height() - Border * this._scaledTileHeight * 2,UpdateWorld);
	}
	,ray: function(Start,End,Result,Resolution) {
		if(Resolution == null) {
			Resolution = 1;
		}
		var step = this._scaledTileWidth;
		if(this._scaledTileHeight < this._scaledTileWidth) {
			step = this._scaledTileHeight;
		}
		step /= Resolution;
		var deltaX = End.x - Start.x;
		var deltaY = End.y - Start.y;
		var steps = Math.ceil(Math.sqrt(deltaX * deltaX + deltaY * deltaY) / step);
		var stepX = deltaX / steps;
		var stepY = deltaY / steps;
		var curX = Start.x - stepX - this.x;
		var curY = Start.y - stepY - this.y;
		var tileX;
		var tileY;
		var i = 0;
		if(Start._weak) {
			Start.put();
		}
		if(End._weak) {
			End.put();
		}
		while(i < steps) {
			curX += stepX;
			curY += stepY;
			if(curX < 0 || curX > this.get_width() || curY < 0 || curY > this.get_height()) {
				++i;
				continue;
			}
			tileX = Math.floor(curX / this._scaledTileWidth);
			tileY = Math.floor(curY / this._scaledTileHeight);
			if(this._tileObjects[this._data[tileY * this.widthInTiles + tileX]].allowCollisions != 0) {
				tileX *= this._scaledTileWidth | 0;
				tileY *= this._scaledTileHeight | 0;
				var rx = 0;
				var ry = 0;
				var q;
				var lx = curX - stepX;
				var ly = curY - stepY;
				q = tileX;
				if(deltaX < 0) {
					q += this._scaledTileWidth;
				}
				rx = q;
				ry = ly + stepY * ((q - lx) / stepX);
				if(ry >= tileY && ry <= tileY + this._scaledTileHeight) {
					if(Result == null) {
						var point = flixel_math_FlxPoint._pool.get().set(0,0);
						point._inPool = false;
						Result = point;
					}
					Result.set(rx,ry);
					return false;
				}
				q = tileY;
				if(deltaY < 0) {
					q += this._scaledTileHeight;
				}
				rx = lx + stepX * ((q - ly) / stepY);
				ry = q;
				if(rx >= tileX && rx <= tileX + this._scaledTileWidth) {
					if(Result == null) {
						var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
						point1._inPool = false;
						Result = point1;
					}
					Result.set(rx,ry);
					return false;
				}
				return true;
			}
			++i;
		}
		return true;
	}
	,tileToSprite: function(X,Y,NewTile,SpriteFactory) {
		if(NewTile == null) {
			NewTile = 0;
		}
		if(SpriteFactory == null) {
			SpriteFactory = $bind(this,this.defaultTileToSprite);
		}
		var tile = this._tileObjects[this._data[X + Y * this.widthInTiles]];
		var image = null;
		if(tile != null && tile.visible) {
			image = flixel_graphics_frames_FlxImageFrame.fromFrame(tile.frame);
		} else {
			var image1 = this.graphic;
			var Width = this._tileWidth;
			var Height = this._tileHeight;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = Width;
			_this.height = Height;
			_this._inPool = false;
			image = flixel_graphics_frames_FlxImageFrame.fromEmptyFrame(image1,_this);
		}
		var tileX = X * this._tileWidth * this.scale.x + this.x;
		var tileY = Y * this._tileHeight * this.scale.y + this.y;
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var point1 = this.scale;
		point.set_x(point1.x);
		point.set_y(point1.y);
		if(point1._weak) {
			point1.put();
		}
		var tileSprite = SpriteFactory({ graphic : image, x : tileX, y : tileY, scale : point, alpha : this.alpha, blend : this.blend});
		if(NewTile >= 0) {
			this.setTile(X,Y,NewTile);
		}
		return tileSprite;
	}
	,updateBuffers: function() {
		flixel_util_FlxDestroyUtil.destroyArray(this._buffers);
		this._buffers = [];
	}
	,drawTilemap: function(Buffer,Camera) {
		var isColored = this.alpha != 1 || this.color != 16777215;
		var drawX = 0;
		var drawY = 0;
		var scaledWidth = 0;
		var scaledHeight = 0;
		var drawItem = null;
		if(flixel_FlxG.renderBlit) {
			Buffer.fill();
		} else {
			var _this = this.getScreenPosition(this._point,Camera).subtractPoint(this.offset);
			var FlashPoint = this._helperPoint;
			if(FlashPoint == null) {
				FlashPoint = new openfl_geom_Point();
			}
			FlashPoint.x = _this.x;
			FlashPoint.y = _this.y;
			this._helperPoint.x = this.isPixelPerfectRender(Camera) ? Math.floor(this._helperPoint.x) : this._helperPoint.x;
			this._helperPoint.y = this.isPixelPerfectRender(Camera) ? Math.floor(this._helperPoint.y) : this._helperPoint.y;
			scaledWidth = this._scaledTileWidth;
			scaledHeight = this._scaledTileHeight;
			drawItem = Camera.startQuadBatch(this.graphic,isColored,this.colorTransform != null && flixel_util_FlxColorTransformUtil.hasRGBAOffsets(this.colorTransform),this.blend,this.antialiasing,this.shader);
		}
		this._point.set_x(Camera.scroll.x * this.scrollFactor.x - this.x - this.offset.x);
		this._point.set_y(Camera.scroll.y * this.scrollFactor.y - this.y - this.offset.y);
		var screenXInTiles = Math.floor(this._point.x / this._scaledTileWidth);
		var screenYInTiles = Math.floor(this._point.y / this._scaledTileHeight);
		var screenRows = Buffer.rows;
		var screenColumns = Buffer.columns;
		var Max = this.widthInTiles - screenColumns;
		var lowerBound = screenXInTiles < 0 ? 0 : screenXInTiles;
		screenXInTiles = (Max != null && lowerBound > Max ? Max : lowerBound) | 0;
		var Max1 = this.heightInTiles - screenRows;
		var lowerBound1 = screenYInTiles < 0 ? 0 : screenYInTiles;
		screenYInTiles = (Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1) | 0;
		var rowIndex = screenYInTiles * this.widthInTiles + screenXInTiles;
		this._flashPoint.y = 0;
		var columnIndex;
		var tile;
		var frame;
		var _g1 = 0;
		while(_g1 < screenRows) {
			++_g1;
			columnIndex = rowIndex;
			this._flashPoint.x = 0;
			var _g3 = 0;
			while(_g3 < screenColumns) {
				++_g3;
				tile = this._tileObjects[this._data[columnIndex]];
				if(tile != null && tile.visible && tile.frame.type != 2) {
					frame = tile.frame;
					if(flixel_FlxG.renderBlit) {
						frame.paint(Buffer.pixels,this._flashPoint,true);
					} else {
						drawX = this._helperPoint.x + columnIndex % this.widthInTiles * scaledWidth;
						drawY = this._helperPoint.y + Math.floor(columnIndex / this.widthInTiles) * scaledHeight;
						this._matrix.identity();
						if(frame.angle != 0) {
							frame.prepareMatrix(this._matrix);
						}
						var scaleX = this.scale.x;
						var scaleY = this.scale.y;
						if(this.useScaleHack) {
							scaleX += 1 / (frame.sourceSize.x * Camera.totalScaleX);
							scaleY += 1 / (frame.sourceSize.y * Camera.totalScaleY);
						}
						this._matrix.scale(scaleX,scaleY);
						this._matrix.translate(drawX,drawY);
						drawItem.addQuad(frame,this._matrix,this.colorTransform);
					}
				}
				if(flixel_FlxG.renderBlit) {
					this._flashPoint.x += this._tileWidth;
				}
				++columnIndex;
			}
			if(flixel_FlxG.renderBlit) {
				this._flashPoint.y += this._tileHeight;
			}
			rowIndex += this.widthInTiles;
		}
		Buffer.x = screenXInTiles * this._scaledTileWidth;
		Buffer.y = screenYInTiles * this._scaledTileHeight;
		if(flixel_FlxG.renderBlit) {
			if(isColored) {
				Buffer.colorTransform(this.colorTransform);
			}
			Buffer.blend = this.blend;
		}
		Buffer.dirty = false;
	}
	,updateTile: function(Index) {
		var tile = this._tileObjects[Index];
		if(tile == null || !tile.visible) {
			return;
		}
		tile.frame = this.frames.frames[Index - this._startingIndex];
	}
	,createBuffer: function(camera) {
		var buffer = new flixel_tile_FlxTilemapBuffer(this._tileWidth,this._tileHeight,this.widthInTiles,this.heightInTiles,camera,this.scale.x,this.scale.y);
		buffer.pixelPerfectRender = this.pixelPerfectRender;
		buffer.antialiasing = this.antialiasing;
		return buffer;
	}
	,set_antialiasing: function(value) {
		var _g = 0;
		var _g1 = this._buffers;
		while(_g < _g1.length) {
			var buffer = _g1[_g];
			++_g;
			buffer.antialiasing = value;
		}
		return this.antialiasing = value;
	}
	,set_graphic: function(Value) {
		if(this.graphic != Value) {
			if(Value != null) {
				Value.set_useCount(Value.get_useCount() + 1);
			}
			if(this.graphic != null) {
				var _g = this.graphic;
				_g.set_useCount(_g.get_useCount() - 1);
			}
		}
		return this.graphic = Value;
	}
	,set_pixelPerfectRender: function(Value) {
		if(this._buffers != null) {
			var _g = 0;
			var _g1 = this._buffers;
			while(_g < _g1.length) {
				var buffer = _g1[_g];
				++_g;
				buffer.pixelPerfectRender = Value;
			}
		}
		return this.pixelPerfectRender = Value;
	}
	,set_alpha: function(Alpha) {
		var lowerBound = Alpha < 0 ? 0 : Alpha;
		this.alpha = lowerBound > 1 ? 1 : lowerBound;
		this.updateColorTransform();
		return this.alpha;
	}
	,set_color: function(Color) {
		if(this.color == Color) {
			return Color;
		}
		this.color = Color;
		this.updateColorTransform();
		return this.color;
	}
	,updateColorTransform: function() {
		if(this.colorTransform == null) {
			this.colorTransform = new openfl_geom_ColorTransform();
		}
		if(this.alpha != 1 || this.color != 16777215) {
			flixel_util_FlxColorTransformUtil.setMultipliers(this.colorTransform,(this.color >> 16 & 255) / 255,(this.color >> 8 & 255) / 255,(this.color & 255) / 255,this.alpha);
		} else {
			flixel_util_FlxColorTransformUtil.setMultipliers(this.colorTransform,1,1,1,1);
		}
		this.setDirty();
	}
	,set_blend: function(Value) {
		this.setDirty();
		return this.blend = Value;
	}
	,setScaleXYCallback: function(Scale) {
		this.setScaleXCallback(Scale);
		this.setScaleYCallback(Scale);
	}
	,setScaleXCallback: function(Scale) {
		this._scaledTileWidth = this._tileWidth * this.scale.x;
		this.set_width(this.widthInTiles * this._scaledTileWidth);
		if(this.get_cameras() == null) {
			return;
		}
		var _g1 = 0;
		var _g = this.get_cameras().length;
		while(_g1 < _g) {
			var i = _g1++;
			if(this._buffers[i] != null) {
				this._buffers[i].updateColumns(this._tileWidth,this.widthInTiles,this.scale.x,this.get_cameras()[i]);
			}
		}
	}
	,setScaleYCallback: function(Scale) {
		this._scaledTileHeight = this._tileHeight * this.scale.y;
		this.set_height(this.heightInTiles * this._scaledTileHeight);
		if(this.get_cameras() == null) {
			return;
		}
		var _g1 = 0;
		var _g = this.get_cameras().length;
		while(_g1 < _g) {
			var i = _g1++;
			if(this._buffers[i] != null) {
				this._buffers[i].updateRows(this._tileHeight,this.heightInTiles,this.scale.y,this.get_cameras()[i]);
			}
		}
	}
	,defaultTileToSprite: function(TileProperties) {
		var tileSprite = new flixel_FlxSprite(TileProperties.x,TileProperties.y);
		tileSprite.set_frames(TileProperties.graphic);
		var _this = tileSprite.scale;
		var point = TileProperties.scale;
		_this.set_x(point.x);
		_this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
		TileProperties.scale = flixel_util_FlxDestroyUtil.put(TileProperties.scale);
		tileSprite.set_alpha(TileProperties.alpha);
		tileSprite.set_blend(TileProperties.blend);
		return tileSprite;
	}
	,set_allowCollisions: function(Value) {
		var _g = 0;
		var _g1 = this._tileObjects;
		while(_g < _g1.length) {
			var tile = _g1[_g];
			++_g;
			if(tile.index >= this._collideIndex) {
				tile.set_allowCollisions(Value);
			}
		}
		return flixel_tile_FlxBaseTilemap.prototype.set_allowCollisions.call(this,Value);
	}
	,__class__: flixel_tile_FlxTilemap
	,__properties__: $extend(flixel_tile_FlxBaseTilemap.prototype.__properties__,{set_blend:"set_blend",set_alpha:"set_alpha",set_color:"set_color",set_graphic:"set_graphic",set_frames:"set_frames",set_antialiasing:"set_antialiasing"})
});
var flixel_addons_tile_FlxTilemapExt = function() {
	this._slopeThinSteep = [];
	this._slopeThickSteep = [];
	this._slopeThinGentle = [];
	this._slopeThickGentle = [];
	this._slopeSoutheast = [];
	this._slopeSouthwest = [];
	this._slopeNortheast = [];
	this._slopeNorthwest = [];
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this._objPoint = point;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	this._slopePoint = point1;
	this._snapping = 2;
	flixel_tile_FlxTilemap.call(this);
};
$hxClasses["flixel.addons.tile.FlxTilemapExt"] = flixel_addons_tile_FlxTilemapExt;
flixel_addons_tile_FlxTilemapExt.__name__ = ["flixel","addons","tile","FlxTilemapExt"];
flixel_addons_tile_FlxTilemapExt.__super__ = flixel_tile_FlxTilemap;
flixel_addons_tile_FlxTilemapExt.prototype = $extend(flixel_tile_FlxTilemap.prototype,{
	destroy: function() {
		this._slopePoint = flixel_util_FlxDestroyUtil.put(this._slopePoint);
		this._objPoint = flixel_util_FlxDestroyUtil.put(this._objPoint);
		this._slopeNorthwest = null;
		this._slopeNortheast = null;
		this._slopeSouthwest = null;
		this._slopeSoutheast = null;
		this._slopeThickGentle = null;
		this._slopeThinGentle = null;
		this._slopeThickSteep = null;
		this._slopeThinSteep = null;
		flixel_tile_FlxTilemap.prototype.destroy.call(this);
		this._specialTiles = flixel_util_FlxDestroyUtil.destroyArray(this._specialTiles);
	}
	,update: function(elapsed) {
		flixel_tile_FlxTilemap.prototype.update.call(this,elapsed);
		if(this._specialTiles != null && this._specialTiles.length > 0) {
			var _g = 0;
			var _g1 = this._specialTiles;
			while(_g < _g1.length) {
				var tile = _g1[_g];
				++_g;
				if(tile != null && tile.animation != null) {
					tile.update(elapsed);
				}
			}
		}
	}
	,drawTilemap: function(Buffer,Camera) {
		if(flixel_FlxG.renderBlit) {
			Buffer.fill();
		} else {
			var _this = this.getScreenPosition(this._point,Camera);
			var FlashPoint = this._helperPoint;
			if(FlashPoint == null) {
				FlashPoint = new openfl_geom_Point();
			}
			FlashPoint.x = _this.x;
			FlashPoint.y = _this.y;
			this._helperPoint.x = this.isPixelPerfectRender(Camera) ? Math.floor(this._helperPoint.x) : this._helperPoint.x;
			this._helperPoint.y = this.isPixelPerfectRender(Camera) ? Math.floor(this._helperPoint.y) : this._helperPoint.y;
		}
		var scaledWidth = this._tileWidth;
		var scaledHeight = this._tileHeight;
		var drawX;
		var drawY;
		var _tileTransformMatrix = null;
		var matrixToUse;
		var isColored = this.alpha != 1 || this.color != 16777215;
		this._point.set_x(Camera.scroll.x * this.scrollFactor.x - this.x);
		this._point.set_y(Camera.scroll.y * this.scrollFactor.y - this.y);
		var screenXInTiles = Math.floor(this._point.x / this._tileWidth);
		var screenYInTiles = Math.floor(this._point.y / this._tileHeight);
		var screenRows = Buffer.rows;
		var screenColumns = Buffer.columns;
		var Max = this.widthInTiles - screenColumns;
		var lowerBound = screenXInTiles < 0 ? 0 : screenXInTiles;
		screenXInTiles = (Max != null && lowerBound > Max ? Max : lowerBound) | 0;
		var Max1 = this.heightInTiles - screenRows;
		var lowerBound1 = screenYInTiles < 0 ? 0 : screenYInTiles;
		screenYInTiles = (Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1) | 0;
		var rowIndex = screenYInTiles * this.widthInTiles + screenXInTiles;
		this._flashPoint.y = 0;
		var columnIndex;
		var tile;
		var frame;
		var special;
		var isSpecial = false;
		var _g1 = 0;
		while(_g1 < screenRows) {
			++_g1;
			columnIndex = rowIndex;
			this._flashPoint.x = 0;
			var _g3 = 0;
			while(_g3 < screenColumns) {
				++_g3;
				isSpecial = false;
				special = null;
				tile = this._tileObjects[this._data[columnIndex]];
				if(this._specialTiles != null && this._specialTiles[columnIndex] != null) {
					special = this._specialTiles[columnIndex];
					if(!(special.flipX || special.flipY || special.rotate != 0)) {
						isSpecial = special.animation != null;
					} else {
						isSpecial = true;
					}
				}
				if(flixel_FlxG.renderBlit) {
					if(isSpecial) {
						special.paint(Buffer.pixels,this._flashPoint);
						Buffer.dirty = special.dirty || Buffer.dirty;
					} else if(tile != null && tile.visible && tile.frame.type != 2) {
						tile.frame.paint(Buffer.pixels,this._flashPoint,true);
					}
				} else {
					if(isSpecial) {
						frame = special.currFrame;
					} else {
						frame = tile.frame;
					}
					if(frame != null) {
						drawX = this._helperPoint.x + columnIndex % this.widthInTiles * scaledWidth;
						drawY = this._helperPoint.y + Math.floor(columnIndex / this.widthInTiles) * scaledHeight;
						if(isSpecial) {
							_tileTransformMatrix = special.getMatrix();
							matrixToUse = _tileTransformMatrix;
						} else {
							frame.prepareMatrix(this._matrix);
							matrixToUse = this._matrix;
						}
						matrixToUse.translate(drawX,drawY);
						Camera.drawPixels(frame,null,matrixToUse,this.colorTransform,this.blend);
					}
				}
				if(flixel_FlxG.renderBlit) {
					this._flashPoint.x += this._tileWidth;
				}
				++columnIndex;
			}
			rowIndex += this.widthInTiles;
			if(flixel_FlxG.renderBlit) {
				this._flashPoint.y += this._tileHeight;
			}
		}
		Buffer.x = screenXInTiles * this._tileWidth;
		Buffer.y = screenYInTiles * this._tileHeight;
		if(flixel_FlxG.renderBlit) {
			if(isColored) {
				Buffer.colorTransform(this.colorTransform);
			}
			Buffer.blend = this.blend;
		}
	}
	,setSpecialTiles: function(tiles) {
		this._specialTiles = [];
		var tile;
		var _g1 = 0;
		var _g = tiles.length;
		while(_g1 < _g) {
			var i = _g1++;
			tile = tiles[i];
			if(tile != null && (tile.flipX || tile.flipY || tile.rotate != 0 || tile.animation != null)) {
				this._specialTiles[i] = tile;
				tile.set_currTileId(tile.currTileId - this._startingIndex);
				tile.set_frames(this.frames);
				if(tile.animation != null) {
					var animFrames = tile.animation.frames;
					var preparedFrames = [];
					var _g3 = 0;
					var _g2 = animFrames.length;
					while(_g3 < _g2) {
						var j = _g3++;
						preparedFrames[j] = animFrames[j] - this._startingIndex;
					}
					tile.animation.frames = preparedFrames;
				}
			} else {
				this._specialTiles[i] = null;
			}
		}
	}
	,draw: function() {
		var cameras = this.get_cameras();
		var camera;
		var buffer;
		var i = 0;
		var l = cameras.length;
		while(i < l) {
			camera = cameras[i];
			if(!camera.visible || !camera.exists) {
				continue;
			}
			if(this._buffers[i] == null) {
				this._buffers[i] = new flixel_tile_FlxTilemapBuffer(this._tileWidth,this._tileHeight,this.widthInTiles,this.heightInTiles,camera);
				this._buffers[i].pixelPerfectRender = this.pixelPerfectRender;
			}
			buffer = this._buffers[i++];
			if(flixel_FlxG.renderBlit) {
				if(!buffer.dirty) {
					this._point.set_x(this.x - camera.scroll.x * this.scrollFactor.x + buffer.x);
					this._point.set_y(this.y - camera.scroll.y * this.scrollFactor.y + buffer.y);
					buffer.dirty = this._point.x > 0 || this._point.y > 0 || this._point.x + buffer.width < camera.width || this._point.y + buffer.height < camera.height;
				}
				if(buffer.dirty) {
					buffer.dirty = false;
					this.drawTilemap(buffer,camera);
				}
				this._flashPoint.x = this.x - camera.scroll.x * this.scrollFactor.x + buffer.x;
				this._flashPoint.y = this.y - camera.scroll.y * this.scrollFactor.y + buffer.y;
				buffer.draw(camera,this._flashPoint);
			} else {
				this.drawTilemap(buffer,camera);
			}
		}
	}
	,overlapsWithCallback: function(Object,Callback,FlipCallbackParams,Position) {
		if(FlipCallbackParams == null) {
			FlipCallbackParams = false;
		}
		var results = false;
		var X = this.x;
		var Y = this.y;
		if(Position != null) {
			X = Position.x;
			Y = Position.y;
		}
		var selectionX = Math.floor((Object.x - X) / this._tileWidth);
		var selectionY = Math.floor((Object.y - Y) / this._tileHeight);
		var selectionWidth = selectionX + Math.ceil(Object.get_width() / this._tileWidth) + 1;
		var selectionHeight = selectionY + Math.ceil(Object.get_height() / this._tileHeight) + 1;
		if(selectionX > 0) {
			selectionX = selectionX;
		} else {
			selectionX = 0;
		}
		if(selectionY > 0) {
			selectionY = selectionY;
		} else {
			selectionY = 0;
		}
		var b = this.widthInTiles;
		if(selectionWidth > b) {
			selectionWidth = b;
		} else {
			selectionWidth = selectionWidth;
		}
		var b1 = this.heightInTiles;
		if(selectionHeight > b1) {
			selectionHeight = b1;
		} else {
			selectionHeight = selectionHeight;
		}
		var rowStart = selectionY * this.widthInTiles;
		var row = selectionY;
		var column;
		var tile;
		var overlapFound;
		var deltaX = X - this.last.x;
		var deltaY = Y - this.last.y;
		while(row < selectionHeight) {
			column = selectionX;
			while(column < selectionWidth) {
				overlapFound = false;
				tile = this._tileObjects[this._data[rowStart + column]];
				if(tile.allowCollisions != 0) {
					tile.set_x(X + column * this._tileWidth);
					tile.set_y(Y + row * this._tileHeight);
					tile.last.set_x(tile.x - deltaX);
					tile.last.set_y(tile.y - deltaY);
					if(Callback != null) {
						if(FlipCallbackParams) {
							overlapFound = Callback(Object,tile);
						} else {
							overlapFound = Callback(tile,Object);
						}
					} else if(Object.x + Object.get_width() > tile.x && Object.x < tile.x + tile.get_width() && Object.y + Object.get_height() > tile.y) {
						overlapFound = Object.y < tile.y + tile.get_height();
					} else {
						overlapFound = false;
					}
					if(overlapFound || !overlapFound && this.checkArrays(tile.index)) {
						if(tile.callbackFunction != null && (tile.filter == null || js_Boot.__instanceof(Object,tile.filter))) {
							tile.mapIndex = rowStart + column;
							tile.callbackFunction(tile,Object);
						}
						results = true;
					}
				} else if(tile.callbackFunction != null && (tile.filter == null || js_Boot.__instanceof(Object,tile.filter))) {
					tile.mapIndex = rowStart + column;
					tile.callbackFunction(tile,Object);
				}
				++column;
			}
			rowStart += this.widthInTiles;
			++row;
		}
		return results;
	}
	,setSlopes: function(Northwest,Northeast,Southwest,Southeast) {
		if(Northwest != null) {
			this._slopeNorthwest = Northwest;
		}
		if(Northeast != null) {
			this._slopeNortheast = Northeast;
		}
		if(Southwest != null) {
			this._slopeSouthwest = Southwest;
		}
		if(Southeast != null) {
			this._slopeSoutheast = Southeast;
		}
		this.setSlopeProperties();
	}
	,setGentle: function(ThickTiles,ThinTiles) {
		if(ThickTiles != null) {
			this._slopeThickGentle = ThickTiles;
		}
		if(ThinTiles != null) {
			this._slopeThinGentle = ThinTiles;
			var _g = 0;
			var _g1 = this._slopeThinGentle;
			while(_g < _g1.length) {
				var tile = _g1[_g];
				++_g;
				this._tileObjects[tile].set_allowCollisions(this._slopeSouthwest.indexOf(tile) >= 0 || this._slopeSoutheast.indexOf(tile) >= 0 ? 256 : 4096);
			}
		}
	}
	,setSteep: function(ThickTiles,ThinTiles) {
		if(ThickTiles != null) {
			this._slopeThickSteep = ThickTiles;
		}
		if(ThinTiles != null) {
			this._slopeThinSteep = ThinTiles;
			var _g = 0;
			var _g1 = this._slopeThinSteep;
			while(_g < _g1.length) {
				var tile = _g1[_g];
				++_g;
				this._tileObjects[tile].set_allowCollisions(this._slopeSouthwest.indexOf(tile) >= 0 || this._slopeNorthwest.indexOf(tile) >= 0 ? 16 : 1);
			}
		}
	}
	,checkThickGentle: function(TileIndex) {
		return this._slopeThickGentle.indexOf(TileIndex) >= 0;
	}
	,checkThinGentle: function(TileIndex) {
		return this._slopeThinGentle.indexOf(TileIndex) >= 0;
	}
	,checkThickSteep: function(TileIndex) {
		return this._slopeThickSteep.indexOf(TileIndex) >= 0;
	}
	,checkThinSteep: function(TileIndex) {
		return this._slopeThinSteep.indexOf(TileIndex) >= 0;
	}
	,fixSlopePoint: function(Slope) {
		var Value = this._slopePoint.x;
		var Min = Slope.x;
		var Max = Slope.x + this._tileWidth;
		var lowerBound = Min != null && Value < Min ? Min : Value;
		this._slopePoint.set_x(Max != null && lowerBound > Max ? Max : lowerBound);
		var Value1 = this._slopePoint.y;
		var Min1 = Slope.y;
		var Max1 = Slope.y + this._tileHeight;
		var lowerBound1 = Min1 != null && Value1 < Min1 ? Min1 : Value1;
		this._slopePoint.set_y(Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1);
	}
	,onCollideFloorSlope: function(Slope,Object) {
		Object.touching = 4096;
		Object.velocity.set_y(Math.min(Object.velocity.y,0));
		Object.set_y(this._slopePoint.y - Object.get_height());
		if(Object.y < Slope.y - Object.get_height()) {
			Object.set_y(Slope.y - Object.get_height());
		}
	}
	,onCollideCeilSlope: function(Slope,Object) {
		Object.touching = 256;
		Object.velocity.set_y(Math.max(Object.velocity.y,0));
		Object.set_y(this._slopePoint.y);
		if(Object.y > Slope.y + this._tileHeight) {
			Object.set_y(Slope.y + this._tileHeight);
		}
	}
	,solveCollisionSlopeNorthwest: function(Slope,Object) {
		this._objPoint.set_x(Math.floor(Object.x + Object.get_width() + this._snapping));
		this._objPoint.set_y(Math.floor(Object.y + Object.get_height()));
		this._slopePoint.set_x(this._objPoint.x);
		this._slopePoint.set_y(Slope.y + this._tileHeight - (this._slopePoint.x - Slope.x));
		var tileId = (js_Boot.__cast(Slope , flixel_tile_FlxTile)).index;
		if(this.checkThinSteep(tileId)) {
			if(this._slopePoint.x - Slope.x <= this._tileWidth / 2) {
				return;
			} else {
				this._slopePoint.set_y(Slope.y + this._tileHeight * (2 - 2 * (this._slopePoint.x - Slope.x) / this._tileWidth) + this._snapping);
			}
		} else if(this.checkThickSteep(tileId)) {
			this._slopePoint.set_y(Slope.y + this._tileHeight * (1 - 2 * ((this._slopePoint.x - Slope.x) / this._tileWidth)) + this._snapping);
		} else if(this.checkThickGentle(tileId)) {
			this._slopePoint.set_y(Slope.y + (this._tileHeight - this._slopePoint.x + Slope.x) / 2);
		} else if(this.checkThinGentle(tileId)) {
			this._slopePoint.set_y(Slope.y + this._tileHeight - (this._slopePoint.x - Slope.x) / 2);
		}
		this.fixSlopePoint(js_Boot.__cast(Slope , flixel_tile_FlxTile));
		if(this._objPoint.x > Slope.x + this._snapping && this._objPoint.x < Slope.x + this._tileWidth + Object.get_width() + this._snapping && this._objPoint.y >= this._slopePoint.y && this._objPoint.y <= Slope.y + this._tileHeight) {
			this.onCollideFloorSlope(Slope,Object);
		}
	}
	,solveCollisionSlopeNortheast: function(Slope,Object) {
		this._objPoint.set_x(Math.floor(Object.x - this._snapping));
		this._objPoint.set_y(Math.floor(Object.y + Object.get_height()));
		this._slopePoint.set_x(this._objPoint.x);
		this._slopePoint.set_y(Slope.y + this._tileHeight - (Slope.x - this._slopePoint.x + this._tileWidth));
		var tileId = (js_Boot.__cast(Slope , flixel_tile_FlxTile)).index;
		if(this.checkThinSteep(tileId)) {
			if(this._slopePoint.x - Slope.x >= this._tileWidth / 2) {
				return;
			} else {
				this._slopePoint.set_y(Slope.y + this._tileHeight * 2 * ((this._slopePoint.x - Slope.x) / this._tileWidth) + this._snapping);
			}
		} else if(this.checkThickSteep(tileId)) {
			this._slopePoint.set_y(Slope.y - this._tileHeight * (1 + 2 * ((Slope.x - this._slopePoint.x) / this._tileWidth)) + this._snapping);
		} else if(this.checkThickGentle(tileId)) {
			this._slopePoint.set_y(Slope.y + (this._tileHeight - Slope.x + this._slopePoint.x - this._tileWidth) / 2);
		} else if(this.checkThinGentle(tileId)) {
			this._slopePoint.set_y(Slope.y + this._tileHeight - (Slope.x - this._slopePoint.x + this._tileWidth) / 2);
		}
		this.fixSlopePoint(js_Boot.__cast(Slope , flixel_tile_FlxTile));
		if(this._objPoint.x > Slope.x - Object.get_width() - this._snapping && this._objPoint.x < Slope.x + this._tileWidth + this._snapping && this._objPoint.y >= this._slopePoint.y && this._objPoint.y <= Slope.y + this._tileHeight) {
			this.onCollideFloorSlope(Slope,Object);
		}
	}
	,solveCollisionSlopeSouthwest: function(Slope,Object) {
		this._objPoint.set_x(Math.floor(Object.x + Object.get_width() + this._snapping));
		this._objPoint.set_y(Math.ceil(Object.y));
		this._slopePoint.set_x(this._objPoint.x);
		this._slopePoint.set_y(Slope.y + (this._slopePoint.x - Slope.x));
		var tileId = (js_Boot.__cast(Slope , flixel_tile_FlxTile)).index;
		if(this.checkThinSteep(tileId)) {
			if(this._slopePoint.x - Slope.x <= this._tileWidth / 2) {
				return;
			} else {
				this._slopePoint.set_y(Slope.y - this._tileHeight * (1 + 2 * ((Slope.x - this._slopePoint.x) / this._tileWidth)) - this._snapping);
			}
		} else if(this.checkThickSteep(tileId)) {
			this._slopePoint.set_y(Slope.y + this._tileHeight * 2 * ((this._slopePoint.x - Slope.x) / this._tileWidth) - this._snapping);
		} else if(this.checkThickGentle(tileId)) {
			this._slopePoint.set_y(Slope.y + this._tileHeight - (Slope.x - this._slopePoint.x + this._tileWidth) / 2);
		} else if(this.checkThinGentle(tileId)) {
			this._slopePoint.set_y(Slope.y + (this._tileHeight - Slope.x + this._slopePoint.x - this._tileWidth) / 2);
		}
		this.fixSlopePoint(js_Boot.__cast(Slope , flixel_tile_FlxTile));
		if(this._objPoint.x > Slope.x + this._snapping && this._objPoint.x < Slope.x + this._tileWidth + Object.get_width() + this._snapping && this._objPoint.y <= this._slopePoint.y && this._objPoint.y >= Slope.y) {
			this.onCollideCeilSlope(Slope,Object);
		}
	}
	,solveCollisionSlopeSoutheast: function(Slope,Object) {
		this._objPoint.set_x(Math.floor(Object.x - this._snapping));
		this._objPoint.set_y(Math.ceil(Object.y));
		this._slopePoint.set_x(this._objPoint.x);
		this._slopePoint.set_y(Slope.y + (Slope.x - this._slopePoint.x + this._tileWidth));
		var tileId = (js_Boot.__cast(Slope , flixel_tile_FlxTile)).index;
		if(this.checkThinSteep(tileId)) {
			if(this._slopePoint.x - Slope.x >= this._tileWidth / 2) {
				return;
			} else {
				this._slopePoint.set_y(Slope.y + this._tileHeight * (1 - 2 * ((this._slopePoint.x - Slope.x) / this._tileWidth)) - this._snapping);
			}
		} else if(this.checkThickSteep(tileId)) {
			this._slopePoint.set_y(Slope.y + this._tileHeight * (2 - 2 * (this._slopePoint.x - Slope.x) / this._tileWidth) - this._snapping);
		} else if(this.checkThickGentle(tileId)) {
			this._slopePoint.set_y(Slope.y + this._tileHeight - (this._slopePoint.x - Slope.x) / 2);
		} else if(this.checkThinGentle(tileId)) {
			this._slopePoint.set_y(Slope.y + (this._tileHeight - this._slopePoint.x + Slope.x) / 2);
		}
		this.fixSlopePoint(js_Boot.__cast(Slope , flixel_tile_FlxTile));
		if(this._objPoint.x > Slope.x - Object.get_width() - this._snapping && this._objPoint.x < Slope.x + this._tileWidth + this._snapping && this._objPoint.y <= this._slopePoint.y && this._objPoint.y >= Slope.y) {
			this.onCollideCeilSlope(Slope,Object);
		}
	}
	,setSlopeProperties: function() {
		var _g = 0;
		var _g1 = this._slopeNorthwest;
		while(_g < _g1.length) {
			var tile = _g1[_g];
			++_g;
			this.setTileProperties(tile,4112,$bind(this,this.solveCollisionSlopeNorthwest));
		}
		var _g2 = 0;
		var _g11 = this._slopeNortheast;
		while(_g2 < _g11.length) {
			var tile1 = _g11[_g2];
			++_g2;
			this.setTileProperties(tile1,4097,$bind(this,this.solveCollisionSlopeNortheast));
		}
		var _g3 = 0;
		var _g12 = this._slopeSouthwest;
		while(_g3 < _g12.length) {
			var tile2 = _g12[_g3];
			++_g3;
			this.setTileProperties(tile2,272,$bind(this,this.solveCollisionSlopeSouthwest));
		}
		var _g4 = 0;
		var _g13 = this._slopeSoutheast;
		while(_g4 < _g13.length) {
			var tile3 = _g13[_g4];
			++_g4;
			this.setTileProperties(tile3,257,$bind(this,this.solveCollisionSlopeSoutheast));
		}
	}
	,checkArrays: function(TileIndex) {
		if(!(this._slopeNorthwest.indexOf(TileIndex) >= 0 || this._slopeNortheast.indexOf(TileIndex) >= 0 || this._slopeSouthwest.indexOf(TileIndex) >= 0)) {
			return this._slopeSoutheast.indexOf(TileIndex) >= 0;
		} else {
			return true;
		}
	}
	,set_frames: function(value) {
		flixel_tile_FlxTilemap.prototype.set_frames.call(this,value);
		if(value != null && this._specialTiles != null && this._specialTiles.length > 0) {
			var _g = 0;
			var _g1 = this._specialTiles;
			while(_g < _g1.length) {
				var tile = _g1[_g];
				++_g;
				if(tile != null) {
					tile.set_frames(this.frames);
				}
			}
		}
		return value;
	}
	,__class__: flixel_addons_tile_FlxTilemapExt
});
var openfl_display_BitmapData = function(width,height,transparent,fillColor) {
	if(fillColor == null) {
		fillColor = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	this.__usingPingPongTexture = false;
	this.transparent = transparent;
	if(width == null) {
		width = 0;
	} else {
		width = width;
	}
	if(height == null) {
		height = 0;
	} else {
		height = height;
	}
	if(width < 0) {
		width = 0;
	} else {
		width = width;
	}
	if(height < 0) {
		height = 0;
	} else {
		height = height;
	}
	this.width = width;
	this.height = height;
	this.rect = new openfl_geom_Rectangle(0,0,width,height);
	if(width > 0 && height > 0) {
		if(transparent) {
			if((fillColor & -16777216) == 0) {
				fillColor = 0;
			}
		} else {
			fillColor = -16777216 | fillColor & 16777215;
		}
		fillColor = fillColor << 8 | fillColor >>> 24 & 255;
		this.image = new lime_graphics_Image(null,0,0,width,height,fillColor);
		this.image.set_transparent(transparent);
		this.__isValid = true;
	}
	this.__createUVs();
	this.__worldTransform = new openfl_geom_Matrix();
	this.__worldColorTransform = new openfl_geom_ColorTransform();
};
$hxClasses["openfl.display.BitmapData"] = openfl_display_BitmapData;
openfl_display_BitmapData.__name__ = ["openfl","display","BitmapData"];
openfl_display_BitmapData.__interfaces__ = [openfl_display_IBitmapDrawable];
openfl_display_BitmapData.fromBase64 = function(base64,type,onload) {
	var bitmapData = new openfl_display_BitmapData(0,0,true);
	var onload1 = onload;
	var _gthis = bitmapData;
	lime_graphics_Image.fromBase64(base64,type,function(image) {
		_gthis.__fromImage(image);
		if(onload1 != null) {
			onload1(_gthis);
		}
	});
	return bitmapData;
};
openfl_display_BitmapData.fromBytes = function(bytes,rawAlpha,onload) {
	var bitmapData = new openfl_display_BitmapData(0,0,true);
	var rawAlpha1 = rawAlpha;
	var onload1 = onload;
	var _gthis = bitmapData;
	lime_graphics_Image.fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes),function(image) {
		_gthis.__fromImage(image);
		if(rawAlpha1 != null) {
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
			lime_graphics_utils_ImageCanvasUtil.createImageData(image);
			var data = image.buffer.data;
			var _g1 = 0;
			var _g = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(rawAlpha1);
			while(_g1 < _g) data[_g1++ * 4 + 3] = rawAlpha1.readUnsignedByte();
			image.dirty = true;
		}
		if(onload1 != null) {
			onload1(_gthis);
		}
	});
	return bitmapData;
};
openfl_display_BitmapData.fromCanvas = function(canvas,transparent) {
	if(transparent == null) {
		transparent = true;
	}
	if(canvas == null) {
		return null;
	}
	var bitmapData = new openfl_display_BitmapData(0,0,transparent);
	bitmapData.__fromImage(lime_graphics_Image.fromCanvas(canvas));
	bitmapData.image.set_transparent(transparent);
	return bitmapData;
};
openfl_display_BitmapData.fromFile = function(path,onload,onerror) {
	var bitmapData = new openfl_display_BitmapData(0,0,true);
	bitmapData.__fromFile(path,onload,onerror);
	return bitmapData;
};
openfl_display_BitmapData.fromImage = function(image,transparent) {
	if(transparent == null) {
		transparent = true;
	}
	if(image == null || image.buffer == null) {
		return null;
	}
	var bitmapData = new openfl_display_BitmapData(0,0,transparent);
	bitmapData.__fromImage(image);
	bitmapData.image.set_transparent(transparent);
	return bitmapData;
};
openfl_display_BitmapData.__asRenderTexture = function(width,height) {
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	var b = new openfl_display_BitmapData(0,0);
	b.__resize(width,height);
	return b;
};
openfl_display_BitmapData.prototype = {
	applyFilter: function(sourceBitmapData,sourceRect,destPoint,filter) {
		if(!this.__isValid || sourceBitmapData == null || !sourceBitmapData.__isValid) {
			return;
		}
		lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);
		lime_graphics_utils_ImageCanvasUtil.createImageData(this.image);
		lime_graphics_utils_ImageCanvasUtil.convertToCanvas(sourceBitmapData.image);
		lime_graphics_utils_ImageCanvasUtil.createImageData(sourceBitmapData.image);
		this.image.dirty = true;
	}
	,clone: function() {
		if(!this.__isValid) {
			return new openfl_display_BitmapData(this.width,this.height,this.transparent);
		} else {
			return openfl_display_BitmapData.fromImage(this.image.clone(),this.transparent);
		}
	}
	,colorTransform: function(rect,colorTransform) {
		if(!this.__isValid) {
			return;
		}
		this.image.colorTransform(rect.__toLimeRectangle(),colorTransform.__toLimeColorMatrix());
		this.__usingPingPongTexture = false;
	}
	,compare: function(otherBitmapData) {
		if(otherBitmapData == this) {
			return 0;
		} else if(otherBitmapData == null) {
			return -1;
		} else if(this.__isValid == false || otherBitmapData.__isValid == false) {
			return -2;
		} else if(this.width != otherBitmapData.width) {
			return -3;
		} else if(this.height != otherBitmapData.height) {
			return -4;
		}
		if(this.image != null && otherBitmapData.image != null && this.image.get_format() == otherBitmapData.image.get_format()) {
			var bytes = this.image.get_data();
			var otherBytes = otherBitmapData.image.get_data();
			var equal = true;
			var _g1 = 0;
			var _g = bytes.length;
			while(_g1 < _g) {
				var i = _g1++;
				if(bytes[i] != otherBytes[i]) {
					equal = false;
					break;
				}
			}
			if(equal) {
				return 0;
			}
		}
		var bitmapData = null;
		var foundDifference;
		var pixel;
		var otherPixel;
		var comparePixel;
		var r;
		var g;
		var b;
		var a;
		var _g11 = 0;
		var _g2 = this.height;
		while(_g11 < _g2) {
			var y = _g11++;
			var _g3 = 0;
			var _g21 = this.width;
			while(_g3 < _g21) {
				var x = _g3++;
				foundDifference = false;
				pixel = this.getPixel32(x,y);
				otherPixel = otherBitmapData.getPixel32(x,y);
				comparePixel = 0;
				if(pixel != otherPixel) {
					r = (pixel >> 16 & 255) - (otherPixel >> 16 & 255);
					g = (pixel >> 8 & 255) - (otherPixel >> 8 & 255);
					b = (pixel & 255) - (otherPixel & 255);
					if(r < 0) {
						r *= -1;
					}
					if(g < 0) {
						g *= -1;
					}
					if(b < 0) {
						b *= -1;
					}
					if(r == 0 && g == 0 && b == 0) {
						a = (pixel >> 24 & 255) - (otherPixel >> 24 & 255);
						if(a != 0) {
							comparePixel = 16711680;
							comparePixel = 16776960;
							comparePixel = 16777215;
							comparePixel = (a & 255) << 24 | 16711680 | 65280 | 255;
							foundDifference = true;
						}
					} else {
						comparePixel = 0 | (r & 255) << 16 | 0 | 0;
						comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (g & 255) << 8 | comparePixel & 255 & 255;
						comparePixel = (comparePixel >> 24 & 255 & 255) << 24 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | b & 255;
						comparePixel = -16777216 | (comparePixel >> 16 & 255 & 255) << 16 | (comparePixel >> 8 & 255 & 255) << 8 | comparePixel & 255 & 255;
						foundDifference = true;
					}
				}
				if(foundDifference) {
					if(bitmapData == null) {
						bitmapData = new openfl_display_BitmapData(this.width,this.height,this.transparent || otherBitmapData.transparent,0);
					}
					bitmapData.setPixel32(x,y,comparePixel);
				}
			}
		}
		if(bitmapData == null) {
			return 0;
		}
		return bitmapData;
	}
	,copyChannel: function(sourceBitmapData,sourceRect,destPoint,sourceChannel,destChannel) {
		if(!this.__isValid) {
			return;
		}
		var sourceChannel1;
		switch(sourceChannel) {
		case 1:
			sourceChannel1 = lime_graphics_ImageChannel.RED;
			break;
		case 2:
			sourceChannel1 = lime_graphics_ImageChannel.GREEN;
			break;
		case 4:
			sourceChannel1 = lime_graphics_ImageChannel.BLUE;
			break;
		case 8:
			sourceChannel1 = lime_graphics_ImageChannel.ALPHA;
			break;
		default:
			return;
		}
		var destChannel1;
		switch(destChannel) {
		case 1:
			destChannel1 = lime_graphics_ImageChannel.RED;
			break;
		case 2:
			destChannel1 = lime_graphics_ImageChannel.GREEN;
			break;
		case 4:
			destChannel1 = lime_graphics_ImageChannel.BLUE;
			break;
		case 8:
			destChannel1 = lime_graphics_ImageChannel.ALPHA;
			break;
		default:
			return;
		}
		this.image.copyChannel(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),sourceChannel1,destChannel1);
		this.__usingPingPongTexture = false;
	}
	,copyPixels: function(sourceBitmapData,sourceRect,destPoint,alphaBitmapData,alphaPoint,mergeAlpha) {
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(!this.__isValid || sourceBitmapData == null) {
			return;
		}
		this.image.copyPixels(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),alphaBitmapData != null ? alphaBitmapData.image : null,alphaPoint != null ? alphaPoint.__toLimeVector2() : null,mergeAlpha);
		this.__usingPingPongTexture = false;
	}
	,dispose: function() {
		this.image = null;
		this.width = 0;
		this.height = 0;
		this.rect = null;
		this.__isValid = false;
		if(this.__texture != null) {
			var renderer = openfl_Lib.current.stage.__renderer;
			if(renderer != null) {
				var gl = renderer.renderSession.gl;
				if(gl != null) {
					gl.deleteTexture(this.__texture);
					this.__texture = null;
				}
			}
		}
		if(this.__pingPongTexture != null) {
			this.__pingPongTexture.destroy();
			this.__pingPongTexture = null;
		}
	}
	,draw: function(source,matrix,colorTransform,blendMode,clipRect,smoothing) {
		if(smoothing == null) {
			smoothing = false;
		}
		if(!this.__isValid) {
			return;
		}
		if(colorTransform != null) {
			var tmp;
			var copy;
			if(source == null) {
				copy = null;
			} else {
				var copy1;
				if(source.__properties__) {
					tmp = source.__properties__["get_" + "width"];
					copy1 = tmp;
				} else {
					copy1 = false;
				}
				if(copy1) {
					copy = source[tmp]();
				} else {
					copy = source["width"];
				}
			}
			var tmp1;
			var copy2;
			if(source == null) {
				copy2 = null;
			} else {
				var copy3;
				if(source.__properties__) {
					tmp1 = source.__properties__["get_" + "height"];
					copy3 = tmp1;
				} else {
					copy3 = false;
				}
				if(copy3) {
					copy2 = source[tmp1]();
				} else {
					copy2 = source["height"];
				}
			}
			var copy4 = new openfl_display_BitmapData(copy,copy2,true,0);
			copy4.draw(source);
			copy4.colorTransform(copy4.rect,colorTransform);
			source = copy4;
		}
		lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this.image);
		lime_graphics_utils_ImageCanvasUtil.sync(this.image,true);
		var buffer = this.image.buffer;
		var renderSession = new openfl__$internal_renderer_RenderSession();
		renderSession.context = buffer.__srcContext;
		renderSession.roundPixels = true;
		renderSession.maskManager = new openfl__$internal_renderer_canvas_CanvasMaskManager(renderSession);
		if(!smoothing) {
			buffer.__srcContext.mozImageSmoothingEnabled = false;
			buffer.__srcContext.msImageSmoothingEnabled = false;
			buffer.__srcContext.imageSmoothingEnabled = false;
		}
		if(clipRect != null) {
			renderSession.maskManager.pushRect(clipRect,new openfl_geom_Matrix());
		}
		var matrixCache = source.__worldTransform;
		source.__updateTransforms(matrix != null ? matrix : new openfl_geom_Matrix());
		source.__updateChildren(false);
		source.__renderCanvas(renderSession);
		source.__updateTransforms(matrixCache);
		source.__updateChildren(true);
		if(!smoothing) {
			buffer.__srcContext.mozImageSmoothingEnabled = true;
			buffer.__srcContext.msImageSmoothingEnabled = true;
			buffer.__srcContext.imageSmoothingEnabled = true;
		}
		if(clipRect != null) {
			renderSession.maskManager.popMask();
		}
		buffer.__srcContext.setTransform(1,0,0,1,0,0);
		buffer.__srcImageData = null;
		buffer.data = null;
	}
	,encode: function(rect,compressor,byteArray) {
		if(!this.__isValid || rect == null) {
			byteArray = null;
			return byteArray;
		}
		if(js_Boot.__instanceof(compressor,openfl_display_PNGEncoderOptions)) {
			byteArray = openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(this.image.encode("png"));
			return byteArray;
		} else if(js_Boot.__instanceof(compressor,openfl_display_JPEGEncoderOptions)) {
			byteArray = openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(this.image.encode("jpg",(js_Boot.__cast(compressor , openfl_display_JPEGEncoderOptions)).quality));
			return byteArray;
		}
		byteArray = null;
		return byteArray;
	}
	,fillRect: function(rect,color) {
		if(!this.__isValid || rect == null) {
			return;
		}
		if(this.transparent && (color & -16777216) == 0) {
			color = 0;
		}
		this.image.fillRect(rect.__toLimeRectangle(),color,1);
		this.__usingPingPongTexture = false;
	}
	,floodFill: function(x,y,color) {
		if(!this.__isValid) {
			return;
		}
		this.image.floodFill(x,y,color,1);
		this.__usingPingPongTexture = false;
	}
	,generateFilterRect: function(sourceRect,filter) {
		return sourceRect.clone();
	}
	,getBuffer: function(gl) {
		if(this.__buffer == null) {
			var data = [this.width,this.height,0,1,1,0,this.height,0,0,1,this.width,0,0,1,0,0,0,0,0,0];
			this.__buffer = gl.createBuffer();
			gl.bindBuffer(gl.ARRAY_BUFFER,this.__buffer);
			var gl1 = gl.ARRAY_BUFFER;
			var this1;
			if(data != null) {
				this1 = new Float32Array(data);
			} else {
				this1 = null;
			}
			gl.bufferData(gl1,this1,gl.STATIC_DRAW);
			gl.bindBuffer(gl.ARRAY_BUFFER,null);
		}
		return this.__buffer;
	}
	,getColorBoundsRect: function(mask,color,findColor) {
		if(findColor == null) {
			findColor = true;
		}
		if(!this.__isValid) {
			return new openfl_geom_Rectangle(0,0,this.width,this.height);
		}
		if(!this.transparent || (mask >> 24 & 255) > 0) {
			var color1 = color;
			if((color1 >> 24 & 255) == 0) {
				color1 = 0;
			}
		}
		var rect = this.image.getColorBoundsRect(mask,color,findColor,1);
		return new openfl_geom_Rectangle(rect.x,rect.y,rect.width,rect.height);
	}
	,getPixel: function(x,y) {
		if(!this.__isValid) {
			return 0;
		}
		return this.image.getPixel(x,y,1);
	}
	,getPixel32: function(x,y) {
		if(!this.__isValid) {
			return 0;
		}
		return this.image.getPixel32(x,y,1);
	}
	,getPixels: function(rect) {
		if(!this.__isValid) {
			return null;
		}
		if(rect == null) {
			rect = this.rect;
		}
		return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(this.image.getPixels(rect.__toLimeRectangle(),1));
	}
	,getSurface: function() {
		if(!this.__isValid) {
			return null;
		}
		if(this.__surface == null) {
			this.__surface = lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.fromImage(this.image);
		}
		return this.__surface;
	}
	,getTexture: function(gl) {
		if(!this.__isValid) {
			return null;
		}
		if(this.__usingPingPongTexture && this.__pingPongTexture != null) {
			var _this = this.__pingPongTexture;
			if(_this.useOldTexture) {
				return (_this.__swapped ? _this.__texture0 : _this.__texture1).texture;
			} else {
				return (_this.__swapped ? _this.__texture1 : _this.__texture0).texture;
			}
		}
		if(this.__texture == null) {
			this.__texture = gl.createTexture();
			gl.bindTexture(gl.TEXTURE_2D,this.__texture);
			gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);
			gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);
			gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST);
			gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST);
			this.image.dirty = true;
		}
		if(this.image != null && this.image.dirty) {
			var internalFormat;
			var format;
			if(this.image.buffer.bitsPerPixel == 1) {
				internalFormat = gl.ALPHA;
				format = gl.ALPHA;
			} else {
				internalFormat = gl.RGBA;
				format = gl.RGBA;
			}
			gl.bindTexture(gl.TEXTURE_2D,this.__texture);
			var textureImage = this.image;
			if(!textureImage.get_premultiplied() && textureImage.get_transparent() || textureImage.get_format() != 0) {
				textureImage = textureImage.clone();
				textureImage.set_format(0);
				textureImage.set_premultiplied(true);
			}
			gl.texImage2D(gl.TEXTURE_2D,0,internalFormat,this.width,this.height,0,format,gl.UNSIGNED_BYTE,textureImage.get_data());
			gl.bindTexture(gl.TEXTURE_2D,null);
			this.image.dirty = false;
		}
		return this.__texture;
	}
	,getVector: function(rect) {
		var pixels = this.getPixels(rect);
		var length = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(pixels) / 4 | 0;
		var this1 = new openfl_VectorData();
		this1.data = new Array(length);
		this1.length = length;
		this1.fixed = true;
		var result = this1;
		var _g1 = 0;
		var _g = length;
		while(_g1 < _g) {
			var i = _g1++;
			var value = pixels.readUnsignedInt();
			if(!result.fixed) {
				if(i >= result.length) {
					result.length = i + 1;
				}
				if(result.data.length < result.length) {
					var length1 = result.data.length + 10;
					var data = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(result.data,0,data,0,result.data.length);
					result.data = data;
				}
			}
			result.data[i] = value;
		}
		return result;
	}
	,histogram: function(hRect) {
		var pixels = this.getPixels(hRect != null ? hRect : new openfl_geom_Rectangle(0,0,this.width,this.height));
		var _g = [];
		var _g1 = 0;
		while(_g1 < 4) {
			++_g1;
			var _g2 = [];
			var _g3 = 0;
			while(_g3 < 256) {
				++_g3;
				_g2.push(0);
			}
			_g.push(_g2);
		}
		var _g21 = 0;
		var _g11 = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(pixels);
		while(_g21 < _g11) ++_g[_g21++ % 4][pixels.readUnsignedByte()];
		return _g;
	}
	,hitTest: function(firstPoint,firstAlphaThreshold,secondObject,secondBitmapDataPoint,secondAlphaThreshold) {
		if(secondAlphaThreshold == null) {
			secondAlphaThreshold = 1;
		}
		if(!this.__isValid) {
			return false;
		}
		if(js_Boot.__instanceof(secondObject,openfl_display_Bitmap)) {
			secondObject = (js_Boot.__cast(secondObject , openfl_display_Bitmap)).bitmapData;
		}
		if(js_Boot.__instanceof(secondObject,openfl_geom_Point)) {
			var secondPoint = secondObject;
			var x = secondPoint.x - firstPoint.x | 0;
			var y = secondPoint.y - firstPoint.y | 0;
			if(this.rect.contains(x,y)) {
				if((this.getPixel32(x,y) >> 24 & 255) >= firstAlphaThreshold) {
					return true;
				}
			}
		} else if(js_Boot.__instanceof(secondObject,openfl_display_BitmapData)) {
			var secondBitmapData = secondObject;
			var x1;
			var y1;
			if(secondBitmapDataPoint == null) {
				x1 = 0;
				y1 = 0;
			} else {
				x1 = secondBitmapDataPoint.x - firstPoint.x | 0;
				y1 = secondBitmapDataPoint.y - firstPoint.y | 0;
			}
			if(this.rect.contains(x1,y1)) {
				var hitRect = openfl_geom_Rectangle.__temp;
				hitRect.setTo(x1,y1,Math.min(secondBitmapData.width,this.width - x1),Math.min(secondBitmapData.height,this.height - y1));
				var pixels = this.getPixels(hitRect);
				hitRect.offset(-x1,-y1);
				var testPixels = secondBitmapData.getPixels(hitRect);
				var length = hitRect.width * hitRect.height | 0;
				var pixel;
				var testPixel;
				var _g1 = 0;
				while(_g1 < length) {
					++_g1;
					pixel = pixels.readUnsignedInt();
					testPixel = testPixels.readUnsignedInt();
					if((pixel >> 24 & 255) >= firstAlphaThreshold && (testPixel >> 24 & 255) >= secondAlphaThreshold) {
						return true;
					}
				}
				return false;
			}
		} else if(js_Boot.__instanceof(secondObject,openfl_geom_Rectangle)) {
			var secondRectangle = openfl_geom_Rectangle.__temp;
			secondRectangle.copyFrom(secondObject);
			secondRectangle.offset(-firstPoint.x,-firstPoint.y);
			secondRectangle.__contract(0,0,this.width,this.height);
			if(secondRectangle.width > 0 && secondRectangle.height > 0) {
				var pixels1 = this.getPixels(secondRectangle);
				var length1 = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(pixels1) / 4 | 0;
				var pixel1;
				var _g11 = 0;
				while(_g11 < length1) {
					++_g11;
					pixel1 = pixels1.readUnsignedInt();
					if((pixel1 >> 24 & 255) >= firstAlphaThreshold) {
						return true;
					}
				}
			}
		}
		return false;
	}
	,lock: function() {
	}
	,merge: function(sourceBitmapData,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
		if(!this.__isValid || sourceBitmapData == null || !sourceBitmapData.__isValid || sourceRect == null || destPoint == null) {
			return;
		}
		this.image.merge(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
		this.__usingPingPongTexture = false;
	}
	,noise: function(randomSeed,low,high,channelOptions,grayScale) {
		if(grayScale == null) {
			grayScale = false;
		}
		if(channelOptions == null) {
			channelOptions = 7;
		}
		if(high == null) {
			high = 255;
		}
		if(low == null) {
			low = 0;
		}
		if(!this.__isValid) {
			return;
		}
		var func = function() {
			randomSeed = randomSeed * 1103515245 + 12345;
			return (Math.abs(randomSeed / 65536) | 0) % 32768;
		};
		func();
		var range = high - low;
		new openfl_utils_ByteArrayData(0);
		var redChannel = (channelOptions & 1) == 1;
		var greenChannel = (channelOptions & 2) >> 1 == 1;
		var blueChannel = (channelOptions & 4) >> 2 == 1;
		var alphaChannel = (channelOptions & 8) >> 3 == 1;
		var _g1 = 0;
		var _g = this.height;
		while(_g1 < _g) {
			var y = _g1++;
			var _g3 = 0;
			var _g2 = this.width;
			while(_g3 < _g2) {
				var x = _g3++;
				var red = 0;
				var blue = 0;
				var green = 0;
				var alpha = 255;
				if(grayScale) {
					blue = low + func() % range;
					green = blue;
					red = green;
					alpha = 255;
				} else {
					if(redChannel) {
						red = low + func() % range;
					}
					if(greenChannel) {
						green = low + func() % range;
					}
					if(blueChannel) {
						blue = low + func() % range;
					}
					if(alphaChannel) {
						alpha = low + func() % range;
					}
				}
				var rgb = alpha;
				rgb = (rgb << 8) + red;
				rgb = (rgb << 8) + green;
				rgb = (rgb << 8) + blue;
				this.setPixel32(x,y,rgb);
			}
		}
	}
	,paletteMap: function(sourceBitmapData,sourceRect,destPoint,redArray,greenArray,blueArray,alphaArray) {
		var sw = sourceRect.width | 0;
		var sh = sourceRect.height | 0;
		var pixels = this.getPixels(sourceRect);
		pixels.position = 0;
		var pixelValue;
		var r;
		var g;
		var b;
		var a;
		var color;
		var c1;
		var c2;
		var c3;
		var c4;
		var _g1 = 0;
		var _g = sh * sw;
		while(_g1 < _g) {
			var i = _g1++;
			pixelValue = pixels.readUnsignedInt();
			if(alphaArray == null) {
				c1 = pixelValue & -16777216;
			} else {
				c1 = alphaArray[pixelValue >> 24 & 255];
			}
			if(redArray == null) {
				c2 = pixelValue & 16711680;
			} else {
				c2 = redArray[pixelValue >> 16 & 255];
			}
			if(greenArray == null) {
				c3 = pixelValue & 65280;
			} else {
				c3 = greenArray[pixelValue >> 8 & 255];
			}
			if(blueArray == null) {
				c4 = pixelValue & 255;
			} else {
				c4 = blueArray[pixelValue & 255];
			}
			a = (c1 >> 24 & 255) + (c2 >> 24 & 255) + (c3 >> 24 & 255) + (c4 >> 24 & 255);
			r = (c1 >> 16 & 255) + (c2 >> 16 & 255) + (c3 >> 16 & 255) + (c4 >> 16 & 255);
			g = (c1 >> 8 & 255) + (c2 >> 8 & 255) + (c3 >> 8 & 255) + (c4 >> 8 & 255);
			b = (c1 & 255) + (c2 & 255) + (c3 & 255) + (c4 & 255);
			color = a << 24 | r << 16 | g << 8 | b;
			pixels.position = i * 4;
			pixels.writeUnsignedInt(color);
		}
		pixels.position = 0;
		this.setPixels(new openfl_geom_Rectangle(destPoint.x,destPoint.y,sw,sh),pixels);
	}
	,perlinNoise: function(baseX,baseY,numOctaves,randomSeed,stitch,fractalNoise,channelOptions,grayScale,offsets) {
		if(grayScale == null) {
			grayScale = false;
		}
		if(channelOptions == null) {
			channelOptions = 7;
		}
		openfl_Lib.notImplemented("BitmapData.perlinNoise");
	}
	,scroll: function(x,y) {
		if(!this.__isValid) {
			return;
		}
		this.image.scroll(x,y);
		this.__usingPingPongTexture = false;
	}
	,setPixel: function(x,y,color) {
		if(!this.__isValid) {
			return;
		}
		this.image.setPixel(x,y,color,1);
		this.__usingPingPongTexture = false;
	}
	,setPixel32: function(x,y,color) {
		if(!this.__isValid) {
			return;
		}
		this.image.setPixel32(x,y,color,1);
		this.__usingPingPongTexture = false;
	}
	,setPixels: function(rect,byteArray) {
		if(!this.__isValid || rect == null) {
			return;
		}
		this.image.setPixels(rect.__toLimeRectangle(),openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(byteArray),1);
		this.__usingPingPongTexture = false;
	}
	,setVector: function(rect,inputVector) {
		var byteArray = new openfl_utils_ByteArrayData(0);
		openfl_utils__$ByteArray_ByteArray_$Impl_$.set_length(byteArray,inputVector.length * 4);
		var _g = 0;
		while(_g < inputVector.length) {
			var color = inputVector.data[_g];
			++_g;
			byteArray.writeUnsignedInt(color);
		}
		byteArray.position = 0;
		this.setPixels(rect,byteArray);
	}
	,threshold: function(sourceBitmapData,sourceRect,destPoint,operation,threshold,color,mask,copySource) {
		if(copySource == null) {
			copySource = false;
		}
		if(mask == null) {
			mask = -1;
		}
		if(color == null) {
			color = 0;
		}
		if(sourceBitmapData == null || sourceRect == null || destPoint == null || sourceRect.x > sourceBitmapData.width || sourceRect.y > sourceBitmapData.height || destPoint.x > this.width || destPoint.y > this.height) {
			return 0;
		}
		return this.image.threshold(sourceBitmapData.image,sourceRect.__toLimeRectangle(),destPoint.__toLimeVector2(),operation,threshold,color,mask,copySource,1);
	}
	,unlock: function(changeRect) {
	}
	,__createUVs: function(x0,y0,x1,y1,x2,y2,x3,y3) {
		if(y3 == null) {
			y3 = 1;
		}
		if(x3 == null) {
			x3 = 0;
		}
		if(y2 == null) {
			y2 = 1;
		}
		if(x2 == null) {
			x2 = 1;
		}
		if(y1 == null) {
			y1 = 0;
		}
		if(x1 == null) {
			x1 = 1;
		}
		if(y0 == null) {
			y0 = 0;
		}
		if(x0 == null) {
			x0 = 0;
		}
		if(this.__uvData == null) {
			this.__uvData = new openfl_display_TextureUvs();
		}
		this.__uvData.x0 = x0;
		this.__uvData.y0 = y0;
		this.__uvData.x1 = x1;
		this.__uvData.y1 = y1;
		this.__uvData.x2 = x2;
		this.__uvData.y2 = y2;
		this.__uvData.x3 = x3;
		this.__uvData.y3 = y3;
	}
	,__drawGL: function(renderSession,source,matrix,colorTransform,blendMode,clipRect,smoothing,drawSelf,clearBuffer,readPixels,powerOfTwo) {
		if(powerOfTwo == null) {
			powerOfTwo = true;
		}
		if(readPixels == null) {
			readPixels = false;
		}
		if(clearBuffer == null) {
			clearBuffer = false;
		}
		if(drawSelf == null) {
			drawSelf = false;
		}
		if(smoothing == null) {
			smoothing = false;
		}
		this.__pingPongTexture = openfl__$internal_renderer_opengl_GLBitmap.pushFramebuffer(renderSession,this.__pingPongTexture,this.rect,smoothing,this.transparent,clearBuffer,powerOfTwo);
		openfl__$internal_renderer_opengl_GLBitmap.drawBitmapDrawable(renderSession,drawSelf ? this : null,source,matrix,colorTransform,blendMode,clipRect);
		openfl__$internal_renderer_opengl_GLBitmap.popFramebuffer(renderSession,readPixels ? this.image : null);
		var _this = this.__pingPongTexture;
		var uv = (_this.__swapped ? _this.__texture1 : _this.__texture0).__uvData;
		this.__createUVs(uv.x0,uv.y0,uv.x1,uv.y1,uv.x2,uv.y2,uv.x3,uv.y3);
		this.__isValid = true;
		this.__usingPingPongTexture = true;
	}
	,__fromBase64: function(base64,type,onload) {
		var _gthis = this;
		lime_graphics_Image.fromBase64(base64,type,function(image) {
			_gthis.__fromImage(image);
			if(onload != null) {
				onload(_gthis);
			}
		});
	}
	,__fromBytes: function(bytes,rawAlpha,onload) {
		var _gthis = this;
		lime_graphics_Image.fromBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes(bytes),function(image) {
			_gthis.__fromImage(image);
			if(rawAlpha != null) {
				lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
				lime_graphics_utils_ImageCanvasUtil.createImageData(image);
				var data = image.buffer.data;
				var _g1 = 0;
				var _g = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(rawAlpha);
				while(_g1 < _g) data[_g1++ * 4 + 3] = rawAlpha.readUnsignedByte();
				image.dirty = true;
			}
			if(onload != null) {
				onload(_gthis);
			}
		});
	}
	,__fromFile: function(path,onload,onerror) {
		var _gthis = this;
		lime_graphics_Image.fromFile(path,function(image) {
			_gthis.__fromImage(image);
			if(onload != null) {
				onload(_gthis);
			}
		},onerror);
	}
	,__fromImage: function(image) {
		if(image != null && image.buffer != null) {
			this.image = image;
			this.width = image.width;
			this.height = image.height;
			this.rect = new openfl_geom_Rectangle(0,0,image.width,image.height);
			this.__isValid = true;
		}
	}
	,__renderCairo: function(renderSession) {
		if(!this.__isValid) {
			return;
		}
		if(this.__worldTransform == null) {
			this.__worldTransform = new openfl_geom_Matrix();
		}
		if(renderSession.roundPixels) {
			var matrix = this.__worldTransform.__toMatrix3();
			matrix.tx = Math.round(matrix.tx);
			matrix.ty = Math.round(matrix.ty);
		}
		this.getSurface();
	}
	,__renderCairoMask: function(renderSession) {
	}
	,__renderCanvas: function(renderSession) {
		if(!this.__isValid) {
			return;
		}
		lime_graphics_utils_ImageCanvasUtil.sync(this.image,false);
		var context = renderSession.context;
		if(this.__worldTransform == null) {
			this.__worldTransform = new openfl_geom_Matrix();
		}
		context.globalAlpha = 1;
		var transform = this.__worldTransform;
		if(renderSession.roundPixels) {
			context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
		} else {
			context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
		}
		context.drawImage(this.image.get_src(),0,0);
	}
	,__renderCanvasMask: function(renderSession) {
	}
	,__renderGL: function(renderSession) {
		renderSession.spriteBatch.renderBitmapData(this,false,this.__worldTransform,this.__worldColorTransform,this.__worldColorTransform.alphaMultiplier,this.__blendMode,this.__shader);
	}
	,__resize: function(width,height) {
		this.width = width;
		this.height = height;
		this.rect.width = width;
		this.rect.height = height;
	}
	,__sync: function() {
		lime_graphics_utils_ImageCanvasUtil.sync(this.image,false);
	}
	,__updateChildren: function(transformOnly) {
	}
	,__updateMask: function(maskGraphics) {
	}
	,__updateTransforms: function(overrideTransform) {
		if(overrideTransform == null) {
			this.__worldTransform.identity();
		} else {
			this.__worldTransform = overrideTransform;
		}
	}
	,__class__: openfl_display_BitmapData
};
var flixel_addons_transition_GraphicTransTileCircle = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_addons_transition_GraphicTransTileCircle.preload != null) {
		this.__fromImage(flixel_addons_transition_GraphicTransTileCircle.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_addons_transition_GraphicTransTileCircle.preload == null) {
				flixel_addons_transition_GraphicTransTileCircle.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_addons_transition_GraphicTransTileCircle.resourceName),flixel_addons_transition_GraphicTransTileCircle.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.addons.transition.GraphicTransTileCircle"] = flixel_addons_transition_GraphicTransTileCircle;
flixel_addons_transition_GraphicTransTileCircle.__name__ = ["flixel","addons","transition","GraphicTransTileCircle"];
flixel_addons_transition_GraphicTransTileCircle.preload = null;
flixel_addons_transition_GraphicTransTileCircle.__super__ = openfl_display_BitmapData;
flixel_addons_transition_GraphicTransTileCircle.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_addons_transition_GraphicTransTileCircle
});
var flixel_addons_transition_GraphicTransTileDiamond = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_addons_transition_GraphicTransTileDiamond.preload != null) {
		this.__fromImage(flixel_addons_transition_GraphicTransTileDiamond.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_addons_transition_GraphicTransTileDiamond.preload == null) {
				flixel_addons_transition_GraphicTransTileDiamond.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_addons_transition_GraphicTransTileDiamond.resourceName),flixel_addons_transition_GraphicTransTileDiamond.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.addons.transition.GraphicTransTileDiamond"] = flixel_addons_transition_GraphicTransTileDiamond;
flixel_addons_transition_GraphicTransTileDiamond.__name__ = ["flixel","addons","transition","GraphicTransTileDiamond"];
flixel_addons_transition_GraphicTransTileDiamond.preload = null;
flixel_addons_transition_GraphicTransTileDiamond.__super__ = openfl_display_BitmapData;
flixel_addons_transition_GraphicTransTileDiamond.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_addons_transition_GraphicTransTileDiamond
});
var flixel_addons_transition_GraphicTransTileSquare = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_addons_transition_GraphicTransTileSquare.preload != null) {
		this.__fromImage(flixel_addons_transition_GraphicTransTileSquare.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_addons_transition_GraphicTransTileSquare.preload == null) {
				flixel_addons_transition_GraphicTransTileSquare.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_addons_transition_GraphicTransTileSquare.resourceName),flixel_addons_transition_GraphicTransTileSquare.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.addons.transition.GraphicTransTileSquare"] = flixel_addons_transition_GraphicTransTileSquare;
flixel_addons_transition_GraphicTransTileSquare.__name__ = ["flixel","addons","transition","GraphicTransTileSquare"];
flixel_addons_transition_GraphicTransTileSquare.preload = null;
flixel_addons_transition_GraphicTransTileSquare.__super__ = openfl_display_BitmapData;
flixel_addons_transition_GraphicTransTileSquare.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_addons_transition_GraphicTransTileSquare
});
var flixel_addons_transition_FlxTransitionSprite = function(X,Y,Delay,Graphic,GraphicWidth,GraphicHeight,FrameRate) {
	if(FrameRate == null) {
		FrameRate = 40;
	}
	if(GraphicHeight == null) {
		GraphicHeight = 32;
	}
	if(GraphicWidth == null) {
		GraphicWidth = 32;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._newStatus = -1;
	this.status = 0;
	this._finished = false;
	this._starting = true;
	flixel_FlxSprite.call(this,X,Y);
	if(Graphic == null) {
		Graphic = flixel_graphics_FlxGraphic.fromClass(flixel_addons_transition_GraphicTransTileDiamond);
		GraphicWidth = 32;
		GraphicHeight = 32;
	}
	this._delay = Delay;
	this.loadGraphic(Graphic,true,GraphicWidth,GraphicHeight);
	this.graphic.persist = true;
	this.graphic.set_destroyOnNoUse(false);
	var inArray = [];
	var outArray = [];
	var _g1 = 1;
	var _g = this.numFrames - 1;
	while(_g1 < _g) inArray.push(_g1++);
	outArray = inArray.slice();
	outArray.reverse();
	this.animation.add("empty",[0],0,false);
	this.animation.add("in",inArray,FrameRate,false);
	this.animation.add("full",[this.numFrames - 1],0,false);
	this.animation.add("out",outArray,FrameRate,false);
	this.setStatus(3);
};
$hxClasses["flixel.addons.transition.FlxTransitionSprite"] = flixel_addons_transition_FlxTransitionSprite;
flixel_addons_transition_FlxTransitionSprite.__name__ = ["flixel","addons","transition","FlxTransitionSprite"];
flixel_addons_transition_FlxTransitionSprite.__super__ = flixel_FlxSprite;
flixel_addons_transition_FlxTransitionSprite.prototype = $extend(flixel_FlxSprite.prototype,{
	start: function(NewStatus) {
		this._starting = true;
		this._finished = false;
		this._count = 0;
		this._newStatus = NewStatus;
	}
	,startStatus: function(NewStatus) {
		this.setStatus(NewStatus);
	}
	,setStatus: function(Status) {
		var anim;
		switch(Status) {
		case -1:case 2:
			anim = "empty";
			break;
		case 0:
			anim = "in";
			break;
		case 1:
			anim = "out";
			break;
		case 3:
			anim = "full";
			break;
		}
		this.animation.play(anim);
		this.animation.finishCallback = $bind(this,this.onFinishAnim);
		this.status = Status;
	}
	,onFinishAnim: function(str) {
		if(!this._finished) {
			this._finished = true;
			switch(this.status) {
			case 0:
				this.setStatus(3);
				break;
			case 1:
				this.setStatus(2);
				break;
			default:
			}
		}
	}
	,update: function(elapsed) {
		flixel_FlxSprite.prototype.update.call(this,elapsed);
		if(this._starting) {
			this._count += elapsed;
			if(this._count >= this._delay) {
				this.onTime();
			}
		}
	}
	,onTime: function() {
		this._starting = false;
		this._count = 0;
		this.setStatus(this._newStatus);
		this._newStatus = -1;
	}
	,__class__: flixel_addons_transition_FlxTransitionSprite
});
var flixel_addons_transition_FlxTransitionableState = function(TransIn,TransOut) {
	this._exiting = false;
	this.transOutFinished = false;
	this.transIn = TransIn;
	this.transOut = TransOut;
	if(this.transIn == null && flixel_addons_transition_FlxTransitionableState.defaultTransIn != null) {
		this.transIn = flixel_addons_transition_FlxTransitionableState.defaultTransIn;
	}
	if(this.transOut == null && flixel_addons_transition_FlxTransitionableState.defaultTransOut != null) {
		this.transOut = flixel_addons_transition_FlxTransitionableState.defaultTransOut;
	}
	flixel_FlxState.call(this);
};
$hxClasses["flixel.addons.transition.FlxTransitionableState"] = flixel_addons_transition_FlxTransitionableState;
flixel_addons_transition_FlxTransitionableState.__name__ = ["flixel","addons","transition","FlxTransitionableState"];
flixel_addons_transition_FlxTransitionableState.__super__ = flixel_FlxState;
flixel_addons_transition_FlxTransitionableState.prototype = $extend(flixel_FlxState.prototype,{
	destroy: function() {
		flixel_FlxState.prototype.destroy.call(this);
		this.transIn = null;
		this.transOut = null;
		this._onExit = null;
	}
	,create: function() {
		flixel_FlxState.prototype.create.call(this);
		this.transitionIn();
	}
	,switchTo: function(nextState) {
		if(!this.get_hasTransOut()) {
			return true;
		}
		if(!this._exiting) {
			this.transitionToState(nextState);
		}
		return this.transOutFinished;
	}
	,transitionToState: function(nextState) {
		this._exiting = true;
		this.transitionOut(function() {
			if(flixel_FlxG.game._state.switchTo(nextState)) {
				flixel_FlxG.game._requestedState = nextState;
			}
		});
		if(flixel_addons_transition_FlxTransitionableState.skipNextTransOut) {
			flixel_addons_transition_FlxTransitionableState.skipNextTransOut = false;
			this.finishTransOut();
		}
	}
	,transitionIn: function() {
		if(this.transIn != null && this.transIn.type != "none") {
			if(flixel_addons_transition_FlxTransitionableState.skipNextTransIn) {
				flixel_addons_transition_FlxTransitionableState.skipNextTransIn = false;
				if($bind(this,this.finishTransIn) != null) {
					this.finishTransIn();
				}
				return;
			}
			var _trans = this.createTransition(this.transIn);
			_trans.setStatus(3);
			this.openSubState(_trans);
			_trans.set_finishCallback($bind(this,this.finishTransIn));
			_trans.start(1);
		}
	}
	,transitionOut: function(OnExit) {
		this._onExit = OnExit;
		if(this.get_hasTransOut()) {
			var _trans = this.createTransition(this.transOut);
			_trans.setStatus(2);
			this.openSubState(_trans);
			_trans.set_finishCallback($bind(this,this.finishTransOut));
			_trans.start(0);
		} else {
			this._onExit();
		}
	}
	,get_hasTransIn: function() {
		if(this.transIn != null) {
			return this.transIn.type != "none";
		} else {
			return false;
		}
	}
	,get_hasTransOut: function() {
		if(this.transOut != null) {
			return this.transOut.type != "none";
		} else {
			return false;
		}
	}
	,createTransition: function(data) {
		switch(data.type) {
		case "fade":
			return new flixel_addons_transition_Transition(data);
		case "tiles":
			return new flixel_addons_transition_Transition(data);
		default:
			return null;
		}
	}
	,finishTransIn: function() {
		this.closeSubState();
	}
	,finishTransOut: function() {
		this.transOutFinished = true;
		if(!this._exiting) {
			this.closeSubState();
		}
		if(this._onExit != null) {
			this._onExit();
		}
	}
	,__class__: flixel_addons_transition_FlxTransitionableState
	,__properties__: $extend(flixel_FlxState.prototype.__properties__,{get_hasTransOut:"get_hasTransOut",get_hasTransIn:"get_hasTransIn"})
});
var flixel_addons_transition_Transition = function(data) {
	flixel_FlxSubState.call(this,0);
	this._effect = this.createEffect(data);
	this._effect.scrollFactor.set(0,0);
	this.add(this._effect);
};
$hxClasses["flixel.addons.transition.Transition"] = flixel_addons_transition_Transition;
flixel_addons_transition_Transition.__name__ = ["flixel","addons","transition","Transition"];
flixel_addons_transition_Transition.__super__ = flixel_FlxSubState;
flixel_addons_transition_Transition.prototype = $extend(flixel_FlxSubState.prototype,{
	update: function(elapsed) {
		flixel_FlxSubState.prototype.update.call(this,elapsed);
		this._effect.update(elapsed);
	}
	,destroy: function() {
		flixel_FlxSubState.prototype.destroy.call(this);
		this.set_finishCallback(null);
		this._effect.destroy();
		this._effect = null;
	}
	,start: function(NewStatus) {
		this._effect.start(NewStatus);
	}
	,setStatus: function(NewStatus) {
		this._effect.setStatus(NewStatus);
	}
	,createEffect: function(Data) {
		switch(Data.type) {
		case "fade":
			return new flixel_addons_transition_TransitionFade(Data);
		case "tiles":
			return new flixel_addons_transition_TransitionTiles(Data);
		default:
			return null;
		}
	}
	,get_finishCallback: function() {
		if(this._effect != null) {
			return this._effect.finishCallback;
		}
		return null;
	}
	,set_finishCallback: function(f) {
		if(this._effect != null) {
			this._effect.finishCallback = f;
			return f;
		}
		return null;
	}
	,__class__: flixel_addons_transition_Transition
	,__properties__: $extend(flixel_FlxSubState.prototype.__properties__,{set_finishCallback:"set_finishCallback",get_finishCallback:"get_finishCallback"})
});
var flixel_addons_transition_TransitionData = function(TransType,Color,Duration,Direction,TileData,Region) {
	if(Duration == null) {
		Duration = 1.0;
	}
	if(Color == null) {
		Color = -1;
	}
	if(TransType == null) {
		TransType = "fade";
	}
	this.duration = 1.0;
	this.type = TransType;
	this.tileData = TileData;
	this.duration = Duration;
	this.color = Color;
	this.direction = Direction;
	if(this.direction == null) {
		this.direction = new flixel_math_FlxPoint(0,0);
	}
	this.tweenOptions = { onComplete : null};
	this.region = Region;
	if(Region == null) {
		this.region = new flixel_math_FlxRect(0,0,flixel_FlxG.width,flixel_FlxG.height);
	}
};
$hxClasses["flixel.addons.transition.TransitionData"] = flixel_addons_transition_TransitionData;
flixel_addons_transition_TransitionData.__name__ = ["flixel","addons","transition","TransitionData"];
flixel_addons_transition_TransitionData.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_addons_transition_TransitionData.prototype = {
	destroy: function() {
		this.tileData = null;
		this.direction = null;
		this.tweenOptions.onComplete = null;
		this.tweenOptions.ease = null;
		this.tweenOptions = null;
		this.region = null;
		this.direction = null;
	}
	,__class__: flixel_addons_transition_TransitionData
};
var flixel_addons_transition_TransitionEffect = function(data) {
	this._finalDelayTime = 0.0;
	this._started = false;
	this.finished = false;
	this._data = data;
	flixel_group_FlxTypedSpriteGroup.call(this);
};
$hxClasses["flixel.addons.transition.TransitionEffect"] = flixel_addons_transition_TransitionEffect;
flixel_addons_transition_TransitionEffect.__name__ = ["flixel","addons","transition","TransitionEffect"];
flixel_addons_transition_TransitionEffect.__super__ = flixel_group_FlxTypedSpriteGroup;
flixel_addons_transition_TransitionEffect.prototype = $extend(flixel_group_FlxTypedSpriteGroup.prototype,{
	destroy: function() {
		flixel_group_FlxTypedSpriteGroup.prototype.destroy.call(this);
		this.finishCallback = null;
	}
	,start: function(NewStatus) {
		this._started = true;
		if(NewStatus == 0) {
			this._endStatus = 3;
		} else {
			this._endStatus = 2;
		}
	}
	,setStatus: function(NewStatus) {
	}
	,delayThenFinish: function() {
		new flixel_util_FlxTimer().start(this._finalDelayTime,$bind(this,this.onFinish));
	}
	,onFinish: function(f) {
		this.finished = true;
		if(this.finishCallback != null) {
			this.finishCallback();
			this.finishCallback = null;
		}
	}
	,__class__: flixel_addons_transition_TransitionEffect
});
var flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.preload != null) {
		this.__fromImage(flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.preload == null) {
				flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.resourceName),flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.addons.transition._TransitionFade.GraphicDiagonalGradient"] = flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient;
flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.__name__ = ["flixel","addons","transition","_TransitionFade","GraphicDiagonalGradient"];
flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.preload = null;
flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.__super__ = openfl_display_BitmapData;
flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient
});
var flixel_addons_transition_TransitionFade = function(data) {
	this.tweenValEnd2 = 0;
	this.tweenValEnd = 0;
	this.tweenValStart2 = 0;
	this.tweenValStart = 0;
	this.tweenStr2 = "";
	this.tweenStr = "";
	flixel_addons_transition_TransitionEffect.call(this,data);
	this.back = this.makeSprite(data.direction.x,data.direction.y);
	this.back.scrollFactor.set(0,0);
	this.add(this.back);
};
$hxClasses["flixel.addons.transition.TransitionFade"] = flixel_addons_transition_TransitionFade;
flixel_addons_transition_TransitionFade.__name__ = ["flixel","addons","transition","TransitionFade"];
flixel_addons_transition_TransitionFade.__super__ = flixel_addons_transition_TransitionEffect;
flixel_addons_transition_TransitionFade.prototype = $extend(flixel_addons_transition_TransitionEffect.prototype,{
	destroy: function() {
		flixel_addons_transition_TransitionEffect.prototype.destroy.call(this);
		this.back = null;
	}
	,start: function(NewStatus) {
		flixel_addons_transition_TransitionEffect.prototype.start.call(this,NewStatus);
		this.setTweenValues(NewStatus,this._data.direction.x,this._data.direction.y);
		switch(this.tweenStr) {
		case "alpha":
			this.back.set_alpha(this.tweenValStart);
			break;
		case "x":
			this.back.set_x(this.tweenValStart);
			break;
		case "y":
			this.back.set_y(this.tweenValStart);
			break;
		}
		switch(this.tweenStr2) {
		case "alpha":
			this.back.set_alpha(this.tweenValStart2);
			break;
		case "x":
			this.back.set_x(this.tweenValStart2);
			break;
		case "y":
			this.back.set_y(this.tweenValStart2);
			break;
		}
		var Values = { };
		Values[this.tweenStr] = this.tweenValEnd;
		if(this.tweenStr2 != "") {
			Values[this.tweenStr2] = this.tweenValEnd2;
		}
		this._data.tweenOptions.onComplete = $bind(this,this.finishTween);
		flixel_tweens_FlxTween.tween(this.back,Values,this._data.duration,this._data.tweenOptions);
	}
	,setTweenValues: function(NewStatus,DirX,DirY) {
		if(DirX == 0 && DirY == 0) {
			this.tweenStr = "alpha";
			this.tweenValStart = NewStatus == 0 ? 0.0 : 1.0;
			this.tweenValEnd = NewStatus == 0 ? 1.0 : 0.0;
		} else if(Math.abs(DirX) > 0 && DirY == 0) {
			this.tweenStr = "x";
			if(DirX > 0) {
				this.tweenValStart = NewStatus == 0 ? -this.back.get_width() : 0;
				this.tweenValEnd = NewStatus == 0 ? 0 : -this.back.get_width();
			} else {
				this.tweenValStart = NewStatus == 0 ? flixel_FlxG.width : -this.back.get_width() / 2;
				this.tweenValEnd = NewStatus == 0 ? -this.back.get_width() / 2 : flixel_FlxG.width;
			}
		} else if(DirX == 0 && Math.abs(DirY) > 0) {
			this.tweenStr = "y";
			if(DirY > 0) {
				this.tweenValStart = NewStatus == 0 ? -this.back.get_height() : 0;
				this.tweenValEnd = NewStatus == 0 ? 0 : -this.back.get_height();
			} else {
				this.tweenValStart = NewStatus == 0 ? flixel_FlxG.height : -this.back.get_height() / 2;
				this.tweenValEnd = NewStatus == 0 ? -this.back.get_height() / 2 : flixel_FlxG.height;
			}
		} else if(Math.abs(DirX) > 0 && Math.abs(DirY) > 0) {
			this.tweenStr = "x";
			this.tweenStr2 = "y";
			if(DirX > 0) {
				this.tweenValStart = NewStatus == 0 ? -this.back.get_width() : 0;
				this.tweenValEnd = NewStatus == 0 ? 0 : -this.back.get_width();
			} else {
				this.tweenValStart = NewStatus == 0 ? flixel_FlxG.width : -this.back.get_width() * 0.66666666666666663;
				this.tweenValEnd = NewStatus == 0 ? -this.back.get_width() * 0.66666666666666663 : flixel_FlxG.width;
			}
			if(DirY > 0) {
				this.tweenValStart2 = NewStatus == 0 ? -this.back.get_height() : 0;
				this.tweenValEnd2 = NewStatus == 0 ? 0 : -this.back.get_height();
			} else {
				this.tweenValStart2 = NewStatus == 0 ? flixel_FlxG.height : -this.back.get_height() * 0.66666666666666663;
				this.tweenValEnd2 = NewStatus == 0 ? -this.back.get_height() * 0.66666666666666663 : flixel_FlxG.height;
			}
		}
	}
	,makeSprite: function(DirX,DirY) {
		var s = new flixel_FlxSprite(0,0);
		var locX = 0;
		var locY = 0;
		var angle = 0;
		var pixels = null;
		if(DirX == 0 && DirY == 0) {
			s.makeGraphic(flixel_FlxG.width,flixel_FlxG.height,this._data.color);
		} else if(DirX == 0 && Math.abs(DirY) > 0) {
			if(DirY > 0) {
				locY = flixel_FlxG.height;
			} else {
				locY = 0;
			}
			if(DirY > 0) {
				angle = 90;
			} else {
				angle = 270;
			}
			s.makeGraphic(1,flixel_FlxG.height * 2,this._data.color);
			pixels = s.get_pixels();
			var gvert = flixel_util_FlxGradient.createGradientBitmapData(1,flixel_FlxG.height,[this._data.color,0],1,angle);
			pixels.copyPixels(gvert,gvert.rect,new openfl_geom_Point(0,locY));
			s.set_pixels(pixels);
			s.scale.set(flixel_FlxG.width,1.0);
			s.updateHitbox();
		} else if(Math.abs(DirX) > 0 && DirY == 0) {
			if(DirX > 0) {
				locX = flixel_FlxG.width;
			} else {
				locX = 0;
			}
			if(DirX > 0) {
				angle = 0;
			} else {
				angle = 180;
			}
			s.makeGraphic(flixel_FlxG.width * 2,1,this._data.color);
			pixels = s.get_pixels();
			var ghorz = flixel_util_FlxGradient.createGradientBitmapData(flixel_FlxG.width,1,[this._data.color,0],1,angle);
			pixels.copyPixels(ghorz,ghorz.rect,new openfl_geom_Point(locX,0));
			s.set_pixels(pixels);
			s.scale.set(1.0,flixel_FlxG.height);
			s.updateHitbox();
		} else if(Math.abs(DirX) > 0 && Math.abs(DirY) > 0) {
			if(DirY > 0) {
				locY = flixel_FlxG.height;
			} else {
				locY = 0;
			}
			s.loadGraphic(this.getGradient());
			s.set_flipX(DirX < 0);
			s.set_flipY(DirY < 0);
		}
		return s;
	}
	,getGradient: function() {
		var gdiag = new flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient(0,0);
		var gdiag_scaled = new openfl_display_BitmapData(flixel_FlxG.width * 2,flixel_FlxG.height * 2,true);
		var m = new openfl_geom_Matrix();
		m.scale(gdiag_scaled.width / gdiag.width,gdiag_scaled.height / gdiag.height);
		gdiag_scaled.draw(gdiag,m,null,null,null,true);
		var final_pixels = new openfl_display_BitmapData(flixel_FlxG.width * 3,flixel_FlxG.height * 3,true,this._data.color);
		final_pixels.copyChannel(gdiag_scaled,gdiag_scaled.rect,new openfl_geom_Point(final_pixels.width - gdiag_scaled.width,final_pixels.height - gdiag_scaled.height),1,8);
		gdiag.dispose();
		gdiag_scaled.dispose();
		return final_pixels;
	}
	,finishTween: function(f) {
		this.delayThenFinish();
	}
	,__class__: flixel_addons_transition_TransitionFade
});
var flixel_addons_transition_TransitionTiles = function(data) {
	this._isCenter = false;
	flixel_addons_transition_TransitionEffect.call(this,data);
	this._grpSprites = new flixel_group_FlxTypedSpriteGroup();
	var delay = 0;
	if(data.tileData == null) {
		data.tileData = { asset : null, width : 32, height : 32};
	}
	var region = data.region;
	var tilesX = Math.ceil(region.width / data.tileData.width);
	var tilesY = Math.ceil(region.height / data.tileData.height);
	var dTime = data.duration / (tilesX > tilesY ? tilesX : tilesY);
	var xDelay = dTime * Math.abs(data.direction.x);
	var yDelay = dTime * Math.abs(data.direction.y);
	var addX = data.tileData.width;
	var addY = data.tileData.height;
	var tx = 0;
	var ty = 0;
	var startX = region.x | 0;
	var startY = region.y | 0;
	if(data.direction.x < 0) {
		addX *= -1;
		startX += region.width + addX | 0;
	}
	if(data.direction.y < 0) {
		addY *= -1;
		startY += region.height + addY | 0;
	}
	tx = startX;
	ty = startY;
	var _g1 = 0;
	while(_g1 < tilesY) {
		var iy = _g1++;
		var _g3 = 0;
		while(_g3 < tilesX) {
			++_g3;
			var frameRate = 40;
			if(data.tileData.frameRate != null) {
				frameRate = data.tileData.frameRate;
			}
			var ts = new flixel_addons_transition_FlxTransitionSprite(tx,ty,delay,data.tileData.asset,data.tileData.width,data.tileData.height,frameRate);
			ts.set_color(data.color);
			ts.scrollFactor.set(0,0);
			this._grpSprites.add(ts);
			tx += addX;
			delay += xDelay;
		}
		ty += addY;
		tx = startX;
		delay = (iy + 1) * yDelay;
	}
	this.add(this._grpSprites);
	this._isCenter = data.direction.x == 0 && data.direction.y == 0;
};
$hxClasses["flixel.addons.transition.TransitionTiles"] = flixel_addons_transition_TransitionTiles;
flixel_addons_transition_TransitionTiles.__name__ = ["flixel","addons","transition","TransitionTiles"];
flixel_addons_transition_TransitionTiles.__super__ = flixel_addons_transition_TransitionEffect;
flixel_addons_transition_TransitionTiles.prototype = $extend(flixel_addons_transition_TransitionEffect.prototype,{
	destroy: function() {
		flixel_addons_transition_TransitionEffect.prototype.destroy.call(this);
		this._grpSprites = null;
	}
	,start: function(NewStatus) {
		flixel_addons_transition_TransitionEffect.prototype.start.call(this,NewStatus);
		this._grpSprites.group.forEach(function(t) {
			t.start(NewStatus);
		},false);
	}
	,setStatus: function(NewStatus) {
		flixel_addons_transition_TransitionEffect.prototype.setStatus.call(this,NewStatus);
		this._grpSprites.group.forEach(function(t) {
			t.setStatus(NewStatus);
		},false);
	}
	,update: function(elapsed) {
		flixel_addons_transition_TransitionEffect.prototype.update.call(this,elapsed);
		if(this._started) {
			var allDone = true;
			var _g = 0;
			var _g1 = this._grpSprites.group.members;
			while(_g < _g1.length) {
				var sprite = _g1[_g];
				++_g;
				if(sprite.status != -1 && sprite.status != this._endStatus) {
					allDone = false;
					break;
				}
			}
			if(allDone) {
				this._started = false;
				this.delayThenFinish();
			}
		}
	}
	,__class__: flixel_addons_transition_TransitionTiles
});
var flixel_addons_ui_Anchor = function(XOff,YOff,XSide,YSide,XFlush,YFlush) {
	this.x = new flixel_addons_ui_AnchorPoint(XOff,XSide,XFlush);
	this.y = new flixel_addons_ui_AnchorPoint(YOff,YSide,YFlush);
};
$hxClasses["flixel.addons.ui.Anchor"] = flixel_addons_ui_Anchor;
flixel_addons_ui_Anchor.__name__ = ["flixel","addons","ui","Anchor"];
flixel_addons_ui_Anchor.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_addons_ui_Anchor.prototype = {
	destroy: function() {
		this.x = null;
		this.y = null;
	}
	,anchorThing: function(thing,destination) {
		var destX = 0;
		var destY = 0;
		switch(this.x.side) {
		case "center":
			destX = destination.x + destination.get_width() / 2;
			break;
		case "left":
			destX = destination.x;
			break;
		case "right":
			destX = destination.x + destination.get_width();
			break;
		default:
			destX = destination.x;
		}
		switch(this.y.side) {
		case "bottom":
			destY = destination.y + destination.get_height();
			break;
		case "center":
			destY = destination.y + destination.get_height() / 2;
			break;
		case "top":
			destY = destination.y;
			break;
		default:
			destY = destination.y;
		}
		switch(this.x.flush) {
		case "center":
			destX -= thing.get_width() / 2;
			destX = destX;
			break;
		case "left":
			destX = destX;
			break;
		case "right":
			destX -= thing.get_width();
			break;
		default:
			destX = destX;
		}
		switch(this.y.flush) {
		case "bottom":
			destY -= thing.get_height();
			break;
		case "center":
			destY -= thing.get_height() / 2;
			break;
		case "top":
			destY = destY;
			break;
		default:
			destY = destY;
		}
		thing.set_x(destX + this.x.offset);
		thing.set_y(destY + this.y.offset);
	}
	,getFlipped: function(FlipX,FlipY,AnchorObject) {
		var xoff = FlipX ? -1 * this.x.offset : this.x.offset;
		var yoff = FlipY ? -1 * this.y.offset : this.y.offset;
		var xside = FlipX ? this.flipAnchorSide(this.x.side) : this.x.side;
		var yside = FlipY ? this.flipAnchorSide(this.y.side) : this.y.side;
		var xflush = FlipX ? this.flipAnchorSide(this.x.flush) : this.x.flush;
		var yflush = FlipY ? this.flipAnchorSide(this.y.flush) : this.y.flush;
		if(AnchorObject == null) {
			AnchorObject = new flixel_addons_ui_Anchor(xoff,yoff,xside,yside,xflush,yflush);
		} else {
			AnchorObject.x.offset = xoff;
			AnchorObject.y.offset = yoff;
			AnchorObject.x.side = xside;
			AnchorObject.y.side = yside;
			AnchorObject.x.flush = xflush;
			AnchorObject.y.flush = yflush;
		}
		return AnchorObject;
	}
	,clone: function() {
		return new flixel_addons_ui_Anchor(this.x.offset,this.y.offset,this.x.side,this.y.side,this.x.flush,this.y.flush);
	}
	,flipAnchorSide: function(str) {
		if(str == "left") {
			return "right";
		}
		if(str == "right") {
			return "left";
		}
		if(str == "top") {
			return "bottom";
		}
		if(str == "bottom") {
			return "top";
		}
		return str;
	}
	,__class__: flixel_addons_ui_Anchor
};
var flixel_addons_ui_AnchorPoint = function(Offset,Side,Flush) {
	this.flush = "center";
	this.side = "center";
	this.offset = 0;
	this.offset = Offset;
	this.side = Side;
	this.flush = Flush;
};
$hxClasses["flixel.addons.ui.AnchorPoint"] = flixel_addons_ui_AnchorPoint;
flixel_addons_ui_AnchorPoint.__name__ = ["flixel","addons","ui","AnchorPoint"];
flixel_addons_ui_AnchorPoint.prototype = {
	__class__: flixel_addons_ui_AnchorPoint
};
var flixel_addons_ui_BorderDef = function(Style,Color,Size,Quality) {
	if(Quality == null) {
		Quality = 1;
	}
	if(Size == null) {
		Size = 1;
	}
	this.style = Style;
	this.color = Color;
	this.size = Size;
	this.quality = Quality;
};
$hxClasses["flixel.addons.ui.BorderDef"] = flixel_addons_ui_BorderDef;
flixel_addons_ui_BorderDef.__name__ = ["flixel","addons","ui","BorderDef"];
flixel_addons_ui_BorderDef.fromXML = function(data) {
	var border_str = flixel_addons_ui_U.xml_str(data,"border");
	var borderDef = new flixel_addons_ui_BorderDef(flixel_text_FlxTextBorderStyle.NONE,flixel_addons_ui_U.xml_color(data,"border_color",true,0),flixel_addons_ui_U.xml_f(data,"border_size",1),flixel_addons_ui_U.xml_f(data,"border_quality",0));
	switch(border_str) {
	case "":
		border_str = flixel_addons_ui_U.xml_str(data,"shadow",true,"");
		if(border_str != "" && border_str != "false" && border_str != "none") {
			borderDef.style = flixel_text_FlxTextBorderStyle.SHADOW;
			var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(border_str);
			if(return_val == null) {
				return_val = 0;
			}
			borderDef.color = return_val;
		} else {
			border_str = flixel_addons_ui_U.xml_str(data,"outline",true,"");
			if(border_str != "" && border_str != "false" && border_str != "none") {
				borderDef.style = flixel_text_FlxTextBorderStyle.OUTLINE;
				var return_val1 = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(border_str);
				if(return_val1 == null) {
					return_val1 = 0;
				}
				borderDef.color = return_val1;
			} else {
				border_str = flixel_addons_ui_U.xml_str(data,"outline_fast");
				if(border_str != "" && border_str != "false" && border_str != "none") {
					borderDef.style = flixel_text_FlxTextBorderStyle.OUTLINE_FAST;
					var return_val2 = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(border_str);
					if(return_val2 == null) {
						return_val2 = 0;
					}
					borderDef.color = return_val2;
				}
			}
		}
		break;
	case "false":case "none":
		borderDef.style = flixel_text_FlxTextBorderStyle.NONE;
		break;
	case "outline":
		borderDef.style = flixel_text_FlxTextBorderStyle.OUTLINE;
		break;
	case "outline_fast":
		borderDef.style = flixel_text_FlxTextBorderStyle.OUTLINE_FAST;
		break;
	case "shadow":
		borderDef.style = flixel_text_FlxTextBorderStyle.SHADOW;
		break;
	}
	return borderDef;
};
flixel_addons_ui_BorderDef.prototype = {
	clone: function() {
		return new flixel_addons_ui_BorderDef(this.style,this.color,this.size,this.quality);
	}
	,apply: function(f) {
		var Color = this.color;
		var Size = this.size;
		var Quality = this.quality;
		f.set_borderStyle(this.style);
		f.set_borderColor(Color);
		f.set_borderSize(Size);
		f.set_borderQuality(Quality);
		return f;
	}
	,__class__: flixel_addons_ui_BorderDef
};
var flixel_addons_ui_ButtonLabelStyle = function(Font,Align,Color,Border) {
	this.align = null;
	this.color = null;
	this.border = null;
	this.font = null;
	this.font = Font;
	this.border = Border;
	this.color = Color;
	this.align = Align;
};
$hxClasses["flixel.addons.ui.ButtonLabelStyle"] = flixel_addons_ui_ButtonLabelStyle;
flixel_addons_ui_ButtonLabelStyle.__name__ = ["flixel","addons","ui","ButtonLabelStyle"];
flixel_addons_ui_ButtonLabelStyle.prototype = {
	apply: function(f) {
		if(this.font != null) {
			this.font.apply(null,f);
		}
		if(this.border != null) {
			this.border.apply(f);
		}
		if(this.color != null) {
			f.set_color(this.color);
		}
		if(this.align != null) {
			f.set_alignment(this.align);
		}
	}
	,__class__: flixel_addons_ui_ButtonLabelStyle
};
var flixel_addons_ui_FlxBaseMultiInput = function() {
};
$hxClasses["flixel.addons.ui.FlxBaseMultiInput"] = flixel_addons_ui_FlxBaseMultiInput;
flixel_addons_ui_FlxBaseMultiInput.__name__ = ["flixel","addons","ui","FlxBaseMultiInput"];
flixel_addons_ui_FlxBaseMultiInput.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_addons_ui_FlxBaseMultiInput.prototype = {
	destroy: function() {
		this.combos = null;
		this.forbiddens = null;
	}
	,checkJustPressed: function() {
		return false;
	}
	,checkJustReleased: function() {
		return false;
	}
	,checkPressed: function() {
		return false;
	}
	,justPressed: function() {
		if(this.checkJustPressed()) {
			return this.passCombosAndForbiddens();
		} else {
			return false;
		}
	}
	,justReleased: function() {
		if(this.checkJustReleased()) {
			if(this.forbiddens != null) {
				return this.checkForbiddens(false);
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,pressed: function() {
		if(this.checkPressed()) {
			return this.passCombosAndForbiddens();
		} else {
			return false;
		}
	}
	,equals: function(other) {
		if(other == null) {
			return false;
		}
		if(Type["typeof"](other) != Type["typeof"](this)) {
			return false;
		}
		if(this.input != other.input) {
			return false;
		}
		if(this.combos == null != (other.combos == null)) {
			return false;
		}
		if(this.forbiddens == null != (other.forbiddens == null)) {
			return false;
		}
		if(this.combos != null && other.combos != null) {
			var _g = 0;
			var _g1 = this.combos;
			while(_g < _g1.length) {
				var i = _g1[_g];
				++_g;
				if(other.combos.indexOf(i) == -1) {
					return false;
				}
			}
		}
		if(this.forbiddens != null && other.forbiddens != null) {
			var _g2 = 0;
			var _g11 = this.forbiddens;
			while(_g2 < _g11.length) {
				var i1 = _g11[_g2];
				++_g2;
				if(other.forbiddens.indexOf(i1) == -1) {
					return false;
				}
			}
		}
		return true;
	}
	,passCombosAndForbiddens: function(comboValue,forbiddenValue) {
		if(forbiddenValue == null) {
			forbiddenValue = false;
		}
		if(comboValue == null) {
			comboValue = true;
		}
		var passCombos = this.combos == null || this.checkCombos(comboValue);
		var passForbiddens = this.forbiddens == null || this.checkForbiddens(forbiddenValue);
		if(passCombos) {
			return passForbiddens;
		} else {
			return false;
		}
	}
	,checkCombos: function(value) {
		return false;
	}
	,checkForbiddens: function(value) {
		return false;
	}
	,__class__: flixel_addons_ui_FlxBaseMultiInput
};
var flixel_text_FlxText = function(X,Y,FieldWidth,Text,Size,EmbeddedFont) {
	if(EmbeddedFont == null) {
		EmbeddedFont = true;
	}
	if(Size == null) {
		Size = 8;
	}
	if(FieldWidth == null) {
		FieldWidth = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._hasBorderAlpha = false;
	this._regen = true;
	this._formatRanges = [];
	this.borderQuality = 1;
	this.borderSize = 1;
	this.borderColor = 0;
	this.borderStyle = flixel_text_FlxTextBorderStyle.NONE;
	this.text = "";
	flixel_FlxSprite.call(this,X,Y);
	if(Text == null || Text == "") {
		this.set_text("");
		Text = " ";
	} else {
		this.set_text(Text);
	}
	this.textField = new openfl_text_TextField();
	this.textField.set_selectable(false);
	this.textField.set_multiline(true);
	this.textField.set_wordWrap(true);
	this._defaultFormat = new openfl_text_TextFormat(null,Size,16777215);
	this.set_font(flixel_system_FlxAssets.FONT_DEFAULT);
	this._formatAdjusted = new openfl_text_TextFormat();
	this.textField.set_defaultTextFormat(this._defaultFormat);
	this.textField.set_text(Text);
	this.set_fieldWidth(FieldWidth);
	this.textField.set_embedFonts(EmbeddedFont);
	this.textField.set_height(Text.length <= 0 ? 1 : 10);
	this.set_allowCollisions(0);
	this.set_moves(false);
	this.drawFrame();
	var point = flixel_math_FlxPoint._pool.get().set(1,1);
	point._inPool = false;
	this.shadowOffset = point;
};
$hxClasses["flixel.text.FlxText"] = flixel_text_FlxText;
flixel_text_FlxText.__name__ = ["flixel","text","FlxText"];
flixel_text_FlxText.__super__ = flixel_FlxSprite;
flixel_text_FlxText.prototype = $extend(flixel_FlxSprite.prototype,{
	destroy: function() {
		this.textField = null;
		this._font = null;
		this._defaultFormat = null;
		this._formatAdjusted = null;
		this.shadowOffset = flixel_util_FlxDestroyUtil.put(this.shadowOffset);
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,drawFrame: function(Force) {
		if(Force == null) {
			Force = false;
		}
		this._regen = this._regen || Force;
		flixel_FlxSprite.prototype.drawFrame.call(this,this._regen);
	}
	,stampOnAtlas: function(atlas) {
		this.regenGraphic();
		var node = atlas.addNode(this.graphic.bitmap,this.graphic.key);
		if(node != null) {
			this.set_frames(node.getImageFrame());
		}
		return node != null;
	}
	,applyMarkup: function(input,rules) {
		if(rules == null || rules.length == 0) {
			return this;
		}
		this.clearFormats();
		var rangeStarts = [];
		var rangeEnds = [];
		var rulesToApply = [];
		var _g = 0;
		while(_g < rules.length) {
			var rule = rules[_g];
			++_g;
			if(rule.marker == null || rule.format == null) {
				continue;
			}
			var start = false;
			var markerLength = rule.marker.length;
			if(input.indexOf(rule.marker) == -1) {
				continue;
			}
			var _g2 = 0;
			var _g1 = input.length;
			while(_g2 < _g1) {
				var charIndex = _g2++;
				if(haxe_Utf8.compare(HxOverrides.substr(input,charIndex,markerLength),rule.marker) != 0) {
					continue;
				}
				if(start) {
					start = false;
					rangeEnds.push(charIndex);
				} else {
					start = true;
					rangeStarts.push(charIndex);
					rulesToApply.push(rule);
				}
			}
			if(start) {
				rangeEnds.push(-1);
			}
		}
		var _g3 = 0;
		while(_g3 < rules.length) {
			var rule1 = rules[_g3];
			++_g3;
			input = StringTools.replace(input,rule1.marker,"");
		}
		var _g11 = 0;
		var _g4 = rangeStarts.length;
		while(_g11 < _g4) {
			var i = _g11++;
			var delIndex = rangeStarts[i];
			var markerLength1 = rulesToApply[i].marker.length;
			var _g31 = 0;
			var _g21 = rangeStarts.length;
			while(_g31 < _g21) {
				var j = _g31++;
				if(rangeStarts[j] > delIndex) {
					rangeStarts[j] -= markerLength1;
				}
				if(rangeEnds[j] > delIndex) {
					rangeEnds[j] -= markerLength1;
				}
			}
			delIndex = rangeEnds[i];
			var _g32 = 0;
			var _g22 = rangeStarts.length;
			while(_g32 < _g22) {
				var j1 = _g32++;
				if(rangeStarts[j1] > delIndex) {
					rangeStarts[j1] -= markerLength1;
				}
				if(rangeEnds[j1] > delIndex) {
					rangeEnds[j1] -= markerLength1;
				}
			}
		}
		this.set_text(input);
		var _g12 = 0;
		var _g5 = rangeStarts.length;
		while(_g12 < _g5) {
			var i1 = _g12++;
			this.addFormat(rulesToApply[i1].format,rangeStarts[i1],rangeEnds[i1]);
		}
		return this;
	}
	,addFormat: function(Format,Start,End) {
		if(End == null) {
			End = -1;
		}
		if(Start == null) {
			Start = -1;
		}
		this._formatRanges.push(new flixel_text__$FlxText_FlxTextFormatRange(Format,Start,End));
		this._formatRanges.sort(function(left,right) {
			if(left.range.start < right.range.start) {
				return -1;
			} else {
				return 1;
			}
		});
		this._regen = true;
		return this;
	}
	,removeFormat: function(Format,Start,End) {
		var _g = 0;
		var _g1 = this._formatRanges;
		while(_g < _g1.length) {
			var formatRange = _g1[_g];
			++_g;
			if(formatRange.format != Format) {
				continue;
			}
			if(Start != null && End != null && (Start > formatRange.range.end || End < formatRange.range.start)) {
				continue;
			}
			HxOverrides.remove(this._formatRanges,formatRange);
		}
		this._regen = true;
		return this;
	}
	,clearFormats: function() {
		this._formatRanges = [];
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return this;
	}
	,setFormat: function(Font,Size,Color,Alignment,BorderStyle,BorderColor,Embedded) {
		if(Embedded == null) {
			Embedded = true;
		}
		if(BorderColor == null) {
			BorderColor = 0;
		}
		if(Color == null) {
			Color = -1;
		}
		if(Size == null) {
			Size = 8;
		}
		if(BorderStyle == null) {
			BorderStyle = flixel_text_FlxTextBorderStyle.NONE;
		} else {
			BorderStyle = BorderStyle;
		}
		if(Embedded) {
			this.set_font(Font);
		} else if(Font != null) {
			this.set_systemFont(Font);
		}
		this.set_size(Size);
		this.set_color(Color);
		if(Alignment != null) {
			this.set_alignment(Alignment);
		}
		this.set_borderStyle(BorderStyle);
		this.set_borderColor(BorderColor);
		this.set_borderSize(1);
		this.set_borderQuality(1);
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return this;
	}
	,setBorderStyle: function(Style,Color,Size,Quality) {
		if(Quality == null) {
			Quality = 1;
		}
		if(Size == null) {
			Size = 1;
		}
		if(Color == null) {
			Color = 0;
		}
		this.set_borderStyle(Style);
		this.set_borderColor(Color);
		this.set_borderSize(Size);
		this.set_borderQuality(Quality);
		return this;
	}
	,set_fieldWidth: function(value) {
		if(this.textField == null) {
			return value;
		}
		if(value <= 0) {
			this.set_wordWrap(false);
			this.set_autoSize(true);
		} else {
			this.set_autoSize(false);
			this.set_wordWrap(true);
			this.textField.set_width(value);
		}
		this._regen = true;
		return value;
	}
	,get_fieldWidth: function() {
		if(this.textField != null) {
			return this.textField.get_width();
		} else {
			return 0;
		}
	}
	,set_autoSize: function(value) {
		if(this.textField != null) {
			this.textField.set_autoSize(value ? 1 : 2);
			this._regen = true;
		}
		return value;
	}
	,get_autoSize: function() {
		if(this.textField != null) {
			return this.textField.get_autoSize() != 2;
		} else {
			return false;
		}
	}
	,set_text: function(Text) {
		this.text = Text;
		if(this.textField != null) {
			var ot = this.textField.get_text();
			this.textField.set_text(Text);
			this._regen = this.textField.get_text() != ot || this._regen;
		}
		return Text;
	}
	,get_size: function() {
		return this._defaultFormat.size | 0;
	}
	,set_size: function(Size) {
		this._defaultFormat.size = Size;
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return Size;
	}
	,set_color: function(Color) {
		if(this._defaultFormat.color == (Color & 16777215)) {
			return Color;
		}
		this._defaultFormat.color = Color & 16777215;
		this.color = Color;
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return Color;
	}
	,get_font: function() {
		return this._font;
	}
	,set_font: function(Font) {
		this.textField.set_embedFonts(true);
		if(Font != null) {
			var newFontName = Font;
			if(openfl_Assets.exists(Font,"FONT")) {
				newFontName = openfl_Assets.getFont(Font).name;
			}
			this._defaultFormat.font = newFontName;
		} else {
			this._defaultFormat.font = flixel_system_FlxAssets.FONT_DEFAULT;
		}
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return this._font = this._defaultFormat.font;
	}
	,get_embedded: function() {
		return this.textField.set_embedFonts(true);
	}
	,get_systemFont: function() {
		return this._defaultFormat.font;
	}
	,set_systemFont: function(Font) {
		this.textField.set_embedFonts(false);
		this._defaultFormat.font = Font;
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return Font;
	}
	,get_bold: function() {
		return this._defaultFormat.bold;
	}
	,set_bold: function(value) {
		if(this._defaultFormat.bold != value) {
			this._defaultFormat.bold = value;
			this.textField.set_defaultTextFormat(this._defaultFormat);
			this.textField.setTextFormat(this._defaultFormat);
			this._regen = true;
		}
		return value;
	}
	,get_italic: function() {
		return this._defaultFormat.italic;
	}
	,set_italic: function(value) {
		if(this._defaultFormat.italic != value) {
			this._defaultFormat.italic = value;
			this.textField.set_defaultTextFormat(this._defaultFormat);
			this.textField.setTextFormat(this._defaultFormat);
			this._regen = true;
		}
		return value;
	}
	,get_wordWrap: function() {
		return this.textField.get_wordWrap();
	}
	,set_wordWrap: function(value) {
		if(this.textField.get_wordWrap() != value) {
			this.textField.set_wordWrap(value);
			this._regen = true;
		}
		return value;
	}
	,get_alignment: function() {
		return flixel_text__$FlxText_FlxTextAlign_$Impl_$.fromOpenFL(this._defaultFormat.align);
	}
	,set_alignment: function(Alignment) {
		this._defaultFormat.align = flixel_text__$FlxText_FlxTextAlign_$Impl_$.toOpenFL(Alignment);
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
		return Alignment;
	}
	,set_borderStyle: function(style) {
		if(style != this.borderStyle) {
			this._regen = true;
		}
		return this.borderStyle = style;
	}
	,set_borderColor: function(Color) {
		if(this.borderColor != Color && this.borderStyle != flixel_text_FlxTextBorderStyle.NONE) {
			this._regen = true;
		}
		this._hasBorderAlpha = (Color >> 24 & 255) / 255 < 1;
		return this.borderColor = Color;
	}
	,set_borderSize: function(Value) {
		if(Value != this.borderSize && this.borderStyle != flixel_text_FlxTextBorderStyle.NONE) {
			this._regen = true;
		}
		return this.borderSize = Value;
	}
	,set_borderQuality: function(Value) {
		var lowerBound = Value < 0 ? 0 : Value;
		if(lowerBound > 1) {
			Value = 1;
		} else {
			Value = lowerBound;
		}
		if(Value != this.borderQuality && this.borderStyle != flixel_text_FlxTextBorderStyle.NONE) {
			this._regen = true;
		}
		return this.borderQuality = Value;
	}
	,set_graphic: function(Value) {
		var oldGraphic = this.graphic;
		var graph = flixel_FlxSprite.prototype.set_graphic.call(this,Value);
		flixel_FlxG.bitmap.removeIfNoUse(oldGraphic);
		return graph;
	}
	,get_width: function() {
		this.regenGraphic();
		return flixel_FlxSprite.prototype.get_width.call(this);
	}
	,get_height: function() {
		this.regenGraphic();
		return flixel_FlxSprite.prototype.get_height.call(this);
	}
	,updateColorTransform: function() {
		if(this.colorTransform == null) {
			this.colorTransform = new openfl_geom_ColorTransform();
		}
		if(this.alpha != 1) {
			this.colorTransform.alphaMultiplier = this.alpha;
			this.useColorTransform = true;
		} else {
			this.colorTransform.alphaMultiplier = 1;
			this.useColorTransform = false;
		}
		this.dirty = true;
	}
	,regenGraphic: function() {
		if(this.textField == null || !this._regen) {
			return;
		}
		var oldWidth = 0;
		var oldHeight = 4;
		if(this.graphic != null) {
			oldWidth = this.graphic.width;
			oldHeight = this.graphic.height;
		}
		var newWidth = this.textField.get_width();
		var newHeight = this.textField.get_textHeight() + 4;
		if(this.textField.get_textHeight() == 0) {
			newHeight = oldHeight;
		}
		if(oldWidth != newWidth || oldHeight != newHeight) {
			this.set_height(newHeight);
			this.makeGraphic(newWidth | 0,newHeight | 0,0,false,flixel_FlxG.bitmap.getUniqueKey("text"));
			if(this._hasBorderAlpha) {
				this._borderPixels = this.graphic.bitmap.clone();
			}
			this.frameHeight = this.get_height() | 0;
			this.textField.set_height(this.get_height() * 1.2);
			this._flashRect.x = 0;
			this._flashRect.y = 0;
			this._flashRect.width = newWidth;
			this._flashRect.height = newHeight;
		} else {
			this.graphic.bitmap.fillRect(this._flashRect,0);
			if(this._hasBorderAlpha) {
				if(this._borderPixels == null) {
					this._borderPixels = new openfl_display_BitmapData(this.frameWidth,this.frameHeight,true);
				} else {
					this._borderPixels.fillRect(this._flashRect,0);
				}
			}
		}
		if(this.textField != null && this.textField.get_text() != null && this.textField.get_text().length > 0) {
			this.copyTextFormat(this._defaultFormat,this._formatAdjusted);
			this._matrix.identity();
			this.applyBorderStyle();
			if(!(!this._hasBorderAlpha)) {
				if(this._borderColorTransform == null) {
					this._borderColorTransform = new openfl_geom_ColorTransform();
				}
				this._borderColorTransform.alphaMultiplier = (this.borderColor >> 24 & 255) / 255;
				this._borderPixels.colorTransform(this._borderPixels.rect,this._borderColorTransform);
				this.graphic.bitmap.draw(this._borderPixels);
			}
			this.applyFormats(this._formatAdjusted,false);
			this.drawTextFieldTo(this.graphic.bitmap);
		}
		this._regen = false;
		this.set_frame(this.frame);
	}
	,drawTextFieldTo: function(graphic) {
		graphic.draw(this.textField,this._matrix);
	}
	,draw: function() {
		this.regenGraphic();
		flixel_FlxSprite.prototype.draw.call(this);
	}
	,calcFrame: function(RunOnCpp) {
		if(RunOnCpp == null) {
			RunOnCpp = false;
		}
		if(this.textField == null) {
			return;
		}
		if(flixel_FlxG.renderTile && !RunOnCpp) {
			return;
		}
		this.regenGraphic();
		flixel_FlxSprite.prototype.calcFrame.call(this,RunOnCpp);
	}
	,applyBorderStyle: function() {
		var iterations = this.borderSize * this.borderQuality | 0;
		if(iterations <= 0) {
			iterations = 1;
		}
		var delta = this.borderSize / iterations;
		switch(this.borderStyle[1]) {
		case 0:
			break;
		case 1:
			this.applyFormats(this._formatAdjusted,true);
			var _g1 = 0;
			var _g = iterations;
			while(_g1 < _g) {
				++_g1;
				var graphic = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(delta,delta);
				this.drawTextFieldTo(graphic);
			}
			this._matrix.translate(-this.shadowOffset.x * this.borderSize,-this.shadowOffset.y * this.borderSize);
			break;
		case 2:
			this.applyFormats(this._formatAdjusted,true);
			var curDelta = delta;
			var _g11 = 0;
			var _g2 = iterations;
			while(_g11 < _g2) {
				++_g11;
				var graphic1 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta,-curDelta);
				this.drawTextFieldTo(graphic1);
				var graphic2 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(curDelta,0);
				this.drawTextFieldTo(graphic2);
				var graphic3 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(curDelta,0);
				this.drawTextFieldTo(graphic3);
				var graphic4 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(0,curDelta);
				this.drawTextFieldTo(graphic4);
				var graphic5 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(0,curDelta);
				this.drawTextFieldTo(graphic5);
				var graphic6 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta,0);
				this.drawTextFieldTo(graphic6);
				var graphic7 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta,0);
				this.drawTextFieldTo(graphic7);
				var graphic8 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(0,-curDelta);
				this.drawTextFieldTo(graphic8);
				this._matrix.translate(curDelta,0);
				curDelta += delta;
			}
			break;
		case 3:
			this.applyFormats(this._formatAdjusted,true);
			var curDelta1 = delta;
			var _g12 = 0;
			var _g3 = iterations;
			while(_g12 < _g3) {
				++_g12;
				var graphic9 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta1,-curDelta1);
				this.drawTextFieldTo(graphic9);
				var graphic10 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(curDelta1 * 2,0);
				this.drawTextFieldTo(graphic10);
				var graphic11 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(0,curDelta1 * 2);
				this.drawTextFieldTo(graphic11);
				var graphic12 = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
				this._matrix.translate(-curDelta1 * 2,0);
				this.drawTextFieldTo(graphic12);
				this._matrix.translate(curDelta1,-curDelta1);
				curDelta1 += delta;
			}
			break;
		}
	}
	,applyBorderTransparency: function() {
		if(!this._hasBorderAlpha) {
			return;
		}
		if(this._borderColorTransform == null) {
			this._borderColorTransform = new openfl_geom_ColorTransform();
		}
		this._borderColorTransform.alphaMultiplier = (this.borderColor >> 24 & 255) / 255;
		this._borderPixels.colorTransform(this._borderPixels.rect,this._borderColorTransform);
		this.graphic.bitmap.draw(this._borderPixels);
	}
	,copyTextWithOffset: function(x,y) {
		var graphic = this._hasBorderAlpha ? this._borderPixels : this.graphic.bitmap;
		this._matrix.translate(x,y);
		this.drawTextFieldTo(graphic);
	}
	,applyFormats: function(FormatAdjusted,UseBorderColor) {
		if(UseBorderColor == null) {
			UseBorderColor = false;
		}
		this.copyTextFormat(this._defaultFormat,FormatAdjusted,false);
		FormatAdjusted.color = UseBorderColor ? this.borderColor & 16777215 : this._defaultFormat.color;
		this.textField.setTextFormat(FormatAdjusted);
		var _g = 0;
		var _g1 = this._formatRanges;
		while(_g < _g1.length) {
			var formatRange = _g1[_g];
			++_g;
			if(this.textField.get_text().length - 1 < formatRange.range.start) {
				break;
			} else {
				var textFormat = formatRange.format.format;
				this.copyTextFormat(textFormat,FormatAdjusted,false);
				FormatAdjusted.color = UseBorderColor ? formatRange.format.borderColor & 16777215 : textFormat.color;
			}
			this.textField.setTextFormat(FormatAdjusted,formatRange.range.start,Math.min(formatRange.range.end,this.textField.get_text().length) | 0);
		}
	}
	,copyTextFormat: function(from,to,withAlign) {
		if(withAlign == null) {
			withAlign = true;
		}
		to.font = from.font;
		to.bold = from.bold;
		to.italic = from.italic;
		to.size = from.size;
		to.color = from.color;
		if(withAlign) {
			to.align = from.align;
		}
	}
	,dtfCopy: function() {
		var dtf = this.textField.get_defaultTextFormat();
		return new openfl_text_TextFormat(dtf.font,dtf.size,dtf.color,dtf.bold,dtf.italic,dtf.underline,dtf.url,dtf.target,dtf.align);
	}
	,updateDefaultFormat: function() {
		this.textField.set_defaultTextFormat(this._defaultFormat);
		this.textField.setTextFormat(this._defaultFormat);
		this._regen = true;
	}
	,set_frames: function(Frames) {
		flixel_FlxSprite.prototype.set_frames.call(this,Frames);
		this._regen = false;
		return Frames;
	}
	,__class__: flixel_text_FlxText
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{set_autoSize:"set_autoSize",get_autoSize:"get_autoSize",set_fieldWidth:"set_fieldWidth",get_fieldWidth:"get_fieldWidth",set_borderQuality:"set_borderQuality",set_borderSize:"set_borderSize",set_borderColor:"set_borderColor",set_borderStyle:"set_borderStyle",set_alignment:"set_alignment",get_alignment:"get_alignment",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_italic:"set_italic",get_italic:"get_italic",set_bold:"set_bold",get_bold:"get_bold",set_systemFont:"set_systemFont",get_systemFont:"get_systemFont",get_embedded:"get_embedded",set_font:"set_font",get_font:"get_font",set_size:"set_size",get_size:"get_size",set_text:"set_text"})
});
var flixel_addons_ui_FlxInputText = function(X,Y,Width,Text,size,TextColor,BackgroundColor,EmbeddedFont) {
	if(EmbeddedFont == null) {
		EmbeddedFont = true;
	}
	if(BackgroundColor == null) {
		BackgroundColor = -1;
	}
	if(TextColor == null) {
		TextColor = -16777216;
	}
	if(size == null) {
		size = 8;
	}
	if(Width == null) {
		Width = 150;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._scrollBoundIndeces = { left : 0, right : 0};
	this.backgroundColor = -1;
	this.fieldBorderThickness = 1;
	this.fieldBorderColor = -16777216;
	this.filterMode = 0;
	this.maxLength = 0;
	this.forceCase = 0;
	this.caretIndex = 0;
	this.hasFocus = false;
	this.caretWidth = 1;
	this.background = false;
	flixel_text_FlxText.call(this,X,Y,Width,Text,size,EmbeddedFont);
	this.set_backgroundColor(BackgroundColor);
	if(BackgroundColor != 0) {
		this.background = true;
	}
	this.set_color(TextColor);
	this.set_caretColor(TextColor);
	this.caret = new flixel_FlxSprite();
	this.caret.makeGraphic(this.caretWidth,size + 2 | 0);
	this._caretTimer = new flixel_util_FlxTimer();
	this.set_caretIndex(0);
	this.set_hasFocus(false);
	if(this.background) {
		this.fieldBorderSprite = new flixel_FlxSprite(X,Y);
		this.backgroundSprite = new flixel_FlxSprite(X,Y);
	}
	this.set_lines(1);
	openfl_Lib.current.stage.addEventListener("keyDown",$bind(this,this.onKeyDown));
	if(Text == null) {
		Text = "";
	}
	this.set_text(Text);
	this.calcFrame();
};
$hxClasses["flixel.addons.ui.FlxInputText"] = flixel_addons_ui_FlxInputText;
flixel_addons_ui_FlxInputText.__name__ = ["flixel","addons","ui","FlxInputText"];
flixel_addons_ui_FlxInputText.__super__ = flixel_text_FlxText;
flixel_addons_ui_FlxInputText.prototype = $extend(flixel_text_FlxText.prototype,{
	set_customFilterPattern: function(cfp) {
		this.customFilterPattern = cfp;
		this.set_filterMode(4);
		return this.customFilterPattern;
	}
	,set_caretColor: function(i) {
		this.caretColor = i;
		this.dirty = true;
		return this.caretColor;
	}
	,set_caretWidth: function(i) {
		this.caretWidth = i;
		this.dirty = true;
		return this.caretWidth;
	}
	,destroy: function() {
		openfl_Lib.current.stage.removeEventListener("keyDown",$bind(this,this.onKeyDown));
		this.backgroundSprite = flixel_util_FlxDestroyUtil.destroy(this.backgroundSprite);
		this.fieldBorderSprite = flixel_util_FlxDestroyUtil.destroy(this.fieldBorderSprite);
		this.callback = null;
		flixel_text_FlxText.prototype.destroy.call(this);
	}
	,draw: function() {
		this.drawSprite(this.fieldBorderSprite);
		this.drawSprite(this.backgroundSprite);
		flixel_text_FlxText.prototype.draw.call(this);
		if(this.caretColor != this.caret.color || this.caret.get_height() != (this._defaultFormat.size | 0) + 2) {
			this.caret.set_color(this.caretColor);
		}
		this.drawSprite(this.caret);
	}
	,drawSprite: function(Sprite) {
		if(Sprite != null && Sprite.visible) {
			Sprite.scrollFactor = this.scrollFactor;
			Sprite.set_cameras(this.get_cameras());
			Sprite.draw();
		}
	}
	,update: function(elapsed) {
		flixel_text_FlxText.prototype.update.call(this,elapsed);
		if(flixel_FlxG.mouse._leftButton.current == 2) {
			var hadFocus = this.hasFocus;
			if(flixel_FlxG.mouse.overlaps(this)) {
				this.set_caretIndex(this.getCaretIndex());
				this.set_hasFocus(true);
				if(!hadFocus && this.focusGained != null) {
					this.focusGained();
				}
			} else {
				this.set_hasFocus(false);
				if(hadFocus && this.focusLost != null) {
					this.focusLost();
				}
			}
		}
	}
	,onKeyDown: function(e) {
		var key = e.keyCode;
		if(this.hasFocus) {
			if(key == 16 || key == 17 || key == 220 || key == 27) {
				return;
			} else if(key == 37) {
				if(this.caretIndex > 0) {
					var _g = this;
					_g.set_caretIndex(_g.caretIndex - 1);
					this.set_text(this.text);
				}
			} else if(key == 39) {
				if(this.caretIndex < this.text.length) {
					var _g1 = this;
					_g1.set_caretIndex(_g1.caretIndex + 1);
					this.set_text(this.text);
				}
			} else if(key == 35) {
				this.set_caretIndex(this.text.length);
				this.set_text(this.text);
			} else if(key == 36) {
				this.set_caretIndex(0);
				this.set_text(this.text);
			} else if(key == 8) {
				if(this.caretIndex > 0) {
					var _g2 = this;
					_g2.set_caretIndex(_g2.caretIndex - 1);
					this.set_text(this.text.substring(0,this.caretIndex) + this.text.substring(this.caretIndex + 1));
					this.onChange("backspace");
				}
			} else if(key == 46) {
				if(this.text.length > 0 && this.caretIndex < this.text.length) {
					this.set_text(this.text.substring(0,this.caretIndex) + this.text.substring(this.caretIndex + 1));
					this.onChange("delete");
				}
			} else if(key == 13) {
				this.onChange("enter");
			} else {
				if(e.charCode == 0) {
					return;
				}
				var newText = this.filter(String.fromCharCode(e.charCode));
				if(newText.length > 0 && (this.maxLength == 0 || this.text.length + newText.length < this.maxLength)) {
					this.set_text(this.insertSubstring(this.text,newText,this.caretIndex));
					var _g3 = this;
					_g3.set_caretIndex(_g3.caretIndex + 1);
					this.onChange("input");
				}
			}
		}
	}
	,onChange: function(action) {
		if(this.callback != null) {
			this.callback(this.text,action);
		}
	}
	,insertSubstring: function(Original,Insert,Index) {
		if(Index != Original.length) {
			Original = Original.substring(0,Index) + Insert + Original.substring(Index);
		} else {
			Original += Insert;
		}
		return Original;
	}
	,getCaretIndex: function() {
		var X = flixel_FlxG.mouse.x - this.x;
		var Y = flixel_FlxG.mouse.y - this.y;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		return this.getCharIndexAtPoint(point.x,point.y);
	}
	,getCharBoundaries: function(charIndex) {
		if(this._charBoundaries != null && charIndex >= 0 && this._charBoundaries.length > 0) {
			var r = new openfl_geom_Rectangle();
			if(charIndex >= this._charBoundaries.length) {
				var _this = this._charBoundaries[this._charBoundaries.length - 1];
				var FlashRect = r;
				if(r == null) {
					FlashRect = new openfl_geom_Rectangle();
				}
				FlashRect.x = _this.x;
				FlashRect.y = _this.y;
				FlashRect.width = _this.width;
				FlashRect.height = _this.height;
			} else {
				var _this1 = this._charBoundaries[charIndex];
				var FlashRect1 = r;
				if(r == null) {
					FlashRect1 = new openfl_geom_Rectangle();
				}
				FlashRect1.x = _this1.x;
				FlashRect1.y = _this1.y;
				FlashRect1.width = _this1.width;
				FlashRect1.height = _this1.height;
			}
			return r;
		}
		return null;
	}
	,set_text: function(Text) {
		var return_text = flixel_text_FlxText.prototype.set_text.call(this,Text);
		if(this.textField == null) {
			return return_text;
		}
		var numChars = Text.length;
		this.prepareCharBoundaries(numChars);
		this.textField.set_text("");
		var textH = 0;
		var textW = 0;
		var lastW = 0;
		var magicX = 2;
		var magicY = 2;
		var _g1 = 0;
		while(_g1 < numChars) {
			var i = _g1++;
			this.textField.appendText(HxOverrides.substr(Text,i,1));
			textW = this.textField.get_textWidth();
			if(i == 0) {
				textH = this.textField.get_textHeight();
			}
			this._charBoundaries[i].x = magicX + lastW;
			this._charBoundaries[i].y = magicY;
			this._charBoundaries[i].width = textW - lastW;
			this._charBoundaries[i].height = textH;
			lastW = textW;
		}
		this.textField.set_text(Text);
		return return_text;
	}
	,getCharIndexAtPoint: function(X,Y) {
		var i = 0;
		if(this._charBoundaries != null && this._charBoundaries.length > 0) {
			if(this.textField.get_textWidth() <= this.textField.get_width()) {
				switch(this.getAlignStr()) {
				case "center":
					X = X - this.textField.get_width() / 2 + this.textField.get_textWidth() / 2;
					break;
				case "right":
					X = X - this.textField.get_width() + this.textField.get_textWidth();
					break;
				default:
				}
			}
		}
		if(this._charBoundaries != null) {
			var _g = 0;
			var _g1 = this._charBoundaries;
			while(_g < _g1.length) {
				var r = _g1[_g];
				++_g;
				if(X >= r.x && X <= r.x + r.width) {
					return i;
				}
				++i;
			}
		}
		if(this._charBoundaries != null && this._charBoundaries.length > 0) {
			if(X > this.textField.get_textWidth()) {
				return this._charBoundaries.length;
			}
		}
		return 0;
	}
	,prepareCharBoundaries: function(numChars) {
		if(this._charBoundaries == null) {
			this._charBoundaries = [];
		}
		if(this._charBoundaries.length > numChars) {
			var diff = this._charBoundaries.length - numChars;
			var _g1 = 0;
			while(_g1 < diff) {
				++_g1;
				this._charBoundaries.pop();
			}
		}
		var _g11 = 0;
		while(_g11 < numChars) if(this._charBoundaries.length - 1 < _g11++) {
			var tmp = this._charBoundaries;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = 0;
			_this.height = 0;
			_this._inPool = false;
			tmp.push(_this);
		}
	}
	,onSetTextCheck: function() {
	}
	,calcFrame: function(RunOnCpp) {
		if(RunOnCpp == null) {
			RunOnCpp = false;
		}
		flixel_text_FlxText.prototype.calcFrame.call(this,RunOnCpp);
		if(this.fieldBorderSprite != null) {
			if(this.fieldBorderThickness > 0) {
				this.fieldBorderSprite.makeGraphic(this.get_width() + this.fieldBorderThickness * 2 | 0,this.get_height() + this.fieldBorderThickness * 2 | 0,this.fieldBorderColor);
				this.fieldBorderSprite.set_x(this.x - this.fieldBorderThickness);
				this.fieldBorderSprite.set_y(this.y - this.fieldBorderThickness);
			} else if(this.fieldBorderThickness == 0) {
				this.fieldBorderSprite.set_visible(false);
			}
		}
		if(this.backgroundSprite != null) {
			if(this.background) {
				this.backgroundSprite.makeGraphic(this.get_width() | 0,this.get_height() | 0,this.backgroundColor);
				this.backgroundSprite.set_x(this.x);
				this.backgroundSprite.set_y(this.y);
			} else {
				this.backgroundSprite.set_visible(false);
			}
		}
		if(this.caret != null) {
			var cw = this.caretWidth;
			var ch = (this._defaultFormat.size | 0) + 2 | 0;
			var borderC = -16777216 | this.borderColor & 16777215;
			var caretC = -16777216 | this.caretColor & 16777215;
			var caretKey = "caret" + cw + "x" + ch + "c:" + caretC + "b:" + Std.string(this.borderStyle) + "," + this.borderSize + "," + borderC;
			switch(this.borderStyle[1]) {
			case 0:
				this.caret.makeGraphic(cw,ch,caretC,false,caretKey);
				this.caret.offset.set_x(this.caret.offset.set_y(0));
				break;
			case 1:
				cw += this.borderSize | 0;
				ch += this.borderSize | 0;
				this.caret.makeGraphic(cw,ch,0,false,caretKey);
				var r = new openfl_geom_Rectangle(this.borderSize,this.borderSize,this.caretWidth,(this._defaultFormat.size | 0) + 2 | 0);
				this.caret.get_pixels().fillRect(r,borderC);
				r.x = r.y = 0;
				this.caret.get_pixels().fillRect(r,caretC);
				this.caret.offset.set_x(this.caret.offset.set_y(0));
				break;
			case 2:case 3:
				cw += this.borderSize * 2 | 0;
				ch += this.borderSize * 2 | 0;
				this.caret.makeGraphic(cw,ch,borderC,false,caretKey);
				this.caret.get_pixels().fillRect(new openfl_geom_Rectangle(this.borderSize,this.borderSize,this.caretWidth,(this._defaultFormat.size | 0) + 2 | 0),caretC);
				this.caret.offset.set_x(this.caret.offset.set_y(this.borderSize));
				break;
			}
			this.caret.set_width(cw);
			this.caret.set_height(ch);
			this.set_caretIndex(this.caretIndex);
		}
	}
	,toggleCaret: function(timer) {
		this.caret.set_visible(!this.caret.visible);
	}
	,filter: function(text) {
		if(this.forceCase == 1) {
			text = text.toUpperCase();
		} else if(this.forceCase == 2) {
			text = text.toLowerCase();
		}
		if(this.filterMode != 0) {
			var pattern;
			switch(this.filterMode) {
			case 1:
				pattern = new EReg("[^a-zA-Z]*","g");
				break;
			case 2:
				pattern = new EReg("[^0-9]*","g");
				break;
			case 3:
				pattern = new EReg("[^a-zA-Z0-9]*","g");
				break;
			case 4:
				pattern = this.customFilterPattern;
				break;
			default:
				throw new js__$Boot_HaxeError(new openfl_errors_Error("FlxInputText: Unknown filterMode (" + this.filterMode + ")"));
			}
			text = text.replace(pattern.r,"");
		}
		return text;
	}
	,set_params: function(p) {
		this.params = p;
		if(this.params == null) {
			this.params = [];
		}
		this.params.push({ name : "value", value : this.text});
		return p;
	}
	,set_x: function(X) {
		if(this.fieldBorderSprite != null && this.fieldBorderThickness > 0) {
			this.fieldBorderSprite.set_x(X - this.fieldBorderThickness);
		}
		if(this.backgroundSprite != null && this.background) {
			this.backgroundSprite.set_x(X);
		}
		return flixel_text_FlxText.prototype.set_x.call(this,X);
	}
	,set_y: function(Y) {
		if(this.fieldBorderSprite != null && this.fieldBorderThickness > 0) {
			this.fieldBorderSprite.set_y(Y - this.fieldBorderThickness);
		}
		if(this.backgroundSprite != null && this.background) {
			this.backgroundSprite.set_y(Y);
		}
		return flixel_text_FlxText.prototype.set_y.call(this,Y);
	}
	,set_hasFocus: function(newFocus) {
		if(newFocus) {
			if(this.hasFocus != newFocus) {
				this._caretTimer = new flixel_util_FlxTimer().start(0.5,$bind(this,this.toggleCaret),0);
				this.caret.set_visible(true);
				this.set_caretIndex(this.text.length);
			}
		} else {
			this.caret.set_visible(false);
			if(this._caretTimer != null) {
				this._caretTimer.cancel();
			}
		}
		if(newFocus != this.hasFocus) {
			this.calcFrame();
		}
		return this.hasFocus = newFocus;
	}
	,getAlignStr: function() {
		var alignStr = "left";
		if(this._defaultFormat != null && this._defaultFormat.align != null) {
			alignStr = flixel_text__$FlxText_FlxTextAlign_$Impl_$.fromOpenFL(this._defaultFormat.align);
		}
		return alignStr;
	}
	,set_caretIndex: function(newCaretIndex) {
		var offx = 0;
		switch(this.getAlignStr()) {
		case "center":
			offx = 0;
			break;
		case "right":
			offx = this.textField.get_width() - 2 - this.textField.get_textWidth() - 2;
			if(offx < 0) {
				offx = 0;
			}
			break;
		default:
			offx = 0;
		}
		this.caretIndex = newCaretIndex;
		if(this.caretIndex > this.text.length + 1) {
			this.caretIndex = -1;
		}
		if(this.caretIndex != -1) {
			var boundaries = null;
			if(this.caretIndex < this.text.length) {
				boundaries = this.getCharBoundaries(this.caretIndex);
				if(boundaries != null) {
					this.caret.set_x(offx + boundaries.get_left() + this.x);
					this.caret.set_y(boundaries.get_top() + this.y);
				}
			} else {
				boundaries = this.getCharBoundaries(this.caretIndex - 1);
				if(boundaries != null) {
					this.caret.set_x(offx + boundaries.get_right() + this.x);
					this.caret.set_y(boundaries.get_top() + this.y);
				} else if(this.text.length == 0) {
					this.caret.set_x(this.x + offx + 2);
					this.caret.set_y(this.y + 2);
				}
			}
		}
		if(this.lines == 1 && this.caret.x + this.caret.get_width() > this.x + this.get_width()) {
			this.caret.set_x(this.x + this.get_width() - 2);
		}
		return this.caretIndex;
	}
	,set_forceCase: function(Value) {
		this.forceCase = Value;
		this.set_text(this.filter(this.text));
		return this.forceCase;
	}
	,set_size: function(Value) {
		flixel_text_FlxText.prototype.set_size.call(this,Value);
		this.caret.makeGraphic(1,(this._defaultFormat.size | 0) + 2 | 0);
		return Value;
	}
	,set_maxLength: function(Value) {
		this.maxLength = Value;
		if(this.text.length > this.maxLength) {
			this.set_text(this.text.substring(0,this.maxLength));
		}
		return this.maxLength;
	}
	,set_lines: function(Value) {
		if(Value == 0) {
			return 0;
		}
		if(Value > 1) {
			this.textField.set_wordWrap(true);
			this.textField.set_multiline(true);
		} else {
			this.textField.set_wordWrap(false);
			this.textField.set_multiline(false);
		}
		this.lines = Value;
		this.calcFrame();
		return this.lines;
	}
	,get_passwordMode: function() {
		return this.textField.get_displayAsPassword();
	}
	,set_passwordMode: function(value) {
		this.textField.set_displayAsPassword(value);
		this.calcFrame();
		return value;
	}
	,set_filterMode: function(Value) {
		this.filterMode = Value;
		this.set_text(this.filter(this.text));
		return this.filterMode;
	}
	,set_fieldBorderColor: function(Value) {
		this.fieldBorderColor = Value;
		this.calcFrame();
		return this.fieldBorderColor;
	}
	,set_fieldBorderThickness: function(Value) {
		this.fieldBorderThickness = Value;
		this.calcFrame();
		return this.fieldBorderThickness;
	}
	,set_backgroundColor: function(Value) {
		this.backgroundColor = Value;
		this.calcFrame();
		return this.backgroundColor;
	}
	,__class__: flixel_addons_ui_FlxInputText
	,__properties__: $extend(flixel_text_FlxText.prototype.__properties__,{set_backgroundColor:"set_backgroundColor",set_fieldBorderThickness:"set_fieldBorderThickness",set_fieldBorderColor:"set_fieldBorderColor",set_filterMode:"set_filterMode",set_lines:"set_lines",set_maxLength:"set_maxLength",set_forceCase:"set_forceCase",set_caretIndex:"set_caretIndex",set_hasFocus:"set_hasFocus",set_passwordMode:"set_passwordMode",get_passwordMode:"get_passwordMode",set_params:"set_params",set_caretWidth:"set_caretWidth",set_caretColor:"set_caretColor",set_customFilterPattern:"set_customFilterPattern"})
});
var flixel_addons_ui_FlxMultiGamepad = function(Gamepad,Input,Combos,Forbiddens) {
	flixel_addons_ui_FlxBaseMultiInput.call(this);
	this.input = Input;
	this.gamepad = Gamepad;
	this.combos = Combos;
	this.forbiddens = Forbiddens;
};
$hxClasses["flixel.addons.ui.FlxMultiGamepad"] = flixel_addons_ui_FlxMultiGamepad;
flixel_addons_ui_FlxMultiGamepad.__name__ = ["flixel","addons","ui","FlxMultiGamepad"];
flixel_addons_ui_FlxMultiGamepad.__super__ = flixel_addons_ui_FlxBaseMultiInput;
flixel_addons_ui_FlxMultiGamepad.prototype = $extend(flixel_addons_ui_FlxBaseMultiInput.prototype,{
	destroy: function() {
		flixel_addons_ui_FlxBaseMultiInput.prototype.destroy.call(this);
		this.gamepad = null;
	}
	,checkJustPressed: function() {
		if(this.gamepad == null) {
			return false;
		}
		var _this = this.gamepad;
		return _this.checkStatusRaw(_this.mapping.getRawID(this.input),2);
	}
	,checkJustReleased: function() {
		if(this.gamepad == null) {
			return false;
		}
		var _this = this.gamepad;
		return _this.checkStatusRaw(_this.mapping.getRawID(this.input),-1);
	}
	,checkPressed: function() {
		if(this.gamepad == null) {
			return false;
		}
		var _this = this.gamepad;
		return _this.checkStatusRaw(_this.mapping.getRawID(this.input),1);
	}
	,checkCombos: function(value) {
		if(this.gamepad == null) {
			return false;
		}
		return this.gamepad.anyPressed(this.combos) == value;
	}
	,checkForbiddens: function(value) {
		if(this.gamepad == null) {
			return false;
		}
		return this.gamepad.anyPressed(this.forbiddens) == value;
	}
	,__class__: flixel_addons_ui_FlxMultiGamepad
});
var flixel_addons_ui_FlxMultiGamepadAnalogStick = function(Gamepad,Input,Combos,Forbiddens) {
	this.sInput = Input;
	flixel_addons_ui_FlxMultiGamepad.call(this,Gamepad,Input.id,Combos,Forbiddens);
};
$hxClasses["flixel.addons.ui.FlxMultiGamepadAnalogStick"] = flixel_addons_ui_FlxMultiGamepadAnalogStick;
flixel_addons_ui_FlxMultiGamepadAnalogStick.__name__ = ["flixel","addons","ui","FlxMultiGamepadAnalogStick"];
flixel_addons_ui_FlxMultiGamepadAnalogStick.getStickInput = function(str) {
	str = str.toLowerCase();
	switch(str) {
	case "left_analog_stick_x_minus":
		return { id : 19, axis : flixel_addons_ui_XY.X, positive : false};
	case "left_analog_stick_x_plus":
		return { id : 19, axis : flixel_addons_ui_XY.X, positive : true};
	case "left_analog_stick_y_minus":
		return { id : 19, axis : flixel_addons_ui_XY.Y, positive : false};
	case "left_analog_stick_y_plus":
		return { id : 19, axis : flixel_addons_ui_XY.Y, positive : true};
	case "right_analog_stick_x_minus":
		return { id : 20, axis : flixel_addons_ui_XY.X, positive : false};
	case "right_analog_stick_x_plus":
		return { id : 20, axis : flixel_addons_ui_XY.X, positive : true};
	case "right_analog_stick_y_minus":
		return { id : 20, axis : flixel_addons_ui_XY.Y, positive : false};
	case "right_analog_stick_y_plus":
		return { id : 20, axis : flixel_addons_ui_XY.Y, positive : true};
	}
	return null;
};
flixel_addons_ui_FlxMultiGamepadAnalogStick.__super__ = flixel_addons_ui_FlxMultiGamepad;
flixel_addons_ui_FlxMultiGamepadAnalogStick.prototype = $extend(flixel_addons_ui_FlxMultiGamepad.prototype,{
	destroy: function() {
		flixel_addons_ui_FlxMultiGamepad.prototype.destroy.call(this);
		this.sInput = null;
	}
	,checkJustPressed: function() {
		if(this.gamepad == null) {
			return false;
		}
		var dz = this.gamepad.get_deadZone();
		switch(this.sInput.id) {
		case 19:
			if(this.sInput.axis == flixel_addons_ui_XY.X) {
				var _this = this.gamepad.analog.justMoved;
				var stick = _this.gamepad.mapping.getAnalogStick(19);
				if(stick == null ? false : _this.gamepad.checkStatusRaw(stick.x,_this.status)) {
					if(this.sInput.positive) {
						var _this1 = this.gamepad.analog.value.gamepad;
						return _this1.getAnalogXAxisValue(_this1.mapping.getAnalogStick(19)) > dz;
					} else {
						var _this2 = this.gamepad.analog.value.gamepad;
						return _this2.getAnalogXAxisValue(_this2.mapping.getAnalogStick(19)) < -dz;
					}
				} else {
					return false;
				}
			} else {
				var _this3 = this.gamepad.analog.justMoved;
				var stick1 = _this3.gamepad.mapping.getAnalogStick(19);
				if(stick1 == null ? false : _this3.gamepad.checkStatusRaw(stick1.y,_this3.status)) {
					if(this.sInput.positive) {
						var _this4 = this.gamepad.analog.value.gamepad;
						return _this4.getYAxisRaw(_this4.mapping.getAnalogStick(19)) > dz;
					} else {
						var _this5 = this.gamepad.analog.value.gamepad;
						return _this5.getYAxisRaw(_this5.mapping.getAnalogStick(19)) < -dz;
					}
				} else {
					return false;
				}
			}
			break;
		case 20:
			if(this.sInput.axis == flixel_addons_ui_XY.X) {
				var _this6 = this.gamepad.analog.justMoved;
				var stick2 = _this6.gamepad.mapping.getAnalogStick(20);
				if(stick2 == null ? false : _this6.gamepad.checkStatusRaw(stick2.x,_this6.status)) {
					if(this.sInput.positive) {
						var _this7 = this.gamepad.analog.value.gamepad;
						return _this7.getAnalogXAxisValue(_this7.mapping.getAnalogStick(20)) > dz;
					} else {
						var _this8 = this.gamepad.analog.value.gamepad;
						return _this8.getAnalogXAxisValue(_this8.mapping.getAnalogStick(20)) < -dz;
					}
				} else {
					return false;
				}
			} else {
				var _this9 = this.gamepad.analog.justMoved;
				var stick3 = _this9.gamepad.mapping.getAnalogStick(20);
				if(stick3 == null ? false : _this9.gamepad.checkStatusRaw(stick3.y,_this9.status)) {
					if(this.sInput.positive) {
						var _this10 = this.gamepad.analog.value.gamepad;
						return _this10.getYAxisRaw(_this10.mapping.getAnalogStick(20)) > dz;
					} else {
						var _this11 = this.gamepad.analog.value.gamepad;
						return _this11.getYAxisRaw(_this11.mapping.getAnalogStick(20)) < -dz;
					}
				} else {
					return false;
				}
			}
			break;
		default:
			return false;
		}
	}
	,checkJustReleased: function() {
		if(this.gamepad == null) {
			return false;
		}
		switch(this.sInput.id) {
		case 19:
			if(this.sInput.axis == flixel_addons_ui_XY.X) {
				var _this = this.gamepad.analog.justReleased;
				var stick = _this.gamepad.mapping.getAnalogStick(19);
				if(stick == null) {
					return false;
				} else {
					return _this.gamepad.checkStatusRaw(stick.x,_this.status);
				}
			} else {
				var _this1 = this.gamepad.analog.justReleased;
				var stick1 = _this1.gamepad.mapping.getAnalogStick(19);
				if(stick1 == null) {
					return false;
				} else {
					return _this1.gamepad.checkStatusRaw(stick1.y,_this1.status);
				}
			}
			break;
		case 20:
			if(this.sInput.axis == flixel_addons_ui_XY.X) {
				var _this2 = this.gamepad.analog.justReleased;
				var stick2 = _this2.gamepad.mapping.getAnalogStick(20);
				if(stick2 == null) {
					return false;
				} else {
					return _this2.gamepad.checkStatusRaw(stick2.x,_this2.status);
				}
			} else {
				var _this3 = this.gamepad.analog.justReleased;
				var stick3 = _this3.gamepad.mapping.getAnalogStick(20);
				if(stick3 == null) {
					return false;
				} else {
					return _this3.gamepad.checkStatusRaw(stick3.y,_this3.status);
				}
			}
			break;
		default:
			return false;
		}
	}
	,checkPressed: function() {
		if(this.gamepad == null) {
			return false;
		}
		var dz = this.gamepad.get_deadZone();
		switch(this.sInput.id) {
		case 19:
			if(this.sInput.axis == flixel_addons_ui_XY.X) {
				if(this.sInput.positive) {
					var _this = this.gamepad.analog.value.gamepad;
					return _this.getAnalogXAxisValue(_this.mapping.getAnalogStick(19)) > dz;
				} else {
					var _this1 = this.gamepad.analog.value.gamepad;
					return _this1.getAnalogXAxisValue(_this1.mapping.getAnalogStick(19)) < -dz;
				}
			} else if(this.sInput.positive) {
				var _this2 = this.gamepad.analog.value.gamepad;
				return _this2.getYAxisRaw(_this2.mapping.getAnalogStick(19)) > dz;
			} else {
				var _this3 = this.gamepad.analog.value.gamepad;
				return _this3.getYAxisRaw(_this3.mapping.getAnalogStick(19)) < -dz;
			}
			break;
		case 20:
			if(this.sInput.axis == flixel_addons_ui_XY.X) {
				if(this.sInput.positive) {
					var _this4 = this.gamepad.analog.value.gamepad;
					return _this4.getAnalogXAxisValue(_this4.mapping.getAnalogStick(20)) > dz;
				} else {
					var _this5 = this.gamepad.analog.value.gamepad;
					return _this5.getAnalogXAxisValue(_this5.mapping.getAnalogStick(20)) < -dz;
				}
			} else if(this.sInput.positive) {
				var _this6 = this.gamepad.analog.value.gamepad;
				return _this6.getYAxisRaw(_this6.mapping.getAnalogStick(20)) > dz;
			} else {
				var _this7 = this.gamepad.analog.value.gamepad;
				return _this7.getYAxisRaw(_this7.mapping.getAnalogStick(20)) < -dz;
			}
			break;
		default:
			return false;
		}
	}
	,checkCombos: function(value) {
		if(this.gamepad == null) {
			return false;
		}
		return this.gamepad.anyPressed(this.combos) == value;
	}
	,checkForbiddens: function(value) {
		if(this.gamepad == null) {
			return false;
		}
		return this.gamepad.anyPressed(this.forbiddens) == value;
	}
	,__class__: flixel_addons_ui_FlxMultiGamepadAnalogStick
});
var flixel_addons_ui_XY = $hxClasses["flixel.addons.ui.XY"] = { __ename__ : ["flixel","addons","ui","XY"], __constructs__ : ["X","Y"] };
flixel_addons_ui_XY.X = ["X",0];
flixel_addons_ui_XY.X.toString = $estr;
flixel_addons_ui_XY.X.__enum__ = flixel_addons_ui_XY;
flixel_addons_ui_XY.Y = ["Y",1];
flixel_addons_ui_XY.Y.toString = $estr;
flixel_addons_ui_XY.Y.__enum__ = flixel_addons_ui_XY;
var flixel_addons_ui_FlxMultiKey = function(Input,Combos,Forbiddens) {
	flixel_addons_ui_FlxBaseMultiInput.call(this);
	this.input = Input;
	this.combos = Combos;
	this.forbiddens = Forbiddens;
};
$hxClasses["flixel.addons.ui.FlxMultiKey"] = flixel_addons_ui_FlxMultiKey;
flixel_addons_ui_FlxMultiKey.__name__ = ["flixel","addons","ui","FlxMultiKey"];
flixel_addons_ui_FlxMultiKey.__super__ = flixel_addons_ui_FlxBaseMultiInput;
flixel_addons_ui_FlxMultiKey.prototype = $extend(flixel_addons_ui_FlxBaseMultiInput.prototype,{
	checkJustPressed: function() {
		return flixel_FlxG.keys.checkStatus(this.input,2);
	}
	,checkJustReleased: function() {
		return flixel_FlxG.keys.checkStatus(this.input,-1);
	}
	,checkPressed: function() {
		return flixel_FlxG.keys.checkStatus(this.input,1);
	}
	,checkCombos: function(value) {
		return flixel_FlxG.keys.checkKeyArrayState(this.combos,1) == value;
	}
	,checkForbiddens: function(value) {
		return flixel_FlxG.keys.checkKeyArrayState(this.forbiddens,1) == value;
	}
	,__class__: flixel_addons_ui_FlxMultiKey
});
var flixel_addons_ui_interfaces_IFlxUIWidget = function() { };
$hxClasses["flixel.addons.ui.interfaces.IFlxUIWidget"] = flixel_addons_ui_interfaces_IFlxUIWidget;
flixel_addons_ui_interfaces_IFlxUIWidget.__name__ = ["flixel","addons","ui","interfaces","IFlxUIWidget"];
flixel_addons_ui_interfaces_IFlxUIWidget.__interfaces__ = [flixel_IFlxSprite];
flixel_addons_ui_interfaces_IFlxUIWidget.prototype = {
	__class__: flixel_addons_ui_interfaces_IFlxUIWidget
	,__properties__: {set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width"}
};
var flixel_addons_ui_FlxUIGroup = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.autoBounds = true;
	this.broadcastToFlxUI = true;
	flixel_group_FlxTypedSpriteGroup.call(this,X,Y);
};
$hxClasses["flixel.addons.ui.FlxUIGroup"] = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUIGroup.__name__ = ["flixel","addons","ui","FlxUIGroup"];
flixel_addons_ui_FlxUIGroup.__interfaces__ = [flixel_addons_ui_interfaces_IFlxUIWidget];
flixel_addons_ui_FlxUIGroup.__super__ = flixel_group_FlxTypedSpriteGroup;
flixel_addons_ui_FlxUIGroup.prototype = $extend(flixel_group_FlxTypedSpriteGroup.prototype,{
	destroy: function() {
		flixel_group_FlxTypedSpriteGroup.prototype.destroy.call(this);
	}
	,add: function(Object) {
		var obj = flixel_group_FlxTypedSpriteGroup.prototype.add.call(this,Object);
		if(this.autoBounds) {
			this.calcBounds();
		}
		return obj;
	}
	,remove: function(Object,Splice) {
		if(Splice == null) {
			Splice = false;
		}
		var obj = flixel_group_FlxTypedSpriteGroup.prototype.remove.call(this,Object,Splice);
		if(this.autoBounds) {
			this.calcBounds();
		}
		return obj;
	}
	,setScrollFactor: function(X,Y) {
		var _g = 0;
		var _g1 = this.group.members;
		while(_g < _g1.length) {
			var obj = _g1[_g];
			++_g;
			if(obj != null) {
				obj.scrollFactor.set(X,Y);
			}
		}
	}
	,hasThis: function(Object) {
		var _g = 0;
		var _g1 = this.group.members;
		while(_g < _g1.length) {
			var obj = _g1[_g];
			++_g;
			if(obj == Object) {
				return true;
			}
		}
		return false;
	}
	,calcBounds: function(rect) {
		if(this.group.members != null && this.group.members.length > 0) {
			var left = Infinity;
			var right = -Infinity;
			var top = Infinity;
			var bottom = -Infinity;
			var _g = 0;
			var _g1 = this.group.members;
			while(_g < _g1.length) {
				var fb = _g1[_g];
				++_g;
				if(fb != null) {
					if(js_Boot.__instanceof(fb,flixel_addons_ui_interfaces_IFlxUIWidget)) {
						if(fb.x < left) {
							left = fb.x;
						}
						if(fb.x + fb.get_width() > right) {
							right = fb.x + fb.get_width();
						}
						if(fb.y < top) {
							top = fb.y;
						}
						if(fb.y + fb.get_height() > bottom) {
							bottom = fb.y + fb.get_height();
						}
					} else if(js_Boot.__instanceof(fb,flixel_FlxSprite)) {
						if(fb.x < left) {
							left = fb.x;
						}
						if(fb.x > right) {
							right = fb.x;
						}
						if(fb.y < top) {
							top = fb.y;
						}
						if(fb.y > bottom) {
							bottom = fb.y;
						}
					}
				}
			}
			this.set_width(right - left);
			this.set_height(bottom - top);
			if(rect != null) {
				rect.x = left;
				rect.y = top;
				rect.width = this.get_width();
				rect.height = this.get_height();
			}
		} else {
			this.set_width(this.set_height(0));
		}
	}
	,floorAll: function() {
		var _g = 0;
		var _g1 = this.group.members;
		while(_g < _g1.length) {
			var fb = _g1[_g];
			++_g;
			fb.set_x(Math.floor(fb.x));
			fb.set_y(Math.floor(fb.y));
		}
	}
	,__class__: flixel_addons_ui_FlxUIGroup
});
var flixel_addons_ui_interfaces_IEventGetter = function() { };
$hxClasses["flixel.addons.ui.interfaces.IEventGetter"] = flixel_addons_ui_interfaces_IEventGetter;
flixel_addons_ui_interfaces_IEventGetter.__name__ = ["flixel","addons","ui","interfaces","IEventGetter"];
flixel_addons_ui_interfaces_IEventGetter.prototype = {
	__class__: flixel_addons_ui_interfaces_IEventGetter
};
var flixel_addons_ui_FlxUI = function(data,ptr,superIndex_,tongue_,liveFilePath_,uiVars_) {
	if(liveFilePath_ == null) {
		liveFilePath_ = "";
	}
	this._scaledAssets = [];
	this._assetsToCleanUp = [];
	this._safe_input_delay_elapsed = 0.0;
	this._curr_mode = "";
	this._pointY = 1;
	this._pointX = 1;
	this._postLoaded = false;
	this.cursorLists = null;
	this.getTextFallback = null;
	this.failed_by = 0;
	this.failed = false;
	this.safe_input_delay_time = 0.01;
	this.do_safe_input_delay = true;
	flixel_addons_ui_FlxUIGroup.call(this);
	this._ptr_tongue = tongue_;
	this._ptr = ptr;
	if(superIndex_ != null) {
		this.setSuperIndex(superIndex_);
	}
	if(uiVars_ != null) {
		this._variable_index = new haxe_ds_StringMap();
		var key = uiVars_.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			var value = __map_reserved[key1] != null ? uiVars_.getReserved(key1) : uiVars_.h[key1];
			var _this = this._variable_index;
			if(__map_reserved[key1] != null) {
				_this.setReserved(key1,value);
			} else {
				_this.h[key1] = value;
			}
		}
	}
	if(data != null) {
		this.load(data);
	}
};
$hxClasses["flixel.addons.ui.FlxUI"] = flixel_addons_ui_FlxUI;
flixel_addons_ui_FlxUI.__name__ = ["flixel","addons","ui","FlxUI"];
flixel_addons_ui_FlxUI.__interfaces__ = [flixel_addons_ui_interfaces_IEventGetter];
flixel_addons_ui_FlxUI.event = function(name,sender,data,params) {
	var currState = flixel_addons_ui_FlxUI.getLeafUIState();
	if(currState != null) {
		currState.getEvent(name,sender,data,params);
	}
};
flixel_addons_ui_FlxUI.fontStr = function(str,style) {
	if(style == null) {
		style = "";
	}
	var tongue = flixel_addons_ui_FlxUI.getLeafUIState()._tongue;
	var t = tongue != null ? tongue : null;
	if(t != null) {
		str = t.getFont(str);
	}
	var style1 = style;
	style1 = style.toLowerCase();
	var suffix = "";
	switch(style1) {
	case "b":case "bold":
		suffix = "b";
		break;
	case "bi":case "bold-italic":case "boldi":case "bolditalic":case "ib":case "ibold":case "italic-bold":case "italicbold":case "z":
		suffix = "z";
		break;
	case "i":case "italic":
		suffix = "i";
		break;
	case "":case "none":case "normal":case "regular":
		suffix = "";
		break;
	}
	if(str.indexOf("assets/fonts/") != 0) {
		return "assets/fonts/" + str + suffix;
	} else {
		return str + suffix;
	}
};
flixel_addons_ui_FlxUI.fontSize = function(str,size) {
	var tongue = flixel_addons_ui_FlxUI.getLeafUIState()._tongue;
	var t = tongue != null ? tongue : null;
	if(t != null) {
		size = t.getFontSize(str,size);
	}
	return size;
};
flixel_addons_ui_FlxUI.font = function(str,style,extension) {
	if(extension == null) {
		extension = ".ttf";
	}
	if(style == null) {
		style = "";
	}
	var tongue = flixel_addons_ui_FlxUI.getLeafUIState()._tongue;
	var t = tongue != null ? tongue : null;
	if(t != null) {
		str = t.getFont(str);
	}
	return flixel_addons_ui_U.font(str,style,extension);
};
flixel_addons_ui_FlxUI.__getTongue = function() {
	var tongue = flixel_addons_ui_FlxUI.getLeafUIState()._tongue;
	if(tongue != null) {
		return tongue;
	}
	return null;
};
flixel_addons_ui_FlxUI.forceFocus = function(b,thing) {
	var currState = flixel_addons_ui_FlxUI.getLeafUIState();
	if(currState != null) {
		currState.forceFocus(b,thing);
	}
};
flixel_addons_ui_FlxUI.getLeafUIState = function() {
	var state = flixel_FlxG.game._state;
	if(state != null) {
		while(state.subState != null) state = state.subState;
	}
	if(js_Boot.__instanceof(state,flixel_addons_ui_interfaces_IFlxUIState)) {
		return state;
	}
	return null;
};
flixel_addons_ui_FlxUI.request = function(name,sender,data,params) {
	var currState = flixel_addons_ui_FlxUI.getLeafUIState();
	if(currState != null) {
		return currState.getRequest(name,sender,data,params);
	}
	return null;
};
flixel_addons_ui_FlxUI._delta = function(thing,X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	thing.set_x(thing.x + X);
	thing.set_y(thing.y + Y);
};
flixel_addons_ui_FlxUI._center = function(thing,X,Y) {
	if(Y == null) {
		Y = true;
	}
	if(X == null) {
		X = true;
	}
	if(X) {
		thing.set_x((flixel_FlxG.width - thing.get_width()) / 2);
	}
	if(Y) {
		thing.set_y((flixel_FlxG.height - thing.get_height()) / 2);
	}
	return thing;
};
flixel_addons_ui_FlxUI.consolidateData = function(data,definition,combineUniqueChildren) {
	if(combineUniqueChildren == null) {
		combineUniqueChildren = false;
	}
	if(data == null && definition != null) {
		return definition;
	}
	if(definition == null) {
		return data;
	} else {
		var new_data = Xml.parse(haxe_xml_Printer.print(definition.x)).firstElement();
		var att = data.x.attributes();
		while(att.hasNext()) {
			var att1 = att.next();
			new_data.set(att1,data.att.resolve(att1));
		}
		var v = data.get_name();
		if(new_data.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + new_data.nodeType);
		}
		new_data.nodeName = v;
		if(data.has.resolve("name") || data.has.resolve("id")) {
			new_data.set("name",flixel_addons_ui_U.xml_name(data.x));
		} else {
			new_data.set("name","");
		}
		var element = data.x.elements();
		while(element.hasNext()) {
			var element1 = element.next();
			if(element1.nodeType != Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + element1.nodeType);
			}
			var nodeName = element1.nodeName;
			var notCombine = !combineUniqueChildren;
			if(combineUniqueChildren) {
				var new_els = new_data.elementsNamed(nodeName);
				var new_el = new_els.next();
				if(data.nodes.resolve(nodeName).length == 1 && new_el != null && new_els.hasNext() == false) {
					var att2 = element1.attributes();
					while(att2.hasNext()) {
						var att3 = att2.next();
						new_el.set(att3,element1.get(att3));
					}
				} else {
					notCombine = true;
				}
			}
			if(notCombine) {
				new_data.insertChild(Xml.parse(haxe_xml_Printer.print(element1)).firstElement(),0);
			}
		}
		return new haxe_xml_Fast(new_data);
	}
};
flixel_addons_ui_FlxUI._loadBitmapRect = function(source,rect_str) {
	var b1 = openfl_Assets.getBitmapData(flixel_addons_ui_U.gfx(source));
	var coords = rect_str.split(",");
	var rect = null;
	if(coords != null && coords.length == 4) {
		rect = new openfl_geom_Rectangle(Std.parseInt(coords[0]),Std.parseInt(coords[1]),Std.parseInt(coords[2]),Std.parseInt(coords[3]));
	}
	var r = rect;
	var b2 = new openfl_display_BitmapData(r.width | 0,r.height | 0,true,16777215);
	b2.copyPixels(b1,r,new openfl_geom_Point(0,0));
	return b2;
};
flixel_addons_ui_FlxUI.getParams = function(data) {
	var params = null;
	if(data.hasNode.resolve("param")) {
		params = [];
		var _g_head = data.nodes.resolve("param").h;
		while(_g_head != null) {
			var val = _g_head.item;
			_g_head = _g_head.next;
			if(val.has.resolve("type") && val.has.resolve("value")) {
				var type = val.att.resolve("type");
				type = type.toLowerCase();
				var valueStr = val.att.resolve("value");
				var value = valueStr;
				var sort = flixel_addons_ui_U.xml_i(val.x,"sort",-1);
				switch(type) {
				case "bool":case "boolean":
					var str = new String(valueStr);
					str = str.toLowerCase();
					if(str == "true" || str == "1") {
						value = true;
					} else {
						value = false;
					}
					break;
				case "color":case "hex":
					var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(valueStr);
					if(return_val == null) {
						throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + valueStr);
					}
					value = return_val;
					break;
				case "float":
					value = parseFloat(valueStr);
					break;
				case "int":
					value = Std.parseInt(valueStr);
					break;
				case "string":
					value = new String(valueStr);
					break;
				}
				params.push({ sort : sort, value : value});
			}
		}
		params.sort(flixel_addons_ui_FlxUI.sortParams);
		var _g1 = 0;
		var _g = params.length;
		while(_g1 < _g) {
			var i = _g1++;
			params[i] = params[i].value;
		}
	}
	return params;
};
flixel_addons_ui_FlxUI.sortParams = function(a,b) {
	if(a.sort < b.sort) {
		return -1;
	}
	if(a.sort > b.sort) {
		return 1;
	}
	return 0;
};
flixel_addons_ui_FlxUI.__super__ = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUI.prototype = $extend(flixel_addons_ui_FlxUIGroup.prototype,{
	get_isRoot: function() {
		if(this._ptr != null) {
			return this._ptr == flixel_addons_ui_FlxUI.getLeafUIState();
		} else {
			return false;
		}
	}
	,get_tongue: function() {
		return this._ptr_tongue;
	}
	,set_tongue: function(t) {
		this._ptr_tongue = t;
		this._tongueSet(this.group.members,t);
		return this._ptr_tongue;
	}
	,set_focus: function(widget) {
		if(this.focus != null) {
			this.onFocusLost(this.focus);
		}
		this.focus = widget;
		if(this.focus != null) {
			this.onFocus(this.focus);
		}
		return widget;
	}
	,_tongueSet: function(list,tongue) {
		var _g = 0;
		while(_g < list.length) {
			var fs = list[_g];
			++_g;
			if(js_Boot.__instanceof(fs,flixel_addons_ui_FlxUIGroup)) {
				this._tongueSet((js_Boot.__cast(fs , flixel_addons_ui_FlxUIGroup)).group.members,tongue);
			} else if(js_Boot.__instanceof(fs,flixel_addons_ui_FlxUI)) {
				(js_Boot.__cast(fs , flixel_addons_ui_FlxUI)).set_tongue(tongue);
			}
		}
	}
	,callEvent: function(name,sender,data,params) {
		this.getEvent(name,sender,data,params);
	}
	,getEvent: function(name,sender,data,params) {
		if(this._ptr != null) {
			this._ptr.getEvent(name,sender,data,params);
			if(name == "post_load") {
				var key = this._asset_index.keys();
				while(key.hasNext()) {
					var key1 = key.next();
					var thing = this._asset_index.get(key1);
					if(js_Boot.__instanceof(thing,flixel_addons_ui_FlxUI)) {
						thing.getEvent("post_load",sender,data);
					}
				}
			}
		}
	}
	,getRequest: function(name,sender,data,params) {
		if(this._ptr != null) {
			return this._ptr.getRequest(name,sender,data,params);
		}
		return null;
	}
	,onFocus: function(widget) {
		if(js_Boot.__instanceof(widget,flixel_addons_ui_FlxUIDropDownMenu)) {
			var _g = 0;
			var _g1 = this.group.members;
			while(_g < _g1.length) {
				var asset = _g1[_g];
				++_g;
				this.setWidgetSuppression(asset,widget);
			}
		}
	}
	,setWidgetSuppression: function(asset,butNotThisOne,suppressed) {
		if(suppressed == null) {
			suppressed = true;
		}
		if(js_Boot.__instanceof(asset,flixel_addons_ui_interfaces_IFlxUIClickable)) {
			var skip = false;
			if(js_Boot.__instanceof(asset,flixel_addons_ui_FlxUIDropDownMenu)) {
				if(asset == butNotThisOne) {
					skip = true;
				}
			}
			if(!skip) {
				asset.set_skipButtonUpdate(suppressed);
			}
		} else if(js_Boot.__instanceof(asset,flixel_addons_ui_FlxUIGroup)) {
			var _g = 0;
			var _g1 = asset.group.members;
			while(_g < _g1.length) {
				var groupAsset = _g1[_g];
				++_g;
				this.setWidgetSuppression(groupAsset,butNotThisOne,suppressed);
			}
		}
	}
	,onFocusLost: function(widget) {
		if(js_Boot.__instanceof(widget,flixel_addons_ui_FlxUIDropDownMenu)) {
			var _g = 0;
			var _g1 = this.group.members;
			while(_g < _g1.length) {
				var asset = _g1[_g];
				++_g;
				this.setWidgetSuppression(asset,null,false);
			}
		}
	}
	,setSuperIndex: function(flxUI) {
		this._superIndexUI = flxUI;
	}
	,update: function(elapsed) {
		if(this.do_safe_input_delay) {
			this._safe_input_delay_elapsed += flixel_FlxG.elapsed;
			if(this._safe_input_delay_elapsed > this.safe_input_delay_time) {
				this.do_safe_input_delay = false;
			} else {
				return;
			}
		}
		flixel_addons_ui_FlxUIGroup.prototype.update.call(this,elapsed);
	}
	,toggleShow: function(key) {
		var thing = this.getAsset(key,false);
		if(thing == null) {
			var group = this.getGroup(key,false);
			if(group != null) {
				group.set_visible(!group.visible);
				return group.visible;
			}
		} else {
			thing.set_visible(!thing.visible);
			return thing.visible;
		}
		return false;
	}
	,showGroup: function(key,Show,Active) {
		var group = this.getGroup(key,false);
		if(group != null) {
			group.set_visible(Show);
			if(Active == null) {
				group.set_active(Show);
			} else {
				group.set_active(Active);
			}
		}
	}
	,showAsset: function(key,Show,Active) {
		var asset = this.getAsset(key,false);
		if(asset != null) {
			asset.set_visible(Show);
			if(Active == null) {
				asset.set_active(Show);
			} else {
				asset.set_active(Active);
			}
		}
	}
	,removeAsset: function(key,destroy) {
		if(destroy == null) {
			destroy = true;
		}
		var asset = this.getAsset(key,false);
		if(asset != null) {
			this.replaceInGroup(asset,null,true);
			this._asset_index.remove(key);
		}
		if(destroy && asset != null) {
			asset.destroy();
			asset = null;
		}
		return asset;
	}
	,addAsset: function(asset,key,group_name,recursive) {
		if(recursive == null) {
			recursive = false;
		}
		if(group_name == null) {
			group_name = "";
		}
		var _this = this._asset_index;
		if(__map_reserved[key] != null ? _this.existsReserved(key) : _this.h.hasOwnProperty(key)) {
			return false;
		}
		var g = this.getGroup(group_name,recursive);
		if(g != null) {
			g.add(asset);
		} else {
			this.add(asset);
		}
		var _this1 = this._asset_index;
		if(__map_reserved[key] != null) {
			_this1.setReserved(key,asset);
		} else {
			_this1.h[key] = asset;
		}
		return true;
	}
	,replaceAsset: function(key,replace,center_x,center_y,destroy_old) {
		if(destroy_old == null) {
			destroy_old = true;
		}
		if(center_y == null) {
			center_y = true;
		}
		if(center_x == null) {
			center_x = true;
		}
		var original = this.getAsset(key,false);
		if(original != null) {
			if(!center_x) {
				replace.set_x(original.x);
			} else {
				replace.set_x(original.x + (original.get_width() - replace.get_width()) / 2);
			}
			if(!center_y) {
				replace.set_y(original.y);
			} else {
				replace.set_y(original.y + (original.get_height() - replace.get_height()) / 2);
			}
			this.replaceInGroup(original,replace);
			this._asset_index.remove(key);
			var _this = this._asset_index;
			if(__map_reserved[key] != null) {
				_this.setReserved(key,replace);
			} else {
				_this.h[key] = replace;
			}
			if(destroy_old) {
				original.destroy();
				original = null;
			}
		}
		return original;
	}
	,destroy: function() {
		if(this._group_index != null) {
			var key = this._group_index.keys();
			while(key.hasNext()) {
				var key1 = key.next();
				this._group_index.remove(key1);
			}
			this._group_index = null;
		}
		if(this._asset_index != null) {
			var key2 = this._asset_index.keys();
			while(key2.hasNext()) {
				var key3 = key2.next();
				this._asset_index.remove(key3);
			}
			this._asset_index = null;
		}
		if(this._tag_index != null) {
			var key4 = this._tag_index.keys();
			while(key4.hasNext()) {
				var key5 = key4.next();
				var _this = this._tag_index;
				flixel_util_FlxArrayUtil.clearArray(__map_reserved[key5] != null ? _this.getReserved(key5) : _this.h[key5]);
				this._tag_index.remove(key5);
			}
			this._tag_index = null;
		}
		if(this._definition_index != null) {
			var key6 = this._definition_index.keys();
			while(key6.hasNext()) {
				var key7 = key6.next();
				this._definition_index.remove(key7);
			}
			this._definition_index = null;
		}
		if(this._variable_index != null) {
			var key8 = this._variable_index.keys();
			while(key8.hasNext()) {
				var key9 = key8.next();
				this._variable_index.remove(key9);
			}
			this._variable_index = null;
		}
		if(this._mode_index != null) {
			var key10 = this._mode_index.keys();
			while(key10.hasNext()) {
				var key11 = key10.next();
				this._mode_index.remove(key11);
			}
			this._mode_index = null;
		}
		this._ptr = null;
		this._superIndexUI = null;
		this._ptr_tongue = null;
		if(this.cursorLists != null) {
			var _g = 0;
			var _g1 = this.cursorLists;
			while(_g < _g1.length) {
				var arr = _g1[_g];
				++_g;
				flixel_util_FlxArrayUtil.clearArray(arr);
			}
			flixel_util_FlxArrayUtil.clearArray(this.cursorLists);
		}
		this.cursorLists = null;
		flixel_util_FlxArrayUtil.clearArray(this._failure_checks);
		this._failure_checks = null;
		flixel_util_FlxArrayUtil.clearArray(this._assetsToCleanUp);
		this._assetsToCleanUp = null;
		flixel_util_FlxArrayUtil.clearArray(this._scaledAssets);
		this._scaledAssets = null;
		flixel_addons_ui_FlxUIGroup.prototype.destroy.call(this);
	}
	,load: function(data) {
		this._group_index = new haxe_ds_StringMap();
		this._asset_index = new haxe_ds_StringMap();
		this._tag_index = new haxe_ds_StringMap();
		this._definition_index = new haxe_ds_StringMap();
		if(this._variable_index == null) {
			this._variable_index = new haxe_ds_StringMap();
		}
		this._mode_index = new haxe_ds_StringMap();
		if(data != null) {
			if(this._superIndexUI == null) {
				var screenRegion = new flixel_addons_ui_FlxUIRegion(0,0,flixel_FlxG.width,flixel_FlxG.height);
				screenRegion.name = "screen";
				this.addAsset(screenRegion,"screen");
				if(data.hasNode.resolve("screen_override")) {
					if(this._loadTest(data.node.resolve("screen_override"))) {
						var screenNode = data.node.resolve("screen_override");
						this._loadPosition(screenNode,screenRegion);
						screenRegion.set_width(this._loadWidth(screenNode,flixel_FlxG.width));
						screenRegion.set_height(this._loadHeight(screenNode,flixel_FlxG.height));
					}
				}
			}
			this._data = data;
			if(data.hasNode.resolve("inject")) {
				while(data.hasNode.resolve("inject")) {
					var inj_data = data.node.resolve("inject");
					var payload = flixel_addons_ui_U.xml(flixel_addons_ui_U.xml_name(inj_data.x),"xml",false);
					if(payload != null) {
						var parent = inj_data.x.parent;
						var i = 0;
						var _g = 0;
						var _g1 = parent.children;
						while(_g < _g1.length) {
							var child = _g1[_g];
							++_g;
							if(child == inj_data.x) {
								break;
							}
							++i;
						}
						if(parent.removeChild(inj_data.x)) {
							var j = 0;
							var e = payload.elements();
							while(e.hasNext()) {
								parent.insertChild(e.next(),i + j);
								++j;
							}
						}
					}
				}
			}
			if(data.hasNode.resolve("include")) {
				var _g_head = data.nodes.resolve("include").h;
				while(_g_head != null) {
					var val = _g_head.item;
					_g_head = _g_head.next;
					var inc_name = flixel_addons_ui_U.xml_name(val.x);
					var liveFile = null;
					var inc_xml = null;
					if(liveFile == null) {
						inc_xml = flixel_addons_ui_U.xml(inc_name);
					} else {
						inc_xml = liveFile;
					}
					if(inc_xml != null) {
						var _g_head1 = inc_xml.nodes.resolve("definition").h;
						while(_g_head1 != null) {
							var val1 = _g_head1.item;
							_g_head1 = _g_head1.next;
							var def_name = "include:" + flixel_addons_ui_U.xml_name(val1.x);
							this.unparentXML(val1);
							var _this = this._definition_index;
							if(__map_reserved[def_name] != null) {
								_this.setReserved(def_name,val1);
							} else {
								_this.h[def_name] = val1;
							}
						}
						if(inc_xml.hasNode.resolve("point_size")) {
							this._loadPointSize(inc_xml);
						}
						if(inc_xml.hasNode.resolve("default")) {
							var _g_head2 = inc_xml.nodes.resolve("default").h;
							while(_g_head2 != null) {
								var val2 = _g_head2.item;
								_g_head2 = _g_head2.next;
								if(this._loadTest(val2)) {
									var defaultName = flixel_addons_ui_U.xml_name(val2.x);
									this.unparentXML(val2);
									var _this1 = this._definition_index;
									var key = "default:" + defaultName;
									if(__map_reserved[key] != null) {
										_this1.setReserved(key,val2);
									} else {
										_this1.h[key] = val2;
									}
								}
							}
						}
					}
				}
			}
			if(data.hasNode.resolve("point_size")) {
				this._loadPointSize(data);
			}
			if(data.hasNode.resolve("definition")) {
				var _g_head3 = data.nodes.resolve("definition").h;
				while(_g_head3 != null) {
					var val3 = _g_head3.item;
					_g_head3 = _g_head3.next;
					if(this._loadTest(val3)) {
						var def_name1 = flixel_addons_ui_U.xml_name(val3.x);
						var error = "";
						if(def_name1.indexOf("default:") != -1) {
							error = "'default:'";
						}
						if(def_name1.indexOf("include:") != -1) {
							error = "'include:'";
						}
						if(error == "") {
							this.unparentXML(val3);
							var _this2 = this._definition_index;
							if(__map_reserved[def_name1] != null) {
								_this2.setReserved(def_name1,val3);
							} else {
								_this2.h[def_name1] = val3;
							}
						}
					}
				}
			}
			if(data.hasNode.resolve("default")) {
				var _g_head4 = data.nodes.resolve("default").h;
				while(_g_head4 != null) {
					var val4 = _g_head4.item;
					_g_head4 = _g_head4.next;
					if(this._loadTest(val4)) {
						var defaultName1 = flixel_addons_ui_U.xml_name(val4.x);
						this.unparentXML(val4);
						var _this3 = this._definition_index;
						var key1 = "default:" + defaultName1;
						if(__map_reserved[key1] != null) {
							_this3.setReserved(key1,val4);
						} else {
							_this3.h[key1] = val4;
						}
					}
				}
			}
			if(data.hasNode.resolve("variable")) {
				var _g_head5 = data.nodes.resolve("variable").h;
				while(_g_head5 != null) {
					var val5 = _g_head5.item;
					_g_head5 = _g_head5.next;
					if(this._loadTest(val5)) {
						var var_name = flixel_addons_ui_U.xml_name(val5.x);
						var var_value = flixel_addons_ui_U.xml_str(val5.x,"value");
						if(var_name != "") {
							var _this4 = this._variable_index;
							if(__map_reserved[var_name] != null) {
								_this4.setReserved(var_name,var_value);
							} else {
								_this4.h[var_name] = var_value;
							}
						}
					}
				}
			}
			if(data.hasNode.resolve("mode")) {
				var _g_head6 = data.nodes.resolve("mode").h;
				while(_g_head6 != null) {
					var val6 = _g_head6.item;
					_g_head6 = _g_head6.next;
					if(this._loadTest(val6)) {
						var mode_data2 = this.applyNodeConditionals(val6);
						var mode_name = flixel_addons_ui_U.xml_name(val6.x);
						this.unparentXML(mode_data2);
						var _this5 = this._mode_index;
						if(__map_reserved[mode_name] != null) {
							_this5.setReserved(mode_name,mode_data2);
						} else {
							_this5.h[mode_name] = mode_data2;
						}
					}
				}
			}
			if(data.hasNode.resolve("group")) {
				var _g_head7 = data.nodes.resolve("group").h;
				while(_g_head7 != null) {
					var val7 = _g_head7.item;
					_g_head7 = _g_head7.next;
					if(this._loadTest(val7)) {
						var name = flixel_addons_ui_U.xml_name(val7.x);
						var custom = flixel_addons_ui_U.xml_str(val7.x,"custom");
						var tempGroup = null;
						if(custom != "") {
							var result = this._ptr.getRequest("ui_get_group:",this,custom);
							if(result != null && js_Boot.__instanceof(result,flixel_addons_ui_FlxUIGroup)) {
								tempGroup = result;
							}
						}
						if(tempGroup == null) {
							tempGroup = new flixel_addons_ui_FlxUIGroup();
						}
						tempGroup.name = name;
						var _this6 = this._group_index;
						if(__map_reserved[name] != null) {
							_this6.setReserved(name,tempGroup);
						} else {
							_this6.h[name] = tempGroup;
						}
						this.add(tempGroup);
					}
				}
			}
			if(data.x.firstElement() != null) {
				var node = data.x.elements();
				while(node.hasNext()) this._loadSub(node.next());
			}
			this._postLoad(data);
		} else {
			this._onFinishLoad();
		}
	}
	,unparentXML: function(f) {
		return flixel_addons_ui_U.unparentXML(f);
	}
	,_loadPointSize: function(data) {
		var ptx = this._loadWidth(data.node.resolve("point_size"),-1.0,"x");
		var pty = this._loadHeight(data.node.resolve("point_size"),-1.0,"y");
		if(pty < 1 && ptx < 1) {
			pty = this._loadHeight(data.node.resolve("point_size"),-1,"value");
			ptx = pty;
		}
		if(pty > 0) {
			this._pointX = ptx;
		}
		if(ptx > 0) {
			this._pointY = pty;
		}
	}
	,_loadSub: function(node,iteration) {
		if(iteration == null) {
			iteration = 0;
		}
		if(node.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + node.nodeType);
		}
		var type = node.nodeName;
		type.toLowerCase();
		var obj = new haxe_xml_Fast(node);
		if(type == "load_if") {
			if(this._loadTest(obj)) {
				if(node.firstElement() != null) {
					var subNode = node.elements();
					while(subNode.hasNext()) this._loadSub(subNode.next(),iteration + 1);
				}
			}
			return;
		}
		var group_name = "";
		var tempGroup = null;
		var thing_name = flixel_addons_ui_U.xml_name(obj.x);
		if(obj.has.resolve("group")) {
			group_name = obj.att.resolve("group");
			tempGroup = this.getGroup(group_name);
		}
		var thing = this._loadThing(type,obj);
		if(thing != null) {
			this._loadGlobals(obj,thing);
			if(thing_name != null && thing_name != "") {
				var _this = this._asset_index;
				if(__map_reserved[thing_name] != null) {
					_this.setReserved(thing_name,thing);
				} else {
					_this.h[thing_name] = thing;
				}
				thing.name = thing_name;
				var thing_tags = flixel_addons_ui_U.xml_str(obj.x,"tags");
				if(thing_tags != "") {
					this._addTags(thing_tags.split(","),thing_name);
				}
			}
			this._loadTooltip(thing,obj);
			if(tempGroup != null) {
				tempGroup.add(thing);
			} else {
				this.add(thing);
			}
			this._loadPosition(obj,thing);
		}
	}
	,_addTags: function(arr,thingName) {
		var _g = 0;
		while(_g < arr.length) {
			var tag = arr[_g];
			++_g;
			var list = null;
			var _this = this._tag_index;
			if(!(__map_reserved[tag] != null ? _this.existsReserved(tag) : _this.h.hasOwnProperty(tag))) {
				var _this1 = this._tag_index;
				var value = [];
				if(__map_reserved[tag] != null) {
					_this1.setReserved(tag,value);
				} else {
					_this1.h[tag] = value;
				}
			}
			var _this2 = this._tag_index;
			if(__map_reserved[tag] != null) {
				list = _this2.getReserved(tag);
			} else {
				list = _this2.h[tag];
			}
			if(list.indexOf(thingName) == -1) {
				list.push(thingName);
			}
		}
	}
	,_loadGlobals: function(data,thing) {
		if(js_Boot.__instanceof(thing,flixel_FlxBasic)) {
			var isVis = flixel_addons_ui_U.xml_bool(data.x,"visible",true);
			var isActive = flixel_addons_ui_U.xml_bool(data.x,"active",true);
			var numID = flixel_addons_ui_U.xml_i(data.x,"num_id");
			thing.visible = isVis;
			thing.active = isActive;
			thing.ID = numID;
			if(js_Boot.__instanceof(thing,flixel_FlxSprite)) {
				thing.set_alpha(flixel_addons_ui_U.xml_f(data.x,"alpha",1.0));
			}
		}
	}
	,_postLoad: function(data) {
		this._postLoaded = true;
		if(data.x.firstElement() != null) {
			var node = data.x.elements();
			while(node.hasNext()) {
				var node1 = node.next();
				if(node1.nodeType != Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + node1.nodeType);
				}
				this._postLoadThing(node1.nodeName.toLowerCase(),new haxe_xml_Fast(node1));
			}
		}
		if(data.hasNode.resolve("mode")) {
			var _g_head = data.nodes.resolve("mode").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				if(flixel_addons_ui_U.xml_bool(val.x,"is_default")) {
					this.setMode(flixel_addons_ui_U.xml_name(val.x));
					break;
				}
			}
		}
		if(this._failure_checks != null) {
			var _g = 0;
			var _g1 = this._failure_checks;
			while(_g < _g1.length) {
				var data1 = _g1[_g];
				++_g;
				if(this._checkFailure(data1)) {
					this.failed = true;
					break;
				}
			}
			flixel_addons_ui_U.clearArraySoft(this._failure_checks);
			this._failure_checks = null;
		}
		this._onFinishLoad();
	}
	,_sendTo: function(thing,dir) {
		var group = this.getAssetGroup(null,thing);
		if(group == null) {
			if(this.group.members.indexOf(thing) != -1) {
				group = this;
			} else {
				return;
			}
		}
		if(dir != -1 && dir != 1) {
			return;
		}
		HxOverrides.remove(group.group.members,thing);
		switch(dir) {
		case -1:
			group.group.members.splice(0,0,thing);
			break;
		case 1:
			group.group.members.push(thing);
			break;
		}
	}
	,sendToFront: function(name,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var thing = this.getAsset(name,recursive);
		if(thing != null) {
			this._sendTo(thing,1);
		}
	}
	,sendToBack: function(name,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var thing = this.getAsset(name,recursive);
		if(thing != null) {
			this._sendTo(thing,-1);
		}
	}
	,get_currMode: function() {
		return this._curr_mode;
	}
	,set_currMode: function(m) {
		this.setMode(m);
		return this._curr_mode;
	}
	,setMode: function(mode_name,target_name) {
		if(target_name == null) {
			target_name = "";
		}
		if(this._curr_mode == mode_name) {
			return;
		}
		var mode = this.getMode(mode_name);
		this._curr_mode = mode_name;
		var name = "";
		var thing;
		if(target_name == "") {
			if(mode != null) {
				var xml;
				var node = mode.get_elements();
				while(node.hasNext()) {
					var node2 = this.applyNodeConditionals(node.next());
					xml = node2.x;
					if(xml.nodeType != Xml.Element) {
						throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + xml.nodeType);
					}
					var nodeName = xml.nodeName;
					var activeStatus = flixel_addons_ui_U.xml_str(xml,"active") == "" ? null : true;
					if(activeStatus != null) {
						activeStatus = flixel_addons_ui_U.xml_bool(xml,"active");
					}
					if(this._loadTest(node2)) {
						switch(nodeName) {
						case "align":
							this._alignThing(node2);
							break;
						case "change":
							this._changeThing(node2);
							break;
						case "hide":
							this.showThing(flixel_addons_ui_U.xml_name(xml),false,activeStatus);
							break;
						case "position":
							name = flixel_addons_ui_U.xml_name(xml);
							thing = this.getAsset(name);
							if(thing != null) {
								this._loadPosition(node2,thing);
							}
							break;
						case "show":
							this.showThing(flixel_addons_ui_U.xml_name(xml),true,activeStatus);
							break;
						}
					}
				}
			}
		} else {
			var target = this.getAsset(target_name);
			if(target != null && js_Boot.__instanceof(target,flixel_addons_ui_FlxUI)) {
				(js_Boot.__cast(target , flixel_addons_ui_FlxUI)).setMode(mode_name,"");
			}
		}
	}
	,showThing: function(name,visibleStatus,activeStatus) {
		if(visibleStatus == null) {
			visibleStatus = true;
		}
		if(name.indexOf(",") != -1) {
			var names = name.split(",");
			var _g = 0;
			while(_g < names.length) {
				var each_name = names[_g];
				++_g;
				var thing = this.getAsset(each_name);
				if(thing != null) {
					thing.set_visible(visibleStatus);
					if(activeStatus != null) {
						thing.set_active(activeStatus);
					}
				} else {
					var group = this.getGroup(each_name);
					if(group != null) {
						group.set_visible(visibleStatus);
						if(activeStatus != null) {
							group.set_active(activeStatus);
						}
					}
				}
			}
		} else if(name != "*") {
			var thing1 = this.getAsset(name);
			if(thing1 != null) {
				thing1.set_visible(visibleStatus);
				if(activeStatus != null) {
					thing1.set_active(activeStatus);
				}
			} else {
				var group1 = this.getGroup(name);
				if(group1 != null) {
					group1.set_visible(visibleStatus);
					if(activeStatus != null) {
						group1.set_active(activeStatus);
					}
				}
			}
		} else {
			var asset_name = this._asset_index.keys();
			while(asset_name.hasNext()) {
				var asset_name1 = asset_name.next();
				if(asset_name1 != "*") {
					this.showThing(asset_name1,visibleStatus,activeStatus);
				}
			}
		}
	}
	,getGroup: function(key,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var _this = this._group_index;
		var tempGroup = __map_reserved[key] != null ? _this.getReserved(key) : _this.h[key];
		if(tempGroup == null && recursive && this._superIndexUI != null) {
			return this._superIndexUI.getGroup(key,recursive);
		}
		return tempGroup;
	}
	,getFlxText: function(key,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var asset = this.getAsset(key,recursive);
		if(asset != null) {
			if(js_Boot.__instanceof(asset,flixel_text_FlxText)) {
				return js_Boot.__cast(asset , flixel_text_FlxText);
			}
		}
		return null;
	}
	,getAllAssets: function() {
		var arr = [];
		var key = this._asset_index.keys();
		while(key.hasNext()) arr.push(this.getAsset(key.next()));
		return arr;
	}
	,getAssetKeys: function() {
		var arr = [];
		var key = this._asset_index.keys();
		while(key.hasNext()) arr.push(key.next());
		return arr;
	}
	,hasAsset: function(key,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var _this = this._asset_index;
		if(__map_reserved[key] != null ? _this.existsReserved(key) : _this.h.hasOwnProperty(key)) {
			return true;
		}
		if(recursive && this._superIndexUI != null) {
			return this._superIndexUI.hasAsset(key,recursive);
		}
		return false;
	}
	,getAsset: function(key,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var _this = this._asset_index;
		var asset = __map_reserved[key] != null ? _this.getReserved(key) : _this.h[key];
		if(asset == null && recursive && this._superIndexUI != null) {
			return this._superIndexUI.getAsset(key,recursive);
		}
		return asset;
	}
	,getAssetsWithTag: function(tag) {
		var _this = this._tag_index;
		if(__map_reserved[tag] != null ? _this.existsReserved(tag) : _this.h.hasOwnProperty(tag)) {
			var _this1 = this._tag_index;
			var list = __map_reserved[tag] != null ? _this1.getReserved(tag) : _this1.h[tag];
			if(list == null || list.length == 0) {
				return null;
			}
			var arr = [];
			var _g = 0;
			while(_g < list.length) {
				var key = list[_g];
				++_g;
				var widget = this.getAsset(key);
				if(widget != null) {
					arr.push(widget);
				}
			}
			return arr;
		}
		return null;
	}
	,getAssetGroup: function(key,thing) {
		if(thing == null && (key == null || key == "")) {
			return null;
		}
		if(thing == null) {
			thing = this.getAsset(key);
		}
		if(thing == null) {
			return null;
		}
		var key1 = this._group_index.keys();
		while(key1.hasNext()) {
			var key2 = key1.next();
			var _this = this._group_index;
			var g = __map_reserved[key2] != null ? _this.getReserved(key2) : _this.h[key2];
			if(g.group.members.indexOf(thing) != -1) {
				return g;
			}
		}
		return null;
	}
	,getMode: function(key,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var _this = this._mode_index;
		var mode = __map_reserved[key] != null ? _this.getReserved(key) : _this.h[key];
		if(mode == null && recursive && this._superIndexUI != null) {
			return this._superIndexUI.getMode(key,recursive);
		}
		return mode;
	}
	,getLabelStyleFromDefinition: function(key,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var definition = this.getDefinition(key,recursive);
		if(definition != null) {
			var fontDef = this._loadFontDef(definition);
			var align = flixel_addons_ui_U.xml_str(definition.x,"align");
			if(align == "") {
				align = null;
			}
			return new flixel_addons_ui_ButtonLabelStyle(fontDef,align,this._loadColor(definition),this._loadBorder(definition));
		}
		return null;
	}
	,getLabelStyleFromData: function(data) {
		var fontDef = this._loadFontDef(data);
		var align = flixel_addons_ui_U.xml_str(data.x,"align");
		if(align == "") {
			align = null;
		}
		return new flixel_addons_ui_ButtonLabelStyle(fontDef,align,this._loadColor(data),this._loadBorder(data));
	}
	,checkVariable: function(key,otherValue,type,operator,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		if(operator == null) {
			operator = "==";
		}
		var variable = this.getVariable(key,recursive);
		if(variable != null) {
			return flixel_addons_ui_U.compareStringVars(variable,otherValue,type,operator);
		} else {
			return flixel_addons_ui_U.compareStringVars("",otherValue,type,operator);
		}
	}
	,setVariable: function(key,value) {
		var _this = this._variable_index;
		if(__map_reserved[key] != null) {
			_this.setReserved(key,value);
		} else {
			_this.h[key] = value;
		}
	}
	,getVariable: function(key,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var _this = this._variable_index;
		var variable = __map_reserved[key] != null ? _this.getReserved(key) : _this.h[key];
		if(variable == null && recursive && this._superIndexUI != null) {
			variable = this._superIndexUI.getVariable(key,recursive);
		}
		return variable;
	}
	,getDefinition: function(key,recursive) {
		if(recursive == null) {
			recursive = true;
		}
		var _this = this._definition_index;
		var definition = __map_reserved[key] != null ? _this.getReserved(key) : _this.h[key];
		if(definition == null && recursive && this._superIndexUI != null) {
			definition = this._superIndexUI.getDefinition(key,recursive);
		}
		if(definition == null) {
			if(key.indexOf("include:") == -1) {
				definition = this.getDefinition("include:" + key,recursive);
			}
		}
		return definition;
	}
	,screenWidth: function() {
		if(this.hasAsset("screen")) {
			return this.getAsset("screen").get_width() | 0;
		}
		return flixel_FlxG.width;
	}
	,screenHeight: function() {
		if(this.hasAsset("height")) {
			return this.getAsset("screen").get_height() | 0;
		}
		return flixel_FlxG.height;
	}
	,replaceInGroup: function(original,replace,splice) {
		if(splice == null) {
			splice = false;
		}
		if(this._group_index != null) {
			var key = this._group_index.keys();
			while(key.hasNext()) {
				var key1 = key.next();
				var _this = this._group_index;
				var tempGroup = __map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1];
				if(tempGroup.group.members != null) {
					var i = 0;
					var _g = 0;
					var _g1 = tempGroup.group.members;
					while(_g < _g1.length) {
						var member = _g1[_g];
						++_g;
						if(member != null) {
							if(member == original) {
								tempGroup.group.members[i] = replace;
								if(replace == null) {
									if(splice) {
										tempGroup.group.members.splice(i,1);
									}
								}
								return;
							}
							++i;
						}
					}
				}
			}
		}
		if(this.group.members != null) {
			var i1 = 0;
			var _g2 = 0;
			var _g11 = this.group.members;
			while(_g2 < _g11.length) {
				var member1 = _g11[_g2];
				++_g2;
				if(member1 != null) {
					if(member1 == original) {
						this.group.members[i1] = replace;
						if(replace == null) {
							if(splice) {
								this.group.members.splice(i1,1);
								--i1;
							}
						}
						return;
					}
				}
				++i1;
			}
		}
	}
	,applyNodeConditionals: function(info) {
		if(info.hasNode.resolve("locale") || info.hasNode.resolve("haxedef")) {
			info = new haxe_xml_Fast(Xml.parse(haxe_xml_Printer.print(info.x)).firstElement());
			if(info.hasNode.resolve("locale")) {
				info = this.applyNodeChanges(info,"locale");
			}
			if(info.hasNode.resolve("haxedef")) {
				info = this.applyNodeChanges(info,"haxedef");
			}
			if(info.hasNode.resolve("window")) {
				info = this.applyNodeChanges(info,"window");
			}
		}
		return info;
	}
	,applyNodeChanges: function(data,nodeName) {
		var nodeValue = "";
		if(nodeName == "locale") {
			if(this._ptr_tongue == null) {
				return data;
			}
			nodeValue = this._ptr_tongue.locale.toLowerCase();
		}
		var haxedef = false;
		if(nodeName == "haxedef") {
			haxedef = true;
		}
		if(nodeName == "window") {
			nodeValue = flixel_FlxG.width + "," + flixel_FlxG.height;
		}
		var _g_head = data.nodes.resolve(nodeName).h;
		while(_g_head != null) {
			var val = _g_head.item;
			_g_head = _g_head.next;
			var cname = flixel_addons_ui_U.xml_name(val.x);
			if(haxedef) {
				nodeValue = "";
				if(flixel_addons_ui_U.checkHaxedef(cname)) {
					nodeValue = cname;
				}
			}
			if(cname == nodeValue) {
				if(val.hasNode.resolve("change")) {
					var _g_head1 = val.nodes.resolve("change").h;
					while(_g_head1 != null) {
						var val1 = _g_head1.item;
						_g_head1 = _g_head1.next;
						var att = val1.x.attributes();
						while(att.hasNext()) {
							var att1 = att.next();
							var value = val1.x.get(att1);
							data.x.set(att1,value);
						}
					}
				}
			}
		}
		return data;
	}
	,loadThing: function(type,data) {
		return this._loadThing(type,data);
	}
	,_loadThingGetInfo: function(data) {
		var _this = data.x;
		if(_this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + _this.nodeType);
		}
		var defaultDef = this.getDefinition("default:" + _this.nodeName);
		var info = null;
		if(defaultDef != null) {
			info = flixel_addons_ui_FlxUI.consolidateData(data,defaultDef,true);
		}
		if(info == null) {
			info = data;
		}
		var use_def = flixel_addons_ui_U.xml_str(info.x,"use_def",true);
		var definition = null;
		if(use_def != "") {
			definition = this.getDefinition(use_def);
		}
		info = flixel_addons_ui_FlxUI.consolidateData(info,definition);
		info = this.applyNodeConditionals(info);
		if(this._loadTest(info) == false) {
			return null;
		}
		return info;
	}
	,_loadTooltip: function(thing,data) {
		if(data.hasNode.resolve("tooltip")) {
			var tt = this._loadTooltipData(data.node.resolve("tooltip"));
			var state = flixel_addons_ui_FlxUI.getLeafUIState();
			if(js_Boot.__instanceof(thing,flixel_addons_ui_FlxUICheckBox)) {
				state.tooltips.add(thing.button,tt);
			} else {
				state.tooltips.add(thing,tt);
			}
		}
	}
	,_loadTooltipData: function(tNode) {
		var tt = { title : "", body : "", anchor : null, style : { titleFormat : null, bodyFormat : null, titleBorder : null, bodyBorder : null, titleOffset : null, bodyOffset : null, titleWidth : -1, bodyWidth : -1, background : null, borderSize : -1, borderColor : null, arrow : null, autoSizeVertical : null, autoSizeHorizontal : null, leftPadding : -1, rightPadding : -1, topPadding : -1, bottomPadding : -1}};
		var defaultDef = this.getDefinition("default:tooltip");
		if(defaultDef != null) {
			tNode = flixel_addons_ui_FlxUI.consolidateData(tNode,defaultDef,true);
		}
		if(tNode.has.resolve("use_def")) {
			var def = this.getDefinition(flixel_addons_ui_U.xml_str(tNode.x,"use_def",true));
			if(def != null) {
				tNode = flixel_addons_ui_FlxUI.consolidateData(tNode,def,true);
			}
		}
		if(tNode.has.resolve("text")) {
			this._loadTooltipText(tNode,"text",tt);
		}
		if(tNode.hasNode.resolve("title")) {
			this._loadTooltipText(tNode.node.resolve("title"),"text",tt);
		}
		if(tNode.hasNode.resolve("body")) {
			this._loadTooltipText(tNode.node.resolve("body"),"text",tt);
		}
		tt.anchor = this._loadAnchor(tNode);
		this._loadTooltipStyle(tNode,tt);
		return tt;
	}
	,_loadTooltipStyle: function(node,tt) {
		tt.style.background = flixel_addons_ui_U.xml_color(node.x,"background");
		tt.style.borderSize = flixel_addons_ui_U.xml_i(node.x,"border",-1);
		tt.style.borderColor = flixel_addons_ui_U.xml_color(node.x,"border_color");
		var tmp;
		if(node.has.resolve("arrow")) {
			var data = node.x;
			var str = "";
			if(data.get("arrow") != null) {
				str = data.get("arrow");
				if(str == "" || str == null) {
					str = "";
				} else {
					str = flixel_addons_ui_U.gfx(str);
					try {
						if(!openfl_Assets.exists(str,"IMAGE")) {
							throw new js__$Boot_HaxeError("couldn't load bmp \"" + "arrow" + "\"");
						}
					} catch( msg ) {
						haxe_CallStack.lastException = msg;
						if (msg instanceof js__$Boot_HaxeError) msg = msg.val;
						if( js_Boot.__instanceof(msg,String) ) {
						} else throw(msg);
					}
				}
			}
			tmp = str;
		} else {
			tmp = null;
		}
		tt.style.arrow = tmp;
		tt.style.autoSizeHorizontal = flixel_addons_ui_U.xml_bool(node.x,"auto_size_horizontal",true);
		tt.style.autoSizeVertical = flixel_addons_ui_U.xml_bool(node.x,"auto_size_vertical",true);
		var padAll = this._loadHeight(node,-1,"pad_all") | 0;
		if(padAll != -1) {
			tt.style.leftPadding = tt.style.rightPadding = tt.style.topPadding = tt.style.bottomPadding = padAll;
		} else {
			var tmp1 = this._loadWidth(node,0,"pad_left") | 0;
			tt.style.leftPadding = tmp1;
			var tmp2 = this._loadWidth(node,0,"pad_right") | 0;
			tt.style.rightPadding = tmp2;
			var tmp3 = this._loadHeight(node,0,"pad_top") | 0;
			tt.style.topPadding = tmp3;
			var tmp4 = this._loadHeight(node,0,"pad_bottom") | 0;
			tt.style.bottomPadding = tmp4;
		}
	}
	,_loadTooltipText: function(node,fieldName,tt) {
		var nodeName = node.get_name();
		var text = this._loadString(node,fieldName);
		var offset = new flixel_math_FlxPoint(this._loadWidth(node,0,"x"),this._loadHeight(node,0,"y"));
		if(node.has.resolve("use_def")) {
			var the_def = this.getDefinition(flixel_addons_ui_U.xml_str(node.x,"use_def",true));
			if(the_def != null) {
				node = flixel_addons_ui_FlxUI.consolidateData(node,the_def);
			}
		}
		var border = this._loadBorder(node);
		var format = this._loadFontDef(node);
		var color = flixel_addons_ui_U.xml_color(node.x,"color",true,-16777216);
		format.format.color = color;
		var W = this._loadWidth(node,-1,"width") | 0;
		switch(nodeName) {
		case "body":
			if(text != "") {
				tt.body = text;
			}
			tt.style.bodyOffset = offset;
			tt.style.bodyFormat = format;
			tt.style.bodyWidth = W;
			tt.style.bodyBorder = border;
			break;
		case "title":case "tooltip":
			if(text != "") {
				tt.title = text;
			}
			tt.style.titleOffset = offset;
			tt.style.titleFormat = format;
			tt.style.titleWidth = W;
			tt.style.titleBorder = border;
			break;
		default:
		}
	}
	,_loadAnchor: function(data) {
		var xOff = this._loadWidth(data,0,"x");
		var yOff = this._loadHeight(data,0,"y");
		if(data.hasNode.resolve("anchor")) {
			return new flixel_addons_ui_Anchor(xOff,yOff,flixel_addons_ui_U.xml_str(data.node.resolve("anchor").x,"x",true,"right"),flixel_addons_ui_U.xml_str(data.node.resolve("anchor").x,"y",true,"top"),flixel_addons_ui_U.xml_str(data.node.resolve("anchor").x,"x-flush",true,"left"),flixel_addons_ui_U.xml_str(data.node.resolve("anchor").x,"y-flush",true,"top"));
		}
		return null;
	}
	,_loadThing: function(type,data) {
		var info = this._loadThingGetInfo(data);
		if(info == null) {
			return null;
		}
		switch(type) {
		case "align":
			this._alignThing(info,true);
			return null;
		case "bar":
			return this._loadBar(info);
		case "box":
			return this._loadBox(info);
		case "button":
			return this._loadButton(info);
		case "button_toggle":
			return this._loadButton(info,true,true);
		case "change":
			this._changeThing(info);
			return null;
		case "checkbox":
			return this._loadCheckBox(info);
		case "failure":
			if(this._failure_checks == null) {
				this._failure_checks = [];
			}
			this.unparentXML(info);
			this._failure_checks.push(info);
			return null;
		case "input_text":
			return this._loadInputText(info);
		case "line":
			return this._loadLine(info);
		case "default":case "group":case "include":case "inject":case "load_if":case "mode":
			return null;
		case "chrome":case "nine_slice":case "nine_slice_sprite":case "nineslice":case "nineslicesprite":
			return this._load9SliceSprite(info);
		case "num_stepper":case "numeric_stepper":case "numstepper":
			return this._loadNumericStepper(info);
		case "position":
			this.name = flixel_addons_ui_U.xml_name(info.x);
			var thing = this.getAsset(this.name);
			if(thing != null) {
				this._loadPosition(info,thing);
			}
			return null;
		case "dropdown":case "dropdown_menu":case "pulldown":case "pulldown_menu":
			return this._loadDropDownMenu(info);
		case "radio_group":
			return this._loadRadioGroup(info);
		case "region":
			return this._loadRegion(info);
		case "sprite":
			return this._loadSprite(info);
		case "tab_menu":
			return this._loadTabMenu(info);
		case "text":
			return this._loadText(info);
		case "tile_test":
			return this._loadTileTest(info);
		case "layout":case "ui":
			return this._loadLayout(info);
		default:
			return this._ptr.getRequest("ui_get:" + type,this,info,[data]);
		}
	}
	,_loadX: function(data,default_) {
		if(default_ == null) {
			default_ = 0;
		}
		return this._loadWidth(data,default_,"x");
	}
	,_loadY: function(data,default_) {
		if(default_ == null) {
			default_ = 0;
		}
		return this._loadHeight(data,default_,"y");
	}
	,_loadScale: function(data,default_,str) {
		if(str == null) {
			str = "scale";
		}
		if(default_ == null) {
			default_ = 1.0;
		}
		return this._loadHeight(data,default_,str,"none");
	}
	,_loadScaleX: function(data,default_) {
		if(default_ == null) {
			default_ = 1.0;
		}
		return this._loadWidth(data,default_,"scale_x","none");
	}
	,_loadScaleY: function(data,default_) {
		if(default_ == null) {
			default_ = 1.0;
		}
		return this._loadHeight(data,default_,"scale_y","none");
	}
	,_loadWidth: function(data,default_,str,defaultRound) {
		if(defaultRound == null) {
			defaultRound = "";
		}
		if(str == null) {
			str = "width";
		}
		if(default_ == null) {
			default_ = 10;
		}
		var ws = flixel_addons_ui_U.xml_str(data.x,str,true,default_ == null ? "null" : "" + default_);
		var round = this.getRound(data,defaultRound);
		return this.doRound(this._getDataSize("w",ws,default_),round);
	}
	,_loadHeight: function(data,default_,str,defaultRound) {
		if(defaultRound == null) {
			defaultRound = "";
		}
		if(str == null) {
			str = "height";
		}
		if(default_ == null) {
			default_ = 10;
		}
		var hs = flixel_addons_ui_U.xml_str(data.x,str,true,default_ == null ? "null" : "" + default_);
		var round = this.getRound(data,defaultRound);
		return this.doRound(this._getDataSize("h",hs,default_),round);
	}
	,_loadCompass: function(data,str) {
		if(str == null) {
			str = "resize_point";
		}
		var cs = flixel_addons_ui_U.xml_str(data.x,str,true,"nw");
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		switch(cs) {
		case "c":case "center":case "m":case "mid":
			point.set_x(0.5);
			point.set_y(0.5);
			break;
		case "ll":case "sw":
			point.set_x(0);
			point.set_y(1);
			break;
		case "n":case "u":
			point.set_x(0.5);
			point.set_y(0);
			break;
		case "nw":case "ul":
			point.set_x(0);
			point.set_y(0);
			break;
		case "e":case "r":
			point.set_x(1);
			point.set_y(0.5);
			break;
		case "s":
			point.set_x(0.5);
			point.set_y(1);
			break;
		case "lr":case "se":
			point.set_x(1);
			point.set_y(1);
			break;
		case "ne":case "ur":
			point.set_x(1);
			point.set_y(0);
			break;
		case "w":
			point.set_x(0.5);
			point.set_y(0);
			break;
		}
		return point;
	}
	,_changeParamsThing: function(data) {
		var thing = this.getAsset(flixel_addons_ui_U.xml_name(data.x));
		if(thing == null) {
			return;
		}
		if(!js_Boot.__instanceof(thing,flixel_addons_ui_interfaces_IHasParams)) {
			return;
		}
		var ihp = thing;
		var params = null;
		if(data.hasNode.resolve("param")) {
			params = [];
			var _g_head = data.nodes.resolve("param").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				if(val.has.resolve("type") && val.has.resolve("value")) {
					var type = val.att.resolve("type");
					type = type.toLowerCase();
					var valueStr = val.att.resolve("value");
					var value = valueStr;
					var sort = flixel_addons_ui_U.xml_i(val.x,"sort",-1);
					switch(type) {
					case "bool":case "boolean":
						var str = new String(valueStr);
						str = str.toLowerCase();
						if(str == "true" || str == "1") {
							value = true;
						} else {
							value = false;
						}
						break;
					case "color":case "hex":
						var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(valueStr);
						if(return_val == null) {
							throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + valueStr);
						}
						value = return_val;
						break;
					case "float":
						value = parseFloat(valueStr);
						break;
					case "int":
						value = Std.parseInt(valueStr);
						break;
					case "string":
						value = new String(valueStr);
						break;
					}
					params.push({ sort : sort, value : value});
				}
			}
			params.sort(flixel_addons_ui_FlxUI.sortParams);
			var _g1 = 0;
			var _g = params.length;
			while(_g1 < _g) {
				var i = _g1++;
				params[i] = params[i].value;
			}
		}
		ihp.set_params(params);
	}
	,_changeThing: function(data) {
		var thing = this.getAsset(flixel_addons_ui_U.xml_name(data.x));
		if(thing == null) {
			return;
		}
		var new_width = -1;
		var new_height = -1;
		var context = "";
		var code = "";
		var attribute = data.x.attributes();
		while(attribute.hasNext()) switch(attribute.next()) {
		case "height":
			new_height = this._loadHeight(data);
			break;
		case "label":
			var label = flixel_addons_ui_U.xml_str(data.x,"label");
			context = flixel_addons_ui_U.xml_str(data.x,"context",true,"ui");
			code = flixel_addons_ui_U.xml_str(data.x,"code",true,"");
			label = this.getText(label,context,true,code);
			if(js_Boot.__instanceof(thing,flixel_addons_ui_interfaces_ILabeled)) {
				thing.getLabel().set_text(label);
			}
			break;
		case "text":
			if(js_Boot.__instanceof(thing,flixel_addons_ui_FlxUIText)) {
				var text = flixel_addons_ui_U.xml_str(data.x,"text");
				context = flixel_addons_ui_U.xml_str(data.x,"context",true,"ui");
				code = flixel_addons_ui_U.xml_str(data.x,"code",true,"");
				thing.set_text(this.getText(text,context,true,code));
			}
			break;
		case "width":
			new_width = this._loadWidth(data);
			break;
		}
		if(js_Boot.__instanceof(thing,flixel_addons_ui_interfaces_IResizable)) {
			var ir = thing;
			if(new_width != -1 || new_height != -1) {
				if(new_width == -1) {
					new_width = ir.get_width();
				}
				if(new_height == -1) {
					new_height = ir.get_height();
				}
				ir.resize(new_width,new_height);
			}
		}
		if(data.hasNode.resolve("param")) {
			if(js_Boot.__instanceof(thing,flixel_addons_ui_interfaces_IHasParams)) {
				var ihp = thing;
				var params = null;
				if(data.hasNode.resolve("param")) {
					params = [];
					var _g_head = data.nodes.resolve("param").h;
					while(_g_head != null) {
						var val = _g_head.item;
						_g_head = _g_head.next;
						if(val.has.resolve("type") && val.has.resolve("value")) {
							var type = val.att.resolve("type");
							type = type.toLowerCase();
							var valueStr = val.att.resolve("value");
							var value = valueStr;
							var sort = flixel_addons_ui_U.xml_i(val.x,"sort",-1);
							switch(type) {
							case "bool":case "boolean":
								var str = new String(valueStr);
								str = str.toLowerCase();
								if(str == "true" || str == "1") {
									value = true;
								} else {
									value = false;
								}
								break;
							case "color":case "hex":
								var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(valueStr);
								if(return_val == null) {
									throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + valueStr);
								}
								value = return_val;
								break;
							case "float":
								value = parseFloat(valueStr);
								break;
							case "int":
								value = Std.parseInt(valueStr);
								break;
							case "string":
								value = new String(valueStr);
								break;
							}
							params.push({ sort : sort, value : value});
						}
					}
					params.sort(flixel_addons_ui_FlxUI.sortParams);
					var _g1 = 0;
					var _g = params.length;
					while(_g1 < _g) {
						var i = _g1++;
						params[i] = params[i].value;
					}
				}
				ihp.set_params(params);
			}
		}
	}
	,_alignThing: function(data,suppressError) {
		if(suppressError == null) {
			suppressError = false;
		}
		if(data.hasNode.resolve("objects")) {
			var _g_head = data.nodes.resolve("objects").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				var objects = flixel_addons_ui_U.xml_str(val.x,"value",true,"").split(",");
				var axis = flixel_addons_ui_U.xml_str(data.x,"axis",true);
				if(axis != "horizontal" && axis != "vertical") {
					throw new js__$Boot_HaxeError(new openfl_errors_Error("FlxUI._alignThing(): axis must be \"horizontal\" or \"vertical\"!"));
				}
				var spacing = -1;
				if(axis == "horizontal") {
					spacing = this._getDataSize("w",flixel_addons_ui_U.xml_str(data.x,"spacing",true),-1);
				} else {
					spacing = this._getDataSize("h",flixel_addons_ui_U.xml_str(data.x,"spacing",true),-1);
				}
				var resize = flixel_addons_ui_U.xml_bool(data.x,"resize");
				var grow = flixel_addons_ui_U.xml_bool(data.x,"grow",true);
				var shrink = flixel_addons_ui_U.xml_bool(data.x,"shrink",true);
				var point = flixel_math_FlxPoint._pool.get().set(-1,-1);
				point._inPool = false;
				var boundsError = "";
				if(data.hasNode.resolve("bounds")) {
					if(axis == "horizontal") {
						point.set_x(this._getDataSize("w",flixel_addons_ui_U.xml_str(data.node.resolve("bounds").x,"left"),-1));
						point.set_y(this._getDataSize("w",flixel_addons_ui_U.xml_str(data.node.resolve("bounds").x,"right"),-1));
					} else if(axis == "vertical") {
						point.set_x(this._getDataSize("h",flixel_addons_ui_U.xml_str(data.node.resolve("bounds").x,"top"),-1));
						point.set_y(this._getDataSize("h",flixel_addons_ui_U.xml_str(data.node.resolve("bounds").x,"bottom"),-1));
					}
				}
				if(point.x != -1 && point.y != -1) {
					if(point.y <= point.x) {
						boundsError = "bounds max must be > bounds min! (max=" + point.y + " min=" + point.x + ")";
					}
				} else {
					boundsError = "missing bound!";
				}
				if(boundsError == "") {
					this._doAlign(objects,axis,spacing,resize,point,grow,shrink);
				}
				if(data.hasNode.resolve("anchor") || data.has.resolve("x") || data.has.resolve("y")) {
					var _g = 0;
					while(_g < objects.length) {
						var object = objects[_g];
						++_g;
						this._loadPosition(data,this.getAsset(object));
					}
				}
			}
		} else {
			throw new js__$Boot_HaxeError(new openfl_errors_Error("FlxUI._alignThing(): <objects> node not found!"));
		}
	}
	,_doAlign: function(objects,axis,spacing,resize,bounds,allowGrow,allowShrink) {
		if(allowShrink == null) {
			allowShrink = true;
		}
		if(allowGrow == null) {
			allowGrow = true;
		}
		var total_spacing = 0;
		var total_size = 0;
		var bound_range = bounds.y - bounds.x;
		var spaces = objects.length - 1;
		var space_size = 0;
		var object_size = 0;
		var size_prop = "width";
		var pos_prop = "x";
		if(axis == "vertical") {
			size_prop = "height";
			pos_prop = "y";
		}
		var _g = 0;
		while(_g < objects.length) {
			var nameStr = objects[_g];
			++_g;
			var widget = this.getAsset(nameStr);
			if(widget != null) {
				var theval = 0;
				switch(size_prop) {
				case "height":
					theval = widget.get_height();
					break;
				case "width":
					theval = widget.get_width();
					break;
				}
				total_size += theval;
			}
		}
		if(resize == false) {
			total_spacing = bound_range - total_size;
			space_size = total_spacing / spaces;
		} else {
			space_size = spacing;
			total_spacing = spacing * spaces;
			object_size = (bound_range - total_spacing) / objects.length;
		}
		object_size = object_size | 0;
		space_size = space_size | 0;
		var last_pos = bounds.x;
		var _g1 = 0;
		while(_g1 < objects.length) {
			var nameStr1 = objects[_g1];
			++_g1;
			var widget1 = this.getAsset(nameStr1);
			if(widget1 != null) {
				var pos = last_pos;
				if(!resize) {
					switch(size_prop) {
					case "height":
						object_size = widget1.get_height();
						break;
					case "width":
						object_size = widget1.get_width();
						break;
					}
				} else if(js_Boot.__instanceof(widget1,flixel_addons_ui_interfaces_IResizable)) {
					var allow = true;
					var widgetr = widget1;
					if(axis == "vertical") {
						if(object_size > widgetr.get_width()) {
							allow = allowGrow;
						} else if(object_size < widgetr.get_width()) {
							allow = allowShrink;
						}
						if(allow) {
							widgetr.resize(widgetr.get_width(),object_size);
						}
					} else if(axis == "horizontal") {
						if(object_size > widgetr.get_height()) {
							allow = allowGrow;
						} else if(object_size < widgetr.get_height()) {
							allow = allowShrink;
						}
						if(allow) {
							widgetr.resize(object_size,widgetr.get_height());
						}
					}
				}
				last_pos = pos + object_size + space_size;
				switch(pos_prop) {
				case "x":
					widget1.set_x(pos);
					break;
				case "y":
					widget1.set_y(pos);
					break;
				}
			}
		}
	}
	,_checkFailure: function(data) {
		var target = flixel_addons_ui_U.xml_str(data.x,"target",true);
		var property = flixel_addons_ui_U.xml_str(data.x,"property",true);
		var compare = flixel_addons_ui_U.xml_str(data.x,"compare",true);
		var value = flixel_addons_ui_U.xml_str(data.x,"value",true);
		var thing = this.getAsset(target);
		if(thing == null) {
			return false;
		}
		var prop_f = 0;
		var val_f = 0;
		var p = flixel_addons_ui_U.perc_to_float(value);
		switch(property) {
		case "h":case "height":
			prop_f = thing.get_height();
			break;
		case "w":case "width":
			prop_f = thing.get_width();
			break;
		}
		if(isNaN(p)) {
			if(flixel_addons_ui_U.isStrNum(value)) {
				val_f = parseFloat(value);
			} else {
				return false;
			}
		} else {
			switch(property) {
			case "h":case "height":
				val_f = p * this.screenHeight();
				break;
			case "w":case "width":
				val_f = p * this.screenWidth();
				break;
			}
		}
		var return_val = false;
		switch(compare) {
		case "<":
			if(prop_f < val_f) {
				this.failed_by = val_f - prop_f;
				return_val = true;
			}
			break;
		case "<=":
			if(prop_f <= val_f) {
				this.failed_by = val_f - prop_f;
				return_val = true;
			}
			break;
		case "=":case "==":
			if(prop_f == val_f) {
				this.failed_by = Math.abs(prop_f - val_f);
				return_val = true;
			}
			break;
		case ">":
			if(prop_f > val_f) {
				this.failed_by = prop_f - val_f;
				return_val = true;
			}
			break;
		case ">=":
			if(prop_f >= val_f) {
				this.failed_by = prop_f - val_f;
				return_val = true;
			}
			break;
		}
		return return_val;
	}
	,_resizeThing: function(fo_r,bounds) {
		var do_resize = false;
		var ww = fo_r.get_width();
		var hh = fo_r.get_height();
		if(ww < bounds.min_width) {
			do_resize = true;
			ww = bounds.min_width;
		} else if(ww > bounds.max_width) {
			do_resize = true;
			ww = bounds.max_width;
		}
		if(hh < bounds.min_height) {
			do_resize = true;
			hh = bounds.min_height;
		} else if(hh > bounds.max_height) {
			do_resize = true;
			hh = bounds.max_height;
		}
		if(do_resize) {
			fo_r.resize(ww,hh);
		}
	}
	,_postLoadThing: function(type,data) {
		if(type == "load_if") {
			if(this._loadTest(data)) {
				if(data.x.firstElement() != null) {
					var subNode = data.x.elements();
					while(subNode.hasNext()) {
						var subNode1 = subNode.next();
						if(subNode1.nodeType != Xml.Element) {
							throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + subNode1.nodeType);
						}
						this._postLoadThing(subNode1.nodeName.toLowerCase(),new haxe_xml_Fast(subNode1));
					}
				}
			}
			return;
		}
		if(this._loadTest(data) == false) {
			return;
		}
		var name = flixel_addons_ui_U.xml_name(data.x);
		var thing = this.getAsset(name);
		var isGroup = type == "group";
		if(isGroup) {
			thing = this.getGroup(name);
		}
		if(type == "align") {
			this._alignThing(data);
		}
		if(type == "change") {
			this._changeThing(data);
		}
		if(type == "position") {
			this._loadPosition(data,thing);
			return;
		}
		if(type == "cursor") {
			this._loadCursor(data);
		}
		if(thing == null && !isGroup) {
			return;
		}
		if(!isGroup) {
			var use_def = flixel_addons_ui_U.xml_str(data.x,"use_def",true);
			if(use_def != "") {
				this.getDefinition(use_def);
			}
			if(js_Boot.__instanceof(thing,flixel_addons_ui_interfaces_IResizable)) {
				var ww = this._getDataSize("w",flixel_addons_ui_U.xml_str(data.x,"width"));
				var hh = this._getDataSize("h",flixel_addons_ui_U.xml_str(data.x,"height"));
				if(ww == 0 || ww == thing.get_width()) {
					ww = null;
				}
				if(hh == 0 || hh == thing.get_height()) {
					hh = null;
				}
				var bounds = this.calcMaxMinSize(data);
				if(bounds != null) {
					if(ww != null) {
						if(ww < bounds.min_width) {
							ww = bounds.min_width;
						}
						if(ww > bounds.max_width) {
							ww = bounds.max_width;
						}
						bounds.min_width = bounds.max_width = ww;
					}
					if(hh != null) {
						if(hh < bounds.min_height) {
							hh = bounds.min_height;
						}
						if(hh > bounds.max_height) {
							hh = bounds.max_height;
						}
						bounds.min_height = bounds.max_height = hh;
					}
					this._resizeThing(js_Boot.__cast(thing , flixel_addons_ui_interfaces_IResizable),bounds);
				}
			}
			var Y = -thing.y;
			var _g = thing;
			_g.set_x(_g.x + -thing.x);
			var _g1 = thing;
			_g1.set_y(_g1.y + Y);
			this._loadPosition(data,thing);
		}
		var send_to = flixel_addons_ui_U.xml_str(data.x,"send_to",true,"");
		if(send_to != "") {
			switch(send_to) {
			case "back":case "bottom":
				this._sendTo(thing,-1);
				break;
			case "front":case "top":
				this._sendTo(thing,1);
				break;
			}
		}
		if(!isGroup && js_Boot.__instanceof(thing,flixel_addons_ui_FlxUI)) {
			var fui_thing = thing;
			if(fui_thing._postLoaded == false) {
				fui_thing.getEvent("post_load",this,null);
			}
		}
	}
	,_loadTileTest: function(data) {
		var tiles_w = flixel_addons_ui_U.xml_i(data.x,"tiles_w",2);
		var tiles_h = flixel_addons_ui_U.xml_i(data.x,"tiles_h",2);
		var w = this._loadWidth(data);
		var h = this._loadHeight(data);
		var bounds = this.calcMaxMinSize(data);
		if(w < bounds.min_width) {
			w = bounds.min_width;
		}
		if(h < bounds.min_height) {
			h = bounds.min_height;
		}
		var tileWidth = w / tiles_w | 0;
		var tileHeight = h / tiles_h | 0;
		if(tileWidth < tileHeight) {
			tileHeight = tileWidth;
		} else if(tileHeight < tileWidth) {
			tileWidth = tileHeight;
		}
		if(tileWidth * tiles_w > bounds.max_width) {
			tileWidth = bounds.max_width / tiles_w | 0;
		}
		if(tileHeight * tiles_h > bounds.max_height) {
			tileHeight = bounds.max_height / tiles_h | 0;
		}
		if(tileWidth < tileHeight) {
			tileHeight = tileWidth;
		} else if(tileHeight < tileWidth) {
			tileWidth = tileHeight;
		}
		if(tileWidth < 2) {
			tileWidth = 2;
		}
		if(tileHeight < 2) {
			tileHeight = 2;
		}
		var color1 = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(flixel_addons_ui_U.xml_str(data.x,"color1",true,"0x808080"));
		var color2 = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(flixel_addons_ui_U.xml_str(data.x,"color2",true,"0xc4c4c4"));
		var baseTileSize = flixel_addons_ui_U.xml_i(data.x,"base_tile_size",-1);
		var ftt = new flixel_addons_ui_FlxUITileTest(0,0,tileWidth,tileHeight,tiles_w,tiles_h,color1,color2,flixel_addons_ui_U.xml_bool(data.x,"floor_to_even",false));
		ftt.baseTileSize = baseTileSize;
		return ftt;
	}
	,_loadString: function(data,attributeName) {
		var string = flixel_addons_ui_U.xml_str(data.x,attributeName);
		string = this.getText(string,flixel_addons_ui_U.xml_str(data.x,"context",true,"ui"),true,flixel_addons_ui_U.xml_str(data.x,"code",true,""));
		return string;
	}
	,_loadText: function(data) {
		var text = flixel_addons_ui_U.xml_str(data.x,"text");
		text = this.getText(text,flixel_addons_ui_U.xml_str(data.x,"context",true,"ui"),true,flixel_addons_ui_U.xml_str(data.x,"code",true,""));
		var W = this._loadWidth(data,100) | 0;
		var H = this._loadHeight(data,-1) | 0;
		var the_font = this._loadFontFace(data);
		if(flixel_addons_ui_U.xml_bool(data.x,"input")) {
			throw new js__$Boot_HaxeError(new openfl_errors_Error("FlxUI._loadText(): <text> with input has been deprecated. Use <input_text> instead."));
		}
		var align = flixel_addons_ui_U.xml_str(data.x,"align");
		if(align == "") {
			align = null;
		}
		var size = this._loadHeight(data,8,"size","floor") | 0;
		var color = this._loadColor(data);
		var border = this._loadBorder(data);
		var ft;
		var ftu = new flixel_addons_ui_FlxUIText(0,0,W,text,size);
		ftu.setFormat(the_font,size,color,align);
		border.apply(ftu);
		ftu.drawFrame();
		ft = ftu;
		if(data.hasNode.resolve("param")) {
			var params = null;
			if(data.hasNode.resolve("param")) {
				params = [];
				var _g_head = data.nodes.resolve("param").h;
				while(_g_head != null) {
					var val = _g_head.item;
					_g_head = _g_head.next;
					if(val.has.resolve("type") && val.has.resolve("value")) {
						var type = val.att.resolve("type");
						type = type.toLowerCase();
						var valueStr = val.att.resolve("value");
						var value = valueStr;
						var sort = flixel_addons_ui_U.xml_i(val.x,"sort",-1);
						switch(type) {
						case "bool":case "boolean":
							var str = new String(valueStr);
							str = str.toLowerCase();
							if(str == "true" || str == "1") {
								value = true;
							} else {
								value = false;
							}
							break;
						case "color":case "hex":
							var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(valueStr);
							if(return_val == null) {
								throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + valueStr);
							}
							value = return_val;
							break;
						case "float":
							value = parseFloat(valueStr);
							break;
						case "int":
							value = Std.parseInt(valueStr);
							break;
						case "string":
							value = new String(valueStr);
							break;
						}
						params.push({ sort : sort, value : value});
					}
				}
				params.sort(flixel_addons_ui_FlxUI.sortParams);
				var _g1 = 0;
				var _g = params.length;
				while(_g1 < _g) {
					var i = _g1++;
					params[i] = params[i].value;
				}
			}
			ft.set_params(params);
		}
		if(H > 0 && ft.get_height() != H) {
			if(js_Boot.__instanceof(ft,flixel_addons_ui_interfaces_IResizable)) {
				var r = ft;
				r.resize(r.get_width(),H);
			}
		}
		ftu.set_text(" ");
		ftu.set_text(text);
		return ft;
	}
	,_loadInputText: function(data) {
		var text = flixel_addons_ui_U.xml_str(data.x,"text");
		text = this.getText(text,flixel_addons_ui_U.xml_str(data.x,"context",true,"ui"),true,flixel_addons_ui_U.xml_str(data.x,"code",true,""));
		var W = this._loadWidth(data,100) | 0;
		var H = this._loadHeight(data,-1) | 0;
		var the_font = this._loadFontFace(data);
		var align = flixel_addons_ui_U.xml_str(data.x,"align");
		if(align == "") {
			align = null;
		}
		var size = this._loadHeight(data,8,"size") | 0;
		var color = this._loadColor(data);
		var border = this._loadBorder(data);
		var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(flixel_addons_ui_U.xml_str(data.x,"background",true,"0x00000000"));
		if(return_val == null) {
			return_val = 0;
		}
		var passwordMode = flixel_addons_ui_U.xml_bool(data.x,"password_mode");
		var ft;
		var fti = new flixel_addons_ui_FlxUIInputText(0,0,W,text,size,color,return_val);
		fti.set_passwordMode(passwordMode);
		var forceCase;
		switch(flixel_addons_ui_U.xml_str(data.x,"force_case",true,"")) {
		case "lower":case "lower_case":case "lowercase":
			forceCase = 2;
			break;
		case "l":case "u":
			throw new js__$Boot_HaxeError(new openfl_errors_Error("FlxUI._loadInputText(): 1 letter values have been deprecated (force_case attribute)."));
			break;
		case "upper":case "upper_case":case "uppercase":
			forceCase = 1;
			break;
		default:
			forceCase = 0;
		}
		var filter = flixel_addons_ui_U.xml_str(data.x,"filter",true,"");
		var filterMode;
		while(filter.indexOf("_") != -1) filter = StringTools.replace(filter,"_","");
		switch(filter) {
		case "a":case "an":case "n":
			throw new js__$Boot_HaxeError(new openfl_errors_Error("FlxUI._loadInputText(): 1 letter values have been deprecated (filter attribute)."));
			break;
		case "alpha":case "onlyalpha":
			filterMode = 1;
			break;
		case "alphanum":case "alphanumeric":case "onlyalphanumeric":
			filterMode = 3;
			break;
		case "num":case "numeric":case "onlynumeric":
			filterMode = 2;
			break;
		default:
			filterMode = 0;
		}
		fti.setFormat(the_font,size,color,align);
		fti.set_forceCase(forceCase);
		fti.set_filterMode(filterMode);
		border.apply(fti);
		fti.drawFrame();
		ft = fti;
		if(data.hasNode.resolve("param")) {
			var params = null;
			if(data.hasNode.resolve("param")) {
				params = [];
				var _g_head = data.nodes.resolve("param").h;
				while(_g_head != null) {
					var val = _g_head.item;
					_g_head = _g_head.next;
					if(val.has.resolve("type") && val.has.resolve("value")) {
						var type = val.att.resolve("type");
						type = type.toLowerCase();
						var valueStr = val.att.resolve("value");
						var value = valueStr;
						var sort = flixel_addons_ui_U.xml_i(val.x,"sort",-1);
						switch(type) {
						case "bool":case "boolean":
							var str = new String(valueStr);
							str = str.toLowerCase();
							if(str == "true" || str == "1") {
								value = true;
							} else {
								value = false;
							}
							break;
						case "color":case "hex":
							var return_val1 = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(valueStr);
							if(return_val1 == null) {
								throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + valueStr);
							}
							value = return_val1;
							break;
						case "float":
							value = parseFloat(valueStr);
							break;
						case "int":
							value = Std.parseInt(valueStr);
							break;
						case "string":
							value = new String(valueStr);
							break;
						}
						params.push({ sort : sort, value : value});
					}
				}
				params.sort(flixel_addons_ui_FlxUI.sortParams);
				var _g1 = 0;
				var _g = params.length;
				while(_g1 < _g) {
					var i = _g1++;
					params[i] = params[i].value;
				}
			}
			ft.set_params(params);
		}
		if(H > 0 && ft.get_height() != H) {
			if(js_Boot.__instanceof(ft,flixel_addons_ui_interfaces_IResizable)) {
				var r = ft;
				r.resize(r.get_width(),H);
			}
		}
		return ft;
	}
	,_loadRadioGroup: function(data) {
		var frg = null;
		var dot_src = flixel_addons_ui_U.xml_str(data.x,"dot_src",true);
		var radio_src = flixel_addons_ui_U.xml_str(data.x,"radio_src",true);
		var labels = [];
		var names = [];
		var W = this._loadWidth(data,11,"radio_width");
		var H = this._loadHeight(data,11,"radio_height");
		var scrollH = this._loadHeight(data,0,"height");
		var scrollW = this._loadHeight(data,0,"width");
		var labelW = this._loadWidth(data,100,"label_width");
		var _g_head = data.nodes.resolve("radio").h;
		while(_g_head != null) {
			var val = _g_head.item;
			_g_head = _g_head.next;
			var name = flixel_addons_ui_U.xml_name(val.x);
			var label = flixel_addons_ui_U.xml_str(val.x,"label");
			label = this.getText(label,flixel_addons_ui_U.xml_str(val.x,"context",true,"ui"),true,flixel_addons_ui_U.xml_str(val.x,"code",true,""));
			names.push(name);
			labels.push(label);
		}
		names.reverse();
		labels.reverse();
		var y_space = this._loadHeight(data,25,"y_space");
		var params = null;
		if(data.hasNode.resolve("param")) {
			params = [];
			var _g_head1 = data.nodes.resolve("param").h;
			while(_g_head1 != null) {
				var val1 = _g_head1.item;
				_g_head1 = _g_head1.next;
				if(val1.has.resolve("type") && val1.has.resolve("value")) {
					var type = val1.att.resolve("type");
					type = type.toLowerCase();
					var valueStr = val1.att.resolve("value");
					var value = valueStr;
					var sort = flixel_addons_ui_U.xml_i(val1.x,"sort",-1);
					switch(type) {
					case "bool":case "boolean":
						var str = new String(valueStr);
						str = str.toLowerCase();
						if(str == "true" || str == "1") {
							value = true;
						} else {
							value = false;
						}
						break;
					case "color":case "hex":
						var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(valueStr);
						if(return_val == null) {
							throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + valueStr);
						}
						value = return_val;
						break;
					case "float":
						value = parseFloat(valueStr);
						break;
					case "int":
						value = Std.parseInt(valueStr);
						break;
					case "string":
						value = new String(valueStr);
						break;
					}
					params.push({ sort : sort, value : value});
				}
			}
			params.sort(flixel_addons_ui_FlxUI.sortParams);
			var _g1 = 0;
			var _g = params.length;
			while(_g1 < _g) {
				var i = _g1++;
				params[i] = params[i].value;
			}
		}
		var params1 = params;
		var radio_asset = null;
		if(radio_src != "") {
			radio_asset = flixel_addons_ui_U.gfx(radio_src);
		} else if(data.hasNode.resolve("box")) {
			if(flixel_addons_ui_U.xml_str(data.node.resolve("box").x,"slice9") != "") {
				radio_asset = this._load9SliceSprite(data.node.resolve("box"));
			} else {
				radio_asset = this._loadSprite(data.node.resolve("box"));
			}
		}
		var dot_asset = null;
		if(dot_src != "") {
			dot_asset = flixel_addons_ui_U.gfx(dot_src);
		} else if(data.hasNode.resolve("dot")) {
			if(flixel_addons_ui_U.xml_str(data.node.resolve("dot").x,"slice9") != "") {
				dot_asset = this._load9SliceSprite(data.node.resolve("dot"));
			} else {
				dot_asset = this._loadSprite(data.node.resolve("dot"));
			}
		}
		var prevOffset = null;
		var nextOffset = null;
		if(data.hasNode.resolve("button")) {
			var _g_head2 = data.nodes.resolve("button").h;
			while(_g_head2 != null) {
				var val2 = _g_head2.item;
				_g_head2 = _g_head2.next;
				var name1 = flixel_addons_ui_U.xml_name(val2.x);
				if(name1 == "previous" || name1 == "prev") {
					var X = flixel_addons_ui_U.xml_f(val2.x,"x");
					var Y = flixel_addons_ui_U.xml_f(val2.x,"y");
					var point = flixel_math_FlxPoint._pool.get().set(X,Y);
					point._inPool = false;
					prevOffset = point;
				} else if(name1 == "next") {
					var X1 = flixel_addons_ui_U.xml_f(val2.x,"x");
					var Y1 = flixel_addons_ui_U.xml_f(val2.x,"y");
					var point1 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
					point1._inPool = false;
					nextOffset = point1;
				}
			}
		}
		frg = new flixel_addons_ui_FlxUIRadioGroup(0,0,names,labels,null,y_space,W,H,labelW,null,prevOffset,nextOffset);
		frg.set_params(params1);
		if(radio_asset != "" && radio_asset != null) {
			frg.loadGraphics(radio_asset,dot_asset);
		}
		var text_x = this._loadWidth(data,0,"text_x") | 0;
		var text_y = this._loadHeight(data,0,"text_y") | 0;
		var radios = frg.getRadios();
		var styleSet = false;
		var radioList = data.x.elementsNamed("radio");
		var radioNode = null;
		var _g11 = 0;
		var _g2 = radios.length;
		while(_g11 < _g2) {
			var fo = radios[radios.length - 1 - _g11++];
			if(radioList.hasNext()) {
				radioNode = radioList.next();
			} else {
				radioNode = null;
			}
			if(fo != null) {
				if(js_Boot.__instanceof(fo,flixel_addons_ui_FlxUICheckBox)) {
					var fc = js_Boot.__cast(fo , flixel_addons_ui_FlxUICheckBox);
					var t = this.formatButtonText(data,fc);
					if(t != null && styleSet == false) {
						frg.set_activeStyle(new flixel_addons_ui_CheckStyle(16777215,flixel_addons_ui_FontDef.copyFromFlxText(t),flixel_text__$FlxText_FlxTextAlign_$Impl_$.fromOpenFL(t._defaultFormat.align),t.color,new flixel_addons_ui_BorderDef(t.borderStyle,t.borderColor,t.borderSize,t.borderQuality)));
						styleSet = true;
					}
					fc.set_textX(text_x);
					fc.set_textY(text_y);
					if(radioNode != null) {
						this._loadTooltip(fc,new haxe_xml_Fast(radioNode));
					}
				}
			}
		}
		if(scrollW != 0) {
			frg.fixedSize = true;
			frg.set_width(scrollW);
		}
		if(scrollH != 0) {
			frg.fixedSize = true;
			frg.set_height(scrollH);
		}
		return frg;
	}
	,_loadCheckBox: function(data) {
		var fc = null;
		var label = flixel_addons_ui_U.xml_str(data.x,"label");
		var context = flixel_addons_ui_U.xml_str(data.x,"context",true,"ui");
		var code = flixel_addons_ui_U.xml_str(data.x,"code",true,"");
		var checked = flixel_addons_ui_U.xml_bool(data.x,"checked",false);
		label = this.getText(label,context,true,code);
		var labelW = this._loadWidth(data,100,"label_width");
		var check_src = flixel_addons_ui_U.xml_str(data.x,"check_src",true);
		var box_src = flixel_addons_ui_U.xml_str(data.x,"box_src",true);
		var params = null;
		if(data.hasNode.resolve("param")) {
			params = [];
			var _g_head = data.nodes.resolve("param").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				if(val.has.resolve("type") && val.has.resolve("value")) {
					var type = val.att.resolve("type");
					type = type.toLowerCase();
					var valueStr = val.att.resolve("value");
					var value = valueStr;
					var sort = flixel_addons_ui_U.xml_i(val.x,"sort",-1);
					switch(type) {
					case "bool":case "boolean":
						var str = new String(valueStr);
						str = str.toLowerCase();
						if(str == "true" || str == "1") {
							value = true;
						} else {
							value = false;
						}
						break;
					case "color":case "hex":
						var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(valueStr);
						if(return_val == null) {
							throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + valueStr);
						}
						value = return_val;
						break;
					case "float":
						value = parseFloat(valueStr);
						break;
					case "int":
						value = Std.parseInt(valueStr);
						break;
					case "string":
						value = new String(valueStr);
						break;
					}
					params.push({ sort : sort, value : value});
				}
			}
			params.sort(flixel_addons_ui_FlxUI.sortParams);
			var _g1 = 0;
			var _g = params.length;
			while(_g1 < _g) {
				var i = _g1++;
				params[i] = params[i].value;
			}
		}
		var box_asset = null;
		var check_asset = null;
		if(box_src != "") {
			box_asset = flixel_addons_ui_U.gfx(box_src);
		} else if(data.hasNode.resolve("box")) {
			if(flixel_addons_ui_U.xml_str(data.node.resolve("box").x,"slice9") != "") {
				box_asset = this._load9SliceSprite(data.node.resolve("box"));
			} else {
				box_asset = this._loadSprite(data.node.resolve("box"));
			}
		}
		if(check_src != "") {
			check_asset = flixel_addons_ui_U.gfx(check_src);
		} else if(data.hasNode.resolve("check")) {
			if(flixel_addons_ui_U.xml_str(data.node.resolve("check").x,"slice9") != "") {
				check_asset = this._load9SliceSprite(data.node.resolve("check"));
			} else {
				check_asset = this._loadSprite(data.node.resolve("check"));
			}
		}
		fc = new flixel_addons_ui_FlxUICheckBox(0,0,box_asset,check_asset,label,labelW,params);
		this.formatButtonText(data,fc);
		var text_x = this._loadWidth(data,0,"text_x") | 0;
		var text_y = this._loadHeight(data,0,"text_y") | 0;
		fc.set_textX(text_x);
		fc.set_textY(text_y);
		fc.set_text(label);
		fc.set_checked(checked);
		return fc;
	}
	,_loadDropDownMenu: function(data) {
		var fud = null;
		var label = flixel_addons_ui_U.xml_str(data.x,"label");
		label = this.getText(label,flixel_addons_ui_U.xml_str(data.x,"context",true,"ui"),true,flixel_addons_ui_U.xml_str(data.x,"code",true,""));
		var back_def = flixel_addons_ui_U.xml_str(data.x,"back_def",true);
		var panel_def = flixel_addons_ui_U.xml_str(data.x,"panel_def",true);
		var button_def = flixel_addons_ui_U.xml_str(data.x,"button_def",true);
		var label_def = flixel_addons_ui_U.xml_str(data.x,"label_def",true);
		var back_asset = null;
		var panel_asset = null;
		var button_asset = null;
		var label_asset = null;
		if(back_def != "") {
			back_asset = this._loadSprite(this.getDefinition(back_def));
		}
		if(panel_def != "") {
			panel_asset = this._load9SliceSprite(this.getDefinition(panel_def));
		}
		if(button_def != "") {
			try {
				button_asset = this._loadButton(this.getDefinition(button_def),false,false);
			} catch( e ) {
				haxe_CallStack.lastException = e;
				if (e instanceof js__$Boot_HaxeError) e = e.val;
				if( js_Boot.__instanceof(e,openfl_errors_Error) ) {
					button_asset = null;
				} else throw(e);
			}
		}
		if(label_def != "") {
			try {
				label_asset = this._loadText(this.getDefinition(label_def));
			} catch( e1 ) {
				haxe_CallStack.lastException = e1;
				if (e1 instanceof js__$Boot_HaxeError) e1 = e1.val;
				if( js_Boot.__instanceof(e1,openfl_errors_Error) ) {
					label_asset = null;
				} else throw(e1);
			}
			if(label_asset != null && label != "") {
				label_asset.set_text(label);
			}
		}
		var asset_list = null;
		var data_list = null;
		if(data.hasNode.resolve("data")) {
			var _g_head = data.nodes.resolve("data").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				if(data_list == null) {
					data_list = [];
				}
				data_list.push(new flixel_addons_ui_StrNameLabel(flixel_addons_ui_U.xml_str(val.x,"name",true),flixel_addons_ui_U.xml_str(val.x,"label")));
			}
		} else if(data.hasNode.resolve("asset")) {
			var _g_head1 = data.nodes.resolve("asset").h;
			while(_g_head1 != null) {
				var val1 = _g_head1.item;
				_g_head1 = _g_head1.next;
				if(asset_list == null) {
					asset_list = [];
				}
				var def_name = flixel_addons_ui_U.xml_str(val1.x,"def",true);
				var name = flixel_addons_ui_U.xml_name(val1.x);
				var asset = null;
				try {
					asset = this._loadButton(this.getDefinition(def_name),false);
				} catch( e2 ) {
					haxe_CallStack.lastException = e2;
					if (e2 instanceof js__$Boot_HaxeError) e2 = e2.val;
					if( js_Boot.__instanceof(e2,openfl_errors_Error) ) {
					} else throw(e2);
				}
				if(asset != null) {
					asset.name = name;
					if(asset_list == null) {
						asset_list = [];
					}
					asset_list.push(asset);
				}
			}
		}
		fud = new flixel_addons_ui_FlxUIDropDownMenu(0,0,data_list,null,new flixel_addons_ui_FlxUIDropDownHeader(120,back_asset,label_asset,button_asset),panel_asset,asset_list);
		return fud;
	}
	,_loadTest: function(data) {
		var result = true;
		if(data.get_name() == "load_if") {
			result = this._loadTestSub(data);
			if(result == false) {
				return false;
			}
		}
		if(data.hasNode.resolve("load_if")) {
			var _g_head = data.nodes.resolve("load_if").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				var _this = val.x;
				if(_this.nodeType != Xml.Document && _this.nodeType != Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + _this.nodeType);
				}
				if(_this.children[0] == null) {
					result = this._loadTestSub(val);
					if(result == false) {
						return false;
					}
				}
			}
		}
		return result;
	}
	,_loadTestSub: function(node) {
		var matchValue = flixel_addons_ui_U.xml_bool(node.x,"is",true);
		var match = matchValue;
		var aspect_ratio = flixel_addons_ui_U.xml_f(node.x,"aspect_ratio",-1);
		if(aspect_ratio != -1) {
			match = true;
			var screen_ratio = js_Boot.__cast(flixel_FlxG.width , Float) / js_Boot.__cast(flixel_FlxG.height , Float);
			var diff = Math.abs(screen_ratio - aspect_ratio);
			if(node.has.resolve("tolerance")) {
				if(diff > flixel_addons_ui_U.xml_f(node.x,"tolerance",0.1)) {
					match = false;
				}
			} else if(node.has.resolve("tolerance_plus") || node.has.resolve("tolerance_minus")) {
				var tolerance_minus = flixel_addons_ui_U.xml_f(node.x,"tolerance_minus",-1);
				var tolerance_plus = flixel_addons_ui_U.xml_f(node.x,"tolerance_plus",-1);
				if(screen_ratio > aspect_ratio && tolerance_plus != -1) {
					if(diff > tolerance_plus) {
						match = false;
					}
				}
				if(screen_ratio < aspect_ratio && tolerance_minus != -1) {
					if(diff > tolerance_minus) {
						match = false;
					}
				}
			}
			if(match != matchValue) {
				return false;
			}
		}
		var resolution = flixel_addons_ui_U.xml_pt(node.x,"resolution",null);
		if(resolution != null) {
			match = true;
			var toleranceRes = flixel_addons_ui_U.xml_pt(node.x,"tolerance",null);
			if(toleranceRes == null) {
				toleranceRes = new flixel_math_FlxPoint(0,0);
			}
			if(Math.abs(resolution.x - flixel_FlxG.width) > toleranceRes.x || Math.abs(resolution.y - flixel_FlxG.height) > toleranceRes.y) {
				match = false;
			}
			if(match != matchValue) {
				return false;
			}
		}
		var haxeDef = flixel_addons_ui_U.xml_str(node.x,"haxedef",true,"");
		var haxeVal = flixel_addons_ui_U.xml_bool(node.x,"value",true);
		if(haxeDef != "") {
			match = true;
			match = flixel_addons_ui_U.checkHaxedef(haxeDef) == haxeVal;
			if(match != matchValue) {
				return false;
			}
		}
		var variable = flixel_addons_ui_U.xml_str(node.x,"variable",false,"");
		var variableType = flixel_addons_ui_U.xml_str(node.x,"type",true,"string");
		if(variable != "") {
			match = true;
			var varData = this.parseVarValue(variable);
			if(varData != null) {
				match = this.checkVariable(varData.variable,varData.value,variableType,varData.operator);
			}
			if(match != matchValue) {
				return false;
			}
		}
		return true;
	}
	,parseVarValue: function(varString) {
		var arr = ["==","=","!=","!==","<",">","<=",">="];
		var temp;
		var _g = 0;
		while(_g < arr.length) {
			var op = arr[_g];
			++_g;
			if(varString.indexOf(op) != -1) {
				temp = varString.split(op);
				if(temp != null && temp.length == 2) {
					return { variable : temp[0], value : temp[1], operator : op};
				}
			}
		}
		return null;
	}
	,_loadLayout: function(data) {
		var name = flixel_addons_ui_U.xml_str(data.x,"name",true);
		var X = this._loadWidth(data,0,"x");
		var Y = this._loadHeight(data,0,"y");
		var _ui = this.createUI(data);
		_ui.set_x(X);
		_ui.set_y(Y);
		_ui.name = name;
		return _ui;
	}
	,addToCleanup: function(str) {
		if(this._assetsToCleanUp == null) {
			return;
		}
		if(this._assetsToCleanUp.indexOf(str) == -1) {
			this._assetsToCleanUp.push(str);
		}
	}
	,addToScaledAssets: function(str) {
		if(this._scaledAssets != null && this._scaledAssets.indexOf(str) == -1) {
			this._scaledAssets.push(str);
		}
	}
	,cleanup: function() {
		var _g = 0;
		var _g1 = this._assetsToCleanUp;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			flixel_FlxG.bitmap.removeByKey(key);
		}
		this._assetsToCleanUp = null;
		this._scaledAssets = null;
	}
	,createUI: function(data) {
		return new flixel_addons_ui_FlxUI(data,this,this,this._ptr_tongue,this.liveFilePath);
	}
	,_loadTabMenu: function(data) {
		var back_def = this.getDefinition(flixel_addons_ui_U.xml_str(data.x,"back_def"));
		if(back_def == null) {
			back_def = data;
		}
		back_def = flixel_addons_ui_FlxUI.consolidateData(back_def,data);
		var backSprite;
		switch(flixel_addons_ui_U.xml_str(data.x,"back_type",true,"chrome")) {
		case "region":
			backSprite = new flixel_addons_ui_FlxUIRegion();
			break;
		case "sprite":
			backSprite = this._loadSprite(back_def);
			break;
		default:
			backSprite = this._load9SliceSprite(back_def,"tab_menu");
		}
		var tab_def = null;
		var stretch_tabs = flixel_addons_ui_U.xml_bool(data.x,"stretch_tabs",false);
		var stackToggled = "front";
		var stackUntoggled = "back";
		if(data.hasNode.resolve("stacking")) {
			stackToggled = flixel_addons_ui_U.xml_str(data.node.resolve("stacking").x,"toggled",true,"front");
			stackUntoggled = flixel_addons_ui_U.xml_str(data.node.resolve("stacking").x,"untoggled",true,"back");
		}
		var tab_spacing = null;
		if(flixel_addons_ui_U.xml_str(data.x,"spacing",true,"") != "") {
			tab_spacing = this._loadWidth(data,0,"spacing");
		}
		var tab_x = this._loadWidth(data,0,"tab_x");
		var tab_y = this._loadHeight(data,0,"tab_y");
		var point = flixel_math_FlxPoint._pool.get().set(tab_x,tab_y);
		point._inPool = false;
		var tab_def_str = "";
		if(data.hasNode.resolve("tab")) {
			var _g_head = data.nodes.resolve("tab").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				var temp = flixel_addons_ui_U.xml_str(val.x,"use_def");
				if(temp != "") {
					tab_def_str = temp;
				}
			}
			if(tab_def_str != "") {
				tab_def = this.getDefinition(tab_def_str);
			} else {
				tab_def = data.node.resolve("tab");
			}
		}
		var list_tabs = [];
		var name = "";
		if(data.hasNode.resolve("tab")) {
			var _g_head1 = data.nodes.resolve("tab").h;
			while(_g_head1 != null) {
				var val1 = _g_head1.item;
				_g_head1 = _g_head1.next;
				name = flixel_addons_ui_U.xml_name(val1.x);
				if(name != "") {
					var label = flixel_addons_ui_U.xml_str(val1.x,"label");
					var context = flixel_addons_ui_U.xml_str(val1.x,"context",true,"ui");
					var code = flixel_addons_ui_U.xml_str(val1.x,"code",true,"");
					label = this.getText(label,context,true,code);
					label = this.getText(label,context,true,code);
					var tab_info = flixel_addons_ui_FlxUI.consolidateData(val1,tab_def);
					var tab = this._loadButton(tab_info,true,true,"tab_menu");
					tab.name = name;
					list_tabs.push(tab);
					this._loadTooltip(tab,tab_info);
				}
			}
		}
		if(list_tabs.length > 0) {
			if(tab_def == null || !tab_def.hasNode.resolve("text")) {
				var _g = 0;
				while(_g < list_tabs.length) {
					var t = list_tabs[_g];
					++_g;
					if(js_Boot.__instanceof(t,flixel_addons_ui_FlxUITypedButton)) {
						var tb = t;
						tb.label.set_color(16777215);
						if(js_Boot.__instanceof(tb.label,flixel_addons_ui_FlxUIText)) {
							var labelText = tb.label;
							labelText.set_borderStyle(flixel_text_FlxTextBorderStyle.OUTLINE);
							labelText.set_borderColor(0);
							labelText.set_borderSize(1);
							labelText.set_borderQuality(1);
						}
					}
				}
			}
			if(tab_def == null || !tab_def.has.resolve("width")) {
				stretch_tabs = true;
			}
		}
		var fg = new flixel_addons_ui_FlxUITabMenu(backSprite,list_tabs,null,point,stretch_tabs,tab_spacing,[stackToggled,stackUntoggled]);
		if(data.hasNode.resolve("group")) {
			var _g_head2 = data.nodes.resolve("group").h;
			while(_g_head2 != null) {
				var val2 = _g_head2.item;
				_g_head2 = _g_head2.next;
				name = flixel_addons_ui_U.xml_name(val2.x);
				var _ui = new flixel_addons_ui_FlxUI(val2,fg,this,this._ptr_tongue);
				if(list_tabs != null && list_tabs.length > 0) {
					_ui.set_y(_ui.y + list_tabs[0].get_height());
				}
				_ui.name = name;
				fg.addGroup(_ui);
			}
		}
		return fg;
	}
	,_loadNumericStepper: function(data,setCallback) {
		if(setCallback == null) {
			setCallback = true;
		}
		var stepSize = flixel_addons_ui_U.xml_f(data.x,"step",1);
		var defaultValue = flixel_addons_ui_U.xml_f(data.x,"value",0);
		var min = flixel_addons_ui_U.xml_f(data.x,"min",0);
		var max = flixel_addons_ui_U.xml_f(data.x,"max",10);
		var decimals = flixel_addons_ui_U.xml_i(data.x,"decimals",0);
		var percent = flixel_addons_ui_U.xml_bool(data.x,"percent");
		var stack = flixel_addons_ui_U.xml_str(data.x,"stack",true,"");
		if(stack == "") {
			stack = flixel_addons_ui_U.xml_str(data.x,"stacking",true,"");
		}
		stack = stack.toLowerCase();
		var stacking;
		switch(stack) {
		case "h":case "horizontal":case "horz":
			stacking = 1;
			break;
		case "v":case "vert":case "vertical":
			stacking = 0;
			break;
		default:
			stacking = 1;
		}
		var theText = null;
		var buttPlus = null;
		var buttMinus = null;
		if(data.hasNode.resolve("text")) {
			theText = this._loadThing("text",data.node.resolve("text"));
		}
		if(data.hasNode.resolve("plus")) {
			buttPlus = this._loadThing("button",data.node.resolve("plus"));
		}
		if(data.hasNode.resolve("minus")) {
			buttMinus = this._loadThing("button",data.node.resolve("minus"));
		}
		var ns = new flixel_addons_ui_FlxUINumericStepper(0,0,stepSize,defaultValue,min,max,decimals,stacking,theText,buttPlus,buttMinus,percent);
		if(setCallback) {
			var params = null;
			if(data.hasNode.resolve("param")) {
				params = [];
				var _g_head = data.nodes.resolve("param").h;
				while(_g_head != null) {
					var val = _g_head.item;
					_g_head = _g_head.next;
					if(val.has.resolve("type") && val.has.resolve("value")) {
						var type = val.att.resolve("type");
						type = type.toLowerCase();
						var valueStr = val.att.resolve("value");
						var value = valueStr;
						var sort = flixel_addons_ui_U.xml_i(val.x,"sort",-1);
						switch(type) {
						case "bool":case "boolean":
							var str = new String(valueStr);
							str = str.toLowerCase();
							if(str == "true" || str == "1") {
								value = true;
							} else {
								value = false;
							}
							break;
						case "color":case "hex":
							var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(valueStr);
							if(return_val == null) {
								throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + valueStr);
							}
							value = return_val;
							break;
						case "float":
							value = parseFloat(valueStr);
							break;
						case "int":
							value = Std.parseInt(valueStr);
							break;
						case "string":
							value = new String(valueStr);
							break;
						}
						params.push({ sort : sort, value : value});
					}
				}
				params.sort(flixel_addons_ui_FlxUI.sortParams);
				var _g1 = 0;
				var _g = params.length;
				while(_g1 < _g) {
					var i = _g1++;
					params[i] = params[i].value;
				}
			}
			ns.set_params(params);
		}
		return ns;
	}
	,getResizeRatio: function(data,defaultAxis) {
		if(defaultAxis == null) {
			defaultAxis = 1;
		}
		var str = flixel_addons_ui_U.xml_str(data.x,"resize_ratio_x",true);
		if(str == "") {
			str = flixel_addons_ui_U.xml_str(data.x,"resize_ratio_y",true);
			if(str == "") {
				return new flixel_math_FlxPoint(flixel_addons_ui_U.xml_f(data.x,"resize_ratio",-1),defaultAxis);
			} else {
				return new flixel_math_FlxPoint(parseFloat(str),1);
			}
		} else {
			return new flixel_math_FlxPoint(parseFloat(str),0);
		}
	}
	,_loadButton: function(data,setCallback,isToggle,load_code) {
		if(load_code == null) {
			load_code = "";
		}
		if(isToggle == null) {
			isToggle = false;
		}
		if(setCallback == null) {
			setCallback = true;
		}
		var fb = null;
		var color = this._loadColor(data);
		var resize_ratio = flixel_addons_ui_U.xml_f(data.x,"resize_ratio",-1);
		var resize_point = this._loadCompass(data,"resize_point");
		var resize_label = flixel_addons_ui_U.xml_bool(data.x,"resize_label",false);
		var label = flixel_addons_ui_U.xml_str(data.x,"label");
		var sprite = null;
		var toggleSprite = null;
		if(data.hasNode.resolve("sprite")) {
			var _g_head = data.nodes.resolve("sprite").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				if(isToggle && flixel_addons_ui_U.xml_bool(val.x,"toggle")) {
					toggleSprite = this._loadThing("sprite",val);
				} else {
					sprite = this._loadThing("sprite",val);
				}
			}
		}
		label = this.getText(label,flixel_addons_ui_U.xml_str(data.x,"context",true,"ui"),true,flixel_addons_ui_U.xml_str(data.x,"code",true,""));
		var W = this._loadWidth(data,0,"width") | 0;
		var H = this._loadHeight(data,0,"height") | 0;
		var params = null;
		if(data.hasNode.resolve("param")) {
			params = [];
			var _g_head1 = data.nodes.resolve("param").h;
			while(_g_head1 != null) {
				var val1 = _g_head1.item;
				_g_head1 = _g_head1.next;
				if(val1.has.resolve("type") && val1.has.resolve("value")) {
					var type = val1.att.resolve("type");
					type = type.toLowerCase();
					var valueStr = val1.att.resolve("value");
					var value = valueStr;
					var sort = flixel_addons_ui_U.xml_i(val1.x,"sort",-1);
					switch(type) {
					case "bool":case "boolean":
						var str = new String(valueStr);
						str = str.toLowerCase();
						if(str == "true" || str == "1") {
							value = true;
						} else {
							value = false;
						}
						break;
					case "color":case "hex":
						var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(valueStr);
						if(return_val == null) {
							throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + valueStr);
						}
						value = return_val;
						break;
					case "float":
						value = parseFloat(valueStr);
						break;
					case "int":
						value = Std.parseInt(valueStr);
						break;
					case "string":
						value = new String(valueStr);
						break;
					}
					params.push({ sort : sort, value : value});
				}
			}
			params.sort(flixel_addons_ui_FlxUI.sortParams);
			var _g1 = 0;
			var _g = params.length;
			while(_g1 < _g) {
				var i = _g1++;
				params[i] = params[i].value;
			}
		}
		if(sprite == null) {
			fb = new flixel_addons_ui_FlxUIButton(0,0,label,null,data.hasNode.resolve("graphic") == false,false,color);
			fb._autoCleanup = false;
		} else {
			var tempGroup = null;
			if(label != "") {
				var labelTxt = new flixel_addons_ui_FlxUIText(0,0,80,label,8);
				labelTxt.setFormat(null,8,3355443,"center");
				tempGroup = new flixel_group_FlxTypedSpriteGroup();
				tempGroup.add(sprite);
				tempGroup.add(labelTxt);
				fb = new flixel_addons_ui_FlxUISpriteButton(0,0,tempGroup);
			} else {
				fb = new flixel_addons_ui_FlxUISpriteButton(0,0,sprite);
			}
		}
		fb.resize_ratio = resize_ratio;
		fb.resize_point = resize_point;
		fb.autoResizeLabel = resize_label;
		if(setCallback) {
			fb.set_params(params);
		}
		if(data.hasNode.resolve("graphic")) {
			if(flixel_addons_ui_U.xml_bool(data.node.resolve("graphic").x,"blank")) {
				fb.loadGraphicSlice9(["","",""],W,H,null,0,resize_ratio);
			} else {
				var graphic_names = null;
				var slice9_names = null;
				var frames = null;
				if(isToggle) {
					graphic_names = ["","","","","",""];
					slice9_names = [null,null,null,null,null,null];
				} else {
					graphic_names = ["","",""];
					slice9_names = [null,null,null];
				}
				var src_w = flixel_addons_ui_U.xml_i(data.node.resolve("graphic").x,"src_w",0);
				var src_h = flixel_addons_ui_U.xml_i(data.node.resolve("graphic").x,"src_h",0);
				var tile = 0;
				switch(flixel_addons_ui_U.xml_str(data.node.resolve("graphic").x,"tile",true,"")) {
				case "h":case "horizontal":
					tile = 16;
					break;
				case "v":case "vertical":
					tile = 1;
					break;
				case "all":case "both":case "hv":case "true":case "vh":
					tile = 17;
					break;
				}
				var tile1 = tile;
				var frame_str = flixel_addons_ui_U.xml_str(data.node.resolve("graphic").x,"frames",true);
				if(frame_str != "") {
					frames = [];
					var arr = frame_str.split(",");
					var _g2 = 0;
					while(_g2 < arr.length) {
						var numstr = arr[_g2];
						++_g2;
						frames.push(Std.parseInt(numstr));
					}
				}
				var _g_head2 = data.nodes.resolve("graphic").h;
				while(_g_head2 != null) {
					var val2 = _g_head2.item;
					_g_head2 = _g_head2.next;
					var graphic_name = flixel_addons_ui_U.xml_name(val2.x);
					var image = flixel_addons_ui_U.xml_str(val2.x,"image");
					var slice9 = flixel_util_FlxStringUtil.toIntArray(flixel_addons_ui_U.xml_str(val2.x,"slice9"));
					var tile2 = 0;
					switch(flixel_addons_ui_U.xml_str(val2.x,"tile",true,"")) {
					case "h":case "horizontal":
						tile2 = 16;
						break;
					case "v":case "vertical":
						tile2 = 1;
						break;
					case "all":case "both":case "hv":case "true":case "vh":
						tile2 = 17;
						break;
					}
					tile1 = tile2;
					var toggleState = flixel_addons_ui_U.xml_bool(val2.x,"toggle");
					if(toggleState) {
						toggleState = isToggle;
					} else {
						toggleState = false;
					}
					var igfx = flixel_addons_ui_U.gfx(image);
					switch(graphic_name) {
					case "all":
						var tilesTall = isToggle ? 6 : 3;
						var temp = null;
						if(src_h != 0) {
							tilesTall = flixel_addons_ui_U.getBmp(igfx).height / src_h | 0;
						}
						if(image != "") {
							graphic_names = [this.loadScaledSrc(val2,"image","scale_src",1,tilesTall)];
						}
						slice9_names = [this.load9SliceSprite_scaleSub(slice9,val2,graphic_names[0],"image")];
						temp = flixel_addons_ui_U.getBmp(graphic_names[0]);
						src_w = temp.width;
						src_h = temp.height / tilesTall | 0;
						break;
					case "active":case "highlight":case "hilight":case "hover":case "over":
						if(image != "") {
							if(!toggleState) {
								graphic_names[1] = this.loadScaledSrc(val2,"image","scale_src");
							} else {
								graphic_names[4] = this.loadScaledSrc(val2,"image","scale_src");
							}
						}
						if(!toggleState) {
							slice9_names[1] = this.load9SliceSprite_scaleSub(slice9,val2,graphic_names[1],"image");
						} else {
							slice9_names[4] = this.load9SliceSprite_scaleSub(slice9,val2,graphic_names[4],"image");
						}
						break;
					case "down":case "pressed":case "pushed":
						if(image != "") {
							if(!toggleState) {
								graphic_names[2] = this.loadScaledSrc(val2,"image","scale_src");
							} else {
								graphic_names[5] = this.loadScaledSrc(val2,"image","scale_src");
							}
						}
						if(!toggleState) {
							slice9_names[2] = this.load9SliceSprite_scaleSub(slice9,val2,graphic_names[2],"image");
						} else {
							slice9_names[5] = this.load9SliceSprite_scaleSub(slice9,val2,graphic_names[5],"image");
						}
						break;
					case "":case "inactive":case "normal":case "up":
						if(image != "") {
							if(!toggleState) {
								graphic_names[0] = this.loadScaledSrc(val2,"image","scale_src");
							} else {
								graphic_names[3] = this.loadScaledSrc(val2,"image","scale_src");
							}
						}
						if(!toggleState) {
							slice9_names[0] = this.load9SliceSprite_scaleSub(slice9,val2,graphic_names[0],"image");
						} else {
							slice9_names[3] = this.load9SliceSprite_scaleSub(slice9,val2,graphic_names[3],"image");
						}
						break;
					}
					if(graphic_names[0] != "") {
						if(graphic_names.length >= 3) {
							if(graphic_names[1] == "") {
								graphic_names[1] = graphic_names[0];
							}
							if(graphic_names[2] == "") {
								graphic_names[2] = graphic_names[1];
							}
							if(graphic_names.length >= 6) {
								if(graphic_names[3] == "") {
									graphic_names[3] = graphic_names[0];
								}
								if(graphic_names[4] == "") {
									graphic_names[4] = graphic_names[1];
								}
								if(graphic_names[5] == "") {
									graphic_names[5] = graphic_names[2];
								}
							}
						}
					}
				}
				fb.loadGraphicSlice9(graphic_names,W,H,slice9_names,tile1,resize_ratio,isToggle,src_w,src_h,frames);
			}
		} else if(load_code == "tab_menu") {
			var graphic_names1 = ["flixel/flixel-ui/img/tab_back.png","flixel/flixel-ui/img/tab_back.png","flixel/flixel-ui/img/tab_back.png","flixel/flixel-ui/img/tab.png","flixel/flixel-ui/img/tab.png","flixel/flixel-ui/img/tab.png"];
			var slice9_tab = flixel_util_FlxStringUtil.toIntArray("6,6,11,11");
			var slice9_names1 = [slice9_tab,slice9_tab,slice9_tab,slice9_tab,slice9_tab,slice9_tab];
			if(js_Boot.__instanceof(fb,flixel_addons_ui_FlxUIButton)) {
				fb.loadGraphicSlice9(graphic_names1,W,H,slice9_names1,0,resize_ratio,isToggle);
			} else if(js_Boot.__instanceof(fb,flixel_addons_ui_FlxUISpriteButton)) {
				fb.loadGraphicSlice9(graphic_names1,W,H,slice9_names1,0,resize_ratio,isToggle);
			} else {
				fb.loadGraphicSlice9(graphic_names1,W,H,slice9_names1,0,resize_ratio,isToggle);
			}
		} else {
			if(W <= 0) {
				W = 80;
			}
			if(H <= 0) {
				H = 20;
			}
			fb.loadGraphicSlice9(null,W,H,null,0,resize_ratio,isToggle);
		}
		if(sprite == null) {
			if(data != null && data.hasNode.resolve("text")) {
				this.formatButtonText(data,fb);
			} else if(load_code == "tab_menu") {
				fb.up_color = 16777215;
				fb.down_color = 16777215;
				fb.over_color = 16777215;
				fb.up_toggle_color = 16777215;
				fb.down_toggle_color = 16777215;
				fb.over_toggle_color = 16777215;
			} else {
				fb.autoCenterLabel();
			}
		} else {
			fb.autoCenterLabel();
		}
		if(sprite != null && label != "") {
			if(data != null && data.hasNode.resolve("text")) {
				this.formatButtonText(data,fb);
			}
		}
		var text_x = 0;
		var text_y = 0;
		if(data.x.get("text_x") != null) {
			text_x = this._loadWidth(data,0,"text_x") | 0;
		} else if(data.x.get("label_x") != null) {
			text_x = this._loadWidth(data,0,"label_x") | 0;
		}
		if(data.x.get("text_y") != null) {
			text_y = this._loadHeight(data,0,"text_y") | 0;
		} else if(data.x.get("label_y") != null) {
			text_y = this._loadHeight(data,0,"label_y") | 0;
		}
		if(js_Boot.__instanceof(fb,flixel_addons_ui_FlxUISpriteButton)) {
			var fbs = fb;
			if(js_Boot.__instanceof(fbs.label,flixel_group_FlxTypedSpriteGroup)) {
				var _g3 = 0;
				var _g11 = fbs.label.group.members;
				while(_g3 < _g11.length) {
					var sprite1 = _g11[_g3];
					++_g3;
					if(js_Boot.__instanceof(sprite1,flixel_addons_ui_FlxUIText)) {
						var _g21 = sprite1.offset;
						_g21.set_x(_g21.x - text_x);
						var _g22 = sprite1.offset;
						_g22.set_y(_g22.y - text_y);
						break;
					}
				}
			} else {
				var _g4 = fbs.label.offset;
				_g4.set_x(_g4.x - text_x);
				var _g5 = fbs.label.offset;
				_g5.set_y(_g5.y - text_y);
				if(toggleSprite != null) {
					var _g6 = toggleSprite.offset;
					_g6.set_x(_g6.x - text_x);
					var _g7 = toggleSprite.offset;
					_g7.set_y(_g7.y - text_y);
				}
			}
		} else {
			var fbu = fb;
			var _g8 = fbu.label.offset;
			_g8.set_x(_g8.x - text_x);
			var _g9 = fbu.label.offset;
			_g9.set_y(_g9.y - text_y);
		}
		if(sprite != null && toggleSprite != null) {
			fb.set_toggle_label(toggleSprite);
		}
		if(js_Boot.__instanceof(fb,flixel_addons_ui_FlxUITypedButton)) {
			var fuitb = fb;
			if(fuitb._assetsToCleanup != null) {
				var _g10 = 0;
				var _g12 = fuitb._assetsToCleanup;
				while(_g10 < _g12.length) {
					var key = _g12[_g10];
					++_g10;
					this.addToCleanup(key);
				}
			}
		}
		return fb;
	}
	,_loadRegion: function(data) {
		var bounds = this.calcMaxMinSize(data);
		var w = this._loadWidth(data) | 0;
		var h = this._loadHeight(data) | 0;
		if(bounds != null) {
			var pt = flixel_addons_ui_U.conformToBounds(new openfl_geom_Point(w,h),bounds);
			w = pt.x | 0;
			h = pt.y | 0;
		}
		var vis = flixel_addons_ui_U.xml_bool(data.x,"visible",true);
		var reg = new flixel_addons_ui_FlxUIRegion(0,0,w,h);
		reg.set_visible(vis);
		return reg;
	}
	,_load9SliceSprite: function(data,load_code) {
		if(load_code == null) {
			load_code = "";
		}
		var src = "";
		var f9s = null;
		var resize = this.getResizeRatio(data);
		var color = this._loadColor(data);
		var resize_ratio = resize.x;
		var resize_point = this._loadCompass(data,"resize_point");
		var resize_ratio_axis = resize.y | 0;
		var bounds = this.calcMaxMinSize(data);
		var data1 = data.x;
		var str = "";
		if(data1.get("src") != null) {
			str = data1.get("src");
			if(str == "" || str == null) {
				str = "";
			} else {
				str = flixel_addons_ui_U.gfx(str);
				try {
					if(!openfl_Assets.exists(str,"IMAGE")) {
						throw new js__$Boot_HaxeError("couldn't load bmp \"" + "src" + "\"");
					}
				} catch( msg ) {
					haxe_CallStack.lastException = msg;
					if (msg instanceof js__$Boot_HaxeError) msg = msg.val;
					if( js_Boot.__instanceof(msg,String) ) {
					} else throw(msg);
				}
			}
		}
		src = str;
		var hasScaledSrc = data.hasNode.resolve("scale_src");
		if(hasScaledSrc) {
			var origSrc = src;
			src = this.loadScaledSrc(data,"src","scale_src");
			if(src != origSrc) {
				this.addToCleanup(origSrc);
			}
		}
		if(src == "") {
			src = null;
		}
		if(src == null) {
			if(load_code == "tab_menu") {
				src = "flixel/flixel-ui/img/chrome_flat.png";
			}
		}
		var rect_w = this._loadWidth(data) | 0;
		var rect_h = this._loadHeight(data) | 0;
		if(bounds != null) {
			if(rect_w < bounds.min_width) {
				rect_w = bounds.min_width | 0;
			} else if(rect_w > bounds.max_width) {
				rect_w = bounds.max_width;
			}
			if(rect_h < bounds.min_height) {
				rect_h = bounds.min_height | 0;
			} else if(rect_h > bounds.max_height) {
				rect_h = bounds.max_height | 0;
			}
		}
		if(rect_w == 0 || rect_h == 0) {
			return null;
		}
		var rc = new openfl_geom_Rectangle(0,0,rect_w,rect_h);
		var slice9 = flixel_util_FlxStringUtil.toIntArray(flixel_addons_ui_U.xml_str(data.x,"slice9"));
		var srcId = "";
		var srcGraphic = src;
		if(hasScaledSrc) {
			slice9 = this.load9SliceSprite_scaleSub(slice9,data,src);
			srcId = src;
			srcGraphic = flixel_FlxG.bitmap._cache.get(src);
		}
		var smooth = flixel_addons_ui_U.xml_bool(data.x,"smooth",false);
		var tile = 0;
		switch(flixel_addons_ui_U.xml_str(data.x,"tile",true,"")) {
		case "h":case "horizontal":
			tile = 16;
			break;
		case "v":case "vertical":
			tile = 1;
			break;
		case "all":case "both":case "hv":case "true":case "vh":
			tile = 17;
			break;
		}
		f9s = new flixel_addons_ui_FlxUI9SliceSprite(0,0,srcGraphic,rc,slice9,tile,smooth,srcId,resize_ratio,resize_point,resize_ratio_axis,false,color);
		return f9s;
	}
	,load9SliceSprite_scaleSub: function(slice9,data,src,srcString) {
		if(srcString == null) {
			srcString = "src";
		}
		var data1 = data.x;
		var str = "";
		if(data1.get(srcString) != null) {
			str = data1.get(srcString);
			if(str == "" || str == null) {
				str = "";
			} else {
				str = flixel_addons_ui_U.gfx(str);
				try {
					if(!openfl_Assets.exists(str,"IMAGE")) {
						throw new js__$Boot_HaxeError("couldn't load bmp \"" + srcString + "\"");
					}
				} catch( msg ) {
					haxe_CallStack.lastException = msg;
					if (msg instanceof js__$Boot_HaxeError) msg = msg.val;
					if( js_Boot.__instanceof(msg,String) ) {
					} else throw(msg);
				}
			}
		}
		var origSrc = str;
		if(src == origSrc) {
			return slice9;
		}
		var srcAsset = flixel_FlxG.bitmap._cache.get(src) != null ? flixel_FlxG.bitmap._cache.get(src).bitmap : null;
		if(srcAsset == null) {
			srcAsset = openfl_Assets.getBitmapData(origSrc);
		}
		var origAsset = openfl_Assets.getBitmapData(origSrc,false);
		var srcScaleFactorX = srcAsset.width / origAsset.width;
		var srcScaleFactorY = srcAsset.height / origAsset.height;
		if(Math.abs(1.0 - srcScaleFactorX) <= 0.001 && Math.abs(1.0 - srcScaleFactorY) <= 0.001) {
			return slice9;
		}
		if(slice9 != null) {
			slice9[0] = slice9[0] * srcScaleFactorX | 0;
			slice9[1] = slice9[1] * srcScaleFactorY | 0;
			var widthDiff = origAsset.width - slice9[2];
			var heightDiff = origAsset.height - slice9[3];
			widthDiff = widthDiff * srcScaleFactorX | 0;
			heightDiff = heightDiff * srcScaleFactorY | 0;
			slice9[2] = srcAsset.width - widthDiff | 0;
			slice9[3] = srcAsset.height - heightDiff | 0;
		}
		return slice9;
	}
	,_loadTileRule: function(data) {
		var tile = 0;
		switch(flixel_addons_ui_U.xml_str(data.x,"tile",true,"")) {
		case "h":case "horizontal":
			tile = 16;
			break;
		case "v":case "vertical":
			tile = 1;
			break;
		case "all":case "both":case "hv":case "true":case "vh":
			tile = 17;
			break;
		}
		return tile;
	}
	,_loadBox: function(data) {
		var fs = null;
		var thickness = this._loadWidth(data,1,"thickness") | 0;
		var bounds = this.calcMaxMinSize(data);
		if(bounds == null) {
			bounds = { min_width : -Infinity, min_height : -Infinity, max_width : Infinity, max_height : Infinity};
		}
		var W = this._loadWidth(data) | 0;
		var H = this._loadHeight(data) | 0;
		if(bounds != null) {
			if(W < bounds.min_width) {
				W = bounds.min_width | 0;
			} else if(W > bounds.max_width) {
				W = bounds.max_width | 0;
			}
			if(H < bounds.min_height) {
				H = bounds.max_height | 0;
			} else if(H > bounds.max_height) {
				H = bounds.max_height | 0;
			}
		}
		var cstr = flixel_addons_ui_U.xml_str(data.x,"color",true,"0xff000000");
		var C = 0;
		if(cstr != "") {
			var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(cstr);
			if(return_val == null) {
				throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + cstr);
			}
			C = return_val;
		}
		fs = new flixel_addons_ui_FlxUISprite(0,0);
		var key = W + "x" + H + ":" + C + ":" + thickness;
		if(flixel_FlxG.bitmap._cache.get(key) != null) {
			fs.loadGraphic(key);
		} else {
			fs.makeGraphic(W,H,C,false,key);
			fs.graphic.bitmap.fillRect(new openfl_geom_Rectangle(thickness,thickness,W - thickness * 2,H - thickness * 2),0);
		}
		return fs;
	}
	,_loadLine: function(data) {
		var axis = flixel_addons_ui_U.xml_str(data.x,"axis",true,"horizontal");
		var thickness = this._loadWidth(data,-1,"thickness") | 0;
		var bounds = this.calcMaxMinSize(data);
		if(bounds == null) {
			bounds = { min_width : 1, min_height : 1, max_width : Infinity, max_height : Infinity};
		}
		switch(axis) {
		case "h":case "horizontal":case "horz":
			bounds.max_height = thickness;
			bounds.min_height = thickness;
			break;
		case "v":case "vert":case "vertical":
			bounds.max_width = thickness;
			bounds.min_width = thickness;
			break;
		}
		var W = this._loadWidth(data) | 0;
		var H = this._loadHeight(data) | 0;
		if(bounds != null) {
			if(W < bounds.min_width) {
				W = bounds.min_width | 0;
			} else if(W > bounds.max_width) {
				W = bounds.max_width | 0;
			}
			if(H < bounds.min_height) {
				H = bounds.max_height | 0;
			} else if(H > bounds.max_height) {
				H = bounds.max_height | 0;
			}
		}
		var cstr = flixel_addons_ui_U.xml_str(data.x,"color",true,"0xff000000");
		var C = 0;
		if(cstr != "") {
			var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(cstr);
			if(return_val == null) {
				throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + cstr);
			}
			C = return_val;
		}
		var lineAxis = axis == "horizontal" ? flixel_addons_ui_LineAxis.HORIZONTAL : flixel_addons_ui_LineAxis.VERTICAL;
		return new flixel_addons_ui_FlxUILine(0,0,lineAxis,lineAxis == flixel_addons_ui_LineAxis.HORIZONTAL ? W : H,thickness != -1 ? thickness : lineAxis == flixel_addons_ui_LineAxis.HORIZONTAL ? H : W,C);
	}
	,_loadBar: function(data) {
		var fb = null;
		var style = { filledColors : null, emptyColors : null, chunkSize : null, gradRotation : null, filledColor : null, emptyColor : null, borderColor : null, filledImgSrc : "", emptyImgSrc : ""};
		var W = this._loadWidth(data,-1) | 0;
		var H = this._loadHeight(data,-1) | 0;
		var fillDir = flixel_ui_FlxBarFillDirection.TOP_TO_BOTTOM;
		switch(flixel_addons_ui_U.xml_str(data.x,"fill_direction",true)) {
		case "bottom_to_top":
			fillDir = flixel_ui_FlxBarFillDirection.BOTTOM_TO_TOP;
			break;
		case "horizontal_inside_out":
			fillDir = flixel_ui_FlxBarFillDirection.HORIZONTAL_INSIDE_OUT;
			break;
		case "horizontal_outside_in":
			fillDir = flixel_ui_FlxBarFillDirection.HORIZONTAL_OUTSIDE_IN;
			break;
		case "left_to_right":
			fillDir = flixel_ui_FlxBarFillDirection.LEFT_TO_RIGHT;
			break;
		case "right_to_left":
			fillDir = flixel_ui_FlxBarFillDirection.RIGHT_TO_LEFT;
			break;
		case "top_to_bottom":
			fillDir = flixel_ui_FlxBarFillDirection.TOP_TO_BOTTOM;
			break;
		case "vertical_inside_out":
			fillDir = flixel_ui_FlxBarFillDirection.VERTICAL_INSIDE_OUT;
			break;
		case "vertical_outside_in":
			fillDir = flixel_ui_FlxBarFillDirection.VERTICAL_OUTSIDE_IN;
			break;
		default:
			fillDir = flixel_ui_FlxBarFillDirection.LEFT_TO_RIGHT;
		}
		var parentRefStr = flixel_addons_ui_U.xml_str(data.x,"parent_ref",true);
		var parentRef = parentRefStr != "" ? this.getAsset(parentRefStr) : null;
		var variableName = flixel_addons_ui_U.xml_str(data.x,"variable");
		var value = flixel_addons_ui_U.xml_f(data.x,"value",-1);
		var min = flixel_addons_ui_U.xml_f(data.x,"min",0);
		var max = flixel_addons_ui_U.xml_f(data.x,"max",100);
		if(value == -1) {
			value = max;
		}
		style.borderColor = flixel_addons_ui_U.xml_color(data.x,"border_color");
		var showBorder = style.borderColor != null;
		style.filledColor = flixel_addons_ui_U.xml_color(data.x,"filled_color");
		if(style.filledColor == null) {
			style.filledColor = flixel_addons_ui_U.xml_color(data.x,"color");
		}
		style.emptyColor = flixel_addons_ui_U.xml_color(data.x,"empty_color");
		style.filledColors = flixel_addons_ui_U.xml_colorArray(data.x,"filled_colors");
		style.emptyColors = flixel_addons_ui_U.xml_colorArray(data.x,"empty_colors");
		if(style.filledColors == null) {
			style.filledColors = flixel_addons_ui_U.xml_colorArray(data.x,"colors");
		}
		style.filledImgSrc = this.loadScaledSrc(data,"src_filled");
		style.emptyImgSrc = this.loadScaledSrc(data,"src_empty");
		if(style.filledImgSrc == "") {
			style.filledImgSrc = this.loadScaledSrc(data,"src");
		}
		style.chunkSize = flixel_addons_ui_U.xml_i(data.x,"chunk_size",1);
		style.gradRotation = flixel_addons_ui_U.xml_i(data.x,"rotation",90);
		if(style.filledImgSrc == "" && style.filledColor == null && style.filledColors == null) {
			style.filledColor = -65536;
		}
		if(W == -1 && H == -1) {
			fb = new flixel_addons_ui_FlxUIBar(0,0,fillDir,100,10,parentRef,variableName,min,max,showBorder);
		} else {
			fb = new flixel_addons_ui_FlxUIBar(0,0,fillDir,W,H,parentRef,variableName,min,max,showBorder);
		}
		fb.set_style(style);
		fb.resize(fb.barWidth,fb.barHeight);
		fb.set_value(value);
		return fb;
	}
	,_loadSprite: function(data) {
		var src = "";
		var fs = null;
		src = this.loadScaledSrc(data);
		var bounds = this.calcMaxMinSize(data);
		var resize = this.getResizeRatio(data,-1);
		var resize_ratio = resize.x;
		var resize_ratio_axis = resize.y | 0;
		var resize_point = this._loadCompass(data,"resize_point");
		var W = this._loadWidth(data,-1) | 0;
		var H = this._loadHeight(data,-1) | 0;
		if(bounds != null) {
			if(W < bounds.min_width) {
				W = bounds.min_width | 0;
			} else if(W > bounds.max_width) {
				W = bounds.max_width | 0;
			}
			if(H < bounds.min_height) {
				H = bounds.max_height | 0;
			} else if(H > bounds.max_height) {
				H = bounds.max_height | 0;
			}
		}
		if(src != "") {
			if(W == -1 && H == -1) {
				fs = new flixel_addons_ui_FlxUISprite(0,0,src);
			} else {
				if(resize_ratio != -1 && (W == -1 || H == -1)) {
					if(resize_ratio_axis == -1) {
						if(W == -1) {
							resize_ratio_axis = 0;
						}
						if(H == -1) {
							resize_ratio_axis = 1;
						}
					}
					if(resize_ratio_axis == 1) {
						H = W * (1 / resize_ratio);
					} else if(resize_ratio_axis == 0) {
						W = H * (1 / resize_ratio);
					}
				}
				fs = new flixel_addons_ui_FlxUISprite(0,0,flixel_addons_ui_U.loadScaledImage(src,W,H,this.loadSmooth(data,true)));
			}
		} else {
			var cstr = flixel_addons_ui_U.xml_str(data.x,"color");
			var C = 0;
			if(cstr != "") {
				var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(cstr);
				if(return_val == null) {
					throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + cstr);
				}
				C = return_val;
			}
			fs = new flixel_addons_ui_FlxUISprite(0,0);
			fs.makeGraphic(W,H,C);
		}
		fs.set_resize_point(resize_point);
		fs.set_resize_ratio(resize_ratio);
		fs.resize_ratio_axis = resize_ratio_axis;
		return fs;
	}
	,loadSmooth: function(scaleNode,defaultValue) {
		var defaultStr = defaultValue ? "true" : "false";
		var smoothStr = flixel_addons_ui_U.xml_str(scaleNode.x,"smooth",true,defaultStr);
		if(smoothStr == "") {
			smoothStr = flixel_addons_ui_U.xml_str(scaleNode.x,"antialias",true,defaultStr);
		}
		return flixel_addons_ui_U.boolify(smoothStr);
	}
	,loadScaledSrc: function(data,attName,scaleName,tilesWide,tilesTall) {
		if(tilesTall == null) {
			tilesTall = 1;
		}
		if(tilesWide == null) {
			tilesWide = 1;
		}
		if(scaleName == null) {
			scaleName = "scale";
		}
		if(attName == null) {
			attName = "src";
		}
		var src = flixel_addons_ui_U.xml_str(data.x,attName);
		if(data.hasNode.resolve(scaleName)) {
			var _g_head = data.nodes.resolve(scaleName).h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				var ratio = flixel_addons_ui_U.xml_f(val.x,"screen_ratio",-1);
				var tolerance = flixel_addons_ui_U.xml_f(val.x,"tolerance",0.1);
				if(ratio < 0 || ratio > 0 && Math.abs(ratio - flixel_FlxG.width / flixel_FlxG.height) <= tolerance) {
					var srcSuffix = src + flixel_addons_ui_U.xml_str(val.x,"suffix");
					var testAsset = null;
					var scale_ = -1;
					var smooth = this.loadSmooth(val,true);
					var to_height = this._loadHeight(val,-1,"to_height");
					if(to_height != -1) {
						var testAsset1 = flixel_addons_ui_U.getBmp(flixel_addons_ui_U.gfx(src));
						if(testAsset1 != null) {
							scale_ = to_height / testAsset1.height;
						}
					} else {
						scale_ = this._loadScale(val,-1);
						if(scale_ == -1) {
							scale_ = this._loadScale(val,-1,"value");
						}
					}
					var scale_x = scale_ != -1 ? scale_ : this._loadScaleX(val,-1);
					var scale_y = scale_ != -1 ? scale_ : this._loadScaleY(val,-1);
					var sw = 0;
					var sh = 0;
					if(scale_x > 0 && scale_y > 0) {
						if(scale_x <= 0) {
							scale_x = 1.0;
						}
						if(scale_y <= 0) {
							scale_y = 1.0;
						}
						sw = this._loadWidth(val,-1);
						sh = this._loadHeight(val,-1);
						if(sw == -1 || sh == -1) {
							testAsset = openfl_Assets.getBitmapData(flixel_addons_ui_U.gfx(src));
							sw = testAsset.width;
							sh = testAsset.height;
						}
						sw *= scale_x;
						sh *= scale_y;
					} else {
						sw = this._loadWidth(val,-1);
						sh = this._loadHeight(val,-1);
					}
					if(sw != 0 && sh != 0) {
						if(tilesTall > 1 || tilesWide > 1) {
							testAsset = openfl_Assets.getBitmapData(flixel_addons_ui_U.gfx(src));
							var str = flixel_addons_ui_U.scaleAndStoreTileset(flixel_addons_ui_U.gfx(srcSuffix),scale_y,testAsset.width / tilesWide | 0,testAsset.height / tilesTall | 0,sw | 0,sh / tilesTall | 0,smooth);
							this.addToScaledAssets(str);
							return str;
						} else {
							var str1 = flixel_addons_ui_U.loadScaledImage(srcSuffix,sw,sh,smooth);
							this.addToScaledAssets(str1);
							return str1;
						}
					}
					break;
				}
			}
		}
		var data1 = data.x;
		var str2 = "";
		if(data1.get(attName) != null) {
			str2 = data1.get(attName);
			if(str2 == "" || str2 == null) {
				str2 = "";
			} else {
				str2 = flixel_addons_ui_U.gfx(str2);
				try {
					if(!openfl_Assets.exists(str2,"IMAGE")) {
						throw new js__$Boot_HaxeError("couldn't load bmp \"" + attName + "\"");
					}
				} catch( msg ) {
					haxe_CallStack.lastException = msg;
					if (msg instanceof js__$Boot_HaxeError) msg = msg.val;
					if( js_Boot.__instanceof(msg,String) ) {
					} else throw(msg);
				}
			}
		}
		return str2;
	}
	,thisWidth: function() {
		return flixel_FlxG.width;
	}
	,thisHeight: function() {
		return flixel_FlxG.height;
	}
	,_getAnchorPos: function(thing,axis,str) {
		switch(str) {
		case "":
			return 0;
		case "bottom":case "down":
			return this.screenHeight();
		case "center":
			if(axis == "x") {
				return this.screenWidth() / 2;
			} else if(axis == "y") {
				return this.screenHeight() / 2;
			}
			break;
		case "left":
			return 0;
		case "right":
			return this.screenWidth();
		case "top":case "up":
			return 0;
		default:
			var perc = flixel_addons_ui_U.perc_to_float(str);
			if(!isNaN(perc)) {
				if(axis == "x") {
					return perc * this.screenWidth();
				} else if(axis == "y") {
					return perc * this.screenHeight();
				}
			} else if(new EReg("[\\w]+\\.[\\w]+","").match(str)) {
				var wh = "";
				if(axis == "x") {
					wh = "w";
				}
				if(axis == "y") {
					wh = "h";
				}
				return this._getStretch(1,wh,str);
			}
		}
		return 0;
	}
	,getRound: function(node,defaultStr) {
		if(defaultStr == null) {
			defaultStr = "";
		}
		switch(flixel_addons_ui_U.xml_str(node.x,"round",true,defaultStr)) {
		case "-1":case "down":case "floor":
			return flixel_addons_ui_Rounding.Floor;
		case "1":case "ceil":case "ceiling":case "up":
			return flixel_addons_ui_Rounding.Ceil;
		case "0":case "round":case "true":
			return flixel_addons_ui_Rounding.Round;
		}
		return flixel_addons_ui_Rounding.None;
	}
	,doRound: function(f,round) {
		switch(round[1]) {
		case 0:
			return Math.floor(f);
		case 1:
			return Math.ceil(f);
		case 2:
			return Math.round(f);
		case 3:
			return f;
		}
	}
	,calcMaxMinSize: function(data,width,height) {
		var min_w = 0;
		var min_h = 0;
		var max_w = Infinity;
		var max_h = Infinity;
		var temp_min_w = 0;
		var temp_min_h = 0;
		var temp_max_w = Infinity;
		var temp_max_h = Infinity;
		var round = flixel_addons_ui_Rounding.None;
		if(data.hasNode.resolve("exact_size")) {
			var _g_head = data.nodes.resolve("exact_size").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				var exact_w_str = flixel_addons_ui_U.xml_str(val.x,"width");
				var exact_h_str = flixel_addons_ui_U.xml_str(val.x,"height");
				round = this.getRound(val);
				min_w = this.doRound(this._getDataSize("w",exact_w_str,0),round);
				min_h = this.doRound(this._getDataSize("h",exact_h_str,0),round);
				max_w = this.doRound(min_w,round);
				max_h = this.doRound(min_h,round);
			}
		} else if(data.hasNode.resolve("min_size")) {
			var _g_head1 = data.nodes.resolve("min_size").h;
			while(_g_head1 != null) {
				var val1 = _g_head1.item;
				_g_head1 = _g_head1.next;
				var min_w_str = flixel_addons_ui_U.xml_str(val1.x,"width");
				var min_h_str = flixel_addons_ui_U.xml_str(val1.x,"height");
				round = this.getRound(val1);
				temp_min_w = this.doRound(this._getDataSize("w",min_w_str,0),round);
				temp_min_h = this.doRound(this._getDataSize("h",min_h_str,0),round);
				if(temp_min_w > min_w) {
					min_w = temp_min_w;
				}
				if(temp_min_h > min_h) {
					min_h = temp_min_h;
				}
			}
		} else if(data.hasNode.resolve("max_size")) {
			var _g_head2 = data.nodes.resolve("max_size").h;
			while(_g_head2 != null) {
				var val2 = _g_head2.item;
				_g_head2 = _g_head2.next;
				var max_w_str = flixel_addons_ui_U.xml_str(val2.x,"width");
				var max_h_str = flixel_addons_ui_U.xml_str(val2.x,"height");
				round = this.getRound(val2);
				temp_max_w = this.doRound(this._getDataSize("w",max_w_str,Infinity),round);
				temp_max_h = this.doRound(this._getDataSize("h",max_h_str,Infinity),round);
				if(temp_max_w < max_w) {
					max_w = temp_max_w;
				}
				if(temp_max_h < max_h) {
					max_h = temp_max_h;
				}
			}
		} else {
			return null;
		}
		if(width != null) {
			if(width > min_w) {
				min_w = width;
			}
			if(width < max_w) {
				max_w = width;
			}
		}
		if(height != null) {
			if(height > min_h) {
				min_h = height;
			}
			if(height < max_h) {
				max_h = height;
			}
		}
		if(max_w <= 0) {
			max_w = Infinity;
		}
		if(max_h <= 0) {
			max_h = Infinity;
		}
		return { min_width : min_w, min_height : min_h, max_width : max_w, max_height : max_h};
	}
	,_getDataSize: function(target,str,default_) {
		if(default_ == null) {
			default_ = 0;
		}
		if(flixel_addons_ui_U.isStrNum(str)) {
			return parseFloat(str);
		}
		var percf = flixel_addons_ui_U.perc_to_float(str);
		if(!isNaN(percf)) {
			switch(target) {
			case "h":case "height":
				return this.screenHeight() * percf;
			case "scale":case "scale_x":case "scale_y":
				return percf;
			case "w":case "width":
				return this.screenWidth() * percf;
			}
		} else {
			if(str.indexOf("stretch:") == 0) {
				str = StringTools.replace(str,"stretch:","");
				var arr = str.split(",");
				var stretch_0 = this._getStretch(0,target,arr[0]);
				var stretch_1 = this._getStretch(1,target,arr[1]);
				if(stretch_0 != -1 && stretch_1 != -1) {
					return stretch_1 - stretch_0;
				} else {
					return default_;
				}
			} else if(str.indexOf("asset:") == 0) {
				str = StringTools.replace(str,"asset:","");
				return this._getStretch(1,target,str);
			} else if(new EReg("[\\w]+\\.[\\w]+","").match(str)) {
				return this._getStretch(1,target,str);
			}
			var ptStr = "";
			if(str.indexOf("pt") == str.length - 2) {
				ptStr = HxOverrides.substr(str,0,str.length - 2);
			}
			if(ptStr != "" && flixel_addons_ui_U.isStrNum(ptStr)) {
				var tempNum = parseFloat(ptStr);
				switch(target) {
				case "h":case "height":
					return this._pointY * tempNum;
				case "w":case "width":
					return this._pointX * tempNum;
				}
			}
		}
		return default_;
	}
	,_getOperation: function(str) {
		var list = ["+","-","*","/","^"];
		var operator = "";
		var besti = Infinity;
		var _g = 0;
		while(_g < list.length) {
			var op = list[_g];
			++_g;
			var i = str.indexOf(op);
			if(i != -1) {
				if(i < besti) {
					besti = i;
					operator = op;
				}
			}
		}
		var hasPoint = false;
		if(operator != "") {
			if(str.indexOf(operator) != -1) {
				var opindex = str.indexOf(operator);
				if(opindex != str.length - 1) {
					var firstBit = HxOverrides.substr(str,0,opindex);
					var secondBit = HxOverrides.substr(str,opindex + 1,str.length - (opindex + 1));
					var f = 0;
					var ptIndex = secondBit.indexOf("pt");
					if(ptIndex != -1 && ptIndex == secondBit.length - 2) {
						f = parseFloat(StringTools.replace(secondBit,"pt",""));
						hasPoint = true;
					} else {
						f = parseFloat(secondBit);
					}
					if(isNaN(f)) {
						f = this.getAssetProperty(1,"",secondBit);
					}
					if(f == 0 && secondBit != "0") {
						return null;
					} else {
						return [firstBit,operator,f,hasPoint];
					}
				}
			}
		}
		return null;
	}
	,_doOperation: function(value,operator,operand) {
		switch(operator) {
		case "*":
			return value * operand;
		case "+":
			return value + operand;
		case "-":
			return value - operand;
		case "/":
			return value / operand;
		case "^":
			return Math.pow(value,operand);
		}
		return value;
	}
	,_getStretch: function(index,target,str) {
		var arr = null;
		var operator = "";
		var operand = 0;
		var hasPoint = false;
		arr = this._getOperation(str);
		if(arr != null) {
			str = arr[0];
			operator = arr[1];
			operand = arr[2];
			hasPoint = arr[3];
			if(hasPoint) {
				switch(target) {
				case "h":case "height":
					operand *= this._pointY;
					break;
				case "w":case "width":
					operand *= this._pointX;
					break;
				default:
					operand *= this._pointY;
				}
			}
		}
		var return_val = this.getAssetProperty(index,target,str);
		if(return_val != -1 && operator != "") {
			return_val = this._doOperation(return_val,operator,operand);
		}
		return return_val;
	}
	,getAssetProperty: function(index,target,str) {
		var prop = "";
		if(str.indexOf(".") != -1) {
			var arr = null;
			arr = str.split(".");
			str = arr[0];
			prop = arr[1];
		}
		var other = this.getAsset(str);
		var return_val = 0;
		if(other == null) {
			switch(str) {
			case "bottom":case "down":
				return_val = this.screenHeight();
				break;
			case "left":
				return_val = 0;
				break;
			case "right":
				return_val = this.screenWidth();
				break;
			case "top":case "up":
				return_val = 0;
				break;
			default:
				if(flixel_addons_ui_U.isStrNum(str)) {
					return_val = parseFloat(str);
				} else {
					return_val = -1;
				}
			}
		} else {
			switch(target) {
			case "h":case "height":
				if(prop == "") {
					if(index == 0) {
						return_val = other.y + other.get_height();
					}
					if(index == 1) {
						return_val = other.y;
					}
				} else {
					switch(prop) {
					case "bottom":case "down":
						return_val = other.y + other.get_height();
						break;
					case "center":
						return_val = other.y + other.get_height() / 2;
						break;
					case "halfheight":
						return_val = other.get_height() / 2;
						break;
					case "halfwidth":
						return_val = other.get_width() / 2;
						break;
					case "height":
						return_val = other.get_height();
						break;
					case "right":
						return_val = other.x + other.get_width();
						break;
					case "top":case "up":case "y":
						return_val = other.y;
						break;
					case "width":
						return_val = other.get_width();
						break;
					case "left":case "x":
						return_val = other.x;
						break;
					}
				}
				break;
			case "w":case "width":
				if(prop == "") {
					if(index == 0) {
						return_val = other.x + other.get_width();
					}
					if(index == 1) {
						return_val = other.x;
					}
				} else {
					switch(prop) {
					case "bottom":case "down":
						return_val = other.y + other.get_height();
						break;
					case "center":
						return_val = other.x + other.get_width() / 2;
						break;
					case "halfheight":
						return_val = other.get_height() / 2;
						break;
					case "halfwidth":
						return_val = other.get_width() / 2;
						break;
					case "height":
						return_val = other.get_height();
						break;
					case "right":
						return_val = other.x + other.get_width();
						break;
					case "top":case "up":case "y":
						return_val = other.y;
						break;
					case "width":
						return_val = other.get_width();
						break;
					case "left":case "x":
						return_val = other.x;
						break;
					}
				}
				break;
			default:
				switch(prop) {
				case "bottom":case "down":
					return_val = other.y + other.get_height();
					break;
				case "centerx":
					return_val = other.x + other.get_width() / 2;
					break;
				case "centery":
					return_val = other.y + other.get_height() / 2;
					break;
				case "halfheight":
					return_val = other.get_height() / 2;
					break;
				case "halfwidth":
					return_val = other.get_width() / 2;
					break;
				case "height":
					return_val = other.get_height();
					break;
				case "right":
					return_val = other.x + other.get_width();
					break;
				case "top":case "up":case "y":
					return_val = other.y;
					break;
				case "width":
					return_val = other.get_width();
					break;
				case "left":case "x":
					return_val = other.x;
					break;
				}
			}
		}
		return return_val;
	}
	,_loadCursor: function(data) {
		if(data.hasNode.resolve("list")) {
			if(this.cursorLists == null) {
				this.cursorLists = [];
			}
			var _g_head = data.nodes.resolve("list").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				var arr = flixel_addons_ui_U.xml_str(val.x,"ids").split(",");
				if(arr != null && arr.length > 0) {
					var list = [];
					var _g = 0;
					while(_g < arr.length) {
						var str = arr[_g];
						++_g;
						var widget = this.getAsset(str);
						if(widget != null) {
							list.push(widget);
						}
					}
					this.cursorLists.push(list);
				}
			}
		}
	}
	,_loadPosition: function(data,thing) {
		var X = this._loadWidth(data,0,"x");
		var Y = this._loadHeight(data,0,"y");
		var ctrX = flixel_addons_ui_U.xml_bool(data.x,"center_x");
		var ctrY = flixel_addons_ui_U.xml_bool(data.x,"center_y");
		var center_on = flixel_addons_ui_U.xml_str(data.x,"center_on");
		var center_on_x = flixel_addons_ui_U.xml_str(data.x,"center_on_x");
		var center_on_y = flixel_addons_ui_U.xml_str(data.x,"center_on_y");
		var anchor_x_str = "";
		var anchor_y_str = "";
		var anchor_x = 0;
		var anchor_y = 0;
		var anchor_x_flush = "";
		var anchor_y_flush = "";
		if(data.hasNode.resolve("anchor")) {
			anchor_x_str = flixel_addons_ui_U.xml_str(data.node.resolve("anchor").x,"x");
			anchor_y_str = flixel_addons_ui_U.xml_str(data.node.resolve("anchor").x,"y");
			var rounding = this.getRound(data.node.resolve("anchor"));
			anchor_x = this._getAnchorPos(thing,"x",anchor_x_str);
			anchor_y = this._getAnchorPos(thing,"y",anchor_y_str);
			anchor_x = this.doRound(anchor_x,rounding);
			anchor_y = this.doRound(anchor_y,rounding);
			anchor_x_flush = flixel_addons_ui_U.xml_str(data.node.resolve("anchor").x,"x-flush",true);
			anchor_y_flush = flixel_addons_ui_U.xml_str(data.node.resolve("anchor").x,"y-flush",true);
		}
		if(anchor_x_str != "" || anchor_y_str != "") {
			switch(anchor_x_flush) {
			case "center":
				anchor_x -= thing.get_width() / 2;
				break;
			case "left":
				break;
			case "right":
				anchor_x -= thing.get_width();
				break;
			}
			switch(anchor_y_flush) {
			case "bottom":case "down":
				anchor_y -= thing.get_height();
				break;
			case "center":
				anchor_y -= thing.get_height() / 2;
				break;
			case "top":case "up":
				break;
			}
			if(anchor_x_str != "") {
				thing.set_x(anchor_x);
			}
			if(anchor_y_str != "") {
				thing.set_y(anchor_y);
			}
		}
		if(ctrX || ctrY) {
			if(ctrX) {
				thing.set_x((flixel_FlxG.width - thing.get_width()) / 2);
			}
			if(ctrY) {
				thing.set_y((flixel_FlxG.height - thing.get_height()) / 2);
			}
		}
		if(center_on != "") {
			var other = this.getAsset(center_on);
			if(other != null) {
				var fb1 = js_Boot.__cast(other , flixel_FlxObject);
				var fb2 = js_Boot.__cast(thing , flixel_FlxObject);
				fb2.set_x(fb1.x + (fb1.get_width() - fb2.get_width()) / 2);
				fb2.set_y(fb1.y + (fb1.get_height() - fb2.get_height()) / 2);
			}
		} else {
			if(center_on_x != "") {
				var other1 = this.getAsset(center_on_x);
				if(other1 != null) {
					var fb11 = js_Boot.__cast(other1 , flixel_FlxObject);
					var fb21 = js_Boot.__cast(thing , flixel_FlxObject);
					fb21.set_x(fb11.x + (fb11.get_width() - fb21.get_width()) / 2);
				}
			}
			if(center_on_y != "") {
				var other2 = this.getAsset(center_on_y);
				if(other2 != null) {
					var fb12 = js_Boot.__cast(other2 , flixel_FlxObject);
					var fb22 = js_Boot.__cast(thing , flixel_FlxObject);
					fb22.set_y(fb12.y + (fb12.get_height() - fb22.get_height()) / 2);
				}
			}
		}
		thing.set_x(thing.x + X);
		thing.set_y(thing.y + Y);
	}
	,_loadBorder: function(data) {
		var borderDef = flixel_addons_ui_BorderDef.fromXML(data.x);
		var round = this.getRound(data,"floor");
		borderDef.size = this.doRound(this._getDataSize("h",flixel_addons_ui_U.xml_str(data.x,"border_size"),1),round) | 0;
		return borderDef;
	}
	,_loadColor: function(data,colorName,_default) {
		if(_default == null) {
			_default = -1;
		}
		if(colorName == null) {
			colorName = "color";
		}
		var colorStr = flixel_addons_ui_U.xml_str(data.x,colorName);
		var tmp;
		if(colorStr == "") {
			var _this = data.x;
			if(_this.nodeType != Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + _this.nodeType);
			}
			tmp = _this.nodeName == colorName;
		} else {
			tmp = false;
		}
		if(tmp) {
			colorStr = flixel_addons_ui_U.xml_str(data.x,"value");
		}
		var color = _default;
		if(colorStr != "") {
			var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(colorStr);
			if(return_val == null) {
				throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + colorStr);
			}
			color = return_val;
		}
		return color;
	}
	,_loadFontDef: function(data) {
		var fd = flixel_addons_ui_FontDef.fromXML(data.x);
		var fontSize = this._loadHeight(data,8,"size") | 0;
		fd.format.size = flixel_addons_ui_FlxUI.fontSize(fd.file,fontSize);
		fd.set_size(fontSize);
		return fd;
	}
	,_loadFontFace: function(data) {
		var fontFace = flixel_addons_ui_U.xml_str(data.x,"font");
		var fontStyle = flixel_addons_ui_U.xml_str(data.x,"style");
		var the_font = null;
		if(fontFace != "") {
			the_font = flixel_addons_ui_FlxUI.font(fontFace,fontStyle);
		}
		return the_font;
	}
	,_onFinishLoad: function() {
		if(this._ptr != null) {
			this._ptr.getEvent("finish_load",this,null);
		}
	}
	,getText: function(flag,context,safe,code) {
		if(code == null) {
			code = "";
		}
		if(safe == null) {
			safe = true;
		}
		if(context == null) {
			context = "data";
		}
		var str = "";
		if(this._ptr_tongue != null) {
			str = this._ptr_tongue.get(flag,context,safe);
			return this.formatFromCode(str,code);
		} else if(this.getTextFallback != null) {
			str = this.getTextFallback(flag,context,safe);
			return this.formatFromCode(str,code);
		}
		return flag;
	}
	,formatFromCode: function(str,code) {
		switch(code) {
		case "fu":
			return flixel_addons_ui_U.FU(str);
		case "fu_":
			return flixel_addons_ui_U.FU_(str);
		case "l":
			return str.toLowerCase();
		case "u":
			return str.toUpperCase();
		}
		return str;
	}
	,formatButtonText: function(data,button) {
		if(data != null && data.hasNode.resolve("text")) {
			var textNode = data.node.resolve("text");
			var use_def = flixel_addons_ui_U.xml_str(textNode.x,"use_def",true);
			var text_def = null;
			if(use_def != "") {
				text_def = this.getDefinition(use_def);
			}
			var info = flixel_addons_ui_FlxUI.consolidateData(textNode,text_def);
			var the_font = this._loadFontFace(info);
			var size = this._loadHeight(info,8,"size","floor") | 0;
			var color = this._loadColor(info);
			var labelWidth = flixel_addons_ui_U.xml_f(info.x,"width");
			var border = this._loadBorder(info);
			var align = flixel_addons_ui_U.xml_str(info.x,"align",true);
			if(align == "") {
				align = null;
			}
			var the_label = null;
			var fb = null;
			var fsb = null;
			var ifb = null;
			if(js_Boot.__instanceof(button,flixel_addons_ui_FlxUICheckBox) == false) {
				ifb = button;
				if(align == "" || align == null) {
					align = "center";
				}
			} else {
				ifb = button.button;
				align = "left";
			}
			if(ifb != null) {
				if(js_Boot.__instanceof(ifb,flixel_addons_ui_FlxUIButton)) {
					fb = ifb;
					the_label = fb.label;
				} else if(js_Boot.__instanceof(ifb,flixel_addons_ui_FlxUISpriteButton)) {
					fsb = ifb;
					if(js_Boot.__instanceof(fsb.label,flixel_text_FlxText)) {
						the_label = fsb.label;
					} else if(js_Boot.__instanceof(fsb.label,flixel_group_FlxTypedSpriteGroup)) {
						var _g = 0;
						var _g1 = fsb.label.group.members;
						while(_g < _g1.length) {
							var fs = _g1[_g];
							++_g;
							if(js_Boot.__instanceof(fs,flixel_text_FlxText)) {
								the_label = fs;
								break;
							}
						}
					}
				}
				ifb.up_color = color;
				ifb.down_color = 0;
				ifb.over_color = 0;
			}
			if(the_label != null) {
				if(labelWidth != 0) {
					the_label.set_width(labelWidth);
					the_label.resetHelpers();
				}
				if(fb != null) {
					fb.setLabelFormat(the_font,size,color,align);
				} else {
					the_label.setFormat(the_font,size,color,align);
				}
				the_label.set_borderStyle(border.style);
				the_label.set_borderColor(border.color);
				the_label.set_borderSize(border.size);
				the_label.set_borderQuality(border.quality);
				if(js_Boot.__instanceof(the_label,flixel_addons_ui_FlxUIText)) {
					the_label.drawFrame();
				}
				if(fb != null) {
					fb.autoCenterLabel();
				}
				if(fsb != null) {
					fsb.autoCenterLabel();
				}
			}
			var _g_head = info.nodes.resolve("color").h;
			while(_g_head != null) {
				var val = _g_head.item;
				_g_head = _g_head.next;
				var color1 = this._loadColor(val);
				var vis = flixel_addons_ui_U.xml_bool(val.x,"visible",true);
				var state_name = flixel_addons_ui_U.xml_name(val.x);
				var toggle = flixel_addons_ui_U.xml_bool(val.x,"toggle");
				switch(state_name) {
				case "active":case "hilight":case "hover":case "over":
					if(!toggle) {
						ifb.over_color = color1;
						ifb.over_visible = vis;
					} else {
						ifb.over_toggle_color = color1;
						ifb.over_toggle_visible = vis;
					}
					break;
				case "down":case "pressed":case "pushed":
					if(!toggle) {
						ifb.down_color = color1;
						ifb.down_visible = vis;
					} else {
						ifb.down_toggle_color = color1;
						ifb.down_toggle_visible = vis;
					}
					break;
				case "":case "inactive":case "normal":case "up":
					if(!toggle) {
						ifb.up_color = color1;
						ifb.up_visible = vis;
					} else {
						ifb.up_toggle_color = color1;
						ifb.up_toggle_visible = vis;
					}
					break;
				}
			}
			if(ifb.over_color == 0) {
				ifb.over_color = ifb.up_color;
			}
			if(ifb.down_color == 0) {
				ifb.down_color = ifb.over_color;
			}
			if(ifb.up_toggle_color == 0) {
				ifb.up_toggle_color = ifb.up_color;
			}
			if(ifb.over_toggle_color == 0) {
				ifb.over_toggle_color = ifb.over_color;
			}
			if(ifb.down_toggle_color == 0) {
				ifb.down_toggle_color = ifb.down_color;
			}
			if(the_label != null) {
				the_label.set_visible(ifb.up_visible);
				the_label.set_color(ifb.up_color);
			}
			return the_label;
		}
		return null;
	}
	,__class__: flixel_addons_ui_FlxUI
	,__properties__: $extend(flixel_addons_ui_FlxUIGroup.prototype.__properties__,{set_currMode:"set_currMode",get_currMode:"get_currMode",set_focus:"set_focus",set_tongue:"set_tongue",get_tongue:"get_tongue",get_isRoot:"get_isRoot"})
});
var flixel_addons_ui_Rounding = $hxClasses["flixel.addons.ui.Rounding"] = { __ename__ : ["flixel","addons","ui","Rounding"], __constructs__ : ["Floor","Ceil","Round","None"] };
flixel_addons_ui_Rounding.Floor = ["Floor",0];
flixel_addons_ui_Rounding.Floor.toString = $estr;
flixel_addons_ui_Rounding.Floor.__enum__ = flixel_addons_ui_Rounding;
flixel_addons_ui_Rounding.Ceil = ["Ceil",1];
flixel_addons_ui_Rounding.Ceil.toString = $estr;
flixel_addons_ui_Rounding.Ceil.__enum__ = flixel_addons_ui_Rounding;
flixel_addons_ui_Rounding.Round = ["Round",2];
flixel_addons_ui_Rounding.Round.toString = $estr;
flixel_addons_ui_Rounding.Round.__enum__ = flixel_addons_ui_Rounding;
flixel_addons_ui_Rounding.None = ["None",3];
flixel_addons_ui_Rounding.None.toString = $estr;
flixel_addons_ui_Rounding.None.__enum__ = flixel_addons_ui_Rounding;
var flixel_addons_ui_interfaces_IResizable = function() { };
$hxClasses["flixel.addons.ui.interfaces.IResizable"] = flixel_addons_ui_interfaces_IResizable;
flixel_addons_ui_interfaces_IResizable.__name__ = ["flixel","addons","ui","interfaces","IResizable"];
flixel_addons_ui_interfaces_IResizable.prototype = {
	__class__: flixel_addons_ui_interfaces_IResizable
	,__properties__: {set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width"}
};
var flixel_addons_ui_FlxUISprite = function(X,Y,SimpleGraphic) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._originalKey = "";
	this.resize_ratio_axis = 1;
	this.recycled = false;
	this.ptr_owner = null;
	this.broadcastToFlxUI = true;
	flixel_FlxSprite.call(this,X,Y,SimpleGraphic);
};
$hxClasses["flixel.addons.ui.FlxUISprite"] = flixel_addons_ui_FlxUISprite;
flixel_addons_ui_FlxUISprite.__name__ = ["flixel","addons","ui","FlxUISprite"];
flixel_addons_ui_FlxUISprite.__interfaces__ = [flixel_addons_ui_interfaces_IResizable,flixel_addons_ui_interfaces_IFlxUIWidget];
flixel_addons_ui_FlxUISprite.__super__ = flixel_FlxSprite;
flixel_addons_ui_FlxUISprite.prototype = $extend(flixel_FlxSprite.prototype,{
	set_resize_ratio: function(r) {
		this.resize_ratio = r;
		return r;
	}
	,set_resize_point: function(r) {
		if(r != null) {
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			this.resize_point = point;
			this.resize_point.set_x(r.x);
			this.resize_point.set_y(r.y);
		}
		return this.resize_point;
	}
	,recycle: function(data) {
		this.recycled = true;
	}
	,resize: function(w,h) {
		var old_width = this.get_width();
		var old_height = this.get_height();
		if(this.resize_ratio > 0) {
			if(Math.abs(w / h - this.resize_ratio) > 0.0001) {
				if(this.resize_ratio_axis == 1) {
					h = w * (1 / this.resize_ratio);
				} else {
					w = h * (1 / this.resize_ratio);
				}
			}
		}
		if(this._originalKey != "" && this._originalKey != null) {
			var newKey = flixel_addons_ui_U.loadScaledImage(this._originalKey,w,h);
			if(newKey != "" && newKey != null) {
				this.loadFromScaledGraphic(newKey);
			}
		}
		var diff_w = this.get_width() - old_width;
		var diff_h = this.get_height() - old_height;
		if(this.resize_point != null) {
			var delta_y = diff_h * this.resize_point.y;
			var _g = this;
			_g.set_x(_g.x - diff_w * this.resize_point.x);
			var _g1 = this;
			_g1.set_y(_g1.y - delta_y);
		}
	}
	,loadGraphicAtScale: function(GraphicKey,W,H) {
		this.loadGraphic(GraphicKey,false);
		this.resize(W,H);
	}
	,loadGraphic: function(Graphic,Animated,Width,Height,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Animated == null) {
			Animated = false;
		}
		var sprite = flixel_FlxSprite.prototype.loadGraphic.call(this,Graphic,Animated,Width,Height,Unique,Key);
		this._originalKey = this.graphic.assetsKey;
		if(this._originalKey == null) {
			this._originalKey = this.graphic.key;
		}
		return sprite;
	}
	,destroy: function() {
		this.ptr_owner = null;
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,loadFromScaledGraphic: function(Graphic,Animated,Width,Height,Unique,Key) {
		if(Unique == null) {
			Unique = false;
		}
		if(Height == null) {
			Height = 0;
		}
		if(Width == null) {
			Width = 0;
		}
		if(Animated == null) {
			Animated = false;
		}
		flixel_FlxSprite.prototype.loadGraphic.call(this,Graphic,Animated,Width,Height,Unique,Key);
	}
	,__class__: flixel_addons_ui_FlxUISprite
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{set_resize_point:"set_resize_point",set_resize_ratio:"set_resize_ratio"})
});
var openfl_geom_Rectangle = function(x,y,width,height) {
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.x = x;
	this.y = y;
	this.width = width;
	this.height = height;
};
$hxClasses["openfl.geom.Rectangle"] = openfl_geom_Rectangle;
openfl_geom_Rectangle.__name__ = ["openfl","geom","Rectangle"];
openfl_geom_Rectangle.prototype = {
	clone: function() {
		return new openfl_geom_Rectangle(this.x,this.y,this.width,this.height);
	}
	,contains: function(x,y) {
		if(x >= this.x && y >= this.y && x < this.get_right()) {
			return y < this.get_bottom();
		} else {
			return false;
		}
	}
	,containsPoint: function(point) {
		return this.contains(point.x,point.y);
	}
	,containsRect: function(rect) {
		if(rect.width <= 0 || rect.height <= 0) {
			if(rect.x > this.x && rect.y > this.y && rect.get_right() < this.get_right()) {
				return rect.get_bottom() < this.get_bottom();
			} else {
				return false;
			}
		} else if(rect.x >= this.x && rect.y >= this.y && rect.get_right() <= this.get_right()) {
			return rect.get_bottom() <= this.get_bottom();
		} else {
			return false;
		}
	}
	,copyFrom: function(sourceRect) {
		this.x = sourceRect.x;
		this.y = sourceRect.y;
		this.width = sourceRect.width;
		this.height = sourceRect.height;
	}
	,equals: function(toCompare) {
		if(toCompare != null && this.x == toCompare.x && this.y == toCompare.y && this.width == toCompare.width) {
			return this.height == toCompare.height;
		} else {
			return false;
		}
	}
	,inflate: function(dx,dy) {
		this.x -= dx;
		this.width += dx * 2;
		this.y -= dy;
		this.height += dy * 2;
	}
	,inflatePoint: function(point) {
		this.inflate(point.x,point.y);
	}
	,intersection: function(toIntersect) {
		var x0 = this.x < toIntersect.x ? toIntersect.x : this.x;
		var x1 = this.get_right() > toIntersect.get_right() ? toIntersect.get_right() : this.get_right();
		if(x1 <= x0) {
			return new openfl_geom_Rectangle();
		}
		var y0 = this.y < toIntersect.y ? toIntersect.y : this.y;
		var y1 = this.get_bottom() > toIntersect.get_bottom() ? toIntersect.get_bottom() : this.get_bottom();
		if(y1 <= y0) {
			return new openfl_geom_Rectangle();
		}
		return new openfl_geom_Rectangle(x0,y0,x1 - x0,y1 - y0);
	}
	,intersects: function(toIntersect) {
		if((this.get_right() > toIntersect.get_right() ? toIntersect.get_right() : this.get_right()) <= (this.x < toIntersect.x ? toIntersect.x : this.x)) {
			return false;
		}
		return (this.get_bottom() > toIntersect.get_bottom() ? toIntersect.get_bottom() : this.get_bottom()) > (this.y < toIntersect.y ? toIntersect.y : this.y);
	}
	,isEmpty: function() {
		if(!(this.width <= 0)) {
			return this.height <= 0;
		} else {
			return true;
		}
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
	}
	,offsetPoint: function(point) {
		this.x += point.x;
		this.y += point.y;
	}
	,setEmpty: function() {
		this.x = this.y = this.width = this.height = 0;
	}
	,setTo: function(xa,ya,widtha,heighta) {
		this.x = xa;
		this.y = ya;
		this.width = widtha;
		this.height = heighta;
	}
	,toString: function() {
		return "(x=" + this.x + ", y=" + this.y + ", width=" + this.width + ", height=" + this.height + ")";
	}
	,union: function(toUnion) {
		if(this.width == 0 || this.height == 0) {
			return toUnion.clone();
		} else if(toUnion.width == 0 || toUnion.height == 0) {
			return this.clone();
		}
		var x0 = this.x > toUnion.x ? toUnion.x : this.x;
		var y0 = this.y > toUnion.y ? toUnion.y : this.y;
		return new openfl_geom_Rectangle(x0,y0,(this.get_right() < toUnion.get_right() ? toUnion.get_right() : this.get_right()) - x0,(this.get_bottom() < toUnion.get_bottom() ? toUnion.get_bottom() : this.get_bottom()) - y0);
	}
	,__contract: function(x,y,width,height) {
		if(this.width == 0 && this.height == 0) {
			return;
		}
		if(this.x < x) {
			this.x = x;
		}
		if(this.y < y) {
			this.y = y;
		}
		if(this.get_right() > x + width) {
			this.width = x + width - this.x;
		}
		if(this.get_bottom() > y + height) {
			this.height = y + height - this.y;
		}
	}
	,__expand: function(x,y,width,height) {
		if(this.width == 0 && this.height == 0) {
			this.x = x;
			this.y = y;
			this.width = width;
			this.height = height;
			return;
		}
		var cacheRight = this.get_right();
		var cacheBottom = this.get_bottom();
		if(this.x > x) {
			this.x = x;
			this.width = cacheRight - x;
		}
		if(this.y > y) {
			this.y = y;
			this.height = cacheBottom - y;
		}
		if(cacheRight < x + width) {
			this.width = x + width - this.x;
		}
		if(cacheBottom < y + height) {
			this.height = y + height - this.y;
		}
	}
	,__toLimeRectangle: function() {
		return new lime_math_Rectangle(this.x,this.y,this.width,this.height);
	}
	,__transform: function(rect,m) {
		var tx0 = m.a * this.x + m.c * this.y;
		var tx1 = tx0;
		var ty0 = m.b * this.x + m.d * this.y;
		var ty1 = ty0;
		var tx = m.a * (this.x + this.width) + m.c * this.y;
		var ty = m.b * (this.x + this.width) + m.d * this.y;
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		tx = m.a * (this.x + this.width) + m.c * (this.y + this.height);
		ty = m.b * (this.x + this.width) + m.d * (this.y + this.height);
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		tx = m.a * this.x + m.c * (this.y + this.height);
		ty = m.b * this.x + m.d * (this.y + this.height);
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		rect.setTo(tx0 + m.tx,ty0 + m.ty,tx1 - tx0,ty1 - ty0);
	}
	,get_bottom: function() {
		return this.y + this.height;
	}
	,set_bottom: function(b) {
		this.height = b - this.y;
		return b;
	}
	,get_bottomRight: function() {
		return new openfl_geom_Point(this.x + this.width,this.y + this.height);
	}
	,set_bottomRight: function(p) {
		this.width = p.x - this.x;
		this.height = p.y - this.y;
		return p.clone();
	}
	,get_left: function() {
		return this.x;
	}
	,set_left: function(l) {
		this.width -= l - this.x;
		this.x = l;
		return l;
	}
	,get_right: function() {
		return this.x + this.width;
	}
	,set_right: function(r) {
		this.width = r - this.x;
		return r;
	}
	,get_size: function() {
		return new openfl_geom_Point(this.width,this.height);
	}
	,set_size: function(p) {
		this.width = p.x;
		this.height = p.y;
		return p.clone();
	}
	,get_top: function() {
		return this.y;
	}
	,set_top: function(t) {
		this.height -= t - this.y;
		this.y = t;
		return t;
	}
	,get_topLeft: function() {
		return new openfl_geom_Point(this.x,this.y);
	}
	,set_topLeft: function(p) {
		this.x = p.x;
		this.y = p.y;
		return p.clone();
	}
	,__class__: openfl_geom_Rectangle
	,__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 flixel_addons_ui_FlxUI9SliceSprite = function(X,Y,Graphic,Rect,Slice9,Tile,Smooth,Id,Ratio,Resize_point,Resize_axis,DeferResize,Color) {
	if(Color == null) {
		Color = -1;
	}
	if(DeferResize == null) {
		DeferResize = false;
	}
	if(Resize_axis == null) {
		Resize_axis = 1;
	}
	if(Ratio == null) {
		Ratio = -1;
	}
	if(Id == null) {
		Id = "";
	}
	if(Smooth == null) {
		Smooth = false;
	}
	if(Tile == null) {
		Tile = 0;
	}
	this._asset_id = "";
	this._smooth = false;
	this._tile = 0;
	this._slice9 = null;
	this.paintScale9_id = "";
	flixel_addons_ui_FlxUISprite.call(this,X,Y,null);
	this.set_color(Color);
	this._slice9 = Slice9;
	this._tile = Tile;
	this._smooth = Smooth;
	this._asset_id = "";
	if(Graphic == null) {
		Graphic = "flixel/flixel-ui/img/chrome.png";
	}
	if(typeof(Graphic) == "string") {
		this._asset_id = Graphic;
		this._raw_pixels = null;
	} else if(js_Boot.__instanceof(Graphic,openfl_display_BitmapData)) {
		this._asset_id = Id;
		this._raw_pixels = Graphic;
	} else if(js_Boot.__instanceof(Graphic,flixel_graphics_FlxGraphic)) {
		var fg = Graphic;
		this._asset_id = fg.key;
		this._raw_pixels = fg.bitmap;
	}
	this.set_resize_ratio(Ratio);
	this.resize_ratio_axis = Resize_axis;
	if(Resize_point != null) {
		this.set_resize_point(Resize_point);
	}
	if(DeferResize) {
		var pt = flixel_addons_ui_U.applyResize(this.resize_ratio,this.resize_ratio_axis,Rect.width,Rect.height);
		this.set_width(pt.x);
		this.set_height(pt.y);
	} else {
		this.resize(Rect.width,Rect.height);
	}
};
$hxClasses["flixel.addons.ui.FlxUI9SliceSprite"] = flixel_addons_ui_FlxUI9SliceSprite;
flixel_addons_ui_FlxUI9SliceSprite.__name__ = ["flixel","addons","ui","FlxUI9SliceSprite"];
flixel_addons_ui_FlxUI9SliceSprite.__interfaces__ = [flixel_addons_ui_interfaces_IFlxUIWidget,flixel_addons_ui_interfaces_IResizable];
flixel_addons_ui_FlxUI9SliceSprite.sectionCache = null;
flixel_addons_ui_FlxUI9SliceSprite.cacheCounter = null;
flixel_addons_ui_FlxUI9SliceSprite._staticRects = null;
flixel_addons_ui_FlxUI9SliceSprite.getRectFromString = function(str) {
	var coords = str.split(",");
	var rect = null;
	if(coords != null && coords.length == 4) {
		rect = new openfl_geom_Rectangle(Std.parseInt(coords[0]),Std.parseInt(coords[1]),Std.parseInt(coords[2]),Std.parseInt(coords[3]));
	}
	return rect;
};
flixel_addons_ui_FlxUI9SliceSprite.getRectIntsFromString = function(str) {
	var coords = str.split(",");
	if(coords != null && coords.length == 4) {
		return [Std.parseInt(coords[0]),Std.parseInt(coords[1]),Std.parseInt(coords[2]),Std.parseInt(coords[3])];
	}
	return null;
};
flixel_addons_ui_FlxUI9SliceSprite.paintScale9 = function(g,assetID,scale9,rc,tile,smooth,raw) {
	if(smooth == null) {
		smooth = false;
	}
	if(tile == null) {
		tile = 0;
	}
	if(scale9 != null) {
		var w;
		var h;
		if(raw == null) {
			var assetBmp = flixel_addons_ui_U.getBmp(assetID);
			if(assetBmp != null) {
				w = assetBmp.width;
				h = assetBmp.height;
			} else {
				var assetFlx = flixel_FlxG.bitmap._cache.get(assetID);
				w = assetFlx.width;
				h = assetFlx.height;
			}
		} else {
			w = raw.width;
			h = raw.height;
		}
		var x1 = scale9[0];
		var y1 = scale9[1];
		var x2 = scale9[2];
		var y2 = scale9[3];
		if(flixel_addons_ui_FlxUI9SliceSprite._staticRects == null) {
			flixel_addons_ui_FlxUI9SliceSprite._staticRects = new haxe_ds_StringMap();
			var this1 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = 0;
			_this.height = 0;
			_this._inPool = false;
			var _this1 = this1;
			if(__map_reserved["top.left"] != null) {
				_this1.setReserved("top.left",_this);
			} else {
				_this1.h["top.left"] = _this;
			}
			var this2 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
			var _this2 = flixel_math_FlxRect._pool.get();
			_this2.x = 0;
			_this2.y = 0;
			_this2.width = 0;
			_this2.height = 0;
			_this2._inPool = false;
			var _this3 = this2;
			if(__map_reserved["top"] != null) {
				_this3.setReserved("top",_this2);
			} else {
				_this3.h["top"] = _this2;
			}
			var this3 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
			var _this4 = flixel_math_FlxRect._pool.get();
			_this4.x = 0;
			_this4.y = 0;
			_this4.width = 0;
			_this4.height = 0;
			_this4._inPool = false;
			var _this5 = this3;
			if(__map_reserved["top.right"] != null) {
				_this5.setReserved("top.right",_this4);
			} else {
				_this5.h["top.right"] = _this4;
			}
			var this4 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
			var _this6 = flixel_math_FlxRect._pool.get();
			_this6.x = 0;
			_this6.y = 0;
			_this6.width = 0;
			_this6.height = 0;
			_this6._inPool = false;
			var _this7 = this4;
			if(__map_reserved["left"] != null) {
				_this7.setReserved("left",_this6);
			} else {
				_this7.h["left"] = _this6;
			}
			var this5 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
			var _this8 = flixel_math_FlxRect._pool.get();
			_this8.x = 0;
			_this8.y = 0;
			_this8.width = 0;
			_this8.height = 0;
			_this8._inPool = false;
			var _this9 = this5;
			if(__map_reserved["middle"] != null) {
				_this9.setReserved("middle",_this8);
			} else {
				_this9.h["middle"] = _this8;
			}
			var this6 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
			var _this10 = flixel_math_FlxRect._pool.get();
			_this10.x = 0;
			_this10.y = 0;
			_this10.width = 0;
			_this10.height = 0;
			_this10._inPool = false;
			var _this11 = this6;
			if(__map_reserved["right"] != null) {
				_this11.setReserved("right",_this10);
			} else {
				_this11.h["right"] = _this10;
			}
			var this7 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
			var _this12 = flixel_math_FlxRect._pool.get();
			_this12.x = 0;
			_this12.y = 0;
			_this12.width = 0;
			_this12.height = 0;
			_this12._inPool = false;
			var _this13 = this7;
			if(__map_reserved["bottom.left"] != null) {
				_this13.setReserved("bottom.left",_this12);
			} else {
				_this13.h["bottom.left"] = _this12;
			}
			var this8 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
			var _this14 = flixel_math_FlxRect._pool.get();
			_this14.x = 0;
			_this14.y = 0;
			_this14.width = 0;
			_this14.height = 0;
			_this14._inPool = false;
			var _this15 = this8;
			if(__map_reserved["bottom"] != null) {
				_this15.setReserved("bottom",_this14);
			} else {
				_this15.h["bottom"] = _this14;
			}
			var this9 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
			var _this16 = flixel_math_FlxRect._pool.get();
			_this16.x = 0;
			_this16.y = 0;
			_this16.width = 0;
			_this16.height = 0;
			_this16._inPool = false;
			var _this17 = this9;
			if(__map_reserved["bottom.right"] != null) {
				_this17.setReserved("bottom.right",_this16);
			} else {
				_this17.h["bottom.right"] = _this16;
			}
		}
		var _this18 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
		var _this19 = __map_reserved["top.left"] != null ? _this18.getReserved("top.left") : _this18.h["top.left"];
		_this19.x = 0;
		_this19.y = 0;
		_this19.width = x1;
		_this19.height = y1;
		var _this20 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
		var _this21 = __map_reserved["top"] != null ? _this20.getReserved("top") : _this20.h["top"];
		_this21.x = x1;
		_this21.y = 0;
		_this21.width = x2 - x1;
		_this21.height = y1;
		var _this22 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
		var _this23 = __map_reserved["top.right"] != null ? _this22.getReserved("top.right") : _this22.h["top.right"];
		_this23.x = x2;
		_this23.y = 0;
		_this23.width = w - x2;
		_this23.height = y1;
		var _this24 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
		var _this25 = __map_reserved["left"] != null ? _this24.getReserved("left") : _this24.h["left"];
		_this25.x = 0;
		_this25.y = y1;
		_this25.width = x1;
		_this25.height = y2 - y1;
		var _this26 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
		var _this27 = __map_reserved["middle"] != null ? _this26.getReserved("middle") : _this26.h["middle"];
		_this27.x = x1;
		_this27.y = y1;
		_this27.width = x2 - x1;
		_this27.height = y2 - y1;
		var _this28 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
		var _this29 = __map_reserved["right"] != null ? _this28.getReserved("right") : _this28.h["right"];
		_this29.x = x2;
		_this29.y = y1;
		_this29.width = w - x2;
		_this29.height = y2 - y1;
		var _this30 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
		var _this31 = __map_reserved["bottom.left"] != null ? _this30.getReserved("bottom.left") : _this30.h["bottom.left"];
		_this31.x = 0;
		_this31.y = y2;
		_this31.width = x1;
		_this31.height = h - y2;
		var _this32 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
		var _this33 = __map_reserved["bottom"] != null ? _this32.getReserved("bottom") : _this32.h["bottom"];
		_this33.x = x1;
		_this33.y = y2;
		_this33.width = x2 - x1;
		_this33.height = h - y2;
		var _this34 = flixel_addons_ui_FlxUI9SliceSprite._staticRects;
		var _this35 = __map_reserved["bottom.right"] != null ? _this34.getReserved("bottom.right") : _this34.h["bottom.right"];
		_this35.x = x2;
		_this35.y = y2;
		_this35.width = w - x2;
		_this35.height = h - y2;
		if(flixel_addons_ui_FlxUI9SliceSprite.cacheCounter == null) {
			flixel_addons_ui_FlxUI9SliceSprite.cacheCounter = new haxe_ds_StringMap();
		}
		var uniqueID = flixel_addons_ui_FlxUI9SliceSprite.makePaintScale9Id(assetID,scale9,rc);
		var _this36 = flixel_addons_ui_FlxUI9SliceSprite.cacheCounter;
		var sectionCounter = __map_reserved[uniqueID] != null ? _this36.getReserved(uniqueID) : _this36.h[uniqueID];
		if(sectionCounter == null) {
			sectionCounter = { useCount : 0, subKeys : []};
			var _g = 0;
			while(_g < 9) {
				var rect;
				switch(_g++) {
				case 0:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("top.left");
					break;
				case 1:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("top");
					break;
				case 2:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("top.right");
					break;
				case 3:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("left");
					break;
				case 4:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("middle");
					break;
				case 5:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("right");
					break;
				case 6:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("bottom.left");
					break;
				case 7:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("bottom");
					break;
				case 8:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("bottom.right");
					break;
				default:
					rect = flixel_addons_ui_FlxUI9SliceSprite._staticRects.get("top.left");
				}
				sectionCounter.subKeys.push(assetID + "_" + rect.x + "_" + rect.y + "_" + rect.width + "_" + rect.height + "_");
			}
			var _this37 = flixel_addons_ui_FlxUI9SliceSprite.cacheCounter;
			if(__map_reserved[uniqueID] != null) {
				_this37.setReserved(uniqueID,sectionCounter);
			} else {
				_this37.h[uniqueID] = sectionCounter;
			}
		}
		flixel_addons_ui_FlxUI9SliceSprite.paintCompoundBitmap(g,assetID,flixel_addons_ui_FlxUI9SliceSprite._staticRects,rc,tile,smooth,raw);
		return uniqueID;
	}
	return "";
};
flixel_addons_ui_FlxUI9SliceSprite.makePaintScale9Id = function(assetId,slice9,rect) {
	var tmp = assetId + "_" + slice9.join(",") + "_";
	var value = rect.x;
	var _this = flixel_util_LabelValuePair._pool.get();
	_this.label = "x";
	_this.value = value;
	var value1 = rect.y;
	var _this1 = flixel_util_LabelValuePair._pool.get();
	_this1.label = "y";
	_this1.value = value1;
	var value2 = rect.width;
	var _this2 = flixel_util_LabelValuePair._pool.get();
	_this2.label = "w";
	_this2.value = value2;
	var value3 = rect.height;
	var _this3 = flixel_util_LabelValuePair._pool.get();
	_this3.label = "h";
	_this3.value = value3;
	return tmp + flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3]);
};
flixel_addons_ui_FlxUI9SliceSprite.paintCompoundBitmap = function(g,assetID,sourceRects,targetRect,tile,smooth,raw) {
	if(smooth == null) {
		smooth = false;
	}
	if(tile == null) {
		tile = 0;
	}
	targetRect.x = targetRect.x | 0;
	targetRect.y = targetRect.y | 0;
	targetRect.width = targetRect.width | 0;
	targetRect.height = targetRect.height | 0;
	var tl = __map_reserved["top.left"] != null ? sourceRects.getReserved("top.left") : sourceRects.h["top.left"];
	if(tl != null) {
		var _this = flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2;
		_this.x = 0;
		_this.y = 0;
		_this.width = tl.width;
		_this.height = tl.height;
		flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection(g,assetID,tl,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2,null,0,smooth,raw);
	}
	var tr = __map_reserved["top.right"] != null ? sourceRects.getReserved("top.right") : sourceRects.h["top.right"];
	if(tr != null) {
		var _this1 = flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2;
		_this1.x = targetRect.width - tr.width;
		_this1.y = 0;
		_this1.width = tr.width;
		_this1.height = tr.height;
		flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection(g,assetID,tr,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2,null,0,smooth,raw);
	}
	var t = __map_reserved["top"] != null ? sourceRects.getReserved("top") : sourceRects.h["top"];
	if(t != null) {
		var _this2 = flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2;
		_this2.x = tl.width;
		_this2.y = 0;
		_this2.width = targetRect.width - tl.width - tr.width;
		_this2.height = t.height;
		flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection(g,assetID,t,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2,null,tile & 16,smooth,raw);
	}
	var bl = __map_reserved["bottom.left"] != null ? sourceRects.getReserved("bottom.left") : sourceRects.h["bottom.left"];
	if(bl != null) {
		var _this3 = flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2;
		_this3.x = 0;
		_this3.y = targetRect.height - bl.height;
		_this3.width = bl.width;
		_this3.height = bl.height;
		flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection(g,assetID,bl,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2,null,0,smooth,raw);
	}
	var br = __map_reserved["bottom.right"] != null ? sourceRects.getReserved("bottom.right") : sourceRects.h["bottom.right"];
	if(br != null) {
		var _this4 = flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2;
		_this4.x = targetRect.width - br.width;
		_this4.y = targetRect.height - br.height;
		_this4.width = br.width;
		_this4.height = br.height;
		flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection(g,assetID,br,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2,null,0,smooth,raw);
	}
	var b = __map_reserved["bottom"] != null ? sourceRects.getReserved("bottom") : sourceRects.h["bottom"];
	if(b != null) {
		var _this5 = flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2;
		_this5.x = bl.width;
		_this5.y = targetRect.height - b.height;
		_this5.width = targetRect.width - bl.width - br.width;
		_this5.height = b.height;
		flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection(g,assetID,b,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2,null,tile & 16,smooth,raw);
	}
	var l = __map_reserved["left"] != null ? sourceRects.getReserved("left") : sourceRects.h["left"];
	if(l != null) {
		var _this6 = flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2;
		_this6.x = 0;
		_this6.y = tl.height;
		_this6.width = l.width;
		_this6.height = targetRect.height - tl.height - bl.height;
		flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection(g,assetID,l,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2,null,tile & 1,smooth,raw);
	}
	var r = __map_reserved["right"] != null ? sourceRects.getReserved("right") : sourceRects.h["right"];
	if(r != null) {
		var _this7 = flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2;
		_this7.x = targetRect.width - r.width;
		_this7.y = tr.height;
		_this7.width = r.width;
		_this7.height = targetRect.height - tl.height - bl.height;
		flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection(g,assetID,r,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2,null,tile & 1,smooth,raw);
	}
	var m = __map_reserved["middle"] != null ? sourceRects.getReserved("middle") : sourceRects.h["middle"];
	if(m != null) {
		var _this8 = flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2;
		_this8.x = l.width;
		_this8.y = t.height;
		_this8.width = targetRect.width - l.width - r.width;
		_this8.height = targetRect.height - t.height - b.height;
		flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection(g,assetID,m,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2,null,tile,smooth,raw);
	}
};
flixel_addons_ui_FlxUI9SliceSprite.paintBitmapSection = function(g,assetId,src,dst,srcData,tile,smooth,raw) {
	if(smooth == null) {
		smooth = false;
	}
	if(tile == null) {
		tile = 0;
	}
	if(srcData == null) {
		if(raw != null) {
			srcData = raw;
		} else {
			srcData = flixel_addons_ui_U.getBmp(assetId);
		}
	}
	src.x = src.x | 0;
	src.y = src.y | 0;
	src.width = src.width | 0;
	src.height = src.height | 0;
	dst.x = dst.x | 0;
	dst.y = dst.y | 0;
	dst.width = dst.width | 0;
	dst.height = dst.height | 0;
	var section = null;
	var cacheId = null;
	if(flixel_addons_ui_FlxUI9SliceSprite.useSectionCache == true && assetId != null) {
		if(flixel_addons_ui_FlxUI9SliceSprite.sectionCache == null) {
			flixel_addons_ui_FlxUI9SliceSprite.sectionCache = new haxe_ds_StringMap();
		}
		cacheId = assetId + "_" + src.x + "_" + src.y + "_" + src.width + "_" + src.height + "_";
		var _this = flixel_addons_ui_FlxUI9SliceSprite.sectionCache;
		if(__map_reserved[cacheId] != null) {
			section = _this.getReserved(cacheId);
		} else {
			section = _this.h[cacheId];
		}
	}
	if(section == null) {
		section = new openfl_display_BitmapData(src.width | 0,src.height | 0,true,16777215);
		flixel_addons_ui_FlxUI9SliceSprite._staticRect2.x = src.x;
		flixel_addons_ui_FlxUI9SliceSprite._staticRect2.y = src.y;
		flixel_addons_ui_FlxUI9SliceSprite._staticRect2.width = src.width;
		flixel_addons_ui_FlxUI9SliceSprite._staticRect2.height = src.height;
		section.copyPixels(srcData,flixel_addons_ui_FlxUI9SliceSprite._staticRect2,flixel_addons_ui_FlxUI9SliceSprite._staticPointZero);
		if(flixel_addons_ui_FlxUI9SliceSprite.useSectionCache == true && cacheId != null) {
			var _this1 = flixel_addons_ui_FlxUI9SliceSprite.sectionCache;
			if(__map_reserved[cacheId] != null) {
				_this1.setReserved(cacheId,section);
			} else {
				_this1.h[cacheId] = section;
			}
		}
		flixel_addons_ui_FlxUI9SliceSprite.bitmapsCreated++;
	}
	if(dst.width > 0 && dst.height > 0) {
		flixel_addons_ui_FlxUI9SliceSprite._staticRect2.x = dst.x;
		flixel_addons_ui_FlxUI9SliceSprite._staticRect2.y = dst.y;
		flixel_addons_ui_FlxUI9SliceSprite._staticRect2.width = dst.width;
		flixel_addons_ui_FlxUI9SliceSprite._staticRect2.height = dst.height;
		flixel_addons_ui_FlxUI9SliceSprite.bitmapFillRect(g,flixel_addons_ui_FlxUI9SliceSprite._staticRect2,section,tile,smooth);
	}
};
flixel_addons_ui_FlxUI9SliceSprite.bitmapFillRect = function(g,dst,section,tile,smooth_) {
	if(smooth_ == null) {
		smooth_ = false;
	}
	if(tile == null) {
		tile = 0;
	}
	var final_pixels = new openfl_display_BitmapData(dst.width | 0,dst.height | 0,true,0);
	flixel_addons_ui_FlxUI9SliceSprite._staticMatrix.identity();
	flixel_addons_ui_FlxUI9SliceSprite._staticRect.x = 0;
	flixel_addons_ui_FlxUI9SliceSprite._staticRect.y = 0;
	flixel_addons_ui_FlxUI9SliceSprite._staticRect.width = section.width;
	flixel_addons_ui_FlxUI9SliceSprite._staticRect.height = section.height;
	if((tile & 16) == 0) {
		flixel_addons_ui_FlxUI9SliceSprite._staticMatrix.scale(dst.width / section.width,1.0);
		flixel_addons_ui_FlxUI9SliceSprite._staticRect.width = dst.width;
	}
	if((tile & 1) == 0) {
		flixel_addons_ui_FlxUI9SliceSprite._staticMatrix.scale(1.0,dst.height / section.height);
		flixel_addons_ui_FlxUI9SliceSprite._staticRect.height = dst.height;
	}
	if(section.width == dst.width && section.height == dst.height) {
		flixel_addons_ui_FlxUI9SliceSprite._staticPoint.x = 0;
		flixel_addons_ui_FlxUI9SliceSprite._staticPoint.y = 0;
		final_pixels.copyPixels(section,section.rect,flixel_addons_ui_FlxUI9SliceSprite._staticPoint);
	} else if(smooth_) {
		final_pixels.draw(section,flixel_addons_ui_FlxUI9SliceSprite._staticMatrix,null,null,null,true);
	} else {
		final_pixels.draw(section,flixel_addons_ui_FlxUI9SliceSprite._staticMatrix,null,null,null,false);
	}
	if(tile != 0) {
		if((tile & 16) == 16) {
			flixel_addons_ui_FlxUI9SliceSprite._staticPoint.x = 0;
			flixel_addons_ui_FlxUI9SliceSprite._staticPoint.y = 0;
			while(flixel_addons_ui_FlxUI9SliceSprite._staticPoint.x < dst.width) {
				flixel_addons_ui_FlxUI9SliceSprite._staticPoint.x += flixel_addons_ui_FlxUI9SliceSprite._staticRect.width;
				final_pixels.copyPixels(final_pixels,flixel_addons_ui_FlxUI9SliceSprite._staticRect,flixel_addons_ui_FlxUI9SliceSprite._staticPoint);
			}
		}
		if((tile & 1) == 1) {
			flixel_addons_ui_FlxUI9SliceSprite._staticPoint.x = 0;
			flixel_addons_ui_FlxUI9SliceSprite._staticPoint.y = 0;
			flixel_addons_ui_FlxUI9SliceSprite._staticRect.width = final_pixels.width;
			while(flixel_addons_ui_FlxUI9SliceSprite._staticPoint.y < dst.height) {
				flixel_addons_ui_FlxUI9SliceSprite._staticPoint.y += flixel_addons_ui_FlxUI9SliceSprite._staticRect.height;
				final_pixels.copyPixels(final_pixels,flixel_addons_ui_FlxUI9SliceSprite._staticRect,flixel_addons_ui_FlxUI9SliceSprite._staticPoint);
			}
		}
	}
	flixel_addons_ui_FlxUI9SliceSprite._staticPoint.x = dst.x;
	flixel_addons_ui_FlxUI9SliceSprite._staticPoint.y = dst.y;
	g.copyPixels(final_pixels,final_pixels.rect,flixel_addons_ui_FlxUI9SliceSprite._staticPoint);
	flixel_util_FlxDestroyUtil.dispose(final_pixels);
};
flixel_addons_ui_FlxUI9SliceSprite.__super__ = flixel_addons_ui_FlxUISprite;
flixel_addons_ui_FlxUI9SliceSprite.prototype = $extend(flixel_addons_ui_FlxUISprite.prototype,{
	destroy: function() {
		this.noLongerUsingCachedID(this.paintScale9_id);
		flixel_addons_ui_FlxUISprite.prototype.destroy.call(this);
	}
	,resize: function(w,h) {
		if((w | 0) < 1) {
			w = 1;
		}
		if((h | 0) < 1) {
			h = 1;
		}
		var old_width = this.get_width();
		var old_height = this.get_height();
		var pt = flixel_addons_ui_U.applyResize(this.resize_ratio,this.resize_ratio_axis,w,h);
		w = pt.x;
		h = pt.y;
		var iw = pt.x | 0;
		var ih = pt.y | 0;
		if(this._slice9 == null || this._slice9 == []) {
			this._slice9 = [4,4,7,7];
		}
		var key = this._asset_id + "_" + this._slice9.join(",") + "_" + iw + "x" + ih + "_" + this._tile + "_" + Std.string(this._smooth);
		if(flixel_FlxG.bitmap._cache.get(key) != null) {
			this.loadGraphic(key,false,iw,ih);
		} else {
			var bmpCanvas = new openfl_display_BitmapData(w | 0,h | 0);
			flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect.x = 0;
			flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect.y = 0;
			flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect.width = w;
			flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect.height = h;
			var oldID = this.paintScale9_id;
			if(flixel_addons_ui_FlxUI9SliceSprite.makePaintScale9Id(this._asset_id,this._slice9,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect) != oldID) {
				this.paintScale9_id = flixel_addons_ui_FlxUI9SliceSprite.paintScale9(bmpCanvas,this._asset_id,this._slice9,flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect,this._tile,this._smooth,this._raw_pixels);
				var key1 = this.paintScale9_id;
				var _this = flixel_addons_ui_FlxUI9SliceSprite.cacheCounter;
				var sectionCounter = __map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1];
				sectionCounter.useCount++;
				this.noLongerUsingCachedID(oldID);
			}
			this.loadGraphic(bmpCanvas,false,bmpCanvas.width,bmpCanvas.height,false,key);
		}
		var diff_w = this.get_width() - old_width;
		var diff_h = this.get_height() - old_height;
		if(this.resize_point != null) {
			var delta_y = diff_h * this.resize_point.y;
			var _g = this;
			_g.set_x(_g.x - diff_w * this.resize_point.x);
			var _g1 = this;
			_g1.set_y(_g1.y - delta_y);
		}
	}
	,noLongerUsingCachedID: function(id) {
		var _this = flixel_addons_ui_FlxUI9SliceSprite.cacheCounter;
		if(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id)) {
			var _this1 = flixel_addons_ui_FlxUI9SliceSprite.cacheCounter;
			var oldCounter = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
			oldCounter.useCount--;
			if(oldCounter.useCount <= 0) {
				this.purgeSections(id);
			}
		}
	}
	,purgeSections: function(id) {
		var _this = flixel_addons_ui_FlxUI9SliceSprite.cacheCounter;
		var counter = __map_reserved[id] != null ? _this.getReserved(id) : _this.h[id];
		if(counter != null) {
			var _g = 0;
			var _g1 = counter.subKeys;
			while(_g < _g1.length) {
				var key = _g1[_g];
				++_g;
				flixel_addons_ui_FlxUI9SliceSprite.sectionCache.remove(key);
			}
			counter.subKeys = null;
			flixel_addons_ui_FlxUI9SliceSprite.cacheCounter.remove(id);
		}
	}
	,__class__: flixel_addons_ui_FlxUI9SliceSprite
});
var flixel_addons_ui_FlxUIAssets = function() { };
$hxClasses["flixel.addons.ui.FlxUIAssets"] = flixel_addons_ui_FlxUIAssets;
flixel_addons_ui_FlxUIAssets.__name__ = ["flixel","addons","ui","FlxUIAssets"];
var flixel_ui_FlxBar = function(x,y,direction,width,height,parentRef,variable,min,max,showBorder) {
	if(showBorder == null) {
		showBorder = false;
	}
	if(max == null) {
		max = 100;
	}
	if(min == null) {
		min = 0;
	}
	if(variable == null) {
		variable = "";
	}
	if(height == null) {
		height = 10;
	}
	if(width == null) {
		width = 100;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this._maxPercent = 100;
	this.numDivisions = 100;
	this.killOnEmpty = false;
	this.fixedPosition = true;
	flixel_FlxSprite.call(this,x,y);
	if(direction == null) {
		direction = flixel_ui_FlxBarFillDirection.LEFT_TO_RIGHT;
	} else {
		direction = direction;
	}
	this.barWidth = width;
	this.barHeight = height;
	this._filledBarPoint = new openfl_geom_Point();
	this._filledBarRect = new openfl_geom_Rectangle();
	if(flixel_FlxG.renderBlit) {
		this._zeroOffset = new openfl_geom_Point();
		this._emptyBarRect = new openfl_geom_Rectangle();
		this.makeGraphic(width,height,0,true);
	} else {
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = 0;
		_this.height = 0;
		_this._inPool = false;
		this._filledFlxRect = _this;
	}
	if(parentRef != null) {
		this.parent = parentRef;
		this.parentVariable = variable;
	}
	this.set_fillDirection(direction);
	this.createFilledBar(-16756480,-16714752,showBorder);
	this.setRange(min,max);
};
$hxClasses["flixel.ui.FlxBar"] = flixel_ui_FlxBar;
flixel_ui_FlxBar.__name__ = ["flixel","ui","FlxBar"];
flixel_ui_FlxBar.__super__ = flixel_FlxSprite;
flixel_ui_FlxBar.prototype = $extend(flixel_FlxSprite.prototype,{
	destroy: function() {
		this.positionOffset = flixel_util_FlxDestroyUtil.put(this.positionOffset);
		if(flixel_FlxG.renderBlit) {
			this._frontFrame = null;
			this._filledFlxRect = flixel_util_FlxDestroyUtil.put(this._filledFlxRect);
		} else {
			this._emptyBarRect = null;
			this._zeroOffset = null;
			this._emptyBar = flixel_util_FlxDestroyUtil.dispose(this._emptyBar);
			this._filledBar = flixel_util_FlxDestroyUtil.dispose(this._filledBar);
		}
		this._filledBarRect = null;
		this._filledBarPoint = null;
		this.parent = null;
		this.positionOffset = null;
		this.emptyCallback = null;
		this.filledCallback = null;
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,trackParent: function(offsetX,offsetY) {
		this.fixedPosition = false;
		var point = flixel_math_FlxPoint._pool.get().set(offsetX,offsetY);
		point._inPool = false;
		this.positionOffset = point;
		if(Object.prototype.hasOwnProperty.call(this.parent,"scrollFactor")) {
			this.scrollFactor.set_x(this.parent.scrollFactor.x);
			this.scrollFactor.set_y(this.parent.scrollFactor.y);
		}
	}
	,setParent: function(parentRef,variable,track,offsetX,offsetY) {
		if(offsetY == null) {
			offsetY = 0;
		}
		if(offsetX == null) {
			offsetX = 0;
		}
		if(track == null) {
			track = false;
		}
		this.parent = parentRef;
		this.parentVariable = variable;
		if(track) {
			this.trackParent(offsetX,offsetY);
		}
		this.updateValueFromParent();
	}
	,stopTrackingParent: function(posX,posY) {
		this.fixedPosition = true;
		this.set_x(posX);
		this.set_y(posY);
	}
	,setCallbacks: function(onEmpty,onFilled,killOnEmpty) {
		if(killOnEmpty == null) {
			killOnEmpty = false;
		}
		this.emptyCallback = onEmpty != null ? onEmpty : this.emptyCallback;
		this.filledCallback = onFilled != null ? onFilled : this.filledCallback;
		this.killOnEmpty = killOnEmpty;
	}
	,setRange: function(min,max) {
		if(max <= min) {
			throw new js__$Boot_HaxeError("FlxBar: max cannot be less than or equal to min");
		}
		this.min = min;
		this.max = max;
		this.range = max - min;
		this.pct = this.range / this._maxPercent;
		this.pxPerPercent = this._fillHorizontal ? this.barWidth / this._maxPercent : this.barHeight / this._maxPercent;
		if(!isNaN(this.get_value())) {
			this.set_value(Math.max(min,Math.min(this.get_value(),max)));
		} else {
			this.set_value(min);
		}
	}
	,createFilledBar: function(empty,fill,showBorder,border) {
		if(border == null) {
			border = -1;
		}
		if(showBorder == null) {
			showBorder = false;
		}
		this.createColoredEmptyBar(empty,showBorder,border);
		this.createColoredFilledBar(fill,showBorder,border);
		return this;
	}
	,createColoredEmptyBar: function(empty,showBorder,border) {
		if(border == null) {
			border = -1;
		}
		if(showBorder == null) {
			showBorder = false;
		}
		if(flixel_FlxG.renderTile) {
			var emptyKey = "empty: " + this.barWidth + "x" + this.barHeight + ":" + ("0x" + StringTools.hex(empty >> 24 & 255,2) + StringTools.hex(empty >> 16 & 255,2) + StringTools.hex(empty >> 8 & 255,2) + StringTools.hex(empty & 255,2));
			if(showBorder) {
				emptyKey += ",border: " + ("0x" + StringTools.hex(border >> 24 & 255,2) + StringTools.hex(border >> 16 & 255,2) + StringTools.hex(border >> 8 & 255,2) + StringTools.hex(border & 255,2));
			}
			if(flixel_FlxG.bitmap._cache.get(emptyKey) == null) {
				var emptyBar = null;
				if(showBorder) {
					emptyBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,border);
					emptyBar.fillRect(new openfl_geom_Rectangle(1,1,this.barWidth - 2,this.barHeight - 2),empty);
				} else {
					emptyBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,empty);
				}
				flixel_FlxG.bitmap.add(emptyBar,false,emptyKey);
			}
			this.set_frames(flixel_FlxG.bitmap._cache.get(emptyKey).get_imageFrame());
		} else {
			if(showBorder) {
				this._emptyBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,border);
				this._emptyBar.fillRect(new openfl_geom_Rectangle(1,1,this.barWidth - 2,this.barHeight - 2),empty);
			} else {
				this._emptyBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,empty);
			}
			this._emptyBarRect.setTo(0,0,this.barWidth,this.barHeight);
			this.updateEmptyBar();
		}
		return this;
	}
	,createColoredFilledBar: function(fill,showBorder,border) {
		if(border == null) {
			border = -1;
		}
		if(showBorder == null) {
			showBorder = false;
		}
		if(flixel_FlxG.renderTile) {
			var filledKey = "filled: " + this.barWidth + "x" + this.barHeight + ":" + ("0x" + StringTools.hex(fill >> 24 & 255,2) + StringTools.hex(fill >> 16 & 255,2) + StringTools.hex(fill >> 8 & 255,2) + StringTools.hex(fill & 255,2));
			if(showBorder) {
				filledKey += ",border: " + ("0x" + StringTools.hex(border >> 24 & 255,2) + StringTools.hex(border >> 16 & 255,2) + StringTools.hex(border >> 8 & 255,2) + StringTools.hex(border & 255,2));
			}
			if(flixel_FlxG.bitmap._cache.get(filledKey) == null) {
				var filledBar = null;
				if(showBorder) {
					filledBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,border);
					filledBar.fillRect(new openfl_geom_Rectangle(1,1,this.barWidth - 2,this.barHeight - 2),fill);
				} else {
					filledBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,fill);
				}
				flixel_FlxG.bitmap.add(filledBar,false,filledKey);
			}
			this.set_frontFrames(flixel_FlxG.bitmap._cache.get(filledKey).get_imageFrame());
		} else {
			if(showBorder) {
				this._filledBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,border);
				this._filledBar.fillRect(new openfl_geom_Rectangle(1,1,this.barWidth - 2,this.barHeight - 2),fill);
			} else {
				this._filledBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,fill);
			}
			this._filledBarRect.setTo(0,0,this.barWidth,this.barHeight);
			this.updateFilledBar();
		}
		return this;
	}
	,createGradientBar: function(empty,fill,chunkSize,rotation,showBorder,border) {
		if(border == null) {
			border = -1;
		}
		if(showBorder == null) {
			showBorder = false;
		}
		if(rotation == null) {
			rotation = 180;
		}
		if(chunkSize == null) {
			chunkSize = 1;
		}
		this.createGradientEmptyBar(empty,chunkSize,rotation,showBorder,border);
		this.createGradientFilledBar(fill,chunkSize,rotation,showBorder,border);
		return this;
	}
	,createGradientEmptyBar: function(empty,chunkSize,rotation,showBorder,border) {
		if(border == null) {
			border = -1;
		}
		if(showBorder == null) {
			showBorder = false;
		}
		if(rotation == null) {
			rotation = 180;
		}
		if(chunkSize == null) {
			chunkSize = 1;
		}
		if(flixel_FlxG.renderTile) {
			var emptyKey = "Gradient:" + this.barWidth + "x" + this.barHeight + ",colors:[";
			var _g = 0;
			while(_g < empty.length) {
				var col = empty[_g];
				++_g;
				emptyKey += "0x" + StringTools.hex(col >> 24 & 255,2) + StringTools.hex(col >> 16 & 255,2) + StringTools.hex(col >> 8 & 255,2) + StringTools.hex(col & 255,2) + ",";
			}
			emptyKey += "],chunkSize: " + chunkSize + ",rotation: " + rotation;
			if(showBorder) {
				emptyKey += ",border: " + ("0x" + StringTools.hex(border >> 24 & 255,2) + StringTools.hex(border >> 16 & 255,2) + StringTools.hex(border >> 8 & 255,2) + StringTools.hex(border & 255,2));
			}
			if(flixel_FlxG.bitmap._cache.get(emptyKey) == null) {
				var emptyBar = null;
				if(showBorder) {
					emptyBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,border);
					flixel_util_FlxGradient.overlayGradientOnBitmapData(emptyBar,this.barWidth - 2,this.barHeight - 2,empty,1,1,chunkSize,rotation);
				} else {
					emptyBar = flixel_util_FlxGradient.createGradientBitmapData(this.barWidth,this.barHeight,empty,chunkSize,rotation);
				}
				flixel_FlxG.bitmap.add(emptyBar,false,emptyKey);
			}
			this.set_frames(flixel_FlxG.bitmap._cache.get(emptyKey).get_imageFrame());
		} else {
			if(showBorder) {
				this._emptyBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,border);
				flixel_util_FlxGradient.overlayGradientOnBitmapData(this._emptyBar,this.barWidth - 2,this.barHeight - 2,empty,1,1,chunkSize,rotation);
			} else {
				this._emptyBar = flixel_util_FlxGradient.createGradientBitmapData(this.barWidth,this.barHeight,empty,chunkSize,rotation);
			}
			this._emptyBarRect.setTo(0,0,this.barWidth,this.barHeight);
			this.updateEmptyBar();
		}
		return this;
	}
	,createGradientFilledBar: function(fill,chunkSize,rotation,showBorder,border) {
		if(border == null) {
			border = -1;
		}
		if(showBorder == null) {
			showBorder = false;
		}
		if(rotation == null) {
			rotation = 180;
		}
		if(chunkSize == null) {
			chunkSize = 1;
		}
		if(flixel_FlxG.renderTile) {
			var filledKey = "Gradient:" + this.barWidth + "x" + this.barHeight + ",colors:[";
			var _g = 0;
			while(_g < fill.length) {
				var col = fill[_g];
				++_g;
				filledKey += "0x" + StringTools.hex(col >> 24 & 255,2) + StringTools.hex(col >> 16 & 255,2) + StringTools.hex(col >> 8 & 255,2) + StringTools.hex(col & 255,2) + ",";
			}
			filledKey += "],chunkSize: " + chunkSize + ",rotation: " + rotation;
			if(showBorder) {
				filledKey += ",border: " + ("0x" + StringTools.hex(border >> 24 & 255,2) + StringTools.hex(border >> 16 & 255,2) + StringTools.hex(border >> 8 & 255,2) + StringTools.hex(border & 255,2));
			}
			if(flixel_FlxG.bitmap._cache.get(filledKey) == null) {
				var filledBar = null;
				if(showBorder) {
					filledBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,border);
					flixel_util_FlxGradient.overlayGradientOnBitmapData(filledBar,this.barWidth - 2,this.barHeight - 2,fill,1,1,chunkSize,rotation);
				} else {
					filledBar = flixel_util_FlxGradient.createGradientBitmapData(this.barWidth,this.barHeight,fill,chunkSize,rotation);
				}
				flixel_FlxG.bitmap.add(filledBar,false,filledKey);
			}
			this.set_frontFrames(flixel_FlxG.bitmap._cache.get(filledKey).get_imageFrame());
		} else {
			if(showBorder) {
				this._filledBar = new openfl_display_BitmapData(this.barWidth,this.barHeight,true,border);
				flixel_util_FlxGradient.overlayGradientOnBitmapData(this._filledBar,this.barWidth - 2,this.barHeight - 2,fill,1,1,chunkSize,rotation);
			} else {
				this._filledBar = flixel_util_FlxGradient.createGradientBitmapData(this.barWidth,this.barHeight,fill,chunkSize,rotation);
			}
			this._filledBarRect.setTo(0,0,this.barWidth,this.barHeight);
			this.updateFilledBar();
		}
		return this;
	}
	,createImageBar: function(empty,fill,emptyBackground,fillBackground) {
		if(fillBackground == null) {
			fillBackground = -16711936;
		}
		if(emptyBackground == null) {
			emptyBackground = -16777216;
		}
		this.createImageEmptyBar(empty,emptyBackground);
		this.createImageFilledBar(fill,fillBackground);
		return this;
	}
	,createImageEmptyBar: function(empty,emptyBackground) {
		if(emptyBackground == null) {
			emptyBackground = -16777216;
		}
		if(empty != null) {
			var emptyGraphic = flixel_FlxG.bitmap.add(empty);
			if(flixel_FlxG.renderTile) {
				this.set_frames(emptyGraphic.get_imageFrame());
			} else {
				this._emptyBar = emptyGraphic.bitmap.clone();
				this.barWidth = this._emptyBar.width;
				this.barHeight = this._emptyBar.height;
				this._emptyBarRect.setTo(0,0,this.barWidth,this.barHeight);
				if(this.graphic == null || (this.frame.sourceSize.x != this.barWidth || this.frame.sourceSize.y != this.barHeight)) {
					this.makeGraphic(this.barWidth,this.barHeight,0,true);
				}
				this.updateEmptyBar();
			}
		} else {
			this.createColoredEmptyBar(emptyBackground);
		}
		return this;
	}
	,createImageFilledBar: function(fill,fillBackground) {
		if(fillBackground == null) {
			fillBackground = -16711936;
		}
		if(fill != null) {
			var filledGraphic = flixel_FlxG.bitmap.add(fill);
			if(flixel_FlxG.renderTile) {
				this.set_frontFrames(filledGraphic.get_imageFrame());
			} else {
				this._filledBar = filledGraphic.bitmap.clone();
				this._filledBarRect.setTo(0,0,this.barWidth,this.barHeight);
				if(this.graphic == null || (this.frame.sourceSize.x != this.barWidth || this.frame.sourceSize.y != this.barHeight)) {
					this.makeGraphic(this.barWidth,this.barHeight,0,true);
				}
				this.pxPerPercent = this._fillHorizontal ? this.barWidth / this._maxPercent : this.barHeight / this._maxPercent;
				this.updateFilledBar();
			}
		} else {
			this.createColoredFilledBar(fillBackground);
		}
		return this;
	}
	,set_fillDirection: function(direction) {
		this.fillDirection = direction;
		switch(direction[1]) {
		case 0:case 1:case 4:case 5:
			this._fillHorizontal = true;
			break;
		case 2:case 3:case 6:case 7:
			this._fillHorizontal = false;
			break;
		}
		return this.fillDirection;
	}
	,updateValueFromParent: function() {
		var o = this.parent;
		var field = this.parentVariable;
		var tmp;
		var tmp1;
		if(o == null) {
			tmp1 = null;
		} else {
			var tmp2;
			if(o.__properties__) {
				tmp = o.__properties__["get_" + field];
				tmp2 = tmp;
			} else {
				tmp2 = false;
			}
			if(tmp2) {
				tmp1 = o[tmp]();
			} else {
				tmp1 = o[field];
			}
		}
		this.set_value(tmp1);
	}
	,updateBar: function() {
		this.updateEmptyBar();
		this.updateFilledBar();
	}
	,updateEmptyBar: function() {
		if(flixel_FlxG.renderBlit) {
			this.get_pixels().copyPixels(this._emptyBar,this._emptyBarRect,this._zeroOffset);
			this.dirty = true;
		}
	}
	,updateFilledBar: function() {
		this._filledBarRect.width = this.barWidth;
		this._filledBarRect.height = this.barHeight;
		var fraction = (this.get_value() - this.min) / this.range;
		var percent = fraction * this._maxPercent;
		var maxScale = this._fillHorizontal ? this.barWidth : this.barHeight;
		var scaleInterval = maxScale / this.numDivisions;
		var interval = (fraction * maxScale / scaleInterval | 0) * scaleInterval;
		if(this._fillHorizontal) {
			this._filledBarRect.width = interval | 0;
		} else {
			this._filledBarRect.height = interval | 0;
		}
		if(percent > 0) {
			switch(this.fillDirection[1]) {
			case 0:case 2:
				break;
			case 1:
				this._filledBarRect.x = this.barWidth - this._filledBarRect.width;
				this._filledBarPoint.x = this.barWidth - this._filledBarRect.width;
				break;
			case 3:
				this._filledBarRect.y = this.barHeight - this._filledBarRect.height;
				this._filledBarPoint.y = this.barHeight - this._filledBarRect.height;
				break;
			case 4:
				this._filledBarRect.x = this.barWidth / 2 - this._filledBarRect.width / 2 | 0;
				this._filledBarPoint.x = this.barWidth / 2 - this._filledBarRect.width / 2 | 0;
				break;
			case 5:
				this._filledBarRect.width = maxScale - interval | 0;
				this._filledBarPoint.x = (this.barWidth - this._filledBarRect.width) / 2 | 0;
				break;
			case 6:
				this._filledBarRect.y = this.barHeight / 2 - this._filledBarRect.height / 2 | 0;
				this._filledBarPoint.y = this.barHeight / 2 - this._filledBarRect.height / 2 | 0;
				break;
			case 7:
				this._filledBarRect.height = maxScale - interval | 0;
				this._filledBarPoint.y = (this.barHeight - this._filledBarRect.height) / 2 | 0;
				break;
			}
			if(flixel_FlxG.renderBlit) {
				this.get_pixels().copyPixels(this._filledBar,this._filledBarRect,this._filledBarPoint,null,null,true);
			} else if(this.get_frontFrames() != null) {
				var _this = this._filledFlxRect;
				var FlashRect = this._filledBarRect;
				_this.x = FlashRect.x;
				_this.y = FlashRect.y;
				_this.width = FlashRect.width;
				_this.height = FlashRect.height;
				_this.x = Math.round(_this.x);
				_this.y = Math.round(_this.y);
				_this.width = Math.round(_this.width);
				_this.height = Math.round(_this.height);
				if((percent | 0) > 0) {
					this._frontFrame = this.get_frontFrames().get_frame().clipTo(this._filledFlxRect,this._frontFrame);
				}
			}
		}
		if(flixel_FlxG.renderBlit) {
			this.dirty = true;
		}
	}
	,update: function(elapsed) {
		if(this.parent != null) {
			var o = this.parent;
			var field = this.parentVariable;
			var tmp;
			var tmp1;
			if(o == null) {
				tmp1 = null;
			} else {
				var tmp2;
				if(o.__properties__) {
					tmp = o.__properties__["get_" + field];
					tmp2 = tmp;
				} else {
					tmp2 = false;
				}
				if(tmp2) {
					tmp1 = o[tmp]();
				} else {
					tmp1 = o[field];
				}
			}
			if(tmp1 != this.get_value()) {
				this.updateValueFromParent();
			}
			if(!this.fixedPosition) {
				this.set_x(this.parent.x + this.positionOffset.x);
				this.set_y(this.parent.y + this.positionOffset.y);
			}
		}
		flixel_FlxSprite.prototype.update.call(this,elapsed);
	}
	,draw: function() {
		flixel_FlxSprite.prototype.draw.call(this);
		if(!flixel_FlxG.renderTile) {
			return;
		}
		if(this.alpha == 0) {
			return;
		}
		if(this.get_percent() > 0 && this._frontFrame.type != 2) {
			var _g = 0;
			var _g1 = this.get_cameras();
			while(_g < _g1.length) {
				var camera = _g1[_g];
				++_g;
				if(!camera.visible || !camera.exists || !this.isOnScreen(camera)) {
					continue;
				}
				this.getScreenPosition(this._point,camera).subtractPoint(this.offset);
				this._frontFrame.prepareMatrix(this._matrix,0,this.flipX,this.flipY);
				this._matrix.translate(-this.origin.x,-this.origin.y);
				this._matrix.scale(this.scale.x,this.scale.y);
				if(this.angle != 0) {
					var _this = this._matrix;
					var cos = this._cosAngle;
					var sin = this._sinAngle;
					var a1 = _this.a * cos - _this.b * sin;
					_this.b = _this.a * sin + _this.b * cos;
					_this.a = a1;
					var c1 = _this.c * cos - _this.d * sin;
					_this.d = _this.c * sin + _this.d * cos;
					_this.c = c1;
					var tx1 = _this.tx * cos - _this.ty * sin;
					_this.ty = _this.tx * sin + _this.ty * cos;
					_this.tx = tx1;
				}
				var _this1 = this._point;
				var Y = this.origin.y;
				_this1.set_x(_this1.x + this.origin.x);
				_this1.set_y(_this1.y + Y);
				if(this.isPixelPerfectRender(camera)) {
					var _this2 = this._point;
					_this2.set_x(Math.floor(_this2.x));
					_this2.set_y(Math.floor(_this2.y));
				}
				this._matrix.translate(this._point.x,this._point.y);
				camera.drawPixels(this._frontFrame,null,this._matrix,this.colorTransform,this.blend,this.antialiasing,this.shader);
			}
		}
	}
	,set_pixels: function(Pixels) {
		if(flixel_FlxG.renderTile) {
			return Pixels;
		} else {
			return flixel_FlxSprite.prototype.set_pixels.call(this,Pixels);
		}
	}
	,toString: function() {
		var value = this.min;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "min";
		_this.value = value;
		var value1 = this.max;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "max";
		_this1.value = value1;
		var value2 = this.range;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "range";
		_this2.value = value2;
		var value3 = this.pct;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "%";
		_this3.value = value3;
		var value4 = this.pxPerPercent;
		var _this4 = flixel_util_LabelValuePair._pool.get();
		_this4.label = "px/%";
		_this4.value = value4;
		var value5 = this.get_value();
		var _this5 = flixel_util_LabelValuePair._pool.get();
		_this5.label = "value";
		_this5.value = value5;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3,_this4,_this5]);
	}
	,get_percent: function() {
		if(this.get_value() > this.max) {
			return this._maxPercent;
		}
		return Math.floor((this.get_value() - this.min) / this.range * this._maxPercent);
	}
	,set_percent: function(newPct) {
		if(newPct >= 0 && newPct <= this._maxPercent) {
			this.set_value(this.pct * newPct);
		}
		return newPct;
	}
	,set_value: function(newValue) {
		this.value = Math.max(this.min,Math.min(newValue,this.max));
		if(this.get_value() == this.min && this.emptyCallback != null) {
			this.emptyCallback();
		}
		if(this.get_value() == this.max && this.filledCallback != null) {
			this.filledCallback();
		}
		if(this.get_value() == this.min && this.killOnEmpty) {
			this.kill();
		}
		this.updateBar();
		return newValue;
	}
	,get_value: function() {
		return this.value;
	}
	,set_numDivisions: function(newValue) {
		this.numDivisions = newValue > 0 ? newValue : 100;
		this.updateFilledBar();
		return newValue;
	}
	,get_frontFrames: function() {
		if(flixel_FlxG.renderTile) {
			return this.frontFrames;
		}
		return null;
	}
	,set_frontFrames: function(value) {
		if(flixel_FlxG.renderTile) {
			this.frontFrames = value;
			this._frontFrame = value != null ? value.get_frame().copyTo(this._frontFrame) : null;
		} else {
			this.createImageFilledBar(value.get_frame().paint());
		}
		return value;
	}
	,get_backFrames: function() {
		if(flixel_FlxG.renderTile) {
			return this.frames;
		}
		return null;
	}
	,set_backFrames: function(value) {
		if(flixel_FlxG.renderTile) {
			this.set_frames(value);
		} else {
			this.createImageEmptyBar(value.get_frame().paint());
		}
		return value;
	}
	,__class__: flixel_ui_FlxBar
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{set_fillDirection:"set_fillDirection",set_backFrames:"set_backFrames",get_backFrames:"get_backFrames",set_frontFrames:"set_frontFrames",get_frontFrames:"get_frontFrames",set_numDivisions:"set_numDivisions",set_value:"set_value",get_value:"get_value",set_percent:"set_percent",get_percent:"get_percent"})
});
var flixel_addons_ui_interfaces_IHasParams = function() { };
$hxClasses["flixel.addons.ui.interfaces.IHasParams"] = flixel_addons_ui_interfaces_IHasParams;
flixel_addons_ui_interfaces_IHasParams.__name__ = ["flixel","addons","ui","interfaces","IHasParams"];
flixel_addons_ui_interfaces_IHasParams.prototype = {
	__class__: flixel_addons_ui_interfaces_IHasParams
	,__properties__: {set_params:"set_params"}
};
var flixel_addons_ui_FlxUIBar = function(x,y,direction,width,height,parentRef,variable,min,max,showBorder) {
	if(showBorder == null) {
		showBorder = false;
	}
	if(max == null) {
		max = 100;
	}
	if(min == null) {
		min = 0;
	}
	if(variable == null) {
		variable = "";
	}
	if(height == null) {
		height = 10;
	}
	if(width == null) {
		width = 100;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	flixel_ui_FlxBar.call(this,x,y,direction,width,height,parentRef,variable,min,max,showBorder);
};
$hxClasses["flixel.addons.ui.FlxUIBar"] = flixel_addons_ui_FlxUIBar;
flixel_addons_ui_FlxUIBar.__name__ = ["flixel","addons","ui","FlxUIBar"];
flixel_addons_ui_FlxUIBar.__interfaces__ = [flixel_addons_ui_interfaces_IHasParams,flixel_addons_ui_interfaces_IFlxUIWidget,flixel_addons_ui_interfaces_IResizable];
flixel_addons_ui_FlxUIBar.__super__ = flixel_ui_FlxBar;
flixel_addons_ui_FlxUIBar.prototype = $extend(flixel_ui_FlxBar.prototype,{
	clone: function() {
		var w = this.get_width() | 0;
		var h = this.get_height() | 0;
		var showBorder = this.style != null && this.style.borderColor != null;
		if(showBorder) {
			w -= 2;
			h -= 2;
		}
		var b = new flixel_addons_ui_FlxUIBar(this.x,this.y,this.fillDirection,w,h,this.parent,this.parentVariable,this.min,this.max,showBorder);
		b.set_style(this.style);
		b.set_value(this.get_value());
		return b;
	}
	,set_style: function(Style) {
		this.style = Style;
		this.resize(this.barWidth,this.barHeight);
		return this.style;
	}
	,resize: function(w,h) {
		this.set_width(w);
		this.set_height(h);
		this.barWidth = this.get_width() | 0;
		this.barHeight = this.get_height() | 0;
		if(flixel_FlxG.renderBlit) {
			this.makeGraphic(this.barWidth,this.barHeight,0,true);
		}
		var showBorder = this.style.borderColor != null;
		var ec = this.style.emptyColor == null ? -16777216 : this.style.emptyColor;
		var fc = this.style.filledColor == null ? -65536 : this.style.filledColor;
		var bc = this.style.borderColor == null ? -16777216 : this.style.borderColor;
		if(this.style.filledColor != null) {
			this.createFilledBar(ec,fc,showBorder,bc);
		}
		if(this.style.filledColors != null) {
			this.createGradientBar(this.style.emptyColors == null ? [-16777216] : this.style.emptyColors,this.style.filledColors == null ? [-65536] : this.style.filledColors,this.style.chunkSize == null ? 1 : this.style.chunkSize,this.style.emptyImgSrc == null ? 180 : this.style.gradRotation,showBorder,bc);
		}
		if(this.style.filledImgSrc != "") {
			this.createImageBar(this.style.emptyImgSrc,this.style.filledImgSrc,ec,fc);
		}
		this.setRange(this.min,this.max);
		this.set_value(this.get_value());
	}
	,set_params: function(p) {
		this.params = p;
		return this.params;
	}
	,__class__: flixel_addons_ui_FlxUIBar
	,__properties__: $extend(flixel_ui_FlxBar.prototype.__properties__,{set_params:"set_params",set_style:"set_style"})
});
var flixel_input_IFlxInput = function() { };
$hxClasses["flixel.input.IFlxInput"] = flixel_input_IFlxInput;
flixel_input_IFlxInput.__name__ = ["flixel","input","IFlxInput"];
flixel_input_IFlxInput.prototype = {
	__class__: flixel_input_IFlxInput
	,__properties__: {get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased"}
};
var flixel_ui_FlxTypedButton = function(X,Y,OnClick) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.lastStatus = -1;
	this.maxInputMovement = Infinity;
	this.mouseButtons = [-1];
	this.allowSwiping = true;
	this.statusAnimations = ["normal","highlight","pressed"];
	this.labelAlphas = [0.8,1.0,0.5];
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	var point2 = flixel_math_FlxPoint._pool.get().set(0,1);
	point2._inPool = false;
	this.labelOffsets = [point,point1,point2];
	flixel_FlxSprite.call(this,X,Y);
	this.loadDefaultGraphic();
	this.onUp = new flixel_ui__$FlxButton_FlxButtonEvent(OnClick);
	this.onDown = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.onOver = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.onOut = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.set_status(0);
	this.scrollFactor.set();
	openfl_Lib.current.stage.addEventListener("mouseUp",$bind(this,this.onUpEventListener));
	this.input = new flixel_input_FlxInput(0);
};
$hxClasses["flixel.ui.FlxTypedButton"] = flixel_ui_FlxTypedButton;
flixel_ui_FlxTypedButton.__name__ = ["flixel","ui","FlxTypedButton"];
flixel_ui_FlxTypedButton.__interfaces__ = [flixel_input_IFlxInput];
flixel_ui_FlxTypedButton.__super__ = flixel_FlxSprite;
flixel_ui_FlxTypedButton.prototype = $extend(flixel_FlxSprite.prototype,{
	graphicLoaded: function() {
		flixel_FlxSprite.prototype.graphicLoaded.call(this);
		this.setupAnimation("normal",0);
		this.setupAnimation("highlight",1);
		this.setupAnimation("pressed",2);
	}
	,loadDefaultGraphic: function() {
		this.loadGraphic("flixel/images/ui/button.png",true,80,20);
	}
	,setupAnimation: function(animationName,frameIndex) {
		frameIndex = Math.min(frameIndex,this.animation._sprite.numFrames - 1) | 0;
		this.animation.add(animationName,[frameIndex]);
	}
	,destroy: function() {
		this.set_label(flixel_util_FlxDestroyUtil.destroy(this.label));
		this._spriteLabel = null;
		this.onUp = flixel_util_FlxDestroyUtil.destroy(this.onUp);
		this.onDown = flixel_util_FlxDestroyUtil.destroy(this.onDown);
		this.onOver = flixel_util_FlxDestroyUtil.destroy(this.onOver);
		this.onOut = flixel_util_FlxDestroyUtil.destroy(this.onOut);
		this.labelOffsets = flixel_util_FlxDestroyUtil.putArray(this.labelOffsets);
		this.labelAlphas = null;
		this.currentInput = null;
		this.input = null;
		openfl_Lib.current.stage.removeEventListener("mouseUp",$bind(this,this.onUpEventListener));
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		flixel_FlxSprite.prototype.update.call(this,elapsed);
		this.input.update();
		if(this.visible) {
			this.updateButton();
			if(this.lastStatus != this.status) {
				this.updateStatusAnimation();
				this.lastStatus = this.status;
			}
		}
	}
	,updateStatusAnimation: function() {
		this.animation.play(this.statusAnimations[this.status]);
	}
	,draw: function() {
		flixel_FlxSprite.prototype.draw.call(this);
		if(this._spriteLabel != null && this._spriteLabel.visible) {
			this._spriteLabel.set_cameras(this.get_cameras());
			this._spriteLabel.draw();
		}
	}
	,stampOnAtlas: function(atlas) {
		var buttonNode = atlas.addNode(this.graphic.bitmap,this.graphic.key);
		var result = buttonNode != null;
		if(buttonNode != null) {
			var buttonFrames = this.frames;
			var X = buttonFrames.tileSize.x;
			var Y = buttonFrames.tileSize.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			this.set_frames(buttonNode.getTileFrames(point));
		}
		if(result && this.label != null) {
			var labelNode = atlas.addNode(this.label.graphic.bitmap,this.label.graphic.key);
			if(result) {
				result = labelNode != null;
			} else {
				result = false;
			}
			if(labelNode != null) {
				this.label.set_frames(labelNode.getImageFrame());
			}
		}
		return result;
	}
	,updateButton: function() {
		var overlapFound = this.checkMouseOverlap();
		if(!overlapFound) {
			overlapFound = this.checkTouchOverlap();
		}
		if(this.currentInput != null && this.currentInput.get_justReleased() && js_Boot.__instanceof(this.currentInput,flixel_input_touch_FlxTouch) && overlapFound) {
			this.onUpHandler();
		}
		if(this.status != 0 && (!overlapFound || this.currentInput != null && this.currentInput.get_justReleased())) {
			this.onOutHandler();
		}
	}
	,checkMouseOverlap: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			var _g2 = 0;
			var _g3 = this.mouseButtons;
			while(_g2 < _g3.length) {
				var buttonID = _g3[_g2];
				++_g2;
				var button = flixel_input_mouse_FlxMouseButton.getByID(buttonID);
				if(button != null && this.checkInput(flixel_FlxG.mouse,button,button.justPressedPosition,camera)) {
					return true;
				}
			}
		}
		return false;
	}
	,checkTouchOverlap: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			var _g2 = 0;
			var _g3 = flixel_FlxG.touches.list;
			while(_g2 < _g3.length) {
				var touch = _g3[_g2];
				++_g2;
				if(this.checkInput(touch,touch,touch.justPressedPosition,camera)) {
					return true;
				}
			}
		}
		return false;
	}
	,checkInput: function(pointer,input,justPressedPosition,camera) {
		var tmp;
		var tmp1;
		if(this.maxInputMovement != Infinity) {
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			point._weak = true;
			tmp1 = justPressedPosition.distanceTo(pointer.getScreenPosition(null,point)) > this.maxInputMovement;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			tmp = input == this.currentInput;
		} else {
			tmp = false;
		}
		if(!tmp) {
			if(this.overlapsPoint(pointer.getWorldPosition(camera,this._point),true,camera)) {
				this.updateStatus(input);
				return true;
			}
		}
		return false;
	}
	,updateStatus: function(input) {
		if(input.get_justPressed()) {
			this.currentInput = input;
			this.onDownHandler();
		} else if(this.status == 0) {
			if(this.allowSwiping && input.get_pressed()) {
				this.onDownHandler();
			} else {
				this.onOverHandler();
			}
		}
	}
	,updateLabelPosition: function() {
		if(this._spriteLabel != null) {
			this._spriteLabel.set_x((this.pixelPerfectPosition ? Math.floor(this.x) : this.x) + this.labelOffsets[this.status].x);
			this._spriteLabel.set_y((this.pixelPerfectPosition ? Math.floor(this.y) : this.y) + this.labelOffsets[this.status].y);
		}
	}
	,updateLabelAlpha: function() {
		if(this._spriteLabel != null && this.labelAlphas.length > this.status) {
			this._spriteLabel.set_alpha(this.alpha * this.labelAlphas[this.status]);
		}
	}
	,onUpEventListener: function(_) {
		if(this.visible && this.exists && this.active && this.status == 2) {
			this.onUpHandler();
		}
	}
	,onUpHandler: function() {
		this.set_status(0);
		this.input.release();
		this.currentInput = null;
		var _this = this.onUp;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onDownHandler: function() {
		this.set_status(2);
		this.input.press();
		var _this = this.onDown;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onOverHandler: function() {
		this.set_status(1);
		var _this = this.onOver;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onOutHandler: function() {
		this.set_status(0);
		this.input.release();
		var _this = this.onOut;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,set_label: function(Value) {
		if(Value != null) {
			Value.scrollFactor.put();
			Value.scrollFactor = this.scrollFactor;
		}
		this.label = Value;
		this._spriteLabel = this.label;
		this.updateLabelPosition();
		return Value;
	}
	,set_status: function(Value) {
		this.status = Value;
		this.updateLabelAlpha();
		return this.status;
	}
	,set_alpha: function(Value) {
		flixel_FlxSprite.prototype.set_alpha.call(this,Value);
		this.updateLabelAlpha();
		return this.alpha;
	}
	,set_x: function(Value) {
		flixel_FlxSprite.prototype.set_x.call(this,Value);
		this.updateLabelPosition();
		return this.x;
	}
	,set_y: function(Value) {
		flixel_FlxSprite.prototype.set_y.call(this,Value);
		this.updateLabelPosition();
		return this.y;
	}
	,get_justReleased: function() {
		return this.input.current == -1;
	}
	,get_released: function() {
		var _this = this.input;
		if(_this.current != 0) {
			return _this.current == -1;
		} else {
			return true;
		}
	}
	,get_pressed: function() {
		var _this = this.input;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this.input.current == 2;
	}
	,__class__: flixel_ui_FlxTypedButton
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased",set_status:"set_status",set_label:"set_label"})
});
var flixel_addons_ui_interfaces_ICursorPointable = function() { };
$hxClasses["flixel.addons.ui.interfaces.ICursorPointable"] = flixel_addons_ui_interfaces_ICursorPointable;
flixel_addons_ui_interfaces_ICursorPointable.__name__ = ["flixel","addons","ui","interfaces","ICursorPointable"];
var flixel_addons_ui_interfaces_IFlxUIClickable = function() { };
$hxClasses["flixel.addons.ui.interfaces.IFlxUIClickable"] = flixel_addons_ui_interfaces_IFlxUIClickable;
flixel_addons_ui_interfaces_IFlxUIClickable.__name__ = ["flixel","addons","ui","interfaces","IFlxUIClickable"];
flixel_addons_ui_interfaces_IFlxUIClickable.prototype = {
	__class__: flixel_addons_ui_interfaces_IFlxUIClickable
	,__properties__: {set_skipButtonUpdate:"set_skipButtonUpdate"}
};
var flixel_addons_ui_interfaces_IFlxUIButton = function() { };
$hxClasses["flixel.addons.ui.interfaces.IFlxUIButton"] = flixel_addons_ui_interfaces_IFlxUIButton;
flixel_addons_ui_interfaces_IFlxUIButton.__name__ = ["flixel","addons","ui","interfaces","IFlxUIButton"];
flixel_addons_ui_interfaces_IFlxUIButton.__interfaces__ = [flixel_util_IFlxDestroyable,flixel_addons_ui_interfaces_IHasParams,flixel_addons_ui_interfaces_IFlxUIWidget];
flixel_addons_ui_interfaces_IFlxUIButton.prototype = {
	__class__: flixel_addons_ui_interfaces_IFlxUIButton
	,__properties__: {set_status:"set_status",get_justMousedOut:"get_justMousedOut",get_mouseIsOut:"get_mouseIsOut",get_mouseIsOver:"get_mouseIsOver",get_justMousedOver:"get_justMousedOver",set_toggle_label:"set_toggle_label",set_toggled:"set_toggled"}
};
var flixel_addons_ui_FlxUITypedButton = function(X,Y,OnClick) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._centerLabelOffset = null;
	this._src_h = 0;
	this._src_w = 0;
	this._no_graphic = false;
	this._assetsToCleanup = [];
	this._autoCleanup = true;
	this.autoResizeLabel = false;
	this.skipButtonUpdate = false;
	this.round_labels = true;
	this.down_toggle_visible = true;
	this.over_toggle_visible = true;
	this.up_toggle_visible = true;
	this.down_visible = true;
	this.over_visible = true;
	this.up_visible = true;
	this.down_toggle_color = null;
	this.over_toggle_color = null;
	this.up_toggle_color = null;
	this.down_color = null;
	this.over_color = null;
	this.up_color = null;
	this.broadcastToFlxUI = true;
	this.toggled = false;
	this.has_toggle = false;
	this.tile = 0;
	this.resize_point = null;
	this.resize_ratio_axis = 1;
	this.resize_ratio = -1;
	flixel_ui_FlxTypedButton.call(this,X,Y,OnClick);
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this._centerLabelOffset = point;
	this.statusAnimations[3] = "normal_toggled";
	this.statusAnimations[4] = "highlight_toggled";
	this.statusAnimations[5] = "pressed_toggled";
	var _g = [];
	var _g1 = 0;
	while(_g1 < 3) {
		++_g1;
		_g.push(1);
	}
	this.labelAlphas = _g;
	this.inputOver = new flixel_input_FlxInput(0);
};
$hxClasses["flixel.addons.ui.FlxUITypedButton"] = flixel_addons_ui_FlxUITypedButton;
flixel_addons_ui_FlxUITypedButton.__name__ = ["flixel","addons","ui","FlxUITypedButton"];
flixel_addons_ui_FlxUITypedButton.__interfaces__ = [flixel_addons_ui_interfaces_ICursorPointable,flixel_addons_ui_interfaces_IHasParams,flixel_addons_ui_interfaces_IFlxUIClickable,flixel_addons_ui_interfaces_IFlxUIWidget,flixel_addons_ui_interfaces_IResizable,flixel_addons_ui_interfaces_IFlxUIButton];
flixel_addons_ui_FlxUITypedButton.__super__ = flixel_ui_FlxTypedButton;
flixel_addons_ui_FlxUITypedButton.prototype = $extend(flixel_ui_FlxTypedButton.prototype,{
	set_toggled: function(b) {
		this.toggled = b;
		this.updateStatusAnimation();
		return this.toggled;
	}
	,get_justMousedOver: function() {
		return this.inputOver.current == 2;
	}
	,get_justMousedOut: function() {
		return this.inputOver.current == -1;
	}
	,get_mouseIsOver: function() {
		var _this = this.inputOver;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_mouseIsOut: function() {
		var _this = this.inputOver;
		if(_this.current != 0) {
			return _this.current == -1;
		} else {
			return true;
		}
	}
	,set_toggle_label: function(f) {
		if(this.label != null) {
			this.toggle_label = f;
			return this.toggle_label;
		}
		return null;
	}
	,set_visible: function(Value) {
		if(this.visible && Value == false) {
			this.inputOver.release();
		}
		return flixel_ui_FlxTypedButton.prototype.set_visible.call(this,Value);
	}
	,set_skipButtonUpdate: function(b) {
		this.skipButtonUpdate = b;
		return this.skipButtonUpdate;
	}
	,set_params: function(p) {
		this.params = p;
		return this.params;
	}
	,destroy: function() {
		this.resize_point = flixel_util_FlxDestroyUtil.put(this.resize_point);
		flixel_ui_FlxTypedButton.prototype.destroy.call(this);
	}
	,graphicLoaded: function() {
		flixel_ui_FlxTypedButton.prototype.graphicLoaded.call(this);
		this.setupAnimation("normal_toggled",3);
		this.setupAnimation("highlight_toggled",4);
		this.setupAnimation("pressed_toggled",5);
		if(this._autoCleanup) {
			this.cleanup();
		}
	}
	,copyGraphic: function(other) {
		this._src_w = other._src_w;
		this._src_h = other._src_h;
		this._frame_indeces = flixel_addons_ui_U.copy_shallow_arr_i(other._frame_indeces);
		this.tile = other.tile;
		this.resize_ratio = other.resize_ratio;
		if(other._centerLabelOffset == null) {
			this._centerLabelOffset = null;
		} else {
			this._centerLabelOffset = new flixel_math_FlxPoint(other._centerLabelOffset.x,other._centerLabelOffset.y);
		}
		this._no_graphic = other._no_graphic;
		if(other._slice9_arrays != null) {
			this._slice9_arrays = other._slice9_arrays.slice();
		}
		if(other._slice9_assets != null) {
			this._slice9_assets = other._slice9_assets.slice();
		}
		if(this._slice9_arrays == null || this._slice9_assets == null) {
			this.loadGraphic(other.graphic,true,other.get_width(),other.get_height());
		} else {
			this.resize(other.get_width(),other.get_height());
		}
	}
	,copyStyle: function(other) {
		this.up_color = other.up_color;
		this.over_color = other.over_color;
		this.down_color = other.down_color;
		this.up_toggle_color = other.up_toggle_color;
		this.over_toggle_color = other.over_toggle_color;
		this.down_toggle_color = other.over_toggle_color;
		this.up_visible = other.up_visible;
		this.over_visible = other.over_visible;
		this.down_visible = other.down_visible;
		this.up_toggle_visible = other.up_toggle_visible;
		this.over_toggle_visible = other.over_toggle_visible;
		this.down_toggle_visible = other.down_toggle_visible;
		var ctPt = other.getCenterLabelOffset();
		this.setCenterLabelOffset(ctPt.x,ctPt.y);
		var i = 0;
		var _g = 0;
		var _g1 = other.labelOffsets;
		while(_g < _g1.length) {
			var flxPt = _g1[_g];
			++_g;
			this.labelOffsets[i].set_x(flxPt.x);
			this.labelOffsets[i].set_y(flxPt.y);
			++i;
		}
		i = 0;
		var _g2 = 0;
		var _g11 = other.labelAlphas;
		while(_g2 < _g11.length) {
			var alpha = _g11[_g2];
			++_g2;
			this.labelAlphas[i] = alpha;
			++i;
		}
	}
	,setAllLabelOffsets: function(X,Y) {
		var _g = 0;
		var _g1 = this.labelOffsets;
		while(_g < _g1.length) {
			var labelOffset = _g1[_g];
			++_g;
			labelOffset.set(X,Y);
		}
	}
	,update: function(elapsed) {
		flixel_ui_FlxTypedButton.prototype.update.call(this,elapsed);
		var tmp;
		var tmp1;
		if(this.status == 0) {
			var _this = this.inputOver;
			if(_this.current != 1) {
				tmp1 = _this.current == 2;
			} else {
				tmp1 = true;
			}
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			tmp = this.input.current == -1 == false;
		} else {
			tmp = false;
		}
		if(tmp) {
			this.inputOver.release();
		}
		this.inputOver.update();
		if(this.label != null) {
			var theLabel = this.fetchAndShowCorrectLabel();
			theLabel.set_x(this.x + this._centerLabelOffset.x + this.labelOffsets[this.status].x);
			theLabel.set_y(this.y + this._centerLabelOffset.y + this.labelOffsets[this.status].y);
			if(this.round_labels) {
				theLabel.set_x(theLabel.x + 0.5 | 0);
				theLabel.set_y(theLabel.y + 0.5 | 0);
			}
			theLabel.scrollFactor = this.scrollFactor;
		}
	}
	,updateStatusAnimation: function() {
		if(this.has_toggle && this.toggled) {
			this.animation.play(this.statusAnimations[this.status + 3]);
		} else {
			flixel_ui_FlxTypedButton.prototype.updateStatusAnimation.call(this);
		}
	}
	,draw: function() {
		flixel_ui_FlxTypedButton.prototype.draw.call(this);
		if(this.has_toggle && this.toggled && this.toggle_label != null && this.toggle_label.visible == true) {
			this.toggle_label.set_cameras(this.get_cameras());
			this.toggle_label.draw();
		}
	}
	,resize: function(W,H) {
		this.doResize(W,H);
	}
	,doResize: function(W,H,Redraw) {
		if(Redraw == null) {
			Redraw = true;
		}
		var old_width = this.get_width();
		var old_height = this.get_height();
		var label_diffx = 0;
		var label_diffy = 0;
		if(this.label != null) {
			label_diffx = this.get_width() - this._spriteLabel.get_width();
			label_diffy = this.get_height() - this._spriteLabel.get_height();
		}
		if(W <= 0) {
			W = 80;
		}
		if(H <= 0) {
			H = 20;
		}
		if(Redraw) {
			if(this._slice9_assets != null) {
				this.loadGraphicSlice9(this._slice9_assets,W | 0,H | 0,this._slice9_arrays,this.tile,this.resize_ratio,this.has_toggle,this._src_w,this._src_h,this._frame_indeces);
			} else if(this._no_graphic) {
				var upB;
				if(!this.has_toggle) {
					upB = new openfl_display_BitmapData(W | 0,H * 3 | 0,true,0);
				} else {
					upB = new openfl_display_BitmapData(W | 0,H * 6 | 0,true,0);
				}
				this.loadGraphicsUpOverDown(upB);
			} else {
				this.loadGraphicSlice9(null,W | 0,H | 0,null,this.tile);
			}
		}
		if(this.label != null && this.autoResizeLabel) {
			if(js_Boot.__instanceof(this.label,flixel_addons_ui_interfaces_IResizable)) {
				this.label.resize(W - label_diffx,H - label_diffy);
			}
		}
		this.autoCenterLabel();
		var diff_w = this.get_width() - old_width;
		var diff_h = this.get_height() - old_height;
		if(this.resize_point != null) {
			var delta_y = diff_h * this.resize_point.y;
			var _g = this;
			_g.set_x(_g.x - diff_w * this.resize_point.x);
			var _g1 = this;
			_g1.set_y(_g1.y - delta_y);
		}
	}
	,getBmp: function(asset) {
		return flixel_addons_ui_U.getBmp(asset);
	}
	,loadGraphicsMultiple: function(assets,Key) {
		if(Key == null) {
			Key = "";
		}
		this._slice9_assets = null;
		this._slice9_arrays = null;
		this.resize_ratio = -1;
		var key = "";
		if(assets.length <= 3) {
			while(assets.length < 3) assets.push(null);
			if(assets[1] == null) {
				assets[1] = assets[0];
			}
			if(assets[2] == null) {
				assets[2] = assets[1];
			}
			key = assets.join(",");
			if(Key != "") {
				key = Key;
			}
			if(flixel_FlxG.bitmap._cache.get(key) != null) {
				this.loadGraphicsUpOverDown(key,false,key);
			} else {
				this.loadGraphicsUpOverDown(this.assembleButtonFrames(this.getBmp(assets[0]),this.getBmp(assets[1]),this.getBmp(assets[2])),false,key);
			}
		} else if(assets.length <= 6) {
			while(assets.length < 6) assets.push(null);
			if(assets[4] == null) {
				assets[4] = assets[3];
			}
			if(assets[5] == null) {
				assets[5] = assets[4];
			}
			key = assets.join(",");
			if(Key != "") {
				key = Key;
			}
			if(flixel_FlxG.bitmap._cache.get(key) != null) {
				this.loadGraphicsUpOverDown(key,true,key);
			} else {
				var pixels_normal = this.assembleButtonFrames(this.getBmp(assets[0]),this.getBmp(assets[1]),this.getBmp(assets[2]));
				var pixels_toggle = this.assembleButtonFrames(this.getBmp(assets[3]),this.getBmp(assets[4]),this.getBmp(assets[5]));
				this.loadGraphicsUpOverDown(this.combineToggleBitmaps(pixels_normal,pixels_toggle),true,key);
				pixels_normal.dispose();
				pixels_toggle.dispose();
			}
		}
	}
	,loadGraphicsUpOverDown: function(asset,for_toggle,key) {
		if(for_toggle == null) {
			for_toggle = false;
		}
		this._slice9_assets = null;
		this._slice9_arrays = null;
		this.resize_ratio = -1;
		if(for_toggle) {
			this.has_toggle = true;
		}
		var upB = null;
		var overB = null;
		var downB = null;
		var bd = null;
		if(js_Boot.__instanceof(asset,openfl_display_BitmapData)) {
			bd = asset;
		} else if(typeof(asset) == "string") {
			bd = this.getBmp(asset);
		}
		upB = this.grabButtonFrame(bd,0,this.has_toggle,0,0,key);
		overB = this.grabButtonFrame(bd,1,this.has_toggle,0,0,key);
		downB = this.grabButtonFrame(bd,2,this.has_toggle,0,0,key);
		var normalGraphic = key;
		if(key == null || key == "" || flixel_FlxG.bitmap._cache.get(key) != null == false) {
			normalGraphic = this.assembleButtonFrames(upB,overB,downB);
		}
		if(this.has_toggle) {
			var normalPixels = this.assembleButtonFrames(upB,overB,downB);
			upB = this.grabButtonFrame(bd,3,true,0,0,key);
			overB = this.grabButtonFrame(bd,4,true,0,0,key);
			downB = this.grabButtonFrame(bd,5,true,0,0,key);
			var togglePixels = this.assembleButtonFrames(upB,overB,downB);
			var combinedPixels = this.combineToggleBitmaps(normalPixels,togglePixels);
			normalPixels = flixel_util_FlxDestroyUtil.dispose(normalPixels);
			togglePixels = flixel_util_FlxDestroyUtil.dispose(togglePixels);
			this.loadGraphic(combinedPixels,true,upB.width,upB.height,false,key);
		} else {
			this.loadGraphic(normalGraphic,true,upB.width,upB.height,false,key);
		}
	}
	,loadGraphicSlice9: function(assets,W,H,slice9,Tile,Resize_Ratio,isToggle,src_w,src_h,frame_indeces) {
		if(src_h == null) {
			src_h = 0;
		}
		if(src_w == null) {
			src_w = 0;
		}
		if(isToggle == null) {
			isToggle = false;
		}
		if(Resize_Ratio == null) {
			Resize_Ratio = -1;
		}
		if(Tile == null) {
			Tile = 0;
		}
		if(H == null) {
			H = 20;
		}
		if(W == null) {
			W = 80;
		}
		if(src_w != 0) {
			this._src_w = src_w;
		}
		if(src_h != 0) {
			this._src_h = src_h;
		}
		this.tile = Tile;
		this.has_toggle = isToggle;
		this.resize_ratio = Resize_Ratio;
		this._slice9_assets = assets;
		this._slice9_arrays = slice9;
		var key = "";
		var arr_bmpData = [];
		var arr_flx9 = [];
		if(frame_indeces == null) {
			if(this.has_toggle) {
				frame_indeces = [0,1,2,3,4,5];
			} else {
				frame_indeces = [0,1,2];
			}
		} else {
			var max_index = 2;
			if(this.has_toggle) {
				max_index = 5;
			}
			while(frame_indeces.length < max_index + 1) frame_indeces.push(frame_indeces.length - 1);
			var _g1 = 0;
			var _g = frame_indeces.length;
			while(_g1 < _g) {
				var i = _g1++;
				if(frame_indeces[i] > 5) {
					frame_indeces[i] = 5;
				} else if(frame_indeces[i] < 0) {
					frame_indeces[i] = 0;
				}
			}
		}
		this._frame_indeces = frame_indeces;
		if(W == 0) {
			W = 80;
		}
		if(H == 0) {
			H = 20;
		}
		var pt = flixel_addons_ui_U.applyResize(this.resize_ratio,this.resize_ratio_axis,W,H);
		W = pt.x | 0;
		H = pt.y | 0;
		if(assets == null) {
			var temp;
			if(!isToggle) {
				assets = ["flixel/flixel-ui/img/button.png"];
				slice9 = [flixel_util_FlxStringUtil.toIntArray("6,6,11,11")];
				temp = this.getBmp(assets[0]);
				this._src_w = temp.width | 0;
				this._src_h = temp.height / 3 | 0;
			} else {
				assets = ["flixel/flixel-ui/img/button_toggle.png"];
				slice9 = [flixel_util_FlxStringUtil.toIntArray("6,6,11,11")];
				temp = this.getBmp(assets[0]);
				this._src_w = temp.width | 0;
				this._src_h = temp.height / 6 | 0;
			}
		}
		if(!this.has_toggle && assets.length <= 3) {
			arr_bmpData = [null,null,null];
			arr_flx9 = [null,null,null];
		} else {
			this.has_toggle = true;
			arr_bmpData = [null,null,null,null,null,null];
			arr_flx9 = [null,null,null,null,null,null];
		}
		this._flashRect2.width = W;
		this._flashRect2.height = H;
		key = "" + (Std.string(assets) + "_slice9=" + Std.string(slice9) + "_src=" + this._src_w + "x" + this._src_h);
		var midKey = key;
		key += "_final=" + W + "x" + H + "_fi=" + Std.string(this._frame_indeces);
		if(assets.length == 1) {
			var all = this.getBmp(assets[0]);
			var keySuffix = "_all";
			if(this._src_w == 0 || this._src_h == 0) {
				throw new js__$Boot_HaxeError(new openfl_errors_Error("Ambiguous situation! If you only provide one asset, you MUST provide src_w and src_h. Otherwise I can't tell if it's a stacked set of frames or a single frame."));
			}
			var multiFrame = all.height > this._src_h;
			keySuffix = "_all" + (multiFrame ? "_multiframe" : "");
			key += keySuffix;
			midKey += keySuffix;
			if(flixel_FlxG.bitmap._cache.get(key) != null) {
				this.loadGraphic(key,true,W,H);
				return;
			}
			if(multiFrame) {
				var _g11 = 0;
				var _g2 = arr_bmpData.length;
				while(_g11 < _g2) {
					var i1 = _g11++;
					arr_bmpData[i1] = this.grabButtonFrame(all,i1,this.has_toggle,this._src_w,this._src_h,midKey);
				}
				if(slice9 != null && slice9[0] != []) {
					var _g12 = 0;
					var _g3 = arr_bmpData.length;
					while(_g12 < _g3) {
						var i2 = _g12++;
						arr_flx9[i2] = new flixel_addons_ui_FlxUI9SliceSprite(0,0,arr_bmpData[i2],this._flashRect2,slice9[0],this.tile,false,assets[0] + ":" + i2,this.resize_ratio);
						arr_flx9[i2].set_resize_point(this.resize_point);
					}
					var _g13 = 0;
					var _g4 = arr_bmpData.length;
					while(_g13 < _g4) {
						var i3 = _g13++;
						arr_bmpData[i3] = arr_flx9[i3].get_pixels();
					}
					W = arr_bmpData[0].width;
					H = arr_bmpData[0].height;
				}
			} else {
				arr_bmpData[0] = all;
			}
		} else {
			if(flixel_FlxG.bitmap._cache.get(key) != null) {
				this.loadGraphic(key,true,W,H);
				return;
			}
			if(!this.has_toggle) {
				while(assets.length < 3) assets.push("");
			} else {
				while(assets.length < 6) assets.push("");
			}
			if(assets[0] != "") {
				if(slice9 != null && slice9.length > 0 && slice9[0] != null && slice9[0].length > 0) {
					while(slice9.length < assets.length) slice9.push(null);
					if(slice9[0] != null) {
						arr_flx9[0] = new flixel_addons_ui_FlxUI9SliceSprite(0,0,assets[0],this._flashRect2,slice9[0],this.tile,false,"",this.resize_ratio);
					} else {
						arr_flx9[0] = new flixel_addons_ui_FlxUISprite(0,0,assets[0]);
					}
					arr_bmpData[0] = arr_flx9[0].get_pixels();
					var _g14 = 1;
					var _g5 = assets.length;
					while(_g14 < _g5) {
						var i4 = _g14++;
						if(assets[i4] != "") {
							if(slice9[i4] != null) {
								arr_flx9[i4] = new flixel_addons_ui_FlxUI9SliceSprite(0,0,assets[i4],this._flashRect2,slice9[i4],this.tile,false,"",this.resize_ratio);
							} else {
								arr_flx9[i4] = new flixel_addons_ui_FlxUISprite(0,0,assets[i4]);
							}
							arr_bmpData[i4] = arr_flx9[i4].get_pixels();
						}
					}
					W = arr_bmpData[0].width;
					H = arr_bmpData[0].height;
				} else {
					var _g15 = 0;
					var _g6 = assets.length;
					while(_g15 < _g6) {
						var i5 = _g15++;
						arr_bmpData[i5] = this.getBmp(assets[i5]);
					}
					W = arr_bmpData[0].width;
					H = arr_bmpData[0].height;
				}
			} else {
				if(W == 0) {
					W = 80;
				}
				if(H == 0) {
					H = 20;
				}
				arr_bmpData[0] = new openfl_display_BitmapData(W,H * 3,true,0);
				this._no_graphic = true;
			}
		}
		var normalPixels = null;
		if(!this.has_toggle) {
			normalPixels = this.assembleButtonFrames(arr_bmpData[frame_indeces[0]],arr_bmpData[frame_indeces[1]],arr_bmpData[frame_indeces[2]]);
			flixel_FlxG.bitmap.add(normalPixels,true,key);
			this.loadGraphic(key,true,W,H);
		} else {
			var normalPixels1 = this.assembleButtonFrames(arr_bmpData[frame_indeces[0]],arr_bmpData[frame_indeces[1]],arr_bmpData[frame_indeces[2]]);
			var togglePixels = this.assembleButtonFrames(arr_bmpData[frame_indeces[3]],arr_bmpData[frame_indeces[4]],arr_bmpData[frame_indeces[5]]);
			var combinedPixels = this.combineToggleBitmaps(normalPixels1,togglePixels);
			normalPixels1 = flixel_util_FlxDestroyUtil.dispose(normalPixels1);
			togglePixels = flixel_util_FlxDestroyUtil.dispose(togglePixels);
			flixel_FlxG.bitmap.add(combinedPixels,true,key);
			this.loadGraphic(key,true,W,H);
		}
		var _g16 = 0;
		var _g7 = arr_flx9.length;
		while(_g16 < _g7) {
			var i6 = _g16++;
			if(arr_flx9[i6] != null) {
				arr_flx9[i6].destroy();
				arr_flx9[i6] = null;
			}
		}
		while(arr_flx9.length > 0) arr_flx9.pop();
		while(arr_bmpData.length > 0) arr_bmpData.pop();
	}
	,autoCenterLabel: function() {
		if(this.label != null) {
			var offX = 0;
			var offY = 0;
			offX = this.get_width() - this._spriteLabel.get_width();
			if(js_Boot.__instanceof(this.label,flixel_addons_ui_FlxUIText)) {
				var tlabel = this.label;
				offX = (this.get_width() - tlabel.get_fieldWidth()) / 2;
				offY = (this.get_height() - tlabel.get_height()) / 2;
			} else {
				offX = (this.get_width() - this._spriteLabel.get_width()) / 2;
				offY = (this.get_height() - this._spriteLabel.get_height()) / 2;
			}
			this._centerLabelOffset.set_x(offX);
			this._centerLabelOffset.set_y(offY);
		}
	}
	,setCenterLabelOffset: function(X,Y) {
		this._centerLabelOffset.set_x(X);
		this._centerLabelOffset.set_y(Y);
	}
	,getCenterLabelOffset: function() {
		var X = this._centerLabelOffset.x;
		var Y = this._centerLabelOffset.y;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		return point;
	}
	,forceStateHandler: function(event) {
		switch(event) {
		case "click_button":
			this.onUpHandler();
			break;
		case "down_button":
			this.onDownHandler();
			break;
		case "out_button":
			this.onOutHandler();
			break;
		case "over_button":
			this.onOverHandler();
			break;
		}
	}
	,grabButtonFrame: function(all_frames,button_state,for_toggle,src_w,src_h,key) {
		if(src_h == null) {
			src_h = 0;
		}
		if(src_w == null) {
			src_w = 0;
		}
		if(for_toggle == null) {
			for_toggle = false;
		}
		var h = src_h;
		if(src_h == 0) {
			if(!for_toggle) {
				h = all_frames.height / 3 | 0;
			} else {
				h = all_frames.height / 6 | 0;
			}
		}
		var w = src_w;
		if(src_w == 0) {
			w = all_frames.width;
		}
		this._flashRect.x = 0;
		this._flashRect.y = button_state * h;
		this._flashRect.width = w;
		this._flashRect.height = h;
		if(this._flashRect.y >= all_frames.height) {
			if((all_frames.height / h | 0) == 4) {
				if(button_state == 4) {
					this._flashRect.y = 3 * h;
				} else if(button_state == 5) {
					this._flashRect.y = 2 * h;
				}
			}
		}
		var frameKey = key + "{x:" + this._flashRect.x + "y:" + this._flashRect.y + "w:" + this._flashRect.width + "h:" + this._flashRect.height + "}";
		if(frameKey != null) {
			if(flixel_FlxG.bitmap._cache.get(frameKey) != null) {
				return flixel_FlxG.bitmap._cache.get(frameKey).bitmap;
			}
		}
		var pixels = new openfl_display_BitmapData(w,h);
		pixels.copyPixels(all_frames,this._flashRect,this._flashPointZero);
		if(key != null) {
			flixel_FlxG.bitmap.add(pixels,true,frameKey);
			this.addToCleanup(frameKey);
		}
		return pixels;
	}
	,combineToggleBitmaps: function(normal,toggle) {
		var combined = new openfl_display_BitmapData(normal.width,normal.height + toggle.height);
		combined.copyPixels(normal,normal.rect,this._flashPointZero);
		this._flashPoint.x = 0;
		this._flashPoint.y = normal.height;
		combined.copyPixels(toggle,toggle.rect,this._flashPoint);
		return combined;
	}
	,assembleButtonFrames: function(upB,overB,downB) {
		var pixels;
		if(overB != null) {
			if(downB != null) {
				pixels = new openfl_display_BitmapData(upB.width,upB.height * 3);
			} else {
				pixels = new openfl_display_BitmapData(upB.width,upB.height * 2);
			}
		} else {
			pixels = new openfl_display_BitmapData(upB.width,upB.height);
		}
		pixels.copyPixels(upB,upB.rect,this._flashPointZero);
		if(overB != null) {
			this._flashPoint.x = 0;
			this._flashPoint.y = upB.height;
			pixels.copyPixels(overB,overB.rect,this._flashPoint);
			if(downB != null) {
				this._flashPoint.y = upB.height * 2;
				pixels.copyPixels(downB,downB.rect,this._flashPoint);
			}
		}
		return pixels;
	}
	,updateButton: function() {
		if(!this.skipButtonUpdate) {
			flixel_ui_FlxTypedButton.prototype.updateButton.call(this);
		}
	}
	,addToCleanup: function(str) {
		if(this._assetsToCleanup == null) {
			this._assetsToCleanup = [];
		}
		if(this._assetsToCleanup.indexOf(str) == -1) {
			this._assetsToCleanup.push(str);
		}
	}
	,cleanup: function() {
		if(this._assetsToCleanup == null) {
			return;
		}
		var _g = 0;
		var _g1 = this._assetsToCleanup;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			flixel_FlxG.bitmap.removeByKey(key);
		}
		this._assetsToCleanup = null;
	}
	,fetchAndShowCorrectLabel: function() {
		if(this.has_toggle) {
			if(this.toggled && this.toggle_label != null) {
				this._spriteLabel.set_visible(false);
				this.toggle_label.set_visible(true);
				return this.toggle_label;
			} else {
				if(this.toggle_label != null) {
					this.toggle_label.set_visible(false);
				}
				this._spriteLabel.set_visible(true);
				return this.label;
			}
		}
		return this.label;
	}
	,onUpHandler: function() {
		if(this.has_toggle) {
			this.set_toggled(!this.toggled);
		}
		flixel_ui_FlxTypedButton.prototype.onUpHandler.call(this);
		if(this.label != null) {
			var theLabel = this.fetchAndShowCorrectLabel();
			theLabel.set_visible(this.toggled ? this.up_toggle_visible : this.up_visible);
			var thecol = this.toggled ? this.up_toggle_color : this.up_color;
			if(thecol != null) {
				theLabel.set_color(thecol);
			}
		}
		if(this.broadcastToFlxUI) {
			flixel_addons_ui_FlxUI.event("click_button",this,null,this.params);
		}
	}
	,onDownHandler: function() {
		flixel_ui_FlxTypedButton.prototype.onDownHandler.call(this);
		if(this.label != null) {
			var theLabel = this.fetchAndShowCorrectLabel();
			theLabel.set_visible(this.toggled ? this.down_toggle_visible : this.down_visible);
			var thecol = this.toggled ? this.down_toggle_color : this.down_color;
			if(thecol != null) {
				theLabel.set_color(thecol);
			}
		}
		if(this.broadcastToFlxUI) {
			flixel_addons_ui_FlxUI.event("down_button",this,null,this.params);
		}
	}
	,onOverHandler: function() {
		flixel_ui_FlxTypedButton.prototype.onOverHandler.call(this);
		this.inputOver.press();
		if(this.label != null) {
			var theLabel = this.fetchAndShowCorrectLabel();
			theLabel.set_visible(this.toggled ? this.over_toggle_visible : this.over_visible);
			var thecol = this.toggled ? this.over_toggle_color : this.over_color;
			if(thecol != null) {
				theLabel.set_color(thecol);
			}
		}
		if(this.broadcastToFlxUI) {
			flixel_addons_ui_FlxUI.event("over_button",this,null,this.params);
		}
	}
	,onOutHandler: function() {
		flixel_ui_FlxTypedButton.prototype.onOutHandler.call(this);
		this.inputOver.release();
		if(this.label != null) {
			var theLabel = this.fetchAndShowCorrectLabel();
			theLabel.set_visible(this.toggled ? this.up_toggle_visible : this.up_visible);
			var thecol = this.toggled ? this.up_toggle_color : this.up_color;
			if(thecol != null) {
				theLabel.set_color(thecol);
			}
		}
		if(this.broadcastToFlxUI) {
			flixel_addons_ui_FlxUI.event("out_button",this,null,this.params);
		}
	}
	,set_x: function(NewX) {
		flixel_ui_FlxTypedButton.prototype.set_x.call(this,NewX);
		if(this._spriteLabel != null) {
			this._spriteLabel.set_x(this.x + this._centerLabelOffset.x + this.labelOffsets[this.status].x);
			if(this.round_labels) {
				this._spriteLabel.set_x(this._spriteLabel.x + 0.5 | 0);
			}
			if(this.has_toggle && this.toggle_label != null) {
				this.toggle_label.set_x(this._spriteLabel.x);
			}
		}
		return NewX;
	}
	,set_y: function(NewY) {
		flixel_ui_FlxTypedButton.prototype.set_y.call(this,NewY);
		if(this.label != null) {
			this._spriteLabel.set_y(this.y + this._centerLabelOffset.y + this.labelOffsets[this.status].y);
			if(this.round_labels) {
				this._spriteLabel.set_y(this._spriteLabel.y + 0.5 | 0);
			}
			if(this.has_toggle && this.toggle_label != null) {
				this.toggle_label.set_y(this._spriteLabel.y);
			}
		}
		return NewY;
	}
	,__class__: flixel_addons_ui_FlxUITypedButton
	,__properties__: $extend(flixel_ui_FlxTypedButton.prototype.__properties__,{set_params:"set_params",set_skipButtonUpdate:"set_skipButtonUpdate",set_toggle_label:"set_toggle_label",get_justMousedOut:"get_justMousedOut",get_mouseIsOut:"get_mouseIsOut",get_mouseIsOver:"get_mouseIsOver",get_justMousedOver:"get_justMousedOver",set_toggled:"set_toggled"})
});
var flixel_addons_ui_interfaces_ILabeled = function() { };
$hxClasses["flixel.addons.ui.interfaces.ILabeled"] = flixel_addons_ui_interfaces_ILabeled;
flixel_addons_ui_interfaces_ILabeled.__name__ = ["flixel","addons","ui","interfaces","ILabeled"];
flixel_addons_ui_interfaces_ILabeled.prototype = {
	__class__: flixel_addons_ui_interfaces_ILabeled
};
var flixel_addons_ui_FlxUIButton = function(X,Y,Label,OnClick,LoadDefaultGraphics,LoadBlank,Color) {
	if(Color == null) {
		Color = -1;
	}
	if(LoadBlank == null) {
		LoadBlank = false;
	}
	if(LoadDefaultGraphics == null) {
		LoadDefaultGraphics = true;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.down_toggle_style = null;
	this.over_toggle_style = null;
	this.up_toggle_style = null;
	this.down_style = null;
	this.over_style = null;
	this.up_style = null;
	flixel_addons_ui_FlxUITypedButton.call(this,X,Y,OnClick);
	this.set_color(Color);
	if(Label != null) {
		this.set_label(new flixel_addons_ui_FlxUIText(0,0,80,Label,8));
		this.label.setFormat(null,8,3355443,"center");
	}
	if(LoadBlank) {
		this._no_graphic = true;
	}
	if(LoadDefaultGraphics) {
		this.resize(this.get_width(),this.get_height());
	} else if(this._no_graphic == false) {
		this.doResize(this.get_width(),this.get_height(),false);
	} else {
		this.doResize(this.get_width(),this.get_height(),true);
	}
};
$hxClasses["flixel.addons.ui.FlxUIButton"] = flixel_addons_ui_FlxUIButton;
flixel_addons_ui_FlxUIButton.__name__ = ["flixel","addons","ui","FlxUIButton"];
flixel_addons_ui_FlxUIButton.__interfaces__ = [flixel_addons_ui_interfaces_IFlxUIButton,flixel_addons_ui_interfaces_ILabeled];
flixel_addons_ui_FlxUIButton.__super__ = flixel_addons_ui_FlxUITypedButton;
flixel_addons_ui_FlxUIButton.prototype = $extend(flixel_addons_ui_FlxUITypedButton.prototype,{
	setLabelFormat: function(Font,Size,Color,Alignment,BorderStyle,BorderColor,Embedded) {
		if(Embedded == null) {
			Embedded = true;
		}
		if(BorderColor == null) {
			BorderColor = 0;
		}
		if(Color == null) {
			Color = -1;
		}
		if(Size == null) {
			Size = 8;
		}
		if(this.label != null) {
			this.label.setFormat(Font,Size,Color,Alignment,BorderStyle,BorderColor,Embedded);
			return this.label;
		}
		return null;
	}
	,autoCenterLabel: function() {
		flixel_addons_ui_FlxUITypedButton.prototype.autoCenterLabel.call(this);
	}
	,clone: function() {
		var newButton = new flixel_addons_ui_FlxUIButton(0,0,this.label == null ? null : this.label.text,this.onUp.callback,false);
		newButton.copyGraphic(this);
		newButton.copyStyle(this);
		return newButton;
	}
	,copyStyle: function(other) {
		flixel_addons_ui_FlxUITypedButton.prototype.copyStyle.call(this,other);
		if(js_Boot.__instanceof(other,flixel_addons_ui_FlxUIButton)) {
			var fuib = other;
			this.up_style = fuib.up_style;
			this.over_style = fuib.over_style;
			this.down_style = fuib.down_style;
			this.up_toggle_style = fuib.up_toggle_style;
			this.over_toggle_style = fuib.over_toggle_style;
			this.down_toggle_style = fuib.down_toggle_style;
			var t = fuib.label;
			var tf = t.textField.get_defaultTextFormat();
			if(t._font.indexOf(flixel_system_FlxAssets.FONT_DEFAULT) == -1) {
				flixel_addons_ui_FontDef.copyFromFlxText(t).apply(null,this.label);
			} else {
				this.label.setFormat(null,tf.size | 0,tf.color,flixel_text__$FlxText_FlxTextAlign_$Impl_$.fromOpenFL(tf.align),t.borderStyle,t.borderColor,t.textField.set_embedFonts(true));
			}
		}
	}
	,setLabel: function(t) {
		this.set_label(t);
		return this.label;
	}
	,getLabel: function() {
		return this.label;
	}
	,resize: function(W,H) {
		flixel_addons_ui_FlxUITypedButton.prototype.resize.call(this,W,H);
	}
	,addIcon: function(icon,X,Y,center) {
		if(center == null) {
			center = true;
		}
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this._noIconGraphicsBkup = this.graphic.bitmap.clone();
		var newBmp = this._noIconGraphicsBkup.clone();
		this.loadGraphic(flixel_FlxG.bitmap.add(newBmp,false,this.graphic.key + ",icon:" + icon.graphic.key),true,this.get_width() | 0,this.get_height() | 0);
		var sx = X;
		var sy = Y;
		if(center) {
			sx = (this.get_width() - icon.get_width()) / 2 | 0;
			sy = (this.get_height() - icon.get_height()) / 2 | 0;
		}
		var _g1 = 0;
		var _g = this.numFrames;
		while(_g1 < _g) {
			var i = _g1++;
			this.stamp(icon,sx + (this.labelOffsets[i > 2 ? 2 : i].x | 0),sy + (i * this.get_height() | 0) + (this.labelOffsets[i > 2 ? 2 : i].y | 0));
		}
	}
	,removeIcon: function() {
		if(this._noIconGraphicsBkup != null) {
			this.graphic.bitmap.fillRect(this.graphic.bitmap.rect,0);
			this.graphic.bitmap.copyPixels(this._noIconGraphicsBkup,new openfl_geom_Rectangle(0,0,this._noIconGraphicsBkup.width,this._noIconGraphicsBkup.height),new openfl_geom_Point());
			this.dirty = true;
		}
	}
	,changeIcon: function(newIcon) {
		this.removeIcon();
		this.addIcon(newIcon);
	}
	,destroy: function() {
		this._noIconGraphicsBkup = flixel_util_FlxDestroyUtil.dispose(this._noIconGraphicsBkup);
		flixel_addons_ui_FlxUITypedButton.prototype.destroy.call(this);
	}
	,loadDefaultGraphic: function() {
	}
	,resetHelpers: function() {
		flixel_addons_ui_FlxUITypedButton.prototype.resetHelpers.call(this);
		if(this.label != null) {
			var tmp = this.label;
			var tmp1 = this.get_width() | 0;
			tmp.set_width(this.label.frameWidth = tmp1);
			this.label.set_fieldWidth(this.label.get_width());
			this.label.set_size(this.label._defaultFormat.size | 0);
		}
	}
	,onDownHandler: function() {
		flixel_addons_ui_FlxUITypedButton.prototype.onDownHandler.call(this);
		if(this.label != null) {
			if(this.toggled && this.down_toggle_style != null) {
				this.label.set_color(this.down_toggle_style.color);
				if(this.down_toggle_style.border != null) {
					this.label.set_borderStyle(this.down_toggle_style.border.style);
					this.label.set_borderColor(this.down_toggle_style.border.color);
					this.label.set_borderSize(this.down_toggle_style.border.size);
					this.label.set_borderQuality(this.down_toggle_style.border.quality);
				}
			} else if(!this.toggled && this.down_style != null) {
				this.label.set_color(this.down_style.color);
				if(this.down_style.border != null) {
					this.label.set_borderStyle(this.down_style.border.style);
					this.label.set_borderColor(this.down_style.border.color);
					this.label.set_borderSize(this.down_style.border.size);
					this.label.set_borderQuality(this.down_style.border.quality);
				}
			}
		}
	}
	,onOverHandler: function() {
		flixel_addons_ui_FlxUITypedButton.prototype.onOverHandler.call(this);
		if(this.label != null) {
			if(this.toggled && this.over_toggle_style != null) {
				this.label.set_color(this.over_toggle_style.color);
				if(this.over_toggle_style.border != null) {
					this.label.set_borderStyle(this.over_toggle_style.border.style);
					this.label.set_borderColor(this.over_toggle_style.border.color);
					this.label.set_borderSize(this.over_toggle_style.border.size);
					this.label.set_borderQuality(this.over_toggle_style.border.quality);
				}
			} else if(!this.toggled && this.over_style != null) {
				this.label.set_color(this.over_style.color);
				if(this.over_style.border != null) {
					this.label.set_borderStyle(this.over_style.border.style);
					this.label.set_borderColor(this.over_style.border.color);
					this.label.set_borderSize(this.over_style.border.size);
					this.label.set_borderQuality(this.over_style.border.quality);
				}
			}
		}
	}
	,onOutHandler: function() {
		flixel_addons_ui_FlxUITypedButton.prototype.onOutHandler.call(this);
		if(this.label != null) {
			if(this.toggled && this.up_toggle_style != null) {
				this.label.set_color(this.up_toggle_style.color);
				if(this.up_toggle_style.border != null) {
					this.label.set_borderStyle(this.up_toggle_style.border.style);
					this.label.set_borderColor(this.up_toggle_style.border.color);
					this.label.set_borderSize(this.up_toggle_style.border.size);
					this.label.set_borderQuality(this.up_toggle_style.border.quality);
				}
			} else if(!this.toggled && this.up_style != null) {
				this.label.set_color(this.up_style.color);
				if(this.up_style.border != null) {
					this.label.set_borderStyle(this.up_style.border.style);
					this.label.set_borderColor(this.up_style.border.color);
					this.label.set_borderSize(this.up_style.border.size);
					this.label.set_borderQuality(this.up_style.border.quality);
				}
			}
		}
	}
	,onUpHandler: function() {
		flixel_addons_ui_FlxUITypedButton.prototype.onUpHandler.call(this);
		if(this.label != null) {
			if(this.toggled && this.up_toggle_style != null) {
				this.label.set_color(this.up_toggle_style.color);
				if(this.up_toggle_style.border != null) {
					this.label.set_borderStyle(this.up_toggle_style.border.style);
					this.label.set_borderColor(this.up_toggle_style.border.color);
					this.label.set_borderSize(this.up_toggle_style.border.size);
					this.label.set_borderQuality(this.up_toggle_style.border.quality);
				}
			} else if(!this.toggled && this.up_style != null) {
				this.label.set_color(this.up_style.color);
				if(this.up_style.border != null) {
					this.label.set_borderStyle(this.up_style.border.style);
					this.label.set_borderColor(this.up_style.border.color);
					this.label.set_borderSize(this.up_style.border.size);
					this.label.set_borderQuality(this.up_style.border.quality);
				}
			}
		}
	}
	,__class__: flixel_addons_ui_FlxUIButton
});
var flixel_addons_ui_FlxUICheckBox = function(X,Y,Box,Check,Label,LabelW,Params,Callback) {
	if(LabelW == null) {
		LabelW = 100;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.skipButtonUpdate = false;
	this.box_space = 2;
	this.textY = 0;
	this.textX = 0;
	this.checkbox_dirty = false;
	this.textIsClickable = true;
	this.checked = false;
	this.max_width = -1;
	flixel_addons_ui_FlxUIGroup.call(this);
	this.callback = Callback;
	this.set_params(Params);
	if(Box == null) {
		Box = "flixel/flixel-ui/img/check_box.png";
	}
	if(js_Boot.__instanceof(Box,flixel_FlxSprite)) {
		this.box = Box;
	} else {
		this.box = new flixel_FlxSprite();
		this.box.loadGraphic(Box,true);
	}
	this.button = new flixel_addons_ui_FlxUIButton(0,0,Label,$bind(this,this._clickCheck));
	this.button.label.setFormat(null,8,16777215,"left",flixel_text_FlxTextBorderStyle.OUTLINE);
	this.button.label.set_fieldWidth(LabelW);
	this.button.up_color = 16777215;
	this.button.down_color = 16777215;
	this.button.over_color = 16777215;
	this.button.up_toggle_color = 16777215;
	this.button.down_toggle_color = 16777215;
	this.button.over_toggle_color = 16777215;
	this.button.loadGraphicSlice9(["","",""],this.box.get_width() + this.box_space + LabelW | 0,this.box.get_height() | 0);
	this.max_width = this.box.get_width() + this.box_space + LabelW | 0;
	this.button.onUp.callback = $bind(this,this._clickCheck);
	if(Check == null) {
		Check = "flixel/flixel-ui/img/check_mark.png";
	}
	if(js_Boot.__instanceof(Check,flixel_FlxSprite)) {
		this.mark = Check;
	} else {
		this.mark = new flixel_FlxSprite();
		this.mark.loadGraphic(Check);
	}
	this.add(this.box);
	this.add(this.mark);
	this.add(this.button);
	this.anchorLabelX();
	this.anchorLabelY();
	this.set_checked(false);
	this.button.setAllLabelOffsets(0,0);
	this.set_x(X);
	this.set_y(Y);
	this.set_textX(0);
	this.set_textY(0);
};
$hxClasses["flixel.addons.ui.FlxUICheckBox"] = flixel_addons_ui_FlxUICheckBox;
flixel_addons_ui_FlxUICheckBox.__name__ = ["flixel","addons","ui","FlxUICheckBox"];
flixel_addons_ui_FlxUICheckBox.__interfaces__ = [flixel_addons_ui_interfaces_ICursorPointable,flixel_addons_ui_interfaces_IHasParams,flixel_addons_ui_interfaces_IFlxUIClickable,flixel_addons_ui_interfaces_ILabeled];
flixel_addons_ui_FlxUICheckBox.__super__ = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUICheckBox.prototype = $extend(flixel_addons_ui_FlxUIGroup.prototype,{
	set_skipButtonUpdate: function(b) {
		this.skipButtonUpdate = b;
		this.button.set_skipButtonUpdate(this.skipButtonUpdate);
		return this.skipButtonUpdate;
	}
	,set_params: function(p) {
		this.params = p;
		if(this.params == null) {
			this.params = [];
		}
		this.params.push({ name : "checked", value : false});
		return this.params;
	}
	,set_color: function(Value) {
		if(this.button != null) {
			this.button.label.set_color(Value);
		}
		return flixel_addons_ui_FlxUIGroup.prototype.set_color.call(this,Value);
	}
	,setLabel: function(t) {
		if(this.button == null) {
			return null;
		}
		this.button.set_label(t);
		return this.button.label;
	}
	,getLabel: function() {
		if(this.button == null) {
			return null;
		}
		return this.button.label;
	}
	,set_visible: function(Value) {
		this.visible = Value;
		return this.visible;
	}
	,anchorTime: function(f) {
		this.anchorLabelY();
	}
	,set_textX: function(n) {
		this.textX = n;
		this.anchorLabelX();
		return this.textX;
	}
	,set_textY: function(n) {
		this.textY = n;
		this.anchorLabelY();
		return this.textY;
	}
	,anchorLabelX: function() {
		if(this.button != null) {
			this.button.label.offset.set_x(-(this.box.get_width() + this.box_space + this.textX));
		}
	}
	,anchorLabelY: function() {
		if(this.button != null) {
			this.button.set_y(this.box.y + (this.box.get_height() - this.button.get_height()) / 2 + this.textY);
		}
	}
	,destroy: function() {
		flixel_addons_ui_FlxUIGroup.prototype.destroy.call(this);
		if(this.mark != null) {
			this.mark.destroy();
			this.mark = null;
		}
		if(this.box != null) {
			this.box.destroy();
			this.box = null;
		}
		if(this.button != null) {
			this.button.destroy();
			this.button = null;
		}
	}
	,get_text: function() {
		return this.button.label.text;
	}
	,set_text: function(value) {
		this.button.label.set_text(value);
		this.checkbox_dirty = true;
		return value;
	}
	,update: function(elapsed) {
		flixel_addons_ui_FlxUIGroup.prototype.update.call(this,elapsed);
		if(this.checkbox_dirty) {
			if(this.button.label != null) {
				if(js_Boot.__instanceof(this.button.label,flixel_addons_ui_FlxUIText)) {
					this.button.label.drawFrame();
				}
				this.anchorLabelX();
				this.anchorLabelY();
				this.button.set_width(this.box.frameWidth + this.box_space + this.button.label.textField.get_textWidth());
				this.checkbox_dirty = false;
			}
		}
	}
	,set_checked: function(b) {
		this.mark.set_visible(b);
		return this.checked = b;
	}
	,_clickCheck: function() {
		if(!this.visible) {
			return;
		}
		this.set_checked(!this.checked);
		if(this.callback != null) {
			this.callback();
		}
		if(this.broadcastToFlxUI) {
			flixel_addons_ui_FlxUI.event("click_check_box",this,this.checked,this.params);
		}
	}
	,__class__: flixel_addons_ui_FlxUICheckBox
	,__properties__: $extend(flixel_addons_ui_FlxUIGroup.prototype.__properties__,{set_text:"set_text",get_text:"get_text",set_skipButtonUpdate:"set_skipButtonUpdate",set_textY:"set_textY",set_textX:"set_textX",set_params:"set_params",set_checked:"set_checked"})
});
var flixel_addons_ui_FlxUICursor = function(Callback,InputMethod,DefaultKeys,Asset) {
	if(DefaultKeys == null) {
		DefaultKeys = 1;
	}
	if(InputMethod == null) {
		InputMethod = 1;
	}
	this._clickTime = 0;
	this._clickPressed = false;
	this.lastMouseY = 0;
	this.lastMouseX = 0;
	this.inputMethod = 0;
	this.dispatchEvents = true;
	this.gamepadAutoConnect = flixel_addons_ui_GamepadAutoConnectPreference.FirstActive;
	this.listIndex = 0;
	this.location = -1;
	this.wrap = true;
	if(Asset == null) {
		if(flixel_FlxG.height < 400) {
			Asset = "flixel/flixel-ui/img/finger_small.png";
		} else {
			Asset = "flixel/flixel-ui/img/finger_big.png";
		}
	}
	flixel_addons_ui_FlxUISprite.call(this,0,0,Asset);
	this.inputMethod = InputMethod;
	this._lists = [{ x : 0, y : 0, width : 0, height : 0, widgets : []}];
	this._widgets = this._lists[0].widgets;
	this.anchor = new flixel_addons_ui_Anchor(-2,0,"left","center","right","center");
	this.setDefaultKeys(DefaultKeys);
	this.callback = Callback;
	this.scrollFactor.set(0,0);
	if(flixel_FlxG.mouse != null && js_Boot.__instanceof(flixel_FlxG.mouse,flixel_addons_ui_FlxUIMouse) == false) {
		this._newMouse = new flixel_addons_ui_FlxUIMouse(flixel_FlxG.mouse.cursorContainer);
		flixel_FlxG.set_mouse(this._newMouse);
	} else {
		this._newMouse = flixel_FlxG.mouse;
	}
};
$hxClasses["flixel.addons.ui.FlxUICursor"] = flixel_addons_ui_FlxUICursor;
flixel_addons_ui_FlxUICursor.__name__ = ["flixel","addons","ui","FlxUICursor"];
flixel_addons_ui_FlxUICursor.__super__ = flixel_addons_ui_FlxUISprite;
flixel_addons_ui_FlxUICursor.prototype = $extend(flixel_addons_ui_FlxUISprite.prototype,{
	findVisibleLocation: function(loc,forwardIfInvisible,wrap) {
		if(wrap == null) {
			wrap = true;
		}
		if(forwardIfInvisible == null) {
			forwardIfInvisible = true;
		}
		this.set_location(loc);
		if(this.location == -1) {
			return;
		}
		var wrapped = false;
		while(this._widgets[this.location] == null || this._widgets[this.location].visible == false) if(forwardIfInvisible) {
			if(this.location == this._widgets.length - 1) {
				if(wrap) {
					if(!wrapped) {
						wrapped = true;
						this.set_location(0);
					} else {
						this.set_location(-1);
						return;
					}
				} else {
					this.set_location(-1);
					return;
				}
			} else {
				var _g = this;
				_g.set_location(_g.location + 1);
			}
		} else if(this.location == 0) {
			if(wrap) {
				if(!wrapped) {
					wrapped = true;
					this.set_location(this._widgets.length - 1);
				} else {
					this.set_location(-1);
					return;
				}
			} else {
				this.set_location(-1);
				return;
			}
		} else {
			var _g1 = this;
			_g1.set_location(_g1.location - 1);
		}
	}
	,getCurrentWidget: function() {
		if(this._widgets != null && this.location >= 0 && this.location < this._widgets.length) {
			return this._widgets[this.location];
		}
		return null;
	}
	,set_listIndex: function(i) {
		if(i >= this._lists.length) {
			i = this._lists.length - 1;
		} else if(i < 0) {
			i = 0;
		}
		this.listIndex = i;
		this.set_location(0);
		this._updateCursor();
		return this.listIndex;
	}
	,set_visible: function(b) {
		b = flixel_addons_ui_FlxUISprite.prototype.set_visible.call(this,b);
		return b;
	}
	,set_location: function(i) {
		if(i >= this._widgets.length) {
			i = this._widgets.length - 1;
		}
		this.location = i;
		this._updateCursor();
		return this.location;
	}
	,set_gamepad: function(g) {
		this._gamepad = g;
		this.setDefaultKeys(this._defaultCode);
		var arr = [this.keysUp,this.keysDown,this.keysLeft,this.keysRight,this.keysClick];
		var _g = 0;
		while(_g < arr.length) {
			var list = arr[_g];
			++_g;
			if(list != null) {
				var _g1 = 0;
				while(_g1 < list.length) {
					var keys = list[_g1];
					++_g1;
					if(js_Boot.__instanceof(keys,flixel_addons_ui_FlxMultiGamepad)) {
						keys.gamepad = this._gamepad;
					}
				}
			}
		}
		return g;
	}
	,get_gamepad: function() {
		return this._gamepad;
	}
	,destroy: function() {
		flixel_addons_ui_FlxUISprite.prototype.destroy.call(this);
		if(flixel_FlxG.mouse == this._newMouse) {
			this._newMouse = null;
		}
		this.keysUp = flixel_util_FlxDestroyUtil.destroyArray(this.keysUp);
		this.keysDown = flixel_util_FlxDestroyUtil.destroyArray(this.keysDown);
		this.keysLeft = flixel_util_FlxDestroyUtil.destroyArray(this.keysLeft);
		this.keysRight = flixel_util_FlxDestroyUtil.destroyArray(this.keysRight);
		this.keysClick = flixel_util_FlxDestroyUtil.destroyArray(this.keysClick);
		this.anchor = flixel_util_FlxDestroyUtil.destroy(this.anchor);
		var _g = 0;
		var _g1 = this._lists;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			flixel_addons_ui_U.clearArraySoft(l.widgets);
		}
		flixel_addons_ui_U.clearArraySoft(this._lists);
		this._widgets = null;
	}
	,update: function(elapsed) {
		if(this.get_gamepad() == null) {
			var g = this.getGamepad(false);
			if(g != null) {
				this.set_gamepad(g);
			}
		}
		if(this.lastMouseX != flixel_FlxG.mouse.x || this.lastMouseY != flixel_FlxG.mouse.y) {
			var oldVis = this.visible;
			this.jumpToXY(flixel_FlxG.mouse.x,flixel_FlxG.mouse.y);
			this.set_visible(oldVis);
			this.lastMouseX = flixel_FlxG.mouse.x;
			this.lastMouseY = flixel_FlxG.mouse.y;
		}
		this._checkKeys();
		this._clickTime += elapsed;
		flixel_addons_ui_FlxUISprite.prototype.update.call(this,elapsed);
	}
	,addWidgetsFromUI: function(ui) {
		if(ui.cursorLists != null) {
			var _g = 0;
			var _g1 = ui.cursorLists;
			while(_g < _g1.length) {
				var list = _g1[_g];
				++_g;
				this.addWidgetList(list);
			}
			this._widgets = this._lists[0].widgets;
			this.set_location(0);
			this.set_listIndex(0);
		} else {
			var _g2 = 0;
			var _g11 = ui.group.members;
			while(_g2 < _g11.length) {
				var widget = _g11[_g2];
				++_g2;
				if(js_Boot.__instanceof(widget,flixel_addons_ui_interfaces_ICursorPointable) || js_Boot.__instanceof(widget,flixel_addons_ui_FlxUIGroup)) {
					this.addWidget(widget);
				}
			}
		}
	}
	,jumpTo: function(widget) {
		var listi = 0;
		var i = 0;
		if(this._lists != null) {
			var _g = 0;
			var _g1 = this._lists;
			while(_g < _g1.length) {
				var list = _g1[_g];
				++_g;
				i = list.widgets.indexOf(widget);
				if(i != -1) {
					this.set_listIndex(listi);
					this.set_location(i);
					return true;
				}
				++listi;
			}
		} else {
			i = this._widgets.indexOf(widget);
			this.set_location(i);
			return true;
		}
		return false;
	}
	,jumpToXY: function(X,Y) {
		var listi = 0;
		var bestd2 = Infinity;
		var bestli = -1;
		var besti = -1;
		if(this._lists != null) {
			var _g = 0;
			var _g1 = this._lists;
			while(_g < _g1.length) {
				var list = _g1[_g];
				++_g;
				var _g3 = 0;
				var _g2 = list.widgets.length;
				while(_g3 < _g2) {
					var i = _g3++;
					var w = list.widgets[i];
					if(w.visible == true && X >= w.x && Y >= w.y && X <= w.x + w.get_width() && Y <= w.y + w.get_height()) {
						var dx = w.x + w.get_width() / 2 - X;
						var dy = w.y + w.get_height() / 2 - Y;
						var d2 = dx * dx + dy * dy;
						if(d2 < bestd2) {
							bestd2 = d2;
							bestli = listi;
							besti = i;
						}
					}
				}
				++listi;
			}
			if(bestli != -1 && besti != -1) {
				this.set_listIndex(bestli);
				this.set_location(besti);
				return true;
			}
		} else {
			var _g11 = 0;
			var _g4 = this._widgets.length;
			while(_g11 < _g4) {
				var i1 = _g11++;
				var w1 = this._widgets[i1];
				if(w1.visible == true && X >= w1.x && Y >= w1.y && X <= w1.x + w1.get_width() && Y <= w1.y + w1.get_height()) {
					var dx1 = w1.x + w1.get_width() / 2 - X;
					var dy1 = w1.y + w1.get_height() / 2 - Y;
					var d21 = dx1 * dx1 + dy1 * dy1;
					if(d21 < bestd2) {
						bestd2 = d21;
						besti = i1;
					}
				}
			}
			if(besti != -1) {
				this.set_location(besti);
				return true;
			}
		}
		return false;
	}
	,addWidgetList: function(list) {
		var _g = 0;
		var _g1 = this._lists;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(flixel_util_FlxArrayUtil.equals(l.widgets,list)) {
				return;
			}
		}
		var x1 = Infinity;
		var y1 = Infinity;
		var x2 = -Infinity;
		var y2 = -Infinity;
		var _g2 = 0;
		while(_g2 < list.length) {
			var w = list[_g2];
			++_g2;
			if(w.x < x1) {
				x1 = w.x;
			}
			if(w.y < y1) {
				y1 = w.y;
			}
			if(w.x + w.get_width() > x2) {
				x2 = w.x;
			}
			if(w.y + w.get_height() > y2) {
				y2 = w.y;
			}
		}
		var theList = null;
		if(this._lists.length == 1 && this._lists[0].widgets != null && this._lists[0].widgets.length == 0) {
			this._lists[0].widgets = [];
			this._lists[0].x = x1 | 0;
			this._lists[0].y = y1 | 0;
			this._lists[0].width = x2 - x1 | 0;
			this._lists[0].height = y2 - y1 | 0;
			theList = this._lists[0];
		} else {
			this._lists.push({ x : x1 | 0, y : y1 | 0, width : x2 - x1 | 0, height : y2 - y1 | 0, widgets : []});
			theList = this._lists[this._lists.length - 1];
		}
		var oldWidgets = this._widgets;
		this._widgets = theList.widgets;
		var _g3 = 0;
		while(_g3 < list.length) {
			var ifw = list[_g3];
			++_g3;
			this.addWidget(ifw);
		}
		this._widgets = oldWidgets;
		this._lists.sort($bind(this,this._sortXYWidgetList));
		var _g4 = 0;
		var _g11 = this._lists;
		while(_g4 < _g11.length) {
			var widgetList = _g11[_g4];
			++_g4;
			widgetList.widgets.sort($bind(this,this._sortXYVisible));
		}
	}
	,addWidget: function(widget) {
		if(js_Boot.__instanceof(widget,flixel_addons_ui_interfaces_ICursorPointable)) {
			this._widgets.push(widget);
		} else if(js_Boot.__instanceof(widget,flixel_addons_ui_FlxUIGroup)) {
			var _g = 0;
			var _g1 = widget.group.members;
			while(_g < _g1.length) {
				var member = _g1[_g];
				++_g;
				if(js_Boot.__instanceof(member,flixel_addons_ui_interfaces_IFlxUIWidget)) {
					this.addWidget(member);
				}
			}
		}
		this._widgets.sort($bind(this,this._sortXYVisible));
	}
	,sortWidgets: function(method,list) {
		if(list == null) {
			list = this._widgets;
		}
		switch(method[1]) {
		case 0:
			list.sort($bind(this,this._sortXYVisible));
			break;
		case 1:
			list.sort($bind(this,this._sortIDVisible));
			break;
		}
	}
	,clearWidgets: function() {
		flixel_util_FlxArrayUtil.clearArray(this._widgets);
	}
	,removeWidget: function(widget,list) {
		if(list == null) {
			list = this._widgets;
		}
		var value = false;
		if(list != null) {
			if(list.indexOf(widget) != -1) {
				value = HxOverrides.remove(list,widget);
				list.sort($bind(this,this._sortXYVisible));
			}
		}
		return value;
	}
	,setDefaultKeys: function(code) {
		this._defaultCode = code;
		this._clearKeys();
		this._newKeys();
		if((code & 1) == 1) {
			this._addToKeys(this.keysRight,new flixel_addons_ui_FlxMultiKey(9,null,[16]));
			this._addToKeys(this.keysLeft,new flixel_addons_ui_FlxMultiKey(9,[16]));
			this._addToKeys(this.keysClick,new flixel_addons_ui_FlxMultiKey(13));
		}
		if((code & 256) == 256) {
			this._addToKeys(this.keysRight,new flixel_addons_ui_FlxMultiKey(39));
			this._addToKeys(this.keysLeft,new flixel_addons_ui_FlxMultiKey(37));
			this._addToKeys(this.keysDown,new flixel_addons_ui_FlxMultiKey(40));
			this._addToKeys(this.keysUp,new flixel_addons_ui_FlxMultiKey(38));
			this._addToKeys(this.keysClick,new flixel_addons_ui_FlxMultiKey(13));
		}
		if((code & 16) == 16) {
			this._addToKeys(this.keysRight,new flixel_addons_ui_FlxMultiKey(68));
			this._addToKeys(this.keysLeft,new flixel_addons_ui_FlxMultiKey(65));
			this._addToKeys(this.keysDown,new flixel_addons_ui_FlxMultiKey(83));
			this._addToKeys(this.keysUp,new flixel_addons_ui_FlxMultiKey(87));
			this._addToKeys(this.keysClick,new flixel_addons_ui_FlxMultiKey(13));
		}
		if((code & 4096) == 4096) {
			this._addToKeys(this.keysRight,new flixel_addons_ui_FlxMultiKey(102));
			this._addToKeys(this.keysLeft,new flixel_addons_ui_FlxMultiKey(100));
			this._addToKeys(this.keysDown,new flixel_addons_ui_FlxMultiKey(98));
			this._addToKeys(this.keysUp,new flixel_addons_ui_FlxMultiKey(104));
			this._addToKeys(this.keysClick,new flixel_addons_ui_FlxMultiKey(13));
		}
		if(this.get_gamepad() == null) {
			this._gamepad = this.getGamepad();
		}
		if((code & 65536) == 65536) {
			this._addToKeys(this.keysLeft,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),13));
			this._addToKeys(this.keysRight,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),14));
			this._addToKeys(this.keysDown,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),12));
			this._addToKeys(this.keysUp,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),11));
			this._addToKeys(this.keysClick,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),0));
		}
		if((code & 268435456) == 268435456) {
			this._addToKeys(this.keysLeft,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),4));
			this._addToKeys(this.keysRight,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),5));
			this._addToKeys(this.keysClick,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),0));
		}
		if((code & 1048576) == 1048576) {
			this._addToKeys(this.keysLeft,new flixel_addons_ui_FlxMultiGamepadAnalogStick(this.get_gamepad(),{ id : 19, axis : flixel_addons_ui_XY.X, positive : false}));
			this._addToKeys(this.keysRight,new flixel_addons_ui_FlxMultiGamepadAnalogStick(this.get_gamepad(),{ id : 19, axis : flixel_addons_ui_XY.X, positive : true}));
			this._addToKeys(this.keysUp,new flixel_addons_ui_FlxMultiGamepadAnalogStick(this.get_gamepad(),{ id : 19, axis : flixel_addons_ui_XY.Y, positive : false}));
			this._addToKeys(this.keysDown,new flixel_addons_ui_FlxMultiGamepadAnalogStick(this.get_gamepad(),{ id : 19, axis : flixel_addons_ui_XY.Y, positive : true}));
			this._addToKeys(this.keysClick,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),0));
		}
		if((code & 16777216) == 16777216) {
			this._addToKeys(this.keysLeft,new flixel_addons_ui_FlxMultiGamepadAnalogStick(this.get_gamepad(),{ id : 20, axis : flixel_addons_ui_XY.X, positive : false}));
			this._addToKeys(this.keysRight,new flixel_addons_ui_FlxMultiGamepadAnalogStick(this.get_gamepad(),{ id : 20, axis : flixel_addons_ui_XY.X, positive : true}));
			this._addToKeys(this.keysUp,new flixel_addons_ui_FlxMultiGamepadAnalogStick(this.get_gamepad(),{ id : 20, axis : flixel_addons_ui_XY.Y, positive : false}));
			this._addToKeys(this.keysDown,new flixel_addons_ui_FlxMultiGamepadAnalogStick(this.get_gamepad(),{ id : 20, axis : flixel_addons_ui_XY.Y, positive : true}));
			this._addToKeys(this.keysClick,new flixel_addons_ui_FlxMultiGamepad(this.get_gamepad(),0));
		}
	}
	,getGamepad: function(exhaustive) {
		if(exhaustive == null) {
			exhaustive = true;
		}
		var gamepad;
		var _g = this.gamepadAutoConnect;
		switch(_g[1]) {
		case 0:
			gamepad = null;
			break;
		case 1:
			gamepad = flixel_FlxG.gamepads.getFirstActiveGamepad();
			break;
		case 2:
			gamepad = flixel_FlxG.gamepads.lastActive;
			break;
		case 3:
			gamepad = flixel_FlxG.gamepads._activeGamepads[_g[2]];
			break;
		}
		if(gamepad == null && exhaustive) {
			var _g2 = 0;
			var _g1 = flixel_FlxG.gamepads.get_numActiveGamepads();
			while(_g2 < _g1) {
				gamepad = flixel_FlxG.gamepads._activeGamepads[_g2++];
				if(gamepad != null) {
					return gamepad;
				}
			}
		}
		return gamepad;
	}
	,_sortIDVisible: function(a,b) {
		if(a.visible && !b.visible) {
			return -1;
		}
		if(b.visible && !a.visible) {
			return 1;
		}
		if(a.ID < b.ID) {
			return -1;
		}
		if(a.ID > b.ID) {
			return 1;
		}
		return 0;
	}
	,_sortXYWidgetList: function(a,b) {
		if(a.y < b.y) {
			return -1;
		}
		if(a.y > b.y) {
			return 1;
		}
		if(a.x < b.x) {
			return -1;
		}
		if(a.x > b.x) {
			return 1;
		}
		return 0;
	}
	,_sortXYVisible: function(a,b) {
		if(a.visible && !b.visible) {
			return -1;
		}
		if(b.visible && !a.visible) {
			return 1;
		}
		if(a.y < b.y) {
			return -1;
		}
		if(a.y > b.y) {
			return 1;
		}
		if(a.x < b.x) {
			return -1;
		}
		if(a.x > b.x) {
			return 1;
		}
		return 0;
	}
	,_addToKeys: function(keys,m) {
		var exists = false;
		var _g = 0;
		while(_g < keys.length) {
			var mk = keys[_g];
			++_g;
			if(m.equals(mk)) {
				exists = true;
				break;
			}
		}
		if(!exists) {
			keys.push(m);
		}
	}
	,_clearKeys: function() {
		flixel_addons_ui_U.clearArray(this.keysUp);
		this.keysUp = null;
		flixel_addons_ui_U.clearArray(this.keysDown);
		this.keysDown = null;
		flixel_addons_ui_U.clearArray(this.keysLeft);
		this.keysLeft = null;
		flixel_addons_ui_U.clearArray(this.keysRight);
		this.keysRight = null;
		flixel_addons_ui_U.clearArray(this.keysClick);
		this.keysClick = null;
	}
	,_newKeys: function() {
		this.keysUp = [];
		this.keysDown = [];
		this.keysLeft = [];
		this.keysRight = [];
		this.keysClick = [];
	}
	,_checkKeys: function() {
		var wasInvisible = this.visible == false;
		var lastLocation = this.location;
		var _g = 0;
		var _g1 = this.keysUp;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key.justPressed()) {
				this._doInput(0,-1);
				break;
			}
		}
		var _g2 = 0;
		var _g11 = this.keysDown;
		while(_g2 < _g11.length) {
			var key1 = _g11[_g2];
			++_g2;
			if(key1.justPressed()) {
				this._doInput(0,1);
				break;
			}
		}
		var _g3 = 0;
		var _g12 = this.keysLeft;
		while(_g3 < _g12.length) {
			var key2 = _g12[_g3];
			++_g3;
			if(key2.justPressed()) {
				this._doInput(-1,0);
				break;
			}
		}
		var _g4 = 0;
		var _g13 = this.keysRight;
		while(_g4 < _g13.length) {
			var key3 = _g13[_g4];
			++_g4;
			if(key3.justPressed()) {
				this._doInput(1,0);
				break;
			}
		}
		if(wasInvisible && this.visible && lastLocation != -1) {
			this.set_location(lastLocation);
		}
		if(this._clickKeysJustPressed()) {
			if(!this.ignoreNextInput) {
				this._clickPressed = true;
				this._clickTime = 0;
				this._doPress();
			} else {
				this.ignoreNextInput = false;
			}
		}
		if(this._clickKeysPressed()) {
			this._clickPressed = true;
			this._doMouseMove();
		} else if(this._clickTime > 0) {
			if(this._clickPressed) {
				this._doRelease();
				this._clickPressed = false;
			}
		}
	}
	,_clickKeysJustPressed: function() {
		var _g = 0;
		var _g1 = this.keysClick;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key.justPressed()) {
				return true;
			}
		}
		return false;
	}
	,_clickKeysPressed: function() {
		var _g = 0;
		var _g1 = this.keysClick;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key.pressed()) {
				return true;
			}
		}
		return false;
	}
	,_getWidgetPoint: function(Camera) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		var currWidget = this._widgets[this.location];
		if(currWidget == null) {
			return null;
		}
		var fo;
		var widgetPoint = null;
		if(js_Boot.__instanceof(currWidget,flixel_FlxObject)) {
			fo = currWidget;
			widgetPoint = fo.getScreenPosition();
		}
		var _g = widgetPoint;
		_g.set_x(_g.x * Camera.totalScaleX);
		var _g1 = widgetPoint;
		_g1.set_y(_g1.y * Camera.totalScaleY);
		if(widgetPoint == null) {
			var X = currWidget.x;
			var Y = currWidget.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			widgetPoint = point;
		}
		var _g2 = widgetPoint;
		_g2.set_x(_g2.x + currWidget.get_width() / 2);
		var _g3 = widgetPoint;
		_g3.set_y(_g3.y + currWidget.get_height() / 2);
		return widgetPoint;
	}
	,_doMouseMove: function(pt) {
		var dispose = false;
		if(pt == null) {
			pt = this._getWidgetPoint();
			if(pt == null) {
				return;
			}
			dispose = true;
		}
		if(this.dispatchEvents) {
			var _this = flixel_FlxG.mouse;
			_this._globalScreenX = pt.x / flixel_FlxG.scaleMode.scale.x | 0;
			_this._globalScreenY = pt.y / flixel_FlxG.scaleMode.scale.y | 0;
			_this.updatePositions();
			if(this._newMouse != null) {
				this._newMouse.updateGlobalScreenPosition = false;
			}
			var tmp = openfl_Lib.current.stage;
			var pt1 = pt.x;
			var pt2 = pt.y;
			var tmp1 = openfl_Lib.current.stage;
			var _this1 = flixel_FlxG.keys.pressed;
			var tmp2 = _this1.keyManager.checkStatus(17,_this1.status);
			var _this2 = flixel_FlxG.keys.pressed;
			var tmp3 = _this2.keyManager.checkStatus(18,_this2.status);
			var _this3 = flixel_FlxG.keys.pressed;
			tmp.dispatchEvent(new openfl_events_MouseEvent("mouseMove",true,false,pt1,pt2,tmp1,tmp2,tmp3,_this3.keyManager.checkStatus(16,_this3.status)));
		}
		if(dispose) {
			pt.put();
		}
	}
	,_doPress: function(pt) {
		var currWidget = this._widgets[this.location];
		if(currWidget == null) {
			return;
		}
		var dispose = false;
		if(pt == null) {
			pt = this._getWidgetPoint();
			if(pt == null) {
				return;
			}
			dispose = true;
		}
		if(this.dispatchEvents) {
			var rawMouseX = pt.x * flixel_FlxG.camera.zoom;
			var rawMouseY = pt.y * flixel_FlxG.camera.zoom;
			var tmp = openfl_Lib.current.stage;
			var tmp1 = openfl_Lib.current.stage;
			var _this = flixel_FlxG.keys.pressed;
			var tmp2 = _this.keyManager.checkStatus(17,_this.status);
			var _this1 = flixel_FlxG.keys.pressed;
			var tmp3 = _this1.keyManager.checkStatus(18,_this1.status);
			var _this2 = flixel_FlxG.keys.pressed;
			tmp.dispatchEvent(new openfl_events_MouseEvent("mouseDown",true,false,rawMouseX,rawMouseY,tmp1,tmp2,tmp3,_this2.keyManager.checkStatus(16,_this2.status)));
		}
		if(this.callback != null) {
			this.callback("cursor_down",currWidget);
		}
		if(dispose) {
			pt.put();
		}
	}
	,_doRelease: function(pt) {
		var currWidget = this._widgets[this.location];
		if(currWidget == null) {
			return;
		}
		var dispose = false;
		if(pt == null) {
			pt = this._getWidgetPoint();
			if(pt == null) {
				return;
			}
			dispose = true;
		}
		var rawMouseX = pt.x * flixel_FlxG.camera.zoom;
		var rawMouseY = pt.y * flixel_FlxG.camera.zoom;
		if(this.dispatchEvents) {
			var tmp = openfl_Lib.current.stage;
			var tmp1 = openfl_Lib.current.stage;
			var _this = flixel_FlxG.keys.pressed;
			var tmp2 = _this.keyManager.checkStatus(17,_this.status);
			var _this1 = flixel_FlxG.keys.pressed;
			var tmp3 = _this1.keyManager.checkStatus(18,_this1.status);
			var _this2 = flixel_FlxG.keys.pressed;
			tmp.dispatchEvent(new openfl_events_MouseEvent("mouseUp",true,false,rawMouseX,rawMouseY,tmp1,tmp2,tmp3,_this2.keyManager.checkStatus(16,_this2.status)));
			if(this._clickPressed) {
				var tmp4 = openfl_Lib.current.stage;
				var tmp5 = openfl_Lib.current.stage;
				var _this3 = flixel_FlxG.keys.pressed;
				var tmp6 = _this3.keyManager.checkStatus(17,_this3.status);
				var _this4 = flixel_FlxG.keys.pressed;
				var tmp7 = _this4.keyManager.checkStatus(18,_this4.status);
				var _this5 = flixel_FlxG.keys.pressed;
				tmp4.dispatchEvent(new openfl_events_MouseEvent("click",true,false,rawMouseX,rawMouseY,tmp5,tmp6,tmp7,_this5.keyManager.checkStatus(16,_this5.status)));
			}
		}
		if(this.callback != null) {
			this.callback("cursor_click",currWidget);
		}
		if(dispose) {
			pt.put();
		}
		if(this._newMouse != null) {
			this._newMouse.updateGlobalScreenPosition = true;
			var _this6 = this._newMouse;
			var newX = flixel_FlxG.game.get_mouseX() | 0;
			var newY = flixel_FlxG.game.get_mouseY() | 0;
			_this6._globalScreenX = newX / flixel_FlxG.scaleMode.scale.x | 0;
			_this6._globalScreenY = newY / flixel_FlxG.scaleMode.scale.y | 0;
			_this6.updatePositions();
		}
	}
	,_findNextY: function(Y,indexValue,listWidget,listLists) {
		var currX = 0;
		var currY = 0;
		var length = 0;
		if(listWidget != null) {
			currX = listWidget[indexValue].x | 0;
			currY = listWidget[indexValue].y | 0;
			length = listWidget.length;
		} else if(listLists != null) {
			currX = listLists[indexValue].x;
			currY = listLists[indexValue].y;
			length = listLists.length;
		}
		var nextX = 0;
		var nextY = 0;
		var dx = Infinity;
		var dy = Infinity;
		var bestdx = dx;
		var bestdy = dy;
		var besti = -1;
		var _g1 = 0;
		var _g = length;
		while(_g1 < _g) {
			var i = _g1++;
			if(i != indexValue) {
				if(listWidget != null) {
					nextX = listWidget[i].x | 0;
					nextY = listWidget[i].y | 0;
				} else if(listLists != null) {
					nextX = listLists[i].x;
					nextY = listLists[i].y;
				}
				dy = nextY - currY;
				if((dy < 0 ? -1 : 1) == (Y < 0 ? -1 : 1) && dy != 0) {
					dy = Math.abs(dy);
					if(dy < bestdy) {
						bestdy = dy;
						bestdx = Math.abs(currX - nextX);
						besti = i;
					} else if(dy == bestdy) {
						dx = Math.abs(currX - nextX);
						if(dx < bestdx) {
							bestdx = dx;
							besti = i;
						}
					}
				}
			}
		}
		return besti;
	}
	,_wrapX: function(X,indexValue,listLength) {
		if(indexValue + X < 0) {
			indexValue = indexValue + X + listLength;
		} else if(indexValue + X >= listLength) {
			indexValue = indexValue + X - listLength;
		}
		return indexValue;
	}
	,_wrapY: function(Y,indexValue,listWidget,listLists) {
		var dx = Infinity;
		var dy = Infinity;
		var bestdx = dx;
		var bestdy = dy;
		var besti = -1;
		bestdx = Infinity;
		bestdy = 0;
		var length = 0;
		var currX = 0;
		var currY = 0;
		if(listWidget != null) {
			length = listWidget.length;
			currX = listWidget[indexValue].x | 0;
			currY = listWidget[indexValue].y | 0;
		}
		if(listLists != null) {
			length = listLists.length;
			currX = listLists[indexValue].x;
			currY = listLists[indexValue].y;
		}
		var _g1 = 0;
		var _g = length;
		while(_g1 < _g) {
			var i = _g1++;
			if(i != this.location) {
				var xx = 0;
				var yy = 0;
				if(listWidget != null) {
					xx = listWidget[i].x | 0;
					yy = listWidget[i].y | 0;
				} else if(listLists != null) {
					xx = listLists[i].x | 0;
					yy = listLists[i].y | 0;
				}
				dy = yy - currY;
				if((dy < 0 ? -1 : 1) == (Y < 0 ? -1 : 1) == false && dy != 0) {
					dy = Math.abs(dy);
					if(dy > bestdy) {
						bestdy = dy;
						bestdx = Math.abs(currX - xx);
						besti = i;
					} else if(dy == bestdy) {
						dx = Math.abs(currX - xx);
						if(dx < bestdx) {
							bestdx = dx;
							besti = i;
						}
					}
				}
			}
		}
		if(besti != -1) {
			indexValue = besti;
		}
		return indexValue;
	}
	,_doInput: function(X,Y,recursion) {
		if(recursion == null) {
			recursion = 0;
		}
		if(this.ignoreNextInput) {
			this.ignoreNextInput = false;
			return;
		}
		var currWidget = null;
		if(Y == 0) {
			if(this.location + X >= 0 && this.location + X < this._widgets.length) {
				this.set_location(this.location + X);
			} else if(this.wrap) {
				if(this._lists.length == 1) {
					this.set_location(this._wrapX(X,this.location,this._widgets.length));
				} else {
					if(this.listIndex + X >= 0 && this.listIndex + X < this._lists.length) {
						this.set_listIndex(this.listIndex + X);
					} else {
						this.set_listIndex(this._wrapX(X,this.listIndex,this._lists.length));
					}
					if(X == -1) {
						this.set_location(this._widgets.length - 1);
					}
				}
			}
			currWidget = this._widgets[this.location];
		} else {
			var nextY = this._findNextY(Y,this.location,this._widgets,null);
			if(nextY != -1) {
				this.set_location(nextY);
				currWidget = this._widgets[this.location];
			} else if(this.wrap) {
				if(this._lists.length == 1) {
					this.set_location(this._wrapY(Y,this.location,this._widgets,null));
					currWidget = this._widgets[this.location];
				} else {
					var nextListY = this._findNextY(Y,this.listIndex,null,this._lists);
					if(nextListY != -1) {
						this.set_listIndex(nextListY);
						currWidget = this._widgets[this.location];
					} else {
						this.set_listIndex(this._wrapY(Y,this.listIndex,null,this._lists));
					}
					if(Y == -1) {
						this.set_location(this._widgets.length - 1);
					}
				}
				currWidget = this._widgets[this.location];
			}
		}
		if(currWidget != null && this._widgets != null) {
			if(currWidget.visible == false && recursion < this._widgets.length) {
				this._doInput(X,Y,recursion + 1);
				return;
			}
		}
		if(this.callback != null) {
			this.callback("cursor_jump",currWidget);
		}
	}
	,_updateCursor: function() {
		this._widgets = this._lists[this.listIndex].widgets;
		if(this.location < 0 || this._lists == null || this._widgets == null) {
			this.set_visible(false);
			return;
		}
		this.set_visible(this.set_active(true));
		var currWidget = this._widgets[this.location];
		var flippedX = false;
		var flippedY = false;
		if(currWidget != null) {
			var target = currWidget;
			if(js_Boot.__instanceof(target,flixel_FlxSprite)) {
				var fs = target;
				if(fs != null && fs.scrollFactor != null) {
					this.scrollFactor.set(fs.scrollFactor.x,fs.scrollFactor.y);
				}
			}
			if(js_Boot.__instanceof(currWidget,flixel_addons_ui_FlxUICheckBox)) {
				target = target.box;
			}
			this.anchor.anchorThing(this,target);
			if(this.x < 0) {
				this._flipAnchor("left",target);
				flippedX = true;
			} else if(this.x > flixel_FlxG.width + this.get_width()) {
				this._flipAnchor("right",target);
				flippedX = true;
			}
			if(this.y < 0) {
				this._flipAnchor("top",target);
				flippedY = true;
			} else if(this.y > flixel_FlxG.height + this.get_height()) {
				this._flipAnchor("bottom",target);
				flippedY = true;
			}
			this.set_flipX(flippedX);
			this.set_flipY(flippedY);
		}
	}
	,_flipAnchor: function(AnchorDir,destination) {
		var theAnchor = null;
		switch(AnchorDir) {
		case "bottom":
			if(this.anchor.y.side == "bottom") {
				this._bottomAnchor = this.anchor.getFlipped(true,false,this._bottomAnchor);
				theAnchor = this._bottomAnchor;
			}
			break;
		case "left":
			if(this.anchor.x.side == "left") {
				this._leftAnchor = this.anchor.getFlipped(true,false,this._leftAnchor);
				theAnchor = this._leftAnchor;
			}
			break;
		case "right":
			if(this.anchor.x.side == "right") {
				this._topAnchor = this.anchor.getFlipped(true,false,this._rightAnchor);
				theAnchor = this._rightAnchor;
			}
			break;
		case "top":
			if(this.anchor.y.side == "top") {
				this._topAnchor = this.anchor.getFlipped(true,false,this._topAnchor);
				theAnchor = this._topAnchor;
			}
			break;
		}
		if(theAnchor != null) {
			theAnchor.anchorThing(this,destination);
		}
	}
	,__class__: flixel_addons_ui_FlxUICursor
	,__properties__: $extend(flixel_addons_ui_FlxUISprite.prototype.__properties__,{set_gamepad:"set_gamepad",get_gamepad:"get_gamepad",set_listIndex:"set_listIndex",set_location:"set_location"})
});
var flixel_addons_ui_GamepadAutoConnectPreference = $hxClasses["flixel.addons.ui.GamepadAutoConnectPreference"] = { __ename__ : ["flixel","addons","ui","GamepadAutoConnectPreference"], __constructs__ : ["Never","FirstActive","LastActive","GamepadID"] };
flixel_addons_ui_GamepadAutoConnectPreference.Never = ["Never",0];
flixel_addons_ui_GamepadAutoConnectPreference.Never.toString = $estr;
flixel_addons_ui_GamepadAutoConnectPreference.Never.__enum__ = flixel_addons_ui_GamepadAutoConnectPreference;
flixel_addons_ui_GamepadAutoConnectPreference.FirstActive = ["FirstActive",1];
flixel_addons_ui_GamepadAutoConnectPreference.FirstActive.toString = $estr;
flixel_addons_ui_GamepadAutoConnectPreference.FirstActive.__enum__ = flixel_addons_ui_GamepadAutoConnectPreference;
flixel_addons_ui_GamepadAutoConnectPreference.LastActive = ["LastActive",2];
flixel_addons_ui_GamepadAutoConnectPreference.LastActive.toString = $estr;
flixel_addons_ui_GamepadAutoConnectPreference.LastActive.__enum__ = flixel_addons_ui_GamepadAutoConnectPreference;
flixel_addons_ui_GamepadAutoConnectPreference.GamepadID = function(i) { var $x = ["GamepadID",3,i]; $x.__enum__ = flixel_addons_ui_GamepadAutoConnectPreference; $x.toString = $estr; return $x; };
var flixel_addons_ui_SortMethod = $hxClasses["flixel.addons.ui.SortMethod"] = { __ename__ : ["flixel","addons","ui","SortMethod"], __constructs__ : ["XY","ID"] };
flixel_addons_ui_SortMethod.XY = ["XY",0];
flixel_addons_ui_SortMethod.XY.toString = $estr;
flixel_addons_ui_SortMethod.XY.__enum__ = flixel_addons_ui_SortMethod;
flixel_addons_ui_SortMethod.ID = ["ID",1];
flixel_addons_ui_SortMethod.ID.toString = $estr;
flixel_addons_ui_SortMethod.ID.__enum__ = flixel_addons_ui_SortMethod;
var flixel_addons_ui_FlxUIDropDownMenu = function(X,Y,DataList,Callback,Header,DropPanel,ButtonList,UIControlCallback) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.dropDirection = flixel_addons_ui_FlxUIDropDownMenuDropDirection.Automatic;
	this.list = [];
	flixel_addons_ui_FlxUIGroup.call(this,X,Y);
	this.callback = Callback;
	this.header = Header;
	this.dropPanel = DropPanel;
	if(this.header == null) {
		this.header = new flixel_addons_ui_FlxUIDropDownHeader();
	}
	if(this.dropPanel == null) {
		this.dropPanel = new flixel_addons_ui_FlxUI9SliceSprite(0,0,"flixel/flixel-ui/img/box.png",new openfl_geom_Rectangle(0,0,this.header.background.get_width(),this.header.background.get_height()),[1,1,14,14]);
	}
	if(DataList != null) {
		var _g1 = 0;
		var _g = DataList.length;
		while(_g1 < _g) {
			var i = _g1++;
			var data = DataList[i];
			this.list.push(this.makeListButton(i,data.label,data.name));
		}
		this.selectSomething(DataList[0].name,DataList[0].label);
	} else if(ButtonList != null) {
		var _g2 = 0;
		while(_g2 < ButtonList.length) {
			var btn = ButtonList[_g2];
			++_g2;
			this.list.push(btn);
			btn.resize(this.header.background.get_width(),this.header.background.get_height());
			btn.set_x(1);
		}
	}
	this.updateButtonPositions();
	this.dropPanel.resize(this.header.background.get_width(),this.getPanelHeight());
	this.dropPanel.set_visible(false);
	this.add(this.dropPanel);
	var _g3 = 0;
	var _g11 = this.list;
	while(_g3 < _g11.length) {
		var btn1 = _g11[_g3];
		++_g3;
		this.add(btn1);
		btn1.set_visible(false);
	}
	this.header.button.onUp.callback = $bind(this,this.onDropdown);
	this.add(this.header);
};
$hxClasses["flixel.addons.ui.FlxUIDropDownMenu"] = flixel_addons_ui_FlxUIDropDownMenu;
flixel_addons_ui_FlxUIDropDownMenu.__name__ = ["flixel","addons","ui","FlxUIDropDownMenu"];
flixel_addons_ui_FlxUIDropDownMenu.__interfaces__ = [flixel_addons_ui_interfaces_IHasParams,flixel_addons_ui_interfaces_IFlxUIClickable,flixel_addons_ui_interfaces_IFlxUIWidget];
flixel_addons_ui_FlxUIDropDownMenu.makeStrIdLabelArray = function(StringArray,UseIndexID) {
	if(UseIndexID == null) {
		UseIndexID = false;
	}
	var strIdArray = [];
	var _g1 = 0;
	var _g = StringArray.length;
	while(_g1 < _g) {
		var i = _g1++;
		var ID = StringArray[i];
		if(UseIndexID) {
			if(i == null) {
				ID = "null";
			} else {
				ID = "" + i;
			}
		}
		strIdArray[i] = new flixel_addons_ui_StrNameLabel(ID,StringArray[i]);
	}
	return strIdArray;
};
flixel_addons_ui_FlxUIDropDownMenu.__super__ = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUIDropDownMenu.prototype = $extend(flixel_addons_ui_FlxUIGroup.prototype,{
	set_skipButtonUpdate: function(b) {
		this.skipButtonUpdate = b;
		this.header.button.set_skipButtonUpdate(b);
		return b;
	}
	,get_selectedId: function() {
		return this._selectedId;
	}
	,set_selectedId: function(str) {
		if(this._selectedId == str) {
			return str;
		}
		var i = 0;
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var btn = _g1[_g];
			++_g;
			if(btn != null && btn.name == str) {
				var item = this.list[i];
				this._selectedId = str;
				if(item.label != null) {
					this._selectedLabel = item.label.text;
					this.header.text.set_text(item.label.text);
				} else {
					this._selectedLabel = "";
					this.header.text.set_text("");
				}
				return str;
			}
			++i;
		}
		return str;
	}
	,get_selectedLabel: function() {
		return this._selectedLabel;
	}
	,set_selectedLabel: function(str) {
		if(this._selectedLabel == str) {
			return str;
		}
		var i = 0;
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var btn = _g1[_g];
			++_g;
			if(btn.label.text == str) {
				this._selectedId = this.list[i].name;
				this._selectedLabel = str;
				this.header.text.set_text(str);
				return str;
			}
			++i;
		}
		return str;
	}
	,set_params: function(p) {
		return this.params = p;
	}
	,set_dropDirection: function(dropDirection) {
		this.dropDirection = dropDirection;
		this.updateButtonPositions();
		return dropDirection;
	}
	,updateButtonPositions: function() {
		var buttonHeight = this.header.background.get_height();
		this.dropPanel.set_y(this.header.background.y);
		if(this.dropsUp()) {
			var _g = this.dropPanel;
			_g.set_y(_g.y - this.getPanelHeight());
		} else {
			var _g1 = this.dropPanel;
			_g1.set_y(_g1.y + buttonHeight);
		}
		var offset = this.dropPanel.y;
		var _g2 = 0;
		var _g11 = this.list;
		while(_g2 < _g11.length) {
			var button = _g11[_g2];
			++_g2;
			button.set_y(offset);
			offset += buttonHeight;
		}
	}
	,set_visible: function(Value) {
		var vDropPanel = this.dropPanel.visible;
		var vButtons = [];
		var _g1 = 0;
		var _g = this.list.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(this.list[i] != null) {
				vButtons.push(this.list[i].visible);
			} else {
				vButtons.push(false);
			}
		}
		flixel_addons_ui_FlxUIGroup.prototype.set_visible.call(this,Value);
		this.dropPanel.set_visible(vDropPanel);
		var _g11 = 0;
		var _g2 = this.list.length;
		while(_g11 < _g2) {
			var i1 = _g11++;
			if(this.list[i1] != null) {
				this.list[i1].set_visible(vButtons[i1]);
			}
		}
		return Value;
	}
	,dropsUp: function() {
		if(this.dropDirection != flixel_addons_ui_FlxUIDropDownMenuDropDirection.Up) {
			if(this.dropDirection == flixel_addons_ui_FlxUIDropDownMenuDropDirection.Automatic) {
				return this.exceedsHeight();
			} else {
				return false;
			}
		} else {
			return true;
		}
	}
	,exceedsHeight: function() {
		return this.y + this.getPanelHeight() > flixel_FlxG.height;
	}
	,getPanelHeight: function() {
		return this.list.length * this.header.background.get_height();
	}
	,setData: function(DataList) {
		var i = 0;
		if(DataList != null) {
			var _g = 0;
			while(_g < DataList.length) {
				var data = DataList[_g];
				++_g;
				var recycled = false;
				if(this.list != null) {
					if(i <= this.list.length - 1) {
						var btn = this.list[i];
						if(btn != null) {
							btn.label.set_text(data.label);
							this.list[i].name = data.name;
							recycled = true;
						}
					}
				} else {
					this.list = [];
				}
				if(!recycled) {
					var t = this.makeListButton(i,data.label,data.name);
					this.list.push(t);
					this.add(t);
					t.set_visible(false);
				}
				++i;
			}
			if(this.list.length > DataList.length) {
				var _g1 = DataList.length;
				var _g2 = this.list.length;
				while(_g1 < _g2) {
					++_g1;
					var b = this.list.pop();
					b.set_visible(false);
					b.set_active(false);
					this.remove(b,true);
					b.destroy();
					b = null;
				}
			}
			this.selectSomething(DataList[0].name,DataList[0].label);
		}
		this.dropPanel.resize(this.header.background.get_width(),this.getPanelHeight());
		this.updateButtonPositions();
	}
	,selectSomething: function(name,label) {
		this.header.text.set_text(label);
		this.set_selectedId(name);
		this.set_selectedLabel(label);
	}
	,makeListButton: function(i,Label,Name) {
		var t = new flixel_addons_ui_FlxUIButton(0,0,Label);
		t.broadcastToFlxUI = false;
		var f = $bind(this,this.onClickItem);
		var i1 = i;
		var tmp = function() {
			f(i1);
		};
		t.onUp.callback = tmp;
		t.name = Name;
		t.loadGraphicSlice9(["flixel/flixel-ui/img/invis.png","flixel/flixel-ui/img/hilight.png","flixel/flixel-ui/img/hilight.png"],this.header.background.get_width() | 0,this.header.background.get_height() | 0,[[1,1,3,3],[1,1,3,3],[1,1,3,3]],0);
		var _g = t.labelOffsets[2];
		_g.set_y(_g.y - 1);
		t.up_color = -16777216;
		t.over_color = -1;
		t.down_color = -1;
		t.resize(this.header.background.get_width() - 2,this.header.background.get_height() - 1);
		t.label.set_alignment("left");
		t.autoCenterLabel();
		t.set_x(1);
		var _g1 = 0;
		var _g11 = t.labelOffsets;
		while(_g1 < _g11.length) {
			var offset = _g11[_g1];
			++_g1;
			offset.set_x(offset.x + 2);
		}
		return t;
	}
	,changeLabelByIndex: function(i,NewLabel) {
		var btn = this.getBtnByIndex(i);
		if(btn != null && btn.label != null) {
			btn.label.set_text(NewLabel);
		}
	}
	,changeLabelById: function(name,NewLabel) {
		var btn = this.getBtnById(name);
		if(btn != null && btn.label != null) {
			btn.label.set_text(NewLabel);
		}
	}
	,getBtnByIndex: function(i) {
		if(i >= 0 && i < this.list.length) {
			return this.list[i];
		}
		return null;
	}
	,getBtnById: function(name) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var btn = _g1[_g];
			++_g;
			if(btn.name == name) {
				return btn;
			}
		}
		return null;
	}
	,update: function(elapsed) {
		flixel_addons_ui_FlxUIGroup.prototype.update.call(this,elapsed);
		if(this.dropPanel.visible && flixel_FlxG.mouse._leftButton.current == 2) {
			if(!flixel_FlxG.mouse.overlaps(this)) {
				this.showList(false);
			}
		}
	}
	,destroy: function() {
		flixel_addons_ui_FlxUIGroup.prototype.destroy.call(this);
		this.dropPanel = flixel_util_FlxDestroyUtil.destroy(this.dropPanel);
		this.list = flixel_util_FlxDestroyUtil.destroyArray(this.list);
		this.callback = null;
	}
	,showList: function(b) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			button.set_visible(b);
			button.set_active(b);
		}
		this.dropPanel.set_visible(b);
		flixel_addons_ui_FlxUI.forceFocus(b,this);
	}
	,onDropdown: function() {
		if(this.dropPanel.visible) {
			this.showList(false);
		} else {
			this.showList(true);
		}
	}
	,onClickItem: function(i) {
		var item = this.list[i];
		this.selectSomething(item.name,item.label.text);
		this.showList(false);
		if(this.callback != null) {
			this.callback(item.name);
		}
		if(this.broadcastToFlxUI) {
			flixel_addons_ui_FlxUI.event("click_dropdown",this,item.name,this.params);
		}
	}
	,__class__: flixel_addons_ui_FlxUIDropDownMenu
	,__properties__: $extend(flixel_addons_ui_FlxUIGroup.prototype.__properties__,{set_dropDirection:"set_dropDirection",set_params:"set_params",set_selectedLabel:"set_selectedLabel",get_selectedLabel:"get_selectedLabel",set_selectedId:"set_selectedId",get_selectedId:"get_selectedId",set_skipButtonUpdate:"set_skipButtonUpdate"})
});
var flixel_addons_ui_FlxUIDropDownHeader = function(Width,Background,Text,Button) {
	if(Width == null) {
		Width = 120;
	}
	flixel_addons_ui_FlxUIGroup.call(this);
	this.background = Background;
	this.text = Text;
	this.button = Button;
	if(this.background == null) {
		this.background = new flixel_addons_ui_FlxUI9SliceSprite(0,0,"flixel/flixel-ui/img/box.png",new openfl_geom_Rectangle(0,0,Width,20),[1,1,14,14]);
	}
	if(this.button == null) {
		this.button = new flixel_addons_ui_FlxUISpriteButton(0,0,new flixel_FlxSprite(0,0,"flixel/flixel-ui/img/dropdown_mark.png"));
		this.button.loadGraphicSlice9(["flixel/flixel-ui/img/button_thin.png"],80,20,[flixel_util_FlxStringUtil.toIntArray("6,6,11,11")],0,-1,false,18,18);
	}
	this.button.resize(this.background.get_height(),this.background.get_height());
	this.button.set_x(this.background.x + this.background.get_width() - this.button.get_width());
	this.button.set_width(Width);
	var _g = this.button.offset;
	_g.set_x(_g.x - (Width - this.button.frameWidth));
	this.button.set_x(this.offset.x);
	var _g1 = this.button.label.offset;
	_g1.set_x(_g1.x + this.button.offset.x);
	if(this.text == null) {
		this.text = new flixel_addons_ui_FlxUIText(0,0,this.background.get_width() | 0);
	}
	this.text.setPosition(2,4);
	this.text.set_color(-16777216);
	this.add(this.background);
	this.add(this.button);
	this.add(this.text);
};
$hxClasses["flixel.addons.ui.FlxUIDropDownHeader"] = flixel_addons_ui_FlxUIDropDownHeader;
flixel_addons_ui_FlxUIDropDownHeader.__name__ = ["flixel","addons","ui","FlxUIDropDownHeader"];
flixel_addons_ui_FlxUIDropDownHeader.__super__ = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUIDropDownHeader.prototype = $extend(flixel_addons_ui_FlxUIGroup.prototype,{
	destroy: function() {
		flixel_addons_ui_FlxUIGroup.prototype.destroy.call(this);
		this.background = flixel_util_FlxDestroyUtil.destroy(this.background);
		this.text = flixel_util_FlxDestroyUtil.destroy(this.text);
		this.button = flixel_util_FlxDestroyUtil.destroy(this.button);
	}
	,__class__: flixel_addons_ui_FlxUIDropDownHeader
});
var flixel_addons_ui_FlxUIDropDownMenuDropDirection = $hxClasses["flixel.addons.ui.FlxUIDropDownMenuDropDirection"] = { __ename__ : ["flixel","addons","ui","FlxUIDropDownMenuDropDirection"], __constructs__ : ["Automatic","Down","Up"] };
flixel_addons_ui_FlxUIDropDownMenuDropDirection.Automatic = ["Automatic",0];
flixel_addons_ui_FlxUIDropDownMenuDropDirection.Automatic.toString = $estr;
flixel_addons_ui_FlxUIDropDownMenuDropDirection.Automatic.__enum__ = flixel_addons_ui_FlxUIDropDownMenuDropDirection;
flixel_addons_ui_FlxUIDropDownMenuDropDirection.Down = ["Down",1];
flixel_addons_ui_FlxUIDropDownMenuDropDirection.Down.toString = $estr;
flixel_addons_ui_FlxUIDropDownMenuDropDirection.Down.__enum__ = flixel_addons_ui_FlxUIDropDownMenuDropDirection;
flixel_addons_ui_FlxUIDropDownMenuDropDirection.Up = ["Up",2];
flixel_addons_ui_FlxUIDropDownMenuDropDirection.Up.toString = $estr;
flixel_addons_ui_FlxUIDropDownMenuDropDirection.Up.__enum__ = flixel_addons_ui_FlxUIDropDownMenuDropDirection;
var flixel_addons_ui_FlxUIInputText = function(X,Y,Width,Text,size,TextColor,BackgroundColor,EmbeddedFont) {
	this.broadcastToFlxUI = true;
	flixel_addons_ui_FlxInputText.call(this,X,Y,Width,Text,size,TextColor,BackgroundColor,EmbeddedFont);
};
$hxClasses["flixel.addons.ui.FlxUIInputText"] = flixel_addons_ui_FlxUIInputText;
flixel_addons_ui_FlxUIInputText.__name__ = ["flixel","addons","ui","FlxUIInputText"];
flixel_addons_ui_FlxUIInputText.__interfaces__ = [flixel_addons_ui_interfaces_IHasParams,flixel_addons_ui_interfaces_IFlxUIWidget,flixel_addons_ui_interfaces_IResizable];
flixel_addons_ui_FlxUIInputText.__super__ = flixel_addons_ui_FlxInputText;
flixel_addons_ui_FlxUIInputText.prototype = $extend(flixel_addons_ui_FlxInputText.prototype,{
	resize: function(w,h) {
		this.set_width(w);
		this.set_height(h);
		this.calcFrame();
	}
	,onChange: function(action) {
		flixel_addons_ui_FlxInputText.prototype.onChange.call(this,action);
		if(this.broadcastToFlxUI) {
			switch(action) {
			case "backspace":case "delete":
				flixel_addons_ui_FlxUI.event("delete_input_text",this,this.text,this.params);
				flixel_addons_ui_FlxUI.event("change_input_text",this,this.text,this.params);
				break;
			case "enter":
				flixel_addons_ui_FlxUI.event("enter_input_text",this,this.text,this.params);
				break;
			case "input":
				flixel_addons_ui_FlxUI.event("input_input_text",this,this.text,this.params);
				flixel_addons_ui_FlxUI.event("change_input_text",this,this.text,this.params);
				break;
			}
		}
	}
	,__class__: flixel_addons_ui_FlxUIInputText
});
var flixel_addons_ui_FlxUILine = function(X,Y,Axis,Length,Thickness,Color) {
	this.thickness = 1;
	this.length = 10;
	this.axis = flixel_addons_ui_LineAxis.HORIZONTAL;
	flixel_addons_ui_FlxUISprite.call(this,X,Y);
	this.makeGraphic(2,2,-1);
	this.set_color(Color);
	this.set_axis(Axis);
	this.set_length(Length);
	this.set_thickness(Thickness);
};
$hxClasses["flixel.addons.ui.FlxUILine"] = flixel_addons_ui_FlxUILine;
flixel_addons_ui_FlxUILine.__name__ = ["flixel","addons","ui","FlxUILine"];
flixel_addons_ui_FlxUILine.__interfaces__ = [flixel_addons_ui_interfaces_IResizable];
flixel_addons_ui_FlxUILine.__super__ = flixel_addons_ui_FlxUISprite;
flixel_addons_ui_FlxUILine.prototype = $extend(flixel_addons_ui_FlxUISprite.prototype,{
	set_axis: function(a) {
		this.axis = a;
		this.refresh();
		return a;
	}
	,set_length: function(l) {
		this.length = l;
		this.refresh();
		return l;
	}
	,set_thickness: function(t) {
		this.thickness = t;
		this.refresh();
		return t;
	}
	,refresh: function() {
		if(this.axis == flixel_addons_ui_LineAxis.HORIZONTAL) {
			this.scale.set(0.5 * this.length,0.5 * this.thickness);
		} else {
			this.scale.set(0.5 * this.thickness,0.5 * this.length);
		}
		this.updateHitbox();
	}
	,resize: function(width,height) {
		if(this.axis == flixel_addons_ui_LineAxis.HORIZONTAL) {
			this.set_length(width);
			this.set_thickness(height);
		} else {
			this.set_length(height);
			this.set_thickness(width);
		}
	}
	,__class__: flixel_addons_ui_FlxUILine
	,__properties__: $extend(flixel_addons_ui_FlxUISprite.prototype.__properties__,{set_thickness:"set_thickness",set_length:"set_length",set_axis:"set_axis"})
});
var flixel_addons_ui_LineAxis = $hxClasses["flixel.addons.ui.LineAxis"] = { __ename__ : ["flixel","addons","ui","LineAxis"], __constructs__ : ["HORIZONTAL","VERTICAL"] };
flixel_addons_ui_LineAxis.HORIZONTAL = ["HORIZONTAL",0];
flixel_addons_ui_LineAxis.HORIZONTAL.toString = $estr;
flixel_addons_ui_LineAxis.HORIZONTAL.__enum__ = flixel_addons_ui_LineAxis;
flixel_addons_ui_LineAxis.VERTICAL = ["VERTICAL",1];
flixel_addons_ui_LineAxis.VERTICAL.toString = $estr;
flixel_addons_ui_LineAxis.VERTICAL.__enum__ = flixel_addons_ui_LineAxis;
var flixel_addons_ui_FlxUIList = function(X,Y,Widgets,W,H,MoreString,Stacking,Spacing,PrevButtonOffset,NextButtonOffset,PrevButton,NextButton) {
	if(Spacing == null) {
		Spacing = 0;
	}
	if(Stacking == null) {
		Stacking = 1;
	}
	if(MoreString == null) {
		MoreString = "<X> more...";
	}
	if(H == null) {
		H = 0;
	}
	if(W == null) {
		W = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this._skipRefresh = false;
	this.scrollIndex = 0;
	this._skipRefresh = true;
	flixel_addons_ui_FlxUIGroup.call(this,X,Y);
	this.set_stacking(Stacking);
	this.set_spacing(Spacing);
	if(Widgets != null) {
		var _g = 0;
		while(_g < Widgets.length) {
			var widget = Widgets[_g];
			++_g;
			this.add(widget);
		}
	}
	this.prevButton = PrevButton;
	this.nextButton = NextButton;
	this.prevButtonOffset = PrevButtonOffset;
	this.nextButtonOffset = NextButtonOffset;
	this.set_moreString(MoreString);
	if(this.prevButton == null) {
		var f = $bind(this,this.onClick);
		var pButton = new flixel_addons_ui_FlxUIButton(0,0," ",function() {
			f(-1);
		});
		if(this.stacking == 0) {
			pButton.loadGraphicsUpOverDown("flixel/flixel-ui/img/button_arrow_left.png");
			pButton.label.set_width(pButton.label.set_fieldWidth(100));
			pButton.label.set_text(this.getMoreString(0));
			pButton.setAllLabelOffsets(pButton.get_width() - pButton.label.get_width(),pButton.get_height() + 2);
			pButton.label.set_alignment("right");
		} else {
			pButton.loadGraphicsUpOverDown("flixel/flixel-ui/img/button_arrow_up.png");
			pButton.label.set_width(pButton.label.set_fieldWidth(100));
			pButton.label.set_text(this.getMoreString(0));
			pButton.setAllLabelOffsets(0,0);
			pButton.setCenterLabelOffset(pButton.get_width() + 2,pButton.get_height() - pButton.label.get_height());
			pButton.label.set_alignment("left");
		}
		this.prevButton = pButton;
	} else {
		if(js_Boot.__instanceof(this.prevButton,flixel_addons_ui_FlxUIButton)) {
			var f1 = $bind(this,this.onClick);
			var tmp = function() {
				f1(-1);
			};
			this.prevButton.onUp.callback = tmp;
		}
		if(js_Boot.__instanceof(this.prevButton,flixel_addons_ui_FlxUISpriteButton)) {
			var f2 = $bind(this,this.onClick);
			var tmp1 = function() {
				f2(-1);
			};
			this.prevButton.onUp.callback = tmp1;
		}
	}
	if(this.nextButton == null) {
		var f3 = $bind(this,this.onClick);
		var nButton = new flixel_addons_ui_FlxUIButton(0,0," ",function() {
			f3(1);
		});
		if(this.stacking == 0) {
			nButton.loadGraphicsUpOverDown("flixel/flixel-ui/img/button_arrow_right.png");
			nButton.label.set_width(nButton.label.set_fieldWidth(100));
			nButton.label.set_text(this.getMoreString(0));
			nButton.setAllLabelOffsets(0,nButton.get_height() + 2);
			nButton.label.set_alignment("left");
		} else {
			nButton.loadGraphicsUpOverDown("flixel/flixel-ui/img/button_arrow_down.png");
			nButton.label.set_width(nButton.label.set_fieldWidth(100));
			nButton.label.set_text(this.getMoreString(0));
			nButton.setAllLabelOffsets(0,0);
			nButton.setCenterLabelOffset(nButton.get_width() + 2,0);
			nButton.label.set_alignment("left");
		}
		this.nextButton = nButton;
	} else {
		if(js_Boot.__instanceof(this.nextButton,flixel_addons_ui_FlxUIButton)) {
			var f4 = $bind(this,this.onClick);
			var tmp2 = function() {
				f4(1);
			};
			this.nextButton.onUp.callback = tmp2;
		}
		if(js_Boot.__instanceof(this.nextButton,flixel_addons_ui_FlxUISpriteButton)) {
			var f5 = $bind(this,this.onClick);
			var tmp3 = function() {
				f5(1);
			};
			this.nextButton.onUp.callback = tmp3;
		}
	}
	if(this.prevButtonOffset == null) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		this.prevButtonOffset = point;
	}
	if(this.nextButtonOffset == null) {
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		this.nextButtonOffset = point1;
	}
	this._skipRefresh = false;
	this.setSize(W,H);
};
$hxClasses["flixel.addons.ui.FlxUIList"] = flixel_addons_ui_FlxUIList;
flixel_addons_ui_FlxUIList.__name__ = ["flixel","addons","ui","FlxUIList"];
flixel_addons_ui_FlxUIList.__super__ = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUIList.prototype = $extend(flixel_addons_ui_FlxUIGroup.prototype,{
	set_scrollIndex: function(i) {
		this.scrollIndex = i;
		this.refreshList();
		return i;
	}
	,set_stacking: function(Stacking) {
		this.stacking = Stacking;
		this.refreshList();
		return Stacking;
	}
	,set_spacing: function(Spacing) {
		this.spacing = Spacing;
		this.refreshList();
		return Spacing;
	}
	,set_moreString: function(str) {
		this.moreString = str;
		this.refreshList();
		return this.moreString;
	}
	,destroy: function() {
		this.prevButton = null;
		this.nextButton = null;
		this.prevButtonOffset.put();
		this.nextButtonOffset.put();
		this.prevButtonOffset = null;
		this.nextButtonOffset = null;
		flixel_addons_ui_FlxUIGroup.prototype.destroy.call(this);
	}
	,setSize: function(W,H) {
		var flip = false;
		if(this._skipRefresh == false) {
			this._skipRefresh = true;
			flip = true;
		}
		this.set_width(W);
		this.set_height(H);
		if(flip) {
			this._skipRefresh = false;
		}
		this.refreshList();
	}
	,add: function(Object) {
		flixel_addons_ui_FlxUIGroup.prototype.add.call(this,Object);
		this.refreshList();
		return Object;
	}
	,safeAdd: function(Object) {
		return flixel_addons_ui_FlxUIGroup.prototype.add.call(this,Object);
	}
	,getMoreString: function(i) {
		var newString = this.moreString;
		while(newString.indexOf("<X>") != -1) newString = StringTools.replace(newString,"<X>",i == null ? "null" : "" + i);
		return newString;
	}
	,set_visible: function(Value) {
		flixel_addons_ui_FlxUIGroup.prototype.set_visible.call(this,Value);
		this.refreshList();
		return Value;
	}
	,onClick: function(i) {
		var _g = this;
		_g.set_scrollIndex(_g.scrollIndex + i);
		this.refreshList();
	}
	,refreshList: function() {
		if(this._skipRefresh) {
			return;
		}
		this.autoBounds = false;
		if(this.group.members.indexOf(this.prevButton) != -1) {
			this.remove(this.prevButton,true);
		}
		if(this.group.members.indexOf(this.nextButton) != -1) {
			this.remove(this.nextButton,true);
		}
		var XX = 0;
		var YY = 0;
		var i = 0;
		var inBounds = true;
		if(this.stacking == 0) {
			this.prevButton.set_x(this.prevButtonOffset.x - this.prevButton.get_width() - 2);
			this.prevButton.set_y(this.prevButtonOffset.y);
			this.nextButton.set_x(this.nextButtonOffset.x + this.get_width() + 2);
			this.nextButton.set_y(this.nextButtonOffset.y);
		} else {
			this.prevButton.set_x(this.prevButtonOffset.x);
			this.prevButton.set_y(this.prevButtonOffset.y - this.prevButton.get_height() - 2);
			this.nextButton.set_x(this.nextButtonOffset.x);
			this.nextButton.set_y(this.nextButtonOffset.y + this.get_height() + 2);
		}
		this.prevButton.set_x(this.prevButton.x | 0);
		this.prevButton.set_y(this.prevButton.y | 0);
		this.nextButton.set_x(this.nextButton.x | 0);
		this.nextButton.set_y(this.nextButton.y | 0);
		var highestIndex = 0;
		var _g = 0;
		var _g1 = this.group.members;
		while(_g < _g1.length) {
			var widget = _g1[_g];
			++_g;
			inBounds = false;
			if(i >= this.scrollIndex) {
				if(this.stacking == 1) {
					if(!(YY + widget.get_height() <= this.get_height())) {
						inBounds = this.get_height() <= 0;
					} else {
						inBounds = true;
					}
				} else if(!(XX + widget.get_width() <= this.get_width())) {
					inBounds = this.get_width() <= 0;
				} else {
					inBounds = true;
				}
			}
			if(inBounds) {
				highestIndex = i;
				widget.set_visible(widget.set_active(true));
				widget.set_x(this.x + XX);
				widget.set_y(this.y + YY);
				if(this.stacking == 1) {
					YY += widget.get_height() + this.spacing;
				} else {
					XX += widget.get_width() + this.spacing;
				}
			} else {
				widget.set_x(widget.set_y(0));
				widget.set_visible(widget.set_active(false));
			}
			++i;
		}
		this.amountPrevious = this.scrollIndex;
		this.amountNext = this.group.members.length - (highestIndex + 1);
		var fuibutton;
		if(this.amountPrevious > 0) {
			this.safeAdd(this.prevButton);
			if(js_Boot.__instanceof(this.prevButton,flixel_addons_ui_FlxUIButton)) {
				fuibutton = this.prevButton;
				fuibutton.label.set_text(this.getMoreString(this.amountPrevious));
			}
		}
		if(this.amountNext > 0) {
			this.safeAdd(this.nextButton);
			if(js_Boot.__instanceof(this.nextButton,flixel_addons_ui_FlxUIButton)) {
				fuibutton = this.nextButton;
				fuibutton.label.set_text(this.getMoreString(this.amountNext));
			}
		}
	}
	,get_width: function() {
		return this.width;
	}
	,get_height: function() {
		return this.height;
	}
	,set_width: function(W) {
		this.width = W;
		this.refreshList();
		return W;
	}
	,set_height: function(H) {
		this.height = H;
		this.refreshList();
		return H;
	}
	,__class__: flixel_addons_ui_FlxUIList
	,__properties__: $extend(flixel_addons_ui_FlxUIGroup.prototype.__properties__,{set_moreString:"set_moreString",set_spacing:"set_spacing",set_stacking:"set_stacking",set_scrollIndex:"set_scrollIndex"})
});
var flixel_input_FlxPointer = function() {
	this._globalScreenY = 0;
	this._globalScreenX = 0;
	this.screenY = 0;
	this.screenX = 0;
	this.y = 0;
	this.x = 0;
};
$hxClasses["flixel.input.FlxPointer"] = flixel_input_FlxPointer;
flixel_input_FlxPointer.__name__ = ["flixel","input","FlxPointer"];
flixel_input_FlxPointer.prototype = {
	getWorldPosition: function(Camera,point) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		this.getScreenPosition(Camera,flixel_input_FlxPointer._cachedPoint);
		point.set_x(flixel_input_FlxPointer._cachedPoint.x + Camera.scroll.x);
		point.set_y(flixel_input_FlxPointer._cachedPoint.y + Camera.scroll.y);
		return point;
	}
	,getScreenPosition: function(Camera,point) {
		if(Camera == null) {
			Camera = flixel_FlxG.camera;
		}
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		point.set_x((this._globalScreenX - Camera.x + 0.5 * Camera.width * (Camera.zoom - Camera.initialZoom)) / Camera.zoom);
		point.set_y((this._globalScreenY - Camera.y + 0.5 * Camera.height * (Camera.zoom - Camera.initialZoom)) / Camera.zoom);
		return point;
	}
	,getPosition: function(point) {
		if(point == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point = point1;
		}
		return point.set(this.x,this.y);
	}
	,overlaps: function(ObjectOrGroup,Camera) {
		var _gthis = this;
		var result = false;
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			group.forEachExists(function(basic) {
				if(_gthis.overlaps(basic,Camera)) {
					result = true;
					return;
				}
			});
		} else {
			this.getPosition(flixel_input_FlxPointer._cachedPoint);
			result = ObjectOrGroup.overlapsPoint(flixel_input_FlxPointer._cachedPoint,true,Camera);
		}
		return result;
	}
	,setGlobalScreenPositionUnsafe: function(newX,newY) {
		this._globalScreenX = newX / flixel_FlxG.scaleMode.scale.x | 0;
		this._globalScreenY = newY / flixel_FlxG.scaleMode.scale.y | 0;
		this.updatePositions();
	}
	,toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,updatePositions: function() {
		this.getScreenPosition(flixel_FlxG.camera,flixel_input_FlxPointer._cachedPoint);
		this.screenX = flixel_input_FlxPointer._cachedPoint.x | 0;
		this.screenY = flixel_input_FlxPointer._cachedPoint.y | 0;
		this.getWorldPosition(flixel_FlxG.camera,flixel_input_FlxPointer._cachedPoint);
		this.x = flixel_input_FlxPointer._cachedPoint.x | 0;
		this.y = flixel_input_FlxPointer._cachedPoint.y | 0;
	}
	,__class__: flixel_input_FlxPointer
};
var flixel_input_IFlxInputManager = function() { };
$hxClasses["flixel.input.IFlxInputManager"] = flixel_input_IFlxInputManager;
flixel_input_IFlxInputManager.__name__ = ["flixel","input","IFlxInputManager"];
flixel_input_IFlxInputManager.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_input_IFlxInputManager.prototype = {
	__class__: flixel_input_IFlxInputManager
};
var flixel_input_mouse_FlxMouse = function(CursorContainer) {
	this._lastWheel = 0;
	this._lastY = 0;
	this._lastX = 0;
	this._visibleWhenFocusLost = true;
	this._wheelUsed = false;
	this._cursor = null;
	this.useSystemCursor = false;
	this.visible = true;
	this.wheel = 0;
	this.enabled = true;
	flixel_input_FlxPointer.call(this);
	this.cursorContainer = CursorContainer;
	this.cursorContainer.mouseChildren = false;
	this.cursorContainer.mouseEnabled = false;
	this._leftButton = new flixel_input_mouse_FlxMouseButton(-1);
	this._stage = openfl_Lib.current.stage;
	this._stage.addEventListener("mouseDown",($_=this._leftButton,$bind($_,$_.onDown)));
	this._stage.addEventListener("mouseUp",($_=this._leftButton,$bind($_,$_.onUp)));
	this._middleButton = new flixel_input_mouse_FlxMouseButton(-2);
	this._rightButton = new flixel_input_mouse_FlxMouseButton(-3);
	this._stage.addEventListener("middleMouseDown",($_=this._middleButton,$bind($_,$_.onDown)));
	this._stage.addEventListener("middleMouseUp",($_=this._middleButton,$bind($_,$_.onUp)));
	this._stage.addEventListener("rightMouseDown",($_=this._rightButton,$bind($_,$_.onDown)));
	this._stage.addEventListener("rightMouseUp",($_=this._rightButton,$bind($_,$_.onUp)));
	this._stage.addEventListener("mouseLeave",$bind(this,this.onMouseLeave));
	this._stage.addEventListener("mouseWheel",$bind(this,this.onMouseWheel));
	flixel_FlxG.signals.gameStarted.add($bind(this,this.onGameStart));
	openfl_ui_Mouse.hide();
};
$hxClasses["flixel.input.mouse.FlxMouse"] = flixel_input_mouse_FlxMouse;
flixel_input_mouse_FlxMouse.__name__ = ["flixel","input","mouse","FlxMouse"];
flixel_input_mouse_FlxMouse.__interfaces__ = [flixel_input_IFlxInputManager];
flixel_input_mouse_FlxMouse.__super__ = flixel_input_FlxPointer;
flixel_input_mouse_FlxMouse.prototype = $extend(flixel_input_FlxPointer.prototype,{
	load: function(Graphic,Scale,XOffset,YOffset) {
		if(YOffset == null) {
			YOffset = 0;
		}
		if(XOffset == null) {
			XOffset = 0;
		}
		if(Scale == null) {
			Scale = 1;
		}
		if(this._cursor != null) {
			flixel_util_FlxDestroyUtil.removeChild(this.cursorContainer,this._cursor);
		}
		if(Graphic == null) {
			Graphic = new flixel_input_mouse__$FlxMouse_GraphicCursor(0,0);
		}
		if(js_Boot.__instanceof(Graphic,Class)) {
			this._cursor = Type.createInstance(Graphic,[]);
		} else if(js_Boot.__instanceof(Graphic,openfl_display_BitmapData)) {
			this._cursor = new openfl_display_Bitmap(Graphic);
		} else if(typeof(Graphic) == "string") {
			var id = Graphic;
			this._cursor = new openfl_display_Bitmap(openfl_Assets.exists(id) ? openfl_Assets.getBitmapData(id,false) : null);
		} else {
			this._cursor = new openfl_display_Bitmap(new flixel_input_mouse__$FlxMouse_GraphicCursor(0,0));
		}
		this._cursor.set_x(XOffset);
		this._cursor.set_y(YOffset);
		this._cursor.set_scaleX(Scale);
		this._cursor.set_scaleY(Scale);
		this.cursorContainer.addChild(this._cursor);
	}
	,unload: function() {
		if(this._cursor != null) {
			if(this.cursorContainer.get_visible()) {
				this.load();
			} else {
				this._cursor = flixel_util_FlxDestroyUtil.removeChild(this.cursorContainer,this._cursor);
			}
		}
	}
	,destroy: function() {
		if(this._stage != null) {
			this._stage.removeEventListener("mouseDown",($_=this._leftButton,$bind($_,$_.onDown)));
			this._stage.removeEventListener("mouseUp",($_=this._leftButton,$bind($_,$_.onUp)));
			this._stage.removeEventListener("middleMouseDown",($_=this._middleButton,$bind($_,$_.onDown)));
			this._stage.removeEventListener("middleMouseUp",($_=this._middleButton,$bind($_,$_.onUp)));
			this._stage.removeEventListener("rightMouseDown",($_=this._rightButton,$bind($_,$_.onDown)));
			this._stage.removeEventListener("rightMouseUp",($_=this._rightButton,$bind($_,$_.onUp)));
			this._stage.removeEventListener("mouseLeave",$bind(this,this.onMouseLeave));
			this._stage.removeEventListener("mouseWheel",$bind(this,this.onMouseWheel));
		}
		this.cursorContainer = null;
		this._cursor = null;
		this._leftButton = flixel_util_FlxDestroyUtil.destroy(this._leftButton);
		this._middleButton = flixel_util_FlxDestroyUtil.destroy(this._middleButton);
		this._rightButton = flixel_util_FlxDestroyUtil.destroy(this._rightButton);
		this._cursorBitmapData = flixel_util_FlxDestroyUtil.dispose(this._cursorBitmapData);
		flixel_FlxG.signals.gameStarted.remove($bind(this,this.onGameStart));
	}
	,reset: function() {
		this._leftButton.reset();
		this._middleButton.reset();
		this._rightButton.reset();
	}
	,update: function() {
		var newX = flixel_FlxG.game.get_mouseX();
		var newY = flixel_FlxG.game.get_mouseY();
		this._globalScreenX = newX / flixel_FlxG.scaleMode.scale.x | 0;
		this._globalScreenY = newY / flixel_FlxG.scaleMode.scale.y | 0;
		this.updatePositions();
		if(this.visible) {
			this.cursorContainer.set_x(flixel_FlxG.game.get_mouseX());
			this.cursorContainer.set_y(flixel_FlxG.game.get_mouseY());
		}
		this._leftButton.update();
		this._middleButton.update();
		this._rightButton.update();
		if(!this._wheelUsed) {
			this.wheel = 0;
		}
		this._wheelUsed = false;
	}
	,onFocus: function() {
		this.reset();
		this.set_useSystemCursor(this.useSystemCursor);
		this.set_visible(this._visibleWhenFocusLost);
	}
	,onFocusLost: function() {
		this._visibleWhenFocusLost = this.visible;
		if(this.visible) {
			this.set_visible(false);
		}
		openfl_ui_Mouse.show();
	}
	,onGameStart: function() {
		this.set_visible(this.visible);
	}
	,onMouseWheel: function(FlashEvent) {
		if(this.enabled) {
			this._wheelUsed = true;
			this.wheel = FlashEvent.delta;
		}
	}
	,onMouseLeave: function(_) {
		this._rightButton.onUp();
		this._middleButton.onUp();
	}
	,get_pressed: function() {
		var _this = this._leftButton;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this._leftButton.current == 2;
	}
	,get_justReleased: function() {
		return this._leftButton.current == -1;
	}
	,get_pressedRight: function() {
		var _this = this._rightButton;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressedRight: function() {
		return this._rightButton.current == 2;
	}
	,get_justReleasedRight: function() {
		return this._rightButton.current == -1;
	}
	,get_pressedMiddle: function() {
		var _this = this._middleButton;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressedMiddle: function() {
		return this._middleButton.current == 2;
	}
	,get_justReleasedMiddle: function() {
		return this._middleButton.current == -1;
	}
	,showSystemCursor: function() {
		this.cursorContainer.set_visible(false);
		openfl_ui_Mouse.show();
	}
	,hideSystemCursor: function() {
		openfl_ui_Mouse.hide();
		if(this.visible) {
			this.cursorContainer.set_visible(true);
		}
	}
	,set_useSystemCursor: function(Value) {
		if(Value) {
			this.showSystemCursor();
		} else {
			this.hideSystemCursor();
		}
		return this.useSystemCursor = Value;
	}
	,showCursor: function() {
		if(this.useSystemCursor) {
			openfl_ui_Mouse.show();
		} else {
			if(this._cursor == null) {
				this.load();
			}
			this.cursorContainer.set_visible(true);
			openfl_ui_Mouse.hide();
		}
	}
	,hideCursor: function() {
		this.cursorContainer.set_visible(false);
		openfl_ui_Mouse.hide();
	}
	,set_visible: function(Value) {
		if(Value) {
			this.showCursor();
		} else {
			this.hideCursor();
		}
		return this.visible = Value;
	}
	,record: function() {
		if(this._lastX == this._globalScreenX && this._lastY == this._globalScreenY && this._lastLeftButtonState == this._leftButton.current && this._lastWheel == this.wheel) {
			return null;
		}
		this._lastX = this._globalScreenX;
		this._lastY = this._globalScreenY;
		this._lastLeftButtonState = this._leftButton.current;
		this._lastWheel = this.wheel;
		return new flixel_system_replay_MouseRecord(this._lastX,this._lastY,this._leftButton.current,this._lastWheel);
	}
	,playback: function(Record) {
		if((this._lastLeftButtonState == 1 || this._lastLeftButtonState == 2) && (Record.button == 0 || Record.button == -1)) {
			this._stage.dispatchEvent(new openfl_events_MouseEvent("mouseUp",true,false,Record.x,Record.y));
		}
		this._lastLeftButtonState = this._leftButton.current = Record.button;
		this.wheel = Record.wheel;
		this._globalScreenX = Record.x;
		this._globalScreenY = Record.y;
		this.updatePositions();
	}
	,__class__: flixel_input_mouse_FlxMouse
	,__properties__: {get_justReleasedMiddle:"get_justReleasedMiddle",get_justPressedMiddle:"get_justPressedMiddle",get_pressedMiddle:"get_pressedMiddle",get_justReleasedRight:"get_justReleasedRight",get_justPressedRight:"get_justPressedRight",get_pressedRight:"get_pressedRight",get_justReleased:"get_justReleased",get_justPressed:"get_justPressed",get_pressed:"get_pressed",set_useSystemCursor:"set_useSystemCursor",set_visible:"set_visible"}
});
var flixel_addons_ui_FlxUIMouse = function(CursorContainer) {
	this.updateGlobalScreenPosition = true;
	flixel_input_mouse_FlxMouse.call(this,CursorContainer);
};
$hxClasses["flixel.addons.ui.FlxUIMouse"] = flixel_addons_ui_FlxUIMouse;
flixel_addons_ui_FlxUIMouse.__name__ = ["flixel","addons","ui","FlxUIMouse"];
flixel_addons_ui_FlxUIMouse.__super__ = flixel_input_mouse_FlxMouse;
flixel_addons_ui_FlxUIMouse.prototype = $extend(flixel_input_mouse_FlxMouse.prototype,{
	update: function() {
		var oldScreenX = this._globalScreenX;
		var oldScreenY = this._globalScreenY;
		flixel_input_mouse_FlxMouse.prototype.update.call(this);
		if(!this.updateGlobalScreenPosition) {
			this._globalScreenX = oldScreenX;
			this._globalScreenY = oldScreenY;
		}
	}
	,__class__: flixel_addons_ui_FlxUIMouse
});
var flixel_addons_ui_FlxUINumericStepper = function(X,Y,StepSize,DefaultValue,Min,Max,Decimals,Stack,TextField,ButtonPlus,ButtonMinus,IsPercent) {
	if(IsPercent == null) {
		IsPercent = false;
	}
	if(Stack == null) {
		Stack = 1;
	}
	if(Decimals == null) {
		Decimals = 0;
	}
	if(Max == null) {
		Max = 999;
	}
	if(Min == null) {
		Min = -999;
	}
	if(DefaultValue == null) {
		DefaultValue = 0;
	}
	if(StepSize == null) {
		StepSize = 1;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.isPercent = false;
	this.stack = 1;
	this.value = 0;
	this.max = 10;
	this.min = 0;
	this.decimals = 0;
	this.stepSize = 0;
	flixel_addons_ui_FlxUIGroup.call(this,X,Y);
	if(TextField == null) {
		TextField = new flixel_addons_ui_FlxUIInputText(0,0,25);
	}
	TextField.set_x(0);
	TextField.set_y(0);
	this.text_field = TextField;
	this.text_field.set_text(DefaultValue == null ? "null" : "" + DefaultValue);
	if(js_Boot.__instanceof(this.text_field,flixel_addons_ui_FlxUIInputText)) {
		var fuit = this.text_field;
		fuit.set_lines(1);
		fuit.callback = $bind(this,this._onInputTextEvent);
		fuit.broadcastToFlxUI = false;
	}
	this.stepSize = StepSize;
	this.set_decimals(Decimals);
	this.set_min(Min);
	this.set_max(Max);
	this.set_value(DefaultValue);
	this.set_isPercent(IsPercent);
	var btnSize = 1 + TextField.get_height();
	if(ButtonPlus == null) {
		ButtonPlus = new flixel_addons_ui_FlxUITypedButton(0,0);
		ButtonPlus.loadGraphicSlice9(["flixel/flixel-ui/img/button_thin.png"],btnSize,btnSize,[flixel_util_FlxStringUtil.toIntArray("2,2,15,15")],0,-1,false,18,18);
		ButtonPlus.set_label(new flixel_FlxSprite(0,0,"flixel/flixel-ui/img/plus_mark.png"));
	}
	if(ButtonMinus == null) {
		ButtonMinus = new flixel_addons_ui_FlxUITypedButton(0,0);
		ButtonMinus.loadGraphicSlice9(["flixel/flixel-ui/img/button_thin.png"],btnSize,btnSize,[flixel_util_FlxStringUtil.toIntArray("2,2,15,15")],0,-1,false,18,18);
		ButtonMinus.set_label(new flixel_FlxSprite(0,0,"flixel/flixel-ui/img/minus_mark.png"));
	}
	this.button_plus = ButtonPlus;
	this.button_minus = ButtonMinus;
	this.add(this.text_field);
	this.add(this.button_plus);
	this.add(this.button_minus);
	this.button_plus.onUp.callback = $bind(this,this._onPlus);
	this.button_plus.broadcastToFlxUI = false;
	this.button_minus.onUp.callback = $bind(this,this._onMinus);
	this.button_minus.broadcastToFlxUI = false;
	this.set_stack(Stack);
};
$hxClasses["flixel.addons.ui.FlxUINumericStepper"] = flixel_addons_ui_FlxUINumericStepper;
flixel_addons_ui_FlxUINumericStepper.__name__ = ["flixel","addons","ui","FlxUINumericStepper"];
flixel_addons_ui_FlxUINumericStepper.__interfaces__ = [flixel_addons_ui_interfaces_IHasParams,flixel_addons_ui_interfaces_IFlxUIClickable,flixel_addons_ui_interfaces_IFlxUIWidget];
flixel_addons_ui_FlxUINumericStepper.__super__ = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUINumericStepper.prototype = $extend(flixel_addons_ui_FlxUIGroup.prototype,{
	set_params: function(p) {
		this.params = p;
		return this.params;
	}
	,set_skipButtonUpdate: function(b) {
		this.skipButtonUpdate = b;
		this.button_plus.set_skipButtonUpdate(b);
		this.button_minus.set_skipButtonUpdate(b);
		return b;
	}
	,set_color: function(Value) {
		this.color = Value;
		this.button_plus.set_color(Value);
		this.button_minus.set_color(Value);
		if(js_Boot.__instanceof(this.text_field,flixel_addons_ui_FlxInputText)) {
			this.text_field.set_backgroundColor(Value);
		} else {
			this.text_field.set_color(Value);
		}
		return Value;
	}
	,set_min: function(f) {
		this.min = f;
		if(this.value < this.min) {
			this.set_value(this.min);
		}
		return this.min;
	}
	,set_max: function(f) {
		this.max = f;
		if(this.value > this.max) {
			this.set_value(this.max);
		}
		return this.max;
	}
	,set_value: function(f) {
		this.value = f;
		if(this.value < this.min) {
			this.value = this.min;
		}
		if(this.value > this.max) {
			this.value = this.max;
		}
		if(this.text_field != null) {
			var displayValue = this.value;
			if(this.isPercent) {
				displayValue *= 100;
				var tens = Math.pow(10,this.decimals);
				this.text_field.set_text(Std.string(Std.string(Math.round(displayValue * tens) / tens)) + "%");
			} else {
				var tens1 = Math.pow(10,this.decimals);
				this.text_field.set_text(Std.string(Math.round(displayValue * tens1) / tens1));
			}
		}
		return this.value;
	}
	,set_decimals: function(i) {
		this.decimals = i;
		if(i < 0) {
			this.decimals = 0;
		}
		this.set_value(this.value);
		return this.decimals;
	}
	,set_isPercent: function(b) {
		this.isPercent = b;
		this.set_value(this.value);
		return this.isPercent;
	}
	,set_stack: function(s) {
		this.stack = s;
		var btnSize = 10;
		var offsetX = 0;
		var offsetY = 0;
		if(js_Boot.__instanceof(this.text_field,flixel_addons_ui_FlxUIInputText)) {
			offsetX = 1;
			offsetY = 1;
		}
		switch(this.stack) {
		case 0:
			btnSize = 1 + this.text_field.get_height() / 2;
			if(this.button_plus.get_height() != btnSize) {
				this.button_plus.resize(btnSize,btnSize);
			}
			if(this.button_minus.get_height() != btnSize) {
				this.button_minus.resize(btnSize,btnSize);
			}
			this.button_plus.set_x(offsetX + this.text_field.x + this.text_field.get_width());
			this.button_plus.set_y(-offsetY + this.text_field.y);
			this.button_minus.set_x(offsetX + this.text_field.x + this.text_field.get_width());
			this.button_minus.set_y(offsetY + this.text_field.y + (this.text_field.get_height() - this.button_minus.get_height()));
			break;
		case 1:
			btnSize = 2 + this.text_field.get_height();
			if(this.button_plus.get_height() != btnSize) {
				this.button_plus.resize(btnSize,btnSize);
			}
			if(this.button_minus.get_height() != btnSize) {
				this.button_minus.resize(btnSize,btnSize);
			}
			this.button_plus.set_x(offsetX + this.text_field.x + this.text_field.get_width());
			this.button_plus.set_y(-offsetY + this.text_field.y);
			this.button_minus.set_x(this.button_plus.x + this.button_plus.get_width());
			this.button_minus.set_y(this.button_plus.y);
			break;
		}
		return this.stack;
	}
	,decimalize: function(f,digits) {
		var tens = Math.pow(10,digits);
		return Std.string(Math.round(f * tens) / tens);
	}
	,_onInputTextEvent: function(text,action) {
		if(text == "") {
			text = Std.string(this.min);
		}
		var numDecimals = 0;
		var _g1 = 0;
		var _g = text.length;
		while(_g1 < _g) if(text.charAt(_g1++) == ".") {
			++numDecimals;
		}
		if(!(numDecimals == 1 && text.indexOf(".") == text.length - 1)) {
			this.set_value(parseFloat(text));
			this._doCallback("edit_numeric_stepper");
			this._doCallback("change_numeric_stepper");
		}
	}
	,_onPlus: function() {
		var _g = this;
		_g.set_value(_g.value + this.stepSize);
		this._doCallback("click_numeric_stepper");
		this._doCallback("change_numeric_stepper");
	}
	,_onMinus: function() {
		var _g = this;
		_g.set_value(_g.value - this.stepSize);
		this._doCallback("click_numeric_stepper");
		this._doCallback("change_numeric_stepper");
	}
	,_doCallback: function(event_name) {
		if(this.broadcastToFlxUI) {
			flixel_addons_ui_FlxUI.event(event_name,this,this.value,this.params);
		}
	}
	,__class__: flixel_addons_ui_FlxUINumericStepper
	,__properties__: $extend(flixel_addons_ui_FlxUIGroup.prototype.__properties__,{set_skipButtonUpdate:"set_skipButtonUpdate",set_params:"set_params",set_isPercent:"set_isPercent",set_stack:"set_stack",set_value:"set_value",set_max:"set_max",set_min:"set_min",set_decimals:"set_decimals"})
});
var flixel_addons_ui_FlxUIRadioGroup = function(X,Y,ids_,labels_,callback_,y_space_,width_,height_,label_width_,MoreString,PrevButtonOffset,NextButtonOffset,PrevButton,NextButton) {
	if(MoreString == null) {
		MoreString = "<X> more...";
	}
	if(label_width_ == null) {
		label_width_ = 100;
	}
	if(height_ == null) {
		height_ = 20;
	}
	if(width_ == null) {
		width_ = 100;
	}
	if(y_space_ == null) {
		y_space_ = 25;
	}
	this._clickable = true;
	this._selected = 0;
	this._y_space = 25;
	this._height = 20;
	this._width = 100;
	this._label_width = 100;
	this.fixedSize = false;
	flixel_addons_ui_FlxUIGroup.call(this);
	this._y_space = y_space_;
	this._width = width_;
	this._height = height_;
	this._label_width = label_width_;
	if(ids_ == null) {
		ids_ = [];
	}
	if(labels_ == null) {
		labels_ = [];
	}
	this.callback = callback_;
	this._list_radios = [];
	this._list_active = [];
	this._list = new flixel_addons_ui_FlxUIList(0,0,null,0,0,MoreString,1,0,PrevButtonOffset,NextButtonOffset,PrevButton,NextButton);
	this.add(this._list);
	this.updateRadios(ids_,labels_);
	this.loadGraphics(null,null);
	this.set_x(X);
	this.set_y(Y);
};
$hxClasses["flixel.addons.ui.FlxUIRadioGroup"] = flixel_addons_ui_FlxUIRadioGroup;
flixel_addons_ui_FlxUIRadioGroup.__name__ = ["flixel","addons","ui","FlxUIRadioGroup"];
flixel_addons_ui_FlxUIRadioGroup.__interfaces__ = [flixel_addons_ui_interfaces_IHasParams,flixel_addons_ui_interfaces_IFlxUIClickable];
flixel_addons_ui_FlxUIRadioGroup.__super__ = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUIRadioGroup.prototype = $extend(flixel_addons_ui_FlxUIGroup.prototype,{
	set_activeStyle: function(b) {
		this.activeStyle = b;
		this.updateActives();
		return this.activeStyle;
	}
	,set_inactiveStyle: function(b) {
		this.inactiveStyle = b;
		this.updateActives();
		return this.inactiveStyle;
	}
	,get_numRadios: function() {
		return this._list_radios.length;
	}
	,set_skipButtonUpdate: function(b) {
		this.skipButtonUpdate = b;
		var _g = 0;
		var _g1 = this._list_radios;
		while(_g < _g1.length) {
			var fcb = _g1[_g];
			++_g;
			fcb.set_skipButtonUpdate(b);
		}
		return this.skipButtonUpdate;
	}
	,set_params: function(p) {
		this.params = p;
		return this.params;
	}
	,set_width: function(Value) {
		flixel_addons_ui_FlxUIGroup.prototype.set_width.call(this,Value);
		if(this.fixedSize) {
			if(this._list != null) {
				this._list.set_width(Value);
			}
		}
		return Value;
	}
	,set_height: function(Value) {
		flixel_addons_ui_FlxUIGroup.prototype.set_height.call(this,Value);
		if(this.fixedSize) {
			if(this._list != null) {
				this._list.set_height(Value);
			}
		}
		return Value;
	}
	,loadGraphics: function(Box,Dot) {
		if(Box != null) {
			this._box_asset = Box;
		} else {
			this._box_asset = "flixel/flixel-ui/img/radio.png";
		}
		if(Dot != null) {
			this._dot_asset = Dot;
		} else {
			this._dot_asset = "flixel/flixel-ui/img/radio_dot.png";
		}
		if(js_Boot.__instanceof(this._box_asset,flixel_FlxSprite)) {
			this._box_asset = this._box_asset.graphic.key;
		}
		if(js_Boot.__instanceof(this._dot_asset,flixel_FlxSprite)) {
			this._dot_asset = this._dot_asset.graphic.key;
		}
		var _g = 0;
		var _g1 = this._list_radios;
		while(_g < _g1.length) {
			var c = _g1[_g];
			++_g;
			c.box.loadGraphic(this._box_asset,true);
			c.mark.loadGraphic(this._dot_asset);
		}
		this._refreshRadios();
	}
	,destroy: function() {
		if(this._list_radios != null) {
			flixel_addons_ui_U.clearArray(this._list_radios);
		}
		if(this._list_active != null) {
			flixel_addons_ui_U.clearArray(this._list_active);
		}
		this._list_active = null;
		this._list_radios = null;
		this._list = null;
		this._ids = null;
		this._labels = null;
		flixel_addons_ui_FlxUIGroup.prototype.destroy.call(this);
	}
	,updateLabel: function(i,label_) {
		if(i >= this._list_radios.length) {
			return false;
		}
		this._labels[i] = label_;
		var c = this._list_radios[i];
		if(c != null) {
			c.button.set_width(this._label_width);
			c.set_text(label_);
		}
		return true;
	}
	,updateId: function(i,id_) {
		if(i >= this._list_radios.length) {
			return false;
		}
		this._ids[i] = id_;
		return true;
	}
	,show: function(b) {
		var _g = 0;
		var _g1 = this._list.group.members;
		while(_g < _g1.length) {
			var fo = _g1[_g];
			++_g;
			fo.set_visible(b);
		}
	}
	,updateRadios: function(ids_,labels_) {
		this._ids = ids_;
		this._labels = labels_;
		var _g = 0;
		var _g1 = this._list_radios;
		while(_g < _g1.length) {
			var c = _g1[_g];
			++_g;
			c.set_visible(false);
		}
		this._refreshRadios();
	}
	,getRadios: function() {
		return this._list_radios;
	}
	,getLabel: function(i) {
		if(i >= 0 && i < this._labels.length) {
			return this._labels[i];
		}
		return null;
	}
	,getId: function(i) {
		if(i >= 0 && i < this._ids.length) {
			return this._ids[i];
		}
		return null;
	}
	,getIsVisible: function(i) {
		if(i >= 0 && i < this._list_radios.length) {
			return this._list_radios[i].visible;
		}
		return false;
	}
	,get_clickable: function() {
		return this._clickable;
	}
	,set_clickable: function(b) {
		this._clickable = b;
		var _g = 0;
		var _g1 = this._list_radios;
		while(_g < _g1.length) {
			var c = _g1[_g];
			++_g;
			c.set_active(b);
		}
		return this._clickable;
	}
	,get_selectedIndex: function() {
		return this._selected;
	}
	,set_selectedIndex: function(i) {
		this._selected = i;
		var j = 0;
		var _g = 0;
		var _g1 = this._list_radios;
		while(_g < _g1.length) {
			var c = _g1[_g];
			++_g;
			c.set_checked(false);
			if(j == i) {
				c.set_checked(true);
			}
			++j;
		}
		if(this._selected < 0 || this._selected >= this._list_radios.length) {
			this._selected = -1;
		}
		return this._selected;
	}
	,get_selectedLabel: function() {
		return this._labels[this._selected];
	}
	,set_selectedLabel: function(str) {
		var i = 0;
		this._selected = -1;
		var _g = 0;
		var _g1 = this._list_radios;
		while(_g < _g1.length) {
			var c = _g1[_g];
			++_g;
			c.set_checked(false);
			if(this._labels[i] == str) {
				this._selected = i;
				c.set_checked(true);
			}
			++i;
		}
		if(this._selected >= 0 && this._selected < this._labels.length) {
			return this._labels[this._selected];
		}
		return null;
	}
	,get_selectedId: function() {
		return this._ids[this._selected];
	}
	,set_selectedId: function(str) {
		var i = 0;
		this._selected = -1;
		var _g = 0;
		var _g1 = this._list_radios;
		while(_g < _g1.length) {
			var c = _g1[_g];
			++_g;
			c.set_checked(false);
			if(this._ids[i] == str) {
				this._selected = i;
				c.set_checked(true);
			}
			++i;
		}
		if(this._selected >= 0 && this._selected < this._ids.length) {
			return this._ids[this._selected];
		}
		return null;
	}
	,setLineScroll: function(scroll,max_items) {
		this._list.set_scrollIndex(scroll);
		if(max_items != null) {
			if(this._list.stacking == 1) {
				this.set_height(this._y_space * max_items + 1);
			}
		}
		var X = this._list.amountPrevious;
		var Y = this._list.amountNext;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		return point;
	}
	,setRadioActive: function(i,b) {
		if(i >= 0 && i < this._list_active.length) {
			this._list_active[i] = b;
		}
		this.updateActives();
	}
	,_refreshRadios: function() {
		var xx = this.x;
		var yy = this.y;
		var i = 0;
		var maxX = 0;
		var maxY = 0;
		this._list._skipRefresh = true;
		var _g = 0;
		var _g1 = this._ids;
		while(_g < _g1.length) {
			var id = _g1[_g];
			++_g;
			var label = "";
			if(this._labels != null && this._labels.length > i) {
				label = this._labels[i];
			} else {
				label = "<" + id + ">";
			}
			var c;
			if(this._list_radios.length > i) {
				c = this._list_radios[i];
				c.set_visible(true);
				c.set_text(label);
				if(i == 0) {
					xx = c.x;
					yy = c.y;
				} else {
					c.set_x(xx | 0);
					c.set_y(yy | 0);
				}
			} else {
				c = new flixel_addons_ui_FlxUICheckBox(0,0,this._box_asset,this._dot_asset,label,this._label_width,[id,false]);
				c.broadcastToFlxUI = false;
				c.callback = (function(a1,f) {
					return function() {
						f[0](a1[0]);
					};
				})([c],[$bind(this,this._onCheckBoxEvent)]);
				this._list.add(c);
				c.set_x(xx | 0);
				c.set_y(yy | 0);
				c.set_text(label);
				if(this._list_radios.length > 0) {
					c.button.copyStyle(this._list_radios[0].button);
					if(this.activeStyle == null) {
						this.set_activeStyle(this.makeActiveStyle());
					}
					c.button.set_width(this._list_radios[0].button.get_width());
					c.button.set_height(this._list_radios[0].button.get_height());
					c.set_textX(this._list_radios[0].textX);
					c.set_textY(this._list_radios[0].textY);
				}
				this._list_radios.push(c);
				this._list_active.push(true);
			}
			if(xx + c.get_width() > maxX) {
				maxX = xx + c.get_width();
			}
			if(yy + c.get_height() > maxY) {
				maxY = yy + c.get_height();
			}
			yy += this._y_space;
			++i;
		}
		if(this.fixedSize == false) {
			maxX += 5;
			maxY += 5;
			if(maxX > this._list.get_width()) {
				this._list.set_width(maxX);
			}
			if(maxY > this._list.get_height()) {
				this._list.set_height(maxY);
			}
			this.set_width(maxX);
			this.set_height(maxY);
		}
		this._list._skipRefresh = false;
		if(this.fixedSize == true) {
			this._list.refreshList();
		}
		this.updateActives();
	}
	,updateActives: function() {
		var i = 0;
		var _g = 0;
		var _g1 = this._list_radios;
		while(_g < _g1.length) {
			var r = _g1[_g];
			++_g;
			r.set_active(this._list_active[i]);
			if(this._list_active[i] == false && this.inactiveStyle != null) {
				this.inactiveStyle.applyToCheck(r);
			} else if(this._list_active[i] == true && this.activeStyle != null) {
				this.activeStyle.applyToCheck(r);
			}
			++i;
		}
	}
	,makeActiveStyle: function() {
		if(this._list_radios.length > 0) {
			var t = this._list_radios[0].button.label;
			return new flixel_addons_ui_CheckStyle(16777215,flixel_addons_ui_FontDef.copyFromFlxText(t),flixel_text__$FlxText_FlxTextAlign_$Impl_$.fromOpenFL(t._defaultFormat.align),t.color,new flixel_addons_ui_BorderDef(t.borderStyle,t.borderColor,t.borderSize,t.borderQuality));
		}
		return null;
	}
	,_onCheckBoxEvent: function(checkBox) {
		this._onClick(checkBox,true);
	}
	,_onClick: function(checkBox,doCallback) {
		if(!this._clickable) {
			return false;
		}
		var i = 0;
		var _g = 0;
		var _g1 = this._list_radios;
		while(_g < _g1.length) {
			var c = _g1[_g];
			++_g;
			c.set_checked(false);
			if(checkBox == c) {
				this._selected = i;
				c.set_checked(true);
			}
			++i;
		}
		if(doCallback) {
			if(this.callback != null) {
				this.callback(this.get_selectedId());
			}
			if(this.broadcastToFlxUI) {
				flixel_addons_ui_FlxUI.event("click_radio_group",this,this._ids[this._selected],this.params);
			}
		}
		return true;
	}
	,__class__: flixel_addons_ui_FlxUIRadioGroup
	,__properties__: $extend(flixel_addons_ui_FlxUIGroup.prototype.__properties__,{set_params:"set_params",set_skipButtonUpdate:"set_skipButtonUpdate",get_numRadios:"get_numRadios",set_inactiveStyle:"set_inactiveStyle",set_activeStyle:"set_activeStyle",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex",set_selectedLabel:"set_selectedLabel",get_selectedLabel:"get_selectedLabel",set_selectedId:"set_selectedId",get_selectedId:"get_selectedId",set_clickable:"set_clickable",get_clickable:"get_clickable"})
});
var flixel_addons_ui_CheckStyle = function(CheckColor,Font,Align,Color,Border) {
	this.checkColor = null;
	this.checkColor = CheckColor;
	flixel_addons_ui_ButtonLabelStyle.call(this,Font,Align,Color,Border);
};
$hxClasses["flixel.addons.ui.CheckStyle"] = flixel_addons_ui_CheckStyle;
flixel_addons_ui_CheckStyle.__name__ = ["flixel","addons","ui","CheckStyle"];
flixel_addons_ui_CheckStyle.__super__ = flixel_addons_ui_ButtonLabelStyle;
flixel_addons_ui_CheckStyle.prototype = $extend(flixel_addons_ui_ButtonLabelStyle.prototype,{
	applyToCheck: function(c) {
		if(this.checkColor != null) {
			c.set_color(this.checkColor);
		}
		this.apply(c.button.label);
	}
	,__class__: flixel_addons_ui_CheckStyle
});
var flixel_addons_ui_FlxUIRegion = function(X,Y,W,H) {
	if(H == null) {
		H = 16;
	}
	if(W == null) {
		W = 16;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.broadcastToFlxUI = true;
	flixel_FlxSprite.call(this,X,Y);
	this.makeGraphic(1,1,0);
	if(H < 1) {
		H = 1;
	}
	if(W < 1) {
		W = 1;
	}
	this.resize(W,H);
};
$hxClasses["flixel.addons.ui.FlxUIRegion"] = flixel_addons_ui_FlxUIRegion;
flixel_addons_ui_FlxUIRegion.__name__ = ["flixel","addons","ui","FlxUIRegion"];
flixel_addons_ui_FlxUIRegion.__interfaces__ = [flixel_addons_ui_interfaces_IResizable,flixel_addons_ui_interfaces_IFlxUIWidget];
flixel_addons_ui_FlxUIRegion.__super__ = flixel_FlxSprite;
flixel_addons_ui_FlxUIRegion.prototype = $extend(flixel_FlxSprite.prototype,{
	resize: function(w,h) {
		this.set_width(w);
		this.set_height(h);
	}
	,__class__: flixel_addons_ui_FlxUIRegion
});
var flixel_addons_ui_FlxUISpriteButton = function(X,Y,Asset,OnClick) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	flixel_addons_ui_FlxUITypedButton.call(this,X,Y,OnClick);
	this.up_color = this.over_color = this.down_color = this.up_toggle_color = this.over_toggle_color = this.down_toggle_color = -1;
	if(Asset != null) {
		this.set_label(Asset);
	}
};
$hxClasses["flixel.addons.ui.FlxUISpriteButton"] = flixel_addons_ui_FlxUISpriteButton;
flixel_addons_ui_FlxUISpriteButton.__name__ = ["flixel","addons","ui","FlxUISpriteButton"];
flixel_addons_ui_FlxUISpriteButton.__interfaces__ = [flixel_addons_ui_interfaces_IFlxUIButton];
flixel_addons_ui_FlxUISpriteButton.__super__ = flixel_addons_ui_FlxUITypedButton;
flixel_addons_ui_FlxUISpriteButton.prototype = $extend(flixel_addons_ui_FlxUITypedButton.prototype,{
	resize: function(W,H) {
		flixel_addons_ui_FlxUITypedButton.prototype.resize.call(this,W,H);
		this.autoCenterLabel();
	}
	,autoCenterLabel: function() {
		if(this.label != null) {
			if(js_Boot.__instanceof(this.label,flixel_group_FlxTypedSpriteGroup)) {
				var g = this.label;
				var _g = 0;
				var _g1 = g.group.members;
				while(_g < _g1.length) {
					var sprite = _g1[_g];
					++_g;
					sprite.set_x(-sprite.get_width() / 2);
					sprite.set_y(-sprite.get_height() / 2);
				}
				var W = g.get_width();
				var H = g.get_height();
				var _g2 = 0;
				var _g11 = g.group.members;
				while(_g2 < _g11.length) {
					var sprite1 = _g11[_g2];
					++_g2;
					sprite1.set_x((W - sprite1.get_width()) / 2);
					sprite1.set_y((H - sprite1.get_height()) / 2);
				}
			}
			flixel_addons_ui_FlxUITypedButton.prototype.autoCenterLabel.call(this);
		}
	}
	,__class__: flixel_addons_ui_FlxUISpriteButton
});
var flixel_addons_ui_interfaces_IFlxUIState = function() { };
$hxClasses["flixel.addons.ui.interfaces.IFlxUIState"] = flixel_addons_ui_interfaces_IFlxUIState;
flixel_addons_ui_interfaces_IFlxUIState.__name__ = ["flixel","addons","ui","interfaces","IFlxUIState"];
flixel_addons_ui_interfaces_IFlxUIState.__interfaces__ = [flixel_addons_ui_interfaces_IEventGetter];
flixel_addons_ui_interfaces_IFlxUIState.prototype = {
	__class__: flixel_addons_ui_interfaces_IFlxUIState
};
var flixel_addons_ui_FlxUIState = function(TransIn,TransOut) {
	this.getTextFallback = null;
	this._reload_countdown = 0;
	this._reload = false;
	this.reload_ui_on_resize = false;
	this._xml_id = "";
	this._cursorHidden = false;
	this.hideCursorOnSubstate = false;
	this.cursor = null;
	flixel_addons_transition_FlxTransitionableState.call(this,TransIn,TransOut);
};
$hxClasses["flixel.addons.ui.FlxUIState"] = flixel_addons_ui_FlxUIState;
flixel_addons_ui_FlxUIState.__name__ = ["flixel","addons","ui","FlxUIState"];
flixel_addons_ui_FlxUIState.__interfaces__ = [flixel_addons_ui_interfaces_IFlxUIState,flixel_addons_ui_interfaces_IEventGetter];
flixel_addons_ui_FlxUIState.__super__ = flixel_addons_transition_FlxTransitionableState;
flixel_addons_ui_FlxUIState.prototype = $extend(flixel_addons_transition_FlxTransitionableState.prototype,{
	create: function() {
		if(flixel_addons_ui_FlxUIState.static_tongue != null) {
			this._tongue = flixel_addons_ui_FlxUIState.static_tongue;
		}
		if(this._makeCursor == true) {
			this.cursor = this.createCursor();
		}
		this.tooltips = new flixel_addons_ui_FlxUITooltipManager(this);
		var liveFile = null;
		this._ui = this.createUI(null,this,null,this._tongue);
		this.add(this._ui);
		if(this.getTextFallback != null) {
			this._ui.getTextFallback = this.getTextFallback;
		}
		if(this._xml_id != null && this._xml_id != "") {
			var data = null;
			if(liveFile == null) {
				try {
					data = flixel_addons_ui_U.xml(this._xml_id);
				} catch( msg ) {
					haxe_CallStack.lastException = msg;
					if (msg instanceof js__$Boot_HaxeError) msg = msg.val;
					if( js_Boot.__instanceof(msg,String) ) {
					} else throw(msg);
				}
				if(data == null) {
					try {
						data = flixel_addons_ui_U.xml(this._xml_id,"xml",true,"");
					} catch( msg2 ) {
						haxe_CallStack.lastException = msg2;
						if (msg2 instanceof js__$Boot_HaxeError) msg2 = msg2.val;
						if( js_Boot.__instanceof(msg2,String) ) {
						} else throw(msg2);
					}
				}
			}
			if(data == null) {
				if(liveFile != null) {
					this.loadUIFromData(liveFile);
				}
			} else {
				this.loadUIFromData(data);
			}
		} else {
			this.loadUIFromData(null);
		}
		if(this.cursor != null && this._ui != null) {
			this.add(this.cursor);
			this.cursor.addWidgetsFromUI(this._ui);
			this.cursor.findVisibleLocation(0);
		}
		this.tooltips.init();
		flixel_addons_transition_FlxTransitionableState.prototype.create.call(this);
		this.cleanup();
	}
	,update: function(elapsed) {
		flixel_addons_transition_FlxTransitionableState.prototype.update.call(this,elapsed);
		if(this.tooltips != null) {
			this.tooltips.update(elapsed);
		}
		if(this._reload) {
			if(this._reload_countdown > 0) {
				this._reload_countdown--;
				if(this._reload_countdown == 0) {
					this.reloadUI();
				}
			}
		}
	}
	,cleanup: function() {
		this._ui.cleanup();
	}
	,_cleanupUIVars: function() {
		if(this._ui_vars != null) {
			var key = this._ui_vars.keys();
			while(key.hasNext()) {
				var key1 = key.next();
				this._ui_vars.remove(key1);
			}
			this._ui_vars = null;
		}
	}
	,setUIVariable: function(key,value) {
		if(this._ui != null) {
			this._ui.setVariable(key,value);
		} else {
			if(this._ui_vars == null) {
				this._ui_vars = new haxe_ds_StringMap();
			}
			var _this = this._ui_vars;
			if(__map_reserved[key] != null) {
				_this.setReserved(key,value);
			} else {
				_this.h[key] = value;
			}
		}
	}
	,resizeScreen: function(width,height) {
		if(height == null) {
			height = 600;
		}
		if(width == null) {
			width = 800;
		}
	}
	,openSubState: function(SubState) {
		if(this.cursor != null && this.hideCursorOnSubstate && this.cursor.visible == true) {
			this._cursorHidden = true;
			this.cursor.set_visible(false);
		}
		flixel_addons_transition_FlxTransitionableState.prototype.openSubState.call(this,SubState);
	}
	,closeSubState: function() {
		if(this.cursor != null && this.hideCursorOnSubstate && this._cursorHidden) {
			this._cursorHidden = false;
			this.cursor.set_visible(true);
		}
		flixel_addons_transition_FlxTransitionableState.prototype.closeSubState.call(this);
	}
	,onResize: function(Width,Height) {
		if(this.reload_ui_on_resize) {
			flixel_FlxG.scaleMode.onMeasure(Width,Height);
			this._reload_countdown = 1;
			this._reload = true;
		}
	}
	,onShowTooltip: function(t) {
	}
	,destroy: function() {
		this.destroyed = true;
		if(this._ui != null) {
			this._ui.destroy();
			this.remove(this._ui,true);
			this._ui = null;
		}
		if(this.tooltips != null) {
			this.tooltips.destroy();
			this.tooltips = null;
		}
		flixel_addons_transition_FlxTransitionableState.prototype.destroy.call(this);
	}
	,forceFocus: function(b,thing) {
		if(this._ui != null) {
			if(b) {
				this._ui.set_focus(thing);
			} else {
				this._ui.set_focus(null);
			}
		}
	}
	,onCursorEvent: function(code,target) {
	}
	,getEvent: function(id,sender,data,params) {
	}
	,getRequest: function(id,sender,data,params) {
		return null;
	}
	,getText: function(Flag,Context,Safe) {
		if(Safe == null) {
			Safe = true;
		}
		if(Context == null) {
			Context = "ui";
		}
		if(this._tongue != null) {
			return this._tongue.get(Flag,Context,Safe);
		}
		if(this.getTextFallback != null) {
			return this.getTextFallback(Flag,Context,Safe);
		}
		return Flag;
	}
	,createCursor: function() {
		return new flixel_addons_ui_FlxUICursor($bind(this,this.onCursorEvent));
	}
	,createUI: function(data,ptr,superIndex_,tongue_,liveFilePath_) {
		if(liveFilePath_ == null) {
			liveFilePath_ = "";
		}
		var flxui = new flixel_addons_ui_FlxUI(data,ptr,superIndex_,tongue_,liveFilePath_,this._ui_vars);
		this._cleanupUIVars();
		return flxui;
	}
	,loadUIFromData: function(data) {
		this._ui.load(data);
	}
	,reloadUI: function(e) {
		if(this._ui != null) {
			this.remove(this._ui,true);
			this._ui.destroy();
			this._ui = null;
		}
		this._ui = this.createUI(null,this,null,this._tongue);
		this.add(this._ui);
		var data = flixel_addons_ui_U.xml(this._xml_id);
		if(data != null) {
			this.loadUIFromData(data);
		}
		this._reload = false;
		this._reload_countdown = 0;
	}
	,__class__: flixel_addons_ui_FlxUIState
});
var flixel_addons_ui_FlxUISubState = function(BGColor) {
	if(BGColor == null) {
		BGColor = 0;
	}
	this.getTextFallback = null;
	this._reload_countdown = 0;
	this._reload = false;
	this.reload_ui_on_resize = false;
	this._xml_id = "";
	this.cursor = null;
	flixel_FlxSubState.call(this,BGColor);
};
$hxClasses["flixel.addons.ui.FlxUISubState"] = flixel_addons_ui_FlxUISubState;
flixel_addons_ui_FlxUISubState.__name__ = ["flixel","addons","ui","FlxUISubState"];
flixel_addons_ui_FlxUISubState.__interfaces__ = [flixel_addons_ui_interfaces_IFlxUIState];
flixel_addons_ui_FlxUISubState.__super__ = flixel_FlxSubState;
flixel_addons_ui_FlxUISubState.prototype = $extend(flixel_FlxSubState.prototype,{
	forceScrollFactor: function(X,Y) {
		if(this._ui != null) {
			var _g = 0;
			var _g1 = this._ui.group.members;
			while(_g < _g1.length) {
				var w = _g1[_g];
				++_g;
				w.scrollFactor.set(X,Y);
			}
			if(this._ui.scrollFactor != null) {
				this._ui.scrollFactor.set(X,Y);
			}
		}
	}
	,forceFocus: function(b,thing) {
		if(this._ui != null) {
			if(b) {
				this._ui.set_focus(thing);
			} else {
				this._ui.set_focus(null);
			}
		}
	}
	,create: function() {
		if(flixel_addons_ui_FlxUIState.static_tongue != null) {
			this._tongue = flixel_addons_ui_FlxUIState.static_tongue;
		}
		if(this._makeCursor == true) {
			this.cursor = this.createCursor();
		}
		this.tooltips = new flixel_addons_ui_FlxUITooltipManager(null,this);
		this._ui = this.createUI(null,this,null,this._tongue);
		this.add(this._ui);
		this._ui.getTextFallback = this.getTextFallback;
		if(this._xml_id != "" && this._xml_id != null) {
			var data = flixel_addons_ui_U.xml(this._xml_id);
			if(data == null) {
				data = flixel_addons_ui_U.xml(this._xml_id,"xml",true,"");
			}
			if(data != null) {
				this._ui.load(data);
			}
		} else {
			this._ui.load(null);
		}
		if(this.cursor != null && this._ui != null) {
			this.add(this.cursor);
			this.cursor.addWidgetsFromUI(this._ui);
			this.cursor.findVisibleLocation(0);
		}
		flixel_FlxG.mouse.set_visible(true);
		this.tooltips.init();
		flixel_FlxSubState.prototype.create.call(this);
		this.cleanup();
		if(js_Boot.__instanceof(this._parentState,flixel_addons_ui_FlxUIState)) {
			this.reload_ui_on_resize = (js_Boot.__cast(this._parentState , flixel_addons_ui_FlxUIState)).reload_ui_on_resize;
		}
	}
	,onCursorEvent: function(code,target) {
	}
	,onShowTooltip: function(t) {
	}
	,onResize: function(Width,Height) {
		if(this.reload_ui_on_resize) {
			flixel_FlxG.scaleMode.onMeasure(Width,Height);
			this._reload_countdown = 5;
			this._reload = true;
		}
	}
	,update: function(elapsed) {
		flixel_FlxSubState.prototype.update.call(this,elapsed);
		this.tooltips.update(elapsed);
		if(this._reload) {
			if(this._reload_countdown > 0) {
				this._reload_countdown--;
				if(this._reload_countdown == 0) {
					this.reloadUI();
				}
			}
		}
	}
	,destroy: function() {
		this.destroyed = true;
		if(this.tooltips != null) {
			this.tooltips.destroy();
			this.tooltips = null;
		}
		if(this._ui != null) {
			this._ui.destroy();
			this.remove(this._ui,true);
			this._ui = null;
		}
		flixel_FlxSubState.prototype.destroy.call(this);
	}
	,getEvent: function(id,sender,data,params) {
	}
	,getRequest: function(id,sender,data,params) {
		return null;
	}
	,getText: function(Flag,Context,Safe) {
		if(Safe == null) {
			Safe = true;
		}
		if(Context == null) {
			Context = "ui";
		}
		if(this._tongue != null) {
			return this._tongue.get(Flag,Context,Safe);
		}
		if(this.getTextFallback != null) {
			return this.getTextFallback(Flag,Context,Safe);
		}
		return Flag;
	}
	,cleanup: function() {
		this._ui.cleanup();
	}
	,createCursor: function() {
		return new flixel_addons_ui_FlxUICursor($bind(this,this.onCursorEvent));
	}
	,createUI: function(data,ptr,superIndex_,tongue_,liveFilePath_) {
		if(liveFilePath_ == null) {
			liveFilePath_ = "";
		}
		return new flixel_addons_ui_FlxUI(data,ptr,superIndex_,tongue_,liveFilePath_);
	}
	,reloadUI: function() {
		if(this._ui != null) {
			this.remove(this._ui,true);
			this._ui.destroy();
			this._ui = null;
		}
		this._ui = this.createUI(null,this,null,this._tongue);
		this.add(this._ui);
		var data = flixel_addons_ui_U.xml(this._xml_id);
		this._ui.load(data);
		this._reload = false;
		this._reload_countdown = 0;
	}
	,__class__: flixel_addons_ui_FlxUISubState
});
var flixel_addons_ui_FlxUITabMenu = function(back_,tabs_,tab_names_and_labels_,tab_offset,stretch_tabs,tab_spacing,tab_stacking) {
	if(stretch_tabs == null) {
		stretch_tabs = false;
	}
	this._selected_tab = -1;
	this._selected_tab_id = "";
	this._tab_offset = null;
	this._tab_stacking = null;
	this._tab_spacing = null;
	this._stretch_tabs = false;
	flixel_addons_ui_FlxUIGroup.call(this);
	if(back_ == null) {
		back_ = new flixel_addons_ui_FlxUI9SliceSprite(0,0,"flixel/flixel-ui/img/chrome_flat.png",new openfl_geom_Rectangle(0,0,200,200));
	}
	this._back = back_;
	this.add(this._back);
	if(tabs_ == null) {
		if(tab_names_and_labels_ != null) {
			tabs_ = [];
			var _g = 0;
			while(_g < tab_names_and_labels_.length) {
				var tdata = tab_names_and_labels_[_g];
				++_g;
				var fb = new flixel_addons_ui_FlxUIButton(0,0,tdata.label);
				fb.up_color = 16777215;
				fb.down_color = 16777215;
				fb.over_color = 16777215;
				fb.up_toggle_color = 16777215;
				fb.down_toggle_color = 16777215;
				fb.over_toggle_color = 16777215;
				fb.label.set_color(16777215);
				var _this = fb.label;
				_this.set_borderStyle(flixel_text_FlxTextBorderStyle.OUTLINE);
				_this.set_borderColor(0);
				_this.set_borderSize(1);
				_this.set_borderQuality(1);
				fb.name = tdata.name;
				var slice9tab = flixel_util_FlxStringUtil.toIntArray("6,6,11,11");
				fb.loadGraphicSlice9(["flixel/flixel-ui/img/tab_back.png","flixel/flixel-ui/img/tab_back.png","flixel/flixel-ui/img/tab_back.png","flixel/flixel-ui/img/tab.png","flixel/flixel-ui/img/tab.png","flixel/flixel-ui/img/tab.png"],0,0,[slice9tab,slice9tab,slice9tab,slice9tab,slice9tab,slice9tab],0,-1,true);
				tabs_.push(fb);
			}
		}
	}
	this._tabs = tabs_;
	this._stretch_tabs = stretch_tabs;
	this._tab_spacing = tab_spacing;
	this._tab_stacking = tab_stacking;
	if(this._tab_stacking == null) {
		this._tab_stacking = ["front","back"];
	}
	this._tab_offset = tab_offset;
	var tab = null;
	var _g1 = 0;
	var _g11 = this._tabs;
	while(_g1 < _g11.length) {
		var t = _g11[_g1];
		++_g1;
		tab = t;
		this.add(tab);
		var tmp = (function(a1,f) {
			return function() {
				f[0](a1[0]);
			};
		})([tab.name],[$bind(this,this._onTabEvent)]);
		tab.onUp.callback = tmp;
	}
	this.distributeTabs();
	this._tab_groups = [];
};
$hxClasses["flixel.addons.ui.FlxUITabMenu"] = flixel_addons_ui_FlxUITabMenu;
flixel_addons_ui_FlxUITabMenu.__name__ = ["flixel","addons","ui","FlxUITabMenu"];
flixel_addons_ui_FlxUITabMenu.__interfaces__ = [flixel_addons_ui_interfaces_IEventGetter,flixel_addons_ui_interfaces_IFlxUIClickable,flixel_addons_ui_interfaces_IResizable];
flixel_addons_ui_FlxUITabMenu.__super__ = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUITabMenu.prototype = $extend(flixel_addons_ui_FlxUIGroup.prototype,{
	get_numTabs: function() {
		if(this._tabs != null) {
			return this._tabs.length;
		}
		return 0;
	}
	,getEvent: function(name,sender,data,params) {
	}
	,getRequest: function(name,sender,data,params) {
		return null;
	}
	,set_skipButtonUpdate: function(b) {
		this.skipButtonUpdate = b;
		var _g = 0;
		var _g1 = this._tabs;
		while(_g < _g1.length) {
			var tab = _g1[_g];
			++_g;
			tab.set_skipButtonUpdate(b);
		}
		var _g2 = 0;
		var _g11 = this._tab_groups;
		while(_g2 < _g11.length) {
			var group = _g11[_g2];
			++_g2;
			var _g21 = 0;
			var _g3 = group.group.members;
			while(_g21 < _g3.length) {
				var sprite = _g3[_g21];
				++_g21;
				if(js_Boot.__instanceof(sprite,flixel_addons_ui_interfaces_IFlxUIClickable)) {
					sprite.set_skipButtonUpdate(b);
				}
			}
		}
		return b;
	}
	,get_width: function() {
		return this._back.get_width();
	}
	,get_height: function() {
		var fbt = this.getFirstTab();
		if(fbt != null) {
			return this._back.y + this._back.get_height() - fbt.y;
		}
		return this._back.get_height();
	}
	,resize: function(W,H) {
		var ir;
		if(js_Boot.__instanceof(this._back,flixel_addons_ui_interfaces_IResizable)) {
			this.distributeTabs(W);
			ir = this._back;
			var fbt = this.getFirstTab();
			if(fbt != null) {
				ir.resize(W,H - fbt.get_height());
			} else {
				ir.resize(W,H);
			}
		} else {
			this.distributeTabs();
		}
	}
	,get_selected_tab: function() {
		return this._selected_tab;
	}
	,set_selected_tab: function(i) {
		this.showTabInt(i);
		return this._selected_tab;
	}
	,get_selected_tab_id: function() {
		return this._selected_tab_id;
	}
	,set_selected_tab_id: function(str) {
		this.showTabId(str);
		return this._selected_tab_id;
	}
	,destroy: function() {
		flixel_addons_ui_FlxUIGroup.prototype.destroy.call(this);
		flixel_addons_ui_U.clearArray(this._tab_groups);
		flixel_addons_ui_U.clearArray(this._tabs);
		this._back = null;
		this._tabs = null;
		this._tab_groups = null;
	}
	,getTab: function(name,index) {
		if(name != null) {
			var _g = 0;
			var _g1 = this._tabs;
			while(_g < _g1.length) {
				var tab = _g1[_g];
				++_g;
				if(tab.name == name) {
					return tab;
				}
			}
		}
		if(index != null) {
			if(index < this._tabs.length) {
				return this._tabs[index];
			}
		}
		return null;
	}
	,getTabGroup: function(name,index) {
		if(name != null) {
			var _g = 0;
			var _g1 = this._tab_groups;
			while(_g < _g1.length) {
				var tabGroup = _g1[_g];
				++_g;
				if(tabGroup.name == name) {
					return tabGroup;
				}
			}
		}
		if(index != null) {
			if(index < this._tab_groups.length) {
				return this._tab_groups[index];
			}
		}
		return null;
	}
	,getBack: function() {
		return this._back;
	}
	,replaceBack: function(newBack) {
		var i = this.group.members.indexOf(this._back);
		if(i != -1) {
			var oldBack = this._back;
			if(js_Boot.__instanceof(newBack,flixel_addons_ui_interfaces_IResizable)) {
				newBack.resize(oldBack.get_width(),oldBack.get_height());
			}
			this.group.members[i] = newBack;
			newBack.set_x(oldBack.x);
			newBack.set_y(oldBack.y);
			oldBack.destroy();
		}
	}
	,addGroup: function(g) {
		if(g == this) {
			return;
		}
		if(!this.hasThis(g)) {
			g.set_y(this._back.y - this.y);
			this.add(g);
			this._tab_groups.push(g);
		}
		this._showOnlyGroup("");
		if(this._tab_groups.length == 1) {
			this.set_selected_tab(0);
		}
		if(this._selected_tab != -1) {
			this.set_selected_tab(this._selected_tab);
		}
	}
	,_onTabEvent: function(name) {
		this.showTabId(name);
		var tab = this.getTab(name);
		if(this.broadcastToFlxUI) {
			flixel_addons_ui_FlxUI.event("tab_menu_click",this,name,tab != null ? tab.params : null);
		}
	}
	,stackTabs: function() {
		var _backx = this._back.x;
		var _backy = this._back.y;
		this.group.remove(this._back,true);
		var tab = null;
		var _g = 0;
		var _g1 = this._tabs;
		while(_g < _g1.length) {
			var t = _g1[_g];
			++_g;
			tab = t;
			if(tab.toggled) {
				this.group.remove(tab,true);
			}
		}
		this.group.add(this._back);
		var _g2 = 0;
		var _g11 = this._tabs;
		while(_g2 < _g11.length) {
			var t1 = _g11[_g2];
			++_g2;
			tab = t1;
			if(tab.toggled) {
				this.group.add(tab);
			}
		}
		var _g3 = 0;
		var _g12 = this._tab_groups;
		while(_g3 < _g12.length) {
			var group = _g12[_g3];
			++_g3;
			var tempX = group.x;
			var tempY = group.y;
			this.remove(group,true);
			this.add(group);
			group.set_x(tempX);
			group.set_y(tempY);
		}
		this._back.set_x(_backx);
		this._back.set_y(_backy);
	}
	,showTabId: function(name) {
		this._selected_tab = -1;
		this._selected_tab_id = "";
		var i = 0;
		var _g = 0;
		var _g1 = this._tabs;
		while(_g < _g1.length) {
			var tab = _g1[_g];
			++_g;
			tab.set_toggled(false);
			tab.forceStateHandler("out_button");
			if(tab.name == name) {
				tab.set_toggled(true);
				this._selected_tab_id = name;
				this._selected_tab = i;
			}
			++i;
		}
		this._showOnlyGroup(name);
		this.stackTabs();
	}
	,sortTabs: function(a,b) {
		if(a.name < b.name) {
			return -1;
		} else if(a.name > b.name) {
			return 1;
		}
		return -1;
	}
	,showTabInt: function(i) {
		if(i >= 0 && this._tabs != null && this._tabs.length > i) {
			this.showTabId(this._tabs[i].name);
		} else {
			this.showTabId("");
		}
	}
	,_showOnlyGroup: function(name) {
		var _g = 0;
		var _g1 = this._tab_groups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.name == name) {
				group.set_visible(group.set_active(true));
			} else {
				group.set_visible(group.set_active(false));
			}
		}
	}
	,getFirstTab: function() {
		var _the_tab = null;
		if(this._tabs != null && this._tabs.length > 0) {
			_the_tab = this._tabs[0];
		}
		return _the_tab;
	}
	,distributeTabs: function(W) {
		if(W == null) {
			W = -1;
		}
		var xx = 0;
		var tab_width = 0;
		if(W == -1) {
			W = this._back.get_width();
		}
		var diff_size = 0;
		if(this._stretch_tabs) {
			tab_width = W / this._tabs.length;
			var tot_size = (tab_width | 0) * this._tabs.length;
			if(tot_size < W) {
				diff_size = W - tot_size;
			}
		}
		this._tabs.sort($bind(this,this.sortTabs));
		var i = 0;
		var firstHeight = 0;
		var tab;
		var _g = 0;
		var _g1 = this._tabs;
		while(_g < _g1.length) {
			var t = _g1[_g];
			++_g;
			tab = t;
			tab.set_x(this.x + xx);
			tab.set_y(this.y);
			if(this._tab_offset != null) {
				tab.set_x(tab.x + this._tab_offset.x);
				tab.set_y(tab.y + this._tab_offset.y);
			}
			if(this._stretch_tabs) {
				var theHeight = tab.get_height();
				if(i != 0) {
					theHeight = firstHeight;
					tab.resize_ratio = -1;
				}
				if(diff_size > 0) {
					tab.resize(tab_width + 1,theHeight);
					xx += (tab_width | 0) + 1;
					--diff_size;
				} else {
					tab.resize(tab_width,theHeight);
					xx += tab_width | 0;
				}
			} else if(this._tab_spacing != null) {
				xx += tab.get_width() + this._tab_spacing;
			} else {
				xx += tab.get_width();
			}
			if(i == 0) {
				firstHeight = tab.get_height();
			}
			++i;
		}
		if(this._tabs != null && this._tabs.length > 0 && this._tabs[0] != null) {
			this._back.set_y(this._tabs[0].y + this._tabs[0].get_height() - 2);
			if(this._tab_offset != null) {
				var _g2 = this._back;
				_g2.set_y(_g2.y - this._tab_offset.y);
			}
		}
		this.calcBounds();
	}
	,__class__: flixel_addons_ui_FlxUITabMenu
	,__properties__: $extend(flixel_addons_ui_FlxUIGroup.prototype.__properties__,{set_selected_tab_id:"set_selected_tab_id",get_selected_tab_id:"get_selected_tab_id",set_selected_tab:"set_selected_tab",get_selected_tab:"get_selected_tab",set_skipButtonUpdate:"set_skipButtonUpdate",get_numTabs:"get_numTabs"})
});
var flixel_addons_ui_FlxUIText = function(X,Y,FieldWidth,Text,Size,EmbeddedFont) {
	if(EmbeddedFont == null) {
		EmbeddedFont = true;
	}
	if(Size == null) {
		Size = 8;
	}
	if(FieldWidth == null) {
		FieldWidth = 0;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.minimumHeight = 1;
	this.broadcastToFlxUI = true;
	flixel_text_FlxText.call(this,X,Y,FieldWidth,Text,Size,EmbeddedFont);
};
$hxClasses["flixel.addons.ui.FlxUIText"] = flixel_addons_ui_FlxUIText;
flixel_addons_ui_FlxUIText.__name__ = ["flixel","addons","ui","FlxUIText"];
flixel_addons_ui_FlxUIText.__interfaces__ = [flixel_addons_ui_interfaces_IHasParams,flixel_addons_ui_interfaces_IFlxUIWidget,flixel_addons_ui_interfaces_IResizable];
flixel_addons_ui_FlxUIText.__super__ = flixel_text_FlxText;
flixel_addons_ui_FlxUIText.prototype = $extend(flixel_text_FlxText.prototype,{
	resize: function(w,h) {
		var sign = 1;
		if(h < this.minimumHeight) {
			h = this.minimumHeight;
		}
		if(h < this.get_height()) {
			sign = -1;
		}
		this.set_width(w);
		this.set_height(h);
		this.textField.set_width(this.get_width());
		var old_size = this._defaultFormat.size | 0;
		var diff = this.get_height() - this.graphic.bitmap.height;
		var failsafe = 0;
		var numLines = this.textField.get_numLines();
		while(diff * sign > 0 && failsafe < 999) {
			++failsafe;
			var _g = this;
			_g.set_size((_g._defaultFormat.size | 0) + sign);
			if(sign > 0 && this.textField.get_numLines() > numLines) {
				var _g1 = this;
				_g1.set_size((_g1._defaultFormat.size | 0) - sign);
				break;
			}
			this._regen = true;
			this.calcFrame(true);
			diff = h - this.graphic.bitmap.height;
			diff = h - this.graphic.bitmap.height;
		}
		if(failsafe >= 999) {
			this.set_size(old_size);
		}
		this.set_width(w);
		this.set_height(h);
		this._regen = true;
		this.calcFrame(true);
	}
	,set_minimumHeight: function(H) {
		if(H < 1) {
			H = 1;
		}
		this.minimumHeight = H;
		return this.minimumHeight;
	}
	,set_params: function(p) {
		this.params = p;
		return this.params;
	}
	,clone: function() {
		var newText = new flixel_addons_ui_FlxUIText();
		newText.set_width(this.get_width());
		newText.set_height(this.get_height());
		var theFont = this._font;
		theFont = flixel_addons_ui_FontFixer.fix(this._font);
		newText.setFormat(theFont,this._defaultFormat.size | 0,this.color);
		if(this._defaultFormat != null && this._defaultFormat.align != null) {
			newText.set_alignment(flixel_text__$FlxText_FlxTextAlign_$Impl_$.fromOpenFL(this._defaultFormat.align));
		}
		var Color = this.borderColor;
		var Size = this.borderSize;
		var Quality = this.borderQuality;
		newText.set_borderStyle(this.borderStyle);
		newText.set_borderColor(Color);
		newText.set_borderSize(Size);
		newText.set_borderQuality(Quality);
		newText.set_text(this.text);
		return newText;
	}
	,__class__: flixel_addons_ui_FlxUIText
	,__properties__: $extend(flixel_text_FlxText.prototype.__properties__,{set_minimumHeight:"set_minimumHeight",set_params:"set_params"})
});
var flixel_addons_ui_FlxUITileTest = function(X,Y,TileWidth,TileHeight,tilesWide,tilesTall,color1,color2,FloorToEven) {
	if(FloorToEven == null) {
		FloorToEven = false;
	}
	if(color2 == null) {
		color2 = 12895428;
	}
	if(color1 == null) {
		color1 = 8421504;
	}
	this.baseTileSize = -1;
	this.floorToEven = false;
	this._color2 = 0;
	this._color1 = 0;
	this._tilesTall = 2;
	this._tilesWide = 2;
	flixel_addons_ui_FlxUISprite.call(this,X,Y);
	this.tileWidth = TileWidth;
	this.tileHeight = TileHeight;
	this._tilesWide = tilesWide;
	this._tilesTall = tilesTall;
	this._color1 = color1;
	this._color2 = color2;
	this.floorToEven = FloorToEven;
	this.makeTiles(this.tileWidth,this.tileHeight,this._tilesWide,this._tilesTall,this._color1,this._color2);
};
$hxClasses["flixel.addons.ui.FlxUITileTest"] = flixel_addons_ui_FlxUITileTest;
flixel_addons_ui_FlxUITileTest.__name__ = ["flixel","addons","ui","FlxUITileTest"];
flixel_addons_ui_FlxUITileTest.__interfaces__ = [flixel_addons_ui_interfaces_IFlxUIWidget,flixel_addons_ui_interfaces_IResizable];
flixel_addons_ui_FlxUITileTest.__super__ = flixel_addons_ui_FlxUISprite;
flixel_addons_ui_FlxUITileTest.prototype = $extend(flixel_addons_ui_FlxUISprite.prototype,{
	get_widthInTiles: function() {
		return this._tilesWide;
	}
	,get_heightInTiles: function() {
		return this._tilesTall;
	}
	,makeTiles: function(tileWidth,tileHeight,tilesWide,tilesTall,color1,color2) {
		if(color2 == null) {
			color2 = -3881788;
		}
		if(color1 == null) {
			color1 = -8355712;
		}
		var size = this.constrain(tileWidth * this._tilesWide,tileHeight * this._tilesTall);
		tileWidth = size.x | 0;
		tileHeight = size.y | 0;
		this.makeGraphic(tilesWide,tilesTall,color1);
		var canvas = this.get_pixels();
		var j = 0;
		var _g1 = 0;
		while(_g1 < tilesWide) {
			var ix = _g1++;
			var _g3 = 0;
			while(_g3 < tilesTall) {
				var iy = _g3++;
				if(j % 2 == 0) {
					canvas.setPixel(ix,iy,color2);
				}
				++j;
			}
			if(tilesWide % 2 != 0) {
				++j;
			}
		}
		this.set_pixels(canvas);
		this.scale.set(tileWidth,tileHeight);
		this.updateHitbox();
	}
	,constrain: function(w,h) {
		var tileWidth = w / this._tilesWide | 0;
		var tileHeight = h / this._tilesTall | 0;
		if(tileWidth < tileHeight) {
			tileHeight = tileWidth;
		} else if(tileHeight < tileWidth) {
			tileWidth = tileHeight;
		}
		if(this.floorToEven) {
			if(tileWidth % 2 == 1) {
				tileHeight = --tileWidth;
			}
		}
		if(this.baseTileSize > 0) {
			tileWidth = (tileWidth / this.baseTileSize | 0) * this.baseTileSize;
			tileHeight = tileWidth;
		}
		return new flixel_math_FlxPoint(tileWidth,tileHeight);
	}
	,resize: function(w,h) {
		this.makeTiles(this.tileWidth,this.tileHeight,this._tilesWide,this._tilesTall,this._color1,this._color2);
	}
	,__class__: flixel_addons_ui_FlxUITileTest
	,__properties__: $extend(flixel_addons_ui_FlxUISprite.prototype.__properties__,{get_heightInTiles:"get_heightInTiles",get_widthInTiles:"get_widthInTiles"})
});
var flixel_addons_ui_FlxUITooltip = function(Width,Height,Anchor_,Style) {
	flixel_addons_ui_FlxUIGroup.call(this,0,0);
	if(Anchor_ == null) {
		Anchor_ = new flixel_addons_ui_Anchor(0,0,"left","top","right","top");
	}
	Style = flixel_addons_ui_FlxUITooltip.styleFix(Style);
	this.refresh(Width,Height,"","",Anchor_,Style);
	this.setScrollFactor(0,0);
};
$hxClasses["flixel.addons.ui.FlxUITooltip"] = flixel_addons_ui_FlxUITooltip;
flixel_addons_ui_FlxUITooltip.__name__ = ["flixel","addons","ui","FlxUITooltip"];
flixel_addons_ui_FlxUITooltip.styleFix = function(Style,DefaultStyle) {
	if(Style == null) {
		Style = { titleFormat : null, bodyFormat : null, titleBorder : null, bodyBorder : null, titleOffset : null, bodyOffset : null, background : null, borderSize : -1, borderColor : null, arrow : null, titleWidth : -1, bodyWidth : -1, autoSizeHorizontal : null, autoSizeVertical : null, leftPadding : -1, rightPadding : -1, topPadding : -1, bottomPadding : -1};
	}
	if(DefaultStyle != null) {
		if(Style.titleFormat == null) {
			Style.titleFormat = DefaultStyle.titleFormat;
		}
		if(Style.bodyFormat == null) {
			Style.bodyFormat = DefaultStyle.bodyFormat;
		}
		if(Style.titleBorder == null) {
			Style.titleBorder = DefaultStyle.titleBorder;
		}
		if(Style.bodyBorder == null) {
			Style.bodyBorder = DefaultStyle.bodyBorder;
		}
		if(Style.titleOffset == null) {
			Style.titleOffset = DefaultStyle.titleOffset;
		}
		if(Style.bodyOffset == null) {
			Style.bodyOffset = DefaultStyle.bodyOffset;
		}
		if(Style.background == null) {
			Style.background = DefaultStyle.background;
		}
		if(Style.borderColor == null) {
			Style.borderColor = DefaultStyle.borderColor;
		}
		if(Style.arrow == null) {
			Style.arrow = DefaultStyle.arrow;
		}
		if(Style.borderSize == null || Style.borderSize < 0) {
			Style.borderSize = DefaultStyle.borderSize;
		}
		if(Style.titleWidth == null || Style.titleWidth < 0) {
			Style.titleWidth = DefaultStyle.titleWidth;
		}
		if(Style.bodyWidth == null || Style.bodyWidth < 0) {
			Style.bodyWidth = DefaultStyle.bodyWidth;
		}
		if(Style.autoSizeHorizontal == null) {
			Style.autoSizeHorizontal = DefaultStyle.autoSizeHorizontal;
		}
		if(Style.autoSizeVertical == null) {
			Style.autoSizeVertical = DefaultStyle.autoSizeVertical;
		}
		if(Style.leftPadding == null || Style.leftPadding < 0) {
			Style.leftPadding = DefaultStyle.leftPadding;
		}
		if(Style.rightPadding == null || Style.rightPadding < 0) {
			Style.rightPadding = DefaultStyle.rightPadding;
		}
		if(Style.topPadding == null || Style.topPadding < 0) {
			Style.topPadding = DefaultStyle.topPadding;
		}
		if(Style.leftPadding == null || Style.bottomPadding < 0) {
			Style.bottomPadding = DefaultStyle.bottomPadding;
		}
	}
	if(DefaultStyle != null) {
		if(Style.titleFormat != null) {
			flixel_addons_ui_FlxUITooltip.fillFontDefNulls(Style.titleFormat,DefaultStyle.titleFormat);
			if(Style.titleFormat.format != null && DefaultStyle.titleFormat.format != null) {
				flixel_addons_ui_FlxUITooltip.fillFormatNulls(Style.titleFormat.format,DefaultStyle.titleFormat.format);
			}
		}
		if(Style.bodyFormat != null) {
			flixel_addons_ui_FlxUITooltip.fillFontDefNulls(Style.bodyFormat,DefaultStyle.bodyFormat);
			if(Style.bodyFormat.format != null && DefaultStyle.bodyFormat.format != null) {
				flixel_addons_ui_FlxUITooltip.fillFormatNulls(Style.bodyFormat.format,DefaultStyle.bodyFormat.format);
			}
		}
	}
	if(Style.titleFormat == null) {
		Style.titleFormat = new flixel_addons_ui_FontDef(null,null,null,new openfl_text_TextFormat(null,8,-16777216),null);
	}
	if(Style.bodyFormat == null) {
		Style.bodyFormat = new flixel_addons_ui_FontDef(null,null,null,new openfl_text_TextFormat(null,8,-16777216),null);
	}
	if(Style.titleBorder == null) {
		Style.titleBorder = new flixel_addons_ui_BorderDef(flixel_text_FlxTextBorderStyle.NONE,0,0,1);
	}
	if(Style.bodyBorder == null) {
		Style.bodyBorder = new flixel_addons_ui_BorderDef(flixel_text_FlxTextBorderStyle.NONE,0,0,1);
	}
	if(Style.titleOffset == null) {
		Style.titleOffset = new flixel_math_FlxPoint(0,0);
	}
	if(Style.bodyOffset == null) {
		Style.bodyOffset = new flixel_math_FlxPoint(0,0);
	}
	if(Style.background == null) {
		Style.background = 16777162;
	}
	if(Style.borderColor == null) {
		Style.borderColor = -16777216;
	}
	if(Style.arrow == null) {
		Style.arrow = "flixel/flixel-ui/img/tooltip_arrow.png";
	}
	if(Style.borderSize == null || Style.borderSize < 0) {
		Style.borderSize = 1;
	}
	if(Style.titleWidth == null || Style.titleWidth < 0) {
		Style.titleWidth = 100;
	}
	if(Style.bodyWidth == null || Style.bodyWidth < 0) {
		Style.bodyWidth = 100;
	}
	if(Style.autoSizeHorizontal == null) {
		Style.autoSizeHorizontal = true;
	}
	if(Style.autoSizeVertical == null) {
		Style.autoSizeVertical = true;
	}
	if(Style.leftPadding == null || Style.leftPadding < 0) {
		Style.leftPadding = 0;
	}
	if(Style.rightPadding == null || Style.rightPadding < 0) {
		Style.rightPadding = 0;
	}
	if(Style.topPadding == null || Style.topPadding < 0) {
		Style.topPadding = 0;
	}
	if(Style.leftPadding == null || Style.bottomPadding < 0) {
		Style.bottomPadding = 0;
	}
	return Style;
};
flixel_addons_ui_FlxUITooltip.cloneStyle = function(s) {
	return { titleFormat : s.titleFormat != null ? s.titleFormat.clone() : null, bodyFormat : s.bodyFormat != null ? s.bodyFormat.clone() : null, borderSize : s.borderSize, titleWidth : s.titleWidth, bodyWidth : s.bodyWidth, background : s.background, borderColor : s.borderColor, arrow : s.arrow, titleOffset : s.titleOffset.copyTo(), bodyOffset : s.bodyOffset.copyTo(), titleBorder : s.titleBorder.clone(), bodyBorder : s.bodyBorder.clone(), autoSizeVertical : s.autoSizeVertical, autoSizeHorizontal : s.autoSizeHorizontal, leftPadding : s.leftPadding, rightPadding : s.rightPadding, topPadding : s.topPadding, bottomPadding : s.bottomPadding};
};
flixel_addons_ui_FlxUITooltip.fillFontDefNulls = function(a,b) {
	if(a.get_size() == 0) {
		a.set_size(b.get_size());
	}
	if(a.name == null || a.name == "") {
		a.name = b.name;
	}
	if(a.file == null || a.file == "") {
		a.file = b.file;
	}
	if(a.extension == null || a.extension == "") {
		a.extension = b.extension;
	}
	if(a.border == null) {
		a.border = b.border != null ? b.border.clone() : null;
	}
};
flixel_addons_ui_FlxUITooltip.fillFormatNulls = function(a,b) {
	if(a.align == null) {
		a.align = b.align;
	}
	if(a.blockIndent == null) {
		a.blockIndent = b.blockIndent;
	}
	if(a.bold == null) {
		a.bold = b.bold;
	}
	if(a.bullet == null) {
		a.bullet = b.bullet;
	}
	if(a.color == null) {
		a.color = b.color;
	}
	if(a.font == null) {
		a.font = b.font;
	}
	if(a.indent == null) {
		a.indent = b.indent;
	}
	if(a.italic == null) {
		a.italic = b.italic;
	}
	if(a.kerning == null) {
		a.kerning = b.kerning;
	}
	if(a.leading == null) {
		a.leading = b.leading;
	}
	if(a.leftMargin == null) {
		a.leftMargin = b.leftMargin;
	}
	if(a.letterSpacing == null) {
		a.letterSpacing = b.letterSpacing;
	}
	if(a.rightMargin == null) {
		a.rightMargin = b.rightMargin;
	}
	if(a.size == null) {
		a.size = b.size;
	}
	if(a.tabStops == null) {
		a.tabStops = b.tabStops;
	}
	if(a.target == null) {
		a.target = b.target;
	}
	if(a.underline == null) {
		a.underline = b.underline;
	}
	if(a.url == null) {
		a.url = b.url;
	}
};
flixel_addons_ui_FlxUITooltip.__super__ = flixel_addons_ui_FlxUIGroup;
flixel_addons_ui_FlxUITooltip.prototype = $extend(flixel_addons_ui_FlxUIGroup.prototype,{
	show: function(obj,Title,Body,AutoSizeVertical,AutoSizeHorizontal,ShowArrow) {
		if(ShowArrow == null) {
			ShowArrow = true;
		}
		if(AutoSizeHorizontal == null) {
			AutoSizeHorizontal = true;
		}
		if(AutoSizeVertical == null) {
			AutoSizeVertical = true;
		}
		if(Body == null) {
			Body = "";
		}
		if(Title == null) {
			Title = "";
		}
		this.set_visible(true);
		this.set_active(true);
		this.set_x(0);
		this.set_y(0);
		this._bkg.set_x(0);
		this._bkg.set_y(0);
		this._arrow.set_x(0);
		this._arrow.set_y(0);
		this._arrowBkg.set_x(0);
		this._arrowBkg.set_y(0);
		this._arrowBkg = this.makeArrowBkg(this._arrowBkg);
		this._arrow.set_color(this.style.background);
		this._arrow.set_visible(this._arrowBkg.set_visible(ShowArrow));
		if(this.style.titleWidth > 0) {
			this._titleText.set_width(this._titleText.textField.set_width(this.style.titleWidth) | 0);
		}
		if(this.style.bodyWidth > 0) {
			this._bodyText.set_width(this._bodyText.textField.set_width(this.style.bodyWidth) | 0);
		}
		if(this.style.titleFormat != null) {
			this.style.titleFormat.apply(null,this._titleText);
		}
		if(this.style.bodyFormat != null) {
			this.style.bodyFormat.apply(null,this._bodyText);
		}
		if(this.style.titleBorder != null) {
			this.style.titleBorder.apply(this._titleText);
		}
		if(this.style.bodyBorder != null) {
			this.style.bodyBorder.apply(this._bodyText);
		}
		this._titleText.set_text(Title);
		this._bodyText.set_text(Body);
		this._titleText.update(0);
		this._bodyText.update(0);
		var titleHeight = this._titleText.textField.get_textHeight() + 4 | 0;
		if(this.style.titleOffset != null) {
			this._titleText.set_x(this.style.titleOffset.x | 0);
			this._titleText.set_y(this.style.titleOffset.y | 0);
		}
		if(this.style.bodyOffset != null) {
			this._bodyText.set_x(this.style.bodyOffset.x | 0);
			this._bodyText.set_y(this._titleText.y + titleHeight + this.style.bodyOffset.y | 0);
		}
		var W = this._bkg.get_width() | 0;
		var H = this._bkg.get_height() | 0;
		if(AutoSizeHorizontal) {
			W = Math.max(this._titleText.text != "" ? this._titleText.x + this._titleText.get_width() : 0,this._bodyText.text != "" ? this._bodyText.x + this._bodyText.get_width() : 0) | 0;
		}
		if(AutoSizeVertical) {
			H = Math.max(this._titleText.text != "" ? this._titleText.y + this._titleText.get_height() : 0,this._bodyText.text != "" ? this._bodyText.y + this._bodyText.get_height() : 0) | 0;
			H = Math.max(H,this._arrowBkg.get_height()) | 0;
		}
		if(this.style.leftPadding == null) {
			this.style.leftPadding = 0;
		}
		if(this.style.rightPadding == null) {
			this.style.rightPadding = 0;
		}
		if(this.style.topPadding == null) {
			this.style.topPadding = 0;
		}
		if(this.style.bottomPadding == null) {
			this.style.bottomPadding = 0;
		}
		W += this.style.leftPadding + this.style.rightPadding;
		H += this.style.topPadding + this.style.bottomPadding;
		W = W | 0;
		H = H | 0;
		this.refreshBkg(W,H,this.style);
		var oldOffX = this._anchorArrow.x.offset | 0;
		var oldOffY = this._anchorArrow.y.offset | 0;
		this._anchorArrow.x.offset -= this.anchor.x.offset;
		this._anchorArrow.y.offset += this.anchor.y.offset;
		this._anchorArrow.x.offset = this._anchorArrow.x.offset | 0;
		this._anchorArrow.y.offset = this._anchorArrow.y.offset | 0;
		this._anchorArrow.anchorThing(this._arrow,this._bkg);
		this._anchorArrow.x.offset = oldOffX;
		this._anchorArrow.y.offset = oldOffY;
		if(this._arrow.x < 0) {
			var xx = Math.abs(this._arrow.x) | 0;
			var _g = this._bkg;
			_g.set_x(_g.x + xx);
			var _g1 = this._titleText;
			_g1.set_x(_g1.x + xx);
			var _g2 = this._bodyText;
			_g2.set_x(_g2.x + xx);
			this._arrow.set_x(0);
		}
		if(this._arrow.y < 0) {
			var yy = Math.abs(this._arrow.y) | 0;
			var _g3 = this._bkg;
			_g3.set_y(_g3.y + yy);
			var _g4 = this._titleText;
			_g4.set_y(_g4.y + yy);
			var _g5 = this._bodyText;
			_g5.set_y(_g5.y + yy);
			this._arrow.set_y(0);
		}
		if(this._titleText.text != "" && this._bodyText.text == "") {
			var _g6 = this._titleText;
			_g6.set_y(_g6.y + ((H - (this.style.topPadding + this.style.bottomPadding) - titleHeight) / 2 | 0));
		}
		var _g7 = this._titleText;
		_g7.set_x(_g7.x + this.style.leftPadding);
		var _g8 = this._bodyText;
		_g8.set_x(_g8.x + this.style.leftPadding);
		var _g9 = this._titleText;
		_g9.set_y(_g9.y + this.style.topPadding);
		var _g10 = this._bodyText;
		_g10.set_y(_g10.y + this.style.topPadding);
		if(this._titleText.text == "") {
			this._titleText.set_x(this._bkg.x);
			this._titleText.set_y(this._bkg.y);
			this._titleText.set_width(this._bkg.get_width());
		}
		if(this._bodyText.text == "") {
			this._bodyText.set_x(this._bkg.x);
			this._bodyText.set_y(this._bkg.y);
			this._bodyText.set_width(this._bkg.get_width());
		}
		this.anchor.anchorThing(this,obj);
		this.set_x(this.x | 0);
		this.set_y(this.y | 0);
		this._arrowBkg.set_x(this._arrow.x - this.style.borderSize | 0);
		this._arrowBkg.set_y(this._arrow.y - this.style.borderSize | 0);
		this._titleText.set_x(this._titleText.x | 0);
		this._bodyText.set_x(this._bodyText.x | 0);
		this._bkg.set_x(this._bkg.x | 0);
		this._bkg.set_y(this._bkg.y | 0);
		this._arrowBkg.set_x(this._arrowBkg.x | 0);
		this._arrowBkg.set_y(this._arrowBkg.y | 0);
		this._arrow.set_x(this._arrow.x | 0);
		this._arrow.set_y(this._arrow.y | 0);
	}
	,get_height: function() {
		if(this.group.length == 0) {
			return 0;
		}
		var minY = Infinity;
		var maxY = -Infinity;
		var _g = 0;
		var _g1 = this._sprites;
		while(_g < _g1.length) {
			var member = _g1[_g];
			++_g;
			if(member == null) {
				continue;
			}
			if(js_Boot.__instanceof(member,flixel_text_FlxText)) {
				continue;
			}
			var minMemberY = member.y;
			var maxMemberY = minMemberY + member.get_height();
			if(maxMemberY > maxY) {
				maxY = maxMemberY;
			}
			if(minMemberY < minY) {
				minY = minMemberY;
			}
		}
		return maxY - minY;
	}
	,hide: function() {
		this.set_visible(false);
		this.set_active(false);
	}
	,set_anchor: function(a) {
		this.anchor = a;
		this._anchorArrow = this.getArrowAnchor(a,this._anchorArrow);
		if(this._arrowBkg != null) {
			this.makeArrowBkg(this._arrowBkg);
		}
		return a;
	}
	,set_style: function(s) {
		this.style = s;
		return s;
	}
	,set_title: function(t) {
		this.title = t;
		return t;
	}
	,set_body: function(b) {
		this.body = b;
		return b;
	}
	,refresh: function(Width,Height,Title,Body,Anchor_,Style) {
		var newBkg = this._bkg == null;
		var newArrow = this._arrow == null;
		var newTitle = this._titleText == null;
		var newBody = this._bodyText == null;
		if(newBkg) {
			this._bkg = new flixel_FlxSprite();
		}
		if(newArrow) {
			this._arrow = new flixel_FlxSprite();
		}
		if(newTitle) {
			this._titleText = new flixel_addons_ui_FlxUIText(0,0,Width);
			if(Style.titleFormat != null) {
				Style.titleFormat.apply(null,this._titleText);
			}
			if(Style.titleBorder != null) {
				Style.titleBorder.apply(this._titleText);
			}
		}
		if(newBody) {
			this._bodyText = new flixel_addons_ui_FlxUIText(0,0,Width);
			if(Style.bodyFormat != null) {
				Style.bodyFormat.apply(null,this._bodyText);
			}
			if(Style.bodyBorder != null) {
				Style.bodyBorder.apply(this._bodyText);
			}
		}
		this._titleText.set_text(Title);
		this._bodyText.set_text(Body);
		this._arrow.set_color(Style.background);
		var test = flixel_FlxG.bitmap.add(Style.arrow);
		if(Style.arrow == null) {
			Style.arrow = "flixel/flixel-ui/img/tooltip_arrow.png";
			flixel_FlxG.bitmap.add(Style.arrow);
		}
		this._arrow.loadGraphic(Style.arrow,true,test.height,test.height);
		if(newArrow) {
			this._arrow.animation.add("right",[0],0,false);
			this._arrow.animation.add("down",[1],0,false);
			this._arrow.animation.add("left",[2],0,false);
			this._arrow.animation.add("up",[3],0,false);
		}
		this.refreshBkg(Width,Height,Style);
		this.set_style(Style);
		if(newArrow && Style.borderSize > 0) {
			this._arrowBkg = new flixel_FlxSprite();
			this.add(this._arrowBkg);
		}
		this.set_anchor(Anchor_);
		if(newBkg) {
			this.add(this._bkg);
		}
		if(newArrow) {
			this.add(this._arrow);
		}
		if(newTitle) {
			this.add(this._titleText);
		}
		if(newBody) {
			this.add(this._bodyText);
		}
	}
	,refreshBkg: function(Width,Height,Style) {
		var key = this.getStyleKey(Width,Height,Style);
		if(flixel_FlxG.bitmap._cache.get(key) == null) {
			var pix = null;
			if(Style.borderSize > 0) {
				pix = new openfl_display_BitmapData(Width,Height,false,Style.borderColor);
				pix.fillRect(new openfl_geom_Rectangle(Style.borderSize,Style.borderSize,Width - Style.borderSize * 2,Height - Style.borderSize * 2),Style.background);
			} else {
				pix = new openfl_display_BitmapData(Width,Height,false,Style.background);
			}
			flixel_FlxG.bitmap.add(pix,true,key);
		}
		this._bkg.loadGraphic(key);
	}
	,getStyleKey: function(W,H,Style) {
		var this1 = Style.background;
		var tmp = W + "," + H + "," + ("0x" + StringTools.hex(this1 >> 24 & 255,2) + StringTools.hex(this1 >> 16 & 255,2) + StringTools.hex(this1 >> 8 & 255,2) + StringTools.hex(this1 & 255,2)) + "," + Style.borderSize + ",";
		var this2 = Style.borderColor;
		return tmp + ("0x" + StringTools.hex(this2 >> 24 & 255,2) + StringTools.hex(this2 >> 16 & 255,2) + StringTools.hex(this2 >> 8 & 255,2) + StringTools.hex(this2 & 255,2));
	}
	,makeArrowBkg: function(b) {
		if(b == null) {
			b = new flixel_FlxSprite();
		}
		var key = "arrowBkg:" + this.style.background + "," + this.style.borderSize + "," + this.style.borderColor + "," + (this._arrow == null ? "null" : this._arrow.animation._curAnim == null ? "null" : this._arrow.animation._curAnim.name);
		if(flixel_FlxG.bitmap._cache.get(key) == null) {
			var bs = this.style.borderSize;
			if(bs < 0 || bs == null) {
				bs = 0;
			}
			var bd = new openfl_display_BitmapData(this._arrow.get_width() + bs | 0,this._arrow.get_height() + bs | 0,true,0);
			flixel_FlxG.bitmap.add(bd,false,key);
			b.loadGraphic(key);
			var oldColor = this._arrow.color;
			this._arrow.set_color(this.style.borderColor);
			new openfl_geom_Matrix().identity();
			var _g = 0;
			while(_g < 3) {
				var yy = _g++;
				var _g1 = 0;
				while(_g1 < 3) {
					var xx = _g1++;
					if(yy != 1 || xx != 1) {
						b.stamp(this._arrow,xx * this.style.borderSize,yy * this.style.borderSize);
					}
				}
			}
			this._arrow.set_color(oldColor);
		}
		b.loadGraphic(key);
		return b;
	}
	,getArrowAnchor: function(a,result) {
		var touchHorz = a.x.side == "left" && a.x.flush == "right" || a.x.side == "right" && a.x.flush == "left";
		var touchVert = a.y.side == "top" && a.y.flush == "bottom" || a.y.side == "bottom" && a.y.flush == "top";
		var matchHorz = a.x.side == "left" && a.x.flush == "left" || a.x.side == "right" && a.x.flush == "right";
		var matchVert = a.y.side == "top" && a.y.flush == "top" || a.y.side == "bottom" && a.y.flush == "bottom";
		var off = this.style.borderSize;
		if(!(touchHorz && touchVert)) {
			if(touchHorz) {
				result = a.getFlipped(true,false,result);
				if(result.x.flush == "left") {
					result.x.offset -= off;
					this._arrow.animation.play("right");
				}
				if(result.x.flush == "right") {
					result.x.offset += off;
					this._arrow.animation.play("left");
				}
			}
			if(touchVert) {
				result = a.getFlipped(false,true,result);
				if(result.y.flush == "top") {
					result.y.offset -= off;
					this._arrow.animation.play("down");
				}
				if(result.y.flush == "bottom") {
					result.y.offset += off;
					this._arrow.animation.play("up");
				}
			}
		}
		if(!(matchHorz && matchVert)) {
			if(matchHorz) {
				if(result.x.flush == "left") {
					result.x.offset += off;
				}
				if(result.x.flush == "right") {
					result.x.offset -= off;
				}
			}
			if(matchVert) {
				if(result.y.flush == "top") {
					result.y.offset += off;
				}
				if(result.y.flush == "bottom") {
					result.y.offset -= off;
				}
			}
		}
		if(result != null) {
			return result;
		}
		return a;
	}
	,__class__: flixel_addons_ui_FlxUITooltip
	,__properties__: $extend(flixel_addons_ui_FlxUIGroup.prototype.__properties__,{set_body:"set_body",set_title:"set_title",set_anchor:"set_anchor",set_style:"set_style"})
});
var flixel_addons_ui_FlxUITooltipManager = function(State,SubState) {
	this.current = -1;
	this._init = false;
	this.delay = 0.1;
	this.showOnClick = false;
	this.defaultStyle = null;
	this.fixedPosition = null;
	this.defaultAnchor = null;
	this.autoFlipAnchor = true;
	if(State != null) {
		this.state = State;
	} else if(SubState != null) {
		this.subState = SubState;
	}
	this.list = [];
	this.tooltip = new flixel_addons_ui_FlxUITooltip(100,50);
	this.lastPosition = new flixel_math_FlxPoint(0,0);
	this.defaultAnchor = this.tooltip.anchor.clone();
	this.defaultStyle = flixel_addons_ui_FlxUITooltip.cloneStyle(this.tooltip.style);
};
$hxClasses["flixel.addons.ui.FlxUITooltipManager"] = flixel_addons_ui_FlxUITooltipManager;
flixel_addons_ui_FlxUITooltipManager.__name__ = ["flixel","addons","ui","FlxUITooltipManager"];
flixel_addons_ui_FlxUITooltipManager.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_addons_ui_FlxUITooltipManager.prototype = {
	init: function() {
		var ui = this.state != null ? this.state._ui : this.subState != null ? this.subState._ui : null;
		if(ui == null) {
			return;
		}
		if(ui != null && ui.getDefinition("default:tooltip") != null) {
			this.defaultStyle = flixel_addons_ui_FlxUITooltip.cloneStyle(ui._loadTooltipData(null).style);
			this.tooltip.set_style(this.defaultStyle);
		}
	}
	,destroy: function() {
		flixel_util_FlxDestroyUtil.destroyArray(this.list);
		this.list = null;
		this.tooltip = null;
		this.lastPosition = null;
		this.state = null;
		this.subState = null;
		this.defaultAnchor = null;
		this.defaultStyle = null;
	}
	,clear: function() {
		while(this.list.length > 0) {
			var entry = this.list.pop();
			if(entry != null) {
				entry.destroy();
			}
		}
	}
	,hideCurrent: function() {
		if(this.current > 0) {
			this.hide(this.current);
		}
	}
	,isVisible: function() {
		return this.current > 0;
	}
	,doesCurrentTooltipBelongTo: function(thing,checkChildren) {
		if(checkChildren == null) {
			checkChildren = true;
		}
		if(js_Boot.__instanceof(thing,flixel_addons_ui_FlxUIGroup)) {
			var i = this.findObj(thing);
			if(i != -1) {
				return i == this.current;
			}
			if(checkChildren) {
				var _g = 0;
				var _g1 = thing.group.members;
				while(_g < _g1.length) {
					var member = _g1[_g];
					++_g;
					if(this.doesCurrentTooltipBelongTo(member)) {
						return true;
					}
				}
			}
		} else if(js_Boot.__instanceof(thing,flixel_addons_ui_FlxUIButton)) {
			var i1 = this.findBtn(thing);
			if(i1 == -1) {
				return false;
			}
			return i1 == this.current;
		} else if(js_Boot.__instanceof(thing,flixel_FlxObject)) {
			var i2 = this.findObj(thing);
			if(i2 == -1) {
				return false;
			}
			return i2 == this.current;
		}
		return false;
	}
	,stickyTooltipFor: function(thing,sticky) {
		if(sticky == null) {
			sticky = true;
		}
		var i = this.findThing(thing);
		if(i != -1) {
			this.list[i].sticky = sticky;
		}
	}
	,showTooltipFor: function(thing,value) {
		if(value == null) {
			value = true;
		}
		var i = this.findThing(thing);
		if(i != -1) {
			this.current = -1;
			if(value) {
				this.show(i);
			} else {
				this.hide(i);
			}
		}
	}
	,enableTooltipFor: function(thing,enabled) {
		var i = this.findThing(thing);
		if(i >= 0 && i < this.list.length) {
			this.list[i].enabled = enabled;
			return true;
		}
		return false;
	}
	,add: function(thing,data) {
		if(this._init) {
			data.style = flixel_addons_ui_FlxUITooltip.styleFix(data.style,this.defaultStyle);
		}
		var btn = null;
		var i = -1;
		if(js_Boot.__instanceof(thing,flixel_addons_ui_interfaces_IFlxUIButton)) {
			btn = thing;
			i = this.findBtn(btn);
			if(i == -1) {
				this.list.push(new flixel_addons_ui__$FlxUITooltipManager_FlxUITooltipEntry(btn,data));
			} else {
				this.list[i].data = data;
				this.list[i].count = 0;
			}
		} else {
			i = this.findObj(thing);
			if(i == -1) {
				var b = new flixel_addons_ui_FlxUIButton(0,0,"",null,false,true);
				b.resize(thing.get_width(),thing.get_height());
				btn = b;
				btn.set_x(thing.x);
				btn.set_y(thing.y);
				btn.set_width(thing.get_width());
				btn.set_height(thing.get_height());
				btn.scrollFactor.set(thing.scrollFactor.x,thing.scrollFactor.y);
				if(this.state != null) {
					this.state.add(btn);
				} else if(this.subState != null) {
					this.subState.add(btn);
				}
				this.list.push(new flixel_addons_ui__$FlxUITooltipManager_FlxUITooltipEntry(btn,data,thing));
			} else {
				this.list[i].data = data;
				this.list[i].count = 0;
				this.list[i].btn.set_x(thing.x);
				this.list[i].btn.set_y(thing.y);
				this.list[i].btn.set_width(thing.get_width());
				this.list[i].btn.set_height(thing.get_height());
				this.list[i].btn.scrollFactor.set(thing.scrollFactor.x,thing.scrollFactor.y);
			}
		}
	}
	,remove: function(thing) {
		var btn = null;
		var i = -1;
		if(js_Boot.__instanceof(thing,flixel_addons_ui_interfaces_IFlxUIButton)) {
			btn = thing;
			i = this.findBtn(btn);
		} else {
			i = this.findObj(thing);
		}
		if(i != -1) {
			if(this.current == i) {
				this.hide(this.current);
			}
			var entry = this.list[i];
			this.list.splice(i,1);
			entry.destroy();
		}
	}
	,update: function(elapsed) {
		var _g1 = 0;
		var _g = this.list.length;
		while(_g1 < _g) {
			var i = _g1++;
			var btn = this.list[i].btn;
			var obj = this.list[i].obj;
			if(this.list[i].enabled == false) {
				if(this.current == i) {
					this.hide(i);
				}
				this.list[i].count = 0;
				continue;
			}
			if(obj != null) {
				btn.set_x(obj.x);
				btn.set_y(obj.y);
				btn.set_width(obj.get_width());
				btn.set_height(obj.get_height());
				btn.set_visible(obj.visible);
			}
			if(this.list[i].sticky == false && (false == btn.visible || btn.get_justMousedOut() || btn.get_mouseIsOut())) {
				this.list[i].count = 0;
				this.hide(i);
			} else if(btn.get_justMousedOver() || btn.get_mouseIsOver()) {
				if(btn.get_mouseIsOver()) {
					this.list[i].count += elapsed;
				}
			}
			if(this.list[i].count > this.delay || this.list[i].data.delay >= 0 && this.list[i].count > this.list[i].data.delay) {
				if(this.current != i) {
					this.show(i);
				} else if(this.list[i].data.moving) {
					this.show(i);
				}
			}
		}
	}
	,hide: function(i) {
		if(this.current == i) {
			this.tooltip.hide();
			if(this.state != null) {
				this.state.remove(this.tooltip,true);
			}
			if(this.subState != null) {
				this.subState.remove(this.tooltip,true);
			}
			this.current = -1;
		}
	}
	,findThing: function(thing) {
		if(thing == null) {
			return -1;
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var entry = _g1[_g];
			++_g;
			if(entry.obj == thing || js_Boot.__instanceof(thing,flixel_addons_ui_interfaces_IFlxUIButton) && js_Boot.__cast(thing , flixel_addons_ui_interfaces_IFlxUIButton) == entry.btn) {
				return this.list.indexOf(entry);
			}
		}
		return -1;
	}
	,findBtn: function(btn) {
		if(btn == null) {
			return -1;
		}
		var _g1 = 0;
		var _g = this.list.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(this.list[i] != null && this.list[i].btn == btn) {
				return i;
			}
		}
		return -1;
	}
	,findObj: function(obj) {
		if(obj == null) {
			return -1;
		}
		var _g1 = 0;
		var _g = this.list.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(this.list[i] != null && this.list[i].obj == obj) {
				return i;
			}
		}
		return -1;
	}
	,set_fixedPosition: function(value) {
		this.fixedPosition = value;
		if(this.tooltip != null && this.tooltip.visible) {
			this.show(this.current);
		}
		return this.fixedPosition;
	}
	,set_showTooltipArrow: function(b) {
		this.showTooltipArrow = b;
		if(this.tooltip != null && this.tooltip.visible) {
			this.tooltip._arrow.set_visible(this.tooltip._arrowBkg.set_visible(b));
		}
		return this.showTooltipArrow;
	}
	,show: function(i) {
		if(i < 0 || i >= this.list.length) {
			return;
		}
		var btn = this.list[i].btn;
		if(btn.visible == false || this.list[i].obj != null && this.list[i].obj.visible == false) {
			return;
		}
		if(this.current == i) {
			var deltaX = btn.x - this.lastPosition.x;
			var deltaY = btn.y - this.lastPosition.y;
			this.lastPosition.set_x(btn.x);
			this.lastPosition.set_y(btn.y);
			var _g = this.tooltip;
			_g.set_x(_g.x + deltaX);
			var _g1 = this.tooltip;
			_g1.set_y(_g1.y + deltaY);
			return;
		}
		this.current = i;
		var data = this.list[i].data;
		if(data.init != true) {
			data.style = flixel_addons_ui_FlxUITooltip.styleFix(data.style,this.defaultStyle);
			data.init = true;
		}
		var autoSizeVertical = true;
		var autoSizeHorizontal = true;
		if(data.style != null) {
			this.tooltip.set_style(data.style);
			autoSizeVertical = data.style.autoSizeVertical;
			autoSizeHorizontal = data.style.autoSizeHorizontal;
		}
		if(data.anchor != null) {
			this.tooltip.set_anchor(data.anchor);
		} else if(this.defaultAnchor != null) {
			this.tooltip.set_anchor(this.defaultAnchor);
		}
		if(this.state != null) {
			this.state.add(this.tooltip);
		}
		if(this.subState != null) {
			this.subState.add(this.tooltip);
		}
		this.tooltip.show(btn,data.title,data.body,autoSizeVertical,autoSizeHorizontal);
		if(this.fixedPosition != null) {
			this.fixedPosition.anchor.anchorThing(this.tooltip,this.fixedPosition.object);
		}
		if(this.autoFlipAnchor) {
			if(this.checkAutoFlip(this.tooltip,this.fixedPosition != null ? this.fixedPosition.anchor : null)) {
				if(this.fixedPosition != null) {
					this.fixedPosition.anchor.anchorThing(this.tooltip,this.fixedPosition.object);
				} else {
					this.tooltip.show(btn,data.title,data.body,autoSizeVertical,autoSizeHorizontal,this.showTooltipArrow);
				}
			}
		}
		this.lastPosition.set(btn.x,btn.y);
	}
	,checkAutoFlip: function(tooltip,anchor) {
		var flipX = tooltip.x < 0 || tooltip.x + tooltip.get_width() > flixel_FlxG.width;
		var flipY = tooltip.y < 0 || tooltip.y + tooltip.get_height() > flixel_FlxG.height;
		if(flipX || flipY) {
			if(anchor == null) {
				anchor = tooltip.anchor;
			}
			anchor.getFlipped(flipX,flipY,anchor);
			return true;
		}
		return false;
	}
	,set_cameras: function(value) {
		this.tooltip.set_cameras(value);
		return this.cameras = value;
	}
	,__class__: flixel_addons_ui_FlxUITooltipManager
	,__properties__: {set_cameras:"set_cameras",set_showTooltipArrow:"set_showTooltipArrow",set_fixedPosition:"set_fixedPosition"}
};
var flixel_addons_ui__$FlxUITooltipManager_FlxUITooltipEntry = function(Btn,Data,Obj) {
	this.sticky = false;
	this.btn = Btn;
	this.data = Data;
	this.obj = Obj;
	this.count = 0;
	this.enabled = true;
	if(this.data != null) {
		if(this.data.delay == null) {
			this.data.delay = -1;
		}
		if(this.data.moving == null) {
			this.data.moving = false;
		}
	}
};
$hxClasses["flixel.addons.ui._FlxUITooltipManager.FlxUITooltipEntry"] = flixel_addons_ui__$FlxUITooltipManager_FlxUITooltipEntry;
flixel_addons_ui__$FlxUITooltipManager_FlxUITooltipEntry.__name__ = ["flixel","addons","ui","_FlxUITooltipManager","FlxUITooltipEntry"];
flixel_addons_ui__$FlxUITooltipManager_FlxUITooltipEntry.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_addons_ui__$FlxUITooltipManager_FlxUITooltipEntry.prototype = {
	destroy: function() {
		this.count = 0;
		this.obj = null;
		this.btn = null;
		this.data.anchor = null;
		this.data.style = null;
		this.data = null;
	}
	,__class__: flixel_addons_ui__$FlxUITooltipManager_FlxUITooltipEntry
};
var flixel_addons_ui_FontDef = function(Name,Extension,File,Format,Border) {
	if(File == null) {
		File = "";
	}
	if(Extension == null) {
		Extension = ".ttf";
	}
	this._size = 0;
	this.name = Name;
	this.extension = Extension;
	this.file = File;
	this.format = Format;
	if(this.format == null) {
		this.format = new openfl_text_TextFormat();
	}
	this.border = Border;
	if(this.border == null) {
		this.border = new flixel_addons_ui_BorderDef(flixel_text_FlxTextBorderStyle.NONE,0);
	}
};
$hxClasses["flixel.addons.ui.FontDef"] = flixel_addons_ui_FontDef;
flixel_addons_ui_FontDef.__name__ = ["flixel","addons","ui","FontDef"];
flixel_addons_ui_FontDef.copyFromTextField = function(t) {
	var dtf = t.get_defaultTextFormat();
	var fd = new flixel_addons_ui_FontDef("");
	fd.fromStr(dtf.font);
	fd.format.font = dtf.font;
	fd.format.size = dtf.size;
	fd.format.color = dtf.color;
	fd.format.bold = dtf.bold;
	fd.format.italic = dtf.italic;
	fd.format.underline = dtf.underline;
	fd.format.url = dtf.url;
	fd.format.letterSpacing = dtf.letterSpacing;
	fd.format.leading = dtf.leading;
	fd.format.target = dtf.target;
	fd.format.align = dtf.align;
	return fd;
};
flixel_addons_ui_FontDef.copyFromFlxText = function(t) {
	var fd = flixel_addons_ui_FontDef.copyFromTextField(t.textField);
	fd.fromStr(t._font);
	fd.border.style = t.borderStyle;
	fd.border.color = t.borderColor;
	fd.border.quality = t.borderQuality;
	fd.border.size = t.borderSize;
	return fd;
};
flixel_addons_ui_FontDef.fromXML = function(data) {
	var fontFace = flixel_addons_ui_U.xml_str(data,"font");
	var fontStyle = flixel_addons_ui_U.xml_str(data,"style");
	var fontFile = null;
	if(fontFace != "") {
		fontFile = flixel_addons_ui_FlxUI.font(fontFace,fontStyle);
	}
	var fontStyle1 = flixel_addons_ui_U.xml_str(data,"style");
	var fontSize = flixel_addons_ui_FlxUI.fontSize(fontFile,flixel_addons_ui_U.xml_i(data,"size",8));
	var fontColor = flixel_addons_ui_U.xml_color(data,"color",true,-1);
	var align;
	switch(flixel_addons_ui_U.xml_str(data,"align").toLowerCase()) {
	case "center":
		align = 0;
		break;
	case "justify":
		align = 2;
		break;
	case "left":
		align = 3;
		break;
	case "right":
		align = 4;
		break;
	default:
		align = 3;
	}
	var fd = new flixel_addons_ui_FontDef(flixel_addons_ui_U.xml_str(data,"font"),".ttf",fontFile);
	fd.format.color = fontColor;
	fd.format.size = fontSize;
	fd.format.align = align;
	fd.set_size(fontSize);
	fd.setFontStyle(fontStyle1);
	fd.border = flixel_addons_ui_BorderDef.fromXML(data);
	return fd;
};
flixel_addons_ui_FontDef.prototype = {
	get_size: function() {
		if(this.format != null) {
			this._size = this.format.size | 0;
		}
		return this._size;
	}
	,set_size: function(i) {
		if(this.format != null) {
			this.format.size = i;
		}
		this._size = i;
		return this._size;
	}
	,clone: function() {
		var newBorder = this.border == null ? null : this.border.clone();
		var newFormat = this.format == null ? null : new openfl_text_TextFormat(this.format.font,this.format.size,this.format.color,this.format.bold,this.format.italic,this.format.underline,this.format.url,this.format.target,this.format.align,this.format.leftMargin,this.format.rightMargin,this.format.indent,this.format.leading);
		if(this.format != null) {
			newFormat.letterSpacing = this.format.letterSpacing;
		}
		var newThis = new flixel_addons_ui_FontDef(this.name,this.extension,this.file,newFormat,newBorder);
		newThis.set_size(this.get_size());
		return newThis;
	}
	,applyTxt: function(textField) {
		textField.setTextFormat(this.format);
		return textField;
	}
	,applyFlx: function(flxText) {
		var flxTxtAlign = null;
		if(this.format.align != null) {
			switch(this.format.align) {
			case 0:
				flxTxtAlign = "center";
				break;
			case 2:
				flxTxtAlign = "justify";
				break;
			case 3:
				flxTxtAlign = "left";
				break;
			case 4:
				flxTxtAlign = "right";
				break;
			default:
				flxTxtAlign = "left";
			}
		}
		flxText.setFormat(this.file == "" || this.file == null ? null : this.file,this.format.size | 0,this.format.color,flxTxtAlign,this.border.style,this.border.color);
		flxText.textField.get_defaultTextFormat().leading = this.format.leading;
		flxText.textField.get_defaultTextFormat().letterSpacing = this.format.letterSpacing;
		return flxText;
	}
	,apply: function(textField,flxText) {
		if(textField != null) {
			textField.setTextFormat(this.format);
		}
		if(flxText != null) {
			this.applyFlx(flxText);
		}
	}
	,fromStr: function(str,recursion) {
		if(recursion == null) {
			recursion = 0;
		}
		if(recursion > 3) {
			return;
		}
		str = flixel_addons_ui_FontFixer.fix(str);
		var style = this.getFontStyle(str);
		this.setFontStyle(style);
		var extension = "";
		var _g = 0;
		var _g1 = flixel_addons_ui_FontDef.EXTENSIONS;
		while(_g < _g1.length) {
			var ext = _g1[_g];
			++_g;
			if(str.indexOf(ext) != -1) {
				if(openfl_Assets.exists(str + "","FONT")) {
					this.name = StringTools.replace(str,"","");
					this.file = str;
					extension = ext;
					break;
				}
			}
		}
		if(extension == "") {
			var _g2 = 0;
			var _g11 = flixel_addons_ui_FontDef.EXTENSIONS;
			while(_g2 < _g11.length) {
				var ext1 = _g11[_g2];
				++_g2;
				if(openfl_Assets.exists(str + ext1,"FONT")) {
					extension = ext1;
					this.name = str;
					this.file = str + ext1;
					extension = ext1;
					break;
				}
			}
		} else {
			str = this.stripFontExtensions(str);
			if(this.getFontStyle(str) != "") {
				str = HxOverrides.substr(str,str.length - 1,1);
				this.fromStr(str,recursion + 1);
				return;
			} else {
				this.fromStr(str,recursion + 1);
				return;
			}
		}
		this.setFontStyle(style);
	}
	,stripFontExtensions: function(str) {
		if(str == null) {
			return str;
		}
		var _g = 0;
		var _g1 = flixel_addons_ui_FontDef.EXTENSIONS;
		while(_g < _g1.length) {
			var ext = _g1[_g];
			++_g;
			if(str != null && str.indexOf(ext) != -1) {
				str = StringTools.replace(str,ext,"");
			}
		}
		return str;
	}
	,getFontExtension: function(str) {
		if(str == null) {
			return "";
		}
		var _g = 0;
		var _g1 = flixel_addons_ui_FontDef.EXTENSIONS;
		while(_g < _g1.length) {
			var ext = _g1[_g];
			++_g;
			if(str.indexOf(ext) != -1) {
				return ext;
			}
		}
		return str;
	}
	,fixFontName: function() {
		var fontStyle = this.getFontStyle(this.file);
		var extension = this.getFontExtension(this.file);
		var fontbase = this.stripFontExtensions(this.file);
		if(fontStyle != "") {
			fontbase = HxOverrides.substr(fontbase,0,fontbase.length - 1);
		}
		var styleStr = "";
		if(this.format.bold && this.format.italic) {
			styleStr = "z";
		} else if(this.format.bold) {
			styleStr = "b";
		} else if(this.format.italic) {
			styleStr = "i";
		}
		this.file = fontbase + styleStr + extension;
	}
	,getFontStyle: function(str) {
		if(str == null) {
			return "";
		}
		str = this.stripFontExtensions(str);
		var lastChar = HxOverrides.substr(str,str.length - 1,1);
		if(lastChar != "" && lastChar != null) {
			lastChar = lastChar.toLowerCase();
			switch(lastChar) {
			case "b":
				return "b";
			case "i":
				return "i";
			case "z":
				return "z";
			default:
				return "";
			}
		}
		return "";
	}
	,setFontStyle: function(str) {
		str = str.toLowerCase();
		switch(str) {
		case "b":case "bold":
			this.format.bold = true;
			this.format.italic = false;
			break;
		case "all":case "bi":case "bold-italic":case "bolditalic":case "both":case "ib":case "italicbold":case "z":
			this.format.bold = true;
			this.format.italic = true;
			break;
		case "i":case "italic":
			this.format.bold = false;
			this.format.italic = true;
			break;
		default:
			this.format.bold = false;
			this.format.italic = false;
		}
		this.fixFontName();
	}
	,toString: function() {
		return "{name:" + this.name + ",size:" + this.get_size() + ",file:" + this.file + ",extension:" + this.extension + ",format:" + Std.string(this.format) + ",border:" + Std.string(this.border) + "}";
	}
	,__class__: flixel_addons_ui_FontDef
	,__properties__: {set_size:"set_size",get_size:"get_size"}
};
var flixel_addons_ui_FontFixer = function() { };
$hxClasses["flixel.addons.ui.FontFixer"] = flixel_addons_ui_FontFixer;
flixel_addons_ui_FontFixer.__name__ = ["flixel","addons","ui","FontFixer"];
flixel_addons_ui_FontFixer.name2File = null;
flixel_addons_ui_FontFixer.init = function() {
	if(flixel_addons_ui_FontFixer.name2File == null) {
		flixel_addons_ui_FontFixer.name2File = new haxe_ds_StringMap();
	}
};
flixel_addons_ui_FontFixer.fix = function(font) {
	flixel_addons_ui_FontFixer.init();
	if(font.indexOf(".ttf") == -1) {
		var _this = flixel_addons_ui_FontFixer.name2File;
		if(__map_reserved[font] != null ? _this.existsReserved(font) : _this.h.hasOwnProperty(font)) {
			var _this1 = flixel_addons_ui_FontFixer.name2File;
			if(__map_reserved[font] != null) {
				font = _this1.getReserved(font);
			} else {
				font = _this1.h[font];
			}
		}
	}
	return font;
};
flixel_addons_ui_FontFixer.add = function(file,name) {
	if(name == null) {
		name = "";
	}
	flixel_addons_ui_FontFixer.init();
	var tmp;
	if(name != "") {
		var _this = flixel_addons_ui_FontFixer.name2File;
		if(__map_reserved[name] != null) {
			tmp = _this.existsReserved(name);
		} else {
			tmp = _this.h.hasOwnProperty(name);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = flixel_addons_ui_FontFixer.name2File;
		if(__map_reserved[name] != null) {
			return _this1.getReserved(name);
		} else {
			return _this1.h[name];
		}
	}
	if(!openfl_Assets.exists(file,"FONT")) {
		return file;
	}
	var font = openfl_Assets.getFont(file);
	if(font == null) {
		return file;
	}
	if(name == "") {
		name = font.name;
	}
	var _this2 = flixel_addons_ui_FontFixer.name2File;
	if(__map_reserved[name] != null) {
		_this2.setReserved(name,file);
	} else {
		_this2.h[name] = file;
	}
	return flixel_addons_ui_FontFixer.fix(file);
};
var flixel_addons_ui_StrNameLabel = function(Name,Label) {
	if(Label == null) {
		Label = "";
	}
	if(Name == null) {
		Name = "";
	}
	this.name = Name;
	this.label = Label;
};
$hxClasses["flixel.addons.ui.StrNameLabel"] = flixel_addons_ui_StrNameLabel;
flixel_addons_ui_StrNameLabel.__name__ = ["flixel","addons","ui","StrNameLabel"];
flixel_addons_ui_StrNameLabel.sortByLabel = function(a,b) {
	if(a.label < b.label) {
		return -1;
	}
	if(a.label > b.label) {
		return 1;
	}
	return 0;
};
flixel_addons_ui_StrNameLabel.sortByName = function(a,b) {
	if(a.name < b.name) {
		return -1;
	}
	if(a.name > b.name) {
		return 1;
	}
	return 0;
};
flixel_addons_ui_StrNameLabel.prototype = {
	copy: function() {
		return new flixel_addons_ui_StrNameLabel(this.name,this.label);
	}
	,toString: function() {
		var value = this.name;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "name";
		_this.value = value;
		var value1 = this.label;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "label";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,__class__: flixel_addons_ui_StrNameLabel
};
var flixel_addons_ui_U = function() { };
$hxClasses["flixel.addons.ui.U"] = flixel_addons_ui_U;
flixel_addons_ui_U.__name__ = ["flixel","addons","ui","U"];
flixel_addons_ui_U.xml_str = function(data,att,lower_case,default_str) {
	if(default_str == null) {
		default_str = "";
	}
	if(lower_case == null) {
		lower_case = false;
	}
	if(data.get(att) != null) {
		if(lower_case) {
			return data.get(att).toLowerCase();
		} else {
			return data.get(att);
		}
	}
	return default_str;
};
flixel_addons_ui_U.xml_name = function(data) {
	var name = flixel_addons_ui_U.xml_str(data,"name",true,"");
	if(name == "") {
		name = flixel_addons_ui_U.xml_str(data,"id",true,"");
	}
	return name;
};
flixel_addons_ui_U.xml_color = function(data,att,cast32Bit,defaultColor) {
	if(cast32Bit == null) {
		cast32Bit = true;
	}
	var col = null;
	var str = flixel_addons_ui_U.xml_str(data,att,true);
	if(str != "") {
		var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(str);
		if(return_val == null) {
			throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + str);
		}
		col = return_val;
	}
	if(col == null && defaultColor != null) {
		col = defaultColor;
	}
	return col;
};
flixel_addons_ui_U.xml_iArray = function(data,att) {
	var arr = flixel_addons_ui_U.xml_strArray(data,att);
	var ints = null;
	if(arr != null && arr.length > 0) {
		ints = [];
		var _g1 = 0;
		var _g = arr.length;
		while(_g1 < _g) {
			var i = _g1++;
			ints[i] = Std.parseInt(arr[i]);
		}
	}
	return ints;
};
flixel_addons_ui_U.xml_fArray = function(data,att) {
	var arr = flixel_addons_ui_U.xml_strArray(data,att);
	var fs = null;
	if(arr != null && arr.length > 0) {
		fs = [];
		var _g1 = 0;
		var _g = arr.length;
		while(_g1 < _g) {
			var i = _g1++;
			fs[i] = parseFloat(arr[i]);
		}
	}
	return fs;
};
flixel_addons_ui_U.xml_strArray = function(data,att,lowerCase,default_) {
	if(lowerCase == null) {
		lowerCase = true;
	}
	var str = flixel_addons_ui_U.xml_str(data,att,lowerCase);
	if(str != "") {
		return str.split(",");
	} else {
		return default_;
	}
};
flixel_addons_ui_U.xml_colorArray = function(data,att,cast32Bit) {
	if(cast32Bit == null) {
		cast32Bit = true;
	}
	var arr = flixel_addons_ui_U.xml_strArray(data,att);
	var cols = null;
	if(arr != null && arr.length > 0) {
		cols = [];
		var _g1 = 0;
		var _g = arr.length;
		while(_g1 < _g) {
			var i = _g1++;
			var str = arr[i];
			var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(str);
			if(return_val == null) {
				throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + str);
			}
			cols[i] = return_val;
		}
	}
	return cols;
};
flixel_addons_ui_U.perc_to_float = function(str) {
	if(str.lastIndexOf("%") == str.length - 1) {
		str = HxOverrides.substr(str,0,str.length - 1);
		var r = new EReg("([0-9]+)?(\\.)?([0-9]*)?","");
		if(r.match(str)) {
			var match = r.matchedPos();
			if(match.pos == 0 && match.len == str.length) {
				var perc_float = parseFloat(str);
				perc_float /= 100;
				return perc_float;
			}
		}
	}
	return NaN;
};
flixel_addons_ui_U.isStrNum = function(str) {
	if(str == null || str == "") {
		return false;
	}
	var r = new EReg("-?([0-9]+)?(\\.)?([0-9]*)?","");
	if(r.match(str)) {
		var p = r.matchedPos();
		if(p.pos == 0 && p.len == str.length) {
			return true;
		}
	}
	return false;
};
flixel_addons_ui_U.isStrInt = function(str) {
	var r = new EReg("[0-9]+","");
	if(r.match(str)) {
		var p = r.matchedPos();
		if(p.pos == 0 && p.len == str.length) {
			return true;
		}
	}
	return false;
};
flixel_addons_ui_U.isStrFloat = function(str) {
	var r = new EReg("[0-9]+\\.[0-9]+","");
	if(r.match(str)) {
		var p = r.matchedPos();
		if(p.pos == 0 && p.len == str.length) {
			return true;
		}
	}
	return false;
};
flixel_addons_ui_U.xml_f = function(data,att,default_) {
	if(default_ == null) {
		default_ = 0;
	}
	if(data.get(att) != null) {
		return parseFloat(data.get(att));
	}
	return default_;
};
flixel_addons_ui_U.xml_i = function(data,att,default_) {
	if(default_ == null) {
		default_ = 0;
	}
	if(data.get(att) != null) {
		return Std.parseInt(data.get(att));
	}
	return default_;
};
flixel_addons_ui_U.xml_pt = function(data,att,default_) {
	if(data.get(att) != null) {
		return flixel_addons_ui_U.pointify(data.get(att));
	}
	return default_;
};
flixel_addons_ui_U.boolify = function(str) {
	str = str.toLowerCase();
	if(str == "true" || str == "1") {
		return true;
	}
	return false;
};
flixel_addons_ui_U.pointify = function(str) {
	var pt = null;
	if(str != null) {
		var arr = ["(",")"," ","=",":"];
		var _g = 0;
		while(_g < arr.length) {
			var thing = arr[_g];
			++_g;
			while(str.indexOf(thing) != -1) str = StringTools.replace(str,thing,"");
		}
		if(str.indexOf(",") == -1) {
			if(str.indexOf("x") != -1) {
				str = StringTools.replace(str,"x",",");
			}
		}
		arr = str.split(",");
		if(arr.length == 2) {
			pt = new flixel_math_FlxPoint(parseFloat(arr[0]),parseFloat(arr[1]));
		}
	}
	return pt;
};
flixel_addons_ui_U.compareStringVars = function(variable,otherValue,type,operator) {
	if(operator == null) {
		operator = "==";
	}
	switch(type) {
	case "bool":
		var ba = flixel_addons_ui_U.boolify(variable);
		var bb = flixel_addons_ui_U.boolify(otherValue);
		if(operator == "==" || operator == "=") {
			return ba == bb;
		} else if(operator == "!==" || operator == "!=") {
			return ba != bb;
		}
		break;
	case "float":
		var fa = parseFloat(variable);
		var fb = parseFloat(otherValue);
		if(operator == "==" || operator == "=") {
			return fa == fb;
		} else if(operator == "!==" || operator == "!=") {
			return fa != fb;
		} else if(operator == "<") {
			return fa < fb;
		} else if(operator == ">") {
			return fa > fb;
		} else if(operator == "<=") {
			return fa <= fb;
		} else if(operator == ">=") {
			return fa >= fb;
		}
		break;
	case "int":
		var ia = Std.parseInt(variable);
		var ib = Std.parseInt(otherValue);
		if(operator == "==" || operator == "=") {
			return ia == ib;
		} else if(operator == "!==" || operator == "!=") {
			return ia != ib;
		} else if(operator == "<") {
			return ia < ib;
		} else if(operator == ">") {
			return ia > ib;
		} else if(operator == "<=") {
			return ia <= ib;
		} else if(operator == ">=") {
			return ia >= ib;
		}
		break;
	case "string":
		if(operator == "==" || operator == "=") {
			return variable == otherValue;
		}
		if(operator == "!==" || operator == "!=") {
			return variable != otherValue;
		}
		break;
	}
	return false;
};
flixel_addons_ui_U.xml_bool = function(data,att,default_) {
	if(default_ == null) {
		default_ = false;
	}
	if(data.get(att) != null) {
		var str = data.get(att);
		str = str.toLowerCase();
		if(str == "true" || str == "1") {
			return true;
		}
		return false;
	}
	return default_;
};
flixel_addons_ui_U.xml_gfx = function(data,att,test) {
	if(test == null) {
		test = true;
	}
	var str = "";
	if(data.get(att) != null) {
		str = data.get(att);
		if(str == "" || str == null) {
			str = "";
		} else {
			str = flixel_addons_ui_U.gfx(str);
			if(test) {
				try {
					if(!openfl_Assets.exists(str,"IMAGE")) {
						throw new js__$Boot_HaxeError("couldn't load bmp \"" + att + "\"");
					}
				} catch( msg ) {
					haxe_CallStack.lastException = msg;
					if (msg instanceof js__$Boot_HaxeError) msg = msg.val;
					if( js_Boot.__instanceof(msg,String) ) {
					} else throw(msg);
				}
			}
		}
	}
	return str;
};
flixel_addons_ui_U.center = function(fb1,fb2,centerX,centerY) {
	if(centerY == null) {
		centerY = true;
	}
	if(centerX == null) {
		centerX = true;
	}
	if(centerX) {
		fb2.set_x(fb1.x + (fb1.get_width() - fb2.get_width()) / 2);
	}
	if(centerY) {
		fb2.set_y(fb1.y + (fb1.get_height() - fb2.get_height()) / 2);
	}
};
flixel_addons_ui_U.test_int = function(i1,test,i2) {
	switch(test) {
	case "!=":
		return i1 != i2;
	case "<":
		return i1 < i2;
	case "<=":
		return i1 <= i2;
	case "==":
		return i1 == i2;
	case ">":
		return i1 > i2;
	case ">=":
		return i1 >= i2;
	default:
		return false;
	}
};
flixel_addons_ui_U.test_float = function(f1,test,f2) {
	switch(test) {
	case "!=":
		return f1 != f2;
	case "<":
		return f1 < f2;
	case "<=":
		return f1 <= f2;
	case "==":
		return f1 == f2;
	case ">":
		return f1 > f2;
	case ">=":
		return f1 >= f2;
	default:
		return false;
	}
};
flixel_addons_ui_U.padDigits = function(i,d,padChar) {
	if(padChar == null) {
		padChar = "0";
	}
	var f = i;
	var str = "";
	var num_digits = 0;
	while(f >= 1) {
		f /= 10;
		++num_digits;
	}
	if(i == 0) {
		num_digits = 1;
	}
	if(num_digits < d) {
		var _g1 = 0;
		var _g = d - num_digits;
		while(_g1 < _g) {
			++_g1;
			str += padChar;
		}
	}
	return str + (i == null ? "null" : "" + i);
};
flixel_addons_ui_U.conformToBounds = function(pt,maxMin) {
	if(maxMin != null) {
		if(pt.x < maxMin.min_width) {
			pt.x = maxMin.min_width;
		}
		if(pt.y < maxMin.min_height) {
			pt.y = maxMin.min_height;
		}
		if(pt.x > maxMin.max_width) {
			pt.x = maxMin.max_width;
		}
		if(pt.x > maxMin.max_height) {
			pt.y = maxMin.max_height;
		}
	}
	return pt;
};
flixel_addons_ui_U.parseHex = function(str,cast32Bit,safe,default_color) {
	if(default_color == null) {
		default_color = 0;
	}
	if(safe == null) {
		safe = false;
	}
	if(cast32Bit == null) {
		cast32Bit = false;
	}
	var return_val = flixel_util__$FlxColor_FlxColor_$Impl_$.fromString(str);
	if(return_val == null) {
		if(!safe) {
			throw new js__$Boot_HaxeError("U.parseHex() unable to parse hex String " + str);
		} else {
			return_val = default_color;
		}
	}
	return return_val;
};
flixel_addons_ui_U.hexChar2dec = function(hex_char) {
	switch(hex_char) {
	case "0":case "1":case "10":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":
		return Std.parseInt(hex_char);
	case "A":case "a":
		return 10;
	case "C":case "c":
		return 12;
	case "E":case "e":
		return 14;
	case "B":case "b":
		return 11;
	case "D":case "d":
		return 13;
	case "F":case "f":
		return 15;
	default:
		throw new js__$Boot_HaxeError("U.hexChar2dec() illegal char(" + hex_char + ")");
	}
};
flixel_addons_ui_U.hex2dec = function(hex_str) {
	var place_mult = 1;
	var sum = 0;
	var i = hex_str.length - 1;
	while(i >= 0) {
		var char_hex = HxOverrides.substr(hex_str,i,1);
		var char_int;
		switch(char_hex) {
		case "0":case "1":case "10":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":
			char_int = Std.parseInt(char_hex);
			break;
		case "A":case "a":
			char_int = 10;
			break;
		case "C":case "c":
			char_int = 12;
			break;
		case "E":case "e":
			char_int = 14;
			break;
		case "B":case "b":
			char_int = 11;
			break;
		case "D":case "d":
			char_int = 13;
			break;
		case "F":case "f":
			char_int = 15;
			break;
		default:
			throw new js__$Boot_HaxeError("U.hexChar2dec() illegal char(" + char_hex + ")");
		}
		sum += char_int * place_mult;
		place_mult *= 16;
		--i;
	}
	return sum;
};
flixel_addons_ui_U.hex2rgb = function(hex) {
	return [hex >> 16 & 255,hex >> 8 & 255,hex & 255];
};
flixel_addons_ui_U.applyResize = function(resize_ratio,resize_ratio_axis,w,h,pt) {
	if(pt == null) {
		pt = new flixel_math_FlxPoint();
	}
	if(resize_ratio > 0) {
		if(Math.abs(w / h - resize_ratio) > 0.0001) {
			if(resize_ratio_axis == 1) {
				h = w * (1 / resize_ratio);
			} else {
				w = h * (1 / resize_ratio);
			}
		}
	}
	if((w | 0) < 1) {
		w = 1;
	}
	if((h | 0) < 1) {
		h = 1;
	}
	pt.set(w,h);
	return pt;
};
flixel_addons_ui_U.rgb2hex = function(r,g,b) {
	return r << 16 | g << 8 | b;
};
flixel_addons_ui_U.interpolate = function(hex1,hex2,amt) {
	if(amt < 0) {
		amt = 0;
	} else if(amt > 1) {
		amt = 1;
	}
	var a1 = 1 - amt;
	return ((hex1 >> 16 & 255) * a1 + (hex2 >> 16 & 255) * amt | 0) << 16 | ((hex1 >> 8 & 255) * a1 + (hex2 >> 8 & 255) * amt | 0) << 8 | ((hex1 & 255) * a1 + (hex2 & 255) * amt | 0);
};
flixel_addons_ui_U.getLocList = function(xmin,ymin,xmax,ymax) {
	var list = [];
	var _g1 = ymin;
	var _g = ymax + 1;
	while(_g1 < _g) {
		var yy = _g1++;
		var _g3 = xmin;
		var _g2 = xmax + 1;
		while(_g3 < _g2) {
			var point = flixel_math_FlxPoint._pool.get().set(_g3++,yy);
			point._inPool = false;
			list.push(point);
		}
	}
	return list;
};
flixel_addons_ui_U.disposeXML = function(thing) {
};
flixel_addons_ui_U.copyFast = function(fast) {
	return new haxe_xml_Fast(Xml.parse(haxe_xml_Printer.print(fast.x)).firstElement());
};
flixel_addons_ui_U.copyXml = function(data) {
	return Xml.parse(haxe_xml_Printer.print(data)).firstElement();
};
flixel_addons_ui_U.getXML = function(str,folder) {
	if(folder == null) {
		folder = "";
	}
	var id = str;
	if(folder != "") {
		id = folder + "/" + str;
	}
	return flixel_addons_ui_U.xml(id);
};
flixel_addons_ui_U.json = function(str,extension,dir) {
	if(dir == null) {
		dir = "assets/json/";
	}
	if(extension == null) {
		extension = "json";
	}
	var json_str = openfl_Assets.getText(dir + str + "." + extension);
	if(json_str != "" && json_str != null) {
		return JSON.parse(json_str);
	}
	return null;
};
flixel_addons_ui_U.field = function(object,field,_default) {
	if(object == null) {
		return null;
	}
	if(Object.prototype.hasOwnProperty.call(object,field)) {
		var thing = Reflect.field(object,field);
		if(thing == null) {
			return _default;
		}
		return thing;
	}
	return _default;
};
flixel_addons_ui_U.xml = function(id,extension,getFast,dir) {
	if(dir == null) {
		dir = "assets/xml/";
	}
	if(getFast == null) {
		getFast = true;
	}
	if(extension == null) {
		extension = "xml";
	}
	if(id.indexOf("raw:") == 0 || id.indexOf("RAW:") == 0) {
		id = HxOverrides.substr(id,4,id.length - 4);
		dir = "";
	}
	if(!openfl_Assets.exists(dir + id + "." + extension,"TEXT")) {
		return null;
	}
	var str = openfl_Assets.getText(dir + id + "." + extension);
	if(str == null) {
		return null;
	}
	var the_xml = Xml.parse(str);
	if(getFast) {
		return new haxe_xml_Fast(the_xml.firstElement());
	} else {
		return the_xml.firstElement();
	}
};
flixel_addons_ui_U.clearArraySoft = function(array) {
	if(array == null) {
		return;
	}
	var i = array.length - 1;
	while(i >= 0) {
		array[i] = null;
		array.splice(i,1);
		--i;
	}
};
flixel_addons_ui_U.clearArray = function(array) {
	if(array == null) {
		return;
	}
	var i = array.length - 1;
	while(i >= 0) {
		flixel_addons_ui_U.destroyThing(array[i]);
		array[i] = null;
		array.splice(i,1);
		--i;
	}
};
flixel_addons_ui_U.destroyThing = function(thing) {
	if(thing == null) {
		return;
	}
	if((thing instanceof Array) && thing.__enum__ == null) {
		flixel_addons_ui_U.clearArray(thing);
	} else if(js_Boot.__instanceof(thing,flixel_util_IFlxDestroyable)) {
		var idstr = js_Boot.__cast(thing , flixel_util_IFlxDestroyable);
		idstr.destroy();
		idstr = null;
	} else if(js_Boot.__instanceof(thing,flixel_FlxBasic)) {
		var fb = js_Boot.__cast(thing , flixel_FlxBasic);
		fb.destroy();
		fb = null;
	}
	thing = null;
};
flixel_addons_ui_U.fontStr = function(str,style) {
	if(style == null) {
		style = "";
	}
	var style1 = style;
	style1 = style.toLowerCase();
	var suffix = "";
	switch(style1) {
	case "b":case "bold":
		suffix = "b";
		break;
	case "bi":case "bold-italic":case "boldi":case "bolditalic":case "ib":case "ibold":case "italic-bold":case "italicbold":case "z":
		suffix = "z";
		break;
	case "i":case "italic":
		suffix = "i";
		break;
	case "":case "none":case "normal":case "regular":
		suffix = "";
		break;
	}
	if(str.indexOf("assets/fonts/") != 0) {
		return "assets/fonts/" + str + suffix;
	} else {
		return str + suffix;
	}
};
flixel_addons_ui_U.font = function(str,style,extension) {
	if(extension == null) {
		extension = ".ttf";
	}
	if(style == null) {
		style = "";
	}
	var ostr = str;
	var style1 = style;
	style1 = style.toLowerCase();
	var suffix = "";
	switch(style1) {
	case "b":case "bold":
		suffix = "b";
		break;
	case "bi":case "bold-italic":case "boldi":case "bolditalic":case "ib":case "ibold":case "italic-bold":case "italicbold":case "z":
		suffix = "z";
		break;
	case "i":case "italic":
		suffix = "i";
		break;
	case "":case "none":case "normal":case "regular":
		suffix = "";
		break;
	}
	if(str.indexOf("assets/fonts/") != 0) {
		str = "assets/fonts/" + str + suffix;
	} else {
		str += suffix;
	}
	if(str.indexOf(extension) == -1) {
		str += extension;
	}
	str = flixel_addons_ui_FontFixer.add(str);
	if(!openfl_Assets.exists(str,"FONT") && extension == ".ttf") {
		var alt = flixel_addons_ui_U.font(ostr,style,".otf");
		if(openfl_Assets.exists(alt,"FONT")) {
			return alt;
		}
	}
	return str;
};
flixel_addons_ui_U._font = function(str,style) {
	if(style == null) {
		style = "";
	}
	style = style.toLowerCase();
	var suffix = "";
	switch(style) {
	case "b":case "bold":
		suffix = "b";
		break;
	case "bi":case "bold-italic":case "boldi":case "bolditalic":case "ib":case "ibold":case "italic-bold":case "italicbold":case "z":
		suffix = "z";
		break;
	case "i":case "italic":
		suffix = "i";
		break;
	case "":case "none":case "normal":case "regular":
		suffix = "";
		break;
	}
	if(str.indexOf("assets/fonts/") != 0) {
		return "assets/fonts/" + str + suffix;
	}
	return str + suffix;
};
flixel_addons_ui_U.fsx = function(data) {
	return new flixel_addons_ui_FlxUISprite(0,0,data);
};
flixel_addons_ui_U.fs = function(data) {
	return new flixel_FlxSprite(0,0,data);
};
flixel_addons_ui_U.FU = function(str) {
	return HxOverrides.substr(str,0,1).toUpperCase() + HxOverrides.substr(str,1,str.length - 1);
};
flixel_addons_ui_U.FUL = function(str) {
	return HxOverrides.substr(str,0,1).toUpperCase() + HxOverrides.substr(str,1,str.length - 1).toLowerCase();
};
flixel_addons_ui_U.getBmp = function(asset) {
	var str = null;
	if(typeof(asset) == "string") {
		str = asset;
	} else if(js_Boot.__instanceof(asset,flixel_graphics_FlxGraphic)) {
		str = asset.key;
	} else if(js_Boot.__instanceof(asset,openfl_display_BitmapData)) {
		return asset;
	}
	if(flixel_FlxG.bitmap._cache.get(str) != null) {
		var cg = flixel_FlxG.bitmap._cache.get(str);
		if(cg.bitmap != null) {
			return cg.bitmap;
		}
	}
	return openfl_Assets.getBitmapData(str,false);
};
flixel_addons_ui_U.checkHaxedef = function(str) {
	str = str.toLowerCase();
	switch(str) {
	case "android":
		break;
	case "console-pc":case "console_pc":
		break;
	case "cpp":
		break;
	case "demo":
		break;
	case "desktop":
		break;
	case "flash":
		break;
	case "html5":
		return true;
	case "ios":
		break;
	case "js":
		return true;
	case "legacy":case "lime_legacy":
		break;
	case "lime_next":case "next":
		return true;
	case "linux":
		break;
	case "mac":
		break;
	case "mobile":
		break;
	case "neko":
		break;
	case "ps3":
		break;
	case "ps4":
		break;
	case "sys":
		break;
	case "tvos":
		break;
	case "vita":
		break;
	case "web":
		return true;
	case "wiiu":
		break;
	case "windows":
		break;
	case "xbox1":
		break;
	}
	return false;
};
flixel_addons_ui_U.copy_shallow_arr = function(src) {
	if(src == null) {
		return null;
	}
	var arr = [];
	if(src == null) {
		return arr;
	}
	var _g = 0;
	while(_g < src.length) {
		var thing = src[_g];
		++_g;
		arr.push(thing);
	}
	return arr;
};
flixel_addons_ui_U.copy_arr_arr_i = function(src) {
	if(src == null) {
		return null;
	}
	var arrarr = [];
	var _g = 0;
	while(_g < src.length) {
		var arri = src[_g];
		++_g;
		var temp = [];
		var _g1 = 0;
		while(_g1 < arri.length) {
			var i = arri[_g1];
			++_g1;
			temp.push(i);
		}
		arrarr.push(temp);
	}
	return arrarr;
};
flixel_addons_ui_U.copy_shallow_arr_i = function(src) {
	if(src == null) {
		return null;
	}
	var arr = [];
	var _g = 0;
	while(_g < src.length) {
		var thing = src[_g];
		++_g;
		arr.push(thing);
	}
	return arr;
};
flixel_addons_ui_U.copy_shallow_arr_str = function(src) {
	if(src == null) {
		return null;
	}
	var arr = [];
	var _g = 0;
	while(_g < src.length) {
		var thing = src[_g];
		++_g;
		arr.push(thing);
	}
	return arr;
};
flixel_addons_ui_U.FU_ = function(str) {
	var arr = str.split(" ");
	var str1 = "";
	var _g1 = 0;
	var _g = arr.length;
	while(_g1 < _g) {
		var i = _g1++;
		str1 += flixel_addons_ui_U.FU(arr[i]);
		if(i != arr.length - 1) {
			str1 += " ";
		}
	}
	return str1;
};
flixel_addons_ui_U.xml_blend = function(x,att) {
	return flixel_addons_ui_U.blendModeFromString(flixel_addons_ui_U.xml_str(x,att,true,"normal"));
};
flixel_addons_ui_U.blendModeFromString = function(str) {
	str = str.toLowerCase();
	switch(str) {
	case "add":
		return 0;
	case "alpha":
		return 1;
	case "darken":
		return 2;
	case "difference":
		return 3;
	case "erase":
		return 4;
	case "hardlight":
		return 5;
	case "invert":
		return 6;
	case "layer":
		return 7;
	case "lighten":
		return 8;
	case "multiply":
		return 9;
	case "normal":
		return 10;
	case "overlay":
		return 11;
	case "screen":
		return 12;
	case "subtract":
		return 14;
	default:
		return 10;
	}
};
flixel_addons_ui_U.scaleTileBmp = function(orig_id,scale,origW,origH,W,H,smooth) {
	if(smooth == null) {
		smooth = true;
	}
	if(H == null) {
		H = -1;
	}
	if(W == null) {
		W = -1;
	}
	var orig = openfl_Assets.getBitmapData(orig_id,false);
	if(orig == null) {
		if(flixel_FlxG.bitmap._cache.get(orig_id) != null) {
			orig = flixel_FlxG.bitmap._cache.get(orig_id).bitmap;
		} else {
			return null;
		}
	}
	var widthInTiles = orig.width / origW | 0;
	var heightInTiles = orig.height / origH | 0;
	if(W == -1) {
		W = origW * scale | 0;
	}
	if(H == -1) {
		H = origH * scale | 0;
		scale = H / origH;
	}
	if(Math.abs(scale - 1.0) > 0.001) {
		var scaled = new openfl_display_BitmapData(W * widthInTiles | 0,H * heightInTiles | 0,true,0);
		var rect = new openfl_geom_Rectangle();
		var pt = new openfl_geom_Point();
		var matrix = new openfl_geom_Matrix();
		matrix.scale(scale,scale);
		var _g1 = 0;
		while(_g1 < heightInTiles) {
			var tiley = _g1++;
			var _g3 = 0;
			while(_g3 < widthInTiles) {
				var tilex = _g3++;
				var tile = new openfl_display_BitmapData(origW,origH,true,0);
				rect.setTo(tilex * origW,tiley * origH,origW,origH);
				pt.setTo(0,0);
				tile.copyPixels(orig,rect,pt);
				var scaleTile = new openfl_display_BitmapData(W,H,true,0);
				scaleTile.draw(tile,matrix,null,null,null,smooth);
				pt.setTo(tilex * W,tiley * H);
				scaled.copyPixels(scaleTile,scaleTile.rect,pt);
			}
		}
		return scaled;
	} else {
		return orig.clone();
	}
};
flixel_addons_ui_U.scaleAndStoreTileset = function(orig_id,scale,OrigW,OrigH,TileW,TileH,Smooth) {
	if(Smooth == null) {
		Smooth = true;
	}
	if(TileH == null) {
		TileH = -1;
	}
	if(TileW == null) {
		TileW = -1;
	}
	var assetKey = orig_id + "_x" + scale;
	if(flixel_FlxG.bitmap._cache.get(assetKey) != null == false) {
		var bmp = flixel_addons_ui_U.scaleTileBmp(orig_id,scale,OrigW,OrigH,TileW,TileH,Smooth);
		flixel_FlxG.bitmap.add(bmp,false,assetKey);
	}
	return assetKey;
};
flixel_addons_ui_U.loadScaledImage = function(src,W,H,smooth) {
	if(smooth == null) {
		smooth = true;
	}
	var bmpSrc = flixel_addons_ui_U.gfx(src);
	var testBmp = openfl_Assets.getBitmapData(bmpSrc,false);
	if(testBmp != null) {
		if(W < 0) {
			W = testBmp.width;
		}
		if(H < 0) {
			H = testBmp.height;
		}
		if(Math.abs(W - testBmp.width) + Math.abs(H - testBmp.height) > 0.01) {
			var scaleKey = bmpSrc + "_" + (W | 0) + "x" + (H | 0);
			if(flixel_FlxG.bitmap._cache.get(scaleKey) == null) {
				var scaledBmp = new openfl_display_BitmapData(W | 0,H | 0,true,0);
				var m = flixel_addons_ui_U.getMatrix();
				m.identity();
				m.scale(W / testBmp.width,H / testBmp.height);
				scaledBmp.draw(testBmp,m,null,null,null,smooth);
				flixel_FlxG.bitmap.add(scaledBmp,true,scaleKey);
			}
			return scaleKey;
		} else {
			return bmpSrc;
		}
	}
	return null;
};
flixel_addons_ui_U.loadImageScaleToHeight = function(src,Height,Smooth,checkFlxBitmap) {
	if(checkFlxBitmap == null) {
		checkFlxBitmap = false;
	}
	if(Smooth == null) {
		Smooth = true;
	}
	var bmpSrc = flixel_addons_ui_U.gfx(src);
	var testBmp = null;
	if(!checkFlxBitmap) {
		testBmp = openfl_Assets.getBitmapData(bmpSrc,false);
	} else {
		var flximg = flixel_FlxG.bitmap._cache.get(bmpSrc);
		if(flximg != null) {
			testBmp = flximg.bitmap;
		} else {
			testBmp = null;
		}
	}
	return flixel_addons_ui_U.loadMonoScaledImage(bmpSrc,testBmp != null ? Height / testBmp.height : 1.0,Smooth,checkFlxBitmap);
};
flixel_addons_ui_U.loadMonoScaledImage = function(src,Scale,smooth,checkFlxBitmap,fixAlphaChannel) {
	if(fixAlphaChannel == null) {
		fixAlphaChannel = false;
	}
	if(checkFlxBitmap == null) {
		checkFlxBitmap = false;
	}
	if(smooth == null) {
		smooth = true;
	}
	var bmpSrc = flixel_addons_ui_U.gfx(src);
	var testBmp = null;
	if(!checkFlxBitmap) {
		testBmp = openfl_Assets.getBitmapData(bmpSrc,false);
		if(testBmp == null) {
			testBmp = openfl_Assets.getBitmapData(bmpSrc,true);
		}
	} else {
		var flximg = flixel_FlxG.bitmap._cache.get(bmpSrc);
		if(flximg != null) {
			testBmp = flximg.bitmap;
		} else {
			testBmp = null;
		}
	}
	if(testBmp != null) {
		if(Scale <= 0) {
			throw new js__$Boot_HaxeError("Error! Scale must be positive & > 0! (Scale was = " + Scale + ")");
		}
		if(Math.abs(Scale - 1.00) > 0.001) {
			var scaleKey = bmpSrc + "_ScaleX" + Scale;
			if(flixel_FlxG.bitmap._cache.get(scaleKey) == null) {
				var scaledBmp = new openfl_display_BitmapData(testBmp.width * Scale | 0,testBmp.height * Scale | 0,true,0);
				var m = flixel_addons_ui_U.getMatrix();
				m.identity();
				m.scale(Scale,Scale);
				scaledBmp.draw(testBmp,m,null,null,null,smooth);
				if(fixAlphaChannel) {
					var black = new openfl_display_BitmapData(scaledBmp.width,scaledBmp.height,true,-16777216);
					black.copyPixels(scaledBmp,scaledBmp.rect,new openfl_geom_Point(),null,null,true);
					black.copyChannel(scaledBmp,scaledBmp.rect,new openfl_geom_Point(0,0),8,8);
					var temp = scaledBmp;
					scaledBmp = black;
					temp.dispose();
				}
				flixel_FlxG.bitmap.add(scaledBmp,true,scaleKey);
			}
			return scaleKey;
		} else {
			flixel_FlxG.bitmap.add(testBmp,false,bmpSrc);
			return bmpSrc;
		}
	}
	return null;
};
flixel_addons_ui_U.gfx = function(id,dir1,dir2,dir3,dir4,suppressError) {
	if(suppressError == null) {
		suppressError = false;
	}
	if(dir4 == null) {
		dir4 = "";
	}
	if(dir3 == null) {
		dir3 = "";
	}
	if(dir2 == null) {
		dir2 = "";
	}
	if(dir1 == null) {
		dir1 = "";
	}
	if(id != null) {
		id = id.toLowerCase();
	}
	var prefix = "";
	if(dir1 != "") {
		prefix = dir1 + "/";
		if(dir2 != "") {
			prefix += dir2 + "/";
			if(dir3 != "") {
				prefix += dir3 + "/";
				if(dir4 != "") {
					prefix += dir4 + "/";
				}
			}
		}
	}
	if(prefix != "") {
		id = prefix + id;
	}
	if(id.indexOf("raw:") != 0) {
		id = StringTools.replace(id,"-","_");
	}
	return flixel_addons_ui_U.get_gfx(id);
};
flixel_addons_ui_U.bmpToArrayIntLayer = function(color_index,bd) {
	var p;
	var arr = [];
	var w = bd.width;
	var h = bd.height;
	var _g1 = 0;
	while(_g1 < h) {
		var r = _g1++;
		var _g3 = 0;
		while(_g3 < w) {
			p = bd.getPixel(_g3++,r);
			if(p == color_index) {
				p = 1;
			} else {
				p = 0;
			}
			arr.push(p);
		}
	}
	return arr;
};
flixel_addons_ui_U.bmpToCSVLayer = function(color_index,bd) {
	var p;
	var csv = "";
	var w = bd.width;
	var h = bd.height;
	var _g1 = 0;
	while(_g1 < h) {
		var r = _g1++;
		var _g3 = 0;
		while(_g3 < w) {
			var c = _g3++;
			p = bd.getPixel(c,r);
			if(p == color_index) {
				p = 1;
			} else {
				p = 0;
			}
			if(c == 0) {
				if(r == 0) {
					csv += p;
				} else {
					csv += "\n" + p;
				}
			} else {
				csv += ", " + p;
			}
		}
	}
	return csv;
};
flixel_addons_ui_U.get_gfx = function(str) {
	var return_str = "";
	var suffix = "";
	if(str.indexOf(".jpg") != -1) {
		suffix = ".jpg";
	} else {
		suffix = ".png";
	}
	if(str != null && str.length > 4 && str.indexOf(suffix) != -1) {
		str = HxOverrides.substr(str,0,str.length - 4);
	}
	if(str.indexOf("raw:") == 0 || str.indexOf("RAW:") == 0) {
		str = HxOverrides.substr(str,4,str.length - 4);
		return_str = str + suffix;
	}
	if(str != null && str.indexOf("assets/gfx/") == 0) {
		return_str = str + suffix;
	}
	if(return_str == "") {
		return_str = "assets/gfx/" + str + suffix;
	}
	if(return_str.indexOf(".stitch.txt" + suffix) != -1) {
		return_str = StringTools.replace(return_str,".stitch.txt" + suffix,".stitch.txt");
	}
	return return_str;
};
flixel_addons_ui_U.sfx = function(str) {
	if(str.indexOf("RAW:") == 0) {
		str = HxOverrides.substr(str,4,str.length - 4);
		return str + ".ogg";
	}
	return "assets/sfx/" + str + ".ogg";
};
flixel_addons_ui_U.intStr_to_arr = function(str) {
	var arr = str.split(",");
	var str_arr = [];
	var _g = 0;
	while(_g < arr.length) {
		var s = arr[_g];
		++_g;
		if(s.indexOf("-") == -1) {
			str_arr.push(Std.parseInt(s));
		} else {
			var range = str.split("-");
			var lo = -1;
			var hi = -1;
			if(range != null && range.length == 2) {
				lo = Std.parseInt(range[0]);
				hi = Std.parseInt(range[1]) + 1;
				if(lo >= 0 && hi > lo) {
					var _g2 = lo;
					var _g1 = hi;
					while(_g2 < _g1) str_arr.push(_g2++);
				}
			}
		}
	}
	return str_arr;
};
flixel_addons_ui_U.intStr_to_arrStr = function(str) {
	var arr = str.split(",");
	var str_arr = [];
	var _g = 0;
	while(_g < arr.length) {
		var s = arr[_g];
		++_g;
		if(s.indexOf("-") == -1) {
			str_arr.push(Std.string(Std.parseInt(s)));
		} else {
			var range = str.split("-");
			var lo = -1;
			var hi = -1;
			if(range != null && range.length == 2) {
				lo = Std.parseInt(range[0]);
				hi = Std.parseInt(range[1]) + 1;
				if(lo >= 0 && hi > lo) {
					var _g2 = lo;
					var _g1 = hi;
					while(_g2 < _g1) {
						var i = _g2++;
						str_arr.push(i == null ? "null" : "" + i);
					}
				}
			}
		}
	}
	return str_arr;
};
flixel_addons_ui_U.dirStr = function(XX,YY) {
	var str = "";
	if(XX == 0) {
		if(YY == -1) {
			str = "N";
		} else if(YY == 1) {
			str = "S";
		} else if(YY == 0) {
			str = "NONE";
		}
	} else if(XX == 1) {
		if(YY == -1) {
			str = "NE";
		} else if(YY == 1) {
			str = "SE";
		} else if(YY == 0) {
			str = "E";
		}
	} else if(XX == -1) {
		if(YY == -1) {
			str = "NW";
		} else if(YY == 1) {
			str = "SW";
		} else if(YY == 0) {
			str = "W";
		}
	} else {
		str = "NONE";
	}
	return str;
};
flixel_addons_ui_U.obj_direction = function(a,b) {
	var dx = a.x - b.x;
	var dy = a.y - b.y;
	var X = dx / Math.abs(dx) | 0;
	var Y = dy / Math.abs(dy) | 0;
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	return point;
};
flixel_addons_ui_U.circle_test = function(x1,y1,r1,x2,y2,r2) {
	var dx = x1 - x2;
	var dy = y1 - y2;
	return dx * dx + dy * dy <= r1 * r1 + r2 * r2;
};
flixel_addons_ui_U.point_circle_test = function(x,y,cx,cy,r) {
	var dx = x - cx;
	var dy = y - cy;
	return dx * dx + dy * dy <= r * r;
};
flixel_addons_ui_U.aabb_test_mult = function(a,b,multA,multB) {
	if(multB == null) {
		multB = 1;
	}
	if(multA == null) {
		multA = 1;
	}
	var extra = a.get_width() * multA;
	var diff = (extra - a.get_width()) / 2;
	var ax1 = a.x - diff;
	var ax2 = a.x + a.get_width() + diff;
	extra = a.get_height() * multA;
	diff = (extra - a.get_height()) / 2;
	var ay1 = a.y - diff;
	var ay2 = a.y + a.get_height() + diff;
	extra = b.get_width() * multB;
	diff = (extra - b.get_width()) / 2;
	var bx1 = b.x - diff;
	var bx2 = b.x + b.get_width() + diff;
	extra = b.get_height() * multB;
	diff = (extra - b.get_height()) / 2;
	var by1 = b.y - diff;
	var by2 = b.y + b.get_height() + diff;
	if(Math.abs(bx2 + bx1 - (ax2 + ax1)) <= bx2 - bx1 + ax2 - ax1) {
		return Math.abs(by2 + by1 - (ay2 + ay1)) <= by2 - by1 + ay2 - ay1;
	} else {
		return false;
	}
};
flixel_addons_ui_U.aabb_test = function(a,b) {
	var ax1 = a.x;
	var ax2 = a.x + a.get_width();
	var ay1 = a.y;
	var ay2 = a.y + a.get_height();
	var bx1 = b.x;
	var bx2 = b.x + b.get_width();
	var by1 = b.y;
	var by2 = b.y + b.get_height();
	if(Math.abs(bx2 + bx1 - (ax2 + ax1)) <= bx2 - bx1 + ax2 - ax1) {
		return Math.abs(by2 + by1 - (ay2 + ay1)) <= by2 - by1 + ay2 - ay1;
	} else {
		return false;
	}
};
flixel_addons_ui_U.bitStringDimensions = function(str) {
	var pt = new openfl_geom_Point(0,0);
	var arr = str.split("\n");
	if(arr != null && arr.length > 1) {
		pt.y = arr.length;
		if(arr[0] != null && arr[0].length > 1) {
			pt.x = arr[0].length;
		}
	}
	return pt;
};
flixel_addons_ui_U.splitBitString = function(str) {
	var $final = [];
	var arr = str.split("\n");
	var i = 0;
	while(i < arr.length) {
		var len = arr[i].length;
		var j = 0;
		while(j < len) {
			$final.push(Std.parseInt(arr[i].charAt(j)));
			++j;
		}
		++i;
	}
	return $final;
};
flixel_addons_ui_U.getShortTextFromFlxKeyText = function(str) {
	str = str.toUpperCase();
	switch(str) {
	case "ACCENT":
		return "`";
	case "ALT":
		return "AT";
	case "BACKSLASH":
		return "\\";
	case "BACKSPACE":
		return "BK";
	case "CAPSLOCK":
		return "CP";
	case "COMMA":
		return ",";
	case "CONTROL":
		return "CT";
	case "DELETE":
		return "DE";
	case "DOWN":
		return "DN";
	case "EIGHT":
		return "8";
	case "END":
		return "ED";
	case "ENTER":
		return "EN";
	case "EQUALS":
		return "=";
	case "ESC":case "ESCAPE":
		return "EC";
	case "FIVE":
		return "5";
	case "FOUR":
		return "4";
	case "HOME":
		return "HM";
	case "INSERT":
		return "IN";
	case "LBRACKET":
		return "[";
	case "LEFT":
		return "LT";
	case "MINUS":
		return "-";
	case "NINE":
		return "9";
	case "NULL":
		return " ";
	case "NUM0":
		return "N0";
	case "NUM1":
		return "N1";
	case "NUM2":
		return "N2";
	case "NUM3":
		return "N3";
	case "NUM4":
		return "N4";
	case "NUM5":
		return "N5";
	case "NUM6":
		return "N6";
	case "NUM7":
		return "N7";
	case "NUM8":
		return "N8";
	case "NUM9":
		return "N9";
	case "NUMDEC":
		return "N.";
	case "NUMDIV":
		return "N/";
	case "NUMLOCK":
		return "NM";
	case "NUMMINUS":
		return "N-";
	case "NUMMULT":
		return "N*";
	case "NUMPLUS":
		return "N+";
	case "ONE":
		return "1";
	case "PAGEDOWN":
		return "PD";
	case "PAGEUP":
		return "PU";
	case "PAUSEBREAK":
		return "PB";
	case "PERIOD":
		return ".";
	case "PLUS":
		return "+";
	case "QUOTE":
		return "\"";
	case "RBRACKET":
		return "]";
	case "RIGHT":
		return "RT";
	case "SCROLLLOCK":
		return "SC";
	case "SEMICOLON":
		return ";";
	case "SEVEN":
		return "7";
	case "SHIFT":
		return "SH";
	case "SIX":
		return "6";
	case "SLASH":
		return "/";
	case "SPACE":
		return "SP";
	case "TAB":
		return "TB";
	case "TEN":
		return "10";
	case "THREE":
		return "3";
	case "TWO":
		return "2";
	case "UP":
		return "UP";
	case "ZERO":
		return "0";
	default:
		return str;
	}
};
flixel_addons_ui_U.getFlxKeyTextFromShortText = function(str) {
	str = str.toUpperCase();
	switch(str) {
	case "":
		return " ";
	case "\"":
		return "QUOTE";
	case "*":
		return "NUMMULT";
	case "+":
		return "PLUS";
	case ",":
		return "COMMA";
	case "-":
		return "MINUS";
	case ".":
		return "PERIOD";
	case "/":
		return "SLASH";
	case "0":
		return "ZERO";
	case "1":
		return "ONE";
	case "10":
		return "TEN";
	case "2":
		return "TWO";
	case "3":
		return "THREE";
	case "4":
		return "FOUR";
	case "5":
		return "FIVE";
	case "6":
		return "SIX";
	case "7":
		return "SEVEN";
	case "8":
		return "EIGHT";
	case "9":
		return "NINE";
	case ";":
		return "SEMICOLON";
	case "=":
		return "EQUALS";
	case "AT":
		return "ALT";
	case "BK":
		return "BACKSPACE";
	case "CP":
		return "CAPSLOCK";
	case "CT":
		return "CONTROL";
	case "DE":
		return "DELETE";
	case "DN":
		return "DOWN";
	case "EC":
		return "ESCAPE";
	case "ED":
		return "END";
	case "EN":
		return "ENTER";
	case "HM":
		return "HOME";
	case "IN":
		return "INSERT";
	case "LT":
		return "LEFT";
	case "N+":
		return "NUMPLUS";
	case "N-":
		return "NUMMINUS";
	case "N.":
		return "NUMDEC";
	case "N/":
		return "NUMDIV";
	case "N0":
		return "NUM0";
	case "N1":
		return "NUM1";
	case "N2":
		return "NUM2";
	case "N3":
		return "NUM3";
	case "N4":
		return "NUM4";
	case "N5":
		return "NUM5";
	case "N6":
		return "NUM6";
	case "N7":
		return "NUM7";
	case "N8":
		return "NUM8";
	case "N9":
		return "NUM9";
	case "NM":
		return "NUMLOCK";
	case "PB":
		return "PAUSEBREAK";
	case "PD":
		return "PAGEDOWN";
	case "PU":
		return "PAGEUP";
	case "RT":
		return "RIGHT";
	case "SC":
		return "SCROLLLOCK";
	case "SH":
		return "SHIFT";
	case "SP":
		return "SPACE";
	case "TB":
		return "TAB";
	case "UP":
		return "UP";
	case "[":
		return "LBRACKET";
	case "\\":
		return "BACKSLASH";
	case "]":
		return "RBRACKET";
	case "`":
		return "ACCENT";
	default:
		return str;
	}
};
flixel_addons_ui_U.formatXml = function(_xml) {
	var s = haxe_xml_Printer.print(_xml);
	var r = new EReg(">[^`<]*<","g");
	s = s.replace(r.r,">___SPLITHERE___<");
	r = new EReg("___SPLITHERE___","g");
	var split = r.split(s);
	s = "";
	var childDepht = 0;
	var _g = 0;
	while(_g < split.length) {
		var str = split[_g];
		++_g;
		var _g2 = 0;
		var _g1 = childDepht;
		while(_g2 < _g1) {
			++_g2;
			s += "\t";
		}
		if(str.charAt(0) == "<" && str.charAt(1) == "/") {
			--childDepht;
			s = HxOverrides.substr(s,0,s.length - "\t".length);
		} else if(str.charAt(str.length - 1) == ">" && str.charAt(str.length - 2) != "/" && str.charAt(str.length - 2) != "-") {
			++childDepht;
		}
		s += str + "\n";
	}
	return s;
};
flixel_addons_ui_U.strCase = function(str,code) {
	switch(code) {
	case "fu":
		return flixel_addons_ui_U.FU(str);
	case "fu_":
		return flixel_addons_ui_U.FU_(str);
	case "l":
		return str.toLowerCase();
	case "u":
		return str.toUpperCase();
	default:
		return str;
	}
};
flixel_addons_ui_U.unparentXML = function(f) {
	if(f.x.parent != null) {
		f.x.parent.removeChild(f.x);
	}
	return f;
};
flixel_addons_ui_U.setButtonLabel = function(btn,str) {
	if(btn == null) {
		return;
	}
	if(js_Boot.__instanceof(btn,flixel_addons_ui_FlxUIButton)) {
		(js_Boot.__cast(btn , flixel_addons_ui_FlxUIButton)).label.set_text(str);
	} else if(js_Boot.__instanceof(btn,flixel_addons_ui_FlxUISpriteButton)) {
		var fuisb = btn;
		if(fuisb.label == null) {
			return;
		}
		if(js_Boot.__instanceof(fuisb.label,flixel_group_FlxTypedSpriteGroup)) {
			var g = fuisb.label;
			if(g.group.members == null) {
				return;
			}
			var _g = 0;
			var _g1 = g.group.members;
			while(_g < _g1.length) {
				var sprite = _g1[_g];
				++_g;
				if(sprite == null) {
					continue;
				}
				if(js_Boot.__instanceof(sprite,flixel_text_FlxText)) {
					(js_Boot.__cast(sprite , flixel_text_FlxText)).set_text(str);
					return;
				}
			}
		}
	}
};
flixel_addons_ui_U.getMatrix = function() {
	if(flixel_addons_ui_U._matrix == null) {
		flixel_addons_ui_U._matrix = new openfl_geom_Matrix();
	}
	return flixel_addons_ui_U._matrix;
};
var flixel_addons_ui_interfaces_IFireTongue = function() { };
$hxClasses["flixel.addons.ui.interfaces.IFireTongue"] = flixel_addons_ui_interfaces_IFireTongue;
flixel_addons_ui_interfaces_IFireTongue.__name__ = ["flixel","addons","ui","interfaces","IFireTongue"];
flixel_addons_ui_interfaces_IFireTongue.prototype = {
	__class__: flixel_addons_ui_interfaces_IFireTongue
};
var flixel_animation_FlxBaseAnimation = function(Parent,Name) {
	this.curIndex = 0;
	this.parent = Parent;
	this.name = Name;
};
$hxClasses["flixel.animation.FlxBaseAnimation"] = flixel_animation_FlxBaseAnimation;
flixel_animation_FlxBaseAnimation.__name__ = ["flixel","animation","FlxBaseAnimation"];
flixel_animation_FlxBaseAnimation.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_animation_FlxBaseAnimation.prototype = {
	set_curIndex: function(Value) {
		this.curIndex = Value;
		if(this.parent != null && this.parent._curAnim == this) {
			this.parent.set_frameIndex(Value);
		}
		return Value;
	}
	,destroy: function() {
		this.parent = null;
		this.name = null;
	}
	,update: function(elapsed) {
	}
	,clone: function(Parent) {
		return null;
	}
	,__class__: flixel_animation_FlxBaseAnimation
	,__properties__: {set_curIndex:"set_curIndex"}
};
var flixel_animation_FlxAnimation = function(Parent,Name,Frames,FrameRate,Looped,FlipX,FlipY) {
	if(FlipY == null) {
		FlipY = false;
	}
	if(FlipX == null) {
		FlipX = false;
	}
	if(Looped == null) {
		Looped = true;
	}
	if(FrameRate == null) {
		FrameRate = 0;
	}
	this._frameTimer = 0;
	this.flipY = false;
	this.flipX = false;
	this.reversed = false;
	this.looped = true;
	this.paused = true;
	this.finished = true;
	this.delay = 0;
	this.curFrame = 0;
	flixel_animation_FlxBaseAnimation.call(this,Parent,Name);
	this.set_frameRate(FrameRate);
	this.frames = Frames;
	this.looped = Looped;
	this.flipX = FlipX;
	this.flipY = FlipY;
};
$hxClasses["flixel.animation.FlxAnimation"] = flixel_animation_FlxAnimation;
flixel_animation_FlxAnimation.__name__ = ["flixel","animation","FlxAnimation"];
flixel_animation_FlxAnimation.__super__ = flixel_animation_FlxBaseAnimation;
flixel_animation_FlxAnimation.prototype = $extend(flixel_animation_FlxBaseAnimation.prototype,{
	destroy: function() {
		this.frames = null;
		this.name = null;
		flixel_animation_FlxBaseAnimation.prototype.destroy.call(this);
	}
	,play: function(Force,Reversed,Frame) {
		if(Frame == null) {
			Frame = 0;
		}
		if(Reversed == null) {
			Reversed = false;
		}
		if(Force == null) {
			Force = false;
		}
		if(!Force && !this.finished && this.reversed == Reversed) {
			this.paused = false;
			this.finished = false;
			return;
		}
		this.reversed = Reversed;
		this.paused = false;
		this._frameTimer = 0;
		this.finished = this.delay == 0;
		var maxFrameIndex = this.frames.length - 1;
		if(Frame < 0) {
			this.set_curFrame(flixel_FlxG.random["int"](0,maxFrameIndex));
		} else {
			if(Frame > maxFrameIndex) {
				Frame = maxFrameIndex;
			}
			if(this.reversed) {
				Frame = maxFrameIndex - Frame;
			}
			this.set_curFrame(Frame);
		}
		if(this.finished) {
			var _this = this.parent;
			if(_this.finishCallback != null) {
				_this.finishCallback(this.name);
			}
		}
	}
	,restart: function() {
		this.play(true,this.reversed);
	}
	,stop: function() {
		this.finished = true;
		this.paused = true;
	}
	,reset: function() {
		this.stop();
		this.set_curFrame(this.reversed ? this.frames.length - 1 : 0);
	}
	,finish: function() {
		this.stop();
		this.set_curFrame(this.reversed ? 0 : this.frames.length - 1);
	}
	,pause: function() {
		this.paused = true;
	}
	,resume: function() {
		this.paused = false;
	}
	,reverse: function() {
		this.reversed = !this.reversed;
		if(this.finished) {
			this.play(false,this.reversed);
		}
	}
	,update: function(elapsed) {
		if(this.delay == 0 || this.finished || this.paused) {
			return;
		}
		this._frameTimer += elapsed;
		while(this._frameTimer > this.delay && !this.finished) {
			this._frameTimer -= this.delay;
			if(this.reversed) {
				if(this.looped && this.curFrame == 0) {
					this.set_curFrame(this.frames.length - 1);
				} else {
					var _g = this;
					_g.set_curFrame(_g.curFrame - 1);
				}
			} else if(this.looped && this.curFrame == this.frames.length - 1) {
				this.set_curFrame(0);
			} else {
				var _g1 = this;
				_g1.set_curFrame(_g1.curFrame + 1);
			}
		}
	}
	,clone: function(Parent) {
		return new flixel_animation_FlxAnimation(Parent,this.name,this.frames,this.frameRate,this.looped,this.flipX,this.flipY);
	}
	,set_frameRate: function(value) {
		this.delay = 0;
		this.frameRate = value;
		if(value > 0) {
			this.delay = 1.0 / value;
		}
		return value;
	}
	,set_curFrame: function(Frame) {
		var maxFrameIndex = this.frames.length - 1;
		if(this.reversed) {
			Frame = maxFrameIndex - Frame;
		}
		if(Frame >= 0) {
			if(!this.looped && Frame > maxFrameIndex) {
				this.finished = true;
				this.curFrame = this.reversed ? 0 : maxFrameIndex;
			} else {
				this.curFrame = Frame;
			}
		} else {
			this.curFrame = flixel_FlxG.random["int"](0,maxFrameIndex);
		}
		this.set_curIndex(this.frames[this.curFrame]);
		if(this.finished && this.parent != null) {
			var _this = this.parent;
			if(_this.finishCallback != null) {
				_this.finishCallback(this.name);
			}
		}
		return Frame;
	}
	,get_numFrames: function() {
		return this.frames.length;
	}
	,__class__: flixel_animation_FlxAnimation
	,__properties__: $extend(flixel_animation_FlxBaseAnimation.prototype.__properties__,{get_numFrames:"get_numFrames",set_curFrame:"set_curFrame",set_frameRate:"set_frameRate"})
});
var flixel_animation_FlxAnimationController = function(Sprite) {
	this.frameIndex = -1;
	this._sprite = Sprite;
	this._animations = new haxe_ds_StringMap();
};
$hxClasses["flixel.animation.FlxAnimationController"] = flixel_animation_FlxAnimationController;
flixel_animation_FlxAnimationController.__name__ = ["flixel","animation","FlxAnimationController"];
flixel_animation_FlxAnimationController.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_animation_FlxAnimationController.prototype = {
	update: function(elapsed) {
		if(this._curAnim != null) {
			this._curAnim.update(elapsed);
		} else if(this._prerotated != null) {
			this._prerotated.set_angle(this._sprite.angle);
		}
	}
	,copyFrom: function(controller) {
		this.destroyAnimations();
		var _this = controller._animations;
		var anim = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
		while(anim.hasNext()) {
			var anim1 = anim.next();
			this.add(anim1.name,anim1.frames,anim1.frameRate,anim1.looped);
		}
		if(controller._prerotated != null) {
			this.createPrerotated();
		}
		if(controller.get_name() != null) {
			this.set_name(controller.get_name());
		}
		this.set_frameIndex(controller.frameIndex);
		return this;
	}
	,createPrerotated: function(Controller) {
		this.destroyAnimations();
		if(Controller != null) {
			Controller = Controller;
		} else {
			Controller = this;
		}
		this._prerotated = new flixel_animation_FlxPrerotatedAnimation(Controller,Controller._sprite.bakedRotationAngle);
		this._prerotated.set_angle(this._sprite.angle);
	}
	,destroyAnimations: function() {
		this.clearAnimations();
		this.clearPrerotated();
	}
	,destroy: function() {
		this.destroyAnimations();
		this._animations = null;
		this.callback = null;
		this._sprite = null;
	}
	,clearPrerotated: function() {
		if(this._prerotated != null) {
			this._prerotated.destroy();
		}
		this._prerotated = null;
	}
	,clearAnimations: function() {
		if(this._animations != null) {
			var anim;
			var key = this._animations.keys();
			while(key.hasNext()) {
				var key1 = key.next();
				var _this = this._animations;
				if(__map_reserved[key1] != null) {
					anim = _this.getReserved(key1);
				} else {
					anim = _this.h[key1];
				}
				if(anim != null) {
					anim.destroy();
				}
				this._animations.remove(key1);
			}
		}
		this._curAnim = null;
	}
	,add: function(Name,Frames,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		var framesToAdd = Frames;
		var i = Frames.length - 1;
		while(i >= 0) {
			if(framesToAdd[i] >= this._sprite.numFrames) {
				if(framesToAdd == Frames) {
					framesToAdd = Frames.slice();
				}
				framesToAdd.splice(i,1);
			}
			--i;
		}
		if(framesToAdd.length > 0) {
			var anim = new flixel_animation_FlxAnimation(this,Name,framesToAdd,FrameRate,Looped,FlipX,FlipY);
			var _this = this._animations;
			if(__map_reserved[Name] != null) {
				_this.setReserved(Name,anim);
			} else {
				_this.h[Name] = anim;
			}
		}
	}
	,remove: function(Name) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim != null) {
			this._animations.remove(Name);
			anim.destroy();
		}
	}
	,append: function(Name,Frames) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			return;
		}
		var numFrames = Frames.length - 1;
		var i = numFrames;
		while(i >= 0) {
			if(Frames[numFrames - i] < this._sprite.numFrames) {
				anim.frames.push(Frames[numFrames - i]);
			}
			--i;
		}
	}
	,addByNames: function(Name,FrameNames,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		if(this._sprite.frames != null) {
			var indices = [];
			this.byNamesHelper(indices,FrameNames);
			if(indices.length > 0) {
				var anim = new flixel_animation_FlxAnimation(this,Name,indices,FrameRate,Looped,FlipX,FlipY);
				var _this = this._animations;
				if(__map_reserved[Name] != null) {
					_this.setReserved(Name,anim);
				} else {
					_this.h[Name] = anim;
				}
			}
		}
	}
	,appendByNames: function(Name,FrameNames) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			return;
		}
		if(this._sprite.frames != null) {
			this.byNamesHelper(anim.frames,FrameNames);
		}
	}
	,addByStringIndices: function(Name,Prefix,Indices,Postfix,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		if(this._sprite.frames != null) {
			var frameIndices = [];
			this.byStringIndicesHelper(frameIndices,Prefix,Indices,Postfix);
			if(frameIndices.length > 0) {
				var anim = new flixel_animation_FlxAnimation(this,Name,frameIndices,FrameRate,Looped,FlipX,FlipY);
				var _this = this._animations;
				if(__map_reserved[Name] != null) {
					_this.setReserved(Name,anim);
				} else {
					_this.h[Name] = anim;
				}
			}
		}
	}
	,appendByStringIndices: function(Name,Prefix,Indices,Postfix) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			return;
		}
		if(this._sprite.frames != null) {
			this.byStringIndicesHelper(anim.frames,Prefix,Indices,Postfix);
		}
	}
	,addByIndices: function(Name,Prefix,Indices,Postfix,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		if(this._sprite.frames != null) {
			var frameIndices = [];
			this.byIndicesHelper(frameIndices,Prefix,Indices,Postfix);
			if(frameIndices.length > 0) {
				var anim = new flixel_animation_FlxAnimation(this,Name,frameIndices,FrameRate,Looped,FlipX,FlipY);
				var _this = this._animations;
				if(__map_reserved[Name] != null) {
					_this.setReserved(Name,anim);
				} else {
					_this.h[Name] = anim;
				}
			}
		}
	}
	,appendByIndices: function(Name,Prefix,Indices,Postfix) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			return;
		}
		if(this._sprite.frames != null) {
			this.byIndicesHelper(anim.frames,Prefix,Indices,Postfix);
		}
	}
	,findSpriteFrame: function(Prefix,Index,Postfix) {
		var numFrames = this._sprite.numFrames;
		var flxFrames = this._sprite.frames.frames;
		var _g1 = 0;
		while(_g1 < numFrames) {
			var i = _g1++;
			var name = flxFrames[i].name;
			if(StringTools.startsWith(name,Prefix) && StringTools.endsWith(name,Postfix)) {
				var index = Std.parseInt(name.substring(Prefix.length,name.length - Postfix.length));
				if(index != null && index == Index) {
					return i;
				}
			}
		}
		return -1;
	}
	,addByPrefix: function(Name,Prefix,FrameRate,Looped,FlipX,FlipY) {
		if(FlipY == null) {
			FlipY = false;
		}
		if(FlipX == null) {
			FlipX = false;
		}
		if(Looped == null) {
			Looped = true;
		}
		if(FrameRate == null) {
			FrameRate = 30;
		}
		if(this._sprite.frames != null) {
			var animFrames = [];
			this.findByPrefix(animFrames,Prefix);
			if(animFrames.length > 0) {
				var frameIndices = [];
				this.byPrefixHelper(frameIndices,animFrames,Prefix);
				if(frameIndices.length > 0) {
					var anim = new flixel_animation_FlxAnimation(this,Name,frameIndices,FrameRate,Looped,FlipX,FlipY);
					var _this = this._animations;
					if(__map_reserved[Name] != null) {
						_this.setReserved(Name,anim);
					} else {
						_this.h[Name] = anim;
					}
				}
			}
		}
	}
	,appendByPrefix: function(Name,Prefix) {
		var _this = this._animations;
		var anim = __map_reserved[Name] != null ? _this.getReserved(Name) : _this.h[Name];
		if(anim == null) {
			return;
		}
		if(this._sprite.frames != null) {
			var animFrames = [];
			this.findByPrefix(animFrames,Prefix);
			if(animFrames.length > 0) {
				this.byPrefixHelper(anim.frames,animFrames,Prefix);
			}
		}
	}
	,play: function(AnimName,Force,Reversed,Frame) {
		if(Frame == null) {
			Frame = 0;
		}
		if(Reversed == null) {
			Reversed = false;
		}
		if(Force == null) {
			Force = false;
		}
		if(AnimName == null) {
			if(this._curAnim != null) {
				this._curAnim.stop();
			}
			this._curAnim = null;
		}
		var tmp;
		if(AnimName != null) {
			var _this = this._animations;
			tmp = (__map_reserved[AnimName] != null ? _this.getReserved(AnimName) : _this.h[AnimName]) == null;
		} else {
			tmp = true;
		}
		if(tmp) {
			return;
		}
		var oldFlipX = false;
		var oldFlipY = false;
		if(this._curAnim != null && AnimName != this._curAnim.name) {
			oldFlipX = this._curAnim.flipX;
			oldFlipY = this._curAnim.flipY;
			this._curAnim.stop();
		}
		var _this1 = this._animations;
		this._curAnim = __map_reserved[AnimName] != null ? _this1.getReserved(AnimName) : _this1.h[AnimName];
		this._curAnim.play(Force,Reversed,Frame);
		if(oldFlipX != this._curAnim.flipX || oldFlipY != this._curAnim.flipY) {
			this._sprite.dirty = true;
		}
	}
	,reset: function() {
		if(this._curAnim != null) {
			this._curAnim.reset();
		}
	}
	,finish: function() {
		if(this._curAnim != null) {
			this._curAnim.finish();
		}
	}
	,stop: function() {
		if(this._curAnim != null) {
			this._curAnim.stop();
		}
	}
	,pause: function() {
		if(this._curAnim != null) {
			this._curAnim.pause();
		}
	}
	,resume: function() {
		if(this._curAnim != null) {
			this._curAnim.paused = false;
		}
	}
	,reverse: function() {
		if(this._curAnim != null) {
			this._curAnim.reverse();
		}
	}
	,getByName: function(Name) {
		var _this = this._animations;
		if(__map_reserved[Name] != null) {
			return _this.getReserved(Name);
		} else {
			return _this.h[Name];
		}
	}
	,randomFrame: function() {
		if(this._curAnim != null) {
			this._curAnim.stop();
			this._curAnim = null;
		}
		this.set_frameIndex(flixel_FlxG.random["int"](0,this._sprite.numFrames - 1));
	}
	,fireCallback: function() {
		if(this.callback != null) {
			this.callback(this._curAnim != null ? this._curAnim.name : null,this._curAnim != null ? this._curAnim.curFrame : this.frameIndex,this.frameIndex);
		}
	}
	,fireFinishCallback: function(name) {
		if(this.finishCallback != null) {
			this.finishCallback(name);
		}
	}
	,byNamesHelper: function(AddTo,FrameNames) {
		var _g = 0;
		while(_g < FrameNames.length) {
			var frameName = FrameNames[_g];
			++_g;
			var _this = this._sprite.frames.framesHash;
			if(__map_reserved[frameName] != null ? _this.existsReserved(frameName) : _this.h.hasOwnProperty(frameName)) {
				var _this1 = this._sprite.frames.framesHash;
				AddTo.push(this._sprite.frames.frames.indexOf(__map_reserved[frameName] != null ? _this1.getReserved(frameName) : _this1.h[frameName]));
			}
		}
	}
	,byStringIndicesHelper: function(AddTo,Prefix,Indices,Postfix) {
		var _g = 0;
		while(_g < Indices.length) {
			var index = Indices[_g];
			++_g;
			var name = Prefix + index + Postfix;
			var _this = this._sprite.frames.framesHash;
			if(__map_reserved[name] != null ? _this.existsReserved(name) : _this.h.hasOwnProperty(name)) {
				var _this1 = this._sprite.frames.framesHash;
				AddTo.push(this._sprite.frames.frames.indexOf(__map_reserved[name] != null ? _this1.getReserved(name) : _this1.h[name]));
			}
		}
	}
	,byIndicesHelper: function(AddTo,Prefix,Indices,Postfix) {
		var _g = 0;
		while(_g < Indices.length) {
			var index = Indices[_g];
			++_g;
			var indexToAdd = this.findSpriteFrame(Prefix,index,Postfix);
			if(indexToAdd != -1) {
				AddTo.push(indexToAdd);
			}
		}
	}
	,byPrefixHelper: function(AddTo,AnimFrames,Prefix) {
		var name = AnimFrames[0].name;
		var postIndex = name.indexOf(".",Prefix.length);
		var postFix = name.substring(postIndex == -1 ? name.length : postIndex,name.length);
		flixel_graphics_frames_FlxFrame.sort(AnimFrames,Prefix.length,postFix.length);
		var _g = 0;
		while(_g < AnimFrames.length) {
			var animFrame = AnimFrames[_g];
			++_g;
			AddTo.push(this._sprite.frames.frames.indexOf(animFrame));
		}
	}
	,findByPrefix: function(AnimFrames,Prefix) {
		var _g = 0;
		var _g1 = this._sprite.frames.frames;
		while(_g < _g1.length) {
			var frame = _g1[_g];
			++_g;
			if(frame.name != null && StringTools.startsWith(frame.name,Prefix)) {
				AnimFrames.push(frame);
			}
		}
	}
	,set_frameIndex: function(Frame) {
		if(this._sprite.frames != null) {
			Frame %= this._sprite.numFrames;
			this._sprite.set_frame(this._sprite.frames.frames[Frame]);
			this.frameIndex = Frame;
			if(this.callback != null) {
				this.callback(this._curAnim != null ? this._curAnim.name : null,this._curAnim != null ? this._curAnim.curFrame : this.frameIndex,this.frameIndex);
			}
		}
		return this.frameIndex;
	}
	,get_frameName: function() {
		return this._sprite.frame.name;
	}
	,set_frameName: function(Value) {
		var tmp;
		if(this._sprite.frames != null) {
			var _this = this._sprite.frames.framesHash;
			if(__map_reserved[Value] != null) {
				tmp = _this.existsReserved(Value);
			} else {
				tmp = _this.h.hasOwnProperty(Value);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			if(this._curAnim != null) {
				this._curAnim.stop();
				this._curAnim = null;
			}
			var _this1 = this._sprite.frames.framesHash;
			var frame = __map_reserved[Value] != null ? _this1.getReserved(Value) : _this1.h[Value];
			if(frame != null) {
				this.set_frameIndex(this._sprite.frames.frames.indexOf(frame));
			}
		}
		return Value;
	}
	,get_name: function() {
		var animName = null;
		if(this._curAnim != null) {
			animName = this._curAnim.name;
		}
		return animName;
	}
	,set_name: function(AnimName) {
		this.play(AnimName);
		return AnimName;
	}
	,get_curAnim: function() {
		return this._curAnim;
	}
	,set_curAnim: function(Anim) {
		if(Anim != this._curAnim) {
			if(this._curAnim != null) {
				this._curAnim.stop();
			}
			if(Anim != null) {
				Anim.play();
			}
		}
		return this._curAnim = Anim;
	}
	,get_paused: function() {
		var paused = false;
		if(this._curAnim != null) {
			paused = this._curAnim.paused;
		}
		return paused;
	}
	,set_paused: function(Value) {
		if(this._curAnim != null) {
			if(Value) {
				this._curAnim.pause();
			} else {
				this._curAnim.paused = false;
			}
		}
		return Value;
	}
	,get_finished: function() {
		var finished = true;
		if(this._curAnim != null) {
			finished = this._curAnim.finished;
		}
		return finished;
	}
	,set_finished: function(Value) {
		if(Value && this._curAnim != null) {
			this._curAnim.finish();
		}
		return Value;
	}
	,get_frames: function() {
		return this._sprite.numFrames;
	}
	,getFrameIndex: function(Frame) {
		return this._sprite.frames.frames.indexOf(Frame);
	}
	,__class__: flixel_animation_FlxAnimationController
	,__properties__: {get_frames:"get_frames",set_finished:"set_finished",get_finished:"get_finished",set_paused:"set_paused",get_paused:"get_paused",set_name:"set_name",get_name:"get_name",set_frameName:"set_frameName",get_frameName:"get_frameName",set_frameIndex:"set_frameIndex",set_curAnim:"set_curAnim",get_curAnim:"get_curAnim"}
};
var flixel_animation_FlxPrerotatedAnimation = function(Parent,Baked) {
	this.angle = 0;
	flixel_animation_FlxBaseAnimation.call(this,Parent,"prerotated_animation");
	this.baked = Baked;
	this.rotations = Math.round(360 / Baked);
};
$hxClasses["flixel.animation.FlxPrerotatedAnimation"] = flixel_animation_FlxPrerotatedAnimation;
flixel_animation_FlxPrerotatedAnimation.__name__ = ["flixel","animation","FlxPrerotatedAnimation"];
flixel_animation_FlxPrerotatedAnimation.__super__ = flixel_animation_FlxBaseAnimation;
flixel_animation_FlxPrerotatedAnimation.prototype = $extend(flixel_animation_FlxBaseAnimation.prototype,{
	set_angle: function(Value) {
		var oldIndex = this.curIndex;
		var angleHelper = Math.floor(Value % 360);
		while(angleHelper < 0) angleHelper += 360;
		var newIndex = Math.floor(angleHelper / this.baked + 0.5);
		newIndex = newIndex % this.rotations | 0;
		if(oldIndex != newIndex) {
			this.set_curIndex(newIndex);
		}
		return this.angle = Value;
	}
	,set_curIndex: function(Value) {
		this.curIndex = Value;
		if(this.parent != null) {
			this.parent.set_frameIndex(Value);
		}
		return Value;
	}
	,clone: function(Parent) {
		return new flixel_animation_FlxPrerotatedAnimation(Parent,this.baked);
	}
	,__class__: flixel_animation_FlxPrerotatedAnimation
	,__properties__: $extend(flixel_animation_FlxBaseAnimation.prototype.__properties__,{set_angle:"set_angle"})
});
var flixel_util_FlxPool_$flixel_$effects_$FlxFlicker = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_effects_FlxFlicker"] = flixel_util_FlxPool_$flixel_$effects_$FlxFlicker;
flixel_util_FlxPool_$flixel_$effects_$FlxFlicker.__name__ = ["flixel","util","FlxPool_flixel_effects_FlxFlicker"];
flixel_util_FlxPool_$flixel_$effects_$FlxFlicker.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$effects_$FlxFlicker.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$effects_$FlxFlicker
	,__properties__: {get_length:"get_length"}
};
var flixel_effects_FlxFlicker = function() {
};
$hxClasses["flixel.effects.FlxFlicker"] = flixel_effects_FlxFlicker;
flixel_effects_FlxFlicker.__name__ = ["flixel","effects","FlxFlicker"];
flixel_effects_FlxFlicker.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_effects_FlxFlicker.flicker = function(Object,Duration,Interval,EndVisibility,ForceRestart,CompletionCallback,ProgressCallback) {
	if(ForceRestart == null) {
		ForceRestart = true;
	}
	if(EndVisibility == null) {
		EndVisibility = true;
	}
	if(Interval == null) {
		Interval = 0.04;
	}
	if(Duration == null) {
		Duration = 1;
	}
	if(flixel_effects_FlxFlicker.isFlickering(Object)) {
		if(ForceRestart) {
			flixel_effects_FlxFlicker.stopFlickering(Object);
		} else {
			return flixel_effects_FlxFlicker._boundObjects.h[Object.__id__];
		}
	}
	if(Interval <= 0) {
		Interval = flixel_FlxG.elapsed;
	}
	var flicker = flixel_effects_FlxFlicker._pool.get();
	flicker.start(Object,Duration,Interval,EndVisibility,CompletionCallback,ProgressCallback);
	flixel_effects_FlxFlicker._boundObjects.set(Object,flicker);
	return flicker;
};
flixel_effects_FlxFlicker.isFlickering = function(Object) {
	return flixel_effects_FlxFlicker._boundObjects.h.__keys__[Object.__id__] != null;
};
flixel_effects_FlxFlicker.stopFlickering = function(Object) {
	var boundFlicker = flixel_effects_FlxFlicker._boundObjects.h[Object.__id__];
	if(boundFlicker != null) {
		boundFlicker.stop();
	}
};
flixel_effects_FlxFlicker.prototype = {
	destroy: function() {
		this.object = null;
		this.timer = null;
		this.completionCallback = null;
		this.progressCallback = null;
	}
	,start: function(Object,Duration,Interval,EndVisibility,CompletionCallback,ProgressCallback) {
		this.object = Object;
		this.duration = Duration;
		this.interval = Interval;
		this.completionCallback = CompletionCallback;
		this.progressCallback = ProgressCallback;
		this.endVisibility = EndVisibility;
		this.timer = new flixel_util_FlxTimer().start(this.interval,$bind(this,this.flickerProgress),this.duration / this.interval | 0);
	}
	,stop: function() {
		this.timer.cancel();
		this.object.set_visible(true);
		this.release();
	}
	,release: function() {
		flixel_effects_FlxFlicker._boundObjects.remove(this.object);
		flixel_effects_FlxFlicker._pool.put(this);
	}
	,flickerProgress: function(Timer) {
		this.object.set_visible(!this.object.visible);
		if(this.progressCallback != null) {
			this.progressCallback(this);
		}
		if(Timer.loops > 0 && Timer.loops - Timer._loopsCounter == 0) {
			this.object.set_visible(this.endVisibility);
			if(this.completionCallback != null) {
				this.completionCallback(this);
			}
			this.release();
		}
	}
	,__class__: flixel_effects_FlxFlicker
};
var flixel_effects_postprocess_PostProcess = function(shader) {
};
$hxClasses["flixel.effects.postprocess.PostProcess"] = flixel_effects_postprocess_PostProcess;
flixel_effects_postprocess_PostProcess.__name__ = ["flixel","effects","postprocess","PostProcess"];
flixel_effects_postprocess_PostProcess.prototype = {
	enable: function(to) {
	}
	,capture: function() {
	}
	,rebuild: function() {
	}
	,update: function(elapsed) {
	}
	,render: function(rect) {
	}
	,setUniform: function(uniform,value) {
	}
	,set_to: function(value) {
		return null;
	}
	,__class__: flixel_effects_postprocess_PostProcess
	,__properties__: {set_to:"set_to"}
};
var flixel_graphics_FlxGraphic = function(Key,Bitmap,Persist) {
	this._destroyOnNoUse = true;
	this._useCount = 0;
	this.unique = false;
	this.isDumped = false;
	this.persist = false;
	this.height = 0;
	this.width = 0;
	this.key = Key;
	this.persist = Persist != null ? Persist : flixel_graphics_FlxGraphic.defaultPersist;
	this.frameCollections = new haxe_ds_EnumValueMap();
	this.frameCollectionTypes = [];
	this.set_bitmap(Bitmap);
};
$hxClasses["flixel.graphics.FlxGraphic"] = flixel_graphics_FlxGraphic;
flixel_graphics_FlxGraphic.__name__ = ["flixel","graphics","FlxGraphic"];
flixel_graphics_FlxGraphic.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_FlxGraphic.fromAssetKey = function(Source,Unique,Key,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	var bitmap = null;
	if(!Cache) {
		if(openfl_Assets.exists(Source)) {
			bitmap = openfl_Assets.getBitmapData(Source,false);
		} else {
			bitmap = null;
		}
		if(bitmap == null) {
			return null;
		}
		return flixel_graphics_FlxGraphic.createGraphic(bitmap,Key,Unique,Cache);
	}
	var key = flixel_FlxG.bitmap.generateKey(Source,Key,Unique);
	var graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	if(openfl_Assets.exists(Source)) {
		bitmap = openfl_Assets.getBitmapData(Source,false);
	} else {
		bitmap = null;
	}
	if(bitmap == null) {
		return null;
	}
	graphic = flixel_graphics_FlxGraphic.createGraphic(bitmap,key,Unique);
	graphic.assetsKey = Source;
	return graphic;
};
flixel_graphics_FlxGraphic.fromClass = function(Source,Unique,Key,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	var bitmap = null;
	if(!Cache) {
		bitmap = Type.createInstance(Source,[0,0]);
		return flixel_graphics_FlxGraphic.createGraphic(bitmap,Key,Unique,Cache);
	}
	var key = Type.getClassName(Source);
	key = flixel_FlxG.bitmap.generateKey(key,Key,Unique);
	var graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	bitmap = Type.createInstance(Source,[0,0]);
	graphic = flixel_graphics_FlxGraphic.createGraphic(bitmap,key,Unique);
	graphic.assetsClass = Source;
	return graphic;
};
flixel_graphics_FlxGraphic.fromBitmapData = function(Source,Unique,Key,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	if(!Cache) {
		return flixel_graphics_FlxGraphic.createGraphic(Source,Key,Unique,Cache);
	}
	var key = flixel_FlxG.bitmap.findKeyForBitmap(Source);
	var assetKey = null;
	var assetClass = null;
	var graphic = null;
	if(key != null) {
		graphic = flixel_FlxG.bitmap._cache.get(key);
		assetKey = graphic.assetsKey;
		assetClass = graphic.assetsClass;
	}
	key = flixel_FlxG.bitmap.generateKey(key,Key,Unique);
	graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	graphic = flixel_graphics_FlxGraphic.createGraphic(Source,key,Unique);
	graphic.assetsKey = assetKey;
	graphic.assetsClass = assetClass;
	return graphic;
};
flixel_graphics_FlxGraphic.fromFrame = function(Source,Unique,Key,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	var key = Source.name;
	if(key == null) {
		var _this = Source.frame;
		var value = _this.x;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "x";
		_this1.value = value;
		var value1 = _this.y;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "y";
		_this2.value = value1;
		var value2 = _this.width;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "w";
		_this3.value = value2;
		var value3 = _this.height;
		var _this4 = flixel_util_LabelValuePair._pool.get();
		_this4.label = "h";
		_this4.value = value3;
		key = flixel_util_FlxStringUtil.getDebugString([_this1,_this2,_this3,_this4]);
	}
	key = Source.parent.key + ":" + key;
	key = flixel_FlxG.bitmap.generateKey(key,Key,Unique);
	var graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	graphic = flixel_graphics_FlxGraphic.createGraphic(Source.paint(),key,Unique,Cache);
	flixel_graphics_frames_FlxImageFrame.fromGraphic(graphic).frames[0].name = Source.name;
	return graphic;
};
flixel_graphics_FlxGraphic.fromFrames = function(Source,Unique,Key) {
	if(Unique == null) {
		Unique = false;
	}
	return flixel_graphics_FlxGraphic.fromGraphic(Source.parent,Unique,Key);
};
flixel_graphics_FlxGraphic.fromGraphic = function(Source,Unique,Key) {
	if(Unique == null) {
		Unique = false;
	}
	if(!Unique) {
		return Source;
	}
	var key = flixel_FlxG.bitmap.generateKey(Source.key,Key,Unique);
	var graphic = flixel_graphics_FlxGraphic.createGraphic(Source.bitmap,key,Unique);
	graphic.unique = Unique;
	graphic.assetsClass = Source.assetsClass;
	graphic.assetsKey = Source.assetsKey;
	flixel_FlxG.bitmap._cache.set(graphic.key,graphic);
	return graphic;
};
flixel_graphics_FlxGraphic.fromRectangle = function(Width,Height,Color,Unique,Key) {
	if(Unique == null) {
		Unique = false;
	}
	var key = flixel_FlxG.bitmap.generateKey(Width + "x" + Height + ":" + Color,Key,Unique);
	var graphic = flixel_FlxG.bitmap._cache.get(key);
	if(graphic != null) {
		return graphic;
	}
	return flixel_graphics_FlxGraphic.createGraphic(new openfl_display_BitmapData(Width,Height,true,Color),key);
};
flixel_graphics_FlxGraphic.getBitmap = function(Bitmap,Unique) {
	if(Unique == null) {
		Unique = false;
	}
	if(Unique) {
		return Bitmap.clone();
	} else {
		return Bitmap;
	}
};
flixel_graphics_FlxGraphic.createGraphic = function(Bitmap,Key,Unique,Cache) {
	if(Cache == null) {
		Cache = true;
	}
	if(Unique == null) {
		Unique = false;
	}
	if(Unique) {
		Bitmap = Bitmap.clone();
	} else {
		Bitmap = Bitmap;
	}
	var graphic = null;
	if(Cache) {
		graphic = new flixel_graphics_FlxGraphic(Key,Bitmap);
		graphic.unique = Unique;
		flixel_FlxG.bitmap._cache.set(graphic.key,graphic);
	} else {
		graphic = new flixel_graphics_FlxGraphic(null,Bitmap);
	}
	return graphic;
};
flixel_graphics_FlxGraphic.prototype = {
	dump: function() {
	}
	,undump: function() {
		var newBitmap = this.getBitmapFromSystem();
		if(newBitmap != null) {
			this.set_bitmap(newBitmap);
		}
		this.isDumped = false;
	}
	,onContext: function() {
		if(this.isDumped) {
			this.undump();
		}
	}
	,onAssetsReload: function() {
		if(!(this.assetsClass != null || this.assetsKey != null)) {
			return;
		}
		this.undump();
	}
	,destroy: function() {
		this.set_bitmap(flixel_util_FlxDestroyUtil.dispose(this.bitmap));
		if(flixel_FlxG.renderTile) {
			this._tilesheet = null;
		}
		this.key = null;
		this.assetsKey = null;
		this.assetsClass = null;
		this._imageFrame = null;
		var collections;
		var _g = 0;
		var _g1 = this.frameCollectionTypes;
		while(_g < _g1.length) {
			var collectionType = _g1[_g];
			++_g;
			collections = this.frameCollections.get(collectionType);
			flixel_util_FlxDestroyUtil.destroyArray(collections);
		}
		this.frameCollections = null;
		this.frameCollectionTypes = null;
	}
	,addFrameCollection: function(collection) {
		if(collection.type != null) {
			var type = collection.type;
			var collections = this.frameCollections.get(type);
			if(collections == null) {
				collections = [];
				this.frameCollections.set(type,collections);
			}
			collections.push(collection);
		}
	}
	,getFramesCollections: function(type) {
		var collections = this.frameCollections.get(type);
		if(collections == null) {
			collections = [];
			this.frameCollections.set(type,collections);
		}
		return collections;
	}
	,getEmptyFrame: function(size) {
		var frame = new flixel_graphics_frames_FlxFrame(this);
		frame.type = 2;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = 0;
		_this.height = 0;
		_this._inPool = false;
		frame.set_frame(_this);
		var _this1 = frame.sourceSize;
		_this1.set_x(size.x);
		_this1.set_y(size.y);
		if(size._weak) {
			size.put();
		}
		return frame;
	}
	,get_tilesheet: function() {
		if(this._tilesheet == null) {
			if(this.isDumped) {
				this.undump();
			}
			this._tilesheet = new openfl_display_Tilesheet(this.bitmap);
		}
		return this._tilesheet;
	}
	,getBitmapFromSystem: function() {
		var newBitmap = null;
		if(this.assetsClass != null) {
			newBitmap = Type.createInstance(this.assetsClass,[0,0]);
		} else if(this.assetsKey != null) {
			var id = this.assetsKey;
			if(openfl_Assets.exists(id)) {
				newBitmap = openfl_Assets.getBitmapData(id,false);
			} else {
				newBitmap = null;
			}
		}
		if(newBitmap != null) {
			if(this.unique) {
				return newBitmap.clone();
			} else {
				return newBitmap;
			}
		}
		return null;
	}
	,get_canBeDumped: function() {
		if(this.assetsClass == null) {
			return this.assetsKey != null;
		} else {
			return true;
		}
	}
	,get_useCount: function() {
		return this._useCount;
	}
	,set_useCount: function(Value) {
		if(Value <= 0 && this._destroyOnNoUse && !this.persist) {
			flixel_FlxG.bitmap.remove(this);
		}
		return this._useCount = Value;
	}
	,get_destroyOnNoUse: function() {
		return this._destroyOnNoUse;
	}
	,set_destroyOnNoUse: function(Value) {
		if(Value && this._useCount <= 0 && this.key != null && !this.persist) {
			flixel_FlxG.bitmap.remove(this);
		}
		return this._destroyOnNoUse = Value;
	}
	,get_imageFrame: function() {
		if(this._imageFrame == null) {
			var Width = this.bitmap.width;
			var Height = this.bitmap.height;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = Width;
			_this.height = Height;
			_this._inPool = false;
			this._imageFrame = flixel_graphics_frames_FlxImageFrame.fromRectangle(this,_this);
		}
		return this._imageFrame;
	}
	,get_atlasFrames: function() {
		return flixel_graphics_frames_FlxAtlasFrames.findFrame(this,null);
	}
	,set_bitmap: function(value) {
		if(value != null) {
			this.bitmap = value;
			this.width = this.bitmap.width;
			this.height = this.bitmap.height;
			if(flixel_FlxG.renderTile && this._tilesheet != null) {
				this._tilesheet = new openfl_display_Tilesheet(this.bitmap);
			}
		}
		return value;
	}
	,__class__: flixel_graphics_FlxGraphic
	,__properties__: {get_atlasFrames:"get_atlasFrames",get_imageFrame:"get_imageFrame",set_useCount:"set_useCount",get_useCount:"get_useCount",get_tilesheet:"get_tilesheet",get_canBeDumped:"get_canBeDumped",set_destroyOnNoUse:"set_destroyOnNoUse",get_destroyOnNoUse:"get_destroyOnNoUse",set_bitmap:"set_bitmap"}
};
var flixel_graphics_atlas_FlxAtlas = function(name,powerOfTwo,border,rotate,minSize,maxSize) {
	if(rotate == null) {
		rotate = false;
	}
	if(border == null) {
		border = 1;
	}
	if(powerOfTwo == null) {
		powerOfTwo = false;
	}
	this.powerOfTwo = false;
	this.allowRotation = false;
	this.maxHeight = 1024;
	this.maxWidth = 1024;
	this.minHeight = 128;
	this.minWidth = 128;
	this.border = 1;
	this.persist = false;
	this.nodes = new haxe_ds_StringMap();
	this.name = name;
	this.set_powerOfTwo(powerOfTwo);
	this.border = border;
	if(minSize != null) {
		minSize = minSize;
	} else {
		minSize = flixel_graphics_atlas_FlxAtlas.defaultMinSize;
	}
	if(maxSize != null) {
		maxSize = maxSize;
	} else {
		maxSize = flixel_graphics_atlas_FlxAtlas.defaultMaxSize;
	}
	this.set_minWidth(minSize.x | 0);
	this.set_minHeight(minSize.y | 0);
	this.set_maxWidth(maxSize.x > minSize.x ? maxSize.x | 0 : this.minWidth);
	this.set_maxHeight(maxSize.y > minSize.x ? maxSize.y | 0 : this.minHeight);
	this.allowRotation = rotate;
	this.initRoot();
	flixel_FlxG.signals.preStateCreate.add($bind(this,this.onClear));
};
$hxClasses["flixel.graphics.atlas.FlxAtlas"] = flixel_graphics_atlas_FlxAtlas;
flixel_graphics_atlas_FlxAtlas.__name__ = ["flixel","graphics","atlas","FlxAtlas"];
flixel_graphics_atlas_FlxAtlas.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_atlas_FlxAtlas.prototype = {
	initRoot: function() {
		var rootWidth = this.minWidth;
		var rootHeight = this.minHeight;
		if(this.powerOfTwo) {
			rootWidth = this.getNextPowerOfTwo(rootWidth);
			rootHeight = this.getNextPowerOfTwo(rootHeight);
		}
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = rootWidth;
		_this.height = rootHeight;
		_this._inPool = false;
		this.root = new flixel_graphics_atlas_FlxNode(_this,this);
	}
	,addNode: function(Graphic,Key) {
		var key = flixel_system_FlxAssets.resolveKey(Graphic,Key);
		if(key == null) {
			return null;
		}
		if(this.hasNodeWithName(key)) {
			var _this = this.nodes;
			if(__map_reserved[key] != null) {
				return _this.getReserved(key);
			} else {
				return _this.h[key];
			}
		}
		var data = flixel_system_FlxAssets.resolveBitmapData(Graphic);
		if(data == null) {
			return null;
		}
		if(this.root.left == null) {
			return this.insertFirstNodeInRoot(data,key);
		}
		if(this.root.right == null) {
			return this.expand(data,key);
		}
		var inserted = this.tryInsert(data,key);
		if(inserted != null) {
			return inserted;
		}
		this.wrapRoot();
		return this.expand(data,key);
	}
	,wrapRoot: function() {
		var temp = this.root;
		var Width = temp.rect.width | 0;
		var Height = temp.rect.height | 0;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = Width;
		_this.height = Height;
		_this._inPool = false;
		this.root = new flixel_graphics_atlas_FlxNode(_this,this);
		this.root.left = temp;
	}
	,tryInsert: function(data,key) {
		var insertWidth = data.width + this.border;
		var insertHeight = data.height + this.border;
		var rotateNode = false;
		var nodeToInsert = this.findNodeToInsert(insertWidth,insertHeight);
		if(this.allowRotation) {
			var nodeToInsertWithRotation = this.findNodeToInsert(insertHeight,insertWidth);
			if(nodeToInsertWithRotation != null) {
				if(nodeToInsert == null || nodeToInsert != null && (nodeToInsert.rect.width | 0) * (nodeToInsert.rect.height | 0) > (nodeToInsertWithRotation.rect.width | 0) * (nodeToInsertWithRotation.rect.height | 0)) {
					nodeToInsert = nodeToInsertWithRotation;
					rotateNode = true;
					var temp = insertWidth;
					insertWidth = insertHeight;
					insertHeight = temp;
				}
			}
		}
		if(nodeToInsert != null) {
			return this.divideNode(nodeToInsert,insertWidth,insertHeight,this.needToDivideHorizontally(nodeToInsert,insertWidth,insertHeight),data,key,rotateNode);
		}
		return null;
	}
	,needToDivideHorizontally: function(nodeToDivide,insertWidth,insertHeight) {
		return (nodeToDivide.rect.width | 0) - insertWidth > (nodeToDivide.rect.height | 0) - insertHeight;
	}
	,divideNode: function(nodeToDivide,insertWidth,insertHeight,divideHorizontally,firstGrandChildData,firstGrandChildKey,firstGrandChildRotated) {
		if(firstGrandChildRotated == null) {
			firstGrandChildRotated = false;
		}
		if(nodeToDivide != null) {
			var firstChild = null;
			var secondChild = null;
			var firstGrandChild = null;
			var secondGrandChild = null;
			var firstGrandChildFilled = firstGrandChildKey != null;
			if(divideHorizontally) {
				var X = nodeToDivide.rect.x | 0;
				var Y = nodeToDivide.rect.y | 0;
				var Height = nodeToDivide.rect.height | 0;
				var _this = flixel_math_FlxRect._pool.get();
				_this.x = X;
				_this.y = Y;
				_this.width = insertWidth;
				_this.height = Height;
				_this._inPool = false;
				firstChild = new flixel_graphics_atlas_FlxNode(_this,this);
				if((nodeToDivide.rect.width | 0) - insertWidth > 0) {
					var X1 = (nodeToDivide.rect.x | 0) + insertWidth;
					var Y1 = nodeToDivide.rect.y | 0;
					var Width = (nodeToDivide.rect.width | 0) - insertWidth;
					var Height1 = nodeToDivide.rect.height | 0;
					var _this1 = flixel_math_FlxRect._pool.get();
					_this1.x = X1;
					_this1.y = Y1;
					_this1.width = Width;
					_this1.height = Height1;
					_this1._inPool = false;
					secondChild = new flixel_graphics_atlas_FlxNode(_this1,this);
				}
				var X2 = firstChild.rect.x | 0;
				var Y2 = firstChild.rect.y | 0;
				var _this2 = flixel_math_FlxRect._pool.get();
				_this2.x = X2;
				_this2.y = Y2;
				_this2.width = insertWidth;
				_this2.height = insertHeight;
				_this2._inPool = false;
				firstGrandChild = new flixel_graphics_atlas_FlxNode(_this2,this,firstGrandChildFilled,firstGrandChildKey,firstGrandChildRotated);
				if((firstChild.rect.height | 0) - insertHeight > 0) {
					var X3 = firstChild.rect.x | 0;
					var Y3 = (firstChild.rect.y | 0) + insertHeight;
					var Height2 = (firstChild.rect.height | 0) - insertHeight;
					var _this3 = flixel_math_FlxRect._pool.get();
					_this3.x = X3;
					_this3.y = Y3;
					_this3.width = insertWidth;
					_this3.height = Height2;
					_this3._inPool = false;
					secondGrandChild = new flixel_graphics_atlas_FlxNode(_this3,this);
				}
			} else {
				var X4 = nodeToDivide.rect.x | 0;
				var Y4 = nodeToDivide.rect.y | 0;
				var Width1 = nodeToDivide.rect.width | 0;
				var _this4 = flixel_math_FlxRect._pool.get();
				_this4.x = X4;
				_this4.y = Y4;
				_this4.width = Width1;
				_this4.height = insertHeight;
				_this4._inPool = false;
				firstChild = new flixel_graphics_atlas_FlxNode(_this4,this);
				if((nodeToDivide.rect.height | 0) - insertHeight > 0) {
					var X5 = nodeToDivide.rect.x | 0;
					var Y5 = (nodeToDivide.rect.y | 0) + insertHeight;
					var Width2 = nodeToDivide.rect.width | 0;
					var Height3 = (nodeToDivide.rect.height | 0) - insertHeight;
					var _this5 = flixel_math_FlxRect._pool.get();
					_this5.x = X5;
					_this5.y = Y5;
					_this5.width = Width2;
					_this5.height = Height3;
					_this5._inPool = false;
					secondChild = new flixel_graphics_atlas_FlxNode(_this5,this);
				}
				var X6 = firstChild.rect.x | 0;
				var Y6 = firstChild.rect.y | 0;
				var _this6 = flixel_math_FlxRect._pool.get();
				_this6.x = X6;
				_this6.y = Y6;
				_this6.width = insertWidth;
				_this6.height = insertHeight;
				_this6._inPool = false;
				firstGrandChild = new flixel_graphics_atlas_FlxNode(_this6,this,firstGrandChildFilled,firstGrandChildKey,firstGrandChildRotated);
				if((firstChild.rect.width | 0) - insertWidth > 0) {
					var X7 = (firstChild.rect.x | 0) + insertWidth;
					var Y7 = firstChild.rect.y | 0;
					var Width3 = (firstChild.rect.width | 0) - insertWidth;
					var _this7 = flixel_math_FlxRect._pool.get();
					_this7.x = X7;
					_this7.y = Y7;
					_this7.width = Width3;
					_this7.height = insertHeight;
					_this7._inPool = false;
					secondGrandChild = new flixel_graphics_atlas_FlxNode(_this7,this);
				}
			}
			firstChild.left = firstGrandChild;
			firstChild.right = secondGrandChild;
			nodeToDivide.left = firstChild;
			nodeToDivide.right = secondChild;
			if(firstGrandChildKey != null && firstGrandChildData != null) {
				this.expandBitmapData();
				if(firstGrandChildRotated) {
					flixel_graphics_atlas_FlxAtlas.matrix.identity();
					flixel_graphics_atlas_FlxAtlas.matrix.rotate(Math.PI / 2);
					flixel_graphics_atlas_FlxAtlas.matrix.translate(firstGrandChildData.height + (firstGrandChild.rect.x | 0),firstGrandChild.rect.y | 0);
					this.bitmapData.draw(firstGrandChildData,flixel_graphics_atlas_FlxAtlas.matrix);
				} else {
					flixel_graphics_atlas_FlxAtlas.point.setTo(firstGrandChild.rect.x | 0,firstGrandChild.rect.y | 0);
					this.bitmapData.copyPixels(firstGrandChildData,firstGrandChildData.rect,flixel_graphics_atlas_FlxAtlas.point);
				}
				this.addNodeToAtlasFrames(firstGrandChild);
				var _this8 = this.nodes;
				if(__map_reserved[firstGrandChildKey] != null) {
					_this8.setReserved(firstGrandChildKey,firstGrandChild);
				} else {
					_this8.h[firstGrandChildKey] = firstGrandChild;
				}
			}
			return firstGrandChild;
		}
		return null;
	}
	,insertFirstNodeInRoot: function(data,key) {
		if(this.root.left == null) {
			var insertWidth = data.width + this.border;
			var insertHeight = data.height + this.border;
			var rootWidth = insertWidth;
			var rootHeight = insertHeight;
			if(this.powerOfTwo) {
				rootWidth = this.getNextPowerOfTwo(insertWidth);
				rootHeight = this.getNextPowerOfTwo(insertHeight);
			}
			if(this.minWidth > rootWidth) {
				rootWidth = this.minWidth;
			} else {
				rootWidth = rootWidth;
			}
			if(this.minHeight > rootHeight) {
				rootHeight = this.minHeight;
			} else {
				rootHeight = rootHeight;
			}
			if(this.powerOfTwo) {
				rootWidth = this.getNextPowerOfTwo(rootWidth);
				rootHeight = this.getNextPowerOfTwo(rootHeight);
			}
			if(this.maxWidth > 0 && rootWidth > this.maxWidth || this.maxHeight > 0 && rootHeight > this.maxHeight) {
				return null;
			}
			this.root.set_width(rootWidth);
			this.root.set_height(rootHeight);
			return this.divideNode(this.root,insertWidth,insertHeight,this.needToDivideHorizontally(this.root,insertWidth,insertHeight),data,key);
		}
		return null;
	}
	,expand: function(data,key) {
		if(this.root.right == null) {
			var insertWidth = data.width + this.border;
			var insertHeight = data.height + this.border;
			var addRightWidth = (this.root.rect.width | 0) + insertWidth;
			var addRightHeight = Math.max(this.root.rect.height | 0,insertHeight) | 0;
			var addBottomWidth = Math.max(this.root.rect.width | 0,insertWidth) | 0;
			var addBottomHeight = (this.root.rect.height | 0) + insertHeight;
			var addRightWidthRotate = addRightWidth;
			var addRightHeightRotate = addRightHeight;
			var addBottomWidthRotate = addBottomWidth;
			var addBottomHeightRotate = addBottomHeight;
			if(this.allowRotation) {
				addRightWidthRotate = (this.root.rect.width | 0) + insertHeight;
				addRightHeightRotate = Math.max(this.root.rect.height | 0,insertWidth) | 0;
				addBottomWidthRotate = Math.max(this.root.rect.width | 0,insertHeight) | 0;
				addBottomHeightRotate = (this.root.rect.height | 0) + insertWidth;
			}
			if(this.powerOfTwo) {
				addRightWidth = this.getNextPowerOfTwo(addRightWidth);
				addRightWidthRotate = addRightWidth;
				addRightHeight = this.getNextPowerOfTwo(addRightHeight);
				addRightHeightRotate = addRightHeight;
				addBottomWidth = this.getNextPowerOfTwo(addBottomWidth);
				addBottomWidthRotate = addBottomWidth;
				addBottomHeight = this.getNextPowerOfTwo(addBottomHeight);
				addBottomHeightRotate = addBottomHeight;
				if(this.allowRotation) {
					addRightWidthRotate = this.getNextPowerOfTwo(addRightWidthRotate);
					addRightHeightRotate = this.getNextPowerOfTwo(addRightHeightRotate);
					addBottomWidthRotate = this.getNextPowerOfTwo(addBottomWidthRotate);
					addBottomHeightRotate = this.getNextPowerOfTwo(addBottomHeightRotate);
				}
			}
			var canExpandRight = true;
			var canExpandBottom = true;
			var canExpandRightRotate = this.allowRotation;
			var canExpandBottomRotate = this.allowRotation;
			if(this.maxWidth > 0 && addRightWidth > this.maxWidth || this.maxHeight > 0 && addRightHeight > this.maxHeight) {
				canExpandRight = false;
			}
			if(this.maxWidth > 0 && addBottomWidth > this.maxWidth || this.maxHeight > 0 && addBottomHeight > this.maxHeight) {
				canExpandBottom = false;
			}
			if(this.maxWidth > 0 && addRightWidthRotate > this.maxWidth || this.maxHeight > 0 && addRightHeightRotate > this.maxHeight) {
				canExpandRightRotate = false;
			}
			if(this.maxWidth > 0 && addBottomWidthRotate > this.maxWidth || this.maxHeight > 0 && addBottomHeightRotate > this.maxHeight) {
				canExpandBottomRotate = false;
			}
			if(!canExpandRight && !canExpandBottom && !canExpandRightRotate && !canExpandBottomRotate) {
				return null;
			}
			var addRightArea = addRightWidth * addRightHeight;
			var addBottomArea = addBottomWidth * addBottomHeight;
			var addBottomAreaRotate = addBottomWidthRotate * addBottomHeightRotate;
			var rotateRight = false;
			var rotateBottom = false;
			if(canExpandRight && canExpandRightRotate && addRightArea > addRightWidthRotate * addRightHeightRotate || !canExpandRight && canExpandRightRotate) {
				addRightArea = addBottomAreaRotate;
				addRightWidth = addRightWidthRotate;
				addRightHeight = addRightHeightRotate;
				canExpandRight = true;
				rotateRight = true;
			}
			if(canExpandBottom && canExpandBottomRotate && addBottomArea > addBottomAreaRotate || !canExpandBottom && canExpandBottomRotate) {
				addBottomArea = addBottomAreaRotate;
				addBottomWidth = addBottomWidthRotate;
				addBottomHeight = addBottomHeightRotate;
				canExpandBottom = true;
				rotateBottom = true;
			}
			if(!canExpandRight && canExpandBottom) {
				addRightArea = addBottomArea + 1;
			} else if(canExpandRight && !canExpandBottom) {
				addBottomArea = addRightArea + 1;
			}
			var dataNode = null;
			var temp = this.root;
			var insertNodeWidth = insertWidth;
			var insertNodeHeight = insertHeight;
			if(addBottomArea >= addRightArea) {
				if(rotateRight) {
					insertNodeWidth = insertHeight;
					insertNodeHeight = insertWidth;
				}
				this.expandRoot((temp.rect.width | 0) + insertNodeWidth,Math.max(temp.rect.height | 0,insertNodeHeight),true);
				dataNode = this.divideNode(this.root.right,insertNodeWidth,insertNodeHeight,true,data,key,rotateRight);
				this.expandRoot(addRightWidth,addRightHeight,false,true);
			} else {
				if(rotateBottom) {
					insertNodeWidth = insertHeight;
					insertNodeHeight = insertWidth;
				}
				this.expandRoot(Math.max(temp.rect.width | 0,insertNodeWidth),(temp.rect.height | 0) + insertNodeHeight,false);
				dataNode = this.divideNode(this.root.right,insertNodeWidth,insertNodeHeight,true,data,key,rotateBottom);
				this.expandRoot(addBottomWidth,addBottomHeight,false,true);
			}
			return dataNode;
		}
		return null;
	}
	,expandRoot: function(newWidth,newHeight,divideHorizontally,decideHowToDivide) {
		if(decideHowToDivide == null) {
			decideHowToDivide = false;
		}
		if(newWidth > (this.root.rect.width | 0) || newHeight > (this.root.rect.height | 0)) {
			var temp = this.root;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = newWidth;
			_this.height = newHeight;
			_this._inPool = false;
			this.root = new flixel_graphics_atlas_FlxNode(_this,this);
			if(decideHowToDivide) {
				divideHorizontally = this.needToDivideHorizontally(this.root,temp.rect.width | 0,temp.rect.height | 0);
			} else {
				divideHorizontally = divideHorizontally;
			}
			this.divideNode(this.root,temp.rect.width | 0,temp.rect.height | 0,divideHorizontally);
			this.root.left.left = temp;
		}
	}
	,expandBitmapData: function() {
		if(this.bitmapData != null && this.bitmapData.width == (this.root.rect.width | 0) && this.bitmapData.height == (this.root.rect.height | 0)) {
			return;
		}
		var newBitmapData = new openfl_display_BitmapData(this.root.rect.width | 0,this.root.rect.height | 0,true,0);
		if(this.bitmapData != null) {
			flixel_graphics_atlas_FlxAtlas.point.setTo(0,0);
			newBitmapData.copyPixels(this.bitmapData,this.bitmapData.rect,flixel_graphics_atlas_FlxAtlas.point);
		}
		this.set_bitmapData(flixel_util_FlxDestroyUtil.dispose(this.bitmapData));
		this.set_bitmapData(newBitmapData);
	}
	,getNextPowerOfTwo: function(number) {
		var n = number | 0;
		if(n > 0 && (n & n - 1) == 0) {
			return n;
		}
		var result = 1;
		while(result < n) result <<= 1;
		return result;
	}
	,addNodeWithSpacesAndBorders: function(Graphic,Key,tileSize,tileSpacing,tileBorder,region) {
		var key = flixel_system_FlxAssets.resolveKey(Graphic,Key);
		if(key == null) {
			return null;
		}
		key = flixel_FlxG.bitmap.getKeyWithSpacesAndBorders(key,tileSize,tileSpacing,tileBorder,region);
		if(this.hasNodeWithName(key)) {
			var _this = this.nodes;
			return (__map_reserved[key] != null ? _this.getReserved(key) : _this.h[key]).getTileFrames(tileSize,tileSpacing,tileBorder);
		}
		var data = flixel_system_FlxAssets.resolveBitmapData(Graphic);
		if(data == null) {
			return null;
		}
		var node = this.addNode(flixel_util_FlxBitmapDataUtil.addSpacesAndBorders(data,tileSize,tileSpacing,tileBorder,region),key);
		if(node == null) {
			return null;
		}
		if(tileBorder != null) {
			var Y = 2 * tileBorder.y;
			tileSize.set_x(tileSize.x + 2 * tileBorder.x);
			tileSize.set_y(tileSize.y + Y);
		}
		return node.getTileFrames(tileSize,tileSpacing,tileBorder);
	}
	,getAtlasFrames: function() {
		var graph = this.get_graphic();
		var atlasFrames = graph.get_atlasFrames();
		if(graph.get_atlasFrames() == null) {
			atlasFrames = new flixel_graphics_frames_FlxAtlasFrames(graph);
		}
		var _this = this.nodes;
		var node = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
		while(node.hasNext()) this.addNodeToAtlasFrames(node.next());
		return atlasFrames;
	}
	,addNodeToAtlasFrames: function(node) {
		if(this._graphic == null || this._graphic.get_atlasFrames() == null || node == null) {
			return;
		}
		var atlasFrames = this._graphic.get_atlasFrames();
		var tmp;
		if(node.filled) {
			var key = node.key;
			var _this = atlasFrames.framesHash;
			tmp = !(__map_reserved[key] != null ? _this.existsReserved(key) : _this.h.hasOwnProperty(key));
		} else {
			tmp = false;
		}
		if(tmp) {
			var X = node.rect.x | 0;
			var Y = node.rect.y | 0;
			var Width = (node.rect.width | 0) - this.border;
			var Height = (node.rect.height | 0) - this.border;
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = X;
			_this1.y = Y;
			_this1.width = Width;
			_this1.height = Height;
			_this1._inPool = false;
			var sourceSize;
			if(node.rotated) {
				var X1 = (node.rect.height | 0) - this.border;
				var Y1 = (node.rect.width | 0) - this.border;
				var point = flixel_math_FlxPoint._pool.get().set(X1,Y1);
				point._inPool = false;
				sourceSize = point;
			} else {
				var X2 = (node.rect.width | 0) - this.border;
				var Y2 = (node.rect.height | 0) - this.border;
				var point1 = flixel_math_FlxPoint._pool.get().set(X2,Y2);
				point1._inPool = false;
				sourceSize = point1;
			}
			var point2 = flixel_math_FlxPoint._pool.get().set(0,0);
			point2._inPool = false;
			atlasFrames.addAtlasFrame(_this1,sourceSize,point2,node.key,node.rotated ? -90 : 0);
		}
	}
	,hasNodeWithName: function(nodeName) {
		var _this = this.nodes;
		if(__map_reserved[nodeName] != null) {
			return _this.existsReserved(nodeName);
		} else {
			return _this.h.hasOwnProperty(nodeName);
		}
	}
	,getNode: function(key) {
		var _this = this.nodes;
		if(__map_reserved[key] != null) {
			return _this.getReserved(key);
		} else {
			return _this.h[key];
		}
	}
	,addNodes: function(bitmaps,keys) {
		var numBitmaps = bitmaps.length;
		if(numBitmaps != keys.length) {
			return null;
		}
		this._tempStorage = [];
		var _g1 = 0;
		while(_g1 < numBitmaps) {
			var i = _g1++;
			this._tempStorage.push({ bmd : bitmaps[i], keyStr : keys[i]});
		}
		this.addFromAtlasObjects(this._tempStorage);
		return this;
	}
	,addFromAtlasObjects: function(objects) {
		objects.sort($bind(this,this.bitmapSorter));
		var numBitmaps = objects.length;
		var _g1 = 0;
		while(_g1 < numBitmaps) {
			var i = _g1++;
			this.addNode(objects[i].bmd,objects[i].keyStr);
		}
		this._tempStorage = null;
	}
	,bitmapSorter: function(obj1,obj2) {
		if(this.allowRotation) {
			return obj2.bmd.width * obj2.bmd.height - obj1.bmd.width * obj1.bmd.height;
		}
		if(obj2.bmd.width == obj1.bmd.width) {
			return obj2.bmd.height - obj1.bmd.height;
		}
		return obj2.bmd.width - obj1.bmd.width;
	}
	,createQueue: function() {
		this._tempStorage = [];
		return this;
	}
	,addToQueue: function(data,key) {
		if(this._tempStorage == null) {
			this._tempStorage = [];
		}
		this._tempStorage.push({ bmd : data, keyStr : key});
		return this;
	}
	,generateFromQueue: function() {
		if(this._tempStorage != null) {
			this.addFromAtlasObjects(this._tempStorage);
		}
		return this;
	}
	,onClear: function(_) {
		if(!this.persist || this._graphic != null && this._graphic.get_useCount() <= 0) {
			this.destroy();
		}
	}
	,destroy: function() {
		this._tempStorage = null;
		this.deleteSubtree(this.root);
		this.root = null;
		flixel_FlxG.bitmap.removeByKey(this.name);
		this.set_bitmapData(null);
		this.nodes = null;
		this._graphic = null;
		flixel_FlxG.signals.preStateCreate.remove($bind(this,this.onClear));
	}
	,clear: function() {
		this.deleteSubtree(this.root);
		this.initRoot();
		flixel_FlxG.bitmap.removeByKey(this.name);
		this.set_bitmapData(null);
		this.nodes = new haxe_ds_StringMap();
		this._graphic = null;
	}
	,getLibGdxData: function() {
		var data = "\n";
		data = "\n" + (this.name + "\n");
		data += "format: RGBA8888\n";
		data += "filter: Linear,Linear\n";
		data += "repeat: none\n";
		var _this = this.nodes;
		var node = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
		while(node.hasNext()) {
			var node1 = node.next();
			data += node1.key + "\n";
			data += "  rotate: " + (node1.rotated == null ? "null" : "" + node1.rotated) + "\n";
			data += "  xy: " + (node1.rect.x | 0) + ", " + (node1.rect.y | 0) + "\n";
			if(this.allowRotation) {
				data += "size: " + (node1.rect.height | 0) + ", " + (node1.rect.width | 0) + "\n";
				data += "orig: " + (node1.rect.height | 0) + ", " + (node1.rect.width | 0) + "\n";
			} else {
				data += "size: " + (node1.rect.width | 0) + ", " + (node1.rect.height | 0) + "\n";
				data += "orig: " + (node1.rect.width | 0) + ", " + (node1.rect.height | 0) + "\n";
			}
			data += "  offset: 0, 0\n";
			data += "  index: -1\n";
		}
		return data;
	}
	,deleteSubtree: function(node) {
		if(node != null) {
			if(node.left != null) {
				this.deleteSubtree(node.left);
			}
			if(node.right != null) {
				this.deleteSubtree(node.right);
			}
			node.key = null;
			node.left = null;
			node.right = null;
			node.rect = null;
			node.atlas = null;
		}
	}
	,findNodeToInsert: function(insertWidth,insertHeight) {
		var stack = [];
		var current = this.root;
		[];
		var canPlaceRight = false;
		var canPlaceLeft = false;
		var looping = true;
		var result = null;
		var minArea = this.maxWidth * this.maxHeight + 1;
		var nodeArea;
		while(looping) {
			if(!current.filled && current.left == null && current.right == null && (current.rect.width >= insertWidth && current.rect.height >= insertHeight)) {
				nodeArea = (current.rect.width | 0) * (current.rect.height | 0);
				if(nodeArea < minArea) {
					minArea = nodeArea;
					result = current;
				}
			}
			if(current.right != null) {
				var _this = current.right;
				if(_this.rect.width >= insertWidth) {
					canPlaceRight = _this.rect.height >= insertHeight;
				} else {
					canPlaceRight = false;
				}
			} else {
				canPlaceRight = false;
			}
			if(current.left != null) {
				var _this1 = current.left;
				if(_this1.rect.width >= insertWidth) {
					canPlaceLeft = _this1.rect.height >= insertHeight;
				} else {
					canPlaceLeft = false;
				}
			} else {
				canPlaceLeft = false;
			}
			if(canPlaceRight && canPlaceLeft) {
				stack.push(current.right);
				current = current.left;
			} else if(canPlaceLeft) {
				current = current.left;
			} else if(canPlaceRight) {
				current = current.right;
			} else if(stack.length > 0) {
				current = stack.pop();
			} else {
				looping = false;
			}
		}
		return result;
	}
	,set_bitmapData: function(value) {
		if(value != null) {
			if(this._graphic != null) {
				this._graphic.set_bitmap(value);
			}
		}
		return this.bitmapData = value;
	}
	,get_graphic: function() {
		if(this._graphic != null) {
			return this._graphic;
		}
		this._graphic = flixel_FlxG.bitmap.add(this.bitmapData,false,this.name);
		this._graphic.persist = this.persist;
		return this._graphic;
	}
	,set_persist: function(value) {
		if(this._graphic != null) {
			this._graphic.persist = value;
		}
		return this.persist = value;
	}
	,set_minWidth: function(value) {
		if(value <= this.maxWidth) {
			this.minWidth = value;
			if(value > this.get_width()) {
				this.set_width(value);
			}
		}
		return this.minWidth;
	}
	,set_minHeight: function(value) {
		if(value <= this.maxHeight) {
			this.minHeight = value;
			if(value > this.get_height()) {
				this.set_height(value);
			}
		}
		return this.minHeight;
	}
	,get_width: function() {
		if(this.root != null) {
			return this.root.rect.width | 0;
		}
		return 0;
	}
	,set_width: function(value) {
		if(value > this.get_width()) {
			if(this.powerOfTwo) {
				value = this.getNextPowerOfTwo(value);
			}
			if(value <= this.maxWidth) {
				if(this.root != null && (this.root.rect.width | 0) < value) {
					this.expandRoot(value,this.root.rect.height | 0,this.needToDivideHorizontally(this.root,this.root.rect.width | 0,this.root.rect.height | 0));
				}
			}
		}
		return value;
	}
	,get_height: function() {
		if(this.root != null) {
			return this.root.rect.height | 0;
		}
		return 0;
	}
	,set_height: function(value) {
		if(value > this.get_height()) {
			if(this.powerOfTwo) {
				value = this.getNextPowerOfTwo(value);
			}
			if(value <= this.maxHeight) {
				if(this.root != null && (this.root.rect.height | 0) < value) {
					this.expandRoot(this.root.rect.width | 0,value,this.needToDivideHorizontally(this.root,this.root.rect.width | 0,this.root.rect.height | 0));
				}
			}
		}
		return value;
	}
	,set_maxWidth: function(value) {
		if(value >= this.minWidth && (this.root == null || value >= this.get_width())) {
			this.maxWidth = value;
		}
		return this.maxWidth;
	}
	,set_maxHeight: function(value) {
		if(value >= this.minHeight && (this.root == null || value >= this.get_height())) {
			this.maxHeight = value;
		}
		return this.maxHeight;
	}
	,set_powerOfTwo: function(value) {
		if(value != this.powerOfTwo && value && this.root != null) {
			var nextWidth = this.getNextPowerOfTwo(this.root.rect.width | 0);
			var nextHeight = this.getNextPowerOfTwo(this.root.rect.height | 0);
			if(nextWidth != (this.root.rect.width | 0) || nextHeight != (this.root.rect.height | 0)) {
				if(this.maxWidth > 0 && nextWidth > this.maxWidth || this.maxHeight > 0 && nextHeight > this.maxHeight) {
					return false;
				}
				var temp = this.root;
				var _this = flixel_math_FlxRect._pool.get();
				_this.x = 0;
				_this.y = 0;
				_this.width = nextWidth;
				_this.height = nextHeight;
				_this._inPool = false;
				this.root = new flixel_graphics_atlas_FlxNode(_this,this);
				if(temp.left != null) {
					this.divideNode(this.root,temp.rect.width | 0,temp.rect.height | 0,this.needToDivideHorizontally(this.root,temp.rect.width | 0,temp.rect.height | 0));
					this.root.left.left = temp;
				}
			}
		}
		return this.powerOfTwo = value;
	}
	,__class__: flixel_graphics_atlas_FlxAtlas
	,__properties__: {set_powerOfTwo:"set_powerOfTwo",set_maxHeight:"set_maxHeight",set_maxWidth:"set_maxWidth",set_minHeight:"set_minHeight",set_minWidth:"set_minWidth",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_persist:"set_persist",get_graphic:"get_graphic",set_bitmapData:"set_bitmapData"}
};
var flixel_graphics_atlas_FlxNode = function(rect,atlas,filled,key,rotated) {
	if(rotated == null) {
		rotated = false;
	}
	if(key == null) {
		key = "";
	}
	if(filled == null) {
		filled = false;
	}
	this.filled = filled;
	this.left = null;
	this.right = null;
	this.rect = rect;
	this.key = key;
	this.atlas = atlas;
	this.rotated = rotated;
};
$hxClasses["flixel.graphics.atlas.FlxNode"] = flixel_graphics_atlas_FlxNode;
flixel_graphics_atlas_FlxNode.__name__ = ["flixel","graphics","atlas","FlxNode"];
flixel_graphics_atlas_FlxNode.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_atlas_FlxNode.prototype = {
	destroy: function() {
		this.key = null;
		this.left = null;
		this.right = null;
		this.rect = null;
		this.atlas = null;
	}
	,canPlace: function(width,height) {
		if(this.rect.width >= width) {
			return this.rect.height >= height;
		} else {
			return false;
		}
	}
	,getTileFrames: function(tileSize,tileSpacing,tileBorder) {
		flixel_FlxG.bitmap.add(this.atlas.bitmapData,false,this.atlas.name);
		var frame = this.atlas.getAtlasFrames().framesHash.get(this.key);
		if(frame != null) {
			var tileFrames = flixel_graphics_frames_FlxTileFrames.fromFrame(frame,tileSize,tileSpacing);
			if(tileBorder != null) {
				tileFrames = tileFrames.addBorder(tileBorder);
			}
			return tileFrames;
		}
		return null;
	}
	,getImageFrame: function() {
		flixel_FlxG.bitmap.add(this.atlas.bitmapData,false,this.atlas.name);
		var frame = this.atlas.getAtlasFrames().framesHash.get(this.key);
		if(frame != null) {
			return flixel_graphics_frames_FlxImageFrame.fromFrame(frame);
		}
		return null;
	}
	,get_isEmpty: function() {
		if(!this.filled && this.left == null) {
			return this.right == null;
		} else {
			return false;
		}
	}
	,get_x: function() {
		return this.rect.x | 0;
	}
	,get_y: function() {
		return this.rect.y | 0;
	}
	,get_width: function() {
		return this.rect.width | 0;
	}
	,set_width: function(value) {
		this.rect.width = value;
		return value;
	}
	,get_height: function() {
		return this.rect.height | 0;
	}
	,set_height: function(value) {
		this.rect.height = value;
		return value;
	}
	,__class__: flixel_graphics_atlas_FlxNode
	,__properties__: {get_isEmpty:"get_isEmpty",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",get_y:"get_y",get_x:"get_x"}
};
var flixel_graphics_frames_FlxFramesCollection = function(parent,type,border) {
	this.parent = parent;
	this.type = type;
	var tmp;
	if(border == null) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		tmp = point;
	} else {
		tmp = border;
	}
	this.border = tmp;
	this.frames = [];
	this.framesHash = new haxe_ds_StringMap();
	if(parent != null) {
		parent.addFrameCollection(this);
	}
};
$hxClasses["flixel.graphics.frames.FlxFramesCollection"] = flixel_graphics_frames_FlxFramesCollection;
flixel_graphics_frames_FlxFramesCollection.__name__ = ["flixel","graphics","frames","FlxFramesCollection"];
flixel_graphics_frames_FlxFramesCollection.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_frames_FlxFramesCollection.prototype = {
	getByName: function(name) {
		var _this = this.framesHash;
		if(__map_reserved[name] != null) {
			return _this.getReserved(name);
		} else {
			return _this.h[name];
		}
	}
	,getByIndex: function(index) {
		return this.frames[index];
	}
	,getIndexByName: function(name) {
		var _g1 = 0;
		var _g = this.frames.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(this.frames[i].name == name) {
				return i;
			}
		}
		return -1;
	}
	,getFrameIndex: function(frame) {
		return this.frames.indexOf(frame);
	}
	,destroy: function() {
		this.frames = flixel_util_FlxDestroyUtil.destroyArray(this.frames);
		this.border = flixel_util_FlxDestroyUtil.put(this.border);
		this.framesHash = null;
		this.parent = null;
		this.type = null;
	}
	,addEmptyFrame: function(size) {
		var frame = new flixel_graphics_frames_FlxFrame(this.parent);
		frame.type = 2;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = 0;
		_this.height = 0;
		_this._inPool = false;
		frame.set_frame(_this);
		frame.sourceSize.set(size.width,size.height);
		this.frames.push(frame);
		return frame;
	}
	,addSpriteSheetFrame: function(region) {
		var frame = new flixel_graphics_frames_FlxFrame(this.parent);
		frame.set_frame(this.checkFrame(region));
		frame.sourceSize.set(region.width,region.height);
		frame.offset.set(0,0);
		return this.pushFrame(frame);
	}
	,addAtlasFrame: function(frame,sourceSize,offset,name,angle,flipX,flipY) {
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(angle == null) {
			angle = 0;
		}
		var tmp;
		if(name != null) {
			var _this = this.framesHash;
			if(__map_reserved[name] != null) {
				tmp = _this.existsReserved(name);
			} else {
				tmp = _this.h.hasOwnProperty(name);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this1 = this.framesHash;
			if(__map_reserved[name] != null) {
				return _this1.getReserved(name);
			} else {
				return _this1.h[name];
			}
		}
		var texFrame = new flixel_graphics_frames_FlxFrame(this.parent,angle,flipX,flipY);
		texFrame.name = name;
		texFrame.sourceSize.set(sourceSize.x,sourceSize.y);
		texFrame.offset.set(offset.x,offset.y);
		texFrame.set_frame(this.checkFrame(frame,name));
		sourceSize = flixel_util_FlxDestroyUtil.put(sourceSize);
		offset = flixel_util_FlxDestroyUtil.put(offset);
		return this.pushFrame(texFrame);
	}
	,checkFrame: function(frame,name) {
		var Value = frame.x;
		var Max = this.parent.width;
		var lowerBound = Value < 0 ? 0 : Value;
		var x = Max != null && lowerBound > Max ? Max : lowerBound;
		var Value1 = frame.y;
		var Max1 = this.parent.height;
		var lowerBound1 = Value1 < 0 ? 0 : Value1;
		var y = Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1;
		var Value2 = frame.x + frame.width;
		var Max2 = this.parent.width;
		var lowerBound2 = Value2 < 0 ? 0 : Value2;
		var Value3 = frame.y + frame.height;
		var Max3 = this.parent.height;
		var lowerBound3 = Value3 < 0 ? 0 : Value3;
		frame.x = x;
		frame.y = y;
		frame.width = (Max2 != null && lowerBound2 > Max2 ? Max2 : lowerBound2) - x;
		frame.height = (Max3 != null && lowerBound3 > Max3 ? Max3 : lowerBound3) - y;
		frame.width <= 0 || frame.height <= 0;
		return frame;
	}
	,pushFrame: function(frameObj) {
		var name = frameObj.name;
		var tmp;
		if(name != null) {
			var _this = this.framesHash;
			if(__map_reserved[name] != null) {
				tmp = _this.existsReserved(name);
			} else {
				tmp = _this.h.hasOwnProperty(name);
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this1 = this.framesHash;
			if(__map_reserved[name] != null) {
				return _this1.getReserved(name);
			} else {
				return _this1.h[name];
			}
		}
		this.frames.push(frameObj);
		frameObj.cacheFrameMatrix();
		if(name != null) {
			var _this2 = this.framesHash;
			if(__map_reserved[name] != null) {
				_this2.setReserved(name,frameObj);
			} else {
				_this2.h[name] = frameObj;
			}
		}
		return frameObj;
	}
	,addBorder: function(border) {
		throw new js__$Boot_HaxeError("To be overriden in subclasses");
	}
	,toString: function() {
		var value = this.frames;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "frames";
		_this.value = value;
		var value1 = this.type;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "type";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,get_numFrames: function() {
		return this.frames.length;
	}
	,__class__: flixel_graphics_frames_FlxFramesCollection
	,__properties__: {get_numFrames:"get_numFrames"}
};
var flixel_graphics_frames_FlxAtlasFrames = function(parent,border) {
	flixel_graphics_frames_FlxFramesCollection.call(this,parent,flixel_graphics_frames_FlxFrameCollectionType.ATLAS,border);
};
$hxClasses["flixel.graphics.frames.FlxAtlasFrames"] = flixel_graphics_frames_FlxAtlasFrames;
flixel_graphics_frames_FlxAtlasFrames.__name__ = ["flixel","graphics","frames","FlxAtlasFrames"];
flixel_graphics_frames_FlxAtlasFrames.fromTexturePackerJson = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source,false);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	if(openfl_Assets.exists(Description)) {
		Description = openfl_Assets.getText(Description);
	}
	var data = JSON.parse(Description);
	if((data.frames instanceof Array) && data.frames.__enum__ == null) {
		var _g = 0;
		var _g1 = Lambda.array(data.frames);
		while(_g < _g1.length) {
			var frame = _g1[_g];
			++_g;
			flixel_graphics_frames_FlxAtlasFrames.texturePackerHelper(frame.filename,frame,frames);
		}
	} else {
		var _g2 = 0;
		var _g11 = Reflect.fields(data.frames);
		while(_g2 < _g11.length) {
			var frameName = _g11[_g2];
			++_g2;
			flixel_graphics_frames_FlxAtlasFrames.texturePackerHelper(frameName,Reflect.field(data.frames,frameName),frames);
		}
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.texturePackerHelper = function(FrameName,FrameData,Frames) {
	var rotated = FrameData.rotated;
	var X = FrameData.sourceSize.w;
	var Y = FrameData.sourceSize.h;
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	var X1 = FrameData.spriteSourceSize.x;
	var Y1 = FrameData.spriteSourceSize.y;
	var point1 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
	point1._inPool = false;
	var angle = 0;
	var frameRect = null;
	if(rotated) {
		var X2 = FrameData.frame.x;
		var Y2 = FrameData.frame.y;
		var Width = FrameData.frame.h;
		var Height = FrameData.frame.w;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X2;
		_this.y = Y2;
		_this.width = Width;
		_this.height = Height;
		_this._inPool = false;
		frameRect = _this;
		angle = -90;
	} else {
		var X3 = FrameData.frame.x;
		var Y3 = FrameData.frame.y;
		var Width1 = FrameData.frame.w;
		var Height1 = FrameData.frame.h;
		var _this1 = flixel_math_FlxRect._pool.get();
		_this1.x = X3;
		_this1.y = Y3;
		_this1.width = Width1;
		_this1.height = Height1;
		_this1._inPool = false;
		frameRect = _this1;
	}
	Frames.addAtlasFrame(frameRect,point,point1,FrameName,angle);
};
flixel_graphics_frames_FlxAtlasFrames.fromLibGdx = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	if(openfl_Assets.exists(Description)) {
		Description = openfl_Assets.getText(Description);
	}
	var lines = StringTools.trim(Description).split("\n");
	lines.splice(0,(lines[3].indexOf("repeat:") > -1 ? 3 : 4) + 1);
	var numImages = lines.length / 7 | 0;
	var size = [];
	var _g1 = 0;
	while(_g1 < numImages) {
		var curIndex = _g1++ * 7;
		var name = lines[curIndex++];
		var rotated = lines[curIndex++].indexOf("true") >= 0;
		var angle = 0;
		var tempString = lines[curIndex++];
		var size1 = flixel_graphics_frames_FlxAtlasFrames.getDimensions(tempString,size);
		var imageX = size1[0];
		var imageY = size1[1];
		tempString = lines[curIndex++];
		size1 = flixel_graphics_frames_FlxAtlasFrames.getDimensions(tempString,size1);
		var imageWidth = size1[0];
		var imageHeight = size1[1];
		var rect = null;
		if(rotated) {
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = imageX;
			_this.y = imageY;
			_this.width = imageHeight;
			_this.height = imageWidth;
			_this._inPool = false;
			rect = _this;
			angle = 90;
		} else {
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = imageX;
			_this1.y = imageY;
			_this1.width = imageWidth;
			_this1.height = imageHeight;
			_this1._inPool = false;
			rect = _this1;
		}
		tempString = lines[curIndex++];
		size1 = flixel_graphics_frames_FlxAtlasFrames.getDimensions(tempString,size1);
		var point = flixel_math_FlxPoint._pool.get().set(size1[0],size1[1]);
		point._inPool = false;
		tempString = lines[curIndex++];
		size1 = flixel_graphics_frames_FlxAtlasFrames.getDimensions(tempString,size1);
		var Y = point.y - size1[1] - imageHeight;
		var point1 = flixel_math_FlxPoint._pool.get().set(size1[0],Y);
		point1._inPool = false;
		frames.addAtlasFrame(rect,point,point1,name,angle);
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.getDimensions = function(line,size) {
	var colonPosition = line.indexOf(":");
	var comaPosition = line.indexOf(",");
	size[0] = Std.parseInt(line.substring(colonPosition + 1,comaPosition));
	size[1] = Std.parseInt(line.substring(comaPosition + 1,line.length));
	return size;
};
flixel_graphics_frames_FlxAtlasFrames.fromSparrow = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	if(openfl_Assets.exists(Description)) {
		Description = openfl_Assets.getText(Description);
	}
	var _g_head = new haxe_xml_Fast(Xml.parse(Description).firstElement()).nodes.resolve("SubTexture").h;
	while(_g_head != null) {
		var val = _g_head.item;
		_g_head = _g_head.next;
		var name = val.att.resolve("name");
		var trimmed = val.has.resolve("frameX");
		var rotated = val.has.resolve("rotated") && val.att.resolve("rotated") == "true";
		var flipX = val.has.resolve("flipX") && val.att.resolve("flipX") == "true";
		var flipY = val.has.resolve("flipY") && val.att.resolve("flipY") == "true";
		var X = parseFloat(val.att.resolve("x"));
		var Y = parseFloat(val.att.resolve("y"));
		var Width = parseFloat(val.att.resolve("width"));
		var Height = parseFloat(val.att.resolve("height"));
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		_this._inPool = false;
		var size = trimmed ? new openfl_geom_Rectangle(Std.parseInt(val.att.resolve("frameX")),Std.parseInt(val.att.resolve("frameY")),Std.parseInt(val.att.resolve("frameWidth")),Std.parseInt(val.att.resolve("frameHeight"))) : new openfl_geom_Rectangle(0,0,_this.width,_this.height);
		var X1 = -size.get_left();
		var Y1 = -size.get_top();
		var point = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point._inPool = false;
		var X2 = size.width;
		var Y2 = size.height;
		var point1 = flixel_math_FlxPoint._pool.get().set(X2,Y2);
		point1._inPool = false;
		if(rotated && !trimmed) {
			point1.set(size.height,size.width);
		}
		frames.addAtlasFrame(_this,point1,point,name,rotated ? -90 : 0,flipX,flipY);
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.fromTexturePackerXml = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source,false);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	if(openfl_Assets.exists(Description)) {
		Description = openfl_Assets.getText(Description);
	}
	var sprite = Xml.parse(Description).firstElement().elements();
	while(sprite.hasNext()) {
		var sprite1 = sprite.next();
		var trimmed = sprite1.exists("oX") || sprite1.exists("oY");
		var angle = sprite1.exists("r") && sprite1.get("r") == "y" ? -90 : 0;
		var name = sprite1.get("n");
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var X = Std.parseInt(sprite1.get("x"));
		var Y = Std.parseInt(sprite1.get("y"));
		var Width = Std.parseInt(sprite1.get("w"));
		var Height = Std.parseInt(sprite1.get("h"));
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		_this._inPool = false;
		var X1 = _this.width;
		var Y1 = _this.height;
		var point1 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point1._inPool = false;
		if(trimmed) {
			point.set(Std.parseInt(sprite1.get("oX")),Std.parseInt(sprite1.get("oY")));
			point1.set(Std.parseInt(sprite1.get("oW")),Std.parseInt(sprite1.get("oH")));
		}
		frames.addAtlasFrame(_this,point1,point,name,angle);
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.fromSpriteSheetPacker = function(Source,Description) {
	var graphic = flixel_FlxG.bitmap.add(Source);
	if(graphic == null) {
		return null;
	}
	var frames = flixel_graphics_frames_FlxAtlasFrames.findFrame(graphic);
	if(frames != null) {
		return frames;
	}
	if(graphic == null || Description == null) {
		return null;
	}
	frames = new flixel_graphics_frames_FlxAtlasFrames(graphic);
	if(openfl_Assets.exists(Description)) {
		Description = openfl_Assets.getText(Description);
	}
	var lines = StringTools.trim(Description).split("\n");
	var _g1 = 0;
	var _g = lines.length;
	while(_g1 < _g) {
		var currImageData = lines[_g1++].split("=");
		var name = StringTools.trim(currImageData[0]);
		var currImageRegion = StringTools.trim(currImageData[1]).split(" ");
		var X = Std.parseInt(currImageRegion[0]);
		var Y = Std.parseInt(currImageRegion[1]);
		var Width = Std.parseInt(currImageRegion[2]);
		var Height = Std.parseInt(currImageRegion[3]);
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		_this._inPool = false;
		var X1 = _this.width;
		var Y1 = _this.height;
		var point = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point._inPool = false;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		frames.addAtlasFrame(_this,point,point1,name,0);
	}
	return frames;
};
flixel_graphics_frames_FlxAtlasFrames.findFrame = function(graphic,border) {
	if(border == null) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		point._weak = true;
		border = point;
	}
	var type = flixel_graphics_frames_FlxFrameCollectionType.ATLAS;
	var collections = graphic.frameCollections.get(type);
	if(collections == null) {
		collections = [];
		graphic.frameCollections.set(type,collections);
	}
	var atlasFrames = collections;
	var _g = 0;
	while(_g < atlasFrames.length) {
		var atlas = atlasFrames[_g];
		++_g;
		var _this = atlas.border;
		var result = Math.abs(_this.x - border.x) <= 0.0000001 && Math.abs(_this.y - border.y) <= 0.0000001;
		if(border._weak) {
			border.put();
		}
		if(result) {
			return atlas;
		}
	}
	return null;
};
flixel_graphics_frames_FlxAtlasFrames.__super__ = flixel_graphics_frames_FlxFramesCollection;
flixel_graphics_frames_FlxAtlasFrames.prototype = $extend(flixel_graphics_frames_FlxFramesCollection.prototype,{
	addBorder: function(border) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		point._weak = true;
		var resultBorder = point.addPoint(this.border).addPoint(border);
		var atlasFrames = flixel_graphics_frames_FlxAtlasFrames.findFrame(this.parent,resultBorder);
		if(atlasFrames != null) {
			return atlasFrames;
		}
		atlasFrames = new flixel_graphics_frames_FlxAtlasFrames(this.parent,resultBorder);
		var _g = 0;
		var _g1 = this.frames;
		while(_g < _g1.length) {
			var frame = _g1[_g];
			++_g;
			atlasFrames.pushFrame(frame.setBorderTo(border));
		}
		return atlasFrames;
	}
	,__class__: flixel_graphics_frames_FlxAtlasFrames
});
var flixel_graphics_frames_FlxFrame = function(parent,angle,flipX,flipY) {
	if(flipY == null) {
		flipY = false;
	}
	if(flipX == null) {
		flipX = false;
	}
	if(angle == null) {
		angle = 0;
	}
	this.matrix = new flixel_math_FlxMatrix();
	this.rect = new openfl_geom_Rectangle();
	this.point2 = new openfl_geom_Point();
	this.point1 = new openfl_geom_Point();
	this.parent = parent;
	this.angle = angle;
	this.flipX = flipX;
	this.flipY = flipY;
	this.type = 0;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this.sourceSize = point;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	this.offset = point1;
	this.blitMatrix = new Array(6);
	if(flixel_FlxG.renderTile) {
		this.tileMatrix = new Array(6);
	}
};
$hxClasses["flixel.graphics.frames.FlxFrame"] = flixel_graphics_frames_FlxFrame;
flixel_graphics_frames_FlxFrame.__name__ = ["flixel","graphics","frames","FlxFrame"];
flixel_graphics_frames_FlxFrame.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_graphics_frames_FlxFrame.sort = function(frames,prefixLength,postfixLength) {
	var a3 = prefixLength;
	var a4 = postfixLength;
	haxe_ds_ArraySort.sort(frames,function(a1,a2) {
		return flixel_graphics_frames_FlxFrame.sortByName(a1,a2,a3,a4);
	});
};
flixel_graphics_frames_FlxFrame.sortByName = function(frame1,frame2,prefixLength,postfixLength) {
	var name1 = frame1.name;
	var name2 = frame2.name;
	var num1 = Std.parseInt(name1.substring(prefixLength,name1.length - postfixLength));
	var num2 = Std.parseInt(name2.substring(prefixLength,name2.length - postfixLength));
	if(num1 == null) {
		num1 = 0;
	}
	if(num2 == null) {
		num2 = 0;
	}
	return num1 - num2;
};
flixel_graphics_frames_FlxFrame.prototype = {
	cacheFrameMatrix: function() {
		var mat = this.matrix;
		mat.identity();
		mat.translate(-this.frame.x,-this.frame.y);
		if(this.angle == 90) {
			mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
			mat.translate(this.frame.height,0);
		} else if(this.angle == -90) {
			mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
			mat.translate(0,this.frame.width);
		}
		mat.translate(this.offset.x,this.offset.y);
		this.blitMatrix[0] = this.matrix.a;
		this.blitMatrix[1] = this.matrix.b;
		this.blitMatrix[2] = this.matrix.c;
		this.blitMatrix[3] = this.matrix.d;
		this.blitMatrix[4] = this.matrix.tx;
		this.blitMatrix[5] = this.matrix.ty;
		if(flixel_FlxG.renderTile) {
			var mat1 = this.matrix;
			mat1.identity();
			if(this.angle == 90) {
				mat1.setTo(-mat1.b,mat1.a,-mat1.d,mat1.c,-mat1.ty,mat1.tx);
				mat1.translate(this.frame.height,0);
			} else if(this.angle == -90) {
				mat1.setTo(mat1.b,-mat1.a,mat1.d,-mat1.c,mat1.ty,-mat1.tx);
				mat1.translate(0,this.frame.width);
			}
			mat1.translate(this.offset.x,this.offset.y);
			this.tileMatrix[0] = this.matrix.a;
			this.tileMatrix[1] = this.matrix.b;
			this.tileMatrix[2] = this.matrix.c;
			this.tileMatrix[3] = this.matrix.d;
			this.tileMatrix[4] = this.matrix.tx;
			this.tileMatrix[5] = this.matrix.ty;
		}
	}
	,prepareBlitMatrix: function(mat,blit) {
		if(blit == null) {
			blit = true;
		}
		mat.identity();
		if(blit) {
			mat.translate(-this.frame.x,-this.frame.y);
		}
		if(this.angle == 90) {
			mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
			mat.translate(this.frame.height,0);
		} else if(this.angle == -90) {
			mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
			mat.translate(0,this.frame.width);
		}
		mat.translate(this.offset.x,this.offset.y);
		return mat;
	}
	,rotateAndFlip: function(mat,rotation,flipX,flipY) {
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
			if(rotation == 90) {
				mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
				mat.translate(this.sourceSize.y,0);
			} else if(rotation == -90 || rotation == -90) {
				mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
				mat.translate(0,this.sourceSize.x);
			}
		}
		if(flipX) {
			mat.scale(-1,1);
			mat.translate(w,0);
		}
		if(flipY) {
			mat.scale(1,-1);
			mat.translate(0,h);
		}
		return mat;
	}
	,prepareTransformedBlitMatrix: function(mat,rotation,flipX,flipY) {
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		mat.a = this.blitMatrix[0];
		mat.b = this.blitMatrix[1];
		mat.c = this.blitMatrix[2];
		mat.d = this.blitMatrix[3];
		mat.tx = this.blitMatrix[4];
		mat.ty = this.blitMatrix[5];
		mat = mat;
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
			if(rotation == 90) {
				mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
				mat.translate(this.sourceSize.y,0);
			} else if(rotation == -90 || rotation == -90) {
				mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
				mat.translate(0,this.sourceSize.x);
			}
		}
		if(flipX) {
			mat.scale(-1,1);
			mat.translate(w,0);
		}
		if(flipY) {
			mat.scale(1,-1);
			mat.translate(0,h);
		}
		return mat;
	}
	,prepareMatrix: function(mat,rotation,flipX,flipY) {
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		if(flixel_FlxG.renderBlit) {
			mat.identity();
			return mat;
		}
		mat.a = this.tileMatrix[0];
		mat.b = this.tileMatrix[1];
		mat.c = this.tileMatrix[2];
		mat.d = this.tileMatrix[3];
		mat.tx = this.tileMatrix[4];
		mat.ty = this.tileMatrix[5];
		var doFlipX = flipX != this.flipX;
		var doFlipY = flipY != this.flipY;
		if(rotation == 0 && !doFlipX && !doFlipY) {
			return mat;
		}
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
			if(rotation == 90) {
				mat.setTo(-mat.b,mat.a,-mat.d,mat.c,-mat.ty,mat.tx);
				mat.translate(this.sourceSize.y,0);
			} else if(rotation == -90 || rotation == -90) {
				mat.setTo(mat.b,-mat.a,mat.d,-mat.c,mat.ty,-mat.tx);
				mat.translate(0,this.sourceSize.x);
			}
		}
		if(doFlipX) {
			mat.scale(-1,1);
			mat.translate(w,0);
		}
		if(doFlipY) {
			mat.scale(1,-1);
			mat.translate(0,h);
		}
		return mat;
	}
	,fillBlitMatrix: function(mat) {
		mat.a = this.blitMatrix[0];
		mat.b = this.blitMatrix[1];
		mat.c = this.blitMatrix[2];
		mat.d = this.blitMatrix[3];
		mat.tx = this.blitMatrix[4];
		mat.ty = this.blitMatrix[5];
		return mat;
	}
	,paint: function(bmd,point,mergeAlpha,disposeIfNotEqual) {
		if(disposeIfNotEqual == null) {
			disposeIfNotEqual = false;
		}
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(point == null) {
			point = this.point1;
			point.setTo(0,0);
		}
		var bmd1 = bmd;
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(bmd1 != null && disposeIfNotEqual) {
			bmd1 = flixel_util_FlxDestroyUtil.disposeIfNotEqual(bmd1,w,h);
		}
		if(bmd1 != null && !mergeAlpha) {
			this.rect.setTo(point.x,point.y,w,h);
			bmd1.fillRect(this.rect,0);
		} else if(bmd1 == null) {
			bmd1 = new openfl_display_BitmapData(w,h,true,0);
		}
		bmd = bmd1;
		if(this.type == 2) {
			return bmd;
		}
		if(this.angle == 0) {
			var _this = this.offset;
			var FlashPoint = this.point2;
			if(FlashPoint == null) {
				FlashPoint = new openfl_geom_Point();
			}
			FlashPoint.x = _this.x;
			FlashPoint.y = _this.y;
			this.point2.x += point.x;
			this.point2.y += point.y;
			var _this1 = this.frame;
			var FlashRect = this.rect;
			if(FlashRect == null) {
				FlashRect = new openfl_geom_Rectangle();
			}
			FlashRect.x = _this1.x;
			FlashRect.y = _this1.y;
			FlashRect.width = _this1.width;
			FlashRect.height = _this1.height;
			bmd.copyPixels(this.parent.bitmap,FlashRect,this.point2,null,null,mergeAlpha);
		} else {
			var mat = this.matrix;
			mat.a = this.blitMatrix[0];
			mat.b = this.blitMatrix[1];
			mat.c = this.blitMatrix[2];
			mat.d = this.blitMatrix[3];
			mat.tx = this.blitMatrix[4];
			mat.ty = this.blitMatrix[5];
			this.matrix.translate(point.x,point.y);
			var mat1 = this.matrix;
			var X = this.frame.x;
			var Y = this.frame.y;
			var point1 = flixel_math_FlxPoint._pool.get().set(X,Y);
			point1._inPool = false;
			point1._weak = true;
			var _this2 = this.frame;
			var X1 = _this2.x + _this2.width;
			var _this3 = this.frame;
			var Y1 = _this3.y + _this3.height;
			var point2 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
			point2._inPool = false;
			point2._weak = true;
			point1.set(point1.x * mat1.a + point1.y * mat1.c + mat1.tx,point1.x * mat1.b + point1.y * mat1.d + mat1.ty);
			point2.set(point2.x * mat1.a + point2.y * mat1.c + mat1.tx,point2.x * mat1.b + point2.y * mat1.d + mat1.ty);
			var _this4 = flixel_math_FlxRect._pool.get();
			_this4.x = 0;
			_this4.y = 0;
			_this4.width = 0;
			_this4.height = 0;
			_this4._inPool = false;
			var minX = Math.min(point1.x,point2.x);
			var minY = Math.min(point1.y,point2.y);
			var maxX = Math.max(point1.x,point2.x);
			var maxY = Math.max(point1.y,point2.y);
			if(point1._weak) {
				point1.put();
			}
			if(point2._weak) {
				point2.put();
			}
			_this4.x = minX;
			_this4.y = minY;
			_this4.width = maxX - minX;
			_this4.height = maxY - minY;
			var FlashRect1 = this.rect;
			if(FlashRect1 == null) {
				FlashRect1 = new openfl_geom_Rectangle();
			}
			FlashRect1.x = _this4.x;
			FlashRect1.y = _this4.y;
			FlashRect1.width = _this4.width;
			FlashRect1.height = _this4.height;
			if(!_this4._inPool) {
				_this4._inPool = true;
				_this4._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(_this4);
			}
			bmd.draw(this.parent.bitmap,this.matrix,null,null,this.rect);
		}
		return bmd;
	}
	,paintRotatedAndFlipped: function(bmd,point,rotation,flipX,flipY,mergeAlpha,disposeIfNotEqual) {
		if(disposeIfNotEqual == null) {
			disposeIfNotEqual = false;
		}
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(flipY == null) {
			flipY = false;
		}
		if(flipX == null) {
			flipX = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		if(this.type == 2 && rotation == 0) {
			return this.paint(bmd,point,mergeAlpha,disposeIfNotEqual);
		}
		if(point == null) {
			point = this.point2;
			point.setTo(0,0);
		}
		var bmd1 = bmd;
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
		}
		if(bmd1 != null && disposeIfNotEqual) {
			bmd1 = flixel_util_FlxDestroyUtil.disposeIfNotEqual(bmd1,w,h);
		}
		if(bmd1 != null && !mergeAlpha) {
			this.rect.setTo(point.x,point.y,w,h);
			bmd1.fillRect(this.rect,0);
		} else if(bmd1 == null) {
			bmd1 = new openfl_display_BitmapData(w,h,true,0);
		}
		bmd = bmd1;
		if(this.type == 2) {
			return bmd;
		}
		this.prepareTransformedBlitMatrix(this.matrix,rotation,flipX != this.flipX,flipY != this.flipY);
		this.matrix.translate(point.x,point.y);
		var mat = this.matrix;
		var X = this.frame.x;
		var Y = this.frame.y;
		var point1 = flixel_math_FlxPoint._pool.get().set(X,Y);
		point1._inPool = false;
		point1._weak = true;
		var _this = this.frame;
		var X1 = _this.x + _this.width;
		var _this1 = this.frame;
		var Y1 = _this1.y + _this1.height;
		var point2 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point2._inPool = false;
		point2._weak = true;
		point1.set(point1.x * mat.a + point1.y * mat.c + mat.tx,point1.x * mat.b + point1.y * mat.d + mat.ty);
		point2.set(point2.x * mat.a + point2.y * mat.c + mat.tx,point2.x * mat.b + point2.y * mat.d + mat.ty);
		var _this2 = flixel_math_FlxRect._pool.get();
		_this2.x = 0;
		_this2.y = 0;
		_this2.width = 0;
		_this2.height = 0;
		_this2._inPool = false;
		var minX = Math.min(point1.x,point2.x);
		var minY = Math.min(point1.y,point2.y);
		var maxX = Math.max(point1.x,point2.x);
		var maxY = Math.max(point1.y,point2.y);
		if(point1._weak) {
			point1.put();
		}
		if(point2._weak) {
			point2.put();
		}
		_this2.x = minX;
		_this2.y = minY;
		_this2.width = maxX - minX;
		_this2.height = maxY - minY;
		var FlashRect = this.rect;
		if(FlashRect == null) {
			FlashRect = new openfl_geom_Rectangle();
		}
		FlashRect.x = _this2.x;
		FlashRect.y = _this2.y;
		FlashRect.width = _this2.width;
		FlashRect.height = _this2.height;
		if(!_this2._inPool) {
			_this2._inPool = true;
			_this2._weak = false;
			flixel_math_FlxRect._pool.putUnsafe(_this2);
		}
		bmd.draw(this.parent.bitmap,this.matrix,null,null,this.rect);
		return bmd;
	}
	,checkInputBitmap: function(bmd,point,rotation,mergeAlpha,disposeIfNotEqual) {
		if(disposeIfNotEqual == null) {
			disposeIfNotEqual = false;
		}
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(rotation == null) {
			rotation = 0;
		}
		var w = this.sourceSize.x | 0;
		var h = this.sourceSize.y | 0;
		if(rotation != 0) {
			var t = w;
			w = h;
			h = t;
		}
		if(bmd != null && disposeIfNotEqual) {
			bmd = flixel_util_FlxDestroyUtil.disposeIfNotEqual(bmd,w,h);
		}
		if(bmd != null && !mergeAlpha) {
			this.rect.setTo(point.x,point.y,w,h);
			bmd.fillRect(this.rect,0);
		} else if(bmd == null) {
			bmd = new openfl_display_BitmapData(w,h,true,0);
		}
		return bmd;
	}
	,getDrawFrameRect: function(mat) {
		var X = this.frame.x;
		var Y = this.frame.y;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		point._weak = true;
		var _this = this.frame;
		var X1 = _this.x + _this.width;
		var _this1 = this.frame;
		var Y1 = _this1.y + _this1.height;
		var point1 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
		point1._inPool = false;
		point1._weak = true;
		point.set(point.x * mat.a + point.y * mat.c + mat.tx,point.x * mat.b + point.y * mat.d + mat.ty);
		point1.set(point1.x * mat.a + point1.y * mat.c + mat.tx,point1.x * mat.b + point1.y * mat.d + mat.ty);
		var _this2 = flixel_math_FlxRect._pool.get();
		_this2.x = 0;
		_this2.y = 0;
		_this2.width = 0;
		_this2.height = 0;
		_this2._inPool = false;
		var minX = Math.min(point.x,point1.x);
		var minY = Math.min(point.y,point1.y);
		var maxX = Math.max(point.x,point1.x);
		var maxY = Math.max(point.y,point1.y);
		if(point._weak) {
			point.put();
		}
		if(point1._weak) {
			point1.put();
		}
		_this2.x = minX;
		_this2.y = minY;
		_this2.width = maxX - minX;
		_this2.height = maxY - minY;
		var FlashRect = this.rect;
		if(FlashRect == null) {
			FlashRect = new openfl_geom_Rectangle();
		}
		FlashRect.x = _this2.x;
		FlashRect.y = _this2.y;
		FlashRect.width = _this2.width;
		FlashRect.height = _this2.height;
		if(!_this2._inPool) {
			_this2._inPool = true;
			_this2._weak = false;
			flixel_math_FlxRect._pool.putUnsafe(_this2);
		}
		return this.rect;
	}
	,subFrameTo: function(rect,frameToFill) {
		if(frameToFill == null) {
			frameToFill = new flixel_graphics_frames_FlxFrame(this.parent,this.angle);
		} else {
			frameToFill.parent = this.parent;
			frameToFill.angle = this.angle;
			frameToFill.set_frame(flixel_util_FlxDestroyUtil.put(frameToFill.frame));
		}
		frameToFill.sourceSize.set(rect.width,rect.height);
		if(this.type == 2) {
			frameToFill.type = 2;
			frameToFill.offset.set(0,0);
			return frameToFill;
		}
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = 0;
		_this.height = 0;
		_this._inPool = false;
		_this.width = this.frame.width;
		_this.height = this.frame.height;
		if(this.angle != 0) {
			_this.width = this.frame.height;
			_this.height = this.frame.width;
		}
		var ox = Math.max(this.offset.x,0);
		var oy = Math.max(this.offset.y,0);
		rect.x += -ox;
		rect.y += -oy;
		var frameRect = _this.intersection(rect);
		flixel_util_FlxDestroyUtil.put(_this);
		rect.x += ox;
		rect.y += oy;
		if(frameRect.width == 0 || frameRect.height == 0) {
			frameToFill.type = 2;
			frameRect.x = 0;
			frameRect.y = 0;
			frameRect.width = 0;
			frameRect.height = 0;
			frameToFill.set_frame(frameRect);
			frameToFill.offset.set(0,0);
		} else {
			frameToFill.type = 0;
			var _this1 = frameToFill.offset.set(frameRect.x,frameRect.y);
			var Y = rect.y;
			_this1.set_x(_this1.x - rect.x);
			_this1.set_y(_this1.y - Y);
			_this1.addPoint(this.offset);
			var X = frameRect.x;
			var Y1 = frameRect.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y1);
			point._inPool = false;
			point._weak = true;
			var X1 = frameRect.x + frameRect.width;
			var Y2 = frameRect.y + frameRect.height;
			var point1 = flixel_math_FlxPoint._pool.get().set(X1,Y2);
			point1._inPool = false;
			point1._weak = true;
			this.matrix.identity();
			if(this.angle == -90) {
				var _this2 = this.matrix;
				_this2.setTo(-_this2.b,_this2.a,-_this2.d,_this2.c,-_this2.ty,_this2.tx);
				this.matrix.translate(this.frame.width,0);
			} else if(this.angle == 90) {
				var _this3 = this.matrix;
				_this3.setTo(_this3.b,-_this3.a,_this3.d,-_this3.c,_this3.ty,-_this3.tx);
				this.matrix.translate(0,this.frame.height);
			}
			if(this.angle != 0) {
				var matrix = this.matrix;
				point.set(point.x * matrix.a + point.y * matrix.c + matrix.tx,point.x * matrix.b + point.y * matrix.d + matrix.ty);
				var matrix1 = this.matrix;
				point1.set(point1.x * matrix1.a + point1.y * matrix1.c + matrix1.tx,point1.x * matrix1.b + point1.y * matrix1.d + matrix1.ty);
			}
			var minX = Math.min(point.x,point1.x);
			var minY = Math.min(point.y,point1.y);
			var maxX = Math.max(point.x,point1.x);
			var maxY = Math.max(point.y,point1.y);
			if(point._weak) {
				point.put();
			}
			if(point1._weak) {
				point1.put();
			}
			frameRect.x = minX;
			frameRect.y = minY;
			frameRect.width = maxX - minX;
			frameRect.height = maxY - minY;
			frameRect.x += this.frame.x;
			frameRect.y += this.frame.y;
			frameToFill.set_frame(frameRect);
			frameToFill.cacheFrameMatrix();
		}
		return frameToFill;
	}
	,setBorderTo: function(border,frameToFill) {
		var X = border.x;
		var Y = border.y;
		var Width = this.sourceSize.x - 2 * border.x;
		var Height = this.sourceSize.y - 2 * border.y;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = X;
		_this.y = Y;
		_this.width = Width;
		_this.height = Height;
		_this._inPool = false;
		frameToFill = this.subFrameTo(_this,frameToFill);
		frameToFill.name = this.name;
		flixel_util_FlxDestroyUtil.put(_this);
		return frameToFill;
	}
	,clipTo: function(clip,clippedFrame) {
		if(clippedFrame == null) {
			clippedFrame = new flixel_graphics_frames_FlxFrame(this.parent,this.angle);
		} else {
			clippedFrame.parent = this.parent;
			clippedFrame.angle = this.angle;
			clippedFrame.set_frame(flixel_util_FlxDestroyUtil.put(clippedFrame.frame));
		}
		var _this = clippedFrame.sourceSize;
		var point = this.sourceSize;
		_this.set_x(point.x);
		_this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
		clippedFrame.name = this.name;
		if(this.type == 2) {
			clippedFrame.type = 2;
			clippedFrame.offset.set(0,0);
			return clippedFrame;
		}
		var _this1 = flixel_math_FlxRect._pool.get();
		_this1.x = 0;
		_this1.y = 0;
		_this1.width = 0;
		_this1.height = 0;
		_this1._inPool = false;
		_this1.width = this.frame.width;
		_this1.height = this.frame.height;
		if(this.angle != 0) {
			_this1.width = this.frame.height;
			_this1.height = this.frame.width;
		}
		clip.x += -this.offset.x;
		clip.y += -this.offset.y;
		var frameRect = _this1.intersection(clip);
		flixel_util_FlxDestroyUtil.put(_this1);
		if(frameRect.width == 0 || frameRect.height == 0) {
			clippedFrame.type = 2;
			frameRect.x = 0;
			frameRect.y = 0;
			frameRect.width = 0;
			frameRect.height = 0;
			clippedFrame.set_frame(frameRect);
			clippedFrame.offset.set(0,0);
		} else {
			clippedFrame.type = 0;
			clippedFrame.offset.set(frameRect.x,frameRect.y).addPoint(this.offset);
			var X = frameRect.x;
			var Y = frameRect.y;
			var point1 = flixel_math_FlxPoint._pool.get().set(X,Y);
			point1._inPool = false;
			point1._weak = true;
			var X1 = frameRect.x + frameRect.width;
			var Y1 = frameRect.y + frameRect.height;
			var point2 = flixel_math_FlxPoint._pool.get().set(X1,Y1);
			point2._inPool = false;
			point2._weak = true;
			this.matrix.identity();
			if(this.angle == -90) {
				var _this2 = this.matrix;
				_this2.setTo(-_this2.b,_this2.a,-_this2.d,_this2.c,-_this2.ty,_this2.tx);
				this.matrix.translate(this.frame.width,0);
			} else if(this.angle == 90) {
				var _this3 = this.matrix;
				_this3.setTo(_this3.b,-_this3.a,_this3.d,-_this3.c,_this3.ty,-_this3.tx);
				this.matrix.translate(0,this.frame.height);
			}
			if(this.angle != 0) {
				var matrix = this.matrix;
				point1.set(point1.x * matrix.a + point1.y * matrix.c + matrix.tx,point1.x * matrix.b + point1.y * matrix.d + matrix.ty);
				var matrix1 = this.matrix;
				point2.set(point2.x * matrix1.a + point2.y * matrix1.c + matrix1.tx,point2.x * matrix1.b + point2.y * matrix1.d + matrix1.ty);
			}
			var minX = Math.min(point1.x,point2.x);
			var minY = Math.min(point1.y,point2.y);
			var maxX = Math.max(point1.x,point2.x);
			var maxY = Math.max(point1.y,point2.y);
			if(point1._weak) {
				point1.put();
			}
			if(point2._weak) {
				point2.put();
			}
			frameRect.x = minX;
			frameRect.y = minY;
			frameRect.width = maxX - minX;
			frameRect.height = maxY - minY;
			frameRect.x += this.frame.x;
			frameRect.y += this.frame.y;
			clippedFrame.set_frame(frameRect);
			clippedFrame.cacheFrameMatrix();
		}
		clip.x += this.offset.x;
		clip.y += this.offset.y;
		return clippedFrame;
	}
	,copyTo: function(clone) {
		if(clone == null) {
			clone = new flixel_graphics_frames_FlxFrame(this.parent,this.angle);
		} else {
			clone.parent = this.parent;
			clone.angle = this.angle;
			clone.set_frame(flixel_util_FlxDestroyUtil.put(clone.frame));
		}
		var _this = clone.offset;
		var point = this.offset;
		_this.set_x(point.x);
		_this.set_y(point.y);
		if(point._weak) {
			point.put();
		}
		clone.flipX = this.flipX;
		clone.flipY = this.flipY;
		var _this1 = clone.sourceSize;
		var point1 = this.sourceSize;
		_this1.set_x(point1.x);
		_this1.set_y(point1.y);
		if(point1._weak) {
			point1.put();
		}
		var _this2 = flixel_math_FlxRect._pool.get();
		_this2.x = 0;
		_this2.y = 0;
		_this2.width = 0;
		_this2.height = 0;
		_this2._inPool = false;
		var Rect = this.frame;
		_this2.x = Rect.x;
		_this2.y = Rect.y;
		_this2.width = Rect.width;
		_this2.height = Rect.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		clone.set_frame(_this2);
		clone.type = this.type;
		clone.name = this.name;
		clone.cacheFrameMatrix();
		return clone;
	}
	,destroy: function() {
		this.name = null;
		this.parent = null;
		this.sourceSize = flixel_util_FlxDestroyUtil.put(this.sourceSize);
		this.offset = flixel_util_FlxDestroyUtil.put(this.offset);
		this.set_frame(flixel_util_FlxDestroyUtil.put(this.frame));
		this.uv = flixel_util_FlxDestroyUtil.put(this.uv);
		this.blitMatrix = null;
		if(flixel_FlxG.renderTile) {
			this.tileMatrix = null;
		}
	}
	,toString: function() {
		var value = this.name;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "name";
		_this.value = value;
		return flixel_util_FlxStringUtil.getDebugString([_this]);
	}
	,set_frame: function(value) {
		if(value != null) {
			if(this.uv == null) {
				var _this = flixel_math_FlxRect._pool.get();
				_this.x = 0;
				_this.y = 0;
				_this.width = 0;
				_this.height = 0;
				_this._inPool = false;
				this.uv = _this;
			}
			var _this1 = this.uv;
			var Width = (value.x + value.width) / this.parent.width;
			var Height = (value.y + value.height) / this.parent.height;
			_this1.x = value.x / this.parent.width;
			_this1.y = value.y / this.parent.height;
			_this1.width = Width;
			_this1.height = Height;
		}
		return this.frame = value;
	}
	,__class__: flixel_graphics_frames_FlxFrame
	,__properties__: {set_frame:"set_frame"}
};
var flixel_graphics_frames_FlxFrameCollectionType = $hxClasses["flixel.graphics.frames.FlxFrameCollectionType"] = { __ename__ : ["flixel","graphics","frames","FlxFrameCollectionType"], __constructs__ : ["IMAGE","TILES","ATLAS","FONT","USER","FILTER"] };
flixel_graphics_frames_FlxFrameCollectionType.IMAGE = ["IMAGE",0];
flixel_graphics_frames_FlxFrameCollectionType.IMAGE.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.IMAGE.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
flixel_graphics_frames_FlxFrameCollectionType.TILES = ["TILES",1];
flixel_graphics_frames_FlxFrameCollectionType.TILES.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.TILES.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
flixel_graphics_frames_FlxFrameCollectionType.ATLAS = ["ATLAS",2];
flixel_graphics_frames_FlxFrameCollectionType.ATLAS.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.ATLAS.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
flixel_graphics_frames_FlxFrameCollectionType.FONT = ["FONT",3];
flixel_graphics_frames_FlxFrameCollectionType.FONT.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.FONT.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
flixel_graphics_frames_FlxFrameCollectionType.USER = function(type) { var $x = ["USER",4,type]; $x.__enum__ = flixel_graphics_frames_FlxFrameCollectionType; $x.toString = $estr; return $x; };
flixel_graphics_frames_FlxFrameCollectionType.FILTER = ["FILTER",5];
flixel_graphics_frames_FlxFrameCollectionType.FILTER.toString = $estr;
flixel_graphics_frames_FlxFrameCollectionType.FILTER.__enum__ = flixel_graphics_frames_FlxFrameCollectionType;
var flixel_graphics_frames_FlxImageFrame = function(parent,border) {
	flixel_graphics_frames_FlxFramesCollection.call(this,parent,flixel_graphics_frames_FlxFrameCollectionType.IMAGE,border);
};
$hxClasses["flixel.graphics.frames.FlxImageFrame"] = flixel_graphics_frames_FlxImageFrame;
flixel_graphics_frames_FlxImageFrame.__name__ = ["flixel","graphics","frames","FlxImageFrame"];
flixel_graphics_frames_FlxImageFrame.fromEmptyFrame = function(graphic,frameRect) {
	if(graphic == null || frameRect == null) {
		return null;
	}
	var imageFrame = flixel_graphics_frames_FlxImageFrame.findEmptyFrame(graphic,frameRect);
	if(imageFrame != null) {
		return imageFrame;
	}
	imageFrame = new flixel_graphics_frames_FlxImageFrame(graphic);
	imageFrame.addEmptyFrame(frameRect);
	return imageFrame;
};
flixel_graphics_frames_FlxImageFrame.fromFrame = function(source) {
	var graphic = source.parent;
	var rect = source.frame;
	var imageFrame = flixel_graphics_frames_FlxImageFrame.findFrame(graphic,rect);
	if(imageFrame != null) {
		return imageFrame;
	}
	imageFrame = new flixel_graphics_frames_FlxImageFrame(graphic);
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	_this.x = rect.x;
	_this.y = rect.y;
	_this.width = rect.width;
	_this.height = rect.height;
	if(_this._weak) {
		if(!_this._inPool) {
			_this._inPool = true;
			_this._weak = false;
			flixel_math_FlxRect._pool.putUnsafe(_this);
		}
	}
	imageFrame.addSpriteSheetFrame(_this);
	return imageFrame;
};
flixel_graphics_frames_FlxImageFrame.fromImage = function(source) {
	return flixel_graphics_frames_FlxImageFrame.fromRectangle(source,null);
};
flixel_graphics_frames_FlxImageFrame.fromGraphic = function(graphic,region) {
	if(graphic == null) {
		return null;
	}
	var checkRegion = region;
	if(checkRegion == null) {
		var Width = graphic.width;
		var Height = graphic.height;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = Width;
		_this.height = Height;
		_this._inPool = false;
		_this._weak = true;
		checkRegion = _this;
	}
	var imageFrame = flixel_graphics_frames_FlxImageFrame.findFrame(graphic,checkRegion);
	if(imageFrame != null) {
		return imageFrame;
	}
	imageFrame = new flixel_graphics_frames_FlxImageFrame(graphic);
	if(region == null) {
		var Width1 = graphic.width;
		var Height1 = graphic.height;
		var _this1 = flixel_math_FlxRect._pool.get();
		_this1.x = 0;
		_this1.y = 0;
		_this1.width = Width1;
		_this1.height = Height1;
		_this1._inPool = false;
		region = _this1;
	} else {
		if(region.width == 0) {
			region.width = graphic.width - region.x;
		}
		if(region.height == 0) {
			region.height = graphic.height - region.y;
		}
	}
	imageFrame.addSpriteSheetFrame(region);
	return imageFrame;
};
flixel_graphics_frames_FlxImageFrame.fromRectangle = function(source,region) {
	return flixel_graphics_frames_FlxImageFrame.fromGraphic(flixel_FlxG.bitmap.add(source,false),region);
};
flixel_graphics_frames_FlxImageFrame.fromBitmapAddSpacesAndBorders = function(source,border,region) {
	var graphic = flixel_FlxG.bitmap.add(source,false);
	if(graphic == null) {
		return null;
	}
	var key = flixel_FlxG.bitmap.getKeyWithSpacesAndBorders(graphic.key,null,null,border,region);
	var result = flixel_FlxG.bitmap._cache.get(key);
	if(result == null) {
		var bitmap = flixel_util_FlxBitmapDataUtil.addSpacesAndBorders(graphic.bitmap,null,null,border,region);
		result = flixel_FlxG.bitmap.add(bitmap,false,key);
	}
	return flixel_graphics_frames_FlxImageFrame.fromGraphic(graphic).addBorder(border);
};
flixel_graphics_frames_FlxImageFrame.fromFrameAddSpacesAndBorders = function(frame,border) {
	return flixel_graphics_frames_FlxImageFrame.fromBitmapAddSpacesAndBorders(frame.paint(),border);
};
flixel_graphics_frames_FlxImageFrame.findFrame = function(graphic,frameRect,frameBorder) {
	if(frameBorder == null) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		point._weak = true;
		frameBorder = point;
	}
	var type = flixel_graphics_frames_FlxFrameCollectionType.IMAGE;
	var collections = graphic.frameCollections.get(type);
	if(collections == null) {
		collections = [];
		graphic.frameCollections.set(type,collections);
	}
	var imageFrames = collections;
	var _g = 0;
	while(_g < imageFrames.length) {
		var imageFrame = imageFrames[_g];
		++_g;
		var tmp;
		var tmp1;
		var rect = imageFrame.get_frame().frame;
		var result = Math.abs(frameRect.x - rect.x) <= 0.0000001 && Math.abs(frameRect.y - rect.y) <= 0.0000001 && Math.abs(frameRect.width - rect.width) <= 0.0000001 && Math.abs(frameRect.height - rect.height) <= 0.0000001;
		if(rect._weak) {
			if(!rect._inPool) {
				rect._inPool = true;
				rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(rect);
			}
		}
		if(result) {
			var point1 = imageFrame.border;
			var result1 = Math.abs(frameBorder.x - point1.x) <= 0.0000001 && Math.abs(frameBorder.y - point1.y) <= 0.0000001;
			if(point1._weak) {
				point1.put();
			}
			tmp1 = result1;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			tmp = imageFrame.get_frame().type != 2;
		} else {
			tmp = false;
		}
		if(tmp) {
			return imageFrame;
		}
	}
	return null;
};
flixel_graphics_frames_FlxImageFrame.findEmptyFrame = function(graphic,frameRect) {
	var type = flixel_graphics_frames_FlxFrameCollectionType.IMAGE;
	var collections = graphic.frameCollections.get(type);
	if(collections == null) {
		collections = [];
		graphic.frameCollections.set(type,collections);
	}
	var imageFrames = collections;
	var _g = 0;
	while(_g < imageFrames.length) {
		var imageFrame = imageFrames[_g];
		++_g;
		var frame = imageFrame.get_frame();
		if(frame.sourceSize.x == frameRect.width && frame.sourceSize.y == frameRect.height && frame.type == 2) {
			return imageFrame;
		}
	}
	return null;
};
flixel_graphics_frames_FlxImageFrame.__super__ = flixel_graphics_frames_FlxFramesCollection;
flixel_graphics_frames_FlxImageFrame.prototype = $extend(flixel_graphics_frames_FlxFramesCollection.prototype,{
	equals: function(rect,border) {
		var rect1 = this.get_frame().frame;
		var result = Math.abs(rect.x - rect1.x) <= 0.0000001 && Math.abs(rect.y - rect1.y) <= 0.0000001 && Math.abs(rect.width - rect1.width) <= 0.0000001 && Math.abs(rect.height - rect1.height) <= 0.0000001;
		if(rect1._weak) {
			if(!rect1._inPool) {
				rect1._inPool = true;
				rect1._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(rect1);
			}
		}
		if(result) {
			var point = this.border;
			var result1 = Math.abs(border.x - point.x) <= 0.0000001 && Math.abs(border.y - point.y) <= 0.0000001;
			if(point._weak) {
				point.put();
			}
			return result1;
		} else {
			return false;
		}
	}
	,addBorder: function(border) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		point._weak = true;
		var resultBorder = point.addPoint(this.border).addPoint(border);
		var imageFrame = flixel_graphics_frames_FlxImageFrame.findFrame(this.parent,this.get_frame().frame,resultBorder);
		if(imageFrame != null) {
			return imageFrame;
		}
		imageFrame = new flixel_graphics_frames_FlxImageFrame(this.parent,resultBorder);
		imageFrame.pushFrame(this.get_frame().setBorderTo(border));
		return imageFrame;
	}
	,destroy: function() {
		flixel_graphics_frames_FlxFramesCollection.prototype.destroy.call(this);
		this.frame = flixel_util_FlxDestroyUtil.destroy(this.get_frame());
	}
	,get_frame: function() {
		return this.frames[0];
	}
	,__class__: flixel_graphics_frames_FlxImageFrame
	,__properties__: $extend(flixel_graphics_frames_FlxFramesCollection.prototype.__properties__,{get_frame:"get_frame"})
});
var flixel_graphics_frames_FlxTileFrames = function(parent,border) {
	this.numCols = 0;
	this.numRows = 0;
	flixel_graphics_frames_FlxFramesCollection.call(this,parent,flixel_graphics_frames_FlxFrameCollectionType.TILES,border);
};
$hxClasses["flixel.graphics.frames.FlxTileFrames"] = flixel_graphics_frames_FlxTileFrames;
flixel_graphics_frames_FlxTileFrames.__name__ = ["flixel","graphics","frames","FlxTileFrames"];
flixel_graphics_frames_FlxTileFrames.fromBitmapAddSpacesAndBorders = function(source,tileSize,tileSpacing,tileBorder,region) {
	var graphic = flixel_FlxG.bitmap.add(source,false);
	if(graphic == null) {
		return null;
	}
	var key = flixel_FlxG.bitmap.getKeyWithSpacesAndBorders(graphic.key,tileSize,tileSpacing,tileBorder,region);
	var result = flixel_FlxG.bitmap._cache.get(key);
	if(result == null) {
		var bitmap = flixel_util_FlxBitmapDataUtil.addSpacesAndBorders(graphic.bitmap,tileSize,tileSpacing,tileBorder,region);
		result = flixel_FlxG.bitmap.add(bitmap,false,key);
	}
	var borderX = 0;
	var borderY = 0;
	if(tileBorder != null) {
		borderX = tileBorder.x | 0;
		borderY = tileBorder.y | 0;
	}
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	var _this = point.addPoint(tileSize);
	_this.set_x(_this.x + 2 * borderX);
	_this.set_y(_this.y + 2 * borderY);
	var tileFrames = flixel_graphics_frames_FlxTileFrames.fromGraphic(result,_this,null,tileSpacing);
	if(tileBorder == null) {
		return tileFrames;
	}
	return tileFrames.addBorder(tileBorder);
};
flixel_graphics_frames_FlxTileFrames.fromFrameAddSpacesAndBorders = function(frame,tileSize,tileSpacing,tileBorder) {
	return flixel_graphics_frames_FlxTileFrames.fromBitmapAddSpacesAndBorders(frame.paint(),tileSize,tileSpacing,tileBorder);
};
flixel_graphics_frames_FlxTileFrames.fromFrame = function(frame,tileSize,tileSpacing) {
	var graphic = frame.parent;
	var tileFrames = flixel_graphics_frames_FlxTileFrames.findFrame(graphic,tileSize,null,frame,tileSpacing);
	if(tileFrames != null) {
		return tileFrames;
	}
	if(tileSpacing != null) {
		tileSpacing = tileSpacing;
	} else {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		tileSpacing = point;
	}
	tileFrames = new flixel_graphics_frames_FlxTileFrames(graphic);
	tileFrames.atlasFrame = frame;
	tileFrames.region = frame.frame;
	tileFrames.tileSize = tileSize;
	tileFrames.tileSpacing = tileSpacing;
	tileSpacing.set_x(Math.floor(tileSpacing.x));
	tileSpacing.set_y(Math.floor(tileSpacing.y));
	tileSize.set_x(Math.floor(tileSize.x));
	tileSize.set_y(Math.floor(tileSize.y));
	var spacedWidth = tileSize.x + tileSpacing.x;
	var spacedHeight = tileSize.y + tileSpacing.y;
	var numRows = tileSize.y == 0 ? 1 : (frame.sourceSize.y + tileSpacing.y) / spacedHeight | 0;
	var numCols = tileSize.x == 0 ? 1 : (frame.sourceSize.x + tileSpacing.x) / spacedWidth | 0;
	var Width = tileSize.x;
	var Height = tileSize.y;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = Width;
	_this.height = Height;
	_this._inPool = false;
	var _g1 = 0;
	var _g = numRows;
	while(_g1 < _g) {
		var j = _g1++;
		var _g3 = 0;
		var _g2 = numCols;
		while(_g3 < _g2) {
			_this.x = spacedWidth * _g3++;
			_this.y = spacedHeight * j;
			tileFrames.pushFrame(frame.subFrameTo(_this));
		}
	}
	flixel_util_FlxDestroyUtil.put(_this);
	tileFrames.numCols = numCols;
	tileFrames.numRows = numRows;
	return tileFrames;
};
flixel_graphics_frames_FlxTileFrames.fromFrames = function(Frames) {
	var firstFrame = Frames[0];
	var graphic = firstFrame.parent;
	var _g = 0;
	while(_g < Frames.length) {
		var frame = Frames[_g];
		++_g;
		var tmp;
		if(frame.parent == firstFrame.parent) {
			var _this = frame.sourceSize;
			var point = firstFrame.sourceSize;
			var result = Math.abs(_this.x - point.x) <= 0.0000001 && Math.abs(_this.y - point.y) <= 0.0000001;
			if(point._weak) {
				point.put();
			}
			tmp = !result;
		} else {
			tmp = true;
		}
		if(tmp) {
			return null;
		}
	}
	var tileFrames = new flixel_graphics_frames_FlxTileFrames(graphic);
	tileFrames.region = null;
	tileFrames.atlasFrame = null;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	var point2 = firstFrame.sourceSize;
	point1.set_x(point2.x);
	point1.set_y(point2.y);
	if(point2._weak) {
		point2.put();
	}
	tileFrames.tileSize = point1;
	var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
	point3._inPool = false;
	tileFrames.tileSpacing = point3;
	tileFrames.numCols = Frames.length;
	tileFrames.numRows = 1;
	var _g1 = 0;
	while(_g1 < Frames.length) {
		var frame1 = Frames[_g1];
		++_g1;
		tileFrames.frames.push(frame1);
		if(frame1.name != null) {
			var key = frame1.name;
			var _this1 = tileFrames.framesHash;
			if(__map_reserved[key] != null) {
				_this1.setReserved(key,frame1);
			} else {
				_this1.h[key] = frame1;
			}
		}
	}
	return tileFrames;
};
flixel_graphics_frames_FlxTileFrames.fromAtlasByPrefix = function(Frames,Prefix) {
	var framesToAdd = [];
	var _g = 0;
	var _g1 = Frames.frames;
	while(_g < _g1.length) {
		var frame = _g1[_g];
		++_g;
		if(StringTools.startsWith(frame.name,Prefix)) {
			framesToAdd.push(frame);
		}
	}
	if(framesToAdd.length > 0) {
		var name = framesToAdd[0].name;
		var postIndex = name.indexOf(".",Prefix.length);
		var postFix = name.substring(postIndex == -1 ? name.length : postIndex,name.length);
		flixel_graphics_frames_FlxFrame.sort(framesToAdd,Prefix.length,postFix.length);
		return flixel_graphics_frames_FlxTileFrames.fromFrames(framesToAdd);
	}
	return null;
};
flixel_graphics_frames_FlxTileFrames.fromGraphic = function(graphic,tileSize,region,tileSpacing) {
	var tileFrames = flixel_graphics_frames_FlxTileFrames.findFrame(graphic,tileSize,region,null,tileSpacing);
	if(tileFrames != null) {
		return tileFrames;
	}
	if(region == null) {
		var Width = graphic.width;
		var Height = graphic.height;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = Width;
		_this.height = Height;
		_this._inPool = false;
		region = _this;
	} else {
		if(region.width == 0) {
			region.width = graphic.width - region.x;
		}
		if(region.height == 0) {
			region.height = graphic.height - region.y;
		}
	}
	if(tileSpacing != null) {
		tileSpacing = tileSpacing;
	} else {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		tileSpacing = point;
	}
	tileFrames = new flixel_graphics_frames_FlxTileFrames(graphic);
	tileFrames.region = region;
	tileFrames.atlasFrame = null;
	tileFrames.tileSize = tileSize;
	tileFrames.tileSpacing = tileSpacing;
	region.x = Math.floor(region.x);
	region.y = Math.floor(region.y);
	region.width = Math.floor(region.width);
	region.height = Math.floor(region.height);
	tileSpacing.set_x(Math.floor(tileSpacing.x));
	tileSpacing.set_y(Math.floor(tileSpacing.y));
	tileSize.set_x(Math.floor(tileSize.x));
	tileSize.set_y(Math.floor(tileSize.y));
	var spacedWidth = tileSize.x + tileSpacing.x;
	var spacedHeight = tileSize.y + tileSpacing.y;
	var numRows = tileSize.y == 0 ? 1 : (region.height + tileSpacing.y) / spacedHeight | 0;
	var numCols = tileSize.x == 0 ? 1 : (region.width + tileSpacing.x) / spacedWidth | 0;
	var _g1 = 0;
	var _g = numRows;
	while(_g1 < _g) {
		var j = _g1++;
		var _g3 = 0;
		var _g2 = numCols;
		while(_g3 < _g2) {
			var X = region.x + _g3++ * spacedWidth;
			var Y = region.y + j * spacedHeight;
			var Width1 = tileSize.x;
			var Height1 = tileSize.y;
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = X;
			_this1.y = Y;
			_this1.width = Width1;
			_this1.height = Height1;
			_this1._inPool = false;
			tileFrames.addSpriteSheetFrame(_this1);
		}
	}
	tileFrames.numCols = numCols;
	tileFrames.numRows = numRows;
	return tileFrames;
};
flixel_graphics_frames_FlxTileFrames.fromRectangle = function(source,tileSize,region,tileSpacing) {
	var graphic = flixel_FlxG.bitmap.add(source,false);
	if(graphic == null) {
		return null;
	}
	return flixel_graphics_frames_FlxTileFrames.fromGraphic(graphic,tileSize,region,tileSpacing);
};
flixel_graphics_frames_FlxTileFrames.combineTileSets = function(bitmaps,tileSize,spacing,border) {
	var framesCollections = [];
	var _g = 0;
	while(_g < bitmaps.length) {
		var bitmap = bitmaps[_g];
		++_g;
		framesCollections.push(flixel_graphics_frames_FlxTileFrames.fromRectangle(bitmap,tileSize));
	}
	return flixel_graphics_frames_FlxTileFrames.combineTileFrames(framesCollections,spacing,border);
};
flixel_graphics_frames_FlxTileFrames.combineTileFrames = function(tileframes,spacing,border) {
	var totalArea = 0;
	var rows = 0;
	var cols = 0;
	var tileWidth = tileframes[0].frames[0].sourceSize.x | 0;
	var tileHeight = tileframes[0].frames[0].sourceSize.y | 0;
	var spaceX = 0;
	var spaceY = 0;
	if(spacing != null) {
		spaceX = spacing.x | 0;
		spaceY = spacing.y | 0;
	}
	var borderX = 0;
	var borderY = 0;
	if(border != null) {
		borderX = border.x | 0;
		borderY = border.y | 0;
	}
	var _g = 0;
	while(_g < tileframes.length) {
		var collection = tileframes[_g];
		++_g;
		cols = collection.numCols;
		rows = collection.numRows;
		totalArea += cols * (tileWidth + 2 * borderX) * rows * (tileHeight + 2 * borderY) | 0;
	}
	cols = Math.sqrt(totalArea) / (tileWidth + 2 * borderX) | 0;
	rows = Math.ceil(totalArea / (cols * (tileWidth + 2 * borderX) * (tileHeight + 2 * borderY)));
	var width = (cols * (tileWidth + 2 * borderX) | 0) + (cols - 1) * spaceX;
	var height = (rows * (tileHeight + 2 * borderY) | 0) + (rows - 1) * spaceY;
	var combined = new openfl_display_BitmapData(width,height,true,0);
	var result = new flixel_graphics_frames_FlxTileFrames(flixel_FlxG.bitmap.add(combined));
	var destPoint = new openfl_geom_Point(borderX,borderY);
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = width;
	_this.height = height;
	_this._inPool = false;
	result.region = _this;
	result.atlasFrame = null;
	var point = flixel_math_FlxPoint._pool.get().set(tileWidth,tileHeight);
	point._inPool = false;
	result.tileSize = point;
	var point1 = flixel_math_FlxPoint._pool.get().set(spaceX,spaceY);
	point1._inPool = false;
	result.tileSpacing = point1;
	result.numCols = cols;
	result.numRows = rows;
	var _g1 = 0;
	while(_g1 < tileframes.length) {
		var collection1 = tileframes[_g1];
		++_g1;
		var _g11 = 0;
		var _g2 = collection1.frames;
		while(_g11 < _g2.length) {
			var frame = _g2[_g11];
			++_g11;
			frame.paint(combined,destPoint,true);
			var X = destPoint.x;
			var Y = destPoint.y;
			var _this1 = flixel_math_FlxRect._pool.get();
			_this1.x = X;
			_this1.y = Y;
			_this1.width = tileWidth;
			_this1.height = tileHeight;
			_this1._inPool = false;
			var point2 = flixel_math_FlxPoint._pool.get().set(tileWidth,tileHeight);
			point2._inPool = false;
			var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
			point3._inPool = false;
			result.addAtlasFrame(_this1,point2,point3);
			destPoint.x += tileWidth + 2 * borderX + spaceX;
			if(destPoint.x >= combined.width) {
				destPoint.x = borderX;
				destPoint.y += tileHeight + 2 * borderY + spaceY;
			}
		}
	}
	flixel_util_FlxBitmapDataUtil.copyBorderPixels(combined,tileWidth,tileHeight,spaceX,spaceY,borderX,borderY,cols,rows);
	return result;
};
flixel_graphics_frames_FlxTileFrames.findFrame = function(graphic,tileSize,region,atlasFrame,tileSpacing,border) {
	var type = flixel_graphics_frames_FlxFrameCollectionType.TILES;
	var collections = graphic.frameCollections.get(type);
	if(collections == null) {
		collections = [];
		graphic.frameCollections.set(type,collections);
	}
	var tileFrames = collections;
	var _g = 0;
	while(_g < tileFrames.length) {
		var sheet = tileFrames[_g];
		++_g;
		if(sheet.equals(tileSize,region,null,tileSpacing,border)) {
			return sheet;
		}
	}
	return null;
};
flixel_graphics_frames_FlxTileFrames.__super__ = flixel_graphics_frames_FlxFramesCollection;
flixel_graphics_frames_FlxTileFrames.prototype = $extend(flixel_graphics_frames_FlxFramesCollection.prototype,{
	getByTilePosition: function(column,row) {
		return this.frames[row * this.numCols + column];
	}
	,equals: function(tileSize,region,atlasFrame,tileSpacing,border) {
		if(this.region == null && this.atlasFrame == null) {
			return false;
		}
		if(atlasFrame != null) {
			region = atlasFrame.frame;
		}
		if(region == null) {
			var Width = this.parent.width;
			var Height = this.parent.height;
			var _this = flixel_math_FlxRect._pool.get();
			_this.x = 0;
			_this.y = 0;
			_this.width = Width;
			_this.height = Height;
			_this._inPool = false;
			_this._weak = true;
			region = _this;
		}
		if(tileSpacing == null) {
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			point._weak = true;
			tileSpacing = point;
		}
		if(border == null) {
			var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
			point1._inPool = false;
			point1._weak = true;
			border = point1;
		}
		var tmp;
		var tmp1;
		var tmp2;
		if(this.atlasFrame == atlasFrame) {
			var _this1 = this.region;
			var result = Math.abs(_this1.x - region.x) <= 0.0000001 && Math.abs(_this1.y - region.y) <= 0.0000001 && Math.abs(_this1.width - region.width) <= 0.0000001 && Math.abs(_this1.height - region.height) <= 0.0000001;
			if(region._weak) {
				if(!region._inPool) {
					region._inPool = true;
					region._weak = false;
					flixel_math_FlxRect._pool.putUnsafe(region);
				}
			}
			tmp2 = result;
		} else {
			tmp2 = false;
		}
		if(tmp2) {
			var _this2 = this.tileSize;
			var result1 = Math.abs(_this2.x - tileSize.x) <= 0.0000001 && Math.abs(_this2.y - tileSize.y) <= 0.0000001;
			if(tileSize._weak) {
				tileSize.put();
			}
			tmp1 = result1;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			var _this3 = this.tileSpacing;
			var result2 = Math.abs(_this3.x - tileSpacing.x) <= 0.0000001 && Math.abs(_this3.y - tileSpacing.y) <= 0.0000001;
			if(tileSpacing._weak) {
				tileSpacing.put();
			}
			tmp = result2;
		} else {
			tmp = false;
		}
		if(tmp) {
			var _this4 = this.border;
			var result3 = Math.abs(_this4.x - border.x) <= 0.0000001 && Math.abs(_this4.y - border.y) <= 0.0000001;
			if(border._weak) {
				border.put();
			}
			return result3;
		} else {
			return false;
		}
	}
	,addBorder: function(border) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var resultBorder = point.addPoint(this.border).addPoint(border);
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		var point2 = this.tileSize;
		point1.set_x(point2.x);
		point1.set_y(point2.y);
		if(point2._weak) {
			point2.put();
		}
		var Y = 2 * border.y;
		point1.set_x(point1.x - 2 * border.x);
		point1.set_y(point1.y - Y);
		var tileFrames = flixel_graphics_frames_FlxTileFrames.findFrame(this.parent,point1,this.region,this.atlasFrame,this.tileSpacing,resultBorder);
		if(tileFrames != null) {
			flixel_util_FlxDestroyUtil.put(point1);
			return tileFrames;
		}
		tileFrames = new flixel_graphics_frames_FlxTileFrames(this.parent,resultBorder);
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = 0;
		_this.height = 0;
		_this._inPool = false;
		var Rect = this.region;
		_this.x = Rect.x;
		_this.y = Rect.y;
		_this.width = Rect.width;
		_this.height = Rect.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		tileFrames.region = _this;
		tileFrames.atlasFrame = this.atlasFrame;
		tileFrames.tileSize = point1;
		var point3 = flixel_math_FlxPoint._pool.get().set(0,0);
		point3._inPool = false;
		var point4 = this.tileSpacing;
		point3.set_x(point4.x);
		point3.set_y(point4.y);
		if(point4._weak) {
			point4.put();
		}
		tileFrames.tileSpacing = point3;
		var _g = 0;
		var _g1 = this.frames;
		while(_g < _g1.length) {
			var frame = _g1[_g];
			++_g;
			tileFrames.pushFrame(frame.setBorderTo(border));
		}
		return tileFrames;
	}
	,destroy: function() {
		flixel_graphics_frames_FlxFramesCollection.prototype.destroy.call(this);
		this.atlasFrame = null;
		this.region = flixel_util_FlxDestroyUtil.put(this.region);
		this.tileSize = flixel_util_FlxDestroyUtil.put(this.tileSize);
		this.tileSpacing = flixel_util_FlxDestroyUtil.put(this.tileSpacing);
	}
	,__class__: flixel_graphics_frames_FlxTileFrames
});
var flixel_graphics_tile_FlxDrawBaseItem = function() {
	this.blending = 0;
	this.hasColorOffsets = false;
	this.colored = false;
	this.antialiasing = false;
};
$hxClasses["flixel.graphics.tile.FlxDrawBaseItem"] = flixel_graphics_tile_FlxDrawBaseItem;
flixel_graphics_tile_FlxDrawBaseItem.__name__ = ["flixel","graphics","tile","FlxDrawBaseItem"];
flixel_graphics_tile_FlxDrawBaseItem.blendToInt = function(blend) {
	if(blend == null) {
		return 0;
	}
	switch(blend) {
	case 0:
		return 65536;
	case 2:
		return 1048576;
	case 3:
		return 16777216;
	case 5:
		return 8388608;
	case 6:
		return 33554432;
	case 8:
		return 2097152;
	case 9:
		return 131072;
	case 11:
		return 4194304;
	case 12:
		return 262144;
	case 14:
		return 524288;
	default:
		return 0;
	}
};
flixel_graphics_tile_FlxDrawBaseItem.prototype = {
	reset: function() {
		this.graphics = null;
		this.antialiasing = false;
		this.nextTyped = null;
		this.next = null;
	}
	,dispose: function() {
		this.graphics = null;
		this.next = null;
		this.type = null;
		this.nextTyped = null;
	}
	,render: function(camera) {
	}
	,addQuad: function(frame,matrix,transform) {
	}
	,get_numVertices: function() {
		return 0;
	}
	,get_numTriangles: function() {
		return 0;
	}
	,__class__: flixel_graphics_tile_FlxDrawBaseItem
	,__properties__: {get_numTriangles:"get_numTriangles",get_numVertices:"get_numVertices"}
};
var flixel_graphics_tile_FlxDrawItemType = $hxClasses["flixel.graphics.tile.FlxDrawItemType"] = { __ename__ : ["flixel","graphics","tile","FlxDrawItemType"], __constructs__ : ["TILES","TRIANGLES"] };
flixel_graphics_tile_FlxDrawItemType.TILES = ["TILES",0];
flixel_graphics_tile_FlxDrawItemType.TILES.toString = $estr;
flixel_graphics_tile_FlxDrawItemType.TILES.__enum__ = flixel_graphics_tile_FlxDrawItemType;
flixel_graphics_tile_FlxDrawItemType.TRIANGLES = ["TRIANGLES",1];
flixel_graphics_tile_FlxDrawItemType.TRIANGLES.toString = $estr;
flixel_graphics_tile_FlxDrawItemType.TRIANGLES.__enum__ = flixel_graphics_tile_FlxDrawItemType;
var flixel_graphics_tile_FlxDrawTilesItem = function() {
	this.position = 0;
	this.drawData = [];
	flixel_graphics_tile_FlxDrawBaseItem.call(this);
	this.type = flixel_graphics_tile_FlxDrawItemType.TILES;
};
$hxClasses["flixel.graphics.tile.FlxDrawTilesItem"] = flixel_graphics_tile_FlxDrawTilesItem;
flixel_graphics_tile_FlxDrawTilesItem.__name__ = ["flixel","graphics","tile","FlxDrawTilesItem"];
flixel_graphics_tile_FlxDrawTilesItem.__super__ = flixel_graphics_tile_FlxDrawBaseItem;
flixel_graphics_tile_FlxDrawTilesItem.prototype = $extend(flixel_graphics_tile_FlxDrawBaseItem.prototype,{
	reset: function() {
		flixel_graphics_tile_FlxDrawBaseItem.prototype.reset.call(this);
		this.position = 0;
		this.shader = null;
	}
	,dispose: function() {
		flixel_graphics_tile_FlxDrawBaseItem.prototype.dispose.call(this);
		this.drawData = null;
		this.shader = null;
	}
	,addQuad: function(frame,matrix,transform) {
		this.drawData[this.position++] = matrix.tx;
		this.drawData[this.position++] = matrix.ty;
		var rect = frame.frame;
		this.drawData[this.position++] = rect.x;
		this.drawData[this.position++] = rect.y;
		this.drawData[this.position++] = rect.width;
		this.drawData[this.position++] = rect.height;
		this.drawData[this.position++] = matrix.a;
		this.drawData[this.position++] = matrix.b;
		this.drawData[this.position++] = matrix.c;
		this.drawData[this.position++] = matrix.d;
		if(this.colored && transform != null) {
			this.drawData[this.position++] = transform.redMultiplier;
			this.drawData[this.position++] = transform.greenMultiplier;
			this.drawData[this.position++] = transform.blueMultiplier;
		}
		this.drawData[this.position++] = transform != null ? transform.alphaMultiplier : 1.0;
		if(this.hasColorOffsets && transform != null) {
			this.drawData[this.position++] = transform.redOffset;
			this.drawData[this.position++] = transform.greenOffset;
			this.drawData[this.position++] = transform.blueOffset;
			this.drawData[this.position++] = transform.alphaOffset;
		}
	}
	,setNext: function(f) {
		this.drawData[this.position++] = f;
	}
	,render: function(camera) {
		if(!flixel_FlxG.renderTile || this.position <= 0) {
			return;
		}
		var flags = 56;
		if(this.colored) {
			flags = 60;
		}
		if(this.hasColorOffsets) {
			flags |= 128;
		}
		flags |= this.blending;
		camera.canvas.get_graphics().drawTiles(this.graphics.get_tilesheet(),this.drawData,camera.antialiasing || this.antialiasing,flags,this.shader,this.position);
		flixel_graphics_tile_FlxTilesheet._DRAWCALLS++;
	}
	,get_numTiles: function() {
		var elementsPerTile = 8;
		if(this.colored) {
			elementsPerTile = 11;
		}
		if(this.hasColorOffsets) {
			elementsPerTile += 4;
		}
		return this.position / elementsPerTile | 0;
	}
	,get_numVertices: function() {
		return 4 * this.get_numTiles();
	}
	,get_numTriangles: function() {
		return 2 * this.get_numTiles();
	}
	,__class__: flixel_graphics_tile_FlxDrawTilesItem
	,__properties__: $extend(flixel_graphics_tile_FlxDrawBaseItem.prototype.__properties__,{get_numTiles:"get_numTiles"})
});
var flixel_graphics_tile_FlxDrawTrianglesItem = function() {
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	this.bounds = _this;
	this.colorsPosition = 0;
	this.indicesPosition = 0;
	this.verticesPosition = 0;
	this.colors = [];
	this.uvtData = [];
	this.indices = [];
	this.vertices = [];
	flixel_graphics_tile_FlxDrawBaseItem.call(this);
	this.type = flixel_graphics_tile_FlxDrawItemType.TRIANGLES;
};
$hxClasses["flixel.graphics.tile.FlxDrawTrianglesItem"] = flixel_graphics_tile_FlxDrawTrianglesItem;
flixel_graphics_tile_FlxDrawTrianglesItem.__name__ = ["flixel","graphics","tile","FlxDrawTrianglesItem"];
flixel_graphics_tile_FlxDrawTrianglesItem.inflateBounds = function(bounds,x,y) {
	if(x < bounds.x) {
		bounds.width += bounds.x - x;
		bounds.x = x;
	}
	if(y < bounds.y) {
		bounds.height += bounds.y - y;
		bounds.y = y;
	}
	if(x > bounds.x + bounds.width) {
		bounds.width = x - bounds.x;
	}
	if(y > bounds.y + bounds.height) {
		bounds.height = y - bounds.y;
	}
	return bounds;
};
flixel_graphics_tile_FlxDrawTrianglesItem.__super__ = flixel_graphics_tile_FlxDrawBaseItem;
flixel_graphics_tile_FlxDrawTrianglesItem.prototype = $extend(flixel_graphics_tile_FlxDrawBaseItem.prototype,{
	render: function(camera) {
		if(!flixel_FlxG.renderTile) {
			return;
		}
		if(this.get_numTriangles() <= 0) {
			return;
		}
		var tmp = camera.antialiasing || this.antialiasing;
		camera.canvas.get_graphics().beginBitmapFill(this.graphics.bitmap,null,true,tmp);
		var tmp1 = camera.canvas.get_graphics();
		var value = this.vertices;
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		var value1 = this.indices;
		var vectorData1 = new openfl_VectorData();
		vectorData1.length = value1.length;
		vectorData1.fixed = true;
		vectorData1.data = value1.slice(0);
		var value2 = this.uvtData;
		var vectorData2 = new openfl_VectorData();
		vectorData2.length = value2.length;
		vectorData2.fixed = true;
		vectorData2.data = value2.slice(0);
		tmp1.drawTriangles(vectorData,vectorData1,vectorData2,1);
		camera.canvas.get_graphics().endFill();
		flixel_graphics_tile_FlxTilesheet._DRAWCALLS++;
	}
	,reset: function() {
		flixel_graphics_tile_FlxDrawBaseItem.prototype.reset.call(this);
		this.vertices.splice(0,this.vertices.length);
		this.indices.splice(0,this.indices.length);
		this.uvtData.splice(0,this.uvtData.length);
		this.colors.splice(0,this.colors.length);
		this.verticesPosition = 0;
		this.indicesPosition = 0;
		this.colorsPosition = 0;
	}
	,dispose: function() {
		flixel_graphics_tile_FlxDrawBaseItem.prototype.dispose.call(this);
		this.vertices = null;
		this.indices = null;
		this.uvtData = null;
		this.colors = null;
		this.bounds = null;
	}
	,addTriangles: function(vertices,indices,uvtData,colors,position,cameraBounds) {
		if(position == null) {
			position = flixel_graphics_tile_FlxDrawTrianglesItem.point.set();
		}
		if(cameraBounds == null) {
			var _this = flixel_graphics_tile_FlxDrawTrianglesItem.rect;
			_this.x = 0;
			_this.y = 0;
			_this.width = flixel_FlxG.width;
			_this.height = flixel_FlxG.height;
			cameraBounds = _this;
		}
		var verticesLength = vertices.length;
		var numberOfVertices = verticesLength / 2 | 0;
		var prevIndicesLength = this.indices.length;
		var prevUVTDataLength = this.uvtData.length;
		var prevColorsLength = this.colors.length;
		var prevNumberOfVertices = this.get_numVertices();
		var tempX;
		var tempY;
		var i = 0;
		var currentVertexPosition = this.vertices.length;
		while(i < verticesLength) {
			tempX = position.x + vertices[i];
			tempY = position.y + vertices[i + 1];
			this.vertices[currentVertexPosition++] = tempX;
			this.vertices[currentVertexPosition++] = tempY;
			if(i == 0) {
				var _this1 = this.bounds;
				_this1.x = tempX;
				_this1.y = tempY;
				_this1.width = 0;
				_this1.height = 0;
			} else {
				var bounds = this.bounds;
				if(tempX < bounds.x) {
					bounds.width += bounds.x - tempX;
					bounds.x = tempX;
				}
				if(tempY < bounds.y) {
					bounds.height += bounds.y - tempY;
					bounds.y = tempY;
				}
				if(tempX > bounds.x + bounds.width) {
					bounds.width = tempX - bounds.x;
				}
				if(tempY > bounds.y + bounds.height) {
					bounds.height = tempY - bounds.y;
				}
			}
			i += 2;
		}
		var Rect = this.bounds;
		var result = Rect.x + Rect.width > cameraBounds.x && Rect.x < cameraBounds.x + cameraBounds.width && Rect.y + Rect.height > cameraBounds.y && Rect.y < cameraBounds.y + cameraBounds.height;
		if(Rect._weak) {
			if(!Rect._inPool) {
				Rect._inPool = true;
				Rect._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(Rect);
			}
		}
		if(!result) {
			this.vertices.splice(this.vertices.length - verticesLength,verticesLength);
		} else {
			var uvtDataLength = uvtData.length;
			var _g1 = 0;
			while(_g1 < uvtDataLength) {
				var i1 = _g1++;
				this.uvtData[prevUVTDataLength + i1] = uvtData[i1];
			}
			var indicesLength = indices.length;
			var _g11 = 0;
			while(_g11 < indicesLength) {
				var i2 = _g11++;
				this.indices[prevIndicesLength + i2] = indices[i2] + prevNumberOfVertices;
			}
			if(this.colored) {
				var _g12 = 0;
				while(_g12 < numberOfVertices) {
					var i3 = _g12++;
					this.colors[prevColorsLength + i3] = colors[i3];
				}
				this.colorsPosition += numberOfVertices;
			}
			this.verticesPosition += verticesLength;
			this.indicesPosition += indicesLength;
		}
		if(position._weak) {
			position.put();
		}
		if(cameraBounds._weak) {
			if(!cameraBounds._inPool) {
				cameraBounds._inPool = true;
				cameraBounds._weak = false;
				flixel_math_FlxRect._pool.putUnsafe(cameraBounds);
			}
		}
	}
	,addQuad: function(frame,matrix,transform) {
		var prevVerticesPos = this.verticesPosition;
		var prevIndicesPos = this.indicesPosition;
		var prevColorsPos = this.colorsPosition;
		var prevNumberOfVertices = this.get_numVertices();
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		point.set(point.x * matrix.a + point.y * matrix.c + matrix.tx,point.x * matrix.b + point.y * matrix.d + matrix.ty);
		this.vertices[prevVerticesPos] = point.x;
		this.vertices[prevVerticesPos + 1] = point.y;
		this.uvtData[prevVerticesPos] = frame.uv.x;
		this.uvtData[prevVerticesPos + 1] = frame.uv.y;
		point.set(frame.frame.width,0);
		point.set(point.x * matrix.a + point.y * matrix.c + matrix.tx,point.x * matrix.b + point.y * matrix.d + matrix.ty);
		this.vertices[prevVerticesPos + 2] = point.x;
		this.vertices[prevVerticesPos + 3] = point.y;
		this.uvtData[prevVerticesPos + 2] = frame.uv.width;
		this.uvtData[prevVerticesPos + 3] = frame.uv.y;
		point.set(frame.frame.width,frame.frame.height);
		point.set(point.x * matrix.a + point.y * matrix.c + matrix.tx,point.x * matrix.b + point.y * matrix.d + matrix.ty);
		this.vertices[prevVerticesPos + 4] = point.x;
		this.vertices[prevVerticesPos + 5] = point.y;
		this.uvtData[prevVerticesPos + 4] = frame.uv.width;
		this.uvtData[prevVerticesPos + 5] = frame.uv.height;
		point.set(0,frame.frame.height);
		point.set(point.x * matrix.a + point.y * matrix.c + matrix.tx,point.x * matrix.b + point.y * matrix.d + matrix.ty);
		this.vertices[prevVerticesPos + 6] = point.x;
		this.vertices[prevVerticesPos + 7] = point.y;
		point.put();
		this.uvtData[prevVerticesPos + 6] = frame.uv.x;
		this.uvtData[prevVerticesPos + 7] = frame.uv.height;
		this.indices[prevIndicesPos] = prevNumberOfVertices;
		this.indices[prevIndicesPos + 1] = prevNumberOfVertices + 1;
		this.indices[prevIndicesPos + 2] = prevNumberOfVertices + 2;
		this.indices[prevIndicesPos + 3] = prevNumberOfVertices + 2;
		this.indices[prevIndicesPos + 4] = prevNumberOfVertices + 3;
		this.indices[prevIndicesPos + 5] = prevNumberOfVertices;
		if(this.colored) {
			var red = 1.0;
			var green = 1.0;
			var blue = 1.0;
			var alpha = 1.0;
			if(transform != null) {
				red = transform.redMultiplier;
				green = transform.greenMultiplier;
				blue = transform.blueMultiplier;
				alpha = transform.alphaMultiplier;
			}
			var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
			var Value = Math.round(red * 255);
			color &= -16711681;
			color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
			var Value1 = Math.round(green * 255);
			color &= -65281;
			color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
			var Value2 = Math.round(blue * 255);
			color &= -256;
			color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
			var Value3 = Math.round(alpha * 255);
			color &= 16777215;
			color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
			var color1 = color;
			this.colors[prevColorsPos] = color1;
			this.colors[prevColorsPos + 1] = color1;
			this.colors[prevColorsPos + 2] = color1;
			this.colors[prevColorsPos + 3] = color1;
			this.colorsPosition += 4;
		}
		this.verticesPosition += 8;
		this.indicesPosition += 6;
	}
	,get_numVertices: function() {
		return this.vertices.length / 2 | 0;
	}
	,get_numTriangles: function() {
		return this.indices.length / 3 | 0;
	}
	,__class__: flixel_graphics_tile_FlxDrawTrianglesItem
});
var openfl_display_Tilesheet = function(image) {
	this.__bitmap = image;
	this.__centerPoints = [];
	this.__tileRects = [];
	this.__tileUVs = [];
	this.__rectTile = new openfl_geom_Rectangle();
	this.__rectUV = new openfl_geom_Rectangle();
	this.__point = new openfl_geom_Point();
};
$hxClasses["openfl.display.Tilesheet"] = openfl_display_Tilesheet;
openfl_display_Tilesheet.__name__ = ["openfl","display","Tilesheet"];
openfl_display_Tilesheet.prototype = {
	addTileRect: function(rectangle,centerPoint) {
		this.__tileRects.push(rectangle);
		if(centerPoint == null) {
			centerPoint = openfl_display_Tilesheet.__defaultPoint;
		}
		this.__centerPoints.push(centerPoint);
		this.__tileUVs.push(new openfl_geom_Rectangle(rectangle.get_left() / this.__bitmap.width,rectangle.get_top() / this.__bitmap.height,rectangle.get_right() / this.__bitmap.width,rectangle.get_bottom() / this.__bitmap.height));
		return this.__tileRects.length - 1;
	}
	,drawTiles: function(graphics,tileData,smooth,flags,count) {
		if(count == null) {
			count = -1;
		}
		if(flags == null) {
			flags = 0;
		}
		if(smooth == null) {
			smooth = false;
		}
		graphics.drawTiles(this,tileData,smooth,flags,null,count);
	}
	,getTileCenter: function(index) {
		return this.__centerPoints[index];
	}
	,getTileRect: function(index) {
		return this.__tileRects[index];
	}
	,getTileUVs: function(index) {
		return this.__tileUVs[index];
	}
	,__class__: openfl_display_Tilesheet
};
var flixel_graphics_tile_FlxTilesheet = function(image) {
	openfl_display_Tilesheet.call(this,image);
};
$hxClasses["flixel.graphics.tile.FlxTilesheet"] = flixel_graphics_tile_FlxTilesheet;
flixel_graphics_tile_FlxTilesheet.__name__ = ["flixel","graphics","tile","FlxTilesheet"];
flixel_graphics_tile_FlxTilesheet.__super__ = openfl_display_Tilesheet;
flixel_graphics_tile_FlxTilesheet.prototype = $extend(openfl_display_Tilesheet.prototype,{
	__class__: flixel_graphics_tile_FlxTilesheet
});
var flixel_group_FlxTypedGroupIterator = function(GroupMembers,filter) {
	this._groupMembers = GroupMembers;
	this._filter = filter;
	this._cursor = 0;
	this._length = this._groupMembers.length;
};
$hxClasses["flixel.group.FlxTypedGroupIterator"] = flixel_group_FlxTypedGroupIterator;
flixel_group_FlxTypedGroupIterator.__name__ = ["flixel","group","FlxTypedGroupIterator"];
flixel_group_FlxTypedGroupIterator.prototype = {
	next: function() {
		if(this.hasNext()) {
			return this._groupMembers[this._cursor++];
		} else {
			return null;
		}
	}
	,hasNext: function() {
		while(this._cursor < this._length && (this._groupMembers[this._cursor] == null || this._filter != null && !this._filter(this._groupMembers[this._cursor]))) this._cursor++;
		return this._cursor < this._length;
	}
	,__class__: flixel_group_FlxTypedGroupIterator
};
var flixel_input_FlxBaseKeyList = function(status,keyManager) {
	this.status = status;
	this.keyManager = keyManager;
};
$hxClasses["flixel.input.FlxBaseKeyList"] = flixel_input_FlxBaseKeyList;
flixel_input_FlxBaseKeyList.__name__ = ["flixel","input","FlxBaseKeyList"];
flixel_input_FlxBaseKeyList.prototype = {
	check: function(keyCode) {
		return this.keyManager.checkStatus(keyCode,this.status);
	}
	,get_ANY: function() {
		var _g = 0;
		var _g1 = this.keyManager._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && this.keyManager.checkStatus(key.ID,this.status)) {
				return true;
			}
		}
		return false;
	}
	,__class__: flixel_input_FlxBaseKeyList
	,__properties__: {get_ANY:"get_ANY"}
};
var flixel_input_FlxInput = function(ID) {
	this.last = 0;
	this.current = 0;
	this.ID = ID;
};
$hxClasses["flixel.input.FlxInput"] = flixel_input_FlxInput;
flixel_input_FlxInput.__name__ = ["flixel","input","FlxInput"];
flixel_input_FlxInput.__interfaces__ = [flixel_input_IFlxInput];
flixel_input_FlxInput.prototype = {
	press: function() {
		this.last = this.current;
		this.current = this.current == 1 || this.current == 2 ? 1 : 2;
	}
	,release: function() {
		this.last = this.current;
		this.current = this.current == 1 || this.current == 2 ? -1 : 0;
	}
	,update: function() {
		if(this.last == -1 && this.current == -1) {
			this.current = 0;
		} else if(this.last == 2 && this.current == 2) {
			this.current = 1;
		}
		this.last = this.current;
	}
	,reset: function() {
		this.current = 0;
		this.last = 0;
	}
	,hasState: function(state) {
		switch(state) {
		case -1:
			return this.current == -1;
		case 0:
			if(this.current != 0) {
				return this.current == -1;
			} else {
				return true;
			}
			break;
		case 1:
			if(this.current != 1) {
				return this.current == 2;
			} else {
				return true;
			}
			break;
		case 2:
			return this.current == 2;
		}
	}
	,get_justReleased: function() {
		return this.current == -1;
	}
	,get_released: function() {
		if(this.current != 0) {
			return this.current == -1;
		} else {
			return true;
		}
	}
	,get_pressed: function() {
		if(this.current != 1) {
			return this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this.current == 2;
	}
	,__class__: flixel_input_FlxInput
	,__properties__: {get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased"}
};
var flixel_input_FlxKeyManager = function(keyListClass) {
	this._keyListMap = new haxe_ds_IntMap();
	this._keyListArray = [];
	this.preventDefaultKeys = [];
	this.enabled = true;
	openfl_Lib.current.stage.addEventListener("keyDown",$bind(this,this.onKeyDown));
	openfl_Lib.current.stage.addEventListener("keyUp",$bind(this,this.onKeyUp));
	this.pressed = Type.createInstance(keyListClass,[1,this]);
	this.justPressed = Type.createInstance(keyListClass,[2,this]);
	this.justReleased = Type.createInstance(keyListClass,[-1,this]);
};
$hxClasses["flixel.input.FlxKeyManager"] = flixel_input_FlxKeyManager;
flixel_input_FlxKeyManager.__name__ = ["flixel","input","FlxKeyManager"];
flixel_input_FlxKeyManager.__interfaces__ = [flixel_input_IFlxInputManager];
flixel_input_FlxKeyManager.prototype = {
	anyPressed: function(KeyArray) {
		return this.checkKeyArrayState(KeyArray,1);
	}
	,anyJustPressed: function(KeyArray) {
		return this.checkKeyArrayState(KeyArray,2);
	}
	,anyJustReleased: function(KeyArray) {
		return this.checkKeyArrayState(KeyArray,-1);
	}
	,firstPressed: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && (key.current == 1 || key.current == 2)) {
				return key.ID;
			}
		}
		return -1;
	}
	,firstJustPressed: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && key.current == 2) {
				return key.ID;
			}
		}
		return -1;
	}
	,firstJustReleased: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && key.current == -1) {
				return key.ID;
			}
		}
		return -1;
	}
	,checkStatus: function(KeyCode,Status) {
		var key = this._keyListMap.get(KeyCode);
		if(key != null) {
			if(key.hasState(Status)) {
				return true;
			}
		}
		return false;
	}
	,getIsDown: function() {
		var keysDown = [];
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null && (key.current == 1 || key.current == 2)) {
				keysDown.push(key);
			}
		}
		return keysDown;
	}
	,destroy: function() {
		this._keyListArray = null;
		this._keyListMap = null;
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null) {
				key.release();
			}
		}
	}
	,update: function() {
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key != null) {
				key.update();
			}
		}
	}
	,checkKeyArrayState: function(KeyArray,State) {
		if(KeyArray == null) {
			return false;
		}
		var _g = 0;
		while(_g < KeyArray.length) {
			var code = KeyArray[_g];
			++_g;
			var key = this._keyListMap.get(code);
			if(key != null) {
				if(key.hasState(State)) {
					return true;
				}
			}
		}
		return false;
	}
	,onKeyUp: function(event) {
		var c = this.resolveKeyCode(event);
		this.handlePreventDefaultKeys(c,event);
		if(this.enabled) {
			var key = this._keyListMap.get(c);
			if(key != null) {
				key.release();
			}
		}
	}
	,onKeyDown: function(event) {
		var c = this.resolveKeyCode(event);
		this.handlePreventDefaultKeys(c,event);
		if(this.enabled) {
			var key = this._keyListMap.get(c);
			if(key != null) {
				key.press();
			}
		}
	}
	,handlePreventDefaultKeys: function(keyCode,event) {
		var key = this._keyListMap.get(keyCode);
		if(key != null && this.preventDefaultKeys != null && this.preventDefaultKeys.indexOf(key.ID) != -1) {
			event.stopImmediatePropagation();
			event.stopPropagation();
		}
	}
	,inKeyArray: function(KeyArray,Event) {
		if(KeyArray == null) {
			return false;
		} else {
			var code = this.resolveKeyCode(Event);
			var _g = 0;
			while(_g < KeyArray.length) {
				var key = KeyArray[_g];
				++_g;
				if(key == code || key == -2) {
					return true;
				}
			}
		}
		return false;
	}
	,resolveKeyCode: function(e) {
		return e.keyCode;
	}
	,updateKeyStates: function(KeyCode,Down) {
		var key = this._keyListMap.get(KeyCode);
		if(key != null) {
			if(Down) {
				key.press();
			} else {
				key.release();
			}
		}
	}
	,onFocus: function() {
	}
	,onFocusLost: function() {
		this.reset();
	}
	,getKey: function(KeyCode) {
		return this._keyListMap.h[KeyCode];
	}
	,__class__: flixel_input_FlxKeyManager
};
var flixel_input_FlxSwipe = function(ID,StartPosition,EndPosition,StartTimeInTicks) {
	this.ID = ID;
	this.startPosition = StartPosition;
	this.endPosition = EndPosition;
	this._startTimeInTicks = StartTimeInTicks;
	this._endTimeInTicks = flixel_FlxG.game.ticks;
};
$hxClasses["flixel.input.FlxSwipe"] = flixel_input_FlxSwipe;
flixel_input_FlxSwipe.__name__ = ["flixel","input","FlxSwipe"];
flixel_input_FlxSwipe.prototype = {
	toString: function() {
		var value = this.ID;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "ID";
		_this.value = value;
		var value1 = this.startPosition;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "start";
		_this1.value = value1;
		var value2 = this.endPosition;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "end";
		_this2.value = value2;
		var dx = this.startPosition.x - this.endPosition.x;
		var dy = this.startPosition.y - this.endPosition.y;
		var value3 = Math.sqrt(dx * dx + dy * dy);
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "distance";
		_this3.value = value3;
		var value4 = this.startPosition.angleBetween(this.endPosition);
		var _this4 = flixel_util_LabelValuePair._pool.get();
		_this4.label = "angle";
		_this4.value = value4;
		var value5 = (this._endTimeInTicks - this._startTimeInTicks) / 1000;
		var _this5 = flixel_util_LabelValuePair._pool.get();
		_this5.label = "duration";
		_this5.value = value5;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3,_this4,_this5]);
	}
	,get_distance: function() {
		var dx = this.startPosition.x - this.endPosition.x;
		var dy = this.startPosition.y - this.endPosition.y;
		return Math.sqrt(dx * dx + dy * dy);
	}
	,get_angle: function() {
		return this.startPosition.angleBetween(this.endPosition);
	}
	,get_duration: function() {
		return (this._endTimeInTicks - this._startTimeInTicks) / 1000;
	}
	,__class__: flixel_input_FlxSwipe
	,__properties__: {get_duration:"get_duration",get_angle:"get_angle",get_distance:"get_distance"}
};
var flixel_input_gamepad_FlxGamepad = function(ID,Manager,Model,Attachment) {
	this.buttons = [];
	this._deadZone = 0.15;
	this.axisActive = false;
	var _g = [];
	var _g1 = 0;
	while(_g1 < 6) {
		++_g1;
		_g.push(0);
	}
	this.axis = _g;
	this.deadZoneMode = flixel_input_gamepad_FlxGamepadDeadZoneMode.INDEPENDENT_AXES;
	this.connected = true;
	this.id = ID;
	this.manager = Manager;
	this.pressed = new flixel_input_gamepad_lists_FlxGamepadButtonList(1,this);
	this.justPressed = new flixel_input_gamepad_lists_FlxGamepadButtonList(2,this);
	this.justReleased = new flixel_input_gamepad_lists_FlxGamepadButtonList(-1,this);
	this.analog = new flixel_input_gamepad_lists_FlxGamepadAnalogList(this);
	this.motion = new flixel_input_gamepad_lists_FlxGamepadMotionValueList(this);
	this.pointer = new flixel_input_gamepad_lists_FlxGamepadPointerValueList(this);
	if(Model == null) {
		Model = flixel_input_gamepad_FlxGamepadModel.XINPUT;
	}
	if(Attachment == null) {
		Attachment = flixel_input_gamepad_FlxGamepadAttachment.NONE;
	}
	this.set_model(Model);
	this.detectedModel = Model;
};
$hxClasses["flixel.input.gamepad.FlxGamepad"] = flixel_input_gamepad_FlxGamepad;
flixel_input_gamepad_FlxGamepad.__name__ = ["flixel","input","gamepad","FlxGamepad"];
flixel_input_gamepad_FlxGamepad.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_input_gamepad_FlxGamepad.prototype = {
	getButton: function(RawID) {
		if(RawID == -1) {
			return null;
		}
		var gamepadButton = this.buttons[RawID];
		if(gamepadButton == null) {
			gamepadButton = new flixel_input_gamepad_FlxGamepadButton(RawID);
			this.buttons[RawID] = gamepadButton;
		}
		return gamepadButton;
	}
	,applyAxisFlip: function(axisValue,axisID) {
		if(this.mapping.isAxisFlipped(axisID)) {
			axisValue *= -1;
		}
		return axisValue;
	}
	,update: function() {
		var control;
		var button;
		if(this._device == null) {
			return;
		}
		var _g1 = 0;
		var _g = this._device.get_numControls();
		while(_g1 < _g) {
			var i = _g1++;
			control = this._device.getControlAt(i);
			button = this.getButton(i);
			if(this.isAxisForAnalogStick(i)) {
				this.handleAxisMove(i,control.value,button.value);
			}
			button.value = control.value;
			var value = Math.abs(control.value);
			if(value < this.get_deadZone()) {
				button.release();
			} else if(value > this.get_deadZone()) {
				button.press();
			}
		}
		var _g2 = 0;
		var _g11 = this.buttons;
		while(_g2 < _g11.length) {
			var button1 = _g11[_g2];
			++_g2;
			if(button1 != null) {
				button1.update();
			}
		}
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null) {
				button.reset();
			}
		}
		var numAxis = this.axis.length;
		var _g11 = 0;
		while(_g11 < numAxis) this.axis[_g11++] = 0;
	}
	,destroy: function() {
		this.connected = false;
		this.buttons = null;
		this.axis = null;
		this.manager = null;
	}
	,checkStatus: function(ID,Status) {
		return this.checkStatusRaw(this.mapping.getRawID(ID),Status);
	}
	,checkStatusRaw: function(RawID,Status) {
		if(this.buttons[RawID] != null) {
			return this.buttons[RawID].current == Status;
		}
		return false;
	}
	,anyPressed: function(IDArray) {
		var _g = 0;
		while(_g < IDArray.length) {
			var id = IDArray[_g];
			++_g;
			var raw = this.mapping.getRawID(id);
			if(this.buttons[raw] != null) {
				var _this = this.buttons[raw];
				if(_this.current == 1 || _this.current == 2) {
					return true;
				}
			}
		}
		return false;
	}
	,anyPressedRaw: function(RawIDArray) {
		var _g = 0;
		while(_g < RawIDArray.length) {
			var b = RawIDArray[_g];
			++_g;
			if(this.buttons[b] != null) {
				var _this = this.buttons[b];
				if(_this.current == 1 || _this.current == 2) {
					return true;
				}
			}
		}
		return false;
	}
	,anyJustPressed: function(IDArray) {
		var _g = 0;
		while(_g < IDArray.length) {
			var b = IDArray[_g];
			++_g;
			var raw = this.mapping.getRawID(b);
			if(this.buttons[raw] != null) {
				if(this.buttons[raw].current == 2) {
					return true;
				}
			}
		}
		return false;
	}
	,anyJustPressedRaw: function(RawIDArray) {
		var _g = 0;
		while(_g < RawIDArray.length) {
			var b = RawIDArray[_g];
			++_g;
			if(this.buttons[b] != null) {
				if(this.buttons[b].current == 2) {
					return true;
				}
			}
		}
		return false;
	}
	,anyJustReleased: function(IDArray) {
		var _g = 0;
		while(_g < IDArray.length) {
			var b = IDArray[_g];
			++_g;
			var raw = this.mapping.getRawID(b);
			if(this.buttons[raw] != null) {
				if(this.buttons[raw].current == -1) {
					return true;
				}
			}
		}
		return false;
	}
	,anyJustReleasedRaw: function(RawIDArray) {
		var _g = 0;
		while(_g < RawIDArray.length) {
			var b = RawIDArray[_g];
			++_g;
			if(this.buttons[b] != null) {
				if(this.buttons[b].current == -1) {
					return true;
				}
			}
		}
		return false;
	}
	,firstPressedID: function() {
		return this.mapping.getID(this.firstPressedRawID());
	}
	,firstPressedRawID: function() {
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && (button.current == 0 || button.current == -1)) {
				return button.ID;
			}
		}
		return -1;
	}
	,firstJustPressedID: function() {
		return this.mapping.getID(this.firstJustPressedRawID());
	}
	,firstJustPressedRawID: function() {
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && button.current == 2) {
				return button.ID;
			}
		}
		return -1;
	}
	,firstJustReleasedID: function() {
		return this.mapping.getID(this.firstJustReleasedRawID());
	}
	,firstJustReleasedRawID: function() {
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && button.current == -1) {
				return button.ID;
			}
		}
		return -1;
	}
	,getAxis: function(AxisButtonID) {
		var axisValue = this.getAxisValue(this.mapping.getRawID(AxisButtonID));
		if(Math.abs(axisValue) > this.get_deadZone()) {
			return axisValue;
		} else {
			return 0;
		}
	}
	,getAxisRaw: function(RawAxisID) {
		var axisValue = this.getAxisValue(RawAxisID);
		if(Math.abs(axisValue) > this.get_deadZone()) {
			return axisValue;
		}
		return 0;
	}
	,isAxisForAnalogStick: function(AxisIndex) {
		var leftStick = this.mapping.leftStick;
		var rightStick = this.mapping.rightStick;
		if(leftStick != null) {
			if(AxisIndex == leftStick.x || AxisIndex == leftStick.y) {
				return true;
			}
		}
		if(rightStick != null) {
			if(AxisIndex == rightStick.x || AxisIndex == rightStick.y) {
				return true;
			}
		}
		return false;
	}
	,getAnalogStickByAxis: function(AxisIndex) {
		var leftStick = this.mapping.leftStick;
		var rightStick = this.mapping.rightStick;
		if(leftStick != null && AxisIndex == leftStick.x || AxisIndex == leftStick.y) {
			return leftStick;
		}
		if(rightStick != null && AxisIndex == rightStick.x || AxisIndex == rightStick.y) {
			return rightStick;
		}
		return null;
	}
	,getXAxis: function(AxesButtonID) {
		return this.getAnalogXAxisValue(this.mapping.getAnalogStick(AxesButtonID));
	}
	,getXAxisRaw: function(Stick) {
		return this.getAnalogXAxisValue(Stick);
	}
	,getYAxis: function(AxesButtonID) {
		return this.getYAxisRaw(this.mapping.getAnalogStick(AxesButtonID));
	}
	,getYAxisRaw: function(Stick) {
		return this.getAnalogYAxisValue(Stick);
	}
	,anyButton: function(state) {
		if(state == null) {
			state = 1;
		}
		var _g = 0;
		var _g1 = this.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && button.hasState(state)) {
				return true;
			}
		}
		return false;
	}
	,anyInput: function() {
		if(this.anyButton()) {
			return true;
		}
		var numAxis = this.axis.length;
		var _g1 = 0;
		while(_g1 < numAxis) {
			++_g1;
			if(this.axis[0] != 0) {
				return true;
			}
		}
		return false;
	}
	,getAxisValue: function(AxisID) {
		var axisValue = 0;
		if(AxisID == -1) {
			return 0;
		}
		var tmp;
		if(this._device != null && this._device.enabled) {
			var Max = this._device.get_numControls() - 1;
			if(AxisID >= 0) {
				if(Max != null) {
					tmp = AxisID <= Max;
				} else {
					tmp = true;
				}
			} else {
				tmp = false;
			}
		} else {
			tmp = false;
		}
		if(tmp) {
			axisValue = this._device.getControlAt(AxisID).value;
		}
		if(this.isAxisForAnalogStick(AxisID)) {
			var axisValue1 = axisValue;
			if(this.mapping.isAxisFlipped(AxisID)) {
				axisValue1 *= -1;
			}
			axisValue = axisValue1;
		}
		return axisValue;
	}
	,getAnalogXAxisValue: function(stick) {
		if(stick == null) {
			return 0;
		}
		if(this.deadZoneMode == flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR) {
			return this.getAnalogAxisValueCircular(stick,stick.x);
		} else {
			return this.getAnalogAxisValueIndependant(stick.x);
		}
	}
	,getAnalogYAxisValue: function(stick) {
		if(stick == null) {
			return 0;
		}
		if(this.deadZoneMode == flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR) {
			return this.getAnalogAxisValueCircular(stick,stick.y);
		} else {
			return this.getAnalogAxisValueIndependant(stick.y);
		}
	}
	,getAnalogAxisValueCircular: function(stick,axisID) {
		if(stick == null) {
			return 0;
		}
		var xAxis = this.getAxisValue(stick.x);
		var yAxis = this.getAxisValue(stick.y);
		var vector = flixel_math_FlxVector._pool.get().set(xAxis,yAxis);
		vector._inPool = false;
		var length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
		vector.put();
		if(length > this.get_deadZone()) {
			return this.getAxisValue(axisID);
		}
		return 0;
	}
	,getAnalogAxisValueIndependant: function(axisID) {
		var axisValue = this.getAxisValue(axisID);
		if(Math.abs(axisValue) > this.get_deadZone()) {
			return axisValue;
		}
		return 0;
	}
	,handleAxisMove: function(axis,newValue,oldValue) {
		var axisValue = newValue;
		if(this.mapping.isAxisFlipped(axis)) {
			axisValue *= -1;
		}
		newValue = axisValue;
		var axisValue1 = oldValue;
		if(this.mapping.isAxisFlipped(axis)) {
			axisValue1 *= -1;
		}
		oldValue = axisValue1;
		var leftStick = this.mapping.leftStick;
		var rightStick = this.mapping.rightStick;
		var stick = leftStick != null && axis == leftStick.x || axis == leftStick.y ? leftStick : rightStick != null && axis == rightStick.x || axis == rightStick.y ? rightStick : null;
		if(stick.mode == flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL || stick.mode == flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH) {
			this.handleAxisMoveSub(stick,axis,newValue,oldValue,1.0);
			this.handleAxisMoveSub(stick,axis,newValue,oldValue,-1.0);
		}
	}
	,handleAxisMoveSub: function(stick,axis,value,oldValue,sign) {
		if(sign == null) {
			sign = 1.0;
		}
		var digitalButton = -1;
		if(axis == stick.x) {
			if(sign < 0) {
				digitalButton = stick.rawLeft;
			} else {
				digitalButton = stick.rawRight;
			}
		} else if(axis == stick.y) {
			if(sign < 0) {
				digitalButton = stick.rawUp;
			} else {
				digitalButton = stick.rawDown;
			}
		}
		var threshold = stick.digitalThreshold;
		var valueSign = value * sign;
		var oldValueSign = oldValue * sign;
		if(valueSign > threshold && oldValueSign <= threshold) {
			var btn = this.getButton(digitalButton);
			if(btn != null) {
				btn.press();
			}
		} else if(valueSign <= threshold && oldValueSign > threshold) {
			var btn1 = this.getButton(digitalButton);
			if(btn1 != null) {
				btn1.release();
			}
		}
	}
	,createMappingForModel: function(model) {
		switch(model[1]) {
		case 0:
			return new flixel_input_gamepad_mappings_LogitechMapping(this.attachment);
		case 1:
			return new flixel_input_gamepad_mappings_OUYAMapping(this.attachment);
		case 2:
			return new flixel_input_gamepad_mappings_PS4Mapping(this.attachment);
		case 3:
			return new flixel_input_gamepad_mappings_PSVitaMapping(this.attachment);
		case 4:
			return new flixel_input_gamepad_mappings_XInputMapping(this.attachment);
		case 5:
			return new flixel_input_gamepad_mappings_MayflashWiiRemoteMapping(this.attachment);
		case 6:
			return new flixel_input_gamepad_mappings_WiiRemoteMapping(this.attachment);
		case 7:
			return new flixel_input_gamepad_mappings_MFiMapping(this.attachment);
		default:
			return new flixel_input_gamepad_mappings_XInputMapping(this.attachment);
		}
	}
	,get_name: function() {
		if(this._device == null) {
			return null;
		}
		return this._device.name;
	}
	,set_model: function(Model) {
		this.model = Model;
		this.mapping = this.createMappingForModel(this.model);
		return this.model;
	}
	,set_attachment: function(Attachment) {
		this.attachment = Attachment;
		this.mapping.set_attachment(Attachment);
		return this.attachment;
	}
	,get_deadZone: function() {
		if(this.manager.globalDeadZone == null) {
			return this._deadZone;
		} else {
			return this.manager.globalDeadZone;
		}
	}
	,set_deadZone: function(deadZone) {
		return this._deadZone = deadZone;
	}
	,toString: function() {
		var value = this.id;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "id";
		_this.value = value;
		var value1 = this.model;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "model";
		_this1.value = value1;
		var value2 = this.get_deadZone();
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "deadZone";
		_this2.value = value2;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2]);
	}
	,__class__: flixel_input_gamepad_FlxGamepad
	,__properties__: {set_deadZone:"set_deadZone",get_deadZone:"get_deadZone",set_attachment:"set_attachment",set_model:"set_model",get_name:"get_name"}
};
var flixel_input_gamepad_FlxGamepadDeadZoneMode = $hxClasses["flixel.input.gamepad.FlxGamepadDeadZoneMode"] = { __ename__ : ["flixel","input","gamepad","FlxGamepadDeadZoneMode"], __constructs__ : ["INDEPENDENT_AXES","CIRCULAR"] };
flixel_input_gamepad_FlxGamepadDeadZoneMode.INDEPENDENT_AXES = ["INDEPENDENT_AXES",0];
flixel_input_gamepad_FlxGamepadDeadZoneMode.INDEPENDENT_AXES.toString = $estr;
flixel_input_gamepad_FlxGamepadDeadZoneMode.INDEPENDENT_AXES.__enum__ = flixel_input_gamepad_FlxGamepadDeadZoneMode;
flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR = ["CIRCULAR",1];
flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR.toString = $estr;
flixel_input_gamepad_FlxGamepadDeadZoneMode.CIRCULAR.__enum__ = flixel_input_gamepad_FlxGamepadDeadZoneMode;
var flixel_input_gamepad_FlxGamepadModel = $hxClasses["flixel.input.gamepad.FlxGamepadModel"] = { __ename__ : ["flixel","input","gamepad","FlxGamepadModel"], __constructs__ : ["LOGITECH","OUYA","PS4","PSVITA","XINPUT","MAYFLASH_WII_REMOTE","WII_REMOTE","MFI","UNKNOWN"] };
flixel_input_gamepad_FlxGamepadModel.LOGITECH = ["LOGITECH",0];
flixel_input_gamepad_FlxGamepadModel.LOGITECH.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.LOGITECH.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.OUYA = ["OUYA",1];
flixel_input_gamepad_FlxGamepadModel.OUYA.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.OUYA.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.PS4 = ["PS4",2];
flixel_input_gamepad_FlxGamepadModel.PS4.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.PS4.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.PSVITA = ["PSVITA",3];
flixel_input_gamepad_FlxGamepadModel.PSVITA.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.PSVITA.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.XINPUT = ["XINPUT",4];
flixel_input_gamepad_FlxGamepadModel.XINPUT.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.XINPUT.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.MAYFLASH_WII_REMOTE = ["MAYFLASH_WII_REMOTE",5];
flixel_input_gamepad_FlxGamepadModel.MAYFLASH_WII_REMOTE.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.MAYFLASH_WII_REMOTE.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.WII_REMOTE = ["WII_REMOTE",6];
flixel_input_gamepad_FlxGamepadModel.WII_REMOTE.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.WII_REMOTE.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.MFI = ["MFI",7];
flixel_input_gamepad_FlxGamepadModel.MFI.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.MFI.__enum__ = flixel_input_gamepad_FlxGamepadModel;
flixel_input_gamepad_FlxGamepadModel.UNKNOWN = ["UNKNOWN",8];
flixel_input_gamepad_FlxGamepadModel.UNKNOWN.toString = $estr;
flixel_input_gamepad_FlxGamepadModel.UNKNOWN.__enum__ = flixel_input_gamepad_FlxGamepadModel;
var flixel_input_gamepad_FlxGamepadAttachment = $hxClasses["flixel.input.gamepad.FlxGamepadAttachment"] = { __ename__ : ["flixel","input","gamepad","FlxGamepadAttachment"], __constructs__ : ["WII_NUNCHUCK","WII_CLASSIC_CONTROLLER","NONE"] };
flixel_input_gamepad_FlxGamepadAttachment.WII_NUNCHUCK = ["WII_NUNCHUCK",0];
flixel_input_gamepad_FlxGamepadAttachment.WII_NUNCHUCK.toString = $estr;
flixel_input_gamepad_FlxGamepadAttachment.WII_NUNCHUCK.__enum__ = flixel_input_gamepad_FlxGamepadAttachment;
flixel_input_gamepad_FlxGamepadAttachment.WII_CLASSIC_CONTROLLER = ["WII_CLASSIC_CONTROLLER",1];
flixel_input_gamepad_FlxGamepadAttachment.WII_CLASSIC_CONTROLLER.toString = $estr;
flixel_input_gamepad_FlxGamepadAttachment.WII_CLASSIC_CONTROLLER.__enum__ = flixel_input_gamepad_FlxGamepadAttachment;
flixel_input_gamepad_FlxGamepadAttachment.NONE = ["NONE",2];
flixel_input_gamepad_FlxGamepadAttachment.NONE.toString = $estr;
flixel_input_gamepad_FlxGamepadAttachment.NONE.__enum__ = flixel_input_gamepad_FlxGamepadAttachment;
var flixel_input_gamepad_FlxGamepadAnalogStick = function(x,y,settings) {
	this.mode = flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH;
	this.digitalThreshold = 0.5;
	this.rawRight = -1;
	this.rawLeft = -1;
	this.rawDown = -1;
	this.rawUp = -1;
	this.x = x;
	this.y = y;
	if(settings == null) {
		return;
	}
	this.mode = settings.mode != null ? settings.mode : flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH;
	this.rawUp = settings.up != null ? settings.up : -1;
	this.rawDown = settings.down != null ? settings.down : -1;
	this.rawLeft = settings.left != null ? settings.left : -1;
	this.rawRight = settings.right != null ? settings.right : -1;
	this.digitalThreshold = settings.threshold != null ? settings.threshold : 0.5;
};
$hxClasses["flixel.input.gamepad.FlxGamepadAnalogStick"] = flixel_input_gamepad_FlxGamepadAnalogStick;
flixel_input_gamepad_FlxGamepadAnalogStick.__name__ = ["flixel","input","gamepad","FlxGamepadAnalogStick"];
flixel_input_gamepad_FlxGamepadAnalogStick.prototype = {
	toString: function() {
		var value = this.x;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "x";
		_this.value = value;
		var value1 = this.y;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "y";
		_this1.value = value1;
		var value2 = this.rawUp;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "rawUp";
		_this2.value = value2;
		var value3 = this.rawDown;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "rawDown";
		_this3.value = value3;
		var value4 = this.rawLeft;
		var _this4 = flixel_util_LabelValuePair._pool.get();
		_this4.label = "rawLeft";
		_this4.value = value4;
		var value5 = this.rawRight;
		var _this5 = flixel_util_LabelValuePair._pool.get();
		_this5.label = "rawRight";
		_this5.value = value5;
		var value6 = this.digitalThreshold;
		var _this6 = flixel_util_LabelValuePair._pool.get();
		_this6.label = "digitalThreshold";
		_this6.value = value6;
		var value7 = this.mode;
		var _this7 = flixel_util_LabelValuePair._pool.get();
		_this7.label = "mode";
		_this7.value = value7;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3,_this4,_this5,_this6,_this7]);
	}
	,__class__: flixel_input_gamepad_FlxGamepadAnalogStick
};
var flixel_input_gamepad_FlxAnalogToDigitalMode = $hxClasses["flixel.input.gamepad.FlxAnalogToDigitalMode"] = { __ename__ : ["flixel","input","gamepad","FlxAnalogToDigitalMode"], __constructs__ : ["BOTH","ONLY_DIGITAL","ONLY_ANALOG"] };
flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH = ["BOTH",0];
flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH.toString = $estr;
flixel_input_gamepad_FlxAnalogToDigitalMode.BOTH.__enum__ = flixel_input_gamepad_FlxAnalogToDigitalMode;
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL = ["ONLY_DIGITAL",1];
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL.toString = $estr;
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL.__enum__ = flixel_input_gamepad_FlxAnalogToDigitalMode;
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_ANALOG = ["ONLY_ANALOG",2];
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_ANALOG.toString = $estr;
flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_ANALOG.__enum__ = flixel_input_gamepad_FlxAnalogToDigitalMode;
var flixel_input_gamepad_FlxGamepadButton = function(ID) {
	this.value = 0;
	flixel_input_FlxInput.call(this,ID);
};
$hxClasses["flixel.input.gamepad.FlxGamepadButton"] = flixel_input_gamepad_FlxGamepadButton;
flixel_input_gamepad_FlxGamepadButton.__name__ = ["flixel","input","gamepad","FlxGamepadButton"];
flixel_input_gamepad_FlxGamepadButton.__super__ = flixel_input_FlxInput;
flixel_input_gamepad_FlxGamepadButton.prototype = $extend(flixel_input_FlxInput.prototype,{
	__class__: flixel_input_gamepad_FlxGamepadButton
});
var flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$ = {};
$hxClasses["flixel.input.gamepad._FlxGamepadInputID.FlxGamepadInputID_Impl_"] = flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.__name__ = ["flixel","input","gamepad","_FlxGamepadInputID","FlxGamepadInputID_Impl_"];
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.fromString = function(s) {
	s = s.toUpperCase();
	var _this = flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.fromStringMap;
	if(__map_reserved[s] != null ? _this.existsReserved(s) : _this.h.hasOwnProperty(s)) {
		var _this1 = flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.fromStringMap;
		if(__map_reserved[s] != null) {
			return _this1.getReserved(s);
		} else {
			return _this1.h[s];
		}
	} else {
		return -1;
	}
};
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.toString = function(this1) {
	return flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.toStringMap.h[this1];
};
var openfl_ui_GameInput = function() {
	openfl_events_EventDispatcher.call(this);
	openfl_ui_GameInput.__instances.push(this);
};
$hxClasses["openfl.ui.GameInput"] = openfl_ui_GameInput;
openfl_ui_GameInput.__name__ = ["openfl","ui","GameInput"];
openfl_ui_GameInput.getDeviceAt = function(index) {
	if(index >= 0 && index < openfl_ui_GameInput.__deviceList.length) {
		return openfl_ui_GameInput.__deviceList[index];
	}
	return null;
};
openfl_ui_GameInput.__getDevice = function(gamepad) {
	if(gamepad == null) {
		return null;
	}
	if(openfl_ui_GameInput.__devices.h.__keys__[gamepad.__id__] == null) {
		var device = new openfl_ui_GameInputDevice(lime_ui_Joystick.__getDeviceData()[gamepad.id].id,lime_ui_Joystick.__getDeviceData()[gamepad.id].id);
		openfl_ui_GameInput.__deviceList.push(device);
		openfl_ui_GameInput.__devices.set(gamepad,device);
		openfl_ui_GameInput.numDevices = openfl_ui_GameInput.__deviceList.length;
	}
	return openfl_ui_GameInput.__devices.h[gamepad.__id__];
};
openfl_ui_GameInput.__onGamepadAxisMove = function(gamepad,axis,value) {
	var device = openfl_ui_GameInput.__getDevice(gamepad);
	if(device == null) {
		return;
	}
	if(device.enabled) {
		if(!device.__axis.h.hasOwnProperty(axis)) {
			var control;
			switch(axis) {
			case 0:
				control = "LEFT_X";
				break;
			case 1:
				control = "LEFT_Y";
				break;
			case 2:
				control = "RIGHT_X";
				break;
			case 3:
				control = "RIGHT_Y";
				break;
			case 4:
				control = "TRIGGER_LEFT";
				break;
			case 5:
				control = "TRIGGER_RIGHT";
				break;
			default:
				control = "UNKNOWN (" + axis + ")";
			}
			var control1 = new openfl_ui_GameInputControl(device,"AXIS_" + control,-1,1);
			device.__axis.h[axis] = control1;
			device.__controls.push(control1);
		}
		var control2 = device.__axis.h[axis];
		control2.value = value;
		control2.dispatchEvent(new openfl_events_Event("change"));
	}
};
openfl_ui_GameInput.__onGamepadButtonDown = function(gamepad,button) {
	var device = openfl_ui_GameInput.__getDevice(gamepad);
	if(device == null) {
		return;
	}
	if(device.enabled) {
		if(!device.__button.h.hasOwnProperty(button)) {
			var control;
			switch(button) {
			case 0:
				control = "A";
				break;
			case 1:
				control = "B";
				break;
			case 2:
				control = "X";
				break;
			case 3:
				control = "Y";
				break;
			case 4:
				control = "BACK";
				break;
			case 5:
				control = "GUIDE";
				break;
			case 6:
				control = "START";
				break;
			case 7:
				control = "LEFT_STICK";
				break;
			case 8:
				control = "RIGHT_STICK";
				break;
			case 9:
				control = "LEFT_SHOULDER";
				break;
			case 10:
				control = "RIGHT_SHOULDER";
				break;
			case 11:
				control = "DPAD_UP";
				break;
			case 12:
				control = "DPAD_DOWN";
				break;
			case 13:
				control = "DPAD_LEFT";
				break;
			case 14:
				control = "DPAD_RIGHT";
				break;
			default:
				control = "UNKNOWN (" + button + ")";
			}
			var control1 = new openfl_ui_GameInputControl(device,"BUTTON_" + control,0,1);
			device.__button.h[button] = control1;
			device.__controls.push(control1);
		}
		var control2 = device.__button.h[button];
		control2.value = 1;
		control2.dispatchEvent(new openfl_events_Event("change"));
	}
};
openfl_ui_GameInput.__onGamepadButtonUp = function(gamepad,button) {
	var device = openfl_ui_GameInput.__getDevice(gamepad);
	if(device == null) {
		return;
	}
	if(device.enabled) {
		if(!device.__button.h.hasOwnProperty(button)) {
			var control;
			switch(button) {
			case 0:
				control = "A";
				break;
			case 1:
				control = "B";
				break;
			case 2:
				control = "X";
				break;
			case 3:
				control = "Y";
				break;
			case 4:
				control = "BACK";
				break;
			case 5:
				control = "GUIDE";
				break;
			case 6:
				control = "START";
				break;
			case 7:
				control = "LEFT_STICK";
				break;
			case 8:
				control = "RIGHT_STICK";
				break;
			case 9:
				control = "LEFT_SHOULDER";
				break;
			case 10:
				control = "RIGHT_SHOULDER";
				break;
			case 11:
				control = "DPAD_UP";
				break;
			case 12:
				control = "DPAD_DOWN";
				break;
			case 13:
				control = "DPAD_LEFT";
				break;
			case 14:
				control = "DPAD_RIGHT";
				break;
			default:
				control = "UNKNOWN (" + button + ")";
			}
			var control1 = new openfl_ui_GameInputControl(device,"BUTTON_" + control,0,1);
			device.__button.h[button] = control1;
			device.__controls.push(control1);
		}
		var control2 = device.__button.h[button];
		control2.value = 0;
		control2.dispatchEvent(new openfl_events_Event("change"));
	}
};
openfl_ui_GameInput.__onGamepadConnect = function(gamepad) {
	var device = openfl_ui_GameInput.__getDevice(gamepad);
	if(device == null) {
		return;
	}
	var _g = 0;
	var _g1 = openfl_ui_GameInput.__instances;
	while(_g < _g1.length) {
		var instance = _g1[_g];
		++_g;
		instance.dispatchEvent(new openfl_events_GameInputEvent("deviceAdded",null,null,device));
	}
};
openfl_ui_GameInput.__onGamepadDisconnect = function(gamepad) {
	var device = openfl_ui_GameInput.__devices.h[gamepad.__id__];
	if(device != null) {
		if(openfl_ui_GameInput.__devices.h.__keys__[gamepad.__id__] != null) {
			HxOverrides.remove(openfl_ui_GameInput.__deviceList,openfl_ui_GameInput.__devices.h[gamepad.__id__]);
			openfl_ui_GameInput.__devices.remove(gamepad);
		}
		openfl_ui_GameInput.numDevices = openfl_ui_GameInput.__deviceList.length;
		var _g = 0;
		var _g1 = openfl_ui_GameInput.__instances;
		while(_g < _g1.length) {
			var instance = _g1[_g];
			++_g;
			instance.dispatchEvent(new openfl_events_GameInputEvent("deviceRemoved",null,null,device));
		}
	}
};
openfl_ui_GameInput.__super__ = openfl_events_EventDispatcher;
openfl_ui_GameInput.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	__class__: openfl_ui_GameInput
});
var flixel_input_gamepad_FlxGamepadManager = function() {
	this._activeGamepads = [];
	this._gamepads = [];
	flixel_input_gamepad_FlxGamepadManager._gameInput.addEventListener("deviceAdded",$bind(this,this.onDeviceAdded));
	flixel_input_gamepad_FlxGamepadManager._gameInput.addEventListener("deviceRemoved",$bind(this,this.onDeviceRemoved));
	var _g1 = 0;
	var _g = openfl_ui_GameInput.numDevices;
	while(_g1 < _g) this.addGamepad(openfl_ui_GameInput.getDeviceAt(_g1++));
};
$hxClasses["flixel.input.gamepad.FlxGamepadManager"] = flixel_input_gamepad_FlxGamepadManager;
flixel_input_gamepad_FlxGamepadManager.__name__ = ["flixel","input","gamepad","FlxGamepadManager"];
flixel_input_gamepad_FlxGamepadManager.__interfaces__ = [flixel_input_IFlxInputManager];
flixel_input_gamepad_FlxGamepadManager.prototype = {
	getByID: function(GamepadID) {
		return this._activeGamepads[GamepadID];
	}
	,removeByID: function(GamepadID) {
		var gamepad = this._gamepads[GamepadID];
		if(gamepad != null) {
			flixel_util_FlxDestroyUtil.destroy(gamepad);
			this._gamepads[GamepadID] = null;
			var i = this._activeGamepads.indexOf(gamepad);
			if(i != -1) {
				this._activeGamepads[i] = null;
			}
		}
		if(this.lastActive == gamepad) {
			this.lastActive = null;
		}
		if(this.firstActive == gamepad) {
			this.firstActive = null;
		}
	}
	,createByID: function(GamepadID,Model) {
		var gamepad = this._gamepads[GamepadID];
		if(gamepad == null) {
			gamepad = new flixel_input_gamepad_FlxGamepad(GamepadID,this,Model);
			this._gamepads[GamepadID] = gamepad;
			var nullFound = false;
			var _g1 = 0;
			var _g = this._activeGamepads.length;
			while(_g1 < _g) {
				var i = _g1++;
				if(this._activeGamepads[i] == null) {
					this._activeGamepads[i] = gamepad;
					nullFound = true;
					break;
				}
			}
			if(!nullFound) {
				this._activeGamepads.push(gamepad);
			}
		}
		this.lastActive = gamepad;
		if(this.firstActive == null) {
			this.firstActive = gamepad;
		}
		return gamepad;
	}
	,getActiveGamepadIDs: function(IDsArray) {
		if(IDsArray == null) {
			IDsArray = [];
		}
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyInput()) {
				IDsArray.push(gamepad.id);
			}
		}
		return IDsArray;
	}
	,getActiveGamepads: function(GamepadArray) {
		if(GamepadArray == null) {
			GamepadArray = [];
		}
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyInput()) {
				GamepadArray.push(gamepad);
			}
		}
		return GamepadArray;
	}
	,getFirstActiveGamepadID: function() {
		var firstActive = this.getFirstActiveGamepad();
		if(firstActive == null) {
			return -1;
		} else {
			return firstActive.id;
		}
	}
	,getFirstActiveGamepad: function() {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyInput()) {
				return gamepad;
			}
		}
		return null;
	}
	,anyButton: function(state) {
		if(state == null) {
			state = 1;
		}
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyButton(state)) {
				return true;
			}
		}
		return false;
	}
	,anyInput: function() {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.anyInput()) {
				return true;
			}
		}
		return false;
	}
	,anyPressed: function(buttonID) {
		return this.anyHasState(buttonID,1);
	}
	,anyJustPressed: function(buttonID) {
		return this.anyHasState(buttonID,2);
	}
	,anyJustReleased: function(buttonID) {
		return this.anyHasState(buttonID,-1);
	}
	,anyHasState: function(buttonID,state) {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null && gamepad.checkStatusRaw(gamepad.mapping.getRawID(buttonID),state)) {
				return true;
			}
		}
		return false;
	}
	,anyMovedXAxis: function(RawAxisID) {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad == null) {
				continue;
			}
			var value = gamepad.getAnalogXAxisValue(RawAxisID);
			if(value != 0) {
				return value;
			}
		}
		return 0;
	}
	,anyMovedYAxis: function(RawAxisID) {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad == null) {
				continue;
			}
			var value = gamepad.getYAxisRaw(RawAxisID);
			if(value != 0) {
				return value;
			}
		}
		return 0;
	}
	,destroy: function() {
		this._gamepads = flixel_util_FlxDestroyUtil.destroyArray(this._gamepads);
		this.firstActive = null;
		this.lastActive = null;
		this._gamepads = null;
		flixel_input_gamepad_FlxGamepadManager._gameInput.removeEventListener("deviceAdded",$bind(this,this.onDeviceAdded));
		flixel_input_gamepad_FlxGamepadManager._gameInput.removeEventListener("deviceRemoved",$bind(this,this.onDeviceRemoved));
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null) {
				gamepad.reset();
			}
		}
	}
	,onDeviceAdded: function(Event) {
		this.addGamepad(Event.device);
	}
	,onDeviceRemoved: function(Event) {
		this.removeGamepad(Event.device);
	}
	,findGamepadIndex: function(Device) {
		if(Device == null) {
			return -1;
		}
		var _g1 = 0;
		var _g = openfl_ui_GameInput.numDevices;
		while(_g1 < _g) {
			var i = _g1++;
			if(openfl_ui_GameInput.getDeviceAt(i) == Device) {
				return i;
			}
		}
		return -1;
	}
	,addGamepad: function(Device) {
		if(Device == null) {
			return;
		}
		Device.enabled = true;
		var id = this.findGamepadIndex(Device);
		if(id < 0) {
			return;
		}
		this.createByID(id,this.getModelFromDeviceName(Device.name))._device = Device;
	}
	,getModelFromDeviceName: function(name) {
		name = StringTools.replace(StringTools.replace(name.toLowerCase(),"-",""),"_","");
		if(name.indexOf("ouya") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.OUYA;
		} else if(name.indexOf("wireless controller") != -1 || name.indexOf("ps4") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.PS4;
		} else if(name.indexOf("logitech") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.LOGITECH;
		} else if(name.indexOf("xbox") != -1 && name.indexOf("360") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.XINPUT;
		} else if(name.indexOf("xinput") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.XINPUT;
		} else if(name.indexOf("nintendo rvlcnt01tr") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.WII_REMOTE;
		} else if(name.indexOf("nintendo rvlcnt01") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.WII_REMOTE;
		} else if(name.indexOf("mayflash wiimote pc adapter") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.MAYFLASH_WII_REMOTE;
		} else if(name.indexOf("mfi") != -1) {
			return flixel_input_gamepad_FlxGamepadModel.MFI;
		} else {
			return flixel_input_gamepad_FlxGamepadModel.UNKNOWN;
		}
	}
	,removeGamepad: function(Device) {
		if(Device == null) {
			return;
		}
		var _g1 = 0;
		var _g = this._gamepads.length;
		while(_g1 < _g) {
			var i = _g1++;
			var gamepad = this._gamepads[i];
			if(gamepad != null && gamepad._device == Device) {
				this.removeByID(i);
			}
		}
	}
	,update: function() {
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null) {
				gamepad.update();
			}
		}
	}
	,onFocus: function() {
	}
	,onFocusLost: function() {
		this.reset();
	}
	,get_numActiveGamepads: function() {
		var count = 0;
		var _g = 0;
		var _g1 = this._gamepads;
		while(_g < _g1.length) {
			var gamepad = _g1[_g];
			++_g;
			if(gamepad != null) {
				++count;
			}
		}
		return count;
	}
	,__class__: flixel_input_gamepad_FlxGamepadManager
	,__properties__: {get_numActiveGamepads:"get_numActiveGamepads"}
};
var flixel_input_gamepad_id_LogitechID = function() { };
$hxClasses["flixel.input.gamepad.id.LogitechID"] = flixel_input_gamepad_id_LogitechID;
flixel_input_gamepad_id_LogitechID.__name__ = ["flixel","input","gamepad","id","LogitechID"];
var flixel_input_gamepad_id_MFiID = function() { };
$hxClasses["flixel.input.gamepad.id.MFiID"] = flixel_input_gamepad_id_MFiID;
flixel_input_gamepad_id_MFiID.__name__ = ["flixel","input","gamepad","id","MFiID"];
var flixel_input_gamepad_id_MayflashWiiRemoteID = function() { };
$hxClasses["flixel.input.gamepad.id.MayflashWiiRemoteID"] = flixel_input_gamepad_id_MayflashWiiRemoteID;
flixel_input_gamepad_id_MayflashWiiRemoteID.__name__ = ["flixel","input","gamepad","id","MayflashWiiRemoteID"];
var flixel_input_gamepad_id_OUYAID = function() { };
$hxClasses["flixel.input.gamepad.id.OUYAID"] = flixel_input_gamepad_id_OUYAID;
flixel_input_gamepad_id_OUYAID.__name__ = ["flixel","input","gamepad","id","OUYAID"];
var flixel_input_gamepad_id_PS4ID = function() { };
$hxClasses["flixel.input.gamepad.id.PS4ID"] = flixel_input_gamepad_id_PS4ID;
flixel_input_gamepad_id_PS4ID.__name__ = ["flixel","input","gamepad","id","PS4ID"];
var flixel_input_gamepad_id_PSVitaID = function() { };
$hxClasses["flixel.input.gamepad.id.PSVitaID"] = flixel_input_gamepad_id_PSVitaID;
flixel_input_gamepad_id_PSVitaID.__name__ = ["flixel","input","gamepad","id","PSVitaID"];
var flixel_input_gamepad_id_WiiRemoteID = function() { };
$hxClasses["flixel.input.gamepad.id.WiiRemoteID"] = flixel_input_gamepad_id_WiiRemoteID;
flixel_input_gamepad_id_WiiRemoteID.__name__ = ["flixel","input","gamepad","id","WiiRemoteID"];
var flixel_input_gamepad_id_XInputID = function() { };
$hxClasses["flixel.input.gamepad.id.XInputID"] = flixel_input_gamepad_id_XInputID;
flixel_input_gamepad_id_XInputID.__name__ = ["flixel","input","gamepad","id","XInputID"];
var flixel_input_gamepad_lists_FlxBaseGamepadList = function(status,gamepad) {
	this.status = status;
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxBaseGamepadList"] = flixel_input_gamepad_lists_FlxBaseGamepadList;
flixel_input_gamepad_lists_FlxBaseGamepadList.__name__ = ["flixel","input","gamepad","lists","FlxBaseGamepadList"];
flixel_input_gamepad_lists_FlxBaseGamepadList.prototype = {
	check: function(id) {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(id),Status);
	}
	,checkRaw: function(id) {
		return this.gamepad.checkStatusRaw(id,this.status);
	}
	,get_ANY: function() {
		var _g = 0;
		var _g1 = this.gamepad.buttons;
		while(_g < _g1.length) {
			var button = _g1[_g];
			++_g;
			if(button != null && this.gamepad.checkStatusRaw(button.ID,this.status)) {
				return true;
			}
		}
		return false;
	}
	,__class__: flixel_input_gamepad_lists_FlxBaseGamepadList
	,__properties__: {get_ANY:"get_ANY"}
};
var flixel_input_gamepad_lists_FlxGamepadAnalogList = function(gamepad) {
	this.value = new flixel_input_gamepad_lists_FlxGamepadAnalogValueList(gamepad);
	this.justMoved = new flixel_input_gamepad_lists_FlxGamepadAnalogStateList(2,gamepad);
	this.justReleased = new flixel_input_gamepad_lists_FlxGamepadAnalogStateList(-1,gamepad);
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadAnalogList"] = flixel_input_gamepad_lists_FlxGamepadAnalogList;
flixel_input_gamepad_lists_FlxGamepadAnalogList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadAnalogList"];
flixel_input_gamepad_lists_FlxGamepadAnalogList.prototype = {
	__class__: flixel_input_gamepad_lists_FlxGamepadAnalogList
};
var flixel_input_gamepad_lists_FlxGamepadAnalogStateList = function(status,gamepad) {
	this.status = status;
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadAnalogStateList"] = flixel_input_gamepad_lists_FlxGamepadAnalogStateList;
flixel_input_gamepad_lists_FlxGamepadAnalogStateList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadAnalogStateList"];
flixel_input_gamepad_lists_FlxGamepadAnalogStateList.prototype = {
	get_LEFT_STICK: function() {
		return this.checkXY(19);
	}
	,get_LEFT_STICK_X: function() {
		var stick = this.gamepad.mapping.getAnalogStick(19);
		if(stick == null) {
			return false;
		} else {
			return this.gamepad.checkStatusRaw(stick.x,this.status);
		}
	}
	,get_LEFT_STICK_Y: function() {
		var stick = this.gamepad.mapping.getAnalogStick(19);
		if(stick == null) {
			return false;
		} else {
			return this.gamepad.checkStatusRaw(stick.y,this.status);
		}
	}
	,get_RIGHT_STICK: function() {
		return this.checkXY(20);
	}
	,get_RIGHT_STICK_X: function() {
		var stick = this.gamepad.mapping.getAnalogStick(20);
		if(stick == null) {
			return false;
		} else {
			return this.gamepad.checkStatusRaw(stick.x,this.status);
		}
	}
	,get_RIGHT_STICK_Y: function() {
		var stick = this.gamepad.mapping.getAnalogStick(20);
		if(stick == null) {
			return false;
		} else {
			return this.gamepad.checkStatusRaw(stick.y,this.status);
		}
	}
	,checkXY: function(id) {
		var stick = this.gamepad.mapping.getAnalogStick(id);
		if(stick == null) {
			return false;
		}
		var xVal = this.gamepad.checkStatusRaw(stick.x,this.status);
		var yVal = this.gamepad.checkStatusRaw(stick.y,this.status);
		if(xVal && yVal) {
			return true;
		}
		if(xVal) {
			if(this.gamepad.checkStatusRaw(stick.y,0) || this.gamepad.checkStatusRaw(stick.y,-1)) {
				return true;
			}
		}
		if(yVal) {
			if(this.gamepad.checkStatusRaw(stick.x,0) || this.gamepad.checkStatusRaw(stick.x,-1)) {
				return true;
			}
		}
		return false;
	}
	,checkX: function(id) {
		var stick = this.gamepad.mapping.getAnalogStick(id);
		if(stick == null) {
			return false;
		}
		return this.gamepad.checkStatusRaw(stick.x,this.status);
	}
	,checkY: function(id) {
		var stick = this.gamepad.mapping.getAnalogStick(id);
		if(stick == null) {
			return false;
		}
		return this.gamepad.checkStatusRaw(stick.y,this.status);
	}
	,checkRaw: function(RawID,Status) {
		return this.gamepad.checkStatusRaw(RawID,Status);
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadAnalogStateList
	,__properties__: {get_RIGHT_STICK_Y:"get_RIGHT_STICK_Y",get_RIGHT_STICK_X:"get_RIGHT_STICK_X",get_RIGHT_STICK:"get_RIGHT_STICK",get_LEFT_STICK_Y:"get_LEFT_STICK_Y",get_LEFT_STICK_X:"get_LEFT_STICK_X",get_LEFT_STICK:"get_LEFT_STICK"}
};
var flixel_input_gamepad_lists_FlxGamepadAnalogValueList = function(gamepad) {
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadAnalogValueList"] = flixel_input_gamepad_lists_FlxGamepadAnalogValueList;
flixel_input_gamepad_lists_FlxGamepadAnalogValueList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadAnalogValueList"];
flixel_input_gamepad_lists_FlxGamepadAnalogValueList.prototype = {
	get_LEFT_STICK_X: function() {
		var _this = this.gamepad;
		return _this.getAnalogXAxisValue(_this.mapping.getAnalogStick(19));
	}
	,get_LEFT_STICK_Y: function() {
		var _this = this.gamepad;
		return _this.getYAxisRaw(_this.mapping.getAnalogStick(19));
	}
	,get_RIGHT_STICK_X: function() {
		var _this = this.gamepad;
		return _this.getAnalogXAxisValue(_this.mapping.getAnalogStick(20));
	}
	,get_RIGHT_STICK_Y: function() {
		var _this = this.gamepad;
		return _this.getYAxisRaw(_this.mapping.getAnalogStick(20));
	}
	,get_LEFT_TRIGGER: function() {
		return this.gamepad.getAxis(17);
	}
	,get_RIGHT_TRIGGER: function() {
		return this.gamepad.getAxis(18);
	}
	,get_POINTER_X: function() {
		return this.gamepad.getAxis(28);
	}
	,get_POINTER_Y: function() {
		return this.gamepad.getAxis(29);
	}
	,getAxis: function(id) {
		return this.gamepad.getAxis(id);
	}
	,getXAxis: function(id) {
		var _this = this.gamepad;
		return _this.getAnalogXAxisValue(_this.mapping.getAnalogStick(id));
	}
	,getYAxis: function(id) {
		var _this = this.gamepad;
		return _this.getYAxisRaw(_this.mapping.getAnalogStick(id));
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadAnalogValueList
	,__properties__: {get_POINTER_Y:"get_POINTER_Y",get_POINTER_X:"get_POINTER_X",get_RIGHT_TRIGGER:"get_RIGHT_TRIGGER",get_LEFT_TRIGGER:"get_LEFT_TRIGGER",get_RIGHT_STICK_Y:"get_RIGHT_STICK_Y",get_RIGHT_STICK_X:"get_RIGHT_STICK_X",get_LEFT_STICK_Y:"get_LEFT_STICK_Y",get_LEFT_STICK_X:"get_LEFT_STICK_X"}
};
var flixel_input_gamepad_lists_FlxGamepadButtonList = function(status,gamepad) {
	flixel_input_gamepad_lists_FlxBaseGamepadList.call(this,status,gamepad);
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadButtonList"] = flixel_input_gamepad_lists_FlxGamepadButtonList;
flixel_input_gamepad_lists_FlxGamepadButtonList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadButtonList"];
flixel_input_gamepad_lists_FlxGamepadButtonList.__super__ = flixel_input_gamepad_lists_FlxBaseGamepadList;
flixel_input_gamepad_lists_FlxGamepadButtonList.prototype = $extend(flixel_input_gamepad_lists_FlxBaseGamepadList.prototype,{
	get_A: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(0),Status);
	}
	,get_B: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(1),Status);
	}
	,get_X: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(2),Status);
	}
	,get_Y: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(3),Status);
	}
	,get_LEFT_SHOULDER: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(4),Status);
	}
	,get_RIGHT_SHOULDER: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(5),Status);
	}
	,get_BACK: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(6),Status);
	}
	,get_START: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(7),Status);
	}
	,get_LEFT_STICK_CLICK: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(8),Status);
	}
	,get_RIGHT_STICK_CLICK: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(9),Status);
	}
	,get_GUIDE: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(10),Status);
	}
	,get_DPAD_UP: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(11),Status);
	}
	,get_DPAD_DOWN: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(12),Status);
	}
	,get_DPAD_LEFT: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(13),Status);
	}
	,get_DPAD_RIGHT: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(14),Status);
	}
	,get_LEFT_TRIGGER: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(17),Status);
	}
	,get_RIGHT_TRIGGER: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(18),Status);
	}
	,get_EXTRA_0: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(30),Status);
	}
	,get_EXTRA_1: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(31),Status);
	}
	,get_EXTRA_2: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(32),Status);
	}
	,get_EXTRA_3: function() {
		var _this = this.gamepad;
		var Status = this.status;
		return _this.checkStatusRaw(_this.mapping.getRawID(33),Status);
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadButtonList
	,__properties__: $extend(flixel_input_gamepad_lists_FlxBaseGamepadList.prototype.__properties__,{get_EXTRA_3:"get_EXTRA_3",get_EXTRA_2:"get_EXTRA_2",get_EXTRA_1:"get_EXTRA_1",get_EXTRA_0:"get_EXTRA_0",get_RIGHT_TRIGGER:"get_RIGHT_TRIGGER",get_LEFT_TRIGGER:"get_LEFT_TRIGGER",get_DPAD_RIGHT:"get_DPAD_RIGHT",get_DPAD_LEFT:"get_DPAD_LEFT",get_DPAD_DOWN:"get_DPAD_DOWN",get_DPAD_UP:"get_DPAD_UP",get_GUIDE:"get_GUIDE",get_RIGHT_STICK_CLICK:"get_RIGHT_STICK_CLICK",get_LEFT_STICK_CLICK:"get_LEFT_STICK_CLICK",get_START:"get_START",get_BACK:"get_BACK",get_RIGHT_SHOULDER:"get_RIGHT_SHOULDER",get_LEFT_SHOULDER:"get_LEFT_SHOULDER",get_Y:"get_Y",get_X:"get_X",get_B:"get_B",get_A:"get_A"})
});
var flixel_input_gamepad_lists_FlxGamepadMotionValueList = function(gamepad) {
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadMotionValueList"] = flixel_input_gamepad_lists_FlxGamepadMotionValueList;
flixel_input_gamepad_lists_FlxGamepadMotionValueList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadMotionValueList"];
flixel_input_gamepad_lists_FlxGamepadMotionValueList.prototype = {
	get_TILT_PITCH: function() {
		if(!this.gamepad.mapping.supportsMotion) {
			return 0;
		} else {
			return this.gamepad.getAxis(26);
		}
	}
	,get_TILT_ROLL: function() {
		if(!this.gamepad.mapping.supportsMotion) {
			return 0;
		} else {
			return this.gamepad.getAxis(27);
		}
	}
	,getAxis: function(id) {
		if(!this.gamepad.mapping.supportsMotion) {
			return 0;
		}
		return this.gamepad.getAxis(id);
	}
	,get_isSupported: function() {
		return this.gamepad.mapping.supportsMotion;
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadMotionValueList
	,__properties__: {get_TILT_ROLL:"get_TILT_ROLL",get_TILT_PITCH:"get_TILT_PITCH",get_isSupported:"get_isSupported"}
};
var flixel_input_gamepad_lists_FlxGamepadPointerValueList = function(gamepad) {
	this.gamepad = gamepad;
};
$hxClasses["flixel.input.gamepad.lists.FlxGamepadPointerValueList"] = flixel_input_gamepad_lists_FlxGamepadPointerValueList;
flixel_input_gamepad_lists_FlxGamepadPointerValueList.__name__ = ["flixel","input","gamepad","lists","FlxGamepadPointerValueList"];
flixel_input_gamepad_lists_FlxGamepadPointerValueList.prototype = {
	get_X: function() {
		if(!this.gamepad.mapping.supportsPointer) {
			return 0;
		} else {
			return this.gamepad.getAxis(28);
		}
	}
	,get_Y: function() {
		if(!this.gamepad.mapping.supportsPointer) {
			return 0;
		} else {
			return this.gamepad.getAxis(29);
		}
	}
	,getAxis: function(id) {
		if(!this.gamepad.mapping.supportsPointer) {
			return 0;
		}
		return this.gamepad.getAxis(id);
	}
	,get_isSupported: function() {
		return this.gamepad.mapping.supportsPointer;
	}
	,__class__: flixel_input_gamepad_lists_FlxGamepadPointerValueList
	,__properties__: {get_Y:"get_Y",get_X:"get_X",get_isSupported:"get_isSupported"}
};
var flixel_input_gamepad_mappings_FlxGamepadMapping = function(attachment) {
	this.attachment = flixel_input_gamepad_FlxGamepadAttachment.NONE;
	this.supportsPointer = false;
	this.supportsMotion = false;
	if(attachment != null) {
		this.set_attachment(attachment);
	}
	this.initValues();
};
$hxClasses["flixel.input.gamepad.mappings.FlxGamepadMapping"] = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_FlxGamepadMapping.__name__ = ["flixel","input","gamepad","mappings","FlxGamepadMapping"];
flixel_input_gamepad_mappings_FlxGamepadMapping.prototype = {
	initValues: function() {
	}
	,getAnalogStick: function(ID) {
		switch(ID) {
		case 19:
			return this.leftStick;
		case 20:
			return this.rightStick;
		default:
			return null;
		}
	}
	,getID: function(rawID) {
		return -1;
	}
	,getRawID: function(ID) {
		return -1;
	}
	,isAxisForMotion: function(ID) {
		return false;
	}
	,isAxisFlipped: function(axisID) {
		return false;
	}
	,set_attachment: function(attachment) {
		return this.attachment = attachment;
	}
	,__class__: flixel_input_gamepad_mappings_FlxGamepadMapping
	,__properties__: {set_attachment:"set_attachment"}
};
var flixel_input_gamepad_mappings_Manufacturer = $hxClasses["flixel.input.gamepad.mappings.Manufacturer"] = { __ename__ : ["flixel","input","gamepad","mappings","Manufacturer"], __constructs__ : ["GooglePepper","AdobeWindows","Unknown"] };
flixel_input_gamepad_mappings_Manufacturer.GooglePepper = ["GooglePepper",0];
flixel_input_gamepad_mappings_Manufacturer.GooglePepper.toString = $estr;
flixel_input_gamepad_mappings_Manufacturer.GooglePepper.__enum__ = flixel_input_gamepad_mappings_Manufacturer;
flixel_input_gamepad_mappings_Manufacturer.AdobeWindows = ["AdobeWindows",1];
flixel_input_gamepad_mappings_Manufacturer.AdobeWindows.toString = $estr;
flixel_input_gamepad_mappings_Manufacturer.AdobeWindows.__enum__ = flixel_input_gamepad_mappings_Manufacturer;
flixel_input_gamepad_mappings_Manufacturer.Unknown = ["Unknown",2];
flixel_input_gamepad_mappings_Manufacturer.Unknown.toString = $estr;
flixel_input_gamepad_mappings_Manufacturer.Unknown.__enum__ = flixel_input_gamepad_mappings_Manufacturer;
flixel_input_gamepad_mappings_Manufacturer.__meta__ = { obj : { SuppressWarnings : ["checkstyle:MemberName"]}};
var flixel_input_gamepad_mappings_LogitechMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.LogitechMapping"] = flixel_input_gamepad_mappings_LogitechMapping;
flixel_input_gamepad_mappings_LogitechMapping.__name__ = ["flixel","input","gamepad","mappings","LogitechMapping"];
flixel_input_gamepad_mappings_LogitechMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_LogitechMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case -5:
			return 10;
		case 0:
			return 2;
		case 1:
			return 0;
		case 2:
			return 1;
		case 3:
			return 3;
		case 4:
			return 4;
		case 5:
			return 5;
		case 6:
			return 17;
		case 7:
			return 18;
		case 8:
			return 6;
		case 9:
			return 7;
		case 10:
			return 8;
		case 11:
			return 9;
		case 16:
			return 11;
		case 17:
			return 12;
		case 18:
			return 13;
		case 19:
			return 14;
		default:
			if(rawID == this.leftStick.rawUp) {
				return 34;
			} else if(rawID == this.leftStick.rawDown) {
				return 36;
			} else if(rawID == this.leftStick.rawLeft) {
				return 37;
			} else if(rawID == this.leftStick.rawRight) {
				return 35;
			} else if(rawID == this.rightStick.rawUp) {
				return 38;
			} else if(rawID == this.rightStick.rawDown) {
				return 40;
			} else if(rawID == this.rightStick.rawLeft) {
				return 41;
			} else if(rawID == this.rightStick.rawRight) {
				return 39;
			} else {
				return -1;
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 1;
		case 1:
			return 2;
		case 2:
			return 0;
		case 3:
			return 3;
		case 4:
			return 4;
		case 5:
			return 5;
		case 6:
			return 8;
		case 7:
			return 9;
		case 8:
			return 10;
		case 9:
			return 11;
		case 10:
			return -5;
		case 11:
			return 16;
		case 12:
			return 17;
		case 13:
			return 18;
		case 14:
			return 19;
		case 17:
			return 6;
		case 18:
			return 7;
		case 34:
			return flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_LogitechMapping
});
var flixel_input_gamepad_mappings_MFiMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.MFiMapping"] = flixel_input_gamepad_mappings_MFiMapping;
flixel_input_gamepad_mappings_MFiMapping.__name__ = ["flixel","input","gamepad","mappings","MFiMapping"];
flixel_input_gamepad_mappings_MFiMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_MFiMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case 6:
			return 0;
		case 7:
			return 1;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 6;
		case 11:
			return 10;
		case 12:
			return 7;
		case 13:
			return 8;
		case 14:
			return 9;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 11;
		case 18:
			return 12;
		case 19:
			return 13;
		case 20:
			return 14;
		default:
			if(rawID == this.leftStick.rawUp) {
				return 34;
			} else if(rawID == this.leftStick.rawDown) {
				return 36;
			} else if(rawID == this.leftStick.rawLeft) {
				return 37;
			} else if(rawID == this.leftStick.rawRight) {
				return 35;
			} else if(rawID == this.rightStick.rawUp) {
				return 38;
			} else if(rawID == this.rightStick.rawDown) {
				return 40;
			} else if(rawID == this.rightStick.rawLeft) {
				return 41;
			} else if(rawID == this.rightStick.rawRight) {
				return 39;
			} else {
				return -1;
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 6;
		case 1:
			return 7;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 10;
		case 7:
			return 12;
		case 8:
			return 13;
		case 9:
			return 14;
		case 10:
			return 11;
		case 11:
			return 17;
		case 12:
			return 18;
		case 13:
			return 19;
		case 14:
			return 20;
		case 17:
			return 4;
		case 18:
			return 5;
		case 34:
			return flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_MFiMapping
});
var flixel_input_gamepad_mappings_MayflashWiiRemoteMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.MayflashWiiRemoteMapping"] = flixel_input_gamepad_mappings_MayflashWiiRemoteMapping;
flixel_input_gamepad_mappings_MayflashWiiRemoteMapping.__name__ = ["flixel","input","gamepad","mappings","MayflashWiiRemoteMapping"];
flixel_input_gamepad_mappings_MayflashWiiRemoteMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_MayflashWiiRemoteMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.supportsPointer = true;
	}
	,getID: function(rawID) {
		switch(this.attachment[1]) {
		case 0:
			return this.getIDNunchuk(rawID);
		case 1:
			return this.getIDClassicController(rawID);
		case 2:
			return this.getIDDefault(rawID);
		}
	}
	,getIDClassicController: function(rawID) {
		switch(rawID) {
		case 4:
			return 11;
		case 5:
			return 12;
		case 6:
			return 13;
		case 7:
			return 14;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 0;
		case 11:
			return 1;
		case 12:
			return 17;
		case 13:
			return 18;
		case 14:
			return 4;
		case 15:
			return 5;
		case 16:
			return 6;
		case 17:
			return 7;
		case 19:
			return 10;
		default:
			if(rawID == this.leftStick.rawUp) {
				return 34;
			} else if(rawID == this.leftStick.rawDown) {
				return 36;
			} else if(rawID == this.leftStick.rawLeft) {
				return 37;
			} else if(rawID == this.leftStick.rawRight) {
				return 35;
			} else if(rawID == this.rightStick.rawUp) {
				return 38;
			} else if(rawID == this.rightStick.rawDown) {
				return 40;
			} else if(rawID == this.rightStick.rawLeft) {
				return 41;
			} else if(rawID == this.rightStick.rawRight) {
				return 39;
			} else {
				return -1;
			}
		}
	}
	,getIDNunchuk: function(rawID) {
		switch(rawID) {
		case 4:
			return 11;
		case 5:
			return 12;
		case 6:
			return 13;
		case 7:
			return 14;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 0;
		case 11:
			return 1;
		case 12:
			return 6;
		case 13:
			return 7;
		case 14:
			return 17;
		case 15:
			return 4;
		case 19:
			return 10;
		default:
			return -1;
		}
	}
	,getIDDefault: function(rawID) {
		switch(rawID) {
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 0;
		case 11:
			return 1;
		case 12:
			return 6;
		case 13:
			return 7;
		case 19:
			return 10;
		case 22:
			return 11;
		case 23:
			return 12;
		case 24:
			return 13;
		case 25:
			return 14;
		default:
			return -1;
		}
	}
	,getRawID: function(ID) {
		switch(this.attachment[1]) {
		case 0:
			return this.getRawNunchuk(ID);
		case 1:
			return this.getRawClassicController(ID);
		case 2:
			return this.getRawDefault(ID);
		}
	}
	,getRawClassicController: function(ID) {
		switch(ID) {
		case 0:
			return 10;
		case 1:
			return 11;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 14;
		case 5:
			return 15;
		case 6:
			return 16;
		case 7:
			return 17;
		case 10:
			return 19;
		case 11:
			return 4;
		case 12:
			return 5;
		case 13:
			return 6;
		case 14:
			return 7;
		case 17:
			return 12;
		case 18:
			return 13;
		case 30:
			return -1;
		case 31:
			return -1;
		case 34:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return this.getRawDefault(ID);
		}
	}
	,getRawNunchuk: function(ID) {
		switch(ID) {
		case 0:
			return 10;
		case 1:
			return 11;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 6:
			return 12;
		case 7:
			return 13;
		case 10:
			return 19;
		case 11:
			return 4;
		case 12:
			return 5;
		case 13:
			return 6;
		case 14:
			return 7;
		case 17:
			return 14;
		case 28:
			return 2;
		case 29:
			return 3;
		case 34:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,getRawDefault: function(ID) {
		switch(ID) {
		case 0:
			return 10;
		case 1:
			return 11;
		case 2:
			return 8;
		case 3:
			return 9;
		case 6:
			return 12;
		case 7:
			return 13;
		case 10:
			return 19;
		case 11:
			return 22;
		case 12:
			return 23;
		case 13:
			return 24;
		case 14:
			return 25;
		default:
			return -1;
		}
	}
	,set_attachment: function(attachment) {
		var tmp;
		switch(attachment[1]) {
		case 0:case 1:
			tmp = flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK;
			break;
		case 2:
			tmp = flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD;
			break;
		}
		this.leftStick = tmp;
		this.rightStick = attachment[1] == 1 ? flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK : null;
		return flixel_input_gamepad_mappings_FlxGamepadMapping.prototype.set_attachment.call(this,attachment);
	}
	,__class__: flixel_input_gamepad_mappings_MayflashWiiRemoteMapping
});
var flixel_input_gamepad_mappings_OUYAMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.OUYAMapping"] = flixel_input_gamepad_mappings_OUYAMapping;
flixel_input_gamepad_mappings_OUYAMapping.__name__ = ["flixel","input","gamepad","mappings","OUYAMapping"];
flixel_input_gamepad_mappings_OUYAMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_OUYAMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case 0:
			return 0;
		case 1:
			return 1;
		case 2:
			return 10;
		case 3:
			return 2;
		case 4:
			return 3;
		case 6:
			return 4;
		case 7:
			return 5;
		case 8:
			return 17;
		case 9:
			return 18;
		case 10:
			return 8;
		case 11:
			return 9;
		case 13:
			return 13;
		case 14:
			return 14;
		case 15:
			return 12;
		case 16:
			return 11;
		default:
			if(rawID == this.leftStick.rawUp) {
				return 34;
			} else if(rawID == this.leftStick.rawDown) {
				return 36;
			} else if(rawID == this.leftStick.rawLeft) {
				return 37;
			} else if(rawID == this.leftStick.rawRight) {
				return 35;
			} else if(rawID == this.rightStick.rawUp) {
				return 38;
			} else if(rawID == this.rightStick.rawDown) {
				return 40;
			} else if(rawID == this.rightStick.rawLeft) {
				return 41;
			} else if(rawID == this.rightStick.rawRight) {
				return 39;
			} else {
				return -1;
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 0;
		case 1:
			return 1;
		case 2:
			return 3;
		case 3:
			return 4;
		case 4:
			return 6;
		case 5:
			return 7;
		case 8:
			return 10;
		case 9:
			return 11;
		case 10:
			return 2;
		case 11:
			return 16;
		case 12:
			return 15;
		case 13:
			return 13;
		case 14:
			return 14;
		case 17:
			return 8;
		case 18:
			return 9;
		case 34:
			return flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_OUYAMapping
});
var flixel_input_gamepad_mappings_PS4Mapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.PS4Mapping"] = flixel_input_gamepad_mappings_PS4Mapping;
flixel_input_gamepad_mappings_PS4Mapping.__name__ = ["flixel","input","gamepad","mappings","PS4Mapping"];
flixel_input_gamepad_mappings_PS4Mapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_PS4Mapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case 6:
			return 0;
		case 7:
			return 1;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 6;
		case 11:
			return 10;
		case 12:
			return 7;
		case 13:
			return 8;
		case 14:
			return 9;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 11;
		case 18:
			return 12;
		case 19:
			return 13;
		case 20:
			return 14;
		default:
			if(rawID == this.leftStick.rawUp) {
				return 34;
			} else if(rawID == this.leftStick.rawDown) {
				return 36;
			} else if(rawID == this.leftStick.rawLeft) {
				return 37;
			} else if(rawID == this.leftStick.rawRight) {
				return 35;
			} else if(rawID == this.rightStick.rawUp) {
				return 38;
			} else if(rawID == this.rightStick.rawDown) {
				return 40;
			} else if(rawID == this.rightStick.rawLeft) {
				return 41;
			} else if(rawID == this.rightStick.rawRight) {
				return 39;
			} else {
				return -1;
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 6;
		case 1:
			return 7;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 10;
		case 7:
			return 12;
		case 8:
			return 13;
		case 9:
			return 14;
		case 10:
			return 11;
		case 11:
			return 17;
		case 12:
			return 18;
		case 13:
			return 19;
		case 14:
			return 20;
		case 17:
			return 4;
		case 18:
			return 5;
		case 34:
			return flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_PS4Mapping
});
var flixel_input_gamepad_mappings_PSVitaMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.PSVitaMapping"] = flixel_input_gamepad_mappings_PSVitaMapping;
flixel_input_gamepad_mappings_PSVitaMapping.__name__ = ["flixel","input","gamepad","mappings","PSVitaMapping"];
flixel_input_gamepad_mappings_PSVitaMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_PSVitaMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case 6:
			return 0;
		case 7:
			return 1;
		case 8:
			return 2;
		case 9:
			return 3;
		case 10:
			return 6;
		case 12:
			return 7;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 11;
		case 18:
			return 12;
		case 19:
			return 13;
		case 20:
			return 14;
		default:
			if(rawID == this.leftStick.rawUp) {
				return 34;
			} else if(rawID == this.leftStick.rawDown) {
				return 34;
			} else if(rawID == this.leftStick.rawLeft) {
				return 37;
			} else if(rawID == this.leftStick.rawRight) {
				return 35;
			} else if(rawID == this.rightStick.rawUp) {
				return 38;
			} else if(rawID == this.rightStick.rawDown) {
				return 40;
			} else if(rawID == this.rightStick.rawLeft) {
				return 41;
			} else if(rawID == this.rightStick.rawRight) {
				return 39;
			} else {
				return -1;
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 6;
		case 1:
			return 7;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 10;
		case 7:
			return 12;
		case 11:
			return 17;
		case 12:
			return 18;
		case 13:
			return 19;
		case 14:
			return 20;
		case 34:
			return flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,isAxisFlipped: function(axisID) {
		if(axisID != flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK.y) {
			return axisID == flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK.y;
		} else {
			return true;
		}
	}
	,__class__: flixel_input_gamepad_mappings_PSVitaMapping
});
var flixel_input_gamepad_mappings_WiiRemoteMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.WiiRemoteMapping"] = flixel_input_gamepad_mappings_WiiRemoteMapping;
flixel_input_gamepad_mappings_WiiRemoteMapping.__name__ = ["flixel","input","gamepad","mappings","WiiRemoteMapping"];
flixel_input_gamepad_mappings_WiiRemoteMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_WiiRemoteMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.supportsMotion = true;
		this.supportsPointer = false;
	}
	,getID: function(rawID) {
		switch(this.attachment[1]) {
		case 0:
			return this.getIDNunchuk(rawID);
		case 1:
			return this.getIDClassicController(rawID);
		case 2:
			return this.getIDDefault(rawID);
		}
	}
	,getIDClassicController: function(rawID) {
		switch(rawID) {
		case 5:
			return 11;
		case 6:
			return 12;
		case 7:
			return 13;
		case 8:
			return 14;
		case 9:
			return 1;
		case 10:
			return 0;
		case 11:
			return 2;
		case 12:
			return 3;
		case 13:
			return 17;
		case 14:
			return 18;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 7;
		case 18:
			return 6;
		case 19:
			return 10;
		case 20:
			return 30;
		case 21:
			return 31;
		default:
			if(rawID == this.leftStick.rawUp) {
				return 34;
			} else if(rawID == this.leftStick.rawDown) {
				return 36;
			} else if(rawID == this.leftStick.rawLeft) {
				return 37;
			} else if(rawID == this.leftStick.rawRight) {
				return 35;
			} else if(rawID == this.rightStick.rawUp) {
				return 38;
			} else if(rawID == this.rightStick.rawDown) {
				return 40;
			} else if(rawID == this.rightStick.rawLeft) {
				return 41;
			} else if(rawID == this.rightStick.rawRight) {
				return 39;
			} else {
				return -1;
			}
		}
	}
	,getIDNunchuk: function(rawID) {
		switch(rawID) {
		case 5:
			return 11;
		case 6:
			return 12;
		case 7:
			return 13;
		case 8:
			return 14;
		case 9:
			return 0;
		case 10:
			return 1;
		case 11:
			return 4;
		case 12:
			return 17;
		case 13:
			return 2;
		case 14:
			return 3;
		case 15:
			return 7;
		case 16:
			return 6;
		case 17:
			return 10;
		default:
			return -1;
		}
	}
	,getIDDefault: function(rawID) {
		switch(rawID) {
		case 9:
			return 2;
		case 10:
			return 3;
		case 11:
			return 0;
		case 12:
			return 1;
		case 13:
			return 7;
		case 14:
			return 6;
		case 15:
			return 10;
		case 22:
			return 11;
		case 23:
			return 12;
		case 24:
			return 13;
		case 25:
			return 14;
		default:
			return -1;
		}
	}
	,getRawID: function(ID) {
		switch(this.attachment[1]) {
		case 0:
			return this.getRawNunchuk(ID);
		case 1:
			return this.getRawClassicController(ID);
		case 2:
			return this.getRawDefault(ID);
		}
	}
	,getRawClassicController: function(ID) {
		switch(ID) {
		case 0:
			return 10;
		case 1:
			return 9;
		case 2:
			return 11;
		case 3:
			return 12;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 18;
		case 7:
			return 17;
		case 10:
			return 19;
		case 11:
			return 5;
		case 12:
			return 6;
		case 13:
			return 7;
		case 14:
			return 8;
		case 17:
			return 13;
		case 18:
			return 14;
		case 30:
			return 20;
		case 31:
			return 21;
		case 34:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,getRawNunchuk: function(ID) {
		switch(ID) {
		case 0:
			return 9;
		case 1:
			return 10;
		case 2:
			return 13;
		case 3:
			return 14;
		case 4:
			return 11;
		case 6:
			return 16;
		case 7:
			return 15;
		case 10:
			return 17;
		case 11:
			return 5;
		case 12:
			return 6;
		case 13:
			return 7;
		case 14:
			return 8;
		case 17:
			return 12;
		case 26:
			return 3;
		case 27:
			return 2;
		case 34:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,getRawDefault: function(ID) {
		switch(ID) {
		case 0:
			return 11;
		case 1:
			return 12;
		case 2:
			return 9;
		case 3:
			return 10;
		case 6:
			return 14;
		case 7:
			return 13;
		case 10:
			return 15;
		case 11:
			return 22;
		case 12:
			return 23;
		case 13:
			return 24;
		case 14:
			return 25;
		case 26:
			return 2;
		case 27:
			return 3;
		default:
			return -1;
		}
	}
	,isAxisForMotion: function(ID) {
		if(this.attachment == flixel_input_gamepad_FlxGamepadAttachment.NONE) {
			if(ID == 2 || ID == 3) {
				return true;
			}
		} else if(this.attachment == flixel_input_gamepad_FlxGamepadAttachment.WII_NUNCHUCK) {
			if(ID == 3 || ID == 2) {
				return true;
			}
		}
		return false;
	}
	,isAxisFlipped: function(axisID) {
		return axisID == 4;
	}
	,set_attachment: function(attachment) {
		var tmp;
		switch(attachment[1]) {
		case 0:case 1:
			tmp = flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK;
			break;
		case 2:
			tmp = flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD;
			break;
		}
		this.leftStick = tmp;
		this.rightStick = attachment[1] == 1 ? flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK : null;
		return flixel_input_gamepad_mappings_FlxGamepadMapping.prototype.set_attachment.call(this,attachment);
	}
	,__class__: flixel_input_gamepad_mappings_WiiRemoteMapping
});
var flixel_input_gamepad_mappings_XInputMapping = function(attachment) {
	flixel_input_gamepad_mappings_FlxGamepadMapping.call(this,attachment);
};
$hxClasses["flixel.input.gamepad.mappings.XInputMapping"] = flixel_input_gamepad_mappings_XInputMapping;
flixel_input_gamepad_mappings_XInputMapping.__name__ = ["flixel","input","gamepad","mappings","XInputMapping"];
flixel_input_gamepad_mappings_XInputMapping.__super__ = flixel_input_gamepad_mappings_FlxGamepadMapping;
flixel_input_gamepad_mappings_XInputMapping.prototype = $extend(flixel_input_gamepad_mappings_FlxGamepadMapping.prototype,{
	initValues: function() {
		this.leftStick = flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK;
		this.rightStick = flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK;
	}
	,getID: function(rawID) {
		switch(rawID) {
		case -1:
			return 10;
		case 4:
			return 17;
		case 5:
			return 18;
		case 6:
			return 1;
		case 7:
			return 0;
		case 8:
			return 3;
		case 9:
			return 2;
		case 10:
			return 6;
		case 12:
			return 7;
		case 13:
			return 8;
		case 14:
			return 9;
		case 15:
			return 4;
		case 16:
			return 5;
		case 17:
			return 11;
		case 18:
			return 12;
		case 19:
			return 13;
		case 20:
			return 14;
		default:
			if(rawID == this.leftStick.rawUp) {
				return 34;
			} else if(rawID == this.leftStick.rawDown) {
				return 36;
			} else if(rawID == this.leftStick.rawLeft) {
				return 37;
			} else if(rawID == this.leftStick.rawRight) {
				return 35;
			} else if(rawID == this.rightStick.rawUp) {
				return 38;
			} else if(rawID == this.rightStick.rawDown) {
				return 40;
			} else if(rawID == this.rightStick.rawLeft) {
				return 41;
			} else if(rawID == this.rightStick.rawRight) {
				return 39;
			} else {
				return -1;
			}
		}
	}
	,getRawID: function(ID) {
		switch(ID) {
		case 0:
			return 6;
		case 1:
			return 7;
		case 2:
			return 8;
		case 3:
			return 9;
		case 4:
			return 15;
		case 5:
			return 16;
		case 6:
			return 10;
		case 7:
			return 12;
		case 8:
			return 13;
		case 9:
			return 14;
		case 10:
			return -1;
		case 11:
			return 17;
		case 12:
			return 18;
		case 13:
			return 19;
		case 14:
			return 20;
		case 17:
			return 4;
		case 18:
			return 5;
		case 34:
			return flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK.rawUp;
		case 35:
			return flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK.rawRight;
		case 36:
			return flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK.rawDown;
		case 37:
			return flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK.rawLeft;
		case 38:
			return flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK.rawUp;
		case 39:
			return flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK.rawRight;
		case 40:
			return flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK.rawDown;
		case 41:
			return flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK.rawLeft;
		default:
			return -1;
		}
	}
	,__class__: flixel_input_gamepad_mappings_XInputMapping
});
var flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$ = {};
$hxClasses["flixel.input.keyboard._FlxKey.FlxKey_Impl_"] = flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.__name__ = ["flixel","input","keyboard","_FlxKey","FlxKey_Impl_"];
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromString = function(s) {
	s = s.toUpperCase();
	var _this = flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromStringMap;
	if(__map_reserved[s] != null ? _this.existsReserved(s) : _this.h.hasOwnProperty(s)) {
		var _this1 = flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromStringMap;
		if(__map_reserved[s] != null) {
			return _this1.getReserved(s);
		} else {
			return _this1.h[s];
		}
	} else {
		return -1;
	}
};
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.toString = function(this1) {
	return flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.toStringMap.h[this1];
};
var flixel_input_keyboard_FlxKeyList = function(status,keyManager) {
	flixel_input_FlxBaseKeyList.call(this,status,keyManager);
};
$hxClasses["flixel.input.keyboard.FlxKeyList"] = flixel_input_keyboard_FlxKeyList;
flixel_input_keyboard_FlxKeyList.__name__ = ["flixel","input","keyboard","FlxKeyList"];
flixel_input_keyboard_FlxKeyList.__super__ = flixel_input_FlxBaseKeyList;
flixel_input_keyboard_FlxKeyList.prototype = $extend(flixel_input_FlxBaseKeyList.prototype,{
	get_A: function() {
		return this.keyManager.checkStatus(65,this.status);
	}
	,get_B: function() {
		return this.keyManager.checkStatus(66,this.status);
	}
	,get_C: function() {
		return this.keyManager.checkStatus(67,this.status);
	}
	,get_D: function() {
		return this.keyManager.checkStatus(68,this.status);
	}
	,get_E: function() {
		return this.keyManager.checkStatus(69,this.status);
	}
	,get_F: function() {
		return this.keyManager.checkStatus(70,this.status);
	}
	,get_G: function() {
		return this.keyManager.checkStatus(71,this.status);
	}
	,get_H: function() {
		return this.keyManager.checkStatus(72,this.status);
	}
	,get_I: function() {
		return this.keyManager.checkStatus(73,this.status);
	}
	,get_J: function() {
		return this.keyManager.checkStatus(74,this.status);
	}
	,get_K: function() {
		return this.keyManager.checkStatus(75,this.status);
	}
	,get_L: function() {
		return this.keyManager.checkStatus(76,this.status);
	}
	,get_M: function() {
		return this.keyManager.checkStatus(77,this.status);
	}
	,get_N: function() {
		return this.keyManager.checkStatus(78,this.status);
	}
	,get_O: function() {
		return this.keyManager.checkStatus(79,this.status);
	}
	,get_P: function() {
		return this.keyManager.checkStatus(80,this.status);
	}
	,get_Q: function() {
		return this.keyManager.checkStatus(81,this.status);
	}
	,get_R: function() {
		return this.keyManager.checkStatus(82,this.status);
	}
	,get_S: function() {
		return this.keyManager.checkStatus(83,this.status);
	}
	,get_T: function() {
		return this.keyManager.checkStatus(84,this.status);
	}
	,get_U: function() {
		return this.keyManager.checkStatus(85,this.status);
	}
	,get_V: function() {
		return this.keyManager.checkStatus(86,this.status);
	}
	,get_W: function() {
		return this.keyManager.checkStatus(87,this.status);
	}
	,get_X: function() {
		return this.keyManager.checkStatus(88,this.status);
	}
	,get_Y: function() {
		return this.keyManager.checkStatus(89,this.status);
	}
	,get_Z: function() {
		return this.keyManager.checkStatus(90,this.status);
	}
	,get_ZERO: function() {
		return this.keyManager.checkStatus(48,this.status);
	}
	,get_ONE: function() {
		return this.keyManager.checkStatus(49,this.status);
	}
	,get_TWO: function() {
		return this.keyManager.checkStatus(50,this.status);
	}
	,get_THREE: function() {
		return this.keyManager.checkStatus(51,this.status);
	}
	,get_FOUR: function() {
		return this.keyManager.checkStatus(52,this.status);
	}
	,get_FIVE: function() {
		return this.keyManager.checkStatus(53,this.status);
	}
	,get_SIX: function() {
		return this.keyManager.checkStatus(54,this.status);
	}
	,get_SEVEN: function() {
		return this.keyManager.checkStatus(55,this.status);
	}
	,get_EIGHT: function() {
		return this.keyManager.checkStatus(56,this.status);
	}
	,get_NINE: function() {
		return this.keyManager.checkStatus(57,this.status);
	}
	,get_PAGEUP: function() {
		return this.keyManager.checkStatus(33,this.status);
	}
	,get_PAGEDOWN: function() {
		return this.keyManager.checkStatus(34,this.status);
	}
	,get_HOME: function() {
		return this.keyManager.checkStatus(36,this.status);
	}
	,get_END: function() {
		return this.keyManager.checkStatus(35,this.status);
	}
	,get_INSERT: function() {
		return this.keyManager.checkStatus(45,this.status);
	}
	,get_ESCAPE: function() {
		return this.keyManager.checkStatus(27,this.status);
	}
	,get_MINUS: function() {
		return this.keyManager.checkStatus(189,this.status);
	}
	,get_PLUS: function() {
		return this.keyManager.checkStatus(187,this.status);
	}
	,get_DELETE: function() {
		return this.keyManager.checkStatus(46,this.status);
	}
	,get_BACKSPACE: function() {
		return this.keyManager.checkStatus(8,this.status);
	}
	,get_LBRACKET: function() {
		return this.keyManager.checkStatus(219,this.status);
	}
	,get_RBRACKET: function() {
		return this.keyManager.checkStatus(221,this.status);
	}
	,get_BACKSLASH: function() {
		return this.keyManager.checkStatus(220,this.status);
	}
	,get_CAPSLOCK: function() {
		return this.keyManager.checkStatus(20,this.status);
	}
	,get_SEMICOLON: function() {
		return this.keyManager.checkStatus(186,this.status);
	}
	,get_QUOTE: function() {
		return this.keyManager.checkStatus(222,this.status);
	}
	,get_ENTER: function() {
		return this.keyManager.checkStatus(13,this.status);
	}
	,get_SHIFT: function() {
		return this.keyManager.checkStatus(16,this.status);
	}
	,get_COMMA: function() {
		return this.keyManager.checkStatus(188,this.status);
	}
	,get_PERIOD: function() {
		return this.keyManager.checkStatus(190,this.status);
	}
	,get_SLASH: function() {
		return this.keyManager.checkStatus(191,this.status);
	}
	,get_GRAVEACCENT: function() {
		return this.keyManager.checkStatus(192,this.status);
	}
	,get_CONTROL: function() {
		return this.keyManager.checkStatus(17,this.status);
	}
	,get_ALT: function() {
		return this.keyManager.checkStatus(18,this.status);
	}
	,get_SPACE: function() {
		return this.keyManager.checkStatus(32,this.status);
	}
	,get_UP: function() {
		return this.keyManager.checkStatus(38,this.status);
	}
	,get_DOWN: function() {
		return this.keyManager.checkStatus(40,this.status);
	}
	,get_LEFT: function() {
		return this.keyManager.checkStatus(37,this.status);
	}
	,get_RIGHT: function() {
		return this.keyManager.checkStatus(39,this.status);
	}
	,get_TAB: function() {
		return this.keyManager.checkStatus(9,this.status);
	}
	,get_PRINTSCREEN: function() {
		return this.keyManager.checkStatus(301,this.status);
	}
	,get_F1: function() {
		return this.keyManager.checkStatus(112,this.status);
	}
	,get_F2: function() {
		return this.keyManager.checkStatus(113,this.status);
	}
	,get_F3: function() {
		return this.keyManager.checkStatus(114,this.status);
	}
	,get_F4: function() {
		return this.keyManager.checkStatus(115,this.status);
	}
	,get_F5: function() {
		return this.keyManager.checkStatus(116,this.status);
	}
	,get_F6: function() {
		return this.keyManager.checkStatus(117,this.status);
	}
	,get_F7: function() {
		return this.keyManager.checkStatus(118,this.status);
	}
	,get_F8: function() {
		return this.keyManager.checkStatus(119,this.status);
	}
	,get_F9: function() {
		return this.keyManager.checkStatus(120,this.status);
	}
	,get_F10: function() {
		return this.keyManager.checkStatus(121,this.status);
	}
	,get_F11: function() {
		return this.keyManager.checkStatus(122,this.status);
	}
	,get_F12: function() {
		return this.keyManager.checkStatus(123,this.status);
	}
	,get_NUMPADONE: function() {
		return this.keyManager.checkStatus(97,this.status);
	}
	,get_NUMPADTWO: function() {
		return this.keyManager.checkStatus(98,this.status);
	}
	,get_NUMPADTHREE: function() {
		return this.keyManager.checkStatus(99,this.status);
	}
	,get_NUMPADFOUR: function() {
		return this.keyManager.checkStatus(100,this.status);
	}
	,get_NUMPADFIVE: function() {
		return this.keyManager.checkStatus(101,this.status);
	}
	,get_NUMPADSIX: function() {
		return this.keyManager.checkStatus(102,this.status);
	}
	,get_NUMPADSEVEN: function() {
		return this.keyManager.checkStatus(103,this.status);
	}
	,get_NUMPADEIGHT: function() {
		return this.keyManager.checkStatus(104,this.status);
	}
	,get_NUMPADNINE: function() {
		return this.keyManager.checkStatus(105,this.status);
	}
	,get_NUMPADZERO: function() {
		return this.keyManager.checkStatus(96,this.status);
	}
	,get_NUMPADMINUS: function() {
		return this.keyManager.checkStatus(109,this.status);
	}
	,get_NUMPADPLUS: function() {
		return this.keyManager.checkStatus(107,this.status);
	}
	,get_NUMPADPERIOD: function() {
		return this.keyManager.checkStatus(110,this.status);
	}
	,get_NUMPADMULTIPLY: function() {
		return this.keyManager.checkStatus(106,this.status);
	}
	,__class__: flixel_input_keyboard_FlxKeyList
	,__properties__: $extend(flixel_input_FlxBaseKeyList.prototype.__properties__,{get_NUMPADMULTIPLY:"get_NUMPADMULTIPLY",get_NUMPADPERIOD:"get_NUMPADPERIOD",get_NUMPADPLUS:"get_NUMPADPLUS",get_NUMPADMINUS:"get_NUMPADMINUS",get_NUMPADZERO:"get_NUMPADZERO",get_NUMPADNINE:"get_NUMPADNINE",get_NUMPADEIGHT:"get_NUMPADEIGHT",get_NUMPADSEVEN:"get_NUMPADSEVEN",get_NUMPADSIX:"get_NUMPADSIX",get_NUMPADFIVE:"get_NUMPADFIVE",get_NUMPADFOUR:"get_NUMPADFOUR",get_NUMPADTHREE:"get_NUMPADTHREE",get_NUMPADTWO:"get_NUMPADTWO",get_NUMPADONE:"get_NUMPADONE",get_F12:"get_F12",get_F11:"get_F11",get_F10:"get_F10",get_F9:"get_F9",get_F8:"get_F8",get_F7:"get_F7",get_F6:"get_F6",get_F5:"get_F5",get_F4:"get_F4",get_F3:"get_F3",get_F2:"get_F2",get_F1:"get_F1",get_PRINTSCREEN:"get_PRINTSCREEN",get_TAB:"get_TAB",get_RIGHT:"get_RIGHT",get_LEFT:"get_LEFT",get_DOWN:"get_DOWN",get_UP:"get_UP",get_SPACE:"get_SPACE",get_ALT:"get_ALT",get_CONTROL:"get_CONTROL",get_GRAVEACCENT:"get_GRAVEACCENT",get_SLASH:"get_SLASH",get_PERIOD:"get_PERIOD",get_COMMA:"get_COMMA",get_SHIFT:"get_SHIFT",get_ENTER:"get_ENTER",get_QUOTE:"get_QUOTE",get_SEMICOLON:"get_SEMICOLON",get_CAPSLOCK:"get_CAPSLOCK",get_BACKSLASH:"get_BACKSLASH",get_RBRACKET:"get_RBRACKET",get_LBRACKET:"get_LBRACKET",get_BACKSPACE:"get_BACKSPACE",get_DELETE:"get_DELETE",get_PLUS:"get_PLUS",get_MINUS:"get_MINUS",get_ESCAPE:"get_ESCAPE",get_INSERT:"get_INSERT",get_END:"get_END",get_HOME:"get_HOME",get_PAGEDOWN:"get_PAGEDOWN",get_PAGEUP:"get_PAGEUP",get_NINE:"get_NINE",get_EIGHT:"get_EIGHT",get_SEVEN:"get_SEVEN",get_SIX:"get_SIX",get_FIVE:"get_FIVE",get_FOUR:"get_FOUR",get_THREE:"get_THREE",get_TWO:"get_TWO",get_ONE:"get_ONE",get_ZERO:"get_ZERO",get_Z:"get_Z",get_Y:"get_Y",get_X:"get_X",get_W:"get_W",get_V:"get_V",get_U:"get_U",get_T:"get_T",get_S:"get_S",get_R:"get_R",get_Q:"get_Q",get_P:"get_P",get_O:"get_O",get_N:"get_N",get_M:"get_M",get_L:"get_L",get_K:"get_K",get_J:"get_J",get_I:"get_I",get_H:"get_H",get_G:"get_G",get_F:"get_F",get_E:"get_E",get_D:"get_D",get_C:"get_C",get_B:"get_B",get_A:"get_A"})
});
var flixel_input_keyboard_FlxKeyboard = function() {
	flixel_input_FlxKeyManager.call(this,flixel_input_keyboard_FlxKeyList);
	var _this = flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromStringMap;
	var code = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
	while(code.hasNext()) {
		var code1 = code.next();
		if(code1 != -2 && code1 != -1) {
			var input = new flixel_input_FlxInput(code1);
			this._keyListArray.push(input);
			this._keyListMap.h[code1] = input;
		}
	}
};
$hxClasses["flixel.input.keyboard.FlxKeyboard"] = flixel_input_keyboard_FlxKeyboard;
flixel_input_keyboard_FlxKeyboard.__name__ = ["flixel","input","keyboard","FlxKeyboard"];
flixel_input_keyboard_FlxKeyboard.__super__ = flixel_input_FlxKeyManager;
flixel_input_keyboard_FlxKeyboard.prototype = $extend(flixel_input_FlxKeyManager.prototype,{
	onKeyUp: function(event) {
		flixel_input_FlxKeyManager.prototype.onKeyUp.call(this,event);
	}
	,onKeyDown: function(event) {
		flixel_input_FlxKeyManager.prototype.onKeyDown.call(this,event);
	}
	,resolveKeyCode: function(e) {
		return e.keyCode;
	}
	,record: function() {
		var data = null;
		var _g = 0;
		var _g1 = this._keyListArray;
		while(_g < _g1.length) {
			var key = _g1[_g];
			++_g;
			if(key == null || (key.current == 0 || key.current == -1)) {
				continue;
			}
			if(data == null) {
				data = [];
			}
			data.push(new flixel_system_replay_CodeValuePair(key.ID,key.current));
		}
		return data;
	}
	,playback: function(Record) {
		var i = 0;
		var l = Record.length;
		while(i < l) {
			var o = Record[i++];
			this._keyListMap.get(o.code).current = o.value;
		}
	}
	,__class__: flixel_input_keyboard_FlxKeyboard
});
var flixel_input_mouse__$FlxMouse_GraphicCursor = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_input_mouse__$FlxMouse_GraphicCursor.preload != null) {
		this.__fromImage(flixel_input_mouse__$FlxMouse_GraphicCursor.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_input_mouse__$FlxMouse_GraphicCursor.preload == null) {
				flixel_input_mouse__$FlxMouse_GraphicCursor.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_input_mouse__$FlxMouse_GraphicCursor.resourceName),flixel_input_mouse__$FlxMouse_GraphicCursor.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.input.mouse._FlxMouse.GraphicCursor"] = flixel_input_mouse__$FlxMouse_GraphicCursor;
flixel_input_mouse__$FlxMouse_GraphicCursor.__name__ = ["flixel","input","mouse","_FlxMouse","GraphicCursor"];
flixel_input_mouse__$FlxMouse_GraphicCursor.preload = null;
flixel_input_mouse__$FlxMouse_GraphicCursor.__super__ = openfl_display_BitmapData;
flixel_input_mouse__$FlxMouse_GraphicCursor.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_input_mouse__$FlxMouse_GraphicCursor
});
var flixel_input_mouse_FlxMouseButton = function(ID) {
	this.justPressedTimeInTicks = -1;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this.justPressedPosition = point;
	flixel_input_FlxInput.call(this,ID);
};
$hxClasses["flixel.input.mouse.FlxMouseButton"] = flixel_input_mouse_FlxMouseButton;
flixel_input_mouse_FlxMouseButton.__name__ = ["flixel","input","mouse","FlxMouseButton"];
flixel_input_mouse_FlxMouseButton.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_input_mouse_FlxMouseButton.getByID = function(id) {
	switch(id) {
	case -3:
		return flixel_FlxG.mouse._rightButton;
	case -2:
		return flixel_FlxG.mouse._middleButton;
	case -1:
		return flixel_FlxG.mouse._leftButton;
	}
};
flixel_input_mouse_FlxMouseButton.__super__ = flixel_input_FlxInput;
flixel_input_mouse_FlxMouseButton.prototype = $extend(flixel_input_FlxInput.prototype,{
	update: function() {
		flixel_input_FlxInput.prototype.update.call(this);
		if(this.current == 2) {
			this.justPressedPosition.set(flixel_FlxG.mouse.screenX,flixel_FlxG.mouse.screenY);
			this.justPressedTimeInTicks = flixel_FlxG.game.ticks;
		} else if(this.current == -1) {
			flixel_FlxG.swipes.push(new flixel_input_FlxSwipe(this.ID,this.justPressedPosition,flixel_FlxG.mouse.getScreenPosition(),this.justPressedTimeInTicks));
		}
	}
	,destroy: function() {
		this.justPressedPosition = flixel_util_FlxDestroyUtil.put(this.justPressedPosition);
	}
	,onDown: function(_) {
		if(flixel_FlxG.mouse.enabled) {
			this.press();
		}
	}
	,onUp: function(_) {
		if(flixel_FlxG.mouse.enabled) {
			this.release();
		}
	}
	,__class__: flixel_input_mouse_FlxMouseButton
});
var flixel_input_touch_FlxTouch = function(x,y,pointID) {
	if(pointID == null) {
		pointID = 0;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.justPressedTimeInTicks = -1;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	this.justPressedPosition = point;
	this.flashPoint = new openfl_geom_Point();
	flixel_input_FlxPointer.call(this);
	this.input = new flixel_input_FlxInput(pointID);
	this.setXY(x,y);
};
$hxClasses["flixel.input.touch.FlxTouch"] = flixel_input_touch_FlxTouch;
flixel_input_touch_FlxTouch.__name__ = ["flixel","input","touch","FlxTouch"];
flixel_input_touch_FlxTouch.__interfaces__ = [flixel_input_IFlxInput,flixel_util_IFlxDestroyable];
flixel_input_touch_FlxTouch.__super__ = flixel_input_FlxPointer;
flixel_input_touch_FlxTouch.prototype = $extend(flixel_input_FlxPointer.prototype,{
	destroy: function() {
		this.input = null;
		this.justPressedPosition = flixel_util_FlxDestroyUtil.put(this.justPressedPosition);
		this.flashPoint = null;
	}
	,recycle: function(x,y,pointID) {
		this.setXY(x,y);
		this.input.ID = pointID;
		this.input.reset();
	}
	,update: function() {
		this.input.update();
		if(this.input.current == 2) {
			this.justPressedPosition.set(this.screenX,this.screenY);
			this.justPressedTimeInTicks = flixel_FlxG.game.ticks;
		} else if(this.input.current == -1) {
			flixel_FlxG.swipes.push(new flixel_input_FlxSwipe(this.input.ID,this.justPressedPosition,this.getScreenPosition(),this.justPressedTimeInTicks));
		}
	}
	,setXY: function(X,Y) {
		this.flashPoint.setTo(X,Y);
		this.flashPoint = flixel_FlxG.game.globalToLocal(this.flashPoint);
		this._globalScreenX = this.flashPoint.x / flixel_FlxG.scaleMode.scale.x | 0;
		this._globalScreenY = this.flashPoint.y / flixel_FlxG.scaleMode.scale.y | 0;
		this.updatePositions();
	}
	,get_touchPointID: function() {
		return this.input.ID;
	}
	,get_justReleased: function() {
		return this.input.current == -1;
	}
	,get_released: function() {
		var _this = this.input;
		if(_this.current != 0) {
			return _this.current == -1;
		} else {
			return true;
		}
	}
	,get_pressed: function() {
		var _this = this.input;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this.input.current == 2;
	}
	,__class__: flixel_input_touch_FlxTouch
	,__properties__: {get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased",get_touchPointID:"get_touchPointID"}
});
var flixel_input_touch_FlxTouchManager = function() {
	this.list = [];
	this._inactiveTouches = [];
	this._touchesCache = new haxe_ds_IntMap();
	flixel_input_touch_FlxTouchManager.maxTouchPoints = openfl_ui_Multitouch.maxTouchPoints;
	openfl_Lib.current.stage.addEventListener("touchBegin",$bind(this,this.handleTouchBegin));
	openfl_Lib.current.stage.addEventListener("touchEnd",$bind(this,this.handleTouchEnd));
	openfl_Lib.current.stage.addEventListener("touchMove",$bind(this,this.handleTouchMove));
};
$hxClasses["flixel.input.touch.FlxTouchManager"] = flixel_input_touch_FlxTouchManager;
flixel_input_touch_FlxTouchManager.__name__ = ["flixel","input","touch","FlxTouchManager"];
flixel_input_touch_FlxTouchManager.__interfaces__ = [flixel_input_IFlxInputManager];
flixel_input_touch_FlxTouchManager.prototype = {
	getByID: function(TouchPointID) {
		return this._touchesCache.h[TouchPointID];
	}
	,getFirst: function() {
		if(this.list[0] != null) {
			return this.list[0];
		} else {
			return null;
		}
	}
	,destroy: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var touch = _g1[_g];
			++_g;
			touch.destroy();
		}
		this.list = null;
		var _g2 = 0;
		var _g11 = this._inactiveTouches;
		while(_g2 < _g11.length) {
			var touch1 = _g11[_g2];
			++_g2;
			touch1.destroy();
		}
		this._inactiveTouches = null;
		this._touchesCache = null;
	}
	,justStarted: function(TouchArray) {
		if(TouchArray == null) {
			TouchArray = [];
		}
		var touchLen = TouchArray.length;
		if(touchLen > 0) {
			TouchArray.splice(0,touchLen);
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var touch = _g1[_g];
			++_g;
			if(touch.input.current == 2) {
				TouchArray.push(touch);
			}
		}
		return TouchArray;
	}
	,justReleased: function(TouchArray) {
		if(TouchArray == null) {
			TouchArray = [];
		}
		var touchLen = TouchArray.length;
		if(touchLen > 0) {
			TouchArray.splice(0,touchLen);
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var touch = _g1[_g];
			++_g;
			if(touch.input.current == -1) {
				TouchArray.push(touch);
			}
		}
		return TouchArray;
	}
	,reset: function() {
		var key = this._touchesCache.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			this._touchesCache.remove(key1);
		}
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var touch = _g1[_g];
			++_g;
			touch.input.reset();
			this._inactiveTouches.push(touch);
		}
		this.list.splice(0,this.list.length);
	}
	,handleTouchBegin: function(FlashEvent) {
		var touch = this._touchesCache.h[FlashEvent.touchPointID];
		if(touch != null) {
			touch.setXY(FlashEvent.stageX | 0,FlashEvent.stageY | 0);
		} else {
			touch = this.recycle(FlashEvent.stageX | 0,FlashEvent.stageY | 0,FlashEvent.touchPointID);
		}
		touch.input.press();
	}
	,handleTouchEnd: function(FlashEvent) {
		var touch = this._touchesCache.h[FlashEvent.touchPointID];
		if(touch != null) {
			touch.input.release();
		}
	}
	,handleTouchMove: function(FlashEvent) {
		var touch = this._touchesCache.h[FlashEvent.touchPointID];
		if(touch != null) {
			touch.setXY(FlashEvent.stageX | 0,FlashEvent.stageY | 0);
		}
	}
	,add: function(Touch) {
		this.list.push(Touch);
		this._touchesCache.h[Touch.input.ID] = Touch;
		return Touch;
	}
	,recycle: function(X,Y,PointID) {
		if(this._inactiveTouches.length > 0) {
			var touch = this._inactiveTouches.pop();
			touch.recycle(X,Y,PointID);
			return this.add(touch);
		}
		return this.add(new flixel_input_touch_FlxTouch(X,Y,PointID));
	}
	,update: function() {
		var i = this.list.length - 1;
		var touch;
		while(i >= 0) {
			touch = this.list[i];
			var tmp;
			var _this = touch.input;
			if(_this.current == 0 || _this.current == -1) {
				tmp = touch.input.current != -1;
			} else {
				tmp = false;
			}
			if(tmp) {
				touch.input.reset();
				this._touchesCache.remove(touch.input.ID);
				this.list.splice(i,1);
				this._inactiveTouches.push(touch);
			} else {
				touch.update();
			}
			--i;
		}
	}
	,onFocus: function() {
	}
	,onFocusLost: function() {
		this.reset();
	}
	,__class__: flixel_input_touch_FlxTouchManager
};
var flixel_math_FlxAngle = function() { };
$hxClasses["flixel.math.FlxAngle"] = flixel_math_FlxAngle;
flixel_math_FlxAngle.__name__ = ["flixel","math","FlxAngle"];
flixel_math_FlxAngle.__properties__ = {get_TO_RAD:"get_TO_RAD",get_TO_DEG:"get_TO_DEG"}
flixel_math_FlxAngle.wrapAngle = function(angle) {
	if(angle > 180) {
		angle = flixel_math_FlxAngle.wrapAngle(angle - 360);
	} else if(angle < -180) {
		angle = flixel_math_FlxAngle.wrapAngle(angle + 360);
	}
	return angle;
};
flixel_math_FlxAngle.asDegrees = function(radians) {
	return radians * (180 / Math.PI);
};
flixel_math_FlxAngle.asRadians = function(degrees) {
	return degrees * (Math.PI / 180);
};
flixel_math_FlxAngle.angleBetween = function(SpriteA,SpriteB,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	var dx = SpriteB.x + SpriteB.origin.x - (SpriteA.x + SpriteA.origin.x);
	var dy = SpriteB.y + SpriteB.origin.y - (SpriteA.y + SpriteA.origin.y);
	if(AsDegrees) {
		return Math.atan2(dy,dx) * (180 / Math.PI);
	} else {
		return Math.atan2(dy,dx);
	}
};
flixel_math_FlxAngle.angleBetweenPoint = function(Sprite,Target,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	var dx = Target.x - (Sprite.x + Sprite.origin.x);
	var dy = Target.y - (Sprite.y + Sprite.origin.y);
	if(Target._weak) {
		Target.put();
	}
	if(AsDegrees) {
		return Math.atan2(dy,dx) * (180 / Math.PI);
	} else {
		return Math.atan2(dy,dx);
	}
};
flixel_math_FlxAngle.angleBetweenMouse = function(Object,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	if(Object == null) {
		return 0;
	}
	var p = Object.getScreenPosition();
	var dx = flixel_FlxG.mouse.screenX - p.x;
	var dy = flixel_FlxG.mouse.screenY - p.y;
	p.put();
	if(AsDegrees) {
		return Math.atan2(dy,dx) * (180 / Math.PI);
	} else {
		return Math.atan2(dy,dx);
	}
};
flixel_math_FlxAngle.angleBetweenTouch = function(Object,Touch,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	var p = Object.getScreenPosition();
	var dx = Touch.screenX - p.x;
	var dy = Touch.screenY - p.y;
	p.put();
	if(AsDegrees) {
		return Math.atan2(dy,dx) * (180 / Math.PI);
	} else {
		return Math.atan2(dy,dx);
	}
};
flixel_math_FlxAngle.angleFromFacing = function(FacingBitmask,AsDegrees) {
	if(AsDegrees == null) {
		AsDegrees = false;
	}
	var degrees;
	switch(FacingBitmask) {
	case 1:
		degrees = 180;
		break;
	case 16:
		degrees = 0;
		break;
	case 256:
		degrees = -90;
		break;
	case 4096:
		degrees = 90;
		break;
	default:
		if(FacingBitmask == 257) {
			degrees = -135;
		} else if(FacingBitmask == 272) {
			degrees = -45;
		} else if(FacingBitmask == 4097) {
			degrees = 135;
		} else if(FacingBitmask == 4112) {
			degrees = 45;
		} else {
			degrees = 0;
		}
	}
	if(AsDegrees) {
		return degrees;
	} else {
		return degrees * (Math.PI / 180);
	}
};
flixel_math_FlxAngle.getCartesianCoords = function(Radius,Angle,point) {
	var p = point;
	if(point == null) {
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		p = point1;
	}
	p.set_x(Radius * Math.cos(Angle * (Math.PI / 180)));
	p.set_y(Radius * Math.sin(Angle * (Math.PI / 180)));
	return p;
};
flixel_math_FlxAngle.getPolarCoords = function(X,Y,point) {
	var p = point;
	if(point == null) {
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		p = point1;
	}
	p.set_x(Math.sqrt(X * X + Y * Y));
	p.set_y(Math.atan2(Y,X) * (180 / Math.PI));
	return p;
};
flixel_math_FlxAngle.get_TO_DEG = function() {
	return 180 / Math.PI;
};
flixel_math_FlxAngle.get_TO_RAD = function() {
	return Math.PI / 180;
};
var flixel_math_FlxMath = function() { };
$hxClasses["flixel.math.FlxMath"] = flixel_math_FlxMath;
flixel_math_FlxMath.__name__ = ["flixel","math","FlxMath"];
flixel_math_FlxMath.roundDecimal = function(Value,Precision) {
	var mult = 1;
	var _g1 = 0;
	while(_g1 < Precision) {
		++_g1;
		mult *= 10;
	}
	return Math.round(Value * mult) / mult;
};
flixel_math_FlxMath.bound = function(Value,Min,Max) {
	var lowerBound = Min != null && Value < Min ? Min : Value;
	if(Max != null && lowerBound > Max) {
		return Max;
	} else {
		return lowerBound;
	}
};
flixel_math_FlxMath.lerp = function(a,b,ratio) {
	return a + ratio * (b - a);
};
flixel_math_FlxMath.inBounds = function(Value,Min,Max) {
	if(Min == null || Value >= Min) {
		if(Max != null) {
			return Value <= Max;
		} else {
			return true;
		}
	} else {
		return false;
	}
};
flixel_math_FlxMath.isOdd = function(n) {
	return ((n | 0) & 1) != 0;
};
flixel_math_FlxMath.isEven = function(n) {
	return ((n | 0) & 1) == 0;
};
flixel_math_FlxMath.numericComparison = function(a,b) {
	if(b > a) {
		return -1;
	} else if(a > b) {
		return 1;
	}
	return 0;
};
flixel_math_FlxMath.pointInCoordinates = function(pointX,pointY,rectX,rectY,rectWidth,rectHeight) {
	if(pointX >= rectX && pointX <= rectX + rectWidth) {
		if(pointY >= rectY && pointY <= rectY + rectHeight) {
			return true;
		}
	}
	return false;
};
flixel_math_FlxMath.pointInFlxRect = function(pointX,pointY,rect) {
	if(pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y) {
		return pointY <= rect.y + rect.height;
	} else {
		return false;
	}
};
flixel_math_FlxMath.mouseInFlxRect = function(useWorldCoords,rect) {
	if(rect == null) {
		return true;
	}
	if(useWorldCoords) {
		return flixel_math_FlxMath.pointInFlxRect(Math.floor(flixel_FlxG.mouse.x),Math.floor(flixel_FlxG.mouse.y),rect);
	} else {
		return flixel_math_FlxMath.pointInFlxRect(flixel_FlxG.mouse.screenX,flixel_FlxG.mouse.screenY,rect);
	}
};
flixel_math_FlxMath.pointInRectangle = function(pointX,pointY,rect) {
	if(pointX >= rect.x && pointX <= rect.get_right() && pointY >= rect.y) {
		return pointY <= rect.get_bottom();
	} else {
		return false;
	}
};
flixel_math_FlxMath.maxAdd = function(value,amount,max,min) {
	if(min == null) {
		min = 0;
	}
	value += amount;
	if(value > max) {
		value = max;
	} else if(value <= min) {
		value = min;
	}
	return value;
};
flixel_math_FlxMath.wrap = function(value,min,max) {
	var range = max - min + 1;
	if(value < min) {
		value += range * ((min - value) / range + 1 | 0);
	}
	return min + (value - min) % range;
};
flixel_math_FlxMath.remapToRange = function(value,start1,stop1,start2,stop2) {
	return start2 + (value - start1) * ((stop2 - start2) / (stop1 - start1));
};
flixel_math_FlxMath.dotProduct = function(ax,ay,bx,by) {
	return ax * bx + ay * by;
};
flixel_math_FlxMath.vectorLength = function(dx,dy) {
	return Math.sqrt(dx * dx + dy * dy);
};
flixel_math_FlxMath.distanceBetween = function(SpriteA,SpriteB) {
	var dx = SpriteA.x + SpriteA.origin.x - (SpriteB.x + SpriteB.origin.x);
	var dy = SpriteA.y + SpriteA.origin.y - (SpriteB.y + SpriteB.origin.y);
	return Math.sqrt(dx * dx + dy * dy) | 0;
};
flixel_math_FlxMath.isDistanceWithin = function(SpriteA,SpriteB,Distance,IncludeEqual) {
	if(IncludeEqual == null) {
		IncludeEqual = false;
	}
	var dx = SpriteA.x + SpriteA.origin.x - (SpriteB.x + SpriteB.origin.x);
	var dy = SpriteA.y + SpriteA.origin.y - (SpriteB.y + SpriteB.origin.y);
	if(IncludeEqual) {
		return dx * dx + dy * dy <= Distance * Distance;
	} else {
		return dx * dx + dy * dy < Distance * Distance;
	}
};
flixel_math_FlxMath.distanceToPoint = function(Sprite,Target) {
	var dx = Sprite.x + Sprite.origin.x - Target.x;
	var dy = Sprite.y + Sprite.origin.y - Target.y;
	if(Target._weak) {
		Target.put();
	}
	return Math.sqrt(dx * dx + dy * dy) | 0;
};
flixel_math_FlxMath.isDistanceToPointWithin = function(Sprite,Target,Distance,IncludeEqual) {
	if(IncludeEqual == null) {
		IncludeEqual = false;
	}
	var dx = Sprite.x + Sprite.origin.x - Target.x;
	var dy = Sprite.y + Sprite.origin.y - Target.y;
	if(Target._weak) {
		Target.put();
	}
	if(IncludeEqual) {
		return dx * dx + dy * dy <= Distance * Distance;
	} else {
		return dx * dx + dy * dy < Distance * Distance;
	}
};
flixel_math_FlxMath.distanceToMouse = function(Sprite) {
	var dx = Sprite.x + Sprite.origin.x - flixel_FlxG.mouse.screenX;
	var dy = Sprite.y + Sprite.origin.y - flixel_FlxG.mouse.screenY;
	return Math.sqrt(dx * dx + dy * dy) | 0;
};
flixel_math_FlxMath.isDistanceToMouseWithin = function(Sprite,Distance,IncludeEqual) {
	if(IncludeEqual == null) {
		IncludeEqual = false;
	}
	var dx = Sprite.x + Sprite.origin.x - flixel_FlxG.mouse.screenX;
	var dy = Sprite.y + Sprite.origin.y - flixel_FlxG.mouse.screenY;
	if(IncludeEqual) {
		return dx * dx + dy * dy <= Distance * Distance;
	} else {
		return dx * dx + dy * dy < Distance * Distance;
	}
};
flixel_math_FlxMath.distanceToTouch = function(Sprite,Touch) {
	var dx = Sprite.x + Sprite.origin.x - Touch.screenX;
	var dy = Sprite.y + Sprite.origin.y - Touch.screenY;
	return Math.sqrt(dx * dx + dy * dy) | 0;
};
flixel_math_FlxMath.isDistanceToTouchWithin = function(Sprite,Touch,Distance,IncludeEqual) {
	if(IncludeEqual == null) {
		IncludeEqual = false;
	}
	var dx = Sprite.x + Sprite.origin.x - Touch.screenX;
	var dy = Sprite.y + Sprite.origin.y - Touch.screenY;
	if(IncludeEqual) {
		return dx * dx + dy * dy <= Distance * Distance;
	} else {
		return dx * dx + dy * dy < Distance * Distance;
	}
};
flixel_math_FlxMath.getDecimals = function(n) {
	var helperArray = (n == null ? "null" : "" + n).split(".");
	var decimals = 0;
	if(helperArray.length > 1) {
		decimals = helperArray[1].length;
	}
	return decimals;
};
flixel_math_FlxMath.equal = function(aValueA,aValueB,aDiff) {
	if(aDiff == null) {
		aDiff = 0.0000001;
	}
	return Math.abs(aValueA - aValueB) <= aDiff;
};
flixel_math_FlxMath.signOf = function(n) {
	if(n < 0) {
		return -1;
	} else {
		return 1;
	}
};
flixel_math_FlxMath.sameSign = function(a,b) {
	return (a < 0 ? -1 : 1) == (b < 0 ? -1 : 1);
};
flixel_math_FlxMath.fastSin = function(n) {
	n *= 0.3183098862;
	if(n > 1) {
		n -= Math.ceil(n) >> 1 << 1;
	} else if(n < -1) {
		n += Math.ceil(-n) >> 1 << 1;
	}
	if(n > 0) {
		return n * (3.1 + n * (0.5 + n * (-7.2 + n * 3.6)));
	} else {
		return n * (3.1 - n * (0.5 + n * (7.2 + n * 3.6)));
	}
};
flixel_math_FlxMath.fastCos = function(n) {
	var n1 = n + 1.570796327;
	n1 *= 0.3183098862;
	if(n1 > 1) {
		n1 -= Math.ceil(n1) >> 1 << 1;
	} else if(n1 < -1) {
		n1 += Math.ceil(-n1) >> 1 << 1;
	}
	if(n1 > 0) {
		return n1 * (3.1 + n1 * (0.5 + n1 * (-7.2 + n1 * 3.6)));
	} else {
		return n1 * (3.1 - n1 * (0.5 + n1 * (7.2 + n1 * 3.6)));
	}
};
flixel_math_FlxMath.sinh = function(n) {
	return (Math.exp(n) - Math.exp(-n)) / 2;
};
flixel_math_FlxMath.maxInt = function(a,b) {
	if(a > b) {
		return a;
	} else {
		return b;
	}
};
flixel_math_FlxMath.minInt = function(a,b) {
	if(a > b) {
		return b;
	} else {
		return a;
	}
};
flixel_math_FlxMath.absInt = function(n) {
	if(n > 0) {
		return n;
	} else {
		return -n;
	}
};
var flixel_math_FlxMatrix = function(a,b,c,d,tx,ty) {
	openfl_geom_Matrix.call(this,a,b,c,d,tx,ty);
};
$hxClasses["flixel.math.FlxMatrix"] = flixel_math_FlxMatrix;
flixel_math_FlxMatrix.__name__ = ["flixel","math","FlxMatrix"];
flixel_math_FlxMatrix.__super__ = openfl_geom_Matrix;
flixel_math_FlxMatrix.prototype = $extend(openfl_geom_Matrix.prototype,{
	rotateWithTrig: function(cos,sin) {
		var a1 = this.a * cos - this.b * sin;
		this.b = this.a * sin + this.b * cos;
		this.a = a1;
		var c1 = this.c * cos - this.d * sin;
		this.d = this.c * sin + this.d * cos;
		this.c = c1;
		var tx1 = this.tx * cos - this.ty * sin;
		this.ty = this.tx * sin + this.ty * cos;
		this.tx = tx1;
		return this;
	}
	,rotateBy180: function() {
		this.setTo(-this.a,-this.b,-this.c,-this.d,-this.tx,-this.ty);
		return this;
	}
	,rotateByPositive90: function() {
		this.setTo(-this.b,this.a,-this.d,this.c,-this.ty,this.tx);
		return this;
	}
	,rotateByNegative90: function() {
		this.setTo(this.b,-this.a,this.d,-this.c,this.ty,-this.tx);
		return this;
	}
	,__class__: flixel_math_FlxMatrix
});
var flixel_math_FlxCallbackPoint = function(setXCallback,setYCallback,setXYCallback) {
	flixel_math_FlxPoint.call(this);
	this._setXCallback = setXCallback;
	this._setYCallback = setXYCallback;
	this._setXYCallback = setXYCallback;
	if(this._setXCallback != null) {
		if(this._setYCallback == null) {
			this._setYCallback = setXCallback;
		}
		if(this._setXYCallback == null) {
			this._setXYCallback = setXCallback;
		}
	}
};
$hxClasses["flixel.math.FlxCallbackPoint"] = flixel_math_FlxCallbackPoint;
flixel_math_FlxCallbackPoint.__name__ = ["flixel","math","FlxCallbackPoint"];
flixel_math_FlxCallbackPoint.__super__ = flixel_math_FlxPoint;
flixel_math_FlxCallbackPoint.prototype = $extend(flixel_math_FlxPoint.prototype,{
	set: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		flixel_math_FlxPoint.prototype.set.call(this,X,Y);
		if(this._setXYCallback != null) {
			this._setXYCallback(this);
		}
		return this;
	}
	,set_x: function(Value) {
		flixel_math_FlxPoint.prototype.set_x.call(this,Value);
		if(this._setXCallback != null) {
			this._setXCallback(this);
		}
		return Value;
	}
	,set_y: function(Value) {
		flixel_math_FlxPoint.prototype.set_y.call(this,Value);
		if(this._setYCallback != null) {
			this._setYCallback(this);
		}
		return Value;
	}
	,destroy: function() {
		flixel_math_FlxPoint.prototype.destroy.call(this);
		this._setXCallback = null;
		this._setYCallback = null;
		this._setXYCallback = null;
	}
	,put: function() {
	}
	,__class__: flixel_math_FlxCallbackPoint
});
var flixel_util_FlxPool_$flixel_$math_$FlxVector = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_math_FlxVector"] = flixel_util_FlxPool_$flixel_$math_$FlxVector;
flixel_util_FlxPool_$flixel_$math_$FlxVector.__name__ = ["flixel","util","FlxPool_flixel_math_FlxVector"];
flixel_util_FlxPool_$flixel_$math_$FlxVector.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$math_$FlxVector.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$math_$FlxVector
	,__properties__: {get_length:"get_length"}
};
var flixel_math_FlxVector = function(X,Y) {
	flixel_math_FlxPoint.call(this,X,Y);
};
$hxClasses["flixel.math.FlxVector"] = flixel_math_FlxVector;
flixel_math_FlxVector.__name__ = ["flixel","math","FlxVector"];
flixel_math_FlxVector.get = function(X,Y) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	var vector = flixel_math_FlxVector._pool.get().set(X,Y);
	vector._inPool = false;
	return vector;
};
flixel_math_FlxVector.__super__ = flixel_math_FlxPoint;
flixel_math_FlxVector.prototype = $extend(flixel_math_FlxPoint.prototype,{
	put: function() {
		if(!this._inPool) {
			this._inPool = true;
			flixel_math_FlxVector._pool.putUnsafe(this);
		}
	}
	,set: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.set_x(X);
		this.set_y(Y);
		return this;
	}
	,scale: function(k) {
		flixel_math_FlxPoint.prototype.scale.call(this,k);
		return this;
	}
	,scaleNew: function(k) {
		return this.clone().scale(k);
	}
	,addNew: function(v) {
		var nv = this.clone();
		nv.addPoint(v);
		return nv;
	}
	,subtractNew: function(v) {
		var nv = this.clone();
		nv.subtractPoint(v);
		return nv;
	}
	,dotProduct: function(v) {
		return this.x * v.x + this.y * v.y;
	}
	,dotProdWithNormalizing: function(v) {
		var normalized = v.clone(flixel_math_FlxVector._vector1).normalize();
		return this.x * normalized.x + this.y * normalized.y;
	}
	,isPerpendicular: function(v) {
		return Math.abs(this.x * v.x + this.y * v.y) < 9.99999999999999841e-15;
	}
	,crossProductLength: function(v) {
		return this.x * v.y - this.y * v.x;
	}
	,isParallel: function(v) {
		return Math.abs(this.x * v.y - this.y * v.x) < 9.99999999999999841e-15;
	}
	,isZero: function() {
		if(Math.abs(this.x) < 0.0000001) {
			return Math.abs(this.y) < 0.0000001;
		} else {
			return false;
		}
	}
	,zero: function() {
		this.set_x(this.set_y(0));
		return this;
	}
	,normalize: function() {
		if(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001) {
			return this;
		}
		return this.scale(1 / Math.sqrt(this.x * this.x + this.y * this.y));
	}
	,isNormalized: function() {
		return Math.abs(this.x * this.x + this.y * this.y - 1) < 9.99999999999999841e-15;
	}
	,rotateByRadians: function(rads) {
		var s = Math.sin(rads);
		var c = Math.cos(rads);
		var tempX = this.x;
		this.set_x(tempX * c - this.y * s);
		this.set_y(tempX * s + this.y * c);
		return this;
	}
	,rotateByDegrees: function(degs) {
		var rads = degs * (Math.PI / 180);
		var s = Math.sin(rads);
		var c = Math.cos(rads);
		var tempX = this.x;
		this.set_x(tempX * c - this.y * s);
		this.set_y(tempX * s + this.y * c);
		return this;
	}
	,rotateWithTrig: function(sin,cos) {
		var tempX = this.x;
		this.set_x(tempX * cos - this.y * sin);
		this.set_y(tempX * sin + this.y * cos);
		return this;
	}
	,rightNormal: function(vec) {
		if(vec == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			vec = vector;
		}
		vec.set(-this.y,this.x);
		return vec;
	}
	,leftNormal: function(vec) {
		if(vec == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			vec = vector;
		}
		vec.set(this.y,-this.x);
		return vec;
	}
	,negate: function() {
		var _g = this;
		_g.set_x(_g.x * -1);
		var _g1 = this;
		_g1.set_y(_g1.y * -1);
		return this;
	}
	,negateNew: function() {
		var _this = this.clone();
		_this.set_x(_this.x * -1);
		_this.set_y(_this.y * -1);
		return _this;
	}
	,projectTo: function(v,proj) {
		var dp = this.x * v.x + this.y * v.y;
		var lenSq = v.x * v.x + v.y * v.y;
		if(proj == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			proj = vector;
		}
		return proj.set(dp * v.x / lenSq,dp * v.y / lenSq);
	}
	,projectToNormalized: function(v,proj) {
		var dp = this.x * v.x + this.y * v.y;
		if(proj == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			proj = vector;
		}
		return proj.set(dp * v.x,dp * v.y);
	}
	,perpProduct: function(v) {
		return this.y * v.x + -this.x * v.y;
	}
	,ratio: function(a,b,v) {
		if(Math.abs(this.x * v.y - this.y * v.x) < 9.99999999999999841e-15) {
			return NaN;
		}
		if(this.x * this.x + this.y * this.y < 9.99999999999999841e-15 || v.x * v.x + v.y * v.y < 9.99999999999999841e-15) {
			return NaN;
		}
		flixel_math_FlxVector._vector1 = b.clone(flixel_math_FlxVector._vector1);
		flixel_math_FlxVector._vector1.subtractPoint(a);
		var _this = flixel_math_FlxVector._vector1;
		return (_this.y * v.x + -_this.x * v.y) / (this.y * v.x + -this.x * v.y);
	}
	,findIntersection: function(a,b,v,intersection) {
		var t = this.ratio(a,b,v);
		if(intersection == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			intersection = vector;
		}
		if(isNaN(t)) {
			return intersection.set(NaN,NaN);
		}
		return intersection.set(a.x + t * this.x,a.y + t * this.y);
	}
	,findIntersectionInBounds: function(a,b,v,intersection) {
		if(intersection == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			intersection = vector;
		}
		var t1 = this.ratio(a,b,v);
		var t2 = v.ratio(b,a,this);
		if(!isNaN(t1) && !isNaN(t2) && t1 > 0 && t1 <= 1 && t2 > 0 && t2 <= 1) {
			return intersection.set(a.x + t1 * this.x,a.y + t1 * this.y);
		}
		return intersection.set(NaN,NaN);
	}
	,truncate: function(max) {
		var l = Math.min(max,Math.sqrt(this.x * this.x + this.y * this.y));
		if(!(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001)) {
			var a = this.get_radians();
			this.set_x(l * Math.cos(a));
			this.set_y(l * Math.sin(a));
		}
		return this;
	}
	,radiansBetween: function(v) {
		return Math.acos((this.x * v.x + this.y * v.y) / (Math.sqrt(this.x * this.x + this.y * this.y) * Math.sqrt(v.x * v.x + v.y * v.y)));
	}
	,degreesBetween: function(v) {
		return Math.acos((this.x * v.x + this.y * v.y) / (Math.sqrt(this.x * this.x + this.y * this.y) * Math.sqrt(v.x * v.x + v.y * v.y))) * (180 / Math.PI);
	}
	,sign: function(a,b) {
		var signFl = (a.x - this.x) * (b.y - this.y) - (a.y - this.y) * (b.x - this.x);
		if(signFl == 0) {
			return 0;
		}
		return Math.round(signFl / Math.abs(signFl));
	}
	,dist: function(v) {
		var dx = v.x - this.x;
		var dy = v.y - this.y;
		return Math.sqrt(dx * dx + dy * dy);
	}
	,distSquared: function(v) {
		var dx = v.x - this.x;
		var dy = v.y - this.y;
		return dx * dx + dy * dy;
	}
	,bounce: function(normal,bounceCoeff) {
		if(bounceCoeff == null) {
			bounceCoeff = 1;
		}
		var d = (1 + bounceCoeff) * (this.x * normal.x + this.y * normal.y);
		var _g = this;
		_g.set_x(_g.x - d * normal.x);
		var _g1 = this;
		_g1.set_y(_g1.y - d * normal.y);
		return this;
	}
	,bounceWithFriction: function(normal,bounceCoeff,friction) {
		if(friction == null) {
			friction = 0;
		}
		if(bounceCoeff == null) {
			bounceCoeff = 1;
		}
		var p1 = this.projectToNormalized(normal.rightNormal(flixel_math_FlxVector._vector3),flixel_math_FlxVector._vector1);
		var p2 = this.projectToNormalized(normal,flixel_math_FlxVector._vector2);
		var bounceY = -p2.y;
		var frictionY = p1.y;
		this.set_x(-p2.x * bounceCoeff + p1.x * friction);
		this.set_y(bounceY * bounceCoeff + frictionY * friction);
		return this;
	}
	,isValid: function() {
		if(!isNaN(this.x) && !isNaN(this.y) && isFinite(this.x)) {
			return isFinite(this.y);
		} else {
			return false;
		}
	}
	,clone: function(vec) {
		if(vec == null) {
			var vector = flixel_math_FlxVector._pool.get().set(0,0);
			vector._inPool = false;
			vec = vector;
		}
		vec.set_x(this.x);
		vec.set_y(this.y);
		return vec;
	}
	,get_dx: function() {
		if(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001) {
			return 0;
		}
		return this.x / Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,get_dy: function() {
		if(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001) {
			return 0;
		}
		return this.y / Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,get_length: function() {
		return Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,set_length: function(l) {
		if(!(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001)) {
			var a = this.get_radians();
			this.set_x(l * Math.cos(a));
			this.set_y(l * Math.sin(a));
		}
		return l;
	}
	,get_lengthSquared: function() {
		return this.x * this.x + this.y * this.y;
	}
	,get_degrees: function() {
		return this.get_radians() * (180 / Math.PI);
	}
	,set_degrees: function(degs) {
		var rads = degs * (Math.PI / 180);
		var len = Math.sqrt(this.x * this.x + this.y * this.y);
		this.set_x(len * Math.cos(rads));
		this.set_y(len * Math.sin(rads));
		return degs;
	}
	,get_radians: function() {
		if(Math.abs(this.x) < 0.0000001 && Math.abs(this.y) < 0.0000001) {
			return 0;
		}
		return Math.atan2(this.y,this.x);
	}
	,set_radians: function(rads) {
		var len = Math.sqrt(this.x * this.x + this.y * this.y);
		this.set_x(len * Math.cos(rads));
		this.set_y(len * Math.sin(rads));
		return rads;
	}
	,get_rx: function() {
		return -this.y;
	}
	,get_ry: function() {
		return this.x;
	}
	,get_lx: function() {
		return this.y;
	}
	,get_ly: function() {
		return -this.x;
	}
	,__class__: flixel_math_FlxVector
	,__properties__: $extend(flixel_math_FlxPoint.prototype.__properties__,{get_ly:"get_ly",get_lx:"get_lx",get_ry:"get_ry",get_rx:"get_rx",set_radians:"set_radians",get_radians:"get_radians",set_degrees:"set_degrees",get_degrees:"get_degrees",get_lengthSquared:"get_lengthSquared",set_length:"set_length",get_length:"get_length",get_dy:"get_dy",get_dx:"get_dx"})
});
var flixel_math_FlxVelocity = function() { };
$hxClasses["flixel.math.FlxVelocity"] = flixel_math_FlxVelocity;
flixel_math_FlxVelocity.__name__ = ["flixel","math","FlxVelocity"];
flixel_math_FlxVelocity.moveTowardsObject = function(Source,Dest,Speed,MaxTime) {
	if(MaxTime == null) {
		MaxTime = 0;
	}
	if(Speed == null) {
		Speed = 60;
	}
	var a = Math.atan2(Dest.y + Dest.origin.y - (Source.y + Source.origin.y),Dest.x + Dest.origin.x - (Source.x + Source.origin.x));
	if(MaxTime > 0) {
		var dx = Source.x + Source.origin.x - (Dest.x + Dest.origin.x);
		var dy = Source.y + Source.origin.y - (Dest.y + Dest.origin.y);
		Speed = (Math.sqrt(dx * dx + dy * dy) | 0) / (MaxTime / 1000) | 0;
	}
	Source.velocity.set_x(Math.cos(a) * Speed);
	Source.velocity.set_y(Math.sin(a) * Speed);
};
flixel_math_FlxVelocity.accelerateTowardsObject = function(Source,Dest,Acceleration,MaxSpeed) {
	var a = Math.atan2(Dest.y + Dest.origin.y - (Source.y + Source.origin.y),Dest.x + Dest.origin.x - (Source.x + Source.origin.x));
	var sinA = Math.sin(a);
	var cosA = Math.cos(a);
	Source.velocity.set(0,0);
	Source.acceleration.set(cosA * Acceleration,sinA * Acceleration);
	Source.maxVelocity.set(Math.abs(cosA * MaxSpeed),Math.abs(sinA * MaxSpeed));
};
flixel_math_FlxVelocity.moveTowardsMouse = function(Source,Speed,MaxTime) {
	if(MaxTime == null) {
		MaxTime = 0;
	}
	if(Speed == null) {
		Speed = 60;
	}
	var a = flixel_math_FlxAngle.angleBetweenMouse(Source);
	if(MaxTime > 0) {
		var dx = Source.x + Source.origin.x - flixel_FlxG.mouse.screenX;
		var dy = Source.y + Source.origin.y - flixel_FlxG.mouse.screenY;
		Speed = (Math.sqrt(dx * dx + dy * dy) | 0) / (MaxTime / 1000) | 0;
	}
	Source.velocity.set_x(Math.cos(a) * Speed);
	Source.velocity.set_y(Math.sin(a) * Speed);
};
flixel_math_FlxVelocity.moveTowardsTouch = function(Source,Touch,Speed,MaxTime) {
	if(MaxTime == null) {
		MaxTime = 0;
	}
	if(Speed == null) {
		Speed = 60;
	}
	var p = Source.getScreenPosition();
	var dx = Touch.screenX - p.x;
	var dy = Touch.screenY - p.y;
	p.put();
	var a = Math.atan2(dy,dx);
	if(MaxTime > 0) {
		var dx1 = Source.x + Source.origin.x - Touch.screenX;
		var dy1 = Source.y + Source.origin.y - Touch.screenY;
		Speed = (Math.sqrt(dx1 * dx1 + dy1 * dy1) | 0) / (MaxTime / 1000) | 0;
	}
	Source.velocity.set_x(Math.cos(a) * Speed);
	Source.velocity.set_y(Math.sin(a) * Speed);
};
flixel_math_FlxVelocity.accelerateTowardsMouse = function(Source,Acceleration,MaxSpeed) {
	var a = flixel_math_FlxAngle.angleBetweenMouse(Source);
	var sinA = Math.sin(a);
	var cosA = Math.cos(a);
	Source.velocity.set(0,0);
	Source.acceleration.set(cosA * Acceleration,sinA * Acceleration);
	Source.maxVelocity.set(Math.abs(cosA * MaxSpeed),Math.abs(sinA * MaxSpeed));
};
flixel_math_FlxVelocity.accelerateTowardsTouch = function(Source,Touch,Acceleration,MaxSpeed) {
	var p = Source.getScreenPosition();
	var dx = Touch.screenX - p.x;
	var dy = Touch.screenY - p.y;
	p.put();
	var a = Math.atan2(dy,dx);
	var sinA = Math.sin(a);
	var cosA = Math.cos(a);
	Source.velocity.set(0,0);
	Source.acceleration.set(cosA * Acceleration,sinA * Acceleration);
	Source.maxVelocity.set(Math.abs(cosA * MaxSpeed),Math.abs(sinA * MaxSpeed));
};
flixel_math_FlxVelocity.moveTowardsPoint = function(Source,Target,Speed,MaxTime) {
	if(MaxTime == null) {
		MaxTime = 0;
	}
	if(Speed == null) {
		Speed = 60;
	}
	var a = flixel_math_FlxAngle.angleBetweenPoint(Source,Target);
	if(MaxTime > 0) {
		var dx = Source.x + Source.origin.x - Target.x;
		var dy = Source.y + Source.origin.y - Target.y;
		if(Target._weak) {
			Target.put();
		}
		Speed = (Math.sqrt(dx * dx + dy * dy) | 0) / (MaxTime / 1000) | 0;
	}
	Source.velocity.set_x(Math.cos(a) * Speed);
	Source.velocity.set_y(Math.sin(a) * Speed);
	if(Target._weak) {
		Target.put();
	}
};
flixel_math_FlxVelocity.accelerateTowardsPoint = function(Source,Target,Acceleration,MaxSpeed) {
	var a = flixel_math_FlxAngle.angleBetweenPoint(Source,Target);
	var sinA = Math.sin(a);
	var cosA = Math.cos(a);
	Source.velocity.set(0,0);
	Source.acceleration.set(cosA * Acceleration,sinA * Acceleration);
	Source.maxVelocity.set(Math.abs(cosA * MaxSpeed),Math.abs(sinA * MaxSpeed));
	if(Target._weak) {
		Target.put();
	}
};
flixel_math_FlxVelocity.velocityFromAngle = function(Angle,Speed) {
	var a = Angle * (Math.PI / 180);
	var X = Math.cos(a) * Speed;
	var Y = Math.sin(a) * Speed;
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	return point;
};
flixel_math_FlxVelocity.velocityFromFacing = function(Parent,Speed) {
	var FacingBitmask = Parent.facing;
	var degrees;
	switch(FacingBitmask) {
	case 1:
		degrees = 180;
		break;
	case 16:
		degrees = 0;
		break;
	case 256:
		degrees = -90;
		break;
	case 4096:
		degrees = 90;
		break;
	default:
		if(FacingBitmask == 257) {
			degrees = -135;
		} else if(FacingBitmask == 272) {
			degrees = -45;
		} else if(FacingBitmask == 4097) {
			degrees = 135;
		} else if(FacingBitmask == 4112) {
			degrees = 45;
		} else {
			degrees = 0;
		}
	}
	var a = degrees * (Math.PI / 180);
	var X = Math.cos(a) * Speed;
	var Y = Math.sin(a) * Speed;
	var point = flixel_math_FlxPoint._pool.get().set(X,Y);
	point._inPool = false;
	return point;
};
flixel_math_FlxVelocity.computeVelocity = function(Velocity,Acceleration,Drag,Max,Elapsed) {
	if(Acceleration != 0) {
		Velocity += Acceleration * Elapsed;
	} else if(Drag != 0) {
		var drag = Drag * Elapsed;
		if(Velocity - drag > 0) {
			Velocity -= drag;
		} else if(Velocity + drag < 0) {
			Velocity += drag;
		} else {
			Velocity = 0;
		}
	}
	if(Velocity != 0 && Max != 0) {
		if(Velocity > Max) {
			Velocity = Max;
		} else if(Velocity < -Max) {
			Velocity = -Max;
		}
	}
	return Velocity;
};
flixel_math_FlxVelocity.accelerateFromAngle = function(source,radians,acceleration,maxSpeed,resetVelocity) {
	if(resetVelocity == null) {
		resetVelocity = true;
	}
	var sinA = Math.sin(radians);
	var cosA = Math.cos(radians);
	if(resetVelocity) {
		source.velocity.set(0,0);
	}
	source.acceleration.set(cosA * acceleration,sinA * acceleration);
	source.maxVelocity.set(Math.abs(cosA * maxSpeed),Math.abs(sinA * maxSpeed));
};
var flixel_system_GraphicLogo = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_GraphicLogo.preload != null) {
		this.__fromImage(flixel_system_GraphicLogo.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_GraphicLogo.preload == null) {
				flixel_system_GraphicLogo.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_GraphicLogo.resourceName),flixel_system_GraphicLogo.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.GraphicLogo"] = flixel_system_GraphicLogo;
flixel_system_GraphicLogo.__name__ = ["flixel","system","GraphicLogo"];
flixel_system_GraphicLogo.preload = null;
flixel_system_GraphicLogo.__super__ = openfl_display_BitmapData;
flixel_system_GraphicLogo.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_GraphicLogo
});
var flixel_system_GraphicVirtualInput = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_GraphicVirtualInput.preload != null) {
		this.__fromImage(flixel_system_GraphicVirtualInput.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_GraphicVirtualInput.preload == null) {
				flixel_system_GraphicVirtualInput.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_GraphicVirtualInput.resourceName),flixel_system_GraphicVirtualInput.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.GraphicVirtualInput"] = flixel_system_GraphicVirtualInput;
flixel_system_GraphicVirtualInput.__name__ = ["flixel","system","GraphicVirtualInput"];
flixel_system_GraphicVirtualInput.preload = null;
flixel_system_GraphicVirtualInput.__super__ = openfl_display_BitmapData;
flixel_system_GraphicVirtualInput.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_GraphicVirtualInput
});
var haxe_io_Bytes = function(data) {
	this.length = data.byteLength;
	this.b = new Uint8Array(data);
	this.b.bufferValue = data;
	data.hxBytes = this;
	data.bytes = this.b;
};
$hxClasses["haxe.io.Bytes"] = haxe_io_Bytes;
haxe_io_Bytes.__name__ = ["haxe","io","Bytes"];
haxe_io_Bytes.alloc = function(length) {
	return new haxe_io_Bytes(new ArrayBuffer(length));
};
haxe_io_Bytes.ofString = function(s) {
	var a = [];
	var i = 0;
	while(i < s.length) {
		var c = s.charCodeAt(i++);
		if(55296 <= c && c <= 56319) {
			c = c - 55232 << 10 | s.charCodeAt(i++) & 1023;
		}
		if(c <= 127) {
			a.push(c);
		} else if(c <= 2047) {
			a.push(192 | c >> 6);
			a.push(128 | c & 63);
		} else if(c <= 65535) {
			a.push(224 | c >> 12);
			a.push(128 | c >> 6 & 63);
			a.push(128 | c & 63);
		} else {
			a.push(240 | c >> 18);
			a.push(128 | c >> 12 & 63);
			a.push(128 | c >> 6 & 63);
			a.push(128 | c & 63);
		}
	}
	return new haxe_io_Bytes(new Uint8Array(a).buffer);
};
haxe_io_Bytes.ofData = function(b) {
	var hb = b.hxBytes;
	if(hb != null) {
		return hb;
	}
	return new haxe_io_Bytes(b);
};
haxe_io_Bytes.fastGet = function(b,pos) {
	return b.bytes[pos];
};
haxe_io_Bytes.prototype = {
	blit: function(pos,src,srcpos,len) {
		if(pos < 0 || srcpos < 0 || len < 0 || pos + len > this.length || srcpos + len > src.length) {
			throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds);
		}
		if(srcpos == 0 && len == src.b.byteLength) {
			this.b.set(src.b,pos);
		} else {
			this.b.set(src.b.subarray(srcpos,srcpos + len),pos);
		}
	}
	,getDouble: function(pos) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		return this.data.getFloat64(pos,true);
	}
	,getFloat: function(pos) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		return this.data.getFloat32(pos,true);
	}
	,setDouble: function(pos,v) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		this.data.setFloat64(pos,v,true);
	}
	,setFloat: function(pos,v) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		this.data.setFloat32(pos,v,true);
	}
	,setUInt16: function(pos,v) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		this.data.setUint16(pos,v,true);
	}
	,setInt32: function(pos,v) {
		if(this.data == null) {
			this.data = new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength);
		}
		this.data.setInt32(pos,v,true);
	}
	,getString: function(pos,len) {
		if(pos < 0 || len < 0 || pos + len > this.length) {
			throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds);
		}
		var s = "";
		var b = this.b;
		var fcc = String.fromCharCode;
		var i = pos;
		var max = pos + len;
		while(i < max) {
			var c = b[i++];
			if(c < 128) {
				if(c == 0) {
					break;
				}
				s += fcc(c);
			} else if(c < 224) {
				s += fcc((c & 63) << 6 | b[i++] & 127);
			} else if(c < 240) {
				s += fcc((c & 31) << 12 | (b[i++] & 127) << 6 | b[i++] & 127);
			} else {
				var u = (c & 15) << 18 | (b[i++] & 127) << 12 | (b[i++] & 127) << 6 | b[i++] & 127;
				s += fcc((u >> 10) + 55232);
				s += fcc(u & 1023 | 56320);
			}
		}
		return s;
	}
	,toString: function() {
		return this.getString(0,this.length);
	}
	,__class__: haxe_io_Bytes
};
var openfl_utils_IDataOutput = function() { };
$hxClasses["openfl.utils.IDataOutput"] = openfl_utils_IDataOutput;
openfl_utils_IDataOutput.__name__ = ["openfl","utils","IDataOutput"];
openfl_utils_IDataOutput.prototype = {
	__class__: openfl_utils_IDataOutput
	,__properties__: {set_endian:"set_endian",get_endian:"get_endian"}
};
var openfl_utils_IDataInput = function() { };
$hxClasses["openfl.utils.IDataInput"] = openfl_utils_IDataInput;
openfl_utils_IDataInput.__name__ = ["openfl","utils","IDataInput"];
openfl_utils_IDataInput.prototype = {
	__class__: openfl_utils_IDataInput
	,__properties__: {set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}
};
var openfl_utils_ByteArrayData = function(length) {
	if(length == null) {
		length = 0;
	}
	haxe_io_Bytes.call(this,new haxe_io_Bytes(new ArrayBuffer(length)).b.buffer);
	this.__length = length;
	this.__endian = 0;
	this.position = 0;
};
$hxClasses["openfl.utils.ByteArrayData"] = openfl_utils_ByteArrayData;
openfl_utils_ByteArrayData.__name__ = ["openfl","utils","ByteArrayData"];
openfl_utils_ByteArrayData.__interfaces__ = [openfl_utils_IDataOutput,openfl_utils_IDataInput];
openfl_utils_ByteArrayData.fromBytes = function(bytes) {
	var result = new openfl_utils_ByteArrayData();
	result.__fromBytes(bytes);
	return result;
};
openfl_utils_ByteArrayData.__super__ = haxe_io_Bytes;
openfl_utils_ByteArrayData.prototype = $extend(haxe_io_Bytes.prototype,{
	clear: function() {
		this.__length = 0;
		this.position = 0;
	}
	,compress: function(algorithm) {
		this.__length = this.length;
		this.position = this.__length;
	}
	,deflate: function() {
		this.compress(0);
	}
	,inflate: function() {
		this.uncompress(0);
	}
	,readBoolean: function() {
		if(this.position < this.length) {
			return this.b[this.position++] != 0;
		} else {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
	}
	,readByte: function() {
		var value = this.readUnsignedByte();
		if((value & 128) != 0) {
			return value - 256;
		} else {
			return value;
		}
	}
	,readBytes: function(bytes,offset,length) {
		if(length == null) {
			length = 0;
		}
		if(offset == null) {
			offset = 0;
		}
		if(length == 0) {
			length = this.__length - this.position;
		}
		if(this.position + length > this.__length) {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
		if(bytes.__length < offset + length) {
			bytes.__resize(offset + length);
		}
		bytes.blit(offset,this,this.position,length);
		this.position += length;
	}
	,readDouble: function() {
		if(this.position + 8 > this.__length) {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
		this.position += 8;
		return this.getDouble(this.position - 8);
	}
	,readFloat: function() {
		if(this.position + 4 > this.__length) {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
		this.position += 4;
		return this.getFloat(this.position - 4);
	}
	,readInt: function() {
		var ch1 = this.readUnsignedByte();
		var ch2 = this.readUnsignedByte();
		var ch3 = this.readUnsignedByte();
		var ch4 = this.readUnsignedByte();
		if(this.__endian == 1) {
			return ch4 << 24 | ch3 << 16 | ch2 << 8 | ch1;
		} else {
			return ch1 << 24 | ch2 << 16 | ch3 << 8 | ch4;
		}
	}
	,readMultiByte: function(length,charSet) {
		return this.readUTFBytes(length);
	}
	,readShort: function() {
		var ch1 = this.readUnsignedByte();
		var ch2 = this.readUnsignedByte();
		var value;
		if(this.__endian == 1) {
			value = ch2 << 8 | ch1;
		} else {
			value = ch1 << 8 | ch2;
		}
		if((value & 32768) != 0) {
			return value - 65536;
		} else {
			return value;
		}
	}
	,readUnsignedByte: function() {
		if(this.position < this.__length) {
			return this.b[this.position++];
		} else {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
	}
	,readUnsignedInt: function() {
		var ch1 = this.readUnsignedByte();
		var ch2 = this.readUnsignedByte();
		var ch3 = this.readUnsignedByte();
		var ch4 = this.readUnsignedByte();
		if(this.__endian == 1) {
			return ch4 << 24 | ch3 << 16 | ch2 << 8 | ch1;
		} else {
			return ch1 << 24 | ch2 << 16 | ch3 << 8 | ch4;
		}
	}
	,readUnsignedShort: function() {
		var ch1 = this.readUnsignedByte();
		var ch2 = this.readUnsignedByte();
		if(this.__endian == 1) {
			return (ch2 << 8) + ch1;
		} else {
			return ch1 << 8 | ch2;
		}
	}
	,readUTF: function() {
		return this.readUTFBytes(this.readUnsignedShort());
	}
	,readUTFBytes: function(length) {
		if(this.position + length > this.__length) {
			throw new js__$Boot_HaxeError(new openfl_errors_EOFError());
		}
		this.position += length;
		return this.getString(this.position - length,length);
	}
	,uncompress: function(algorithm) {
		this.__length = this.length;
		this.position = 0;
	}
	,writeBoolean: function(value) {
		this.writeByte(value ? 1 : 0);
	}
	,writeByte: function(value) {
		this.__resize(this.position + 1);
		this.b[this.position++] = value & 255 & 255;
	}
	,writeBytes: function(bytes,offset,length) {
		if(length == null) {
			length = 0;
		}
		if(offset == null) {
			offset = 0;
		}
		if(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(bytes) == 0) {
			return;
		}
		if(length == 0) {
			length = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(bytes) - offset;
		}
		this.__resize(this.position + length);
		this.blit(this.position,bytes,offset,length);
		this.position = this.position + length;
	}
	,writeDouble: function(value) {
		this.__resize(this.position + 8);
		this.setDouble(this.position,value);
		this.position += 8;
	}
	,writeFloat: function(value) {
		this.__resize(this.position + 4);
		this.setFloat(this.position,value);
		this.position += 4;
	}
	,writeInt: function(value) {
		this.__resize(this.position + 4);
		if(this.__endian == 1) {
			this.b[this.position++] = value & 255;
			this.b[this.position++] = value >> 8 & 255;
			this.b[this.position++] = value >> 16 & 255;
			this.b[this.position++] = value >> 24 & 255;
		} else {
			this.b[this.position++] = value >> 24 & 255;
			this.b[this.position++] = value >> 16 & 255;
			this.b[this.position++] = value >> 8 & 255;
			this.b[this.position++] = value & 255;
		}
	}
	,writeMultiByte: function(value,charSet) {
		this.writeUTFBytes(value);
	}
	,writeShort: function(value) {
		this.__resize(this.position + 2);
		if(this.__endian == 1) {
			this.b[this.position++] = value & 255;
			this.b[this.position++] = value >> 8 & 255;
		} else {
			this.b[this.position++] = value >> 8 & 255;
			this.b[this.position++] = value & 255;
		}
	}
	,writeUnsignedInt: function(value) {
		this.writeInt(value);
	}
	,writeUTF: function(value) {
		var bytes = haxe_io_Bytes.ofString(value);
		this.writeShort(bytes.length);
		this.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(bytes));
	}
	,writeUTFBytes: function(value) {
		haxe_io_Bytes.ofString(value);
		this.writeBytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(haxe_io_Bytes.ofString(value)));
	}
	,__fromBytes: function(bytes) {
		this.b = bytes.b;
		this.length = bytes.length;
		this.data = bytes.data;
		this.__length = bytes.length;
	}
	,__resize: function(size) {
		if(size > this.length) {
			var bytes = new haxe_io_Bytes(new ArrayBuffer((size + 1) * 3 >> 1));
			bytes.blit(0,this,0,this.length);
			this.b = bytes.b;
			this.length = bytes.length;
			this.data = bytes.data;
		}
		if(this.__length < size) {
			this.__length = size;
		}
	}
	,__setData: function(bytes) {
		this.b = bytes.b;
		this.length = bytes.length;
		this.data = bytes.data;
	}
	,get_bytesAvailable: function() {
		return this.__length - this.position;
	}
	,get_endian: function() {
		return this.__endian;
	}
	,set_endian: function(value) {
		return this.__endian = value;
	}
	,__class__: openfl_utils_ByteArrayData
	,__properties__: {set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}
});
var flixel_system_VirtualInputData = function(length) {
	if(length == null) {
		length = 0;
	}
	openfl_utils_ByteArrayData.call(this);
	this.__fromBytes(haxe_Resource.getBytes(flixel_system_VirtualInputData.resourceName));
};
$hxClasses["flixel.system.VirtualInputData"] = flixel_system_VirtualInputData;
flixel_system_VirtualInputData.__name__ = ["flixel","system","VirtualInputData"];
flixel_system_VirtualInputData.__super__ = openfl_utils_ByteArrayData;
flixel_system_VirtualInputData.prototype = $extend(openfl_utils_ByteArrayData.prototype,{
	__class__: flixel_system_VirtualInputData
});
var flixel_system_FlxAssets = function() { };
$hxClasses["flixel.system.FlxAssets"] = flixel_system_FlxAssets;
flixel_system_FlxAssets.__name__ = ["flixel","system","FlxAssets"];
flixel_system_FlxAssets.drawLogo = function(graph) {
	graph.beginFill(47394);
	graph.moveTo(50,13);
	graph.lineTo(51,13);
	graph.lineTo(87,50);
	graph.lineTo(87,51);
	graph.lineTo(51,87);
	graph.lineTo(50,87);
	graph.lineTo(13,51);
	graph.lineTo(13,50);
	graph.lineTo(50,13);
	graph.endFill();
	graph.beginFill(16761138);
	graph.moveTo(0,0);
	graph.lineTo(25,0);
	graph.lineTo(50,13);
	graph.lineTo(13,50);
	graph.lineTo(0,25);
	graph.lineTo(0,0);
	graph.endFill();
	graph.beginFill(16066382);
	graph.moveTo(100,0);
	graph.lineTo(75,0);
	graph.lineTo(51,13);
	graph.lineTo(87,50);
	graph.lineTo(100,25);
	graph.lineTo(100,0);
	graph.endFill();
	graph.beginFill(3555839);
	graph.moveTo(0,100);
	graph.lineTo(25,100);
	graph.lineTo(50,87);
	graph.lineTo(13,51);
	graph.lineTo(0,75);
	graph.lineTo(0,100);
	graph.endFill();
	graph.beginFill(314875);
	graph.moveTo(100,100);
	graph.lineTo(75,100);
	graph.lineTo(51,87);
	graph.lineTo(87,51);
	graph.lineTo(100,75);
	graph.lineTo(100,100);
	graph.endFill();
};
flixel_system_FlxAssets.getBitmapData = function(id) {
	if(openfl_Assets.exists(id)) {
		return openfl_Assets.getBitmapData(id,false);
	}
	return null;
};
flixel_system_FlxAssets.getBitmapFromClass = function(source) {
	return Type.createInstance(source,[0,0]);
};
flixel_system_FlxAssets.resolveBitmapData = function(Graphic) {
	if(js_Boot.__instanceof(Graphic,openfl_display_BitmapData)) {
		return Graphic;
	} else if(js_Boot.__instanceof(Graphic,Class)) {
		return Type.createInstance(Graphic,[0,0]);
	} else if(typeof(Graphic) == "string") {
		if(openfl_Assets.exists(Graphic)) {
			return openfl_Assets.getBitmapData(Graphic,false);
		} else {
			return null;
		}
	}
	return null;
};
flixel_system_FlxAssets.resolveKey = function(Graphic,Key) {
	if(Key != null) {
		return Key;
	}
	if(js_Boot.__instanceof(Graphic,openfl_display_BitmapData)) {
		return Key;
	} else if(js_Boot.__instanceof(Graphic,Class)) {
		return Type.getClassName(Graphic);
	} else if(typeof(Graphic) == "string") {
		return Graphic;
	}
	return null;
};
flixel_system_FlxAssets.getSound = function(id) {
	return openfl_Assets.getSound(id + ".ogg");
};
flixel_system_FlxAssets.getVirtualInputFrames = function() {
	return flixel_graphics_frames_FlxAtlasFrames.fromSpriteSheetPacker(flixel_graphics_FlxGraphic.fromClass(flixel_system_GraphicVirtualInput),Std.string(new flixel_system_VirtualInputData()));
};
var flixel_system_FlxBGSprite = function() {
	flixel_FlxSprite.call(this);
	this.makeGraphic(1,1,-1,true,flixel_FlxG.bitmap.getUniqueKey("bg_graphic_"));
	this.scrollFactor.set();
};
$hxClasses["flixel.system.FlxBGSprite"] = flixel_system_FlxBGSprite;
flixel_system_FlxBGSprite.__name__ = ["flixel","system","FlxBGSprite"];
flixel_system_FlxBGSprite.__super__ = flixel_FlxSprite;
flixel_system_FlxBGSprite.prototype = $extend(flixel_FlxSprite.prototype,{
	draw: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			if(!camera.visible || !camera.exists) {
				continue;
			}
			this._matrix.identity();
			this._matrix.scale(camera.width,camera.height);
			camera.drawPixels(this.frame,null,this._matrix,this.colorTransform);
		}
	}
	,__class__: flixel_system_FlxBGSprite
});
var flixel_system_FlxBasePreloader = function(MinDisplayTime,AllowedURLs) {
	if(MinDisplayTime == null) {
		MinDisplayTime = 0;
	}
	this._urlChecked = false;
	this._loaded = false;
	this._percent = 0;
	this.siteLockURLIndex = 0;
	this.minDisplayTime = 0;
	NMEPreloader.call(this);
	this.removeChild(this.progress);
	this.removeChild(this.outline);
	this.minDisplayTime = MinDisplayTime;
	if(AllowedURLs != null) {
		this.allowedURLs = AllowedURLs;
	} else {
		this.allowedURLs = [];
	}
	this._startTime = new Date().getTime();
};
$hxClasses["flixel.system.FlxBasePreloader"] = flixel_system_FlxBasePreloader;
flixel_system_FlxBasePreloader.__name__ = ["flixel","system","FlxBasePreloader"];
flixel_system_FlxBasePreloader.__super__ = NMEPreloader;
flixel_system_FlxBasePreloader.prototype = $extend(NMEPreloader.prototype,{
	create: function() {
	}
	,onInit: function() {
		NMEPreloader.prototype.onInit.call(this);
		openfl_Lib.current.stage.scaleMode = 2;
		openfl_Lib.current.stage.align = 6;
		this.create();
		this.addEventListener("enterFrame",$bind(this,this.onEnterFrame));
		this.checkSiteLock();
	}
	,onUpdate: function(bytesLoaded,bytesTotal) {
		this._percent = bytesTotal != 0 ? bytesLoaded / bytesTotal : 0;
	}
	,onEnterFrame: function(E) {
		var time = new Date().getTime() - this._startTime;
		var min = this.minDisplayTime * 1000;
		var percent = this._percent;
		if(min > 0 && this._percent > time / min) {
			percent = time / min;
		}
		this.update(percent);
		if(this._loaded && (min <= 0 || time / min >= 1)) {
			this.removeEventListener("enterFrame",$bind(this,this.onEnterFrame));
			NMEPreloader.prototype.onLoaded.call(this);
			this.destroy();
		}
	}
	,destroy: function() {
	}
	,update: function(Percent) {
	}
	,onLoaded: function() {
		this._loaded = true;
		this._percent = 1;
	}
	,createBitmap: function(bitmapDataClass,onLoad) {
		var bmp = new openfl_display_Bitmap();
		bmp.bitmapData = Type.createInstance(bitmapDataClass,[0,0,true,-1,function(_) {
			onLoad(bmp);
		}]);
		return bmp;
	}
	,loadBitmapData: function(bitmapDataClass,onLoad) {
		return Type.createInstance(bitmapDataClass,[0,0,true,-1,onLoad]);
	}
	,checkSiteLock: function() {
		if(!this._urlChecked && this.allowedURLs != null) {
			if(!this.isHostUrlAllowed()) {
				var tmp = new openfl_display_Bitmap(new openfl_display_BitmapData(this.stage.stageWidth,this.stage.stageHeight,true,-1));
				this.addChild(tmp);
				var format = new openfl_text_TextFormat();
				format.color = 0;
				format.size = 16;
				format.align = 0;
				format.bold = true;
				format.font = "system";
				var textField = new openfl_text_TextField();
				textField.set_width(tmp.get_width() - 16);
				textField.set_height(tmp.get_height() - 16);
				textField.set_y(8);
				textField.set_multiline(true);
				textField.set_wordWrap(true);
				textField.set_defaultTextFormat(format);
				textField.set_text("Hi there!  It looks like somebody copied this game without my permission.  Just click anywhere, or copy-paste this URL into your browser.\n\n" + this.allowedURLs[0] + "\n\nto play the game at my site.  Thanks, and have fun!");
				this.addChild(textField);
				textField.addEventListener("click",$bind(this,this.goToMyURL));
				tmp.addEventListener("click",$bind(this,this.goToMyURL));
				this.removeEventListener("enterFrame",$bind(this,this.onEnterFrame));
			} else {
				this._urlChecked = true;
			}
		}
	}
	,goToMyURL: function(e) {
		if(this.allowedURLs[this.siteLockURLIndex] != "localhost") {
			var URL = this.allowedURLs[this.siteLockURLIndex];
			var prefix = "";
			if(!new EReg("^https?://","").match(URL)) {
				prefix = "http://";
			}
			openfl_Lib.getURL(new openfl_net_URLRequest(prefix + URL),"_blank");
		} else {
			openfl_Lib.getURL(new openfl_net_URLRequest(this.allowedURLs[this.siteLockURLIndex]));
		}
	}
	,isHostUrlAllowed: function() {
		if(this.allowedURLs.length == 0) {
			return true;
		}
		var homeDomain = flixel_util_FlxStringUtil.getDomain(window.location.href);
		var _g = 0;
		var _g1 = this.allowedURLs;
		while(_g < _g1.length) {
			var allowedURL = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getDomain(allowedURL) == homeDomain) {
				return true;
			} else if(allowedURL == "localhost" && homeDomain == "localhost") {
				return true;
			}
		}
		return false;
	}
	,__class__: flixel_system_FlxBasePreloader
});
var flixel_system_FlxLinkedList = function() {
	this.exists = true;
};
$hxClasses["flixel.system.FlxLinkedList"] = flixel_system_FlxLinkedList;
flixel_system_FlxLinkedList.__name__ = ["flixel","system","FlxLinkedList"];
flixel_system_FlxLinkedList.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_system_FlxLinkedList._cachedListsHead = null;
flixel_system_FlxLinkedList.recycle = function() {
	if(flixel_system_FlxLinkedList._cachedListsHead != null) {
		var cachedList = flixel_system_FlxLinkedList._cachedListsHead;
		flixel_system_FlxLinkedList._cachedListsHead = flixel_system_FlxLinkedList._cachedListsHead.next;
		flixel_system_FlxLinkedList._NUM_CACHED_FLX_LIST--;
		cachedList.exists = true;
		cachedList.next = null;
		return cachedList;
	} else {
		return new flixel_system_FlxLinkedList();
	}
};
flixel_system_FlxLinkedList.clearCache = function() {
	while(flixel_system_FlxLinkedList._cachedListsHead != null) {
		var node = flixel_system_FlxLinkedList._cachedListsHead;
		flixel_system_FlxLinkedList._cachedListsHead = flixel_system_FlxLinkedList._cachedListsHead.next;
		node.object = null;
		node.next = null;
	}
	flixel_system_FlxLinkedList._NUM_CACHED_FLX_LIST = 0;
};
flixel_system_FlxLinkedList.prototype = {
	destroy: function() {
		if(!this.exists) {
			return;
		}
		this.object = null;
		if(this.next != null) {
			this.next.destroy();
		}
		this.exists = false;
		this.next = flixel_system_FlxLinkedList._cachedListsHead;
		flixel_system_FlxLinkedList._cachedListsHead = this;
		flixel_system_FlxLinkedList._NUM_CACHED_FLX_LIST++;
	}
	,__class__: flixel_system_FlxLinkedList
};
var flixel_system__$FlxPreloader_GraphicLogoLight = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system__$FlxPreloader_GraphicLogoLight.preload != null) {
		this.__fromImage(flixel_system__$FlxPreloader_GraphicLogoLight.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system__$FlxPreloader_GraphicLogoLight.preload == null) {
				flixel_system__$FlxPreloader_GraphicLogoLight.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system__$FlxPreloader_GraphicLogoLight.resourceName),flixel_system__$FlxPreloader_GraphicLogoLight.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system._FlxPreloader.GraphicLogoLight"] = flixel_system__$FlxPreloader_GraphicLogoLight;
flixel_system__$FlxPreloader_GraphicLogoLight.__name__ = ["flixel","system","_FlxPreloader","GraphicLogoLight"];
flixel_system__$FlxPreloader_GraphicLogoLight.preload = null;
flixel_system__$FlxPreloader_GraphicLogoLight.__super__ = openfl_display_BitmapData;
flixel_system__$FlxPreloader_GraphicLogoLight.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system__$FlxPreloader_GraphicLogoLight
});
var flixel_system__$FlxPreloader_GraphicLogoCorners = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system__$FlxPreloader_GraphicLogoCorners.preload != null) {
		this.__fromImage(flixel_system__$FlxPreloader_GraphicLogoCorners.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system__$FlxPreloader_GraphicLogoCorners.preload == null) {
				flixel_system__$FlxPreloader_GraphicLogoCorners.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system__$FlxPreloader_GraphicLogoCorners.resourceName),flixel_system__$FlxPreloader_GraphicLogoCorners.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system._FlxPreloader.GraphicLogoCorners"] = flixel_system__$FlxPreloader_GraphicLogoCorners;
flixel_system__$FlxPreloader_GraphicLogoCorners.__name__ = ["flixel","system","_FlxPreloader","GraphicLogoCorners"];
flixel_system__$FlxPreloader_GraphicLogoCorners.preload = null;
flixel_system__$FlxPreloader_GraphicLogoCorners.__super__ = openfl_display_BitmapData;
flixel_system__$FlxPreloader_GraphicLogoCorners.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system__$FlxPreloader_GraphicLogoCorners
});
var flixel_system_FlxPreloader = function(MinDisplayTime,AllowedURLs) {
	if(MinDisplayTime == null) {
		MinDisplayTime = 0;
	}
	flixel_system_FlxBasePreloader.call(this,MinDisplayTime,AllowedURLs);
};
$hxClasses["flixel.system.FlxPreloader"] = flixel_system_FlxPreloader;
flixel_system_FlxPreloader.__name__ = ["flixel","system","FlxPreloader"];
flixel_system_FlxPreloader.__super__ = flixel_system_FlxBasePreloader;
flixel_system_FlxPreloader.prototype = $extend(flixel_system_FlxBasePreloader.prototype,{
	create: function() {
		var _gthis = this;
		this._buffer = new openfl_display_Sprite();
		this._buffer.set_scaleX(this._buffer.set_scaleY(2));
		this.addChild(this._buffer);
		this._width = openfl_Lib.current.stage.stageWidth / this._buffer.get_scaleX() | 0;
		this._height = openfl_Lib.current.stage.stageHeight / this._buffer.get_scaleY() | 0;
		this._buffer.addChild(new openfl_display_Bitmap(new openfl_display_BitmapData(this._width,this._height,false,13406)));
		var logoLight = this.createBitmap(flixel_system__$FlxPreloader_GraphicLogoLight,function(logoLight1) {
			logoLight1.set_width(logoLight1.set_height(_gthis._height));
			logoLight1.set_x((_gthis._width - logoLight1.get_width()) / 2);
		});
		logoLight.smoothing = true;
		this._buffer.addChild(logoLight);
		this._bmpBar = new openfl_display_Bitmap(new openfl_display_BitmapData(1,7,false,6253311));
		this._bmpBar.set_x(4);
		this._bmpBar.set_y(this._height - 11);
		this._buffer.addChild(this._bmpBar);
		this._text = new openfl_text_TextField();
		this._text.set_defaultTextFormat(new openfl_text_TextFormat(flixel_system_FlxAssets.FONT_DEFAULT,8,6253311));
		this._text.set_embedFonts(true);
		this._text.set_selectable(false);
		this._text.set_multiline(false);
		this._text.set_x(2);
		this._text.set_y(this._bmpBar.get_y() - 11);
		this._text.set_width(200);
		this._buffer.addChild(this._text);
		this._logo = new openfl_display_Sprite();
		flixel_system_FlxAssets.drawLogo(this._logo.get_graphics());
		this._logo.set_scaleX(this._logo.set_scaleY(this._height / 8 * 0.04));
		this._logo.set_x((this._width - this._logo.get_width()) / 2);
		this._logo.set_y((this._height - this._logo.get_height()) / 2);
		this._buffer.addChild(this._logo);
		this._logoGlow = new openfl_display_Sprite();
		flixel_system_FlxAssets.drawLogo(this._logoGlow.get_graphics());
		this._logoGlow.set_blendMode(12);
		this._logoGlow.set_scaleX(this._logoGlow.set_scaleY(this._height / 8 * 0.04));
		this._logoGlow.set_x((this._width - this._logoGlow.get_width()) / 2);
		this._logoGlow.set_y((this._height - this._logoGlow.get_height()) / 2);
		this._buffer.addChild(this._logoGlow);
		var corners = this.createBitmap(flixel_system__$FlxPreloader_GraphicLogoCorners,function(corners1) {
			corners1.set_width(_gthis._width);
			corners1.set_height(_gthis.get_height());
		});
		corners.smoothing = true;
		this._buffer.addChild(corners);
		var bitmap = new openfl_display_Bitmap(new openfl_display_BitmapData(this._width,this._height,false,16777215));
		var i = 0;
		var j = 0;
		while(i < this._height) {
			j = 0;
			while(j < this._width) bitmap.bitmapData.setPixel(j++,i,0);
			i += 2;
		}
		bitmap.set_blendMode(11);
		bitmap.set_alpha(0.25);
		this._buffer.addChild(bitmap);
		flixel_system_FlxBasePreloader.prototype.create.call(this);
	}
	,destroy: function() {
		if(this._buffer != null) {
			this.removeChild(this._buffer);
		}
		this._buffer = null;
		this._bmpBar = null;
		this._text = null;
		this._logo = null;
		this._logoGlow = null;
		flixel_system_FlxBasePreloader.prototype.destroy.call(this);
	}
	,update: function(Percent) {
		this._bmpBar.set_scaleX(Percent * (this._width - 8));
		this._text.set_text(Std.string(flixel_FlxG.VERSION) + " " + (Percent * 100 | 0) + "%");
		if(Percent < 0.1) {
			this._logoGlow.set_alpha(0);
			this._logo.set_alpha(0);
		} else if(Percent < 0.15) {
			this._logoGlow.set_alpha(Math.random());
			this._logo.set_alpha(0);
		} else if(Percent < 0.2) {
			this._logoGlow.set_alpha(0);
			this._logo.set_alpha(0);
		} else if(Percent < 0.25) {
			this._logoGlow.set_alpha(0);
			this._logo.set_alpha(Math.random());
		} else if(Percent < 0.7) {
			this._logoGlow.set_alpha((Percent - 0.45) / 0.45);
			this._logo.set_alpha(1);
		} else if(Percent > 0.8 && Percent < 0.9) {
			this._logoGlow.set_alpha(1 - (Percent - 0.8) / 0.1);
			this._logo.set_alpha(0);
		} else if(Percent > 0.9) {
			this._buffer.set_alpha(1 - (Percent - 0.9) / 0.1);
		}
	}
	,__class__: flixel_system_FlxPreloader
});
var flixel_system_FlxQuadTree = function(X,Y,Width,Height,Parent) {
	flixel_math_FlxRect.call(this);
	this.x = X;
	this.y = Y;
	this.width = Width;
	this.height = Height;
	this.reset(X,Y,Width,Height,Parent);
};
$hxClasses["flixel.system.FlxQuadTree"] = flixel_system_FlxQuadTree;
flixel_system_FlxQuadTree.__name__ = ["flixel","system","FlxQuadTree"];
flixel_system_FlxQuadTree.divisions = null;
flixel_system_FlxQuadTree._min = null;
flixel_system_FlxQuadTree._object = null;
flixel_system_FlxQuadTree._objectLeftEdge = null;
flixel_system_FlxQuadTree._objectTopEdge = null;
flixel_system_FlxQuadTree._objectRightEdge = null;
flixel_system_FlxQuadTree._objectBottomEdge = null;
flixel_system_FlxQuadTree._list = null;
flixel_system_FlxQuadTree._useBothLists = null;
flixel_system_FlxQuadTree._processingCallback = null;
flixel_system_FlxQuadTree._notifyCallback = null;
flixel_system_FlxQuadTree._iterator = null;
flixel_system_FlxQuadTree._objectHullX = null;
flixel_system_FlxQuadTree._objectHullY = null;
flixel_system_FlxQuadTree._objectHullWidth = null;
flixel_system_FlxQuadTree._objectHullHeight = null;
flixel_system_FlxQuadTree._checkObjectHullX = null;
flixel_system_FlxQuadTree._checkObjectHullY = null;
flixel_system_FlxQuadTree._checkObjectHullWidth = null;
flixel_system_FlxQuadTree._checkObjectHullHeight = null;
flixel_system_FlxQuadTree._cachedTreesHead = null;
flixel_system_FlxQuadTree.recycle = function(X,Y,Width,Height,Parent) {
	if(flixel_system_FlxQuadTree._cachedTreesHead != null) {
		var cachedTree = flixel_system_FlxQuadTree._cachedTreesHead;
		flixel_system_FlxQuadTree._cachedTreesHead = flixel_system_FlxQuadTree._cachedTreesHead.next;
		flixel_system_FlxQuadTree._NUM_CACHED_QUAD_TREES--;
		cachedTree.reset(X,Y,Width,Height,Parent);
		return cachedTree;
	} else {
		return new flixel_system_FlxQuadTree(X,Y,Width,Height,Parent);
	}
};
flixel_system_FlxQuadTree.clearCache = function() {
	while(flixel_system_FlxQuadTree._cachedTreesHead != null) {
		var node = flixel_system_FlxQuadTree._cachedTreesHead;
		flixel_system_FlxQuadTree._cachedTreesHead = flixel_system_FlxQuadTree._cachedTreesHead.next;
		node.next = null;
	}
	flixel_system_FlxQuadTree._NUM_CACHED_QUAD_TREES = 0;
};
flixel_system_FlxQuadTree.__super__ = flixel_math_FlxRect;
flixel_system_FlxQuadTree.prototype = $extend(flixel_math_FlxRect.prototype,{
	reset: function(X,Y,Width,Height,Parent) {
		this.exists = true;
		this.x = X;
		this.y = Y;
		this.width = Width;
		this.height = Height;
		this._headA = this._tailA = flixel_system_FlxLinkedList.recycle();
		this._headB = this._tailB = flixel_system_FlxLinkedList.recycle();
		if(Parent != null) {
			var iterator;
			var ot;
			if(Parent._headA.object != null) {
				iterator = Parent._headA;
				while(iterator != null) {
					if(this._tailA.object != null) {
						ot = this._tailA;
						this._tailA = flixel_system_FlxLinkedList.recycle();
						ot.next = this._tailA;
					}
					this._tailA.object = iterator.object;
					iterator = iterator.next;
				}
			}
			if(Parent._headB.object != null) {
				iterator = Parent._headB;
				while(iterator != null) {
					if(this._tailB.object != null) {
						ot = this._tailB;
						this._tailB = flixel_system_FlxLinkedList.recycle();
						ot.next = this._tailB;
					}
					this._tailB.object = iterator.object;
					iterator = iterator.next;
				}
			}
		} else {
			flixel_system_FlxQuadTree._min = Math.floor((this.width + this.height) / (2 * flixel_system_FlxQuadTree.divisions));
		}
		this._canSubdivide = this.width > flixel_system_FlxQuadTree._min || this.height > flixel_system_FlxQuadTree._min;
		this._northWestTree = null;
		this._northEastTree = null;
		this._southEastTree = null;
		this._southWestTree = null;
		this._leftEdge = this.x;
		this._rightEdge = this.x + this.width;
		this._halfWidth = this.width / 2;
		this._midpointX = this._leftEdge + this._halfWidth;
		this._topEdge = this.y;
		this._bottomEdge = this.y + this.height;
		this._halfHeight = this.height / 2;
		this._midpointY = this._topEdge + this._halfHeight;
	}
	,destroy: function() {
		this._headA = flixel_util_FlxDestroyUtil.destroy(this._headA);
		this._headB = flixel_util_FlxDestroyUtil.destroy(this._headB);
		this._tailA = flixel_util_FlxDestroyUtil.destroy(this._tailA);
		this._tailB = flixel_util_FlxDestroyUtil.destroy(this._tailB);
		this._northWestTree = flixel_util_FlxDestroyUtil.destroy(this._northWestTree);
		this._northEastTree = flixel_util_FlxDestroyUtil.destroy(this._northEastTree);
		this._southWestTree = flixel_util_FlxDestroyUtil.destroy(this._southWestTree);
		this._southEastTree = flixel_util_FlxDestroyUtil.destroy(this._southEastTree);
		flixel_system_FlxQuadTree._object = null;
		flixel_system_FlxQuadTree._processingCallback = null;
		flixel_system_FlxQuadTree._notifyCallback = null;
		this.exists = false;
		this.next = flixel_system_FlxQuadTree._cachedTreesHead;
		flixel_system_FlxQuadTree._cachedTreesHead = this;
		flixel_system_FlxQuadTree._NUM_CACHED_QUAD_TREES++;
		flixel_math_FlxRect.prototype.destroy.call(this);
	}
	,load: function(ObjectOrGroup1,ObjectOrGroup2,NotifyCallback,ProcessCallback) {
		this.add(ObjectOrGroup1,0);
		if(ObjectOrGroup2 != null) {
			this.add(ObjectOrGroup2,1);
			flixel_system_FlxQuadTree._useBothLists = true;
		} else {
			flixel_system_FlxQuadTree._useBothLists = false;
		}
		flixel_system_FlxQuadTree._notifyCallback = NotifyCallback;
		flixel_system_FlxQuadTree._processingCallback = ProcessCallback;
	}
	,add: function(ObjectOrGroup,list) {
		flixel_system_FlxQuadTree._list = list;
		var group = flixel_group_FlxTypedGroup.resolveGroup(ObjectOrGroup);
		if(group != null) {
			var i = 0;
			var basic;
			var members = group.members;
			var l = group.length;
			while(i < l) {
				basic = members[i++];
				if(basic != null && basic.exists) {
					group = flixel_group_FlxTypedGroup.resolveGroup(basic);
					if(group != null) {
						this.add(group,list);
					} else {
						flixel_system_FlxQuadTree._object = basic;
						if(flixel_system_FlxQuadTree._object.exists && flixel_system_FlxQuadTree._object.allowCollisions != 0) {
							flixel_system_FlxQuadTree._objectLeftEdge = flixel_system_FlxQuadTree._object.x;
							flixel_system_FlxQuadTree._objectTopEdge = flixel_system_FlxQuadTree._object.y;
							flixel_system_FlxQuadTree._objectRightEdge = flixel_system_FlxQuadTree._object.x + flixel_system_FlxQuadTree._object.get_width();
							flixel_system_FlxQuadTree._objectBottomEdge = flixel_system_FlxQuadTree._object.y + flixel_system_FlxQuadTree._object.get_height();
							this.addObject();
						}
					}
				}
			}
		} else {
			flixel_system_FlxQuadTree._object = ObjectOrGroup;
			if(flixel_system_FlxQuadTree._object.exists && flixel_system_FlxQuadTree._object.allowCollisions != 0) {
				flixel_system_FlxQuadTree._objectLeftEdge = flixel_system_FlxQuadTree._object.x;
				flixel_system_FlxQuadTree._objectTopEdge = flixel_system_FlxQuadTree._object.y;
				flixel_system_FlxQuadTree._objectRightEdge = flixel_system_FlxQuadTree._object.x + flixel_system_FlxQuadTree._object.get_width();
				flixel_system_FlxQuadTree._objectBottomEdge = flixel_system_FlxQuadTree._object.y + flixel_system_FlxQuadTree._object.get_height();
				this.addObject();
			}
		}
	}
	,addObject: function() {
		if(!this._canSubdivide || this._leftEdge >= flixel_system_FlxQuadTree._objectLeftEdge && this._rightEdge <= flixel_system_FlxQuadTree._objectRightEdge && this._topEdge >= flixel_system_FlxQuadTree._objectTopEdge && this._bottomEdge <= flixel_system_FlxQuadTree._objectBottomEdge) {
			this.addToList();
			return;
		}
		if(flixel_system_FlxQuadTree._objectLeftEdge > this._leftEdge && flixel_system_FlxQuadTree._objectRightEdge < this._midpointX) {
			if(flixel_system_FlxQuadTree._objectTopEdge > this._topEdge && flixel_system_FlxQuadTree._objectBottomEdge < this._midpointY) {
				if(this._northWestTree == null) {
					this._northWestTree = flixel_system_FlxQuadTree.recycle(this._leftEdge,this._topEdge,this._halfWidth,this._halfHeight,this);
				}
				this._northWestTree.addObject();
				return;
			}
			if(flixel_system_FlxQuadTree._objectTopEdge > this._midpointY && flixel_system_FlxQuadTree._objectBottomEdge < this._bottomEdge) {
				if(this._southWestTree == null) {
					this._southWestTree = flixel_system_FlxQuadTree.recycle(this._leftEdge,this._midpointY,this._halfWidth,this._halfHeight,this);
				}
				this._southWestTree.addObject();
				return;
			}
		}
		if(flixel_system_FlxQuadTree._objectLeftEdge > this._midpointX && flixel_system_FlxQuadTree._objectRightEdge < this._rightEdge) {
			if(flixel_system_FlxQuadTree._objectTopEdge > this._topEdge && flixel_system_FlxQuadTree._objectBottomEdge < this._midpointY) {
				if(this._northEastTree == null) {
					this._northEastTree = flixel_system_FlxQuadTree.recycle(this._midpointX,this._topEdge,this._halfWidth,this._halfHeight,this);
				}
				this._northEastTree.addObject();
				return;
			}
			if(flixel_system_FlxQuadTree._objectTopEdge > this._midpointY && flixel_system_FlxQuadTree._objectBottomEdge < this._bottomEdge) {
				if(this._southEastTree == null) {
					this._southEastTree = flixel_system_FlxQuadTree.recycle(this._midpointX,this._midpointY,this._halfWidth,this._halfHeight,this);
				}
				this._southEastTree.addObject();
				return;
			}
		}
		if(flixel_system_FlxQuadTree._objectRightEdge > this._leftEdge && flixel_system_FlxQuadTree._objectLeftEdge < this._midpointX && flixel_system_FlxQuadTree._objectBottomEdge > this._topEdge && flixel_system_FlxQuadTree._objectTopEdge < this._midpointY) {
			if(this._northWestTree == null) {
				this._northWestTree = flixel_system_FlxQuadTree.recycle(this._leftEdge,this._topEdge,this._halfWidth,this._halfHeight,this);
			}
			this._northWestTree.addObject();
		}
		if(flixel_system_FlxQuadTree._objectRightEdge > this._midpointX && flixel_system_FlxQuadTree._objectLeftEdge < this._rightEdge && flixel_system_FlxQuadTree._objectBottomEdge > this._topEdge && flixel_system_FlxQuadTree._objectTopEdge < this._midpointY) {
			if(this._northEastTree == null) {
				this._northEastTree = flixel_system_FlxQuadTree.recycle(this._midpointX,this._topEdge,this._halfWidth,this._halfHeight,this);
			}
			this._northEastTree.addObject();
		}
		if(flixel_system_FlxQuadTree._objectRightEdge > this._midpointX && flixel_system_FlxQuadTree._objectLeftEdge < this._rightEdge && flixel_system_FlxQuadTree._objectBottomEdge > this._midpointY && flixel_system_FlxQuadTree._objectTopEdge < this._bottomEdge) {
			if(this._southEastTree == null) {
				this._southEastTree = flixel_system_FlxQuadTree.recycle(this._midpointX,this._midpointY,this._halfWidth,this._halfHeight,this);
			}
			this._southEastTree.addObject();
		}
		if(flixel_system_FlxQuadTree._objectRightEdge > this._leftEdge && flixel_system_FlxQuadTree._objectLeftEdge < this._midpointX && flixel_system_FlxQuadTree._objectBottomEdge > this._midpointY && flixel_system_FlxQuadTree._objectTopEdge < this._bottomEdge) {
			if(this._southWestTree == null) {
				this._southWestTree = flixel_system_FlxQuadTree.recycle(this._leftEdge,this._midpointY,this._halfWidth,this._halfHeight,this);
			}
			this._southWestTree.addObject();
		}
	}
	,addToList: function() {
		var ot;
		if(flixel_system_FlxQuadTree._list == 0) {
			if(this._tailA.object != null) {
				ot = this._tailA;
				this._tailA = flixel_system_FlxLinkedList.recycle();
				ot.next = this._tailA;
			}
			this._tailA.object = flixel_system_FlxQuadTree._object;
		} else {
			if(this._tailB.object != null) {
				ot = this._tailB;
				this._tailB = flixel_system_FlxLinkedList.recycle();
				ot.next = this._tailB;
			}
			this._tailB.object = flixel_system_FlxQuadTree._object;
		}
		if(!this._canSubdivide) {
			return;
		}
		if(this._northWestTree != null) {
			this._northWestTree.addToList();
		}
		if(this._northEastTree != null) {
			this._northEastTree.addToList();
		}
		if(this._southEastTree != null) {
			this._southEastTree.addToList();
		}
		if(this._southWestTree != null) {
			this._southWestTree.addToList();
		}
	}
	,execute: function() {
		var overlapProcessed = false;
		if(this._headA.object != null) {
			var iterator = this._headA;
			while(iterator != null) {
				flixel_system_FlxQuadTree._object = iterator.object;
				if(flixel_system_FlxQuadTree._useBothLists) {
					flixel_system_FlxQuadTree._iterator = this._headB;
				} else {
					flixel_system_FlxQuadTree._iterator = iterator.next;
				}
				if(flixel_system_FlxQuadTree._object != null && flixel_system_FlxQuadTree._object.exists && flixel_system_FlxQuadTree._object.allowCollisions > 0 && flixel_system_FlxQuadTree._iterator != null && flixel_system_FlxQuadTree._iterator.object != null && this.overlapNode()) {
					overlapProcessed = true;
				}
				iterator = iterator.next;
			}
		}
		if(this._northWestTree != null && this._northWestTree.execute()) {
			overlapProcessed = true;
		}
		if(this._northEastTree != null && this._northEastTree.execute()) {
			overlapProcessed = true;
		}
		if(this._southEastTree != null && this._southEastTree.execute()) {
			overlapProcessed = true;
		}
		if(this._southWestTree != null && this._southWestTree.execute()) {
			overlapProcessed = true;
		}
		return overlapProcessed;
	}
	,overlapNode: function() {
		flixel_system_FlxQuadTree._objectHullX = flixel_system_FlxQuadTree._object.x < flixel_system_FlxQuadTree._object.last.x ? flixel_system_FlxQuadTree._object.x : flixel_system_FlxQuadTree._object.last.x;
		flixel_system_FlxQuadTree._objectHullY = flixel_system_FlxQuadTree._object.y < flixel_system_FlxQuadTree._object.last.y ? flixel_system_FlxQuadTree._object.y : flixel_system_FlxQuadTree._object.last.y;
		flixel_system_FlxQuadTree._objectHullWidth = flixel_system_FlxQuadTree._object.x - flixel_system_FlxQuadTree._object.last.x;
		flixel_system_FlxQuadTree._objectHullWidth = flixel_system_FlxQuadTree._object.get_width() + (flixel_system_FlxQuadTree._objectHullWidth > 0 ? flixel_system_FlxQuadTree._objectHullWidth : -flixel_system_FlxQuadTree._objectHullWidth);
		flixel_system_FlxQuadTree._objectHullHeight = flixel_system_FlxQuadTree._object.y - flixel_system_FlxQuadTree._object.last.y;
		flixel_system_FlxQuadTree._objectHullHeight = flixel_system_FlxQuadTree._object.get_height() + (flixel_system_FlxQuadTree._objectHullHeight > 0 ? flixel_system_FlxQuadTree._objectHullHeight : -flixel_system_FlxQuadTree._objectHullHeight);
		var overlapProcessed = false;
		var checkObject;
		while(flixel_system_FlxQuadTree._iterator != null) {
			checkObject = flixel_system_FlxQuadTree._iterator.object;
			if(flixel_system_FlxQuadTree._object == checkObject || !checkObject.exists || checkObject.allowCollisions <= 0) {
				flixel_system_FlxQuadTree._iterator = flixel_system_FlxQuadTree._iterator.next;
				continue;
			}
			flixel_system_FlxQuadTree._checkObjectHullX = checkObject.x < checkObject.last.x ? checkObject.x : checkObject.last.x;
			flixel_system_FlxQuadTree._checkObjectHullY = checkObject.y < checkObject.last.y ? checkObject.y : checkObject.last.y;
			flixel_system_FlxQuadTree._checkObjectHullWidth = checkObject.x - checkObject.last.x;
			flixel_system_FlxQuadTree._checkObjectHullWidth = checkObject.get_width() + (flixel_system_FlxQuadTree._checkObjectHullWidth > 0 ? flixel_system_FlxQuadTree._checkObjectHullWidth : -flixel_system_FlxQuadTree._checkObjectHullWidth);
			flixel_system_FlxQuadTree._checkObjectHullHeight = checkObject.y - checkObject.last.y;
			flixel_system_FlxQuadTree._checkObjectHullHeight = checkObject.get_height() + (flixel_system_FlxQuadTree._checkObjectHullHeight > 0 ? flixel_system_FlxQuadTree._checkObjectHullHeight : -flixel_system_FlxQuadTree._checkObjectHullHeight);
			if(flixel_system_FlxQuadTree._objectHullX + flixel_system_FlxQuadTree._objectHullWidth > flixel_system_FlxQuadTree._checkObjectHullX && flixel_system_FlxQuadTree._objectHullX < flixel_system_FlxQuadTree._checkObjectHullX + flixel_system_FlxQuadTree._checkObjectHullWidth && flixel_system_FlxQuadTree._objectHullY + flixel_system_FlxQuadTree._objectHullHeight > flixel_system_FlxQuadTree._checkObjectHullY && flixel_system_FlxQuadTree._objectHullY < flixel_system_FlxQuadTree._checkObjectHullY + flixel_system_FlxQuadTree._checkObjectHullHeight) {
				if(flixel_system_FlxQuadTree._processingCallback == null || flixel_system_FlxQuadTree._processingCallback(flixel_system_FlxQuadTree._object,checkObject)) {
					overlapProcessed = true;
					if(flixel_system_FlxQuadTree._notifyCallback != null) {
						flixel_system_FlxQuadTree._notifyCallback(flixel_system_FlxQuadTree._object,checkObject);
					}
				}
			}
			if(flixel_system_FlxQuadTree._iterator != null) {
				flixel_system_FlxQuadTree._iterator = flixel_system_FlxQuadTree._iterator.next;
			}
		}
		return overlapProcessed;
	}
	,__class__: flixel_system_FlxQuadTree
});
var flixel_system_FlxSound = function() {
	this._alreadyPaused = false;
	this._volumeAdjust = 1.0;
	this._length = 0;
	this._time = 0;
	this.loopTime = 0;
	flixel_FlxBasic.call(this);
	this.reset();
};
$hxClasses["flixel.system.FlxSound"] = flixel_system_FlxSound;
flixel_system_FlxSound.__name__ = ["flixel","system","FlxSound"];
flixel_system_FlxSound.__super__ = flixel_FlxBasic;
flixel_system_FlxSound.prototype = $extend(flixel_FlxBasic.prototype,{
	reset: function() {
		this.destroy();
		this.x = 0;
		this.y = 0;
		this._time = 0;
		this._paused = false;
		this._volume = 1.0;
		this._volumeAdjust = 1.0;
		this.looped = false;
		this.loopTime = 0.0;
		this.endTime = 0.0;
		this._target = null;
		this._radius = 0;
		this._proximityPan = false;
		this.set_visible(false);
		this.amplitude = 0;
		this.amplitudeLeft = 0;
		this.amplitudeRight = 0;
		this.autoDestroy = false;
		if(this._transform == null) {
			this._transform = new openfl_media_SoundTransform();
		}
		this._transform.pan = 0;
	}
	,destroy: function() {
		this._transform = null;
		this.set_exists(false);
		this.set_active(false);
		this._target = null;
		this.name = null;
		this.artist = null;
		if(this._channel != null) {
			this._channel.removeEventListener("soundComplete",$bind(this,this.stopped));
			this._channel.stop();
			this._channel = null;
		}
		if(this._sound != null) {
			this._sound.removeEventListener("id3",$bind(this,this.gotID3));
			this._sound = null;
		}
		this.onComplete = null;
		flixel_FlxBasic.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		if(this._channel == null) {
			return;
		}
		this._time = this._channel.get_position();
		var radialMultiplier = 1.0;
		if(this._target != null) {
			var targetPosition = this._target.getPosition();
			var X = this.x;
			var Y = this.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			point._weak = true;
			radialMultiplier = targetPosition.distanceTo(point) / this._radius;
			targetPosition.put();
			var lowerBound = radialMultiplier < 0 ? 0 : radialMultiplier;
			radialMultiplier = 1 - (lowerBound > 1 ? 1 : lowerBound);
			if(this._proximityPan) {
				var d = (this.x - this._target.x) / this._radius;
				var lowerBound1 = d < -1 ? -1 : d;
				this._transform.pan = lowerBound1 > 1 ? 1 : lowerBound1;
			}
		}
		this._volumeAdjust = radialMultiplier;
		this.updateTransform();
		if(this._transform.volume > 0) {
			this.amplitudeLeft = this._channel.leftPeak / this._transform.volume;
			this.amplitudeRight = this._channel.rightPeak / this._transform.volume;
			this.amplitude = (this.amplitudeLeft + this.amplitudeRight) * 0.5;
		} else {
			this.amplitudeLeft = 0;
			this.amplitudeRight = 0;
			this.amplitude = 0;
		}
		if(this.endTime != null && this._time >= this.endTime) {
			this.stopped();
		}
	}
	,kill: function() {
		flixel_FlxBasic.prototype.kill.call(this);
		this.cleanup(false);
	}
	,loadEmbedded: function(EmbeddedSound,Looped,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = false;
		}
		if(Looped == null) {
			Looped = false;
		}
		if(EmbeddedSound == null) {
			return this;
		}
		this.cleanup(true);
		if(js_Boot.__instanceof(EmbeddedSound,openfl_media_Sound)) {
			this._sound = EmbeddedSound;
		} else if(js_Boot.__instanceof(EmbeddedSound,Class)) {
			this._sound = Type.createInstance(EmbeddedSound,[]);
		} else if(typeof(EmbeddedSound) == "string") {
			if(openfl_Assets.exists(EmbeddedSound,"SOUND") || openfl_Assets.exists(EmbeddedSound,"MUSIC")) {
				this._sound = openfl_Assets.getSound(EmbeddedSound);
			}
		}
		return this.init(Looped,AutoDestroy,OnComplete);
	}
	,loadStream: function(SoundURL,Looped,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = false;
		}
		if(Looped == null) {
			Looped = false;
		}
		this.cleanup(true);
		this._sound = new openfl_media_Sound();
		this._sound.addEventListener("id3",$bind(this,this.gotID3));
		this._sound.load(new openfl_net_URLRequest(SoundURL));
		return this.init(Looped,AutoDestroy,OnComplete);
	}
	,init: function(Looped,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = false;
		}
		if(Looped == null) {
			Looped = false;
		}
		this.looped = Looped;
		this.autoDestroy = AutoDestroy;
		this.updateTransform();
		this.set_exists(true);
		this.onComplete = OnComplete;
		this._length = this._sound == null ? 0 : this._sound.get_length();
		this.endTime = this._length;
		return this;
	}
	,proximity: function(X,Y,TargetObject,Radius,Pan) {
		if(Pan == null) {
			Pan = true;
		}
		this.x = X;
		this.y = Y;
		this._target = TargetObject;
		this._radius = Radius;
		this._proximityPan = Pan;
		return this;
	}
	,play: function(ForceRestart,StartTime,EndTime) {
		if(StartTime == null) {
			StartTime = 0.0;
		}
		if(ForceRestart == null) {
			ForceRestart = false;
		}
		if(!this.exists) {
			return this;
		}
		if(ForceRestart) {
			this.cleanup(false,true);
		} else if(this._channel != null) {
			return this;
		}
		if(this._paused) {
			this.resume();
		} else {
			this.startSound(StartTime);
		}
		this.endTime = EndTime;
		return this;
	}
	,resume: function() {
		if(this._paused) {
			this.startSound(this._time);
		}
		return this;
	}
	,pause: function() {
		if(this._channel == null) {
			return this;
		}
		this._time = this._channel.get_position();
		this._paused = true;
		this.cleanup(false,false);
		return this;
	}
	,stop: function() {
		this.cleanup(this.autoDestroy,true);
		return this;
	}
	,fadeOut: function(Duration,To,onComplete) {
		if(To == null) {
			To = 0;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(this.fadeTween != null) {
			this.fadeTween.cancel();
		}
		this.fadeTween = flixel_tweens_FlxTween.num(this._volume,To,Duration,{ onComplete : onComplete},$bind(this,this.volumeTween));
		return this;
	}
	,fadeIn: function(Duration,From,To,onComplete) {
		if(To == null) {
			To = 1;
		}
		if(From == null) {
			From = 0;
		}
		if(Duration == null) {
			Duration = 1;
		}
		if(this._channel == null) {
			this.play();
		}
		if(this.fadeTween != null) {
			this.fadeTween.cancel();
		}
		this.fadeTween = flixel_tweens_FlxTween.num(From,To,Duration,{ onComplete : onComplete},$bind(this,this.volumeTween));
		return this;
	}
	,volumeTween: function(f) {
		this.set_volume(f);
	}
	,getActualVolume: function() {
		return this._volume * this._volumeAdjust;
	}
	,setPosition: function(X,Y) {
		if(Y == null) {
			Y = 0;
		}
		if(X == null) {
			X = 0;
		}
		this.x = X;
		this.y = Y;
	}
	,updateTransform: function() {
		this._transform.volume = (flixel_FlxG.sound.muted ? 0 : 1) * flixel_FlxG.sound.volume * (this.group != null ? this.group.volume : 1) * this._volume * this._volumeAdjust;
		if(this._channel != null) {
			this._channel.set_soundTransform(this._transform);
		}
	}
	,startSound: function(StartTime) {
		if(this._sound == null) {
			return;
		}
		this._time = StartTime;
		this._paused = false;
		this._channel = this._sound.play(this._time,0,this._transform);
		if(this._channel != null) {
			this._channel.addEventListener("soundComplete",$bind(this,this.stopped));
			this.set_active(true);
		} else {
			this.set_exists(false);
			this.set_active(false);
		}
	}
	,stopped: function(_) {
		if(this.onComplete != null) {
			this.onComplete();
		}
		if(this.looped) {
			this.cleanup(false);
			this.play(false,this.loopTime,this.endTime);
		} else {
			this.cleanup(this.autoDestroy);
		}
	}
	,cleanup: function(destroySound,resetPosition) {
		if(resetPosition == null) {
			resetPosition = true;
		}
		if(destroySound) {
			this.reset();
			return;
		}
		if(this._channel != null) {
			this._channel.removeEventListener("soundComplete",$bind(this,this.stopped));
			this._channel.stop();
			this._channel = null;
		}
		this.set_active(false);
		if(resetPosition) {
			this._time = 0;
			this._paused = false;
		}
	}
	,gotID3: function(_) {
		this.name = this._sound.get_id3().songName;
		this.artist = this._sound.get_id3().artist;
		this._sound.removeEventListener("id3",$bind(this,this.gotID3));
	}
	,onFocus: function() {
		if(!this._alreadyPaused) {
			this.resume();
		}
	}
	,onFocusLost: function() {
		this._alreadyPaused = this._paused;
		this.pause();
	}
	,set_group: function(group) {
		if(this.group != group) {
			var oldGroup = this.group;
			this.group = group;
			if(oldGroup != null) {
				oldGroup.remove(this);
			}
			if(group != null) {
				group.add(this);
			}
			this.updateTransform();
		}
		return group;
	}
	,get_playing: function() {
		return this._channel != null;
	}
	,get_volume: function() {
		return this._volume;
	}
	,set_volume: function(Volume) {
		var lowerBound = Volume < 0 ? 0 : Volume;
		this._volume = lowerBound > 1 ? 1 : lowerBound;
		this.updateTransform();
		return Volume;
	}
	,get_pan: function() {
		return this._transform.pan;
	}
	,set_pan: function(pan) {
		return this._transform.pan = pan;
	}
	,get_time: function() {
		return this._time;
	}
	,set_time: function(time) {
		if(this._channel != null) {
			this.cleanup(false,true);
			this.startSound(time);
		}
		return this._time = time;
	}
	,get_length: function() {
		return this._length;
	}
	,toString: function() {
		var value = this._channel != null;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "playing";
		_this.value = value;
		var value1 = this._time;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "time";
		_this1.value = value1;
		var value2 = this._length;
		var _this2 = flixel_util_LabelValuePair._pool.get();
		_this2.label = "length";
		_this2.value = value2;
		var value3 = this._volume;
		var _this3 = flixel_util_LabelValuePair._pool.get();
		_this3.label = "volume";
		_this3.value = value3;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1,_this2,_this3]);
	}
	,__class__: flixel_system_FlxSound
	,__properties__: $extend(flixel_FlxBasic.prototype.__properties__,{set_group:"set_group",get_length:"get_length",set_time:"set_time",get_time:"get_time",set_volume:"set_volume",get_volume:"get_volume",get_playing:"get_playing",set_pan:"set_pan",get_pan:"get_pan"})
});
var flixel_system_FlxSoundGroup = function(volume) {
	if(volume == null) {
		volume = 1;
	}
	this.sounds = [];
	this.set_volume(volume);
};
$hxClasses["flixel.system.FlxSoundGroup"] = flixel_system_FlxSoundGroup;
flixel_system_FlxSoundGroup.__name__ = ["flixel","system","FlxSoundGroup"];
flixel_system_FlxSoundGroup.prototype = {
	add: function(sound) {
		if(this.sounds.indexOf(sound) < 0) {
			sound.set_group(this);
			this.sounds.push(sound);
			return true;
		}
		return false;
	}
	,remove: function(sound) {
		if(this.sounds.indexOf(sound) >= 0) {
			sound.set_group(null);
			return HxOverrides.remove(this.sounds,sound);
		}
		return false;
	}
	,set_volume: function(volume) {
		this.volume = volume;
		var _g = 0;
		var _g1 = this.sounds;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			sound.updateTransform();
		}
		return volume;
	}
	,__class__: flixel_system_FlxSoundGroup
	,__properties__: {set_volume:"set_volume"}
};
var flixel_system_FlxSplash = function(MaxSize) {
	this._curPart = 0;
	flixel_FlxState.call(this,MaxSize);
};
$hxClasses["flixel.system.FlxSplash"] = flixel_system_FlxSplash;
flixel_system_FlxSplash.__name__ = ["flixel","system","FlxSplash"];
flixel_system_FlxSplash.nextState = null;
flixel_system_FlxSplash.__super__ = flixel_FlxState;
flixel_system_FlxSplash.prototype = $extend(flixel_FlxState.prototype,{
	create: function() {
		this._cachedBgColor = flixel_FlxG.cameras.get_bgColor();
		flixel_FlxG.cameras.set_bgColor(-16777216);
		this._cachedTimestep = flixel_FlxG.fixedTimestep;
		flixel_FlxG.fixedTimestep = false;
		this._cachedAutoPause = flixel_FlxG.autoPause;
		flixel_FlxG.autoPause = false;
		flixel_FlxG.keys.enabled = false;
		this._times = [0.041,0.184,0.334,0.495,0.636];
		this._colors = [47394,16761138,16066382,3555839,314875];
		this._functions = [$bind(this,this.drawGreen),$bind(this,this.drawYellow),$bind(this,this.drawRed),$bind(this,this.drawBlue),$bind(this,this.drawLightBlue)];
		var _g = 0;
		var _g1 = this._times;
		while(_g < _g1.length) {
			var time = _g1[_g];
			++_g;
			new flixel_util_FlxTimer().start(time,$bind(this,this.timerCallback));
		}
		var stageWidth = openfl_Lib.current.stage.stageWidth;
		var stageHeight = openfl_Lib.current.stage.stageHeight;
		this._sprite = new openfl_display_Sprite();
		openfl_Lib.current.stage.addChild(this._sprite);
		this._gfx = this._sprite.get_graphics();
		this._text = new openfl_text_TextField();
		this._text.set_selectable(false);
		this._text.set_embedFonts(true);
		var dtf = new openfl_text_TextFormat(flixel_system_FlxAssets.FONT_DEFAULT,16,16777215);
		dtf.align = 0;
		this._text.set_defaultTextFormat(dtf);
		this._text.set_text("HaxeFlixel");
		openfl_Lib.current.stage.addChild(this._text);
		this.onResize(stageWidth,stageHeight);
		flixel_FlxG.sound.load(openfl_Assets.getSound("flixel/sounds/flixel" + ".ogg")).play();
	}
	,destroy: function() {
		this._sprite = null;
		this._gfx = null;
		this._text = null;
		this._times = null;
		this._colors = null;
		this._functions = null;
		flixel_FlxState.prototype.destroy.call(this);
	}
	,onResize: function(Width,Height) {
		flixel_FlxState.prototype.onResize.call(this,Width,Height);
		this._sprite.set_x(Width / 2);
		this._sprite.set_y(Height / 2 - 20 * flixel_FlxG.game.get_scaleY());
		this._text.set_width(Width / flixel_FlxG.game.get_scaleX());
		this._text.set_x(0);
		this._text.set_y(this._sprite.get_y() + 80 * flixel_FlxG.game.get_scaleY());
		this._sprite.set_scaleX(this._text.set_scaleX(flixel_FlxG.game.get_scaleX()));
		this._sprite.set_scaleY(this._text.set_scaleY(flixel_FlxG.game.get_scaleY()));
	}
	,timerCallback: function(Timer) {
		this._functions[this._curPart]();
		this._text.set_textColor(this._colors[this._curPart]);
		this._text.set_text("HaxeFlixel");
		this._curPart++;
		if(this._curPart == 5) {
			flixel_tweens_FlxTween.tween(this._sprite,{ alpha : 0},3.0,{ ease : flixel_tweens_FlxEase.quadOut, onComplete : $bind(this,this.onComplete)});
			flixel_tweens_FlxTween.tween(this._text,{ alpha : 0},3.0,{ ease : flixel_tweens_FlxEase.quadOut});
		}
	}
	,drawGreen: function() {
		this._gfx.beginFill(47394);
		this._gfx.moveTo(0,-37);
		this._gfx.lineTo(1,-37);
		this._gfx.lineTo(37,0);
		this._gfx.lineTo(37,1);
		this._gfx.lineTo(1,37);
		this._gfx.lineTo(0,37);
		this._gfx.lineTo(-37,1);
		this._gfx.lineTo(-37,0);
		this._gfx.lineTo(0,-37);
		this._gfx.endFill();
	}
	,drawYellow: function() {
		this._gfx.beginFill(16761138);
		this._gfx.moveTo(-50,-50);
		this._gfx.lineTo(-25,-50);
		this._gfx.lineTo(0,-37);
		this._gfx.lineTo(-37,0);
		this._gfx.lineTo(-50,-25);
		this._gfx.lineTo(-50,-50);
		this._gfx.endFill();
	}
	,drawRed: function() {
		this._gfx.beginFill(16066382);
		this._gfx.moveTo(50,-50);
		this._gfx.lineTo(25,-50);
		this._gfx.lineTo(1,-37);
		this._gfx.lineTo(37,0);
		this._gfx.lineTo(50,-25);
		this._gfx.lineTo(50,-50);
		this._gfx.endFill();
	}
	,drawBlue: function() {
		this._gfx.beginFill(3555839);
		this._gfx.moveTo(-50,50);
		this._gfx.lineTo(-25,50);
		this._gfx.lineTo(0,37);
		this._gfx.lineTo(-37,1);
		this._gfx.lineTo(-50,25);
		this._gfx.lineTo(-50,50);
		this._gfx.endFill();
	}
	,drawLightBlue: function() {
		this._gfx.beginFill(314875);
		this._gfx.moveTo(50,50);
		this._gfx.lineTo(25,50);
		this._gfx.lineTo(1,37);
		this._gfx.lineTo(37,1);
		this._gfx.lineTo(50,25);
		this._gfx.lineTo(50,50);
		this._gfx.endFill();
	}
	,onComplete: function(Tween) {
		flixel_FlxG.cameras.set_bgColor(this._cachedBgColor);
		flixel_FlxG.fixedTimestep = this._cachedTimestep;
		flixel_FlxG.autoPause = this._cachedAutoPause;
		flixel_FlxG.keys.enabled = true;
		openfl_Lib.current.stage.removeChild(this._sprite);
		openfl_Lib.current.stage.removeChild(this._text);
		var nextState = Type.createInstance(flixel_system_FlxSplash.nextState,[]);
		if(flixel_FlxG.game._state.switchTo(nextState)) {
			flixel_FlxG.game._requestedState = nextState;
		}
		flixel_FlxG.game._gameJustStarted = true;
	}
	,__class__: flixel_system_FlxSplash
});
var flixel_system_debug_DebuggerUtil = function() { };
$hxClasses["flixel.system.debug.DebuggerUtil"] = flixel_system_debug_DebuggerUtil;
flixel_system_debug_DebuggerUtil.__name__ = ["flixel","system","debug","DebuggerUtil"];
flixel_system_debug_DebuggerUtil.createTextField = function(X,Y,Color,Size) {
	if(Size == null) {
		Size = 12;
	}
	if(Color == null) {
		Color = -1;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	return flixel_system_debug_DebuggerUtil.initTextField(new openfl_text_TextField(),X,Y,Color,Size);
};
flixel_system_debug_DebuggerUtil.initTextField = function(tf,X,Y,Color,Size) {
	if(Size == null) {
		Size = 12;
	}
	if(Color == null) {
		Color = -1;
	}
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	tf.set_x(X);
	tf.set_y(Y);
	tf.set_multiline(false);
	tf.set_wordWrap(false);
	tf.set_embedFonts(true);
	tf.set_selectable(false);
	tf.set_defaultTextFormat(new openfl_text_TextFormat(flixel_system_FlxAssets.FONT_DEBUGGER,Size,Color & 16777215));
	tf.set_alpha((Color >> 24 & 255) / 255);
	tf.set_autoSize(1);
	return tf;
};
flixel_system_debug_DebuggerUtil.fixSize = function(bitmapData) {
	var tmp;
	var tmp1;
	if(bitmapData.__properties__) {
		tmp = bitmapData.__properties__["set_" + "width"];
		tmp1 = tmp;
	} else {
		tmp1 = false;
	}
	if(tmp1) {
		bitmapData[tmp](11);
	} else {
		bitmapData["width"] = 11;
	}
	var tmp2;
	var tmp3;
	if(bitmapData.__properties__) {
		tmp2 = bitmapData.__properties__["set_" + "height"];
		tmp3 = tmp2;
	} else {
		tmp3 = false;
	}
	if(tmp3) {
		bitmapData[tmp2](11);
	} else {
		bitmapData["height"] = 11;
	}
	return bitmapData;
};
var flixel_system_debug__$FlxDebugger_GraphicFlixel = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug__$FlxDebugger_GraphicFlixel.preload != null) {
		this.__fromImage(flixel_system_debug__$FlxDebugger_GraphicFlixel.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug__$FlxDebugger_GraphicFlixel.preload == null) {
				flixel_system_debug__$FlxDebugger_GraphicFlixel.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug__$FlxDebugger_GraphicFlixel.resourceName),flixel_system_debug__$FlxDebugger_GraphicFlixel.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug._FlxDebugger.GraphicFlixel"] = flixel_system_debug__$FlxDebugger_GraphicFlixel;
flixel_system_debug__$FlxDebugger_GraphicFlixel.__name__ = ["flixel","system","debug","_FlxDebugger","GraphicFlixel"];
flixel_system_debug__$FlxDebugger_GraphicFlixel.preload = null;
flixel_system_debug__$FlxDebugger_GraphicFlixel.__super__ = openfl_display_BitmapData;
flixel_system_debug__$FlxDebugger_GraphicFlixel.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug__$FlxDebugger_GraphicFlixel
});
var flixel_system_debug__$FlxDebugger_GraphicDrawDebug = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload != null) {
		this.__fromImage(flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload == null) {
				flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug__$FlxDebugger_GraphicDrawDebug.resourceName),flixel_system_debug__$FlxDebugger_GraphicDrawDebug.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug._FlxDebugger.GraphicDrawDebug"] = flixel_system_debug__$FlxDebugger_GraphicDrawDebug;
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.__name__ = ["flixel","system","debug","_FlxDebugger","GraphicDrawDebug"];
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.preload = null;
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.__super__ = openfl_display_BitmapData;
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug__$FlxDebugger_GraphicDrawDebug
});
var flixel_system_debug_GraphicLog = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicLog.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicLog.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicLog.preload == null) {
				flixel_system_debug_GraphicLog.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicLog.resourceName),flixel_system_debug_GraphicLog.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicLog"] = flixel_system_debug_GraphicLog;
flixel_system_debug_GraphicLog.__name__ = ["flixel","system","debug","GraphicLog"];
flixel_system_debug_GraphicLog.preload = null;
flixel_system_debug_GraphicLog.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicLog.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicLog
});
var flixel_system_debug_GraphicStats = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicStats.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicStats.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicStats.preload == null) {
				flixel_system_debug_GraphicStats.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicStats.resourceName),flixel_system_debug_GraphicStats.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicStats"] = flixel_system_debug_GraphicStats;
flixel_system_debug_GraphicStats.__name__ = ["flixel","system","debug","GraphicStats"];
flixel_system_debug_GraphicStats.preload = null;
flixel_system_debug_GraphicStats.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicStats.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicStats
});
var flixel_system_debug_GraphicWatch = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicWatch.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicWatch.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicWatch.preload == null) {
				flixel_system_debug_GraphicWatch.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicWatch.resourceName),flixel_system_debug_GraphicWatch.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicWatch"] = flixel_system_debug_GraphicWatch;
flixel_system_debug_GraphicWatch.__name__ = ["flixel","system","debug","GraphicWatch"];
flixel_system_debug_GraphicWatch.preload = null;
flixel_system_debug_GraphicWatch.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicWatch.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicWatch
});
var flixel_system_debug_GraphicBitmapLog = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicBitmapLog.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicBitmapLog.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicBitmapLog.preload == null) {
				flixel_system_debug_GraphicBitmapLog.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicBitmapLog.resourceName),flixel_system_debug_GraphicBitmapLog.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicBitmapLog"] = flixel_system_debug_GraphicBitmapLog;
flixel_system_debug_GraphicBitmapLog.__name__ = ["flixel","system","debug","GraphicBitmapLog"];
flixel_system_debug_GraphicBitmapLog.preload = null;
flixel_system_debug_GraphicBitmapLog.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicBitmapLog.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicBitmapLog
});
var flixel_system_debug_GraphicConsole = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicConsole.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicConsole.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicConsole.preload == null) {
				flixel_system_debug_GraphicConsole.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicConsole.resourceName),flixel_system_debug_GraphicConsole.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicConsole"] = flixel_system_debug_GraphicConsole;
flixel_system_debug_GraphicConsole.__name__ = ["flixel","system","debug","GraphicConsole"];
flixel_system_debug_GraphicConsole.preload = null;
flixel_system_debug_GraphicConsole.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicConsole.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicConsole
});
var flixel_system_debug_GraphicArrowLeft = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicArrowLeft.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicArrowLeft.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicArrowLeft.preload == null) {
				flixel_system_debug_GraphicArrowLeft.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicArrowLeft.resourceName),flixel_system_debug_GraphicArrowLeft.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicArrowLeft"] = flixel_system_debug_GraphicArrowLeft;
flixel_system_debug_GraphicArrowLeft.__name__ = ["flixel","system","debug","GraphicArrowLeft"];
flixel_system_debug_GraphicArrowLeft.preload = null;
flixel_system_debug_GraphicArrowLeft.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicArrowLeft.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicArrowLeft
});
var flixel_system_debug_GraphicArrowRight = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicArrowRight.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicArrowRight.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicArrowRight.preload == null) {
				flixel_system_debug_GraphicArrowRight.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicArrowRight.resourceName),flixel_system_debug_GraphicArrowRight.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicArrowRight"] = flixel_system_debug_GraphicArrowRight;
flixel_system_debug_GraphicArrowRight.__name__ = ["flixel","system","debug","GraphicArrowRight"];
flixel_system_debug_GraphicArrowRight.preload = null;
flixel_system_debug_GraphicArrowRight.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicArrowRight.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicArrowRight
});
var flixel_system_debug_GraphicCloseButton = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicCloseButton.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicCloseButton.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicCloseButton.preload == null) {
				flixel_system_debug_GraphicCloseButton.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicCloseButton.resourceName),flixel_system_debug_GraphicCloseButton.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicCloseButton"] = flixel_system_debug_GraphicCloseButton;
flixel_system_debug_GraphicCloseButton.__name__ = ["flixel","system","debug","GraphicCloseButton"];
flixel_system_debug_GraphicCloseButton.preload = null;
flixel_system_debug_GraphicCloseButton.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicCloseButton.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicCloseButton
});
var flixel_system_debug_GraphicInteractive = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_GraphicInteractive.preload != null) {
		this.__fromImage(flixel_system_debug_GraphicInteractive.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_GraphicInteractive.preload == null) {
				flixel_system_debug_GraphicInteractive.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_GraphicInteractive.resourceName),flixel_system_debug_GraphicInteractive.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.GraphicInteractive"] = flixel_system_debug_GraphicInteractive;
flixel_system_debug_GraphicInteractive.__name__ = ["flixel","system","debug","GraphicInteractive"];
flixel_system_debug_GraphicInteractive.preload = null;
flixel_system_debug_GraphicInteractive.__super__ = openfl_display_BitmapData;
flixel_system_debug_GraphicInteractive.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_GraphicInteractive
});
var flixel_system_debug_FlxDebugger = function() {
	openfl_display_Sprite.call(this);
};
$hxClasses["flixel.system.debug.FlxDebugger"] = flixel_system_debug_FlxDebugger;
flixel_system_debug_FlxDebugger.__name__ = ["flixel","system","debug","FlxDebugger"];
flixel_system_debug_FlxDebugger.__super__ = openfl_display_Sprite;
flixel_system_debug_FlxDebugger.prototype = $extend(openfl_display_Sprite.prototype,{
	__class__: flixel_system_debug_FlxDebugger
});
var flixel_system_debug_FlxDebuggerLayout = $hxClasses["flixel.system.debug.FlxDebuggerLayout"] = { __ename__ : ["flixel","system","debug","FlxDebuggerLayout"], __constructs__ : ["STANDARD","MICRO","BIG","TOP","LEFT","RIGHT"] };
flixel_system_debug_FlxDebuggerLayout.STANDARD = ["STANDARD",0];
flixel_system_debug_FlxDebuggerLayout.STANDARD.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.STANDARD.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.MICRO = ["MICRO",1];
flixel_system_debug_FlxDebuggerLayout.MICRO.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.MICRO.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.BIG = ["BIG",2];
flixel_system_debug_FlxDebuggerLayout.BIG.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.BIG.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.TOP = ["TOP",3];
flixel_system_debug_FlxDebuggerLayout.TOP.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.TOP.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.LEFT = ["LEFT",4];
flixel_system_debug_FlxDebuggerLayout.LEFT.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.LEFT.__enum__ = flixel_system_debug_FlxDebuggerLayout;
flixel_system_debug_FlxDebuggerLayout.RIGHT = ["RIGHT",5];
flixel_system_debug_FlxDebuggerLayout.RIGHT.toString = $estr;
flixel_system_debug_FlxDebuggerLayout.RIGHT.__enum__ = flixel_system_debug_FlxDebuggerLayout;
var flixel_system_debug__$Window_GraphicWindowHandle = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug__$Window_GraphicWindowHandle.preload != null) {
		this.__fromImage(flixel_system_debug__$Window_GraphicWindowHandle.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug__$Window_GraphicWindowHandle.preload == null) {
				flixel_system_debug__$Window_GraphicWindowHandle.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug__$Window_GraphicWindowHandle.resourceName),flixel_system_debug__$Window_GraphicWindowHandle.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug._Window.GraphicWindowHandle"] = flixel_system_debug__$Window_GraphicWindowHandle;
flixel_system_debug__$Window_GraphicWindowHandle.__name__ = ["flixel","system","debug","_Window","GraphicWindowHandle"];
flixel_system_debug__$Window_GraphicWindowHandle.preload = null;
flixel_system_debug__$Window_GraphicWindowHandle.__super__ = openfl_display_BitmapData;
flixel_system_debug__$Window_GraphicWindowHandle.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug__$Window_GraphicWindowHandle
});
var flixel_system_debug_Window = function(Title,Icon,Width,Height,Resizable,Bounds,Closable) {
	if(Closable == null) {
		Closable = false;
	}
	if(Resizable == null) {
		Resizable = true;
	}
	if(Height == null) {
		Height = 0;
	}
	if(Width == null) {
		Width = 0;
	}
	openfl_display_Sprite.call(this);
	this.minSize = new openfl_geom_Point(50,30);
	this._width = Math.abs(Width) | 0;
	this._height = Math.abs(Height) | 0;
	this.updateBounds(Bounds);
	this._drag = new openfl_geom_Point();
	this._resizable = Resizable;
	this._closable = Closable;
	this._shadow = new openfl_display_Bitmap(new openfl_display_BitmapData(1,2,true,-16777216));
	this._background = new openfl_display_Bitmap(new openfl_display_BitmapData(1,1,true,-580952225));
	this._header = new openfl_display_Bitmap(new openfl_display_BitmapData(1,15,true,-1157627904));
	this._background.set_y(this._header.get_height());
	this._title = flixel_system_debug_DebuggerUtil.createTextField(2,-1);
	this._title.set_alpha(0.8);
	this._title.set_text(Title);
	this.addChild(this._shadow);
	this.addChild(this._background);
	this.addChild(this._header);
	this.addChild(this._title);
	if(Icon != null) {
		flixel_system_debug_DebuggerUtil.fixSize(Icon);
		var icon = new openfl_display_Bitmap(Icon);
		icon.set_x(5);
		icon.set_y(2);
		icon.set_alpha(0.8);
		this._title.set_x(icon.get_x() + icon.get_width() + 2);
		this.addChild(icon);
	}
	if(this._resizable) {
		this._handle = new openfl_display_Bitmap(flixel_system_debug_DebuggerUtil.fixSize(new flixel_system_debug__$Window_GraphicWindowHandle(0,0)));
		this.addChild(this._handle);
	}
	if(Closable) {
		this._closeButton = new flixel_system_ui_FlxSystemButton(new flixel_system_debug_GraphicCloseButton(0,0),$bind(this,this.close));
		this._closeButton.set_alpha(0.8);
		this.addChild(this._closeButton);
	} else {
		this._id = flixel_system_debug_Window.WINDOW_AMOUNT;
		this.loadSaveData();
		flixel_system_debug_Window.WINDOW_AMOUNT++;
	}
	if(this._width != 0 || this._height != 0) {
		this.updateSize();
	}
	this.bound();
	this.addEventListener("enterFrame",$bind(this,this.init));
};
$hxClasses["flixel.system.debug.Window"] = flixel_system_debug_Window;
flixel_system_debug_Window.__name__ = ["flixel","system","debug","Window"];
flixel_system_debug_Window.__super__ = openfl_display_Sprite;
flixel_system_debug_Window.prototype = $extend(openfl_display_Sprite.prototype,{
	destroy: function() {
		this.minSize = null;
		this.maxSize = null;
		this._bounds = null;
		if(this._shadow != null) {
			this.removeChild(this._shadow);
		}
		this._shadow = null;
		if(this._background != null) {
			this.removeChild(this._background);
		}
		this._background = null;
		if(this._header != null) {
			this.removeChild(this._header);
		}
		this._header = null;
		if(this._title != null) {
			this.removeChild(this._title);
		}
		this._title = null;
		if(this._handle != null) {
			this.removeChild(this._handle);
		}
		this._handle = null;
		this._drag = null;
		this._closeButton = flixel_util_FlxDestroyUtil.destroy(this._closeButton);
		var stage = openfl_Lib.current.stage;
		if(stage.hasEventListener("mouseMove")) {
			stage.removeEventListener("mouseMove",$bind(this,this.onMouseMove));
		}
		if(this.hasEventListener("mouseDown")) {
			this.removeEventListener("mouseDown",$bind(this,this.onMouseDown));
		}
		if(stage.hasEventListener("mouseUp")) {
			stage.removeEventListener("mouseUp",$bind(this,this.onMouseUp));
		}
	}
	,resize: function(Width,Height) {
		this._width = Math.abs(Width) | 0;
		this._height = Math.abs(Height) | 0;
		this.updateSize();
	}
	,reposition: function(X,Y) {
		this.set_x(X);
		this.set_y(Y);
		this.bound();
	}
	,updateBounds: function(Bounds) {
		this._bounds = Bounds;
		if(this._bounds != null) {
			this.maxSize = new openfl_geom_Point(this._bounds.width,this._bounds.height);
		} else {
			this.maxSize = new openfl_geom_Point(1.79e+308,1.79e+308);
		}
	}
	,setVisible: function(Value) {
		this.set_visible(Value);
		if(!this._closable) {
			flixel_FlxG.save.data.windowSettings[this._id] = this.get_visible();
			flixel_FlxG.save.flush();
		}
		if(this.toggleButton != null) {
			this.toggleButton.set_toggled(!this.get_visible());
		}
		if(this.get_visible()) {
			this.parent.addChild(this);
		}
	}
	,toggleVisible: function() {
		this.setVisible(!this.get_visible());
	}
	,putOnTop: function() {
		this.parent.addChild(this);
	}
	,loadSaveData: function() {
		if(flixel_FlxG.save.data.windowSettings != null) {
			this.set_visible(flixel_FlxG.save.data.windowSettings[this._id]);
		} else {
			this.initSaveData();
			this.loadSaveData();
		}
	}
	,initSaveData: function() {
		var settings = [];
		var _g = 0;
		while(_g < 10) settings[_g++] = true;
		flixel_FlxG.save.data.windowSettings = settings;
		flixel_FlxG.save.flush();
	}
	,update: function() {
	}
	,init: function(E) {
		if(this.stage == null) {
			return;
		}
		this.removeEventListener("enterFrame",$bind(this,this.init));
		this.stage.addEventListener("mouseMove",$bind(this,this.onMouseMove));
		this.stage.addEventListener("mouseUp",$bind(this,this.onMouseUp));
		this.addEventListener("mouseDown",$bind(this,this.onMouseDown));
	}
	,onMouseMove: function(E) {
		var mouseX = this.get_mouseX() < 0 ? 0 : this.get_mouseX();
		var mouseY = this.get_mouseY() < 0 ? 0 : this.get_mouseY();
		if(!this.parent.get_visible()) {
			this._overHandle = this._overHeader = false;
			return;
		}
		if(this._dragging) {
			this._overHeader = true;
			this.reposition(this.parent.get_mouseX() - this._drag.x,this.parent.get_mouseY() - this._drag.y);
		} else if(this._resizing) {
			this._overHandle = true;
			this.resize(mouseX - this._drag.x,mouseY - this._drag.y);
		} else if(mouseX >= 0 && mouseX <= this._width && mouseY >= 0 && mouseY <= this._height) {
			this._overHeader = mouseX <= this._header.get_width() && mouseY <= this._header.get_height();
			if(this._resizable) {
				this._overHandle = mouseX >= this._width - this._handle.get_width() && mouseY >= this._height - this._handle.get_height();
			}
		} else {
			this._overHandle = this._overHeader = false;
		}
	}
	,onMouseDown: function(E) {
		if(this._overHeader) {
			this.parent.addChild(this);
			this._dragging = true;
			this._drag.x = this.get_mouseX();
			this._drag.y = this.get_mouseY();
		} else if(this._overHandle) {
			this.parent.addChild(this);
			this._resizing = true;
			var tmp = this._width;
			var tmp1 = this.get_mouseX();
			this._drag.x = tmp - tmp1;
			var tmp2 = this._height;
			var tmp3 = this.get_mouseY();
			this._drag.y = tmp2 - tmp3;
		}
	}
	,onMouseUp: function(E) {
		this._dragging = false;
		this._resizing = false;
	}
	,bound: function() {
		if(this._bounds != null) {
			var Value = this.get_x();
			var Min = this._bounds.get_left();
			var Max = this._bounds.get_right() - this._width;
			var lowerBound = Min != null && Value < Min ? Min : Value;
			this.set_x(Max != null && lowerBound > Max ? Max : lowerBound);
			var Value1 = this.get_y();
			var Min1 = this._bounds.get_top();
			var Max1 = this._bounds.get_bottom() - this._height;
			var lowerBound1 = Min1 != null && Value1 < Min1 ? Min1 : Value1;
			this.set_y(Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1);
		}
	}
	,updateSize: function() {
		var Value = this._width;
		var Min = this.minSize.x;
		var Max = this.maxSize.x;
		var lowerBound = Min != null && Value < Min ? Min : Value;
		this._width = (Max != null && lowerBound > Max ? Max : lowerBound) | 0;
		var Value1 = this._height;
		var Min1 = this.minSize.y;
		var Max1 = this.maxSize.y;
		var lowerBound1 = Min1 != null && Value1 < Min1 ? Min1 : Value1;
		this._height = (Max1 != null && lowerBound1 > Max1 ? Max1 : lowerBound1) | 0;
		this._header.set_scaleX(this._width);
		this._background.set_scaleX(this._width);
		this._background.set_scaleY(this._height - this._header.get_height());
		this._shadow.set_scaleX(this._width);
		this._shadow.set_y(this._height);
		this._title.set_width(this._width - 4);
		if(this._resizable) {
			this._handle.set_x(this._width - this._handle.get_width());
			this._handle.set_y(this._height - this._handle.get_height());
		}
		if(this._closeButton != null) {
			this._closeButton.set_x(this._width - this._closeButton.get_width() - 3);
			this._closeButton.set_y(3);
		}
	}
	,close: function() {
		this.destroy();
	}
	,__class__: flixel_system_debug_Window
});
var flixel_system_debug_completion_CompletionList = function(capacity) {
	this.upperVisibleIndex = 0;
	this.lowerVisibleIndex = 0;
	this.selectedIndex = 0;
	this.entries = [];
	openfl_display_Sprite.call(this);
	this.set_visible(false);
	this.upperVisibleIndex = capacity - 1;
	this.actualHeight = capacity * 20;
	this.createPopupEntries(capacity);
	this.createScrollBar();
	this.updateSelectedItem();
	openfl_Lib.current.stage.addEventListener("keyDown",$bind(this,this.onKeyDown));
};
$hxClasses["flixel.system.debug.completion.CompletionList"] = flixel_system_debug_completion_CompletionList;
flixel_system_debug_completion_CompletionList.__name__ = ["flixel","system","debug","completion","CompletionList"];
flixel_system_debug_completion_CompletionList.__super__ = openfl_display_Sprite;
flixel_system_debug_completion_CompletionList.prototype = $extend(openfl_display_Sprite.prototype,{
	show: function(x,items) {
		this.set_visible(true);
		this.set_x(x);
		this.originalItems = items;
		this.set_filter("");
		this.updateEntries();
	}
	,setY: function(y) {
		this.set_y(y - this.actualHeight);
	}
	,close: function() {
		this.set_visible(false);
		this.set_filter(null);
		if(this.closed != null) {
			this.closed();
		}
	}
	,createPopupEntries: function(amount) {
		var _g1 = 0;
		while(_g1 < amount) {
			var entry = new flixel_system_debug_completion_CompletionListEntry();
			this.entries.push(entry);
			this.addChild(entry);
			entry.set_y(20 * _g1++);
		}
	}
	,createScrollBar: function() {
		this.scrollBar = new flixel_system_debug_completion_CompletionListScrollBar(150,0,5,this.actualHeight);
		this.addChild(this.scrollBar);
	}
	,onKeyDown: function(e) {
		if(!this.get_visible()) {
			return;
		}
		switch(e.keyCode) {
		case 13:
			if(this.completed != null) {
				this.completed(this.items[this.selectedIndex]);
			}
			this.close();
			return;
		case 27:
			this.close();
			return;
		case 38:
			this.updateIndices(-1);
			break;
		case 40:
			this.updateIndices(1);
			break;
		}
		this.updateEntries();
	}
	,updateIndices: function(modifier) {
		this.selectedIndex = this.bound(this.selectedIndex + modifier);
		var Value = this.selectedIndex;
		var Min = this.lowerVisibleIndex;
		var Max = this.upperVisibleIndex;
		if((Min == null || Value >= Min) && (Max == null || Value <= Max)) {
			return;
		}
		this.lowerVisibleIndex = this.bound(this.lowerVisibleIndex + modifier);
		this.upperVisibleIndex = this.bound(this.upperVisibleIndex + modifier);
		if(this.upperVisibleIndex - this.lowerVisibleIndex == this.items.length) {
			return;
		}
		if(this.lowerVisibleIndex == 0) {
			this.upperVisibleIndex = this.entries.length - 1;
		} else if(this.upperVisibleIndex == this.items.length - 1) {
			this.lowerVisibleIndex = this.items.length - this.entries.length;
		}
	}
	,bound: function(index) {
		var Max = this.items.length - 1;
		var lowerBound = index < 0 ? 0 : index;
		return (Max != null && lowerBound > Max ? Max : lowerBound) | 0;
	}
	,updateEntries: function() {
		this.updateLabels();
		this.updateSelectedItem();
		this.scrollBar.updateHandle(this.lowerVisibleIndex,this.items.length,this.entries.length);
	}
	,updateLabels: function() {
		var _g1 = 0;
		var _g = this.entries.length;
		while(_g1 < _g) {
			var i = _g1++;
			var selectedItem = this.items[this.lowerVisibleIndex + i];
			if(selectedItem == null) {
				selectedItem = "";
			}
			this.entries[i].setItem(selectedItem);
		}
	}
	,updateSelectedItem: function() {
		var _g = 0;
		var _g1 = this.entries;
		while(_g < _g1.length) {
			var entry = _g1[_g];
			++_g;
			entry.set_selected(false);
		}
		this.entries[this.selectedIndex - this.lowerVisibleIndex].set_selected(true);
		if(this.selectionChanged != null) {
			this.selectionChanged(this.items[this.selectedIndex]);
		}
	}
	,setItems: function(items) {
		if(items == null) {
			return;
		}
		if(items.length == 0) {
			this.close();
		}
		this.items = items;
		this.selectedIndex = 0;
		this.lowerVisibleIndex = 0;
		this.upperVisibleIndex = this.entries.length - 1;
		this.updateEntries();
	}
	,filterItems: function(filter) {
		if(filter == null) {
			filter = "";
		}
		var tmp = this.originalItems.filter(function(item) {
			return item.toLowerCase().indexOf(filter.toLowerCase()) != -1;
		});
		return this.sortItems(filter,tmp);
	}
	,sortItems: function(filter,items) {
		var _gthis = this;
		if(filter == "") {
			return items;
		}
		items.sort(function(a,b) {
			var valueA = _gthis.startsWithExt(a,filter);
			var valueB = _gthis.startsWithExt(b,filter);
			if(valueA > valueB) {
				return -valueA;
			}
			if(valueB > valueA) {
				return valueB;
			}
			if(valueA == valueB) {
				return a.length - b.length | 0;
			}
			return 0;
		});
		return items;
	}
	,startsWithExt: function(s,start) {
		if(StringTools.startsWith(s,start)) {
			return 2;
		}
		var _this_r = new RegExp("^[_]+","".split("u").join(""));
		if(StringTools.startsWith(s.replace(_this_r,""),start)) {
			return 1;
		}
		return 0;
	}
	,set_filter: function(filter) {
		if(filter == this.filter) {
			return filter;
		}
		this.setItems(this.filterItems(filter));
		return this.filter = filter;
	}
	,__class__: flixel_system_debug_completion_CompletionList
	,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{set_filter:"set_filter"})
});
var flixel_system_debug_completion_CompletionListEntry = function() {
	this.selected = false;
	openfl_display_Sprite.call(this);
	this.initBitmapDatas();
	this.addChild(this.background = new openfl_display_Bitmap());
	this.background.bitmapData = flixel_system_debug_completion_CompletionListEntry.normalBitmapData;
	this.label = flixel_system_debug_DebuggerUtil.createTextField();
	this.label.set_x(4);
	this.addChild(this.label);
};
$hxClasses["flixel.system.debug.completion.CompletionListEntry"] = flixel_system_debug_completion_CompletionListEntry;
flixel_system_debug_completion_CompletionListEntry.__name__ = ["flixel","system","debug","completion","CompletionListEntry"];
flixel_system_debug_completion_CompletionListEntry.normalBitmapData = null;
flixel_system_debug_completion_CompletionListEntry.highlightBitmapData = null;
flixel_system_debug_completion_CompletionListEntry.__super__ = openfl_display_Sprite;
flixel_system_debug_completion_CompletionListEntry.prototype = $extend(openfl_display_Sprite.prototype,{
	initBitmapDatas: function() {
		if(flixel_system_debug_completion_CompletionListEntry.normalBitmapData == null) {
			flixel_system_debug_completion_CompletionListEntry.normalBitmapData = new openfl_display_BitmapData(150,20,true,-10526881);
		}
		if(flixel_system_debug_completion_CompletionListEntry.highlightBitmapData == null) {
			flixel_system_debug_completion_CompletionListEntry.highlightBitmapData = new openfl_display_BitmapData(150,20,true,-9605779);
		}
	}
	,setItem: function(item) {
		this.label.set_text(item);
		if(this.label.get_width() > 150) {
			this.label.set_width(150);
			this.label.set_autoSize(2);
		}
	}
	,set_selected: function(selected) {
		if(selected == this.selected) {
			return selected;
		}
		this.background.bitmapData = selected ? flixel_system_debug_completion_CompletionListEntry.highlightBitmapData : flixel_system_debug_completion_CompletionListEntry.normalBitmapData;
		return this.selected = selected;
	}
	,__class__: flixel_system_debug_completion_CompletionListEntry
	,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{set_selected:"set_selected"})
});
var flixel_system_debug_completion_CompletionListScrollBar = function(x,y,width,height) {
	openfl_display_Sprite.call(this);
	this.set_x(x);
	this.set_y(y);
	this.addChild(new openfl_display_Bitmap(new openfl_display_BitmapData(width,height,true,-12303292)));
	this.handle = new openfl_display_Bitmap(new openfl_display_BitmapData(width,1,true,-14540254));
	this.addChild(this.handle);
};
$hxClasses["flixel.system.debug.completion.CompletionListScrollBar"] = flixel_system_debug_completion_CompletionListScrollBar;
flixel_system_debug_completion_CompletionListScrollBar.__name__ = ["flixel","system","debug","completion","CompletionListScrollBar"];
flixel_system_debug_completion_CompletionListScrollBar.__super__ = openfl_display_Sprite;
flixel_system_debug_completion_CompletionListScrollBar.prototype = $extend(openfl_display_Sprite.prototype,{
	updateHandle: function(lower,items,entries) {
		this.handle.set_scaleY(Math.min(this.get_height() / items * entries,this.get_height()));
		this.handle.set_y(this.get_height() / items * lower);
		var tmp = this.handle;
		var Value = this.handle.get_y();
		var Max = this.get_height() - this.handle.get_scaleY();
		var lowerBound = Value < 0 ? 0 : Value;
		tmp.set_y(Max != null && lowerBound > Max ? Max : lowerBound);
	}
	,__class__: flixel_system_debug_completion_CompletionListScrollBar
});
var flixel_system_debug_interaction_Interaction = function(container) {
	this._flixelPointer = new flixel_input_FlxPointer();
	this._debuggerInteraction = false;
	this._keysUp = new haxe_ds_IntMap();
	this._keysDown = new haxe_ds_IntMap();
	this._turn = 2;
	this._tools = [];
	this.pointerPressed = false;
	this.pointerJustReleased = false;
	this.pointerJustPressed = false;
	this.flixelPointer = new flixel_math_FlxPoint();
	this.selectedItems = new flixel_group_FlxTypedGroup();
	flixel_system_debug_Window.call(this,"Tools",new flixel_system_debug_GraphicInteractive(0,0),40,25,false);
	this.reposition(2,100);
	this._container = container;
	this._customCursor = new openfl_display_Sprite();
	this._customCursor.mouseEnabled = false;
	this._container.addChild(this._customCursor);
	this.addTool(new flixel_system_debug_interaction_tools_Pointer());
	this.addTool(new flixel_system_debug_interaction_tools_Mover());
	this.addTool(new flixel_system_debug_interaction_tools_Eraser());
	flixel_FlxG.signals.postDraw.add($bind(this,this.postDraw));
	flixel_FlxG["debugger"].visibilityChanged.add($bind(this,this.handleDebuggerVisibilityChanged));
	openfl_Lib.current.stage.addEventListener("mouseMove",$bind(this,this.updateMouse));
	openfl_Lib.current.stage.addEventListener("mouseDown",$bind(this,this.handleMouseClick));
	openfl_Lib.current.stage.addEventListener("mouseUp",$bind(this,this.handleMouseClick));
	openfl_Lib.current.stage.addEventListener("keyDown",$bind(this,this.handleKeyEvent));
	openfl_Lib.current.stage.addEventListener("keyUp",$bind(this,this.handleKeyEvent));
	this._container.addEventListener("mouseOver",$bind(this,this.handleMouseInDebugger));
	this._container.addEventListener("mouseOut",$bind(this,this.handleMouseInDebugger));
};
$hxClasses["flixel.system.debug.interaction.Interaction"] = flixel_system_debug_interaction_Interaction;
flixel_system_debug_interaction_Interaction.__name__ = ["flixel","system","debug","interaction","Interaction"];
flixel_system_debug_interaction_Interaction.__super__ = flixel_system_debug_Window;
flixel_system_debug_interaction_Interaction.prototype = $extend(flixel_system_debug_Window.prototype,{
	handleDebuggerVisibilityChanged: function() {
		if(flixel_FlxG["debugger"].visible) {
			this.saveSystemCursorInfo();
		} else {
			this.restoreSystemCursor();
		}
	}
	,updateMouse: function(event) {
		if(event.stageX == null || event.stageY == null) {
			return;
		}
		var offsetX = 0.0;
		var offsetY = 0.0;
		if(this.activeTool != null) {
			var cursorIcon = this.activeTool.cursor;
			if(cursorIcon != null) {
				offsetX = cursorIcon.width / flixel_FlxG.scaleMode.scale.x / 2;
				offsetY = cursorIcon.height / flixel_FlxG.scaleMode.scale.y / 2;
			}
		}
		this._customCursor.set_x(event.stageX + offsetX);
		this._customCursor.set_y(event.stageY + offsetY);
		var _this = this._flixelPointer;
		_this._globalScreenX = event.stageX / flixel_FlxG.scaleMode.scale.x | 0;
		_this._globalScreenY = event.stageY / flixel_FlxG.scaleMode.scale.y | 0;
		_this.updatePositions();
		this.flixelPointer.set_x(this._flixelPointer.x + offsetX);
		this.flixelPointer.set_y(this._flixelPointer.y + offsetY);
	}
	,handleMouseClick: function(event) {
		if(js_Boot.__instanceof(event.target,flixel_system_ui_FlxSystemButton)) {
			return;
		}
		this.pointerJustPressed = event.type == "mouseDown";
		this.pointerJustReleased = event.type == "mouseUp";
		if(this.pointerJustPressed) {
			this.pointerPressed = true;
		} else if(this.pointerJustReleased) {
			this.pointerPressed = false;
		}
	}
	,handleMouseInDebugger: function(event) {
		if(!this.isActive()) {
			return;
		}
		if(event.type == "mouseOver") {
			this._debuggerInteraction = true;
		} else if(event.type == "mouseOut") {
			this._debuggerInteraction = false;
		}
		event.stopPropagation();
	}
	,handleKeyEvent: function(event) {
		if(event.type == "keyDown") {
			this._keysDown.h[event.keyCode] = this._turn;
		} else if(event.type == "keyUp") {
			this._keysUp.h[event.keyCode] = this._turn;
		}
	}
	,addTool: function(tool) {
		tool.init(this);
		this._tools.push(tool);
		var button = tool.button;
		if(button == null) {
			return;
		}
		button.set_x(-10 + this._tools.length * 20);
		button.set_y(20);
		this.addChild(button);
		this.resize(Math.max(this._tools.length * 20,55),35);
	}
	,destroy: function() {
		flixel_FlxG.signals.postDraw.remove($bind(this,this.postDraw));
		flixel_FlxG["debugger"].visibilityChanged.remove($bind(this,this.handleDebuggerVisibilityChanged));
		openfl_Lib.current.stage.removeEventListener("mouseMove",$bind(this,this.updateMouse));
		openfl_Lib.current.stage.removeEventListener("mouseDown",$bind(this,this.handleMouseClick));
		openfl_Lib.current.stage.removeEventListener("mouseUp",$bind(this,this.handleMouseClick));
		openfl_Lib.current.stage.removeEventListener("keyDown",$bind(this,this.handleKeyEvent));
		openfl_Lib.current.stage.removeEventListener("keyUp",$bind(this,this.handleKeyEvent));
		if(this._container != null) {
			this._container.removeEventListener("mouseOver",$bind(this,this.handleMouseInDebugger));
			this._container.removeEventListener("mouseOut",$bind(this,this.handleMouseInDebugger));
		}
		if(this._customCursor != null) {
			this._customCursor.parent.removeChild(this._customCursor);
			this._customCursor = null;
		}
		this._tools = flixel_util_FlxDestroyUtil.destroyArray(this._tools);
		this.selectedItems = flixel_util_FlxDestroyUtil.destroy(this.selectedItems);
		this.flixelPointer = flixel_util_FlxDestroyUtil.destroy(this.flixelPointer);
		this._keysDown = null;
		this._keysUp = null;
	}
	,isActive: function() {
		if(flixel_FlxG["debugger"].visible) {
			return this.get_visible();
		} else {
			return false;
		}
	}
	,update: function() {
		if(!this.isActive()) {
			return;
		}
		this.updateCustomCursors();
		var _g = 0;
		var _g1 = this._tools;
		while(_g < _g1.length) {
			var tool = _g1[_g];
			++_g;
			tool.update();
		}
		this.pointerJustPressed = false;
		this.pointerJustReleased = false;
		this._turn++;
	}
	,postDraw: function() {
		if(!this.isActive()) {
			return;
		}
		var _g = 0;
		var _g1 = this._tools;
		while(_g < _g1.length) ++_g;
		this.drawItemsSelection();
	}
	,getDebugGraphics: function() {
		if(flixel_FlxG.renderBlit) {
			flixel_util_FlxSpriteUtil.flashGfx.clear();
			return flixel_util_FlxSpriteUtil.flashGfx;
		}
		return null;
	}
	,drawItemsSelection: function() {
		var gfx = this.getDebugGraphics();
		if(gfx == null) {
			return;
		}
		var member = new flixel_group_FlxTypedGroupIterator(this.selectedItems.members,null);
		while(member.hasNext()) {
			var member1 = member.next();
			if(member1 != null && member1.scrollFactor != null && member1.isOnScreen()) {
				gfx.lineStyle(1.5,16711680);
				gfx.drawRect(member1.x - flixel_FlxG.camera.scroll.x,member1.y - flixel_FlxG.camera.scroll.y,member1.get_width(),member1.get_height());
			}
		}
		if(flixel_FlxG.renderBlit) {
			flixel_FlxG.camera.buffer.draw(flixel_util_FlxSpriteUtil.flashGfxSprite);
		}
	}
	,getTool: function(className) {
		var _g = 0;
		var _g1 = this._tools;
		while(_g < _g1.length) {
			var tool = _g1[_g];
			++_g;
			if(js_Boot.__instanceof(tool,className)) {
				return tool;
			}
		}
		return null;
	}
	,toggleVisible: function() {
		flixel_system_debug_Window.prototype.toggleVisible.call(this);
		if(!this.get_visible()) {
			this.setActiveTool(null);
			this.restoreSystemCursor();
		}
	}
	,registerCustomCursor: function(name,icon) {
		if(icon == null) {
			return;
		}
		var sprite = new openfl_display_Sprite();
		sprite.set_visible(false);
		sprite.set_name(name);
		sprite.addChild(new openfl_display_Bitmap(icon));
		this._customCursor.addChild(sprite);
	}
	,updateCustomCursors: function() {
		if(this.activeTool != null && !this._debuggerInteraction) {
			if(this.activeTool.cursor != null) {
				var _g1 = 0;
				var _g = this._customCursor.get_numChildren();
				while(_g1 < _g) {
					var sprite = this._customCursor.getChildAt(_g1++);
					sprite.set_visible(sprite.get_name() == this.activeTool.get_name());
				}
			} else {
				flixel_FlxG.mouse.set_useSystemCursor(true);
			}
		} else {
			flixel_FlxG.mouse.set_useSystemCursor(true);
		}
	}
	,saveSystemCursorInfo: function() {
		this._wasMouseVisible = flixel_FlxG.mouse.visible;
		this._wasUsingSystemCursor = flixel_FlxG.mouse.useSystemCursor;
	}
	,restoreSystemCursor: function() {
		flixel_FlxG.mouse.set_useSystemCursor(this._wasUsingSystemCursor);
		flixel_FlxG.mouse.set_visible(this._wasMouseVisible);
		this._customCursor.set_visible(false);
	}
	,setActiveTool: function(value) {
		if(this.activeTool != null) {
			this.activeTool.button.set_toggled(true);
		}
		if(this.activeTool == value) {
			value = null;
		}
		this.activeTool = value;
		if(this.activeTool != null) {
			this.setToolsCursorVisibility(true);
			this.activeTool.button.set_toggled(false);
			this.activeTool.activate();
			this.updateCustomCursors();
		} else {
			this.setSystemCursorVisibility(true);
		}
	}
	,setSystemCursorVisibility: function(status) {
		flixel_FlxG.mouse.set_useSystemCursor(status);
		this._customCursor.set_visible(!status);
	}
	,setToolsCursorVisibility: function(status) {
		flixel_FlxG.mouse.set_useSystemCursor(false);
		this._customCursor.set_visible(status);
		if(status) {
			return;
		}
		var _g1 = 0;
		var _g = this._customCursor.get_numChildren();
		while(_g1 < _g) this._customCursor.getChildAt(_g1++).set_visible(false);
	}
	,clearSelection: function() {
		this.selectedItems.clear();
	}
	,keyPressed: function(key) {
		return this._turn <= (this._keysDown.h[key] == null ? 0 : this._keysDown.h[key]);
	}
	,keyJustPressed: function(key) {
		return this._turn - (this._keysUp.h[key] == null ? 0 : this._keysUp.h[key]) == 1;
	}
	,__class__: flixel_system_debug_interaction_Interaction
});
var flixel_system_debug_interaction_tools_GraphicEraserTool = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_interaction_tools_GraphicEraserTool.preload != null) {
		this.__fromImage(flixel_system_debug_interaction_tools_GraphicEraserTool.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_interaction_tools_GraphicEraserTool.preload == null) {
				flixel_system_debug_interaction_tools_GraphicEraserTool.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_interaction_tools_GraphicEraserTool.resourceName),flixel_system_debug_interaction_tools_GraphicEraserTool.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.interaction.tools.GraphicEraserTool"] = flixel_system_debug_interaction_tools_GraphicEraserTool;
flixel_system_debug_interaction_tools_GraphicEraserTool.__name__ = ["flixel","system","debug","interaction","tools","GraphicEraserTool"];
flixel_system_debug_interaction_tools_GraphicEraserTool.preload = null;
flixel_system_debug_interaction_tools_GraphicEraserTool.__super__ = openfl_display_BitmapData;
flixel_system_debug_interaction_tools_GraphicEraserTool.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_interaction_tools_GraphicEraserTool
});
var flixel_system_debug_interaction_tools_Tool = function() {
	this._name = "(Unknown tool)";
	openfl_display_Sprite.call(this);
};
$hxClasses["flixel.system.debug.interaction.tools.Tool"] = flixel_system_debug_interaction_tools_Tool;
flixel_system_debug_interaction_tools_Tool.__name__ = ["flixel","system","debug","interaction","tools","Tool"];
flixel_system_debug_interaction_tools_Tool.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_system_debug_interaction_tools_Tool.__super__ = openfl_display_Sprite;
flixel_system_debug_interaction_tools_Tool.prototype = $extend(openfl_display_Sprite.prototype,{
	init: function(brain) {
		this._brain = brain;
		return this;
	}
	,update: function() {
	}
	,draw: function() {
	}
	,activate: function() {
	}
	,deactivate: function() {
	}
	,destroy: function() {
	}
	,isActive: function() {
		if(this._brain.activeTool == this) {
			return this._brain.get_visible();
		} else {
			return false;
		}
	}
	,setButton: function(Icon) {
		this.button = new flixel_system_ui_FlxSystemButton(Type.createInstance(Icon,[0,0]),$bind(this,this.onButtonClicked),true);
		this.button.set_toggled(true);
	}
	,setCursor: function(Icon) {
		this.cursor = Icon;
		this._brain.registerCustomCursor(this._name,this.cursor);
	}
	,onButtonClicked: function() {
		this._brain.setActiveTool(this);
	}
	,getName: function() {
		return this._name;
	}
	,__class__: flixel_system_debug_interaction_tools_Tool
});
var flixel_system_debug_interaction_tools_Eraser = function() {
	flixel_system_debug_interaction_tools_Tool.call(this);
};
$hxClasses["flixel.system.debug.interaction.tools.Eraser"] = flixel_system_debug_interaction_tools_Eraser;
flixel_system_debug_interaction_tools_Eraser.__name__ = ["flixel","system","debug","interaction","tools","Eraser"];
flixel_system_debug_interaction_tools_Eraser.__super__ = flixel_system_debug_interaction_tools_Tool;
flixel_system_debug_interaction_tools_Eraser.prototype = $extend(flixel_system_debug_interaction_tools_Tool.prototype,{
	init: function(Brain) {
		flixel_system_debug_interaction_tools_Tool.prototype.init.call(this,Brain);
		this._name = "Eraser";
		return this;
	}
	,update: function() {
		if(this._brain.keyJustPressed(46)) {
			this.doDeletion(this._brain.keyPressed(16));
		}
	}
	,activate: function() {
		this.doDeletion(this._brain.keyPressed(16));
		this._brain.setActiveTool(null);
	}
	,doDeletion: function(remove) {
		var selectedItems = this._brain.selectedItems;
		if(selectedItems != null) {
			this.findAndDelete(selectedItems,remove);
			selectedItems.clear();
		}
	}
	,findAndDelete: function(items,remove) {
		if(remove == null) {
			remove = false;
		}
		var member = new flixel_group_FlxTypedGroupIterator(items.members,null);
		while(member.hasNext()) {
			var member1 = member.next();
			if(member1 == null) {
				continue;
			}
			if(!js_Boot.__instanceof(member1,flixel_group_FlxTypedGroup)) {
				member1.kill();
				if(remove) {
					this.removeFromMemory(member1,flixel_FlxG.game._state);
				}
			}
		}
	}
	,removeFromMemory: function(item,parentGroup) {
		var _g = 0;
		var _g1 = parentGroup.members;
		while(_g < _g1.length) {
			var member = _g1[_g];
			++_g;
			if(member == null) {
				continue;
			}
			if(js_Boot.__instanceof(member,flixel_group_FlxTypedGroup)) {
				this.removeFromMemory(item,member);
			} else if(member == item) {
				parentGroup.remove(member);
			}
		}
	}
	,__class__: flixel_system_debug_interaction_tools_Eraser
});
var flixel_system_debug_interaction_tools_GraphicMoverTool = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_interaction_tools_GraphicMoverTool.preload != null) {
		this.__fromImage(flixel_system_debug_interaction_tools_GraphicMoverTool.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_interaction_tools_GraphicMoverTool.preload == null) {
				flixel_system_debug_interaction_tools_GraphicMoverTool.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_interaction_tools_GraphicMoverTool.resourceName),flixel_system_debug_interaction_tools_GraphicMoverTool.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.interaction.tools.GraphicMoverTool"] = flixel_system_debug_interaction_tools_GraphicMoverTool;
flixel_system_debug_interaction_tools_GraphicMoverTool.__name__ = ["flixel","system","debug","interaction","tools","GraphicMoverTool"];
flixel_system_debug_interaction_tools_GraphicMoverTool.preload = null;
flixel_system_debug_interaction_tools_GraphicMoverTool.__super__ = openfl_display_BitmapData;
flixel_system_debug_interaction_tools_GraphicMoverTool.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_interaction_tools_GraphicMoverTool
});
var flixel_system_debug_interaction_tools_Mover = function() {
	this._dragging = false;
	flixel_system_debug_interaction_tools_Tool.call(this);
};
$hxClasses["flixel.system.debug.interaction.tools.Mover"] = flixel_system_debug_interaction_tools_Mover;
flixel_system_debug_interaction_tools_Mover.__name__ = ["flixel","system","debug","interaction","tools","Mover"];
flixel_system_debug_interaction_tools_Mover.__super__ = flixel_system_debug_interaction_tools_Tool;
flixel_system_debug_interaction_tools_Mover.prototype = $extend(flixel_system_debug_interaction_tools_Tool.prototype,{
	init: function(brain) {
		flixel_system_debug_interaction_tools_Tool.prototype.init.call(this,brain);
		this._lastCursorPosition = new flixel_math_FlxPoint(brain.flixelPointer.x,brain.flixelPointer.x);
		this._name = "Mover";
		this.setButton(flixel_system_debug_interaction_tools_GraphicMoverTool);
		this.setCursor(new flixel_system_debug_interaction_tools_GraphicMoverTool(0,0));
		return this;
	}
	,update: function() {
		if(!this.isActive() && !this._brain.keyPressed(16)) {
			return;
		}
		if(this._brain.pointerPressed && !this._dragging) {
			this._dragging = true;
		} else if(this._brain.pointerPressed && this._dragging) {
			this.doDragging();
		} else if(this._brain.pointerJustReleased) {
			this._dragging = false;
		}
		this._lastCursorPosition.set_x(this._brain.flixelPointer.x);
		this._lastCursorPosition.set_y(this._brain.flixelPointer.y);
	}
	,doDragging: function() {
		var dx = this._brain.flixelPointer.x - this._lastCursorPosition.x;
		var dy = this._brain.flixelPointer.y - this._lastCursorPosition.y;
		var _g = 0;
		var _g1 = this._brain.selectedItems.members;
		while(_g < _g1.length) {
			var member = _g1[_g];
			++_g;
			if(!js_Boot.__instanceof(member,flixel_FlxObject)) {
				continue;
			}
			if(member != null) {
				member.set_x(member.x + dx);
				member.set_y(member.y + dy);
			}
		}
	}
	,__class__: flixel_system_debug_interaction_tools_Mover
});
var flixel_system_debug_interaction_tools_GraphicCursorCross = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_interaction_tools_GraphicCursorCross.preload != null) {
		this.__fromImage(flixel_system_debug_interaction_tools_GraphicCursorCross.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_interaction_tools_GraphicCursorCross.preload == null) {
				flixel_system_debug_interaction_tools_GraphicCursorCross.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_interaction_tools_GraphicCursorCross.resourceName),flixel_system_debug_interaction_tools_GraphicCursorCross.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.interaction.tools.GraphicCursorCross"] = flixel_system_debug_interaction_tools_GraphicCursorCross;
flixel_system_debug_interaction_tools_GraphicCursorCross.__name__ = ["flixel","system","debug","interaction","tools","GraphicCursorCross"];
flixel_system_debug_interaction_tools_GraphicCursorCross.preload = null;
flixel_system_debug_interaction_tools_GraphicCursorCross.__super__ = openfl_display_BitmapData;
flixel_system_debug_interaction_tools_GraphicCursorCross.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_interaction_tools_GraphicCursorCross
});
var flixel_system_debug_interaction_tools_Pointer = function() {
	flixel_system_debug_interaction_tools_Tool.call(this);
};
$hxClasses["flixel.system.debug.interaction.tools.Pointer"] = flixel_system_debug_interaction_tools_Pointer;
flixel_system_debug_interaction_tools_Pointer.__name__ = ["flixel","system","debug","interaction","tools","Pointer"];
flixel_system_debug_interaction_tools_Pointer.__super__ = flixel_system_debug_interaction_tools_Tool;
flixel_system_debug_interaction_tools_Pointer.prototype = $extend(flixel_system_debug_interaction_tools_Tool.prototype,{
	init: function(brain) {
		flixel_system_debug_interaction_tools_Tool.prototype.init.call(this,brain);
		this._name = "Pointer";
		this.setButton(flixel_system_debug_interaction_tools_GraphicCursorCross);
		this.setCursor(new flixel_system_debug_interaction_tools_GraphicCursorCross(0,0));
		return this;
	}
	,update: function() {
		if(!this.isActive()) {
			return;
		}
		if(!this._brain.pointerJustPressed && !this._brain.pointerJustReleased) {
			return;
		}
		var item = this.pinpointItemInGroup(flixel_FlxG.game._state.members,this._brain.flixelPointer);
		if(item != null) {
			this.handleItemClick(item);
		} else if(this._brain.pointerJustPressed) {
			this._brain.clearSelection();
		}
	}
	,handleItemClick: function(item) {
		var selectedItems = this._brain.selectedItems;
		if(selectedItems.length == 0 || this._brain.keyPressed(17)) {
			selectedItems.add(item);
		} else {
			if(selectedItems.members.indexOf(item) == -1) {
				this._brain.clearSelection();
			}
			selectedItems.add(item);
		}
	}
	,pinpointItemInGroup: function(members,cursor) {
		var target = null;
		var i = members.length;
		while(i-- > 0) {
			var member = members[i];
			if(member == null || !member.visible || !member.exists) {
				continue;
			}
			if(js_Boot.__instanceof(member,flixel_group_FlxTypedGroup)) {
				target = this.pinpointItemInGroup(member.members,cursor);
			} else if(js_Boot.__instanceof(member,flixel_FlxSprite) && (js_Boot.__cast(member , flixel_FlxSprite)).overlapsPoint(cursor,true)) {
				target = member;
			}
			if(target != null) {
				break;
			}
		}
		return target;
	}
	,__class__: flixel_system_debug_interaction_tools_Pointer
});
var flixel_system_debug_log_LogStyle = function(Prefix,Color,Size,Bold,Italic,Underlined,ErrorSound,OpenConsole,CallbackFunction) {
	if(OpenConsole == null) {
		OpenConsole = false;
	}
	if(Underlined == null) {
		Underlined = false;
	}
	if(Italic == null) {
		Italic = false;
	}
	if(Bold == null) {
		Bold = false;
	}
	if(Size == null) {
		Size = 12;
	}
	if(Color == null) {
		Color = "FFFFFF";
	}
	if(Prefix == null) {
		Prefix = "";
	}
	this.prefix = Prefix;
	this.color = Color;
	this.size = Size;
	this.bold = Bold;
	this.italic = Italic;
	this.underlined = Underlined;
	this.errorSound = ErrorSound;
	this.openConsole = OpenConsole;
	this.callbackFunction = CallbackFunction;
};
$hxClasses["flixel.system.debug.log.LogStyle"] = flixel_system_debug_log_LogStyle;
flixel_system_debug_log_LogStyle.__name__ = ["flixel","system","debug","log","LogStyle"];
flixel_system_debug_log_LogStyle.prototype = {
	__class__: flixel_system_debug_log_LogStyle
};
var flixel_system_debug_stats__$Stats_GraphicMinimizeButton = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload != null) {
		this.__fromImage(flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload == null) {
				flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_stats__$Stats_GraphicMinimizeButton.resourceName),flixel_system_debug_stats__$Stats_GraphicMinimizeButton.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.stats._Stats.GraphicMinimizeButton"] = flixel_system_debug_stats__$Stats_GraphicMinimizeButton;
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.__name__ = ["flixel","system","debug","stats","_Stats","GraphicMinimizeButton"];
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.preload = null;
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.__super__ = openfl_display_BitmapData;
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_stats__$Stats_GraphicMinimizeButton
});
var flixel_system_debug_stats__$Stats_GraphicMaximizeButton = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload != null) {
		this.__fromImage(flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload == null) {
				flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_system_debug_stats__$Stats_GraphicMaximizeButton.resourceName),flixel_system_debug_stats__$Stats_GraphicMaximizeButton.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.system.debug.stats._Stats.GraphicMaximizeButton"] = flixel_system_debug_stats__$Stats_GraphicMaximizeButton;
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.__name__ = ["flixel","system","debug","stats","_Stats","GraphicMaximizeButton"];
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.preload = null;
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.__super__ = openfl_display_BitmapData;
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_system_debug_stats__$Stats_GraphicMaximizeButton
});
var flixel_system_debug_watch_Watch = function(Title,Icon,Width,Height,Resizable,Bounds,Closable) {
	flixel_system_debug_Window.call(this,Title,Icon,Width,Height,Resizable,Bounds,Closable);
};
$hxClasses["flixel.system.debug.watch.Watch"] = flixel_system_debug_watch_Watch;
flixel_system_debug_watch_Watch.__name__ = ["flixel","system","debug","watch","Watch"];
flixel_system_debug_watch_Watch.__super__ = flixel_system_debug_Window;
flixel_system_debug_watch_Watch.prototype = $extend(flixel_system_debug_Window.prototype,{
	__class__: flixel_system_debug_watch_Watch
});
var flixel_system_debug_watch_Tracker = function(Title,Icon,Width,Height,Resizable,Bounds,Closable) {
	flixel_system_debug_watch_Watch.call(this,Title,Icon,Width,Height,Resizable,Bounds,Closable);
};
$hxClasses["flixel.system.debug.watch.Tracker"] = flixel_system_debug_watch_Tracker;
flixel_system_debug_watch_Tracker.__name__ = ["flixel","system","debug","watch","Tracker"];
flixel_system_debug_watch_Tracker.__super__ = flixel_system_debug_watch_Watch;
flixel_system_debug_watch_Tracker.prototype = $extend(flixel_system_debug_watch_Watch.prototype,{
	__class__: flixel_system_debug_watch_Tracker
});
var flixel_system_debug_watch_TrackerProfile = function(ObjectClass,Variables,Extensions) {
	this.objectClass = ObjectClass;
	this.variables = Variables;
	this.extensions = Extensions;
};
$hxClasses["flixel.system.debug.watch.TrackerProfile"] = flixel_system_debug_watch_TrackerProfile;
flixel_system_debug_watch_TrackerProfile.__name__ = ["flixel","system","debug","watch","TrackerProfile"];
flixel_system_debug_watch_TrackerProfile.prototype = {
	toString: function() {
		var value = this.variables;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "variables";
		_this.value = value;
		var value1 = this.extensions;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "extensions";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,__class__: flixel_system_debug_watch_TrackerProfile
};
var flixel_system_frontEnds_FlxBrowser = $hxClasses["flixel.system.frontEnds.FlxBrowser"] = { __ename__ : ["flixel","system","frontEnds","FlxBrowser"], __constructs__ : ["INTERNET_EXPLORER","CHROME","FIREFOX","SAFARI","OPERA","UNKNOWN"] };
flixel_system_frontEnds_FlxBrowser.INTERNET_EXPLORER = ["INTERNET_EXPLORER",0];
flixel_system_frontEnds_FlxBrowser.INTERNET_EXPLORER.toString = $estr;
flixel_system_frontEnds_FlxBrowser.INTERNET_EXPLORER.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.CHROME = ["CHROME",1];
flixel_system_frontEnds_FlxBrowser.CHROME.toString = $estr;
flixel_system_frontEnds_FlxBrowser.CHROME.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.FIREFOX = ["FIREFOX",2];
flixel_system_frontEnds_FlxBrowser.FIREFOX.toString = $estr;
flixel_system_frontEnds_FlxBrowser.FIREFOX.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.SAFARI = ["SAFARI",3];
flixel_system_frontEnds_FlxBrowser.SAFARI.toString = $estr;
flixel_system_frontEnds_FlxBrowser.SAFARI.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.OPERA = ["OPERA",4];
flixel_system_frontEnds_FlxBrowser.OPERA.toString = $estr;
flixel_system_frontEnds_FlxBrowser.OPERA.__enum__ = flixel_system_frontEnds_FlxBrowser;
flixel_system_frontEnds_FlxBrowser.UNKNOWN = ["UNKNOWN",5];
flixel_system_frontEnds_FlxBrowser.UNKNOWN.toString = $estr;
flixel_system_frontEnds_FlxBrowser.UNKNOWN.__enum__ = flixel_system_frontEnds_FlxBrowser;
var flixel_system_frontEnds_FlxPlatform = $hxClasses["flixel.system.frontEnds.FlxPlatform"] = { __ename__ : ["flixel","system","frontEnds","FlxPlatform"], __constructs__ : ["WINDOWS","LINUX","MAC","ANDROID","BLACKBERRY","WINDOWS_PHONE","IOS","UNKNOWN"] };
flixel_system_frontEnds_FlxPlatform.WINDOWS = ["WINDOWS",0];
flixel_system_frontEnds_FlxPlatform.WINDOWS.toString = $estr;
flixel_system_frontEnds_FlxPlatform.WINDOWS.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.LINUX = ["LINUX",1];
flixel_system_frontEnds_FlxPlatform.LINUX.toString = $estr;
flixel_system_frontEnds_FlxPlatform.LINUX.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.MAC = ["MAC",2];
flixel_system_frontEnds_FlxPlatform.MAC.toString = $estr;
flixel_system_frontEnds_FlxPlatform.MAC.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.ANDROID = ["ANDROID",3];
flixel_system_frontEnds_FlxPlatform.ANDROID.toString = $estr;
flixel_system_frontEnds_FlxPlatform.ANDROID.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.BLACKBERRY = ["BLACKBERRY",4];
flixel_system_frontEnds_FlxPlatform.BLACKBERRY.toString = $estr;
flixel_system_frontEnds_FlxPlatform.BLACKBERRY.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.WINDOWS_PHONE = ["WINDOWS_PHONE",5];
flixel_system_frontEnds_FlxPlatform.WINDOWS_PHONE.toString = $estr;
flixel_system_frontEnds_FlxPlatform.WINDOWS_PHONE.__enum__ = flixel_system_frontEnds_FlxPlatform;
flixel_system_frontEnds_FlxPlatform.IOS = function(device) { var $x = ["IOS",6,device]; $x.__enum__ = flixel_system_frontEnds_FlxPlatform; $x.toString = $estr; return $x; };
flixel_system_frontEnds_FlxPlatform.UNKNOWN = ["UNKNOWN",7];
flixel_system_frontEnds_FlxPlatform.UNKNOWN.toString = $estr;
flixel_system_frontEnds_FlxPlatform.UNKNOWN.__enum__ = flixel_system_frontEnds_FlxPlatform;
var flixel_system_frontEnds_FlxIOSDevice = $hxClasses["flixel.system.frontEnds.FlxIOSDevice"] = { __ename__ : ["flixel","system","frontEnds","FlxIOSDevice"], __constructs__ : ["IPHONE","IPAD","IPOD"] };
flixel_system_frontEnds_FlxIOSDevice.IPHONE = ["IPHONE",0];
flixel_system_frontEnds_FlxIOSDevice.IPHONE.toString = $estr;
flixel_system_frontEnds_FlxIOSDevice.IPHONE.__enum__ = flixel_system_frontEnds_FlxIOSDevice;
flixel_system_frontEnds_FlxIOSDevice.IPAD = ["IPAD",1];
flixel_system_frontEnds_FlxIOSDevice.IPAD.toString = $estr;
flixel_system_frontEnds_FlxIOSDevice.IPAD.__enum__ = flixel_system_frontEnds_FlxIOSDevice;
flixel_system_frontEnds_FlxIOSDevice.IPOD = ["IPOD",2];
flixel_system_frontEnds_FlxIOSDevice.IPOD.toString = $estr;
flixel_system_frontEnds_FlxIOSDevice.IPOD.__enum__ = flixel_system_frontEnds_FlxIOSDevice;
var flixel_system_frontEnds_PluginFrontEnd = function() {
	this.list = [];
	this.add_flixel_util_FlxTimerManager(flixel_util_FlxTimer.globalManager = new flixel_util_FlxTimerManager());
	this.add_flixel_tweens_FlxTweenManager(flixel_tweens_FlxTween.globalManager = new flixel_tweens_FlxTweenManager());
};
$hxClasses["flixel.system.frontEnds.PluginFrontEnd"] = flixel_system_frontEnds_PluginFrontEnd;
flixel_system_frontEnds_PluginFrontEnd.__name__ = ["flixel","system","frontEnds","PluginFrontEnd"];
flixel_system_frontEnds_PluginFrontEnd.prototype = {
	add_flixel_tweens_FlxTweenManager: function(Plugin) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Plugin,true) == flixel_util_FlxStringUtil.getClassName(plugin,true)) {
				return Plugin;
			}
		}
		this.list.push(Plugin);
		return Plugin;
	}
	,add_flixel_util_FlxTimerManager: function(Plugin) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(flixel_util_FlxStringUtil.getClassName(Plugin,true) == flixel_util_FlxStringUtil.getClassName(plugin,true)) {
				return Plugin;
			}
		}
		this.list.push(Plugin);
		return Plugin;
	}
	,get: function(ClassType) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(js_Boot.__instanceof(plugin,ClassType)) {
				return plugin;
			}
		}
		return null;
	}
	,remove: function(Plugin) {
		var i = this.list.length - 1;
		while(i >= 0) {
			if(this.list[i] == Plugin) {
				this.list.splice(i,1);
				return Plugin;
			}
			--i;
		}
		return Plugin;
	}
	,removeType: function(ClassType) {
		var results = false;
		var i = this.list.length - 1;
		while(i >= 0) {
			if(js_Boot.__instanceof(this.list[i],ClassType)) {
				this.list.splice(i,1);
				results = true;
			}
			--i;
		}
		return results;
	}
	,update: function(elapsed) {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(plugin.exists && plugin.active) {
				plugin.update(elapsed);
			}
		}
	}
	,draw: function() {
		var _g = 0;
		var _g1 = this.list;
		while(_g < _g1.length) {
			var plugin = _g1[_g];
			++_g;
			if(plugin.exists && plugin.visible) {
				plugin.draw();
			}
		}
	}
	,__class__: flixel_system_frontEnds_PluginFrontEnd
};
var flixel_system_frontEnds_SoundFrontEnd = function() {
	this.volume = 1;
	this.list = new flixel_group_FlxTypedGroup();
	this.defaultSoundGroup = new flixel_system_FlxSoundGroup();
	this.defaultMusicGroup = new flixel_system_FlxSoundGroup();
	this.soundTrayEnabled = true;
	this.muteKeys = [48,96];
	this.volumeDownKeys = [189,109];
	this.volumeUpKeys = [187,107];
	this.muted = false;
	this.loadSavedPrefs();
};
$hxClasses["flixel.system.frontEnds.SoundFrontEnd"] = flixel_system_frontEnds_SoundFrontEnd;
flixel_system_frontEnds_SoundFrontEnd.__name__ = ["flixel","system","frontEnds","SoundFrontEnd"];
flixel_system_frontEnds_SoundFrontEnd.prototype = {
	playMusic: function(Music,Volume,Looped,Group) {
		if(Looped == null) {
			Looped = true;
		}
		if(Volume == null) {
			Volume = 1;
		}
		if(this.music == null) {
			this.music = new flixel_system_FlxSound();
		} else if(this.music.active) {
			var _this = this.music;
			_this.cleanup(_this.autoDestroy,true);
		}
		this.music.loadEmbedded(Music,Looped);
		this.music.set_volume(Volume);
		this.music.persist = true;
		this.music.set_group(Group == null ? this.defaultMusicGroup : Group);
		this.music.play();
	}
	,load: function(EmbeddedSound,Volume,Looped,Group,AutoDestroy,AutoPlay,URL,OnComplete) {
		if(AutoPlay == null) {
			AutoPlay = false;
		}
		if(AutoDestroy == null) {
			AutoDestroy = false;
		}
		if(Looped == null) {
			Looped = false;
		}
		if(Volume == null) {
			Volume = 1;
		}
		if(EmbeddedSound == null && URL == null) {
			return null;
		}
		var sound = this.list.recycle(flixel_system_FlxSound);
		if(EmbeddedSound != null) {
			sound.loadEmbedded(EmbeddedSound,Looped,AutoDestroy,OnComplete);
		} else {
			sound.loadStream(URL,Looped,AutoDestroy,OnComplete);
		}
		sound.set_volume(Volume);
		if(AutoPlay) {
			sound.play();
		}
		sound.set_group(Group == null ? this.defaultSoundGroup : Group);
		return sound;
	}
	,cache: function(EmbeddedSound) {
		if(openfl_Assets.exists(EmbeddedSound,"SOUND") || openfl_Assets.exists(EmbeddedSound,"MUSIC")) {
			return openfl_Assets.getSound(EmbeddedSound,true);
		}
		return null;
	}
	,cacheAll: function() {
		var _g = 0;
		var _g1 = openfl_Assets.list("SOUND");
		while(_g < _g1.length) {
			var id = _g1[_g];
			++_g;
			if(openfl_Assets.exists(id,"SOUND") || openfl_Assets.exists(id,"MUSIC")) {
				openfl_Assets.getSound(id,true);
			}
		}
	}
	,play: function(EmbeddedSound,Volume,Looped,Group,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = true;
		}
		if(Looped == null) {
			Looped = false;
		}
		if(Volume == null) {
			Volume = 1;
		}
		if(typeof(EmbeddedSound) == "string") {
			if(openfl_Assets.exists(EmbeddedSound,"SOUND") || openfl_Assets.exists(EmbeddedSound,"MUSIC")) {
				EmbeddedSound = openfl_Assets.getSound(EmbeddedSound,true);
			} else {
				EmbeddedSound = null;
			}
		}
		var sound = this.list.recycle(flixel_system_FlxSound).loadEmbedded(EmbeddedSound,Looped,AutoDestroy,OnComplete);
		sound.set_volume(Volume);
		sound.set_group(Group == null ? this.defaultSoundGroup : Group);
		return sound.play();
	}
	,stream: function(URL,Volume,Looped,Group,AutoDestroy,OnComplete) {
		if(AutoDestroy == null) {
			AutoDestroy = true;
		}
		if(Looped == null) {
			Looped = false;
		}
		if(Volume == null) {
			Volume = 1;
		}
		return this.load(null,Volume,Looped,null,AutoDestroy,true,URL,OnComplete);
	}
	,pause: function() {
		if(this.music != null && this.music.exists && this.music.active) {
			this.music.pause();
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null && sound.exists && sound.active) {
				sound.pause();
			}
		}
	}
	,resume: function() {
		if(this.music != null && this.music.exists) {
			this.music.resume();
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null && sound.exists) {
				sound.resume();
			}
		}
	}
	,destroy: function(ForceDestroy) {
		if(ForceDestroy == null) {
			ForceDestroy = false;
		}
		if(this.music != null && (ForceDestroy || !this.music.persist)) {
			this.music.destroy();
			this.music = null;
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null && (ForceDestroy || !sound.persist)) {
				sound.destroy();
			}
		}
	}
	,toggleMuted: function() {
		this.muted = !this.muted;
		if(this.volumeHandler != null) {
			this.volumeHandler(this.muted ? 0 : this.volume);
		}
		this.showSoundTray();
	}
	,changeVolume: function(Amount) {
		this.muted = false;
		var _g = this;
		_g.set_volume(_g.volume + Amount);
		this.showSoundTray();
	}
	,showSoundTray: function() {
		if(flixel_FlxG.game.soundTray != null && this.soundTrayEnabled) {
			flixel_FlxG.game.soundTray.show();
		}
	}
	,update: function(elapsed) {
		if(this.music != null && this.music.active) {
			this.music.update(elapsed);
		}
		if(this.list != null && this.list.active) {
			this.list.update(elapsed);
		}
		if(flixel_FlxG.keys.checkKeyArrayState(this.muteKeys,-1)) {
			this.toggleMuted();
		} else if(flixel_FlxG.keys.checkKeyArrayState(this.volumeUpKeys,-1)) {
			this.changeVolume(0.1);
		} else if(flixel_FlxG.keys.checkKeyArrayState(this.volumeDownKeys,-1)) {
			this.changeVolume(-0.1);
		}
	}
	,onFocusLost: function() {
		if(this.music != null) {
			this.music.onFocusLost();
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null) {
				sound.onFocusLost();
			}
		}
	}
	,onFocus: function() {
		if(this.music != null) {
			this.music.onFocus();
		}
		var _g = 0;
		var _g1 = this.list.members;
		while(_g < _g1.length) {
			var sound = _g1[_g];
			++_g;
			if(sound != null) {
				sound.onFocus();
			}
		}
	}
	,loadSavedPrefs: function() {
		if(flixel_FlxG.save.data.volume != null) {
			this.set_volume(flixel_FlxG.save.data.volume);
		}
		if(flixel_FlxG.save.data.mute != null) {
			this.muted = flixel_FlxG.save.data.mute;
		}
	}
	,set_volume: function(Volume) {
		var lowerBound = Volume < 0 ? 0 : Volume;
		if(lowerBound > 1) {
			Volume = 1;
		} else {
			Volume = lowerBound;
		}
		if(this.volumeHandler != null) {
			this.volumeHandler(this.muted ? 0 : Volume);
		}
		return this.volume = Volume;
	}
	,__class__: flixel_system_frontEnds_SoundFrontEnd
	,__properties__: {set_volume:"set_volume"}
};
var flixel_system_frontEnds_VCRFrontEnd = function() {
	this.stepRequested = false;
	this.paused = false;
};
$hxClasses["flixel.system.frontEnds.VCRFrontEnd"] = flixel_system_frontEnds_VCRFrontEnd;
flixel_system_frontEnds_VCRFrontEnd.__name__ = ["flixel","system","frontEnds","VCRFrontEnd"];
flixel_system_frontEnds_VCRFrontEnd.prototype = {
	pause: function() {
		if(!this.paused) {
			if(!flixel_FlxG.mouse.useSystemCursor) {
				openfl_ui_Mouse.show();
			}
			this.paused = true;
		}
	}
	,resume: function() {
		if(this.paused) {
			if(!flixel_FlxG.mouse.useSystemCursor) {
				openfl_ui_Mouse.hide();
			}
			this.paused = false;
		}
	}
	,__class__: flixel_system_frontEnds_VCRFrontEnd
};
var flixel_system_macros_FlxMacroUtil = function() { };
$hxClasses["flixel.system.macros.FlxMacroUtil"] = flixel_system_macros_FlxMacroUtil;
flixel_system_macros_FlxMacroUtil.__name__ = ["flixel","system","macros","FlxMacroUtil"];
var flixel_system_replay_CodeValuePair = function(code,value) {
	this.code = code;
	this.value = value;
};
$hxClasses["flixel.system.replay.CodeValuePair"] = flixel_system_replay_CodeValuePair;
flixel_system_replay_CodeValuePair.__name__ = ["flixel","system","replay","CodeValuePair"];
flixel_system_replay_CodeValuePair.prototype = {
	__class__: flixel_system_replay_CodeValuePair
};
var flixel_system_replay_MouseRecord = function(x,y,button,wheel) {
	this.x = x;
	this.y = y;
	this.button = button;
	this.wheel = wheel;
};
$hxClasses["flixel.system.replay.MouseRecord"] = flixel_system_replay_MouseRecord;
flixel_system_replay_MouseRecord.__name__ = ["flixel","system","replay","MouseRecord"];
flixel_system_replay_MouseRecord.prototype = {
	__class__: flixel_system_replay_MouseRecord
};
var flixel_system_ui_FlxFocusLostScreen = function() {
	openfl_display_Sprite.call(this);
	this.draw();
	var logo = new openfl_display_Sprite();
	flixel_system_FlxAssets.drawLogo(logo.get_graphics());
	logo.set_scaleX(logo.set_scaleY(0.2));
	logo.set_x(logo.set_y(5));
	logo.set_alpha(0.35);
	this.addChild(logo);
	this.set_visible(false);
};
$hxClasses["flixel.system.ui.FlxFocusLostScreen"] = flixel_system_ui_FlxFocusLostScreen;
flixel_system_ui_FlxFocusLostScreen.__name__ = ["flixel","system","ui","FlxFocusLostScreen"];
flixel_system_ui_FlxFocusLostScreen.__super__ = openfl_display_Sprite;
flixel_system_ui_FlxFocusLostScreen.prototype = $extend(openfl_display_Sprite.prototype,{
	draw: function() {
		var gfx = this.get_graphics();
		var screenWidth = openfl_Lib.current.stage.stageWidth | 0;
		var screenHeight = openfl_Lib.current.stage.stageHeight | 0;
		gfx.clear();
		gfx.moveTo(0,0);
		gfx.beginFill(0,0.5);
		gfx.drawRect(0,0,screenWidth,screenHeight);
		gfx.endFill();
		var halfWidth = screenWidth / 2 | 0;
		var halfHeight = screenHeight / 2 | 0;
		var helper = Math.min(halfWidth,halfHeight) / 3 | 0;
		gfx.moveTo(halfWidth - helper,halfHeight - helper);
		gfx.beginFill(16777215,0.65);
		gfx.lineTo(halfWidth + helper,halfHeight);
		gfx.lineTo(halfWidth - helper,halfHeight + helper);
		gfx.lineTo(halfWidth - helper,halfHeight - helper);
		gfx.endFill();
		this.set_x(-flixel_FlxG.scaleMode.offset.x);
		this.set_y(-flixel_FlxG.scaleMode.offset.y);
	}
	,__class__: flixel_system_ui_FlxFocusLostScreen
});
var flixel_system_ui_FlxSoundTray = function() {
	this._defaultScale = 2.0;
	this._width = 80;
	openfl_display_Sprite.call(this);
	this.set_visible(false);
	this.set_scaleX(this._defaultScale);
	this.set_scaleY(this._defaultScale);
	var tmp = new openfl_display_Bitmap(new openfl_display_BitmapData(this._width,30,true,2130706432));
	this.screenCenter();
	this.addChild(tmp);
	var text = new openfl_text_TextField();
	text.set_width(tmp.get_width());
	text.set_height(tmp.get_height());
	text.set_multiline(true);
	text.set_wordWrap(true);
	text.set_selectable(false);
	var dtf = new openfl_text_TextFormat(flixel_system_FlxAssets.FONT_DEFAULT,10,16777215);
	dtf.align = 0;
	text.set_defaultTextFormat(dtf);
	this.addChild(text);
	text.set_text("VOLUME");
	text.set_y(16);
	var bx = 10;
	var by = 14;
	this._bars = [];
	var _g = 0;
	while(_g < 10) {
		tmp = new openfl_display_Bitmap(new openfl_display_BitmapData(4,_g++ + 1,false,-1));
		tmp.set_x(bx);
		tmp.set_y(by);
		this.addChild(tmp);
		this._bars.push(tmp);
		bx += 6;
		--by;
	}
	this.set_y(-this.get_height());
	this.set_visible(false);
};
$hxClasses["flixel.system.ui.FlxSoundTray"] = flixel_system_ui_FlxSoundTray;
flixel_system_ui_FlxSoundTray.__name__ = ["flixel","system","ui","FlxSoundTray"];
flixel_system_ui_FlxSoundTray.__super__ = openfl_display_Sprite;
flixel_system_ui_FlxSoundTray.prototype = $extend(openfl_display_Sprite.prototype,{
	update: function(MS) {
		if(this._timer > 0) {
			this._timer -= MS / 1000;
		} else if(this.get_y() > -this.get_height()) {
			var _g = this;
			_g.set_y(_g.get_y() - MS / 1000 * flixel_FlxG.height * 2);
			if(this.get_y() <= -this.get_height()) {
				this.set_visible(false);
				this.active = false;
				flixel_FlxG.save.data.mute = flixel_FlxG.sound.muted;
				flixel_FlxG.save.data.volume = flixel_FlxG.sound.volume;
				flixel_FlxG.save.flush();
			}
		}
	}
	,show: function(Silent) {
		if(Silent == null) {
			Silent = false;
		}
		if(!Silent) {
			var sound = openfl_Assets.getSound("flixel/sounds/beep" + ".ogg");
			if(sound != null) {
				flixel_FlxG.sound.load(sound).play();
			}
		}
		this._timer = 1;
		this.set_y(0);
		this.set_visible(true);
		this.active = true;
		var globalVolume = Math.round(flixel_FlxG.sound.volume * 10);
		if(flixel_FlxG.sound.muted) {
			globalVolume = 0;
		}
		var _g1 = 0;
		var _g = this._bars.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(i < globalVolume) {
				this._bars[i].set_alpha(1);
			} else {
				this._bars[i].set_alpha(0.5);
			}
		}
	}
	,screenCenter: function() {
		this.set_scaleX(this._defaultScale);
		this.set_scaleY(this._defaultScale);
		this.set_x(0.5 * (openfl_Lib.current.stage.stageWidth - this._width * this._defaultScale) - flixel_FlxG.game.get_x());
	}
	,__class__: flixel_system_ui_FlxSoundTray
});
var flixel_system_ui_FlxSystemButton = function(Icon,UpHandler,ToggleMode) {
	if(ToggleMode == null) {
		ToggleMode = false;
	}
	this._mouseDown = false;
	this.toggled = false;
	this.toggleMode = false;
	this.enabled = true;
	openfl_display_Sprite.call(this);
	if(Icon != null) {
		this.changeIcon(Icon);
	}
	this.upHandler = UpHandler;
	this.toggleMode = ToggleMode;
	this.addEventListener("mouseUp",$bind(this,this.onMouseUp));
	this.addEventListener("mouseDown",$bind(this,this.onMouseDown));
	this.addEventListener("mouseOut",$bind(this,this.onMouseOut));
	this.addEventListener("mouseOver",$bind(this,this.onMouseOver));
};
$hxClasses["flixel.system.ui.FlxSystemButton"] = flixel_system_ui_FlxSystemButton;
flixel_system_ui_FlxSystemButton.__name__ = ["flixel","system","ui","FlxSystemButton"];
flixel_system_ui_FlxSystemButton.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_system_ui_FlxSystemButton.__super__ = openfl_display_Sprite;
flixel_system_ui_FlxSystemButton.prototype = $extend(openfl_display_Sprite.prototype,{
	changeIcon: function(Icon) {
		if(this._icon != null) {
			this.removeChild(this._icon);
		}
		flixel_system_debug_DebuggerUtil.fixSize(Icon);
		this._icon = new openfl_display_Bitmap(Icon);
		this.addChild(this._icon);
	}
	,destroy: function() {
		this.removeEventListener("mouseUp",$bind(this,this.onMouseUp));
		this.removeEventListener("mouseDown",$bind(this,this.onMouseDown));
		this.removeEventListener("mouseOut",$bind(this,this.onMouseOut));
		this.removeEventListener("mouseOver",$bind(this,this.onMouseOver));
		this._icon = null;
		this.upHandler = null;
	}
	,onMouseUp: function(_) {
		if(this.enabled && this._mouseDown) {
			this.set_toggled(!this.toggled);
			this._mouseDown = false;
			if(this.upHandler != null) {
				this.upHandler();
			}
		}
	}
	,onMouseDown: function(_) {
		this._mouseDown = true;
	}
	,onMouseOver: function(_) {
		if(this.enabled) {
			var _g = this;
			_g.set_alpha(_g.get_alpha() - 0.2);
		}
	}
	,onMouseOut: function(_) {
		if(this.enabled) {
			var _g = this;
			_g.set_alpha(_g.get_alpha() + 0.2);
		}
	}
	,set_toggled: function(Value) {
		if(this.toggleMode) {
			this.set_alpha(Value ? 0.3 : 1);
		}
		return this.toggled = Value;
	}
	,__class__: flixel_system_ui_FlxSystemButton
	,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{set_toggled:"set_toggled"})
});
var flixel_text_FlxTextFormat = function(FontColor,Bold,Italic,BorderColor) {
	this.format = new openfl_text_TextFormat(null,null,FontColor,Bold,Italic);
	this.borderColor = BorderColor == null ? 0 : BorderColor;
};
$hxClasses["flixel.text.FlxTextFormat"] = flixel_text_FlxTextFormat;
flixel_text_FlxTextFormat.__name__ = ["flixel","text","FlxTextFormat"];
flixel_text_FlxTextFormat.prototype = {
	__class__: flixel_text_FlxTextFormat
};
var flixel_text__$FlxText_FlxTextFormatRange = function(format,start,end) {
	this.range = new flixel_util_helpers_FlxRange(start,end);
	this.format = format;
};
$hxClasses["flixel.text._FlxText.FlxTextFormatRange"] = flixel_text__$FlxText_FlxTextFormatRange;
flixel_text__$FlxText_FlxTextFormatRange.__name__ = ["flixel","text","_FlxText","FlxTextFormatRange"];
flixel_text__$FlxText_FlxTextFormatRange.prototype = {
	__class__: flixel_text__$FlxText_FlxTextFormatRange
};
var flixel_text_FlxTextFormatMarkerPair = function(format,marker) {
	this.format = format;
	this.marker = marker;
};
$hxClasses["flixel.text.FlxTextFormatMarkerPair"] = flixel_text_FlxTextFormatMarkerPair;
flixel_text_FlxTextFormatMarkerPair.__name__ = ["flixel","text","FlxTextFormatMarkerPair"];
flixel_text_FlxTextFormatMarkerPair.prototype = {
	__class__: flixel_text_FlxTextFormatMarkerPair
};
var flixel_text_FlxTextBorderStyle = $hxClasses["flixel.text.FlxTextBorderStyle"] = { __ename__ : ["flixel","text","FlxTextBorderStyle"], __constructs__ : ["NONE","SHADOW","OUTLINE","OUTLINE_FAST"] };
flixel_text_FlxTextBorderStyle.NONE = ["NONE",0];
flixel_text_FlxTextBorderStyle.NONE.toString = $estr;
flixel_text_FlxTextBorderStyle.NONE.__enum__ = flixel_text_FlxTextBorderStyle;
flixel_text_FlxTextBorderStyle.SHADOW = ["SHADOW",1];
flixel_text_FlxTextBorderStyle.SHADOW.toString = $estr;
flixel_text_FlxTextBorderStyle.SHADOW.__enum__ = flixel_text_FlxTextBorderStyle;
flixel_text_FlxTextBorderStyle.OUTLINE = ["OUTLINE",2];
flixel_text_FlxTextBorderStyle.OUTLINE.toString = $estr;
flixel_text_FlxTextBorderStyle.OUTLINE.__enum__ = flixel_text_FlxTextBorderStyle;
flixel_text_FlxTextBorderStyle.OUTLINE_FAST = ["OUTLINE_FAST",3];
flixel_text_FlxTextBorderStyle.OUTLINE_FAST.toString = $estr;
flixel_text_FlxTextBorderStyle.OUTLINE_FAST.__enum__ = flixel_text_FlxTextBorderStyle;
var flixel_text__$FlxText_FlxTextAlign_$Impl_$ = {};
$hxClasses["flixel.text._FlxText.FlxTextAlign_Impl_"] = flixel_text__$FlxText_FlxTextAlign_$Impl_$;
flixel_text__$FlxText_FlxTextAlign_$Impl_$.__name__ = ["flixel","text","_FlxText","FlxTextAlign_Impl_"];
flixel_text__$FlxText_FlxTextAlign_$Impl_$.fromOpenFL = function(align) {
	switch(align) {
	case 0:
		return "center";
	case 2:
		return "justify";
	case 3:
		return "left";
	case 4:
		return "right";
	default:
		return "left";
	}
};
flixel_text__$FlxText_FlxTextAlign_$Impl_$.toOpenFL = function(align) {
	switch(align) {
	case "center":
		return 0;
	case "justify":
		return 2;
	case "left":
		return 3;
	case "right":
		return 4;
	default:
		return 3;
	}
};
var flixel_tile_FlxTilemapAutoTiling = $hxClasses["flixel.tile.FlxTilemapAutoTiling"] = { __ename__ : ["flixel","tile","FlxTilemapAutoTiling"], __constructs__ : ["OFF","AUTO","ALT"] };
flixel_tile_FlxTilemapAutoTiling.OFF = ["OFF",0];
flixel_tile_FlxTilemapAutoTiling.OFF.toString = $estr;
flixel_tile_FlxTilemapAutoTiling.OFF.__enum__ = flixel_tile_FlxTilemapAutoTiling;
flixel_tile_FlxTilemapAutoTiling.AUTO = ["AUTO",1];
flixel_tile_FlxTilemapAutoTiling.AUTO.toString = $estr;
flixel_tile_FlxTilemapAutoTiling.AUTO.__enum__ = flixel_tile_FlxTilemapAutoTiling;
flixel_tile_FlxTilemapAutoTiling.ALT = ["ALT",2];
flixel_tile_FlxTilemapAutoTiling.ALT.toString = $estr;
flixel_tile_FlxTilemapAutoTiling.ALT.__enum__ = flixel_tile_FlxTilemapAutoTiling;
var flixel_tile_FlxTile = function(Tilemap,Index,Width,Height,Visible,AllowCollisions) {
	this.mapIndex = 0;
	this.callbackFunction = null;
	flixel_FlxObject.call(this,0,0,Width,Height);
	this.set_immovable(true);
	this.set_moves(false);
	this.tilemap = Tilemap;
	this.index = Index;
	this.set_visible(Visible);
	this.set_allowCollisions(AllowCollisions);
};
$hxClasses["flixel.tile.FlxTile"] = flixel_tile_FlxTile;
flixel_tile_FlxTile.__name__ = ["flixel","tile","FlxTile"];
flixel_tile_FlxTile.__super__ = flixel_FlxObject;
flixel_tile_FlxTile.prototype = $extend(flixel_FlxObject.prototype,{
	destroy: function() {
		this.callbackFunction = null;
		this.tilemap = null;
		this.frame = null;
		flixel_FlxObject.prototype.destroy.call(this);
	}
	,__class__: flixel_tile_FlxTile
});
var flixel_tile_FlxTileblock = function(X,Y,Width,Height) {
	flixel_FlxSprite.call(this,X,Y);
	this.makeGraphic(Width,Height,0,true);
	this.set_active(false);
	this.set_immovable(true);
	this.set_moves(false);
};
$hxClasses["flixel.tile.FlxTileblock"] = flixel_tile_FlxTileblock;
flixel_tile_FlxTileblock.__name__ = ["flixel","tile","FlxTileblock"];
flixel_tile_FlxTileblock.__super__ = flixel_FlxSprite;
flixel_tile_FlxTileblock.prototype = $extend(flixel_FlxSprite.prototype,{
	destroy: function() {
		this.tileSprite = flixel_util_FlxDestroyUtil.destroy(this.tileSprite);
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,loadFrames: function(tileFrames,empties) {
		if(empties == null) {
			empties = 0;
		}
		if(tileFrames == null) {
			return this;
		}
		this.tileSprite = this.tileSprite == null ? new flixel_FlxSprite() : this.tileSprite;
		this.tileSprite.set_frames(tileFrames);
		var spriteWidth = this.tileSprite.get_width() | 0;
		var spriteHeight = this.tileSprite.get_height() | 0;
		var total = this.tileSprite.numFrames + empties;
		var regen = false;
		if(this.get_width() % this.tileSprite.get_width() != 0) {
			this.set_width((this.get_width() / spriteWidth + 1 | 0) * spriteWidth);
			regen = true;
		}
		if(this.get_height() % this.tileSprite.get_height() != 0) {
			this.set_height((this.get_height() / spriteHeight + 1 | 0) * spriteHeight);
			regen = true;
		}
		if(regen) {
			this.makeGraphic(this.get_width() | 0,this.get_height() | 0,0,true);
		} else {
			flixel_util_FlxSpriteUtil.fill(this,0);
		}
		var row = 0;
		var column;
		var destinationX;
		var destinationY = 0;
		var widthInTiles = this.get_width() / spriteWidth | 0;
		var heightInTiles = this.get_height() / spriteHeight | 0;
		while(row < heightInTiles) {
			destinationX = 0;
			column = 0;
			while(column < widthInTiles) {
				if(flixel_FlxG.random["float"]() * total > empties) {
					this.tileSprite.animation.randomFrame();
					this.tileSprite.drawFrame();
					this.stamp(this.tileSprite,destinationX,destinationY);
				}
				destinationX += spriteWidth;
				++column;
			}
			destinationY += spriteHeight;
			++row;
		}
		this.dirty = true;
		return this;
	}
	,loadTiles: function(TileGraphic,TileWidth,TileHeight,Empties) {
		if(Empties == null) {
			Empties = 0;
		}
		if(TileHeight == null) {
			TileHeight = 0;
		}
		if(TileWidth == null) {
			TileWidth = 0;
		}
		if(TileGraphic == null) {
			return this;
		}
		var graph = flixel_FlxG.bitmap.add(TileGraphic);
		if(graph == null) {
			return this;
		}
		if(TileWidth == 0) {
			TileWidth = graph.height;
			if(TileWidth > graph.width) {
				TileWidth = graph.width;
			} else {
				TileWidth = TileWidth;
			}
		}
		if(TileHeight == 0) {
			TileHeight = TileWidth;
			if(TileHeight > graph.height) {
				TileHeight = graph.height;
			} else {
				TileHeight = TileHeight;
			}
		}
		var point = flixel_math_FlxPoint._pool.get().set(TileWidth,TileHeight);
		point._inPool = false;
		return this.loadFrames(flixel_graphics_frames_FlxTileFrames.fromGraphic(graph,point),Empties);
	}
	,setTile: function(x,y,index) {
		this.tileSprite.animation.set_frameIndex(index);
		this.stamp(this.tileSprite,x * (this.tileSprite.get_width() | 0),y * (this.tileSprite.get_height() | 0));
		this.dirty = true;
	}
	,__class__: flixel_tile_FlxTileblock
});
var flixel_tile_GraphicAuto = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_tile_GraphicAuto.preload != null) {
		this.__fromImage(flixel_tile_GraphicAuto.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_tile_GraphicAuto.preload == null) {
				flixel_tile_GraphicAuto.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_tile_GraphicAuto.resourceName),flixel_tile_GraphicAuto.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.tile.GraphicAuto"] = flixel_tile_GraphicAuto;
flixel_tile_GraphicAuto.__name__ = ["flixel","tile","GraphicAuto"];
flixel_tile_GraphicAuto.preload = null;
flixel_tile_GraphicAuto.__super__ = openfl_display_BitmapData;
flixel_tile_GraphicAuto.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_tile_GraphicAuto
});
var flixel_tile_GraphicAutoAlt = function(width,height,transparent,fillRGBA,onload) {
	if(fillRGBA == null) {
		fillRGBA = -1;
	}
	if(transparent == null) {
		transparent = true;
	}
	openfl_display_BitmapData.call(this,0,0,transparent,fillRGBA);
	if(flixel_tile_GraphicAutoAlt.preload != null) {
		this.__fromImage(flixel_tile_GraphicAutoAlt.preload);
	} else {
		var onload1 = function(b) {
			if(flixel_tile_GraphicAutoAlt.preload == null) {
				flixel_tile_GraphicAutoAlt.preload = b.image;
			}
			if(onload != null) {
				onload(b);
			}
		};
		var _gthis = this;
		lime_graphics_Image.fromBase64(haxe_Resource.getString(flixel_tile_GraphicAutoAlt.resourceName),flixel_tile_GraphicAutoAlt.resourceType,function(image) {
			_gthis.__fromImage(image);
			if(onload1 != null) {
				onload1(_gthis);
			}
		});
	}
};
$hxClasses["flixel.tile.GraphicAutoAlt"] = flixel_tile_GraphicAutoAlt;
flixel_tile_GraphicAutoAlt.__name__ = ["flixel","tile","GraphicAutoAlt"];
flixel_tile_GraphicAutoAlt.preload = null;
flixel_tile_GraphicAutoAlt.__super__ = openfl_display_BitmapData;
flixel_tile_GraphicAutoAlt.prototype = $extend(openfl_display_BitmapData.prototype,{
	__class__: flixel_tile_GraphicAutoAlt
});
var flixel_tweens_FlxEase = function() { };
$hxClasses["flixel.tweens.FlxEase"] = flixel_tweens_FlxEase;
flixel_tweens_FlxEase.__name__ = ["flixel","tweens","FlxEase"];
flixel_tweens_FlxEase.quadIn = function(t) {
	return t * t;
};
flixel_tweens_FlxEase.quadOut = function(t) {
	return -t * (t - 2);
};
flixel_tweens_FlxEase.quadInOut = function(t) {
	if(t <= .5) {
		return t * t * 2;
	} else {
		return 1 - --t * t * 2;
	}
};
flixel_tweens_FlxEase.cubeIn = function(t) {
	return t * t * t;
};
flixel_tweens_FlxEase.cubeOut = function(t) {
	return 1 + --t * t * t;
};
flixel_tweens_FlxEase.cubeInOut = function(t) {
	if(t <= .5) {
		return t * t * t * 4;
	} else {
		return 1 + --t * t * t * 4;
	}
};
flixel_tweens_FlxEase.quartIn = function(t) {
	return t * t * t * t;
};
flixel_tweens_FlxEase.quartOut = function(t) {
	return 1 - --t * t * t * t;
};
flixel_tweens_FlxEase.quartInOut = function(t) {
	if(t <= .5) {
		return t * t * t * t * 8;
	} else {
		t = t * 2 - 2;
		return (1 - t * t * t * t) / 2 + .5;
	}
};
flixel_tweens_FlxEase.quintIn = function(t) {
	return t * t * t * t * t;
};
flixel_tweens_FlxEase.quintOut = function(t) {
	return --t * t * t * t * t + 1;
};
flixel_tweens_FlxEase.quintInOut = function(t) {
	if((t *= 2) < 1) {
		return t * t * t * t * t / 2;
	} else {
		return ((t -= 2) * t * t * t * t + 2) / 2;
	}
};
flixel_tweens_FlxEase.sineIn = function(t) {
	return -Math.cos(flixel_tweens_FlxEase.PI2 * t) + 1;
};
flixel_tweens_FlxEase.sineOut = function(t) {
	return Math.sin(flixel_tweens_FlxEase.PI2 * t);
};
flixel_tweens_FlxEase.sineInOut = function(t) {
	return -Math.cos(Math.PI * t) / 2 + .5;
};
flixel_tweens_FlxEase.bounceIn = function(t) {
	t = 1 - t;
	if(t < flixel_tweens_FlxEase.B1) {
		return 1 - 7.5625 * t * t;
	}
	if(t < flixel_tweens_FlxEase.B2) {
		return 1 - (7.5625 * (t - flixel_tweens_FlxEase.B3) * (t - flixel_tweens_FlxEase.B3) + .75);
	}
	if(t < flixel_tweens_FlxEase.B4) {
		return 1 - (7.5625 * (t - flixel_tweens_FlxEase.B5) * (t - flixel_tweens_FlxEase.B5) + .9375);
	}
	return 1 - (7.5625 * (t - flixel_tweens_FlxEase.B6) * (t - flixel_tweens_FlxEase.B6) + .984375);
};
flixel_tweens_FlxEase.bounceOut = function(t) {
	if(t < flixel_tweens_FlxEase.B1) {
		return 7.5625 * t * t;
	}
	if(t < flixel_tweens_FlxEase.B2) {
		return 7.5625 * (t - flixel_tweens_FlxEase.B3) * (t - flixel_tweens_FlxEase.B3) + .75;
	}
	if(t < flixel_tweens_FlxEase.B4) {
		return 7.5625 * (t - flixel_tweens_FlxEase.B5) * (t - flixel_tweens_FlxEase.B5) + .9375;
	}
	return 7.5625 * (t - flixel_tweens_FlxEase.B6) * (t - flixel_tweens_FlxEase.B6) + .984375;
};
flixel_tweens_FlxEase.bounceInOut = function(t) {
	if(t < .5) {
		t = 1 - t * 2;
		if(t < flixel_tweens_FlxEase.B1) {
			return (1 - 7.5625 * t * t) / 2;
		}
		if(t < flixel_tweens_FlxEase.B2) {
			return (1 - (7.5625 * (t - flixel_tweens_FlxEase.B3) * (t - flixel_tweens_FlxEase.B3) + .75)) / 2;
		}
		if(t < flixel_tweens_FlxEase.B4) {
			return (1 - (7.5625 * (t - flixel_tweens_FlxEase.B5) * (t - flixel_tweens_FlxEase.B5) + .9375)) / 2;
		}
		return (1 - (7.5625 * (t - flixel_tweens_FlxEase.B6) * (t - flixel_tweens_FlxEase.B6) + .984375)) / 2;
	}
	t = t * 2 - 1;
	if(t < flixel_tweens_FlxEase.B1) {
		return 7.5625 * t * t / 2 + .5;
	}
	if(t < flixel_tweens_FlxEase.B2) {
		return (7.5625 * (t - flixel_tweens_FlxEase.B3) * (t - flixel_tweens_FlxEase.B3) + .75) / 2 + .5;
	}
	if(t < flixel_tweens_FlxEase.B4) {
		return (7.5625 * (t - flixel_tweens_FlxEase.B5) * (t - flixel_tweens_FlxEase.B5) + .9375) / 2 + .5;
	}
	return (7.5625 * (t - flixel_tweens_FlxEase.B6) * (t - flixel_tweens_FlxEase.B6) + .984375) / 2 + .5;
};
flixel_tweens_FlxEase.circIn = function(t) {
	return -(Math.sqrt(1 - t * t) - 1);
};
flixel_tweens_FlxEase.circOut = function(t) {
	return Math.sqrt(1 - (t - 1) * (t - 1));
};
flixel_tweens_FlxEase.circInOut = function(t) {
	if(t <= .5) {
		return (Math.sqrt(1 - t * t * 4) - 1) / -2;
	} else {
		return (Math.sqrt(1 - (t * 2 - 2) * (t * 2 - 2)) + 1) / 2;
	}
};
flixel_tweens_FlxEase.expoIn = function(t) {
	return Math.pow(2,10 * (t - 1));
};
flixel_tweens_FlxEase.expoOut = function(t) {
	return -Math.pow(2,-10 * t) + 1;
};
flixel_tweens_FlxEase.expoInOut = function(t) {
	if(t < .5) {
		return Math.pow(2,10 * (t * 2 - 1)) / 2;
	} else {
		return (-Math.pow(2,-10 * (t * 2 - 1)) + 2) / 2;
	}
};
flixel_tweens_FlxEase.backIn = function(t) {
	return t * t * (2.70158 * t - 1.70158);
};
flixel_tweens_FlxEase.backOut = function(t) {
	return 1 - --t * t * (-2.70158 * t - 1.70158);
};
flixel_tweens_FlxEase.backInOut = function(t) {
	t *= 2;
	if(t < 1) {
		return t * t * (2.70158 * t - 1.70158) / 2;
	}
	--t;
	return (1 - --t * t * (-2.70158 * t - 1.70158)) / 2 + .5;
};
flixel_tweens_FlxEase.elasticIn = function(t) {
	return -(flixel_tweens_FlxEase.ELASTIC_AMPLITUDE * Math.pow(2,10 * --t) * Math.sin((t - flixel_tweens_FlxEase.ELASTIC_PERIOD / (2 * Math.PI) * Math.asin(1 / flixel_tweens_FlxEase.ELASTIC_AMPLITUDE)) * (2 * Math.PI) / flixel_tweens_FlxEase.ELASTIC_PERIOD));
};
flixel_tweens_FlxEase.elasticOut = function(t) {
	return flixel_tweens_FlxEase.ELASTIC_AMPLITUDE * Math.pow(2,-10 * t) * Math.sin((t - flixel_tweens_FlxEase.ELASTIC_PERIOD / (2 * Math.PI) * Math.asin(1 / flixel_tweens_FlxEase.ELASTIC_AMPLITUDE)) * (2 * Math.PI) / flixel_tweens_FlxEase.ELASTIC_PERIOD) + 1;
};
flixel_tweens_FlxEase.elasticInOut = function(t) {
	if(t < 0.5) {
		return -0.5 * (Math.pow(2,10 * (t -= 0.5)) * Math.sin((t - flixel_tweens_FlxEase.ELASTIC_PERIOD / 4) * (2 * Math.PI) / flixel_tweens_FlxEase.ELASTIC_PERIOD));
	}
	return Math.pow(2,-10 * (t -= 0.5)) * Math.sin((t - flixel_tweens_FlxEase.ELASTIC_PERIOD / 4) * (2 * Math.PI) / flixel_tweens_FlxEase.ELASTIC_PERIOD) * 0.5 + 1;
};
var flixel_tweens_FlxTween = function(Options,manager) {
	this._waitingForRestart = false;
	this._running = false;
	this._delayToUse = 0;
	this._secondsSinceStart = 0;
	this.loopDelay = 0;
	this.startDelay = 0;
	this.executions = 0;
	this.scale = 0;
	this.duration = 0;
	this.active = false;
	Options = this.resolveTweenOptions(Options);
	this.set_type(Options.type);
	this.onStart = Options.onStart;
	this.onUpdate = Options.onUpdate;
	this.onComplete = Options.onComplete;
	this.ease = Options.ease;
	this.setDelays(Options.startDelay,Options.loopDelay);
	this.manager = manager != null ? manager : flixel_tweens_FlxTween.globalManager;
};
$hxClasses["flixel.tweens.FlxTween"] = flixel_tweens_FlxTween;
flixel_tweens_FlxTween.__name__ = ["flixel","tweens","FlxTween"];
flixel_tweens_FlxTween.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_tweens_FlxTween.globalManager = null;
flixel_tweens_FlxTween.tween = function(Object,Values,Duration,Options) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.tween(Object,Values,Duration,Options);
};
flixel_tweens_FlxTween.num = function(FromValue,ToValue,Duration,Options,TweenFunction) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.num(FromValue,ToValue,Duration,Options,TweenFunction);
};
flixel_tweens_FlxTween.angle = function(Sprite,FromAngle,ToAngle,Duration,Options) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.angle(Sprite,FromAngle,ToAngle,Duration,Options);
};
flixel_tweens_FlxTween.color = function(Sprite,Duration,FromColor,ToColor,Options) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.color(Sprite,Duration,FromColor,ToColor,Options);
};
flixel_tweens_FlxTween.linearMotion = function(Object,FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.linearMotion(Object,FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.quadMotion = function(Object,FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.quadMotion(Object,FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.cubicMotion = function(Object,FromX,FromY,aX,aY,bX,bY,ToX,ToY,Duration,Options) {
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_tweens_FlxTween.globalManager.cubicMotion(Object,FromX,FromY,aX,aY,bX,bY,ToX,ToY,Duration,Options);
};
flixel_tweens_FlxTween.circularMotion = function(Object,CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.circularMotion(Object,CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.linearPath = function(Object,Points,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.linearPath(Object,Points,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.quadPath = function(Object,Points,DurationOrSpeed,UseDuration,Options) {
	if(UseDuration == null) {
		UseDuration = true;
	}
	if(DurationOrSpeed == null) {
		DurationOrSpeed = 1;
	}
	return flixel_tweens_FlxTween.globalManager.quadPath(Object,Points,DurationOrSpeed,UseDuration,Options);
};
flixel_tweens_FlxTween.prototype = {
	resolveTweenOptions: function(Options) {
		if(Options == null) {
			Options = { type : 8};
		}
		if(Options.type == null) {
			Options.type = 8;
		}
		return Options;
	}
	,destroy: function() {
		this.onStart = null;
		this.onUpdate = null;
		this.onComplete = null;
		this.ease = null;
		this.manager = null;
		this._chainedTweens = null;
	}
	,then: function(tween) {
		return this.addChainedTween(tween);
	}
	,wait: function(delay) {
		return this.addChainedTween(flixel_tweens_FlxTween.num(0,0,delay));
	}
	,addChainedTween: function(tween) {
		tween.setVarsOnEnd();
		tween.manager.remove(tween,false);
		if(this._chainedTweens == null) {
			this._chainedTweens = [];
		}
		this._chainedTweens.push(tween);
		return this;
	}
	,update: function(elapsed) {
		this._secondsSinceStart += elapsed;
		var delay = this.executions > 0 ? this.loopDelay : this.startDelay;
		if(this._secondsSinceStart < delay) {
			return;
		}
		this.scale = Math.max(this._secondsSinceStart - delay,0) / this.duration;
		if(this.ease != null) {
			this.scale = this.ease(this.scale);
		}
		if(this.backward) {
			this.scale = 1 - this.scale;
		}
		if(this._secondsSinceStart > delay && !this._running) {
			this._running = true;
			if(this.onStart != null) {
				this.onStart(this);
			}
		}
		if(this._secondsSinceStart >= this.duration + delay) {
			this.scale = this.backward ? 0 : 1;
			this.finished = true;
		} else if(this.onUpdate != null) {
			this.onUpdate(this);
		}
	}
	,start: function() {
		this._waitingForRestart = false;
		this._secondsSinceStart = 0;
		this._delayToUse = this.executions > 0 ? this.loopDelay : this.startDelay;
		if(this.duration == 0) {
			this.set_active(false);
			return this;
		}
		this.set_active(true);
		this._running = false;
		this.finished = false;
		return this;
	}
	,cancel: function() {
		this.onEnd();
		if(this.manager != null) {
			this.manager.remove(this);
		}
	}
	,finish: function() {
		this.executions++;
		if(this.onComplete != null) {
			this.onComplete(this);
		}
		var type = this.type & -17;
		if(type == 1 || type == 8) {
			this.onEnd();
			this._secondsSinceStart = this.duration + this.startDelay;
			if(type == 8 && this.manager != null) {
				this.manager.remove(this);
			}
		}
		if(type == 2 || type == 4) {
			this._secondsSinceStart = (this._secondsSinceStart - this._delayToUse) % this.duration + this._delayToUse;
			this.scale = Math.max(this._secondsSinceStart - this._delayToUse,0) / this.duration;
			if(this.ease != null && this.scale > 0 && this.scale < 1) {
				this.scale = this.ease(this.scale);
			}
			if(type == 4) {
				this.backward = !this.backward;
				if(this.backward) {
					this.scale = 1 - this.scale;
				}
			}
			this.restart();
		}
	}
	,onEnd: function() {
		this.setVarsOnEnd();
		this.processTweenChain();
	}
	,setVarsOnEnd: function() {
		this.set_active(false);
		this._running = false;
		this.finished = true;
	}
	,processTweenChain: function() {
		if(this._chainedTweens == null || this._chainedTweens.length <= 0) {
			return;
		}
		this.doNextTween(this._chainedTweens.shift());
		this._chainedTweens = null;
	}
	,doNextTween: function(tween) {
		if(!tween.active) {
			tween.start();
			this.manager.add_flixel_tweens_FlxTween(tween);
		}
		tween.setChain(this._chainedTweens);
	}
	,setChain: function(previousChain) {
		if(previousChain == null) {
			return;
		}
		if(this._chainedTweens == null) {
			this._chainedTweens = previousChain;
		} else {
			this._chainedTweens = this._chainedTweens.concat(previousChain);
		}
	}
	,restart: function() {
		if(this.active) {
			this.start();
		} else {
			this._waitingForRestart = true;
		}
	}
	,setDelays: function(StartDelay,LoopDelay) {
		this.set_startDelay(StartDelay != null ? StartDelay : 0);
		this.set_loopDelay(LoopDelay != null ? LoopDelay : 0);
		return this;
	}
	,set_startDelay: function(value) {
		var dly = Math.abs(value);
		if(this.executions == 0) {
			this._secondsSinceStart = this.duration * (Math.max(this._secondsSinceStart - this._delayToUse,0) / this.duration) + Math.max(dly - this.startDelay,0);
			this._delayToUse = dly;
		}
		return this.startDelay = dly;
	}
	,set_loopDelay: function(value) {
		var dly = Math.abs(value);
		if(this.executions > 0) {
			this._secondsSinceStart = this.duration * (Math.max(this._secondsSinceStart - this._delayToUse,0) / this.duration) + Math.max(dly - this.loopDelay,0);
			this._delayToUse = dly;
		}
		return this.loopDelay = dly;
	}
	,get_percent: function() {
		return Math.max(this._secondsSinceStart - this._delayToUse,0) / this.duration;
	}
	,set_percent: function(value) {
		return this._secondsSinceStart = this.duration * value + this._delayToUse;
	}
	,set_type: function(value) {
		if(value == 0) {
			value = 8;
		} else if(value == 16) {
			value = 17;
		}
		this.backward = (value & 16) > 0;
		return this.type = value;
	}
	,set_active: function(active) {
		this.active = active;
		if(this._waitingForRestart) {
			this.restart();
		}
		return active;
	}
	,__class__: flixel_tweens_FlxTween
	,__properties__: {set_loopDelay:"set_loopDelay",set_startDelay:"set_startDelay",set_percent:"set_percent",get_percent:"get_percent",set_type:"set_type",set_active:"set_active"}
};
var flixel_tweens_FlxTweenManager = function() {
	this._tweens = [];
	flixel_FlxBasic.call(this);
	this.set_visible(false);
	flixel_FlxG.signals.stateSwitched.add($bind(this,this.clear));
};
$hxClasses["flixel.tweens.FlxTweenManager"] = flixel_tweens_FlxTweenManager;
flixel_tweens_FlxTweenManager.__name__ = ["flixel","tweens","FlxTweenManager"];
flixel_tweens_FlxTweenManager.__super__ = flixel_FlxBasic;
flixel_tweens_FlxTweenManager.prototype = $extend(flixel_FlxBasic.prototype,{
	add_flixel_tweens_motion_QuadPath: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_LinearPath: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_CircularMotion: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_CubicMotion: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_QuadMotion: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_motion_LinearMotion: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_misc_ColorTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_misc_AngleTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_misc_NumTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_misc_VarTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,add_flixel_tweens_FlxTween: function(Tween,Start) {
		if(Start == null) {
			Start = false;
		}
		if(Tween == null) {
			return null;
		}
		this._tweens.push(Tween);
		if(Start) {
			Tween.start();
		}
		return Tween;
	}
	,tween: function(Object,Values,Duration,Options) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_misc_VarTween(Options,this);
		tween.tween(Object,Values,Duration);
		return this.add_flixel_tweens_misc_VarTween(tween);
	}
	,num: function(FromValue,ToValue,Duration,Options,TweenFunction) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_misc_NumTween(Options,this);
		tween.tween(FromValue,ToValue,Duration,TweenFunction);
		return this.add_flixel_tweens_misc_NumTween(tween);
	}
	,angle: function(Sprite,FromAngle,ToAngle,Duration,Options) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_misc_AngleTween(Options,this);
		tween.tween(FromAngle,ToAngle,Duration,Sprite);
		return this.add_flixel_tweens_misc_AngleTween(tween);
	}
	,color: function(Sprite,Duration,FromColor,ToColor,Options) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_misc_ColorTween(Options,this);
		tween.tween(Duration,FromColor,ToColor,Sprite);
		return this.add_flixel_tweens_misc_ColorTween(tween);
	}
	,linearMotion: function(Object,FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_LinearMotion(Options,this);
		tween.setObject(Object);
		tween.setMotion(FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_LinearMotion(tween);
	}
	,quadMotion: function(Object,FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_QuadMotion(Options,this);
		tween.setObject(Object);
		tween.setMotion(FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_QuadMotion(tween);
	}
	,cubicMotion: function(Object,FromX,FromY,aX,aY,bX,bY,ToX,ToY,Duration,Options) {
		if(Duration == null) {
			Duration = 1;
		}
		var tween = new flixel_tweens_motion_CubicMotion(Options,this);
		tween.setObject(Object);
		tween.setMotion(FromX,FromY,aX,aY,bX,bY,ToX,ToY,Duration);
		return this.add_flixel_tweens_motion_CubicMotion(tween);
	}
	,circularMotion: function(Object,CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_CircularMotion(Options,this);
		tween.setObject(Object);
		tween.setMotion(CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_CircularMotion(tween);
	}
	,linearPath: function(Object,Points,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_LinearPath(Options,this);
		if(Points != null) {
			var _g = 0;
			while(_g < Points.length) {
				var point = Points[_g];
				++_g;
				tween.addPoint(point.x,point.y);
			}
		}
		tween.setObject(Object);
		tween.setMotion(DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_LinearPath(tween);
	}
	,quadPath: function(Object,Points,DurationOrSpeed,UseDuration,Options) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		if(DurationOrSpeed == null) {
			DurationOrSpeed = 1;
		}
		var tween = new flixel_tweens_motion_QuadPath(Options,this);
		if(Points != null) {
			var _g = 0;
			while(_g < Points.length) {
				var point = Points[_g];
				++_g;
				tween.addPoint(point.x,point.y);
			}
		}
		tween.setObject(Object);
		tween.setMotion(DurationOrSpeed,UseDuration);
		return this.add_flixel_tweens_motion_QuadPath(tween);
	}
	,destroy: function() {
		flixel_FlxBasic.prototype.destroy.call(this);
		flixel_FlxG.signals.stateSwitched.remove($bind(this,this.clear));
	}
	,update: function(elapsed) {
		var finishedTweens = null;
		var _g = 0;
		var _g1 = this._tweens;
		while(_g < _g1.length) {
			var tween = _g1[_g];
			++_g;
			if(!tween.active) {
				continue;
			}
			tween.update(elapsed);
			if(tween.finished) {
				if(finishedTweens == null) {
					finishedTweens = [];
				}
				finishedTweens.push(tween);
			}
		}
		if(finishedTweens != null) {
			while(finishedTweens.length > 0) finishedTweens.shift().finish();
		}
	}
	,remove: function(Tween,Destroy) {
		if(Destroy == null) {
			Destroy = true;
		}
		if(Tween == null) {
			return null;
		}
		Tween.set_active(false);
		if(Destroy) {
			Tween.destroy();
		}
		var array = this._tweens;
		var index = array.indexOf(Tween);
		if(index != -1) {
			array[index] = array[array.length - 1];
			array.pop();
		}
		return Tween;
	}
	,clear: function() {
		while(this._tweens.length > 0) this.remove(this._tweens[0]);
	}
	,completeAll: function() {
		var _g = 0;
		var _g1 = this._tweens;
		while(_g < _g1.length) {
			var tween = _g1[_g];
			++_g;
			if((tween.type & 2) == 0 && (tween.type & 4) == 0 && tween.active) {
				tween.update(1.79e+308);
			}
		}
	}
	,forEach: function(Function) {
		var _g = 0;
		var _g1 = this._tweens;
		while(_g < _g1.length) {
			var tween = _g1[_g];
			++_g;
			Function(tween);
		}
	}
	,__class__: flixel_tweens_FlxTweenManager
});
var flixel_tweens_misc_AngleTween = function(Options,manager) {
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.misc.AngleTween"] = flixel_tweens_misc_AngleTween;
flixel_tweens_misc_AngleTween.__name__ = ["flixel","tweens","misc","AngleTween"];
flixel_tweens_misc_AngleTween.__super__ = flixel_tweens_FlxTween;
flixel_tweens_misc_AngleTween.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this.sprite = null;
	}
	,tween: function(FromAngle,ToAngle,Duration,Sprite) {
		this._start = this.angle = FromAngle;
		this._range = ToAngle - this.angle;
		this.duration = Duration;
		this.sprite = Sprite;
		if(this.sprite != null) {
			this.sprite.set_angle(this.angle % 360);
		}
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		this.angle = this._start + this._range * this.scale;
		if(this.sprite != null) {
			this.sprite.set_angle(this.angle % 360);
		}
	}
	,__class__: flixel_tweens_misc_AngleTween
});
var flixel_tweens_misc_ColorTween = function(Options,manager) {
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.misc.ColorTween"] = flixel_tweens_misc_ColorTween;
flixel_tweens_misc_ColorTween.__name__ = ["flixel","tweens","misc","ColorTween"];
flixel_tweens_misc_ColorTween.__super__ = flixel_tweens_FlxTween;
flixel_tweens_misc_ColorTween.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this.sprite = null;
	}
	,tween: function(Duration,FromColor,ToColor,Sprite) {
		this.color = this.startColor = FromColor;
		this.endColor = ToColor;
		this.duration = Duration;
		this.sprite = Sprite;
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		var Color1 = this.startColor;
		var Color2 = this.endColor;
		var Factor = this.scale;
		var r = ((Color2 >> 16 & 255) - (Color1 >> 16 & 255)) * Factor + (Color1 >> 16 & 255) | 0;
		var g = ((Color2 >> 8 & 255) - (Color1 >> 8 & 255)) * Factor + (Color1 >> 8 & 255) | 0;
		var b = ((Color2 & 255) - (Color1 & 255)) * Factor + (Color1 & 255) | 0;
		var a = ((Color2 >> 24 & 255) - (Color1 >> 24 & 255)) * Factor + (Color1 >> 24 & 255) | 0;
		var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
		color &= -16711681;
		color |= (r > 255 ? 255 : r < 0 ? 0 : r) << 16;
		color &= -65281;
		color |= (g > 255 ? 255 : g < 0 ? 0 : g) << 8;
		color &= -256;
		color |= b > 255 ? 255 : b < 0 ? 0 : b;
		color &= 16777215;
		color |= (a > 255 ? 255 : a < 0 ? 0 : a) << 24;
		this.color = color;
		if(this.sprite != null) {
			this.sprite.set_color(this.color);
			this.sprite.set_alpha((this.color >> 24 & 255) / 255);
		}
	}
	,__class__: flixel_tweens_misc_ColorTween
});
var flixel_tweens_misc_NumTween = function(Options,manager) {
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.misc.NumTween"] = flixel_tweens_misc_NumTween;
flixel_tweens_misc_NumTween.__name__ = ["flixel","tweens","misc","NumTween"];
flixel_tweens_misc_NumTween.__super__ = flixel_tweens_FlxTween;
flixel_tweens_misc_NumTween.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this._tweenFunction = null;
	}
	,tween: function(fromValue,toValue,duration,tweenFunction) {
		this._tweenFunction = tweenFunction;
		this._start = this.value = fromValue;
		this._range = toValue - this.value;
		this.duration = duration;
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		this.value = this._start + this._range * this.scale;
		if(this._tweenFunction != null) {
			this._tweenFunction(this.value);
		}
	}
	,__class__: flixel_tweens_misc_NumTween
});
var flixel_tweens_misc_VarTween = function(Options,manager) {
	this._propertyInfos = [];
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.misc.VarTween"] = flixel_tweens_misc_VarTween;
flixel_tweens_misc_VarTween.__name__ = ["flixel","tweens","misc","VarTween"];
flixel_tweens_misc_VarTween.__super__ = flixel_tweens_FlxTween;
flixel_tweens_misc_VarTween.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this._object = null;
		this._properties = null;
	}
	,tween: function(object,properties,duration) {
		this._object = object;
		this._properties = properties;
		this.duration = duration;
		this.start();
		return this;
	}
	,update: function(elapsed) {
		if(this._secondsSinceStart < (this.executions > 0 ? this.loopDelay : this.startDelay)) {
			flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		} else {
			if(this._propertyInfos.length == 0) {
				this.initializeVars();
			}
			flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
			var _g = 0;
			var _g1 = this._propertyInfos;
			while(_g < _g1.length) {
				var info = _g1[_g];
				++_g;
				var o = this._object;
				var field = info.name;
				var value = info.startValue + info.range * this.scale;
				var tmp;
				var tmp1;
				if(o.__properties__) {
					tmp = o.__properties__["set_" + field];
					tmp1 = tmp;
				} else {
					tmp1 = false;
				}
				if(tmp1) {
					o[tmp](value);
				} else {
					o[field] = value;
				}
			}
		}
	}
	,initializeVars: function() {
		var fields;
		if(Reflect.isObject(this._properties)) {
			fields = Reflect.fields(this._properties);
		} else {
			throw new js__$Boot_HaxeError("Unsupported properties container - use an object containing key/value pairs.");
		}
		var _g = 0;
		while(_g < fields.length) {
			var p = fields[_g];
			++_g;
			var o = this._object;
			var tmp;
			var tmp1;
			if(o == null) {
				tmp1 = null;
			} else {
				var tmp2;
				if(o.__properties__) {
					tmp = o.__properties__["get_" + p];
					tmp2 = tmp;
				} else {
					tmp2 = false;
				}
				if(tmp2) {
					tmp1 = o[tmp]();
				} else {
					tmp1 = o[p];
				}
			}
			if(tmp1 == null) {
				throw new js__$Boot_HaxeError("The Object does not have the property \"" + p + "\"");
			}
			var o1 = this._object;
			var tmp3;
			var a;
			if(o1 == null) {
				a = null;
			} else {
				var a1;
				if(o1.__properties__) {
					tmp3 = o1.__properties__["get_" + p];
					a1 = tmp3;
				} else {
					a1 = false;
				}
				if(a1) {
					a = o1[tmp3]();
				} else {
					a = o1[p];
				}
			}
			if(isNaN(a)) {
				throw new js__$Boot_HaxeError("The property \"" + p + "\" is not numeric.");
			}
			var tmp4 = this._propertyInfos;
			var o2 = this._properties;
			var tmp5;
			var tmp6;
			if(o2 == null) {
				tmp6 = null;
			} else {
				var tmp7;
				if(o2.__properties__) {
					tmp5 = o2.__properties__["get_" + p];
					tmp7 = tmp5;
				} else {
					tmp7 = false;
				}
				if(tmp7) {
					tmp6 = o2[tmp5]();
				} else {
					tmp6 = o2[p];
				}
			}
			tmp4.push({ name : p, startValue : a, range : tmp6 - a});
		}
	}
	,__class__: flixel_tweens_misc_VarTween
});
var flixel_tweens_motion_Motion = function(Options,manager) {
	this.y = 0;
	this.x = 0;
	flixel_tweens_FlxTween.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.Motion"] = flixel_tweens_motion_Motion;
flixel_tweens_motion_Motion.__name__ = ["flixel","tweens","motion","Motion"];
flixel_tweens_motion_Motion.__super__ = flixel_tweens_FlxTween;
flixel_tweens_motion_Motion.prototype = $extend(flixel_tweens_FlxTween.prototype,{
	destroy: function() {
		flixel_tweens_FlxTween.prototype.destroy.call(this);
		this._object = null;
	}
	,setObject: function(object) {
		this._object = object;
		this._wasObjectImmovable = this._object.immovable;
		this._object.set_immovable(true);
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_FlxTween.prototype.update.call(this,elapsed);
		this.postUpdate();
	}
	,onEnd: function() {
		this._object.set_immovable(this._wasObjectImmovable);
		flixel_tweens_FlxTween.prototype.onEnd.call(this);
	}
	,postUpdate: function() {
		if(this._object != null) {
			this._object.setPosition(this.x,this.y);
		}
	}
	,__class__: flixel_tweens_motion_Motion
});
var flixel_tweens_motion_CircularMotion = function(Options,manager) {
	this._angleFinish = 0;
	this._angleStart = 0;
	this._radius = 0;
	this._centerY = 0;
	this._centerX = 0;
	this.angle = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.CircularMotion"] = flixel_tweens_motion_CircularMotion;
flixel_tweens_motion_CircularMotion.__name__ = ["flixel","tweens","motion","CircularMotion"];
flixel_tweens_motion_CircularMotion.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_CircularMotion.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	setMotion: function(CenterX,CenterY,Radius,Angle,Clockwise,DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this._centerX = CenterX;
		this._centerY = CenterY;
		this._radius = Radius;
		this.angle = this._angleStart = Angle * Math.PI / -180;
		this._angleFinish = Math.PI * 2 * (Clockwise ? 1 : -1);
		if(UseDuration) {
			this.duration = DurationOrSpeed;
		} else {
			this.duration = this._radius * (Math.PI * 2) / DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		this.angle = this._angleStart + this._angleFinish * this.scale;
		this.x = this._centerX + Math.cos(this.angle) * this._radius;
		this.y = this._centerY + Math.sin(this.angle) * this._radius;
		if(this.finished) {
			this.postUpdate();
		}
	}
	,get_circumference: function() {
		return this._radius * (Math.PI * 2);
	}
	,__class__: flixel_tweens_motion_CircularMotion
	,__properties__: $extend(flixel_tweens_motion_Motion.prototype.__properties__,{get_circumference:"get_circumference"})
});
var flixel_tweens_motion_CubicMotion = function(Options,manager) {
	this._tt = 0;
	this._ttt = 0;
	this._bY = 0;
	this._bX = 0;
	this._aY = 0;
	this._aX = 0;
	this._toY = 0;
	this._toX = 0;
	this._fromY = 0;
	this._fromX = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.CubicMotion"] = flixel_tweens_motion_CubicMotion;
flixel_tweens_motion_CubicMotion.__name__ = ["flixel","tweens","motion","CubicMotion"];
flixel_tweens_motion_CubicMotion.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_CubicMotion.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	setMotion: function(fromX,fromY,aX,aY,bX,bY,toX,toY,duration) {
		this.x = this._fromX = fromX;
		this.y = this._fromY = fromY;
		this._aX = aX;
		this._aY = aY;
		this._bX = bX;
		this._bY = bY;
		this._toX = toX;
		this._toY = toY;
		this.duration = duration;
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		this.x = this.scale * this.scale * this.scale * (this._toX + 3 * (this._aX - this._bX) - this._fromX) + 3 * this.scale * this.scale * (this._fromX - 2 * this._aX + this._bX) + 3 * this.scale * (this._aX - this._fromX) + this._fromX;
		this.y = this.scale * this.scale * this.scale * (this._toY + 3 * (this._aY - this._bY) - this._fromY) + 3 * this.scale * this.scale * (this._fromY - 2 * this._aY + this._bY) + 3 * this.scale * (this._aY - this._fromY) + this._fromY;
		if(this.finished) {
			this.postUpdate();
		}
	}
	,__class__: flixel_tweens_motion_CubicMotion
});
var flixel_tweens_motion_LinearMotion = function(Options,manager) {
	this._distance = -1;
	this._moveY = 0;
	this._moveX = 0;
	this._fromY = 0;
	this._fromX = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.LinearMotion"] = flixel_tweens_motion_LinearMotion;
flixel_tweens_motion_LinearMotion.__name__ = ["flixel","tweens","motion","LinearMotion"];
flixel_tweens_motion_LinearMotion.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_LinearMotion.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	setMotion: function(FromX,FromY,ToX,ToY,DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this._distance = -1;
		this.x = this._fromX = FromX;
		this.y = this._fromY = FromY;
		this._moveX = ToX - FromX;
		this._moveY = ToY - FromY;
		if(UseDuration) {
			this.duration = DurationOrSpeed;
		} else {
			this.duration = this.get_distance() / DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		this.x = this._fromX + this._moveX * this.scale;
		this.y = this._fromY + this._moveY * this.scale;
		if(this.x == this._fromX + this._moveX && this.y == this._fromY + this._moveY && this.active && this._secondsSinceStart >= this.duration) {
			this.finished = true;
		}
		if(this.finished) {
			this.postUpdate();
		}
	}
	,get_distance: function() {
		if(this._distance >= 0) {
			return this._distance;
		}
		return this._distance = Math.sqrt(this._moveX * this._moveX + this._moveY * this._moveY);
	}
	,__class__: flixel_tweens_motion_LinearMotion
	,__properties__: $extend(flixel_tweens_motion_Motion.prototype.__properties__,{get_distance:"get_distance"})
});
var flixel_tweens_motion_LinearPath = function(Options,manager) {
	this._index = 0;
	this._speed = 0;
	this.distance = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
	this.points = [];
	this._pointD = [0];
	this._pointT = [0];
};
$hxClasses["flixel.tweens.motion.LinearPath"] = flixel_tweens_motion_LinearPath;
flixel_tweens_motion_LinearPath.__name__ = ["flixel","tweens","motion","LinearPath"];
flixel_tweens_motion_LinearPath.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_LinearPath.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	destroy: function() {
		flixel_tweens_motion_Motion.prototype.destroy.call(this);
		var _g = 0;
		var _g1 = this.points;
		while(_g < _g1.length) {
			var point = _g1[_g];
			++_g;
			point = flixel_util_FlxDestroyUtil.put(point);
		}
		this._last = flixel_util_FlxDestroyUtil.put(this._last);
		this._prevPoint = flixel_util_FlxDestroyUtil.put(this._prevPoint);
		this._nextPoint = flixel_util_FlxDestroyUtil.put(this._nextPoint);
	}
	,setMotion: function(DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this.updatePath();
		if(UseDuration) {
			this.duration = DurationOrSpeed;
			this._speed = this.distance / DurationOrSpeed;
		} else {
			this.duration = this.distance / DurationOrSpeed;
			this._speed = DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,addPoint: function(x,y) {
		if(y == null) {
			y = 0;
		}
		if(x == null) {
			x = 0;
		}
		if(this._last != null) {
			this.distance += Math.sqrt((x - this._last.x) * (x - this._last.x) + (y - this._last.y) * (y - this._last.y));
			this._pointD[this.points.length] = this.distance;
		}
		var tmp = this.points;
		var tmp1 = this.points.length;
		var point = flixel_math_FlxPoint._pool.get().set(x,y);
		point._inPool = false;
		tmp[tmp1] = this._last = point;
		return this;
	}
	,getPoint: function(index) {
		if(index == null) {
			index = 0;
		}
		if(this.points.length == 0) {
			throw new js__$Boot_HaxeError("No points have been added to the path yet.");
		}
		return this.points[index % this.points.length];
	}
	,start: function() {
		this._index = this.backward ? this.points.length - 1 : 0;
		flixel_tweens_motion_Motion.prototype.start.call(this);
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		var td;
		var tt;
		if(this.points == null) {
			return;
		}
		if(!this.backward) {
			if(this._index < this.points.length - 1) {
				while(this.scale > this._pointT[this._index + 1]) {
					this._index++;
					if(this._index == this.points.length - 1) {
						this._index -= 1;
						break;
					}
				}
			}
			td = this._pointT[this._index];
			tt = this._pointT[this._index + 1] - td;
			td = (this.scale - td) / tt;
			this._prevPoint = this.points[this._index];
			this._nextPoint = this.points[this._index + 1];
			this.x = this._prevPoint.x + (this._nextPoint.x - this._prevPoint.x) * td;
			this.y = this._prevPoint.y + (this._nextPoint.y - this._prevPoint.y) * td;
		} else {
			if(this._index > 0) {
				while(this.scale < this._pointT[this._index - 1]) {
					this._index -= 1;
					if(this._index == 0) {
						this._index += 1;
						break;
					}
				}
			}
			td = this._pointT[this._index];
			tt = this._pointT[this._index - 1] - td;
			td = (this.scale - td) / tt;
			this._prevPoint = this.points[this._index];
			this._nextPoint = this.points[this._index - 1];
			this.x = this._prevPoint.x + (this._nextPoint.x - this._prevPoint.x) * td;
			this.y = this._prevPoint.y + (this._nextPoint.y - this._prevPoint.y) * td;
		}
		flixel_tweens_motion_Motion.prototype.postUpdate.call(this);
	}
	,updatePath: function() {
		if(this.points.length < 2) {
			throw new js__$Boot_HaxeError("A LinearPath must have at least 2 points to operate.");
		}
		if(this._pointD.length == this._pointT.length) {
			return;
		}
		var i = 0;
		while(i < this.points.length) this._pointT[i] = this._pointD[i++] / this.distance;
	}
	,__class__: flixel_tweens_motion_LinearPath
});
var flixel_tweens_motion_QuadMotion = function(Options,manager) {
	this._controlY = 0;
	this._controlX = 0;
	this._toY = 0;
	this._toX = 0;
	this._fromY = 0;
	this._fromX = 0;
	this._distance = -1;
	flixel_tweens_motion_Motion.call(this,Options,manager);
};
$hxClasses["flixel.tweens.motion.QuadMotion"] = flixel_tweens_motion_QuadMotion;
flixel_tweens_motion_QuadMotion.__name__ = ["flixel","tweens","motion","QuadMotion"];
flixel_tweens_motion_QuadMotion.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_QuadMotion.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	setMotion: function(FromX,FromY,ControlX,ControlY,ToX,ToY,DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this._distance = -1;
		this.x = this._fromX = FromX;
		this.y = this._fromY = FromY;
		this._controlX = ControlX;
		this._controlY = ControlY;
		this._toX = ToX;
		this._toY = ToY;
		if(UseDuration) {
			this.duration = DurationOrSpeed;
		} else {
			this.duration = this.get_distance() / DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		this.x = this._fromX * (1 - this.scale) * (1 - this.scale) + this._controlX * 2 * (1 - this.scale) * this.scale + this._toX * this.scale * this.scale;
		this.y = this._fromY * (1 - this.scale) * (1 - this.scale) + this._controlY * 2 * (1 - this.scale) * this.scale + this._toY * this.scale * this.scale;
		if(this.finished) {
			this.postUpdate();
		}
	}
	,get_distance: function() {
		if(this._distance >= 0) {
			return this._distance;
		}
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		point.set_x(this.x - 2 * this._controlX + this._toX);
		point.set_y(this.y - 2 * this._controlY + this._toY);
		point1.set_x(2 * this._controlX - 2 * this.x);
		point1.set_y(2 * this._controlY - 2 * this.y);
		var a = 4 * (point.x * point.x + point.y * point.y);
		var b = 4 * (point.x * point1.x + point.y * point1.y);
		var c = point1.x * point1.x + point1.y * point1.y;
		var abc = 2 * Math.sqrt(a + b + c);
		var a2 = Math.sqrt(a);
		var a32 = 2 * a * a2;
		var c2 = 2 * Math.sqrt(c);
		var ba = b / a2;
		point.put();
		point1.put();
		return (a32 * abc + a2 * b * (abc - c2) + (4 * c * a - b * b) * Math.log((2 * a2 + ba + abc) / (ba + c2))) / (4 * a32);
	}
	,__class__: flixel_tweens_motion_QuadMotion
	,__properties__: $extend(flixel_tweens_motion_Motion.prototype.__properties__,{get_distance:"get_distance"})
});
var flixel_tweens_motion_QuadPath = function(Options,manager) {
	this._updateCurve = true;
	this._numSegs = 0;
	this._index = 0;
	this._speed = 0;
	this._distance = 0;
	flixel_tweens_motion_Motion.call(this,Options,manager);
	this._points = [];
	this._curveT = [];
	this._curveD = [];
};
$hxClasses["flixel.tweens.motion.QuadPath"] = flixel_tweens_motion_QuadPath;
flixel_tweens_motion_QuadPath.__name__ = ["flixel","tweens","motion","QuadPath"];
flixel_tweens_motion_QuadPath.__super__ = flixel_tweens_motion_Motion;
flixel_tweens_motion_QuadPath.prototype = $extend(flixel_tweens_motion_Motion.prototype,{
	destroy: function() {
		flixel_tweens_motion_Motion.prototype.destroy.call(this);
		var _g = 0;
		var _g1 = this._points;
		while(_g < _g1.length) {
			var point = _g1[_g];
			++_g;
			point = flixel_util_FlxDestroyUtil.put(point);
		}
		this._a = flixel_util_FlxDestroyUtil.put(this._a);
		this._b = flixel_util_FlxDestroyUtil.put(this._b);
		this._c = flixel_util_FlxDestroyUtil.put(this._c);
	}
	,setMotion: function(DurationOrSpeed,UseDuration) {
		if(UseDuration == null) {
			UseDuration = true;
		}
		this.updatePath();
		if(UseDuration) {
			this.duration = DurationOrSpeed;
			this._speed = this._distance / DurationOrSpeed;
		} else {
			this.duration = this._distance / DurationOrSpeed;
			this._speed = DurationOrSpeed;
		}
		this.start();
		return this;
	}
	,addPoint: function(x,y) {
		if(y == null) {
			y = 0;
		}
		if(x == null) {
			x = 0;
		}
		this._updateCurve = true;
		var tmp = this._points;
		var point = flixel_math_FlxPoint._pool.get().set(x,y);
		point._inPool = false;
		tmp.push(point);
		return this;
	}
	,getPoint: function(index) {
		if(index == null) {
			index = 0;
		}
		if(this._points.length == 0) {
			throw new js__$Boot_HaxeError("No points have been added to the path yet.");
		}
		return this._points[index % this._points.length];
	}
	,start: function() {
		this._index = this.backward ? this._numSegs - 1 : 0;
		flixel_tweens_motion_Motion.prototype.start.call(this);
		return this;
	}
	,update: function(elapsed) {
		flixel_tweens_motion_Motion.prototype.update.call(this,elapsed);
		var td;
		var tt;
		if(!this.backward && this._points != null) {
			if(this._index < this._numSegs - 1) {
				while(this.scale > this._curveT[this._index + 1]) {
					this._index++;
					if(this._index == this._numSegs - 1) {
						break;
					}
				}
			}
			td = this._curveT[this._index];
			tt = this._curveT[this._index + 1] - td;
			td = (this.scale - td) / tt;
			this._a = this._points[this._index * 2];
			this._b = this._points[this._index * 2 + 1];
			this._c = this._points[this._index * 2 + 2];
			this.x = this._a.x * (1 - td) * (1 - td) + this._b.x * 2 * (1 - td) * td + this._c.x * td * td;
			this.y = this._a.y * (1 - td) * (1 - td) + this._b.y * 2 * (1 - td) * td + this._c.y * td * td;
		} else if(this._points != null) {
			if(this._index > 0) {
				while(this.scale < this._curveT[this._index]) {
					this._index--;
					if(this._index == 0) {
						break;
					}
				}
			}
			td = this._curveT[this._index + 1];
			tt = this._curveT[this._index] - td;
			td = (this.scale - td) / tt;
			this._a = this._points[this._index * 2 + 2];
			this._b = this._points[this._index * 2 + 1];
			this._c = this._points[this._index * 2];
			this.x = this._a.x * (1 - td) * (1 - td) + this._b.x * 2 * (1 - td) * td + this._c.x * td * td;
			this.y = this._a.y * (1 - td) * (1 - td) + this._b.y * 2 * (1 - td) * td + this._c.y * td * td;
		}
		flixel_tweens_motion_Motion.prototype.postUpdate.call(this);
	}
	,updatePath: function() {
		if((this._points.length - 1) % 2 != 0 || this._points.length < 3) {
			throw new js__$Boot_HaxeError("A QuadPath must have at least 3 points to operate and number of points must be a odd.");
		}
		if(!this._updateCurve) {
			return;
		}
		this._updateCurve = false;
		var i = 0;
		var j = 0;
		this._distance = 0;
		this._numSegs = (this._points.length - 1) / 2 | 0;
		while(i < this._numSegs) {
			j = i * 2;
			this._curveD[i] = this.getCurveLength(this._points[j],this._points[j + 1],this._points[j + 2]);
			this._distance += this._curveD[i++];
		}
		i = 0;
		var d = 0;
		while(i < this._numSegs) {
			d += this._curveD[i];
			this._curveT[i++] = d / this._distance;
		}
		this._curveT[this._numSegs - 1] = 1;
		this._curveT.unshift(0);
	}
	,getCurveLength: function(start,control,finish) {
		var point = flixel_math_FlxPoint._pool.get().set(0,0);
		point._inPool = false;
		var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
		point1._inPool = false;
		point.set_x(start.x - 2 * control.x + finish.x);
		point.set_y(start.y - 2 * control.y + finish.y);
		point1.set_x(2 * control.x - 2 * start.x);
		point1.set_y(2 * control.y - 2 * start.y);
		var a = 4 * (point.x * point.x + point.y * point.y);
		var b = 4 * (point.x * point1.x + point.y * point1.y);
		var c = point1.x * point1.x + point1.y * point1.y;
		var abc = 2 * Math.sqrt(a + b + c);
		var a2 = Math.sqrt(a);
		var a32 = 2 * a * a2;
		var c2 = 2 * Math.sqrt(c);
		var ba = b / a2;
		point.put();
		point1.put();
		return (a32 * abc + a2 * b * (abc - c2) + (4 * c * a - b * b) * Math.log((2 * a2 + ba + abc) / (ba + c2))) / (4 * a32);
	}
	,__class__: flixel_tweens_motion_QuadPath
});
var flixel_ui_FlxBarFillDirection = $hxClasses["flixel.ui.FlxBarFillDirection"] = { __ename__ : ["flixel","ui","FlxBarFillDirection"], __constructs__ : ["LEFT_TO_RIGHT","RIGHT_TO_LEFT","TOP_TO_BOTTOM","BOTTOM_TO_TOP","HORIZONTAL_INSIDE_OUT","HORIZONTAL_OUTSIDE_IN","VERTICAL_INSIDE_OUT","VERTICAL_OUTSIDE_IN"] };
flixel_ui_FlxBarFillDirection.LEFT_TO_RIGHT = ["LEFT_TO_RIGHT",0];
flixel_ui_FlxBarFillDirection.LEFT_TO_RIGHT.toString = $estr;
flixel_ui_FlxBarFillDirection.LEFT_TO_RIGHT.__enum__ = flixel_ui_FlxBarFillDirection;
flixel_ui_FlxBarFillDirection.RIGHT_TO_LEFT = ["RIGHT_TO_LEFT",1];
flixel_ui_FlxBarFillDirection.RIGHT_TO_LEFT.toString = $estr;
flixel_ui_FlxBarFillDirection.RIGHT_TO_LEFT.__enum__ = flixel_ui_FlxBarFillDirection;
flixel_ui_FlxBarFillDirection.TOP_TO_BOTTOM = ["TOP_TO_BOTTOM",2];
flixel_ui_FlxBarFillDirection.TOP_TO_BOTTOM.toString = $estr;
flixel_ui_FlxBarFillDirection.TOP_TO_BOTTOM.__enum__ = flixel_ui_FlxBarFillDirection;
flixel_ui_FlxBarFillDirection.BOTTOM_TO_TOP = ["BOTTOM_TO_TOP",3];
flixel_ui_FlxBarFillDirection.BOTTOM_TO_TOP.toString = $estr;
flixel_ui_FlxBarFillDirection.BOTTOM_TO_TOP.__enum__ = flixel_ui_FlxBarFillDirection;
flixel_ui_FlxBarFillDirection.HORIZONTAL_INSIDE_OUT = ["HORIZONTAL_INSIDE_OUT",4];
flixel_ui_FlxBarFillDirection.HORIZONTAL_INSIDE_OUT.toString = $estr;
flixel_ui_FlxBarFillDirection.HORIZONTAL_INSIDE_OUT.__enum__ = flixel_ui_FlxBarFillDirection;
flixel_ui_FlxBarFillDirection.HORIZONTAL_OUTSIDE_IN = ["HORIZONTAL_OUTSIDE_IN",5];
flixel_ui_FlxBarFillDirection.HORIZONTAL_OUTSIDE_IN.toString = $estr;
flixel_ui_FlxBarFillDirection.HORIZONTAL_OUTSIDE_IN.__enum__ = flixel_ui_FlxBarFillDirection;
flixel_ui_FlxBarFillDirection.VERTICAL_INSIDE_OUT = ["VERTICAL_INSIDE_OUT",6];
flixel_ui_FlxBarFillDirection.VERTICAL_INSIDE_OUT.toString = $estr;
flixel_ui_FlxBarFillDirection.VERTICAL_INSIDE_OUT.__enum__ = flixel_ui_FlxBarFillDirection;
flixel_ui_FlxBarFillDirection.VERTICAL_OUTSIDE_IN = ["VERTICAL_OUTSIDE_IN",7];
flixel_ui_FlxBarFillDirection.VERTICAL_OUTSIDE_IN.toString = $estr;
flixel_ui_FlxBarFillDirection.VERTICAL_OUTSIDE_IN.__enum__ = flixel_ui_FlxBarFillDirection;
var flixel_ui_FlxTypedButton_$flixel_$text_$FlxText = function(X,Y,OnClick) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	this.lastStatus = -1;
	this.maxInputMovement = Infinity;
	this.mouseButtons = [-1];
	this.allowSwiping = true;
	this.statusAnimations = ["normal","highlight","pressed"];
	this.labelAlphas = [0.8,1.0,0.5];
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	var point1 = flixel_math_FlxPoint._pool.get().set(0,0);
	point1._inPool = false;
	var point2 = flixel_math_FlxPoint._pool.get().set(0,1);
	point2._inPool = false;
	this.labelOffsets = [point,point1,point2];
	flixel_FlxSprite.call(this,X,Y);
	this.loadDefaultGraphic();
	this.onUp = new flixel_ui__$FlxButton_FlxButtonEvent(OnClick);
	this.onDown = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.onOver = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.onOut = new flixel_ui__$FlxButton_FlxButtonEvent();
	this.set_status(0);
	this.scrollFactor.set();
	openfl_Lib.current.stage.addEventListener("mouseUp",$bind(this,this.onUpEventListener));
	this.input = new flixel_input_FlxInput(0);
};
$hxClasses["flixel.ui.FlxTypedButton_flixel_text_FlxText"] = flixel_ui_FlxTypedButton_$flixel_$text_$FlxText;
flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.__name__ = ["flixel","ui","FlxTypedButton_flixel_text_FlxText"];
flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.__interfaces__ = [flixel_input_IFlxInput];
flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.__super__ = flixel_FlxSprite;
flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.prototype = $extend(flixel_FlxSprite.prototype,{
	graphicLoaded: function() {
		flixel_FlxSprite.prototype.graphicLoaded.call(this);
		this.setupAnimation("normal",0);
		this.setupAnimation("highlight",1);
		this.setupAnimation("pressed",2);
	}
	,loadDefaultGraphic: function() {
		this.loadGraphic("flixel/images/ui/button.png",true,80,20);
	}
	,setupAnimation: function(animationName,frameIndex) {
		frameIndex = Math.min(frameIndex,this.animation._sprite.numFrames - 1) | 0;
		this.animation.add(animationName,[frameIndex]);
	}
	,destroy: function() {
		this.set_label(flixel_util_FlxDestroyUtil.destroy(this.label));
		this._spriteLabel = null;
		this.onUp = flixel_util_FlxDestroyUtil.destroy(this.onUp);
		this.onDown = flixel_util_FlxDestroyUtil.destroy(this.onDown);
		this.onOver = flixel_util_FlxDestroyUtil.destroy(this.onOver);
		this.onOut = flixel_util_FlxDestroyUtil.destroy(this.onOut);
		this.labelOffsets = flixel_util_FlxDestroyUtil.putArray(this.labelOffsets);
		this.labelAlphas = null;
		this.currentInput = null;
		this.input = null;
		openfl_Lib.current.stage.removeEventListener("mouseUp",$bind(this,this.onUpEventListener));
		flixel_FlxSprite.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		flixel_FlxSprite.prototype.update.call(this,elapsed);
		this.input.update();
		if(this.visible) {
			this.updateButton();
			if(this.lastStatus != this.status) {
				this.updateStatusAnimation();
				this.lastStatus = this.status;
			}
		}
	}
	,updateStatusAnimation: function() {
		this.animation.play(this.statusAnimations[this.status]);
	}
	,draw: function() {
		flixel_FlxSprite.prototype.draw.call(this);
		if(this._spriteLabel != null && this._spriteLabel.visible) {
			this._spriteLabel.set_cameras(this.get_cameras());
			this._spriteLabel.draw();
		}
	}
	,stampOnAtlas: function(atlas) {
		var buttonNode = atlas.addNode(this.graphic.bitmap,this.graphic.key);
		var result = buttonNode != null;
		if(buttonNode != null) {
			var buttonFrames = this.frames;
			var X = buttonFrames.tileSize.x;
			var Y = buttonFrames.tileSize.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			this.set_frames(buttonNode.getTileFrames(point));
		}
		if(result && this.label != null) {
			var labelNode = atlas.addNode(this.label.graphic.bitmap,this.label.graphic.key);
			if(result) {
				result = labelNode != null;
			} else {
				result = false;
			}
			if(labelNode != null) {
				this.label.set_frames(labelNode.getImageFrame());
			}
		}
		return result;
	}
	,updateButton: function() {
		var overlapFound = this.checkMouseOverlap();
		if(!overlapFound) {
			overlapFound = this.checkTouchOverlap();
		}
		if(this.currentInput != null && this.currentInput.get_justReleased() && js_Boot.__instanceof(this.currentInput,flixel_input_touch_FlxTouch) && overlapFound) {
			this.onUpHandler();
		}
		if(this.status != 0 && (!overlapFound || this.currentInput != null && this.currentInput.get_justReleased())) {
			this.onOutHandler();
		}
	}
	,checkMouseOverlap: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			var _g2 = 0;
			var _g3 = this.mouseButtons;
			while(_g2 < _g3.length) {
				var buttonID = _g3[_g2];
				++_g2;
				var button = flixel_input_mouse_FlxMouseButton.getByID(buttonID);
				if(button != null && this.checkInput(flixel_FlxG.mouse,button,button.justPressedPosition,camera)) {
					return true;
				}
			}
		}
		return false;
	}
	,checkTouchOverlap: function() {
		var _g = 0;
		var _g1 = this.get_cameras();
		while(_g < _g1.length) {
			var camera = _g1[_g];
			++_g;
			var _g2 = 0;
			var _g3 = flixel_FlxG.touches.list;
			while(_g2 < _g3.length) {
				var touch = _g3[_g2];
				++_g2;
				if(this.checkInput(touch,touch,touch.justPressedPosition,camera)) {
					return true;
				}
			}
		}
		return false;
	}
	,checkInput: function(pointer,input,justPressedPosition,camera) {
		var tmp;
		var tmp1;
		if(this.maxInputMovement != Infinity) {
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			point._weak = true;
			tmp1 = justPressedPosition.distanceTo(pointer.getScreenPosition(null,point)) > this.maxInputMovement;
		} else {
			tmp1 = false;
		}
		if(tmp1) {
			tmp = input == this.currentInput;
		} else {
			tmp = false;
		}
		if(!tmp) {
			if(this.overlapsPoint(pointer.getWorldPosition(camera,this._point),true,camera)) {
				this.updateStatus(input);
				return true;
			}
		}
		return false;
	}
	,updateStatus: function(input) {
		if(input.get_justPressed()) {
			this.currentInput = input;
			this.onDownHandler();
		} else if(this.status == 0) {
			if(this.allowSwiping && input.get_pressed()) {
				this.onDownHandler();
			} else {
				this.onOverHandler();
			}
		}
	}
	,updateLabelPosition: function() {
		if(this._spriteLabel != null) {
			this._spriteLabel.set_x((this.pixelPerfectPosition ? Math.floor(this.x) : this.x) + this.labelOffsets[this.status].x);
			this._spriteLabel.set_y((this.pixelPerfectPosition ? Math.floor(this.y) : this.y) + this.labelOffsets[this.status].y);
		}
	}
	,updateLabelAlpha: function() {
		if(this._spriteLabel != null && this.labelAlphas.length > this.status) {
			this._spriteLabel.set_alpha(this.alpha * this.labelAlphas[this.status]);
		}
	}
	,onUpEventListener: function(_) {
		if(this.visible && this.exists && this.active && this.status == 2) {
			this.onUpHandler();
		}
	}
	,onUpHandler: function() {
		this.set_status(0);
		this.input.release();
		this.currentInput = null;
		var _this = this.onUp;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onDownHandler: function() {
		this.set_status(2);
		this.input.press();
		var _this = this.onDown;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onOverHandler: function() {
		this.set_status(1);
		var _this = this.onOver;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,onOutHandler: function() {
		this.set_status(0);
		this.input.release();
		var _this = this.onOut;
		if(_this.callback != null) {
			_this.callback();
		}
		if(_this.sound != null) {
			_this.sound.play(true);
		}
	}
	,set_label: function(Value) {
		if(Value != null) {
			Value.scrollFactor.put();
			Value.scrollFactor = this.scrollFactor;
		}
		this.label = Value;
		this._spriteLabel = this.label;
		this.updateLabelPosition();
		return Value;
	}
	,set_status: function(Value) {
		this.status = Value;
		this.updateLabelAlpha();
		return this.status;
	}
	,set_alpha: function(Value) {
		flixel_FlxSprite.prototype.set_alpha.call(this,Value);
		this.updateLabelAlpha();
		return this.alpha;
	}
	,set_x: function(Value) {
		flixel_FlxSprite.prototype.set_x.call(this,Value);
		this.updateLabelPosition();
		return this.x;
	}
	,set_y: function(Value) {
		flixel_FlxSprite.prototype.set_y.call(this,Value);
		this.updateLabelPosition();
		return this.y;
	}
	,get_justReleased: function() {
		return this.input.current == -1;
	}
	,get_released: function() {
		var _this = this.input;
		if(_this.current != 0) {
			return _this.current == -1;
		} else {
			return true;
		}
	}
	,get_pressed: function() {
		var _this = this.input;
		if(_this.current != 1) {
			return _this.current == 2;
		} else {
			return true;
		}
	}
	,get_justPressed: function() {
		return this.input.current == 2;
	}
	,__class__: flixel_ui_FlxTypedButton_$flixel_$text_$FlxText
	,__properties__: $extend(flixel_FlxSprite.prototype.__properties__,{get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased",set_status:"set_status",set_label:"set_label"})
});
var flixel_ui_FlxButton = function(X,Y,Text,OnClick) {
	if(Y == null) {
		Y = 0;
	}
	if(X == null) {
		X = 0;
	}
	flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.call(this,X,Y,OnClick);
	var _g = 0;
	var _g1 = this.labelOffsets;
	while(_g < _g1.length) {
		var point = _g1[_g];
		++_g;
		point.set(point.x - 1,point.y + 3);
	}
	if(Text != null) {
		this.set_label(new flixel_text_FlxText(this.x + this.labelOffsets[0].x,this.y + this.labelOffsets[0].y,80,Text));
		this.label.setFormat(null,8,3355443,"center");
		this.label.set_alpha(this.labelAlphas[this.status]);
		this.label.drawFrame(true);
	}
};
$hxClasses["flixel.ui.FlxButton"] = flixel_ui_FlxButton;
flixel_ui_FlxButton.__name__ = ["flixel","ui","FlxButton"];
flixel_ui_FlxButton.__super__ = flixel_ui_FlxTypedButton_$flixel_$text_$FlxText;
flixel_ui_FlxButton.prototype = $extend(flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.prototype,{
	resetHelpers: function() {
		flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.prototype.resetHelpers.call(this);
		if(this.label != null) {
			var tmp = this.label;
			var tmp1 = this.get_width() | 0;
			tmp.set_fieldWidth(this.label.frameWidth = tmp1);
			this.label.set_size(this.label._defaultFormat.size | 0);
		}
	}
	,initLabel: function(Text) {
		if(Text != null) {
			this.set_label(new flixel_text_FlxText(this.x + this.labelOffsets[0].x,this.y + this.labelOffsets[0].y,80,Text));
			this.label.setFormat(null,8,3355443,"center");
			this.label.set_alpha(this.labelAlphas[this.status]);
			this.label.drawFrame(true);
		}
	}
	,get_text: function() {
		if(this.label != null) {
			return this.label.text;
		} else {
			return null;
		}
	}
	,set_text: function(Text) {
		if(this.label == null) {
			if(Text != null) {
				this.set_label(new flixel_text_FlxText(this.x + this.labelOffsets[0].x,this.y + this.labelOffsets[0].y,80,Text));
				this.label.setFormat(null,8,3355443,"center");
				this.label.set_alpha(this.labelAlphas[this.status]);
				this.label.drawFrame(true);
			}
		} else {
			this.label.set_text(Text);
		}
		return Text;
	}
	,__class__: flixel_ui_FlxButton
	,__properties__: $extend(flixel_ui_FlxTypedButton_$flixel_$text_$FlxText.prototype.__properties__,{set_text:"set_text",get_text:"get_text"})
});
var flixel_ui__$FlxButton_FlxButtonEvent = function(Callback,sound) {
	this.callback = Callback;
	this.sound = sound;
};
$hxClasses["flixel.ui._FlxButton.FlxButtonEvent"] = flixel_ui__$FlxButton_FlxButtonEvent;
flixel_ui__$FlxButton_FlxButtonEvent.__name__ = ["flixel","ui","_FlxButton","FlxButtonEvent"];
flixel_ui__$FlxButton_FlxButtonEvent.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_ui__$FlxButton_FlxButtonEvent.prototype = {
	destroy: function() {
		this.callback = null;
		this.sound = flixel_util_FlxDestroyUtil.destroy(this.sound);
	}
	,fire: function() {
		if(this.callback != null) {
			this.callback();
		}
		if(this.sound != null) {
			this.sound.play(true);
		}
	}
	,__class__: flixel_ui__$FlxButton_FlxButtonEvent
};
var flixel_ui_FlxVirtualPad = function(DPad,Action) {
	flixel_group_FlxTypedSpriteGroup.call(this);
	this.scrollFactor.set();
	if(DPad == null) {
		DPad = flixel_ui_FlxDPadMode.FULL;
	}
	if(Action == null) {
		Action = flixel_ui_FlxActionMode.A_B_C;
	}
	this.dPad = new flixel_group_FlxTypedSpriteGroup();
	this.dPad.scrollFactor.set();
	this.actions = new flixel_group_FlxTypedSpriteGroup();
	this.actions.scrollFactor.set();
	switch(DPad[1]) {
	case 0:
		break;
	case 1:
		this.dPad.add(this.add(this.buttonUp = this.createButton(0,flixel_FlxG.height - 85,44,45,"up")));
		this.dPad.add(this.add(this.buttonDown = this.createButton(0,flixel_FlxG.height - 45,44,45,"down")));
		break;
	case 2:
		this.dPad.add(this.add(this.buttonLeft = this.createButton(0,flixel_FlxG.height - 45,44,45,"left")));
		this.dPad.add(this.add(this.buttonRight = this.createButton(42,flixel_FlxG.height - 45,44,45,"right")));
		break;
	case 3:
		this.dPad.add(this.add(this.buttonUp = this.createButton(35,flixel_FlxG.height - 81,44,45,"up")));
		this.dPad.add(this.add(this.buttonLeft = this.createButton(0,flixel_FlxG.height - 45,44,45,"left")));
		this.dPad.add(this.add(this.buttonRight = this.createButton(69,flixel_FlxG.height - 45,44,45,"right")));
		break;
	case 4:
		this.dPad.add(this.add(this.buttonUp = this.createButton(35,flixel_FlxG.height - 116,44,45,"up")));
		this.dPad.add(this.add(this.buttonLeft = this.createButton(0,flixel_FlxG.height - 81,44,45,"left")));
		this.dPad.add(this.add(this.buttonRight = this.createButton(69,flixel_FlxG.height - 81,44,45,"right")));
		this.dPad.add(this.add(this.buttonDown = this.createButton(35,flixel_FlxG.height - 45,44,45,"down")));
		break;
	}
	switch(Action[1]) {
	case 0:
		break;
	case 1:
		this.actions.add(this.add(this.buttonA = this.createButton(flixel_FlxG.width - 44,flixel_FlxG.height - 45,44,45,"a")));
		break;
	case 2:
		this.actions.add(this.add(this.buttonA = this.createButton(flixel_FlxG.width - 44,flixel_FlxG.height - 45,44,45,"a")));
		this.actions.add(this.add(this.buttonB = this.createButton(flixel_FlxG.width - 86,flixel_FlxG.height - 45,44,45,"b")));
		break;
	case 3:
		this.actions.add(this.add(this.buttonA = this.createButton(flixel_FlxG.width - 128,flixel_FlxG.height - 45,44,45,"a")));
		this.actions.add(this.add(this.buttonB = this.createButton(flixel_FlxG.width - 86,flixel_FlxG.height - 45,44,45,"b")));
		this.actions.add(this.add(this.buttonC = this.createButton(flixel_FlxG.width - 44,flixel_FlxG.height - 45,44,45,"c")));
		break;
	case 4:
		this.actions.add(this.add(this.buttonY = this.createButton(flixel_FlxG.width - 86,flixel_FlxG.height - 85,44,45,"y")));
		this.actions.add(this.add(this.buttonX = this.createButton(flixel_FlxG.width - 44,flixel_FlxG.height - 85,44,45,"x")));
		this.actions.add(this.add(this.buttonB = this.createButton(flixel_FlxG.width - 86,flixel_FlxG.height - 45,44,45,"b")));
		this.actions.add(this.add(this.buttonA = this.createButton(flixel_FlxG.width - 44,flixel_FlxG.height - 45,44,45,"a")));
		break;
	}
};
$hxClasses["flixel.ui.FlxVirtualPad"] = flixel_ui_FlxVirtualPad;
flixel_ui_FlxVirtualPad.__name__ = ["flixel","ui","FlxVirtualPad"];
flixel_ui_FlxVirtualPad.__super__ = flixel_group_FlxTypedSpriteGroup;
flixel_ui_FlxVirtualPad.prototype = $extend(flixel_group_FlxTypedSpriteGroup.prototype,{
	destroy: function() {
		flixel_group_FlxTypedSpriteGroup.prototype.destroy.call(this);
		this.dPad = flixel_util_FlxDestroyUtil.destroy(this.dPad);
		this.actions = flixel_util_FlxDestroyUtil.destroy(this.actions);
		this.dPad = null;
		this.actions = null;
		this.buttonA = null;
		this.buttonB = null;
		this.buttonC = null;
		this.buttonY = null;
		this.buttonX = null;
		this.buttonLeft = null;
		this.buttonUp = null;
		this.buttonDown = null;
		this.buttonRight = null;
	}
	,createButton: function(X,Y,Width,Height,Graphic,OnClick) {
		var button = new flixel_ui_FlxButton(X,Y);
		var frame = flixel_system_FlxAssets.getVirtualInputFrames().framesHash.get(Graphic);
		var point = flixel_math_FlxPoint._pool.get().set(Width,Height);
		point._inPool = false;
		button.set_frames(flixel_graphics_frames_FlxTileFrames.fromFrame(frame,point));
		button.set_width(button.frameWidth);
		button.set_height(button.frameHeight);
		button.set_solid(false);
		button.set_immovable(true);
		button.scrollFactor.set();
		if(OnClick != null) {
			button.onDown.callback = OnClick;
		}
		return button;
	}
	,__class__: flixel_ui_FlxVirtualPad
});
var flixel_ui_FlxDPadMode = $hxClasses["flixel.ui.FlxDPadMode"] = { __ename__ : ["flixel","ui","FlxDPadMode"], __constructs__ : ["NONE","UP_DOWN","LEFT_RIGHT","UP_LEFT_RIGHT","FULL"] };
flixel_ui_FlxDPadMode.NONE = ["NONE",0];
flixel_ui_FlxDPadMode.NONE.toString = $estr;
flixel_ui_FlxDPadMode.NONE.__enum__ = flixel_ui_FlxDPadMode;
flixel_ui_FlxDPadMode.UP_DOWN = ["UP_DOWN",1];
flixel_ui_FlxDPadMode.UP_DOWN.toString = $estr;
flixel_ui_FlxDPadMode.UP_DOWN.__enum__ = flixel_ui_FlxDPadMode;
flixel_ui_FlxDPadMode.LEFT_RIGHT = ["LEFT_RIGHT",2];
flixel_ui_FlxDPadMode.LEFT_RIGHT.toString = $estr;
flixel_ui_FlxDPadMode.LEFT_RIGHT.__enum__ = flixel_ui_FlxDPadMode;
flixel_ui_FlxDPadMode.UP_LEFT_RIGHT = ["UP_LEFT_RIGHT",3];
flixel_ui_FlxDPadMode.UP_LEFT_RIGHT.toString = $estr;
flixel_ui_FlxDPadMode.UP_LEFT_RIGHT.__enum__ = flixel_ui_FlxDPadMode;
flixel_ui_FlxDPadMode.FULL = ["FULL",4];
flixel_ui_FlxDPadMode.FULL.toString = $estr;
flixel_ui_FlxDPadMode.FULL.__enum__ = flixel_ui_FlxDPadMode;
var flixel_ui_FlxActionMode = $hxClasses["flixel.ui.FlxActionMode"] = { __ename__ : ["flixel","ui","FlxActionMode"], __constructs__ : ["NONE","A","A_B","A_B_C","A_B_X_Y"] };
flixel_ui_FlxActionMode.NONE = ["NONE",0];
flixel_ui_FlxActionMode.NONE.toString = $estr;
flixel_ui_FlxActionMode.NONE.__enum__ = flixel_ui_FlxActionMode;
flixel_ui_FlxActionMode.A = ["A",1];
flixel_ui_FlxActionMode.A.toString = $estr;
flixel_ui_FlxActionMode.A.__enum__ = flixel_ui_FlxActionMode;
flixel_ui_FlxActionMode.A_B = ["A_B",2];
flixel_ui_FlxActionMode.A_B.toString = $estr;
flixel_ui_FlxActionMode.A_B.__enum__ = flixel_ui_FlxActionMode;
flixel_ui_FlxActionMode.A_B_C = ["A_B_C",3];
flixel_ui_FlxActionMode.A_B_C.toString = $estr;
flixel_ui_FlxActionMode.A_B_C.__enum__ = flixel_ui_FlxActionMode;
flixel_ui_FlxActionMode.A_B_X_Y = ["A_B_X_Y",4];
flixel_ui_FlxActionMode.A_B_X_Y.toString = $estr;
flixel_ui_FlxActionMode.A_B_X_Y.__enum__ = flixel_ui_FlxActionMode;
var flixel_util_FlxArrayUtil = function() { };
$hxClasses["flixel.util.FlxArrayUtil"] = flixel_util_FlxArrayUtil;
flixel_util_FlxArrayUtil.__name__ = ["flixel","util","FlxArrayUtil"];
flixel_util_FlxArrayUtil.setLength_flixel_group_FlxTypedGroup_T = function(array,newLength) {
	if(newLength < 0) {
		return array;
	}
	var diff = newLength - array.length;
	if(diff >= 0) {
		return array;
	}
	diff = -diff;
	var _g1 = 0;
	var _g = diff;
	while(_g1 < _g) {
		++_g1;
		array.pop();
	}
	return array;
};
flixel_util_FlxArrayUtil.setLength_Int = function(array,newLength) {
	if(newLength < 0) {
		return array;
	}
	var diff = newLength - array.length;
	if(diff >= 0) {
		return array;
	}
	diff = -diff;
	var _g1 = 0;
	var _g = diff;
	while(_g1 < _g) {
		++_g1;
		array.pop();
	}
	return array;
};
flixel_util_FlxArrayUtil.flatten2DArray_Int = function(array) {
	var result = [];
	var _g = 0;
	while(_g < array.length) {
		var innerArray = array[_g];
		++_g;
		var _g1 = 0;
		while(_g1 < innerArray.length) {
			var element = innerArray[_g1];
			++_g1;
			result.push(element);
		}
	}
	return result;
};
flixel_util_FlxArrayUtil.fastSplice_flixel_tweens_FlxTween = function(array,element) {
	var index = array.indexOf(element);
	if(index != -1) {
		array[index] = array[array.length - 1];
		array.pop();
		return array;
	}
	return array;
};
flixel_util_FlxArrayUtil.fastSplice_flixel_util_FlxTimer = function(array,element) {
	var index = array.indexOf(element);
	if(index != -1) {
		array[index] = array[array.length - 1];
		array.pop();
		return array;
	}
	return array;
};
flixel_util_FlxArrayUtil.swapAndPop_fastSplice_T = function(array,index) {
	array[index] = array[array.length - 1];
	array.pop();
	return array;
};
flixel_util_FlxArrayUtil.clearArray = function(array,recursive) {
	if(recursive == null) {
		recursive = false;
	}
	if(array == null) {
		return array;
	}
	if(recursive) {
		while(array.length > 0) {
			var thing = array.pop();
			if((thing instanceof Array) && thing.__enum__ == null) {
				flixel_util_FlxArrayUtil.clearArray(array,recursive);
			}
		}
	} else {
		while(array.length > 0) array.pop();
	}
	return array;
};
flixel_util_FlxArrayUtil.equals = function(array1,array2) {
	if(array1 == null && array2 == null) {
		return true;
	}
	if(array1 == null && array2 != null) {
		return false;
	}
	if(array1 != null && array2 == null) {
		return false;
	}
	if(array1.length != array2.length) {
		return false;
	}
	var _g1 = 0;
	var _g = array1.length;
	while(_g1 < _g) {
		var i = _g1++;
		if(array1[i] != array2[i]) {
			return false;
		}
	}
	return true;
};
flixel_util_FlxArrayUtil.last = function(array) {
	if(array == null || array.length == 0) {
		return null;
	}
	return array[array.length - 1];
};
flixel_util_FlxArrayUtil.contains = function(array,element) {
	return array.indexOf(element) != -1;
};
var flixel_util_FlxAxes = $hxClasses["flixel.util.FlxAxes"] = { __ename__ : ["flixel","util","FlxAxes"], __constructs__ : ["X","Y","XY"] };
flixel_util_FlxAxes.X = ["X",0];
flixel_util_FlxAxes.X.toString = $estr;
flixel_util_FlxAxes.X.__enum__ = flixel_util_FlxAxes;
flixel_util_FlxAxes.Y = ["Y",1];
flixel_util_FlxAxes.Y.toString = $estr;
flixel_util_FlxAxes.Y.__enum__ = flixel_util_FlxAxes;
flixel_util_FlxAxes.XY = ["XY",2];
flixel_util_FlxAxes.XY.toString = $estr;
flixel_util_FlxAxes.XY.__enum__ = flixel_util_FlxAxes;
var flixel_util_FlxBitmapDataPool = function() { };
$hxClasses["flixel.util.FlxBitmapDataPool"] = flixel_util_FlxBitmapDataPool;
flixel_util_FlxBitmapDataPool.__name__ = ["flixel","util","FlxBitmapDataPool"];
flixel_util_FlxBitmapDataPool.__properties__ = {set_maxLength:"set_maxLength"}
flixel_util_FlxBitmapDataPool.get = function(w,h,transparent,fillColor,exactSize) {
	if(exactSize == null) {
		exactSize = false;
	}
	if(transparent == null) {
		transparent = true;
	}
	var res = null;
	var node = flixel_util_FlxBitmapDataPool._head;
	while(node != null) {
		var bmd = node.bmd;
		if(bmd.transparent == transparent && bmd.width >= w && bmd.height >= h && (!exactSize || exactSize && bmd.width == w && bmd.height == h)) {
			res = bmd;
			if(node.prev != null) {
				node.prev.next = node.next;
			}
			if(node.next != null) {
				node.next.prev = node.prev;
			}
			if(node == flixel_util_FlxBitmapDataPool._head) {
				flixel_util_FlxBitmapDataPool._head = node.next;
			}
			if(node == flixel_util_FlxBitmapDataPool._tail) {
				flixel_util_FlxBitmapDataPool._tail = node.prev;
			}
			node = null;
			flixel_util_FlxBitmapDataPool.$length--;
			break;
		}
		node = node.next;
	}
	if(res != null) {
		if(fillColor != null) {
			flixel_util_FlxBitmapDataPool._rect.x = 0;
			flixel_util_FlxBitmapDataPool._rect.y = 0;
			flixel_util_FlxBitmapDataPool._rect.width = w;
			flixel_util_FlxBitmapDataPool._rect.height = h;
			res.fillRect(flixel_util_FlxBitmapDataPool._rect,fillColor);
		}
	} else {
		res = new openfl_display_BitmapData(w,h,transparent,fillColor != null ? fillColor : -1);
	}
	return res;
};
flixel_util_FlxBitmapDataPool.put = function(bmd) {
	if(flixel_util_FlxBitmapDataPool.$length >= flixel_util_FlxBitmapDataPool.maxLength) {
		var last = flixel_util_FlxBitmapDataPool._tail;
		last.bmd.dispose();
		if(last.prev != null) {
			last.prev.next = null;
			flixel_util_FlxBitmapDataPool._tail = last.prev;
		}
		last = null;
		flixel_util_FlxBitmapDataPool.$length--;
	}
	var node = new flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode(bmd);
	node.next = flixel_util_FlxBitmapDataPool._head;
	if(flixel_util_FlxBitmapDataPool._head == null) {
		flixel_util_FlxBitmapDataPool._head = flixel_util_FlxBitmapDataPool._tail = node;
	} else {
		flixel_util_FlxBitmapDataPool._head = node;
		node.next.prev = node;
	}
	flixel_util_FlxBitmapDataPool.$length++;
};
flixel_util_FlxBitmapDataPool.clear = function() {
	var node = flixel_util_FlxBitmapDataPool._head;
	while(node != null) {
		var bmd = node.bmd;
		bmd.dispose();
		bmd = null;
		node = node.next;
	}
	flixel_util_FlxBitmapDataPool.$length = 0;
	flixel_util_FlxBitmapDataPool._head = flixel_util_FlxBitmapDataPool._tail = null;
};
flixel_util_FlxBitmapDataPool.set_maxLength = function(value) {
	if(flixel_util_FlxBitmapDataPool.maxLength != value) {
		var node = flixel_util_FlxBitmapDataPool._tail;
		while(node != null && flixel_util_FlxBitmapDataPool.$length > value) {
			var bmd = node.bmd;
			bmd.dispose();
			bmd = null;
			node = node.prev;
			flixel_util_FlxBitmapDataPool.$length--;
		}
	}
	return flixel_util_FlxBitmapDataPool.maxLength = value;
};
var flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode = function(bmd,prev,next) {
	this.bmd = bmd;
	this.prev = prev;
	this.next = next;
};
$hxClasses["flixel.util._FlxBitmapDataPool.FlxBitmapDataPoolNode"] = flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode;
flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode.__name__ = ["flixel","util","_FlxBitmapDataPool","FlxBitmapDataPoolNode"];
flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode.prototype = {
	__class__: flixel_util__$FlxBitmapDataPool_FlxBitmapDataPoolNode
};
var flixel_util_FlxBitmapDataUtil = function() { };
$hxClasses["flixel.util.FlxBitmapDataUtil"] = flixel_util_FlxBitmapDataUtil;
flixel_util_FlxBitmapDataUtil.__name__ = ["flixel","util","FlxBitmapDataUtil"];
flixel_util_FlxBitmapDataUtil.merge = function(sourceBitmapData,sourceRect,destBitmapData,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
	if(destPoint.x >= destBitmapData.width || destPoint.y >= destBitmapData.height || sourceRect.x >= sourceBitmapData.width || sourceRect.y >= sourceBitmapData.height || sourceRect.x + sourceRect.width <= 0 || sourceRect.y + sourceRect.height <= 0) {
		return;
	}
	while(sourceRect.x + sourceRect.width > sourceBitmapData.width || sourceRect.y + sourceRect.height > sourceBitmapData.height || sourceRect.x < 0 || sourceRect.y < 0 || destPoint.x < 0 || destPoint.y < 0) {
		if(sourceRect.x + sourceRect.width > sourceBitmapData.width) {
			sourceRect.width = sourceBitmapData.width - sourceRect.x;
		}
		if(sourceRect.y + sourceRect.height > sourceBitmapData.height) {
			sourceRect.height = sourceBitmapData.height - sourceRect.y;
		}
		if(sourceRect.x < 0) {
			destPoint.x -= sourceRect.x;
			sourceRect.width += sourceRect.x;
			sourceRect.x = 0;
		}
		if(sourceRect.y < 0) {
			destPoint.y -= sourceRect.y;
			sourceRect.height += sourceRect.y;
			sourceRect.y = 0;
		}
		if(destPoint.x >= destBitmapData.width || destPoint.y >= destBitmapData.height) {
			return;
		}
		if(destPoint.x < 0) {
			sourceRect.x -= destPoint.x;
			sourceRect.width += destPoint.x;
			destPoint.x = 0;
		}
		if(destPoint.y < 0) {
			sourceRect.y -= destPoint.y;
			sourceRect.height += destPoint.y;
			destPoint.y = 0;
		}
	}
	if(sourceRect.width <= 0 || sourceRect.height <= 0) {
		return;
	}
	var startSourceX = Math.round(sourceRect.x);
	var startSourceY = Math.round(sourceRect.y);
	var width = Math.round(sourceRect.width);
	var height = Math.round(sourceRect.height);
	var sourceX = startSourceX;
	var sourceY = startSourceY;
	var destX = Math.round(destPoint.x);
	var destY = Math.round(destPoint.y);
	var currX = destX;
	var currY = destY;
	var sourceColor;
	var destColor;
	var resultRed;
	var resultGreen;
	var resultBlue;
	var resultAlpha;
	var resultColor = 0;
	var _g1 = 0;
	while(_g1 < width) {
		var i = _g1++;
		var _g3 = 0;
		while(_g3 < height) {
			var j = _g3++;
			sourceX = startSourceX + i;
			sourceY = startSourceY + j;
			currX = destX + i;
			currY = destY + j;
			sourceColor = sourceBitmapData.getPixel32(sourceX,sourceY);
			destColor = destBitmapData.getPixel32(currX,currY);
			resultRed = ((sourceColor >> 16 & 255) * redMultiplier + (destColor >> 16 & 255) * (256 - redMultiplier)) / 256 | 0;
			resultGreen = ((sourceColor >> 8 & 255) * greenMultiplier + (destColor >> 8 & 255) * (256 - greenMultiplier)) / 256 | 0;
			resultBlue = ((sourceColor & 255) * blueMultiplier + (destColor & 255) * (256 - blueMultiplier)) / 256 | 0;
			resultAlpha = ((sourceColor >> 24 & 255) * alphaMultiplier + (destColor >> 24 & 255) * (256 - alphaMultiplier)) / 256 | 0;
			var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
			color &= -16711681;
			color |= (resultRed > 255 ? 255 : resultRed < 0 ? 0 : resultRed) << 16;
			color &= -65281;
			color |= (resultGreen > 255 ? 255 : resultGreen < 0 ? 0 : resultGreen) << 8;
			color &= -256;
			color |= resultBlue > 255 ? 255 : resultBlue < 0 ? 0 : resultBlue;
			color &= 16777215;
			color |= (resultAlpha > 255 ? 255 : resultAlpha < 0 ? 0 : resultAlpha) << 24;
			resultColor = color;
			destBitmapData.setPixel32(currX,currY,resultColor);
		}
	}
};
flixel_util_FlxBitmapDataUtil.mergeColorComponent = function(source,dest,multiplier) {
	return (source * multiplier + dest * (256 - multiplier)) / 256 | 0;
};
flixel_util_FlxBitmapDataUtil.compare = function(Bitmap1,Bitmap2) {
	if(Bitmap1 == Bitmap2) {
		return 0;
	}
	if(Bitmap1.width != Bitmap2.width) {
		return -3;
	} else if(Bitmap1.height != Bitmap2.height) {
		return -4;
	} else {
		var width = Bitmap1.width;
		var height = Bitmap1.height;
		var result = new openfl_display_BitmapData(width,height,true,0);
		var identical = true;
		var _g1 = 0;
		while(_g1 < width) {
			var i = _g1++;
			var _g3 = 0;
			while(_g3 < height) {
				var j = _g3++;
				var pixel1 = Bitmap1.getPixel32(i,j);
				var pixel2 = Bitmap2.getPixel32(i,j);
				if(pixel1 != pixel2) {
					identical = false;
					if((pixel1 & 16777215) != (pixel2 & 16777215)) {
						var diff = (pixel1 >> 16 & 255) - (pixel2 >> 16 & 255);
						var Red = diff >= 0 ? diff : 256 + diff;
						var diff1 = (pixel1 >> 8 & 255) - (pixel2 >> 8 & 255);
						var Green = diff1 >= 0 ? diff1 : 256 + diff1;
						var diff2 = (pixel1 & 255) - (pixel2 & 255);
						var Blue = diff2 >= 0 ? diff2 : 256 + diff2;
						var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
						color &= -16711681;
						color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
						color &= -65281;
						color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
						color &= -256;
						color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
						color &= 16777215;
						color |= -16777216;
						result.setPixel32(i,j,color);
					} else {
						var alpha1 = pixel1 >> 24 & 255;
						var alpha2 = pixel2 >> 24 & 255;
						if(alpha1 != alpha2) {
							var diff3 = alpha1 - alpha2;
							var Alpha = diff3 >= 0 ? diff3 : 256 + diff3;
							var color1 = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
							color1 &= -16711681;
							color1 |= 16711680;
							color1 &= -65281;
							color1 |= 65280;
							color1 &= -256;
							color1 |= 255;
							color1 &= 16777215;
							color1 |= (Alpha > 255 ? 255 : Alpha < 0 ? 0 : Alpha) << 24;
							result.setPixel32(i,j,color1);
						}
					}
				}
			}
		}
		if(!identical) {
			return result;
		}
	}
	return 0;
};
flixel_util_FlxBitmapDataUtil.getDiff = function(value1,value2) {
	var diff = value1 - value2;
	if(diff >= 0) {
		return diff;
	} else {
		return 256 + diff;
	}
};
flixel_util_FlxBitmapDataUtil.getMemorySize = function(bitmapData) {
	return bitmapData.width * bitmapData.height * 4;
};
flixel_util_FlxBitmapDataUtil.replaceColor = function(bitmapData,color,newColor,fetchPositions,rect) {
	if(fetchPositions == null) {
		fetchPositions = false;
	}
	var positions = null;
	if(fetchPositions) {
		positions = [];
	}
	var startX = 0;
	var startY = 0;
	var columns = bitmapData.width;
	var rows = bitmapData.height;
	if(rect != null) {
		startX = rect.x | 0;
		startY = rect.y | 0;
		columns = rect.width | 0;
		rows = rect.height | 0;
	}
	columns = Math.max(columns,bitmapData.width) | 0;
	rows = Math.max(rows,bitmapData.height) | 0;
	var row = 0;
	var column = 0;
	var x;
	var y;
	var changed = false;
	while(row < rows) {
		column = 0;
		while(column < columns) {
			x = startX + column;
			y = startY + row;
			if(bitmapData.getPixel32(x,y) == color) {
				bitmapData.setPixel32(x,y,newColor);
				changed = true;
				if(fetchPositions) {
					var point = flixel_math_FlxPoint._pool.get().set(x,y);
					point._inPool = false;
					positions.push(point);
				}
			}
			++column;
		}
		++row;
	}
	if(changed && positions == null) {
		positions = [];
	}
	return positions;
};
flixel_util_FlxBitmapDataUtil.addSpacesAndBorders = function(bitmapData,frameSize,spacing,border,region) {
	if(region == null) {
		var Width = bitmapData.width;
		var Height = bitmapData.height;
		var _this = flixel_math_FlxRect._pool.get();
		_this.x = 0;
		_this.y = 0;
		_this.width = Width;
		_this.height = Height;
		_this._inPool = false;
		region = _this;
	}
	var frameWidth = region.width | 0;
	var frameHeight = region.height | 0;
	if(frameSize != null) {
		frameWidth = frameSize.x | 0;
		frameHeight = frameSize.y | 0;
	}
	var numHorizontalFrames = region.width / frameWidth | 0;
	var numVerticalFrames = region.height / frameHeight | 0;
	var spaceX = 0;
	var spaceY = 0;
	if(spacing != null) {
		spaceX = spacing.x | 0;
		spaceY = spacing.y | 0;
	}
	var borderX = 0;
	var borderY = 0;
	if(border != null) {
		borderX = border.x | 0;
		borderY = border.y | 0;
	}
	var result = new openfl_display_BitmapData(region.width + (numHorizontalFrames - 1) * spaceX + 2 * numHorizontalFrames * borderX | 0,region.height + (numVerticalFrames - 1) * spaceY + 2 * numVerticalFrames * borderY | 0,true,0);
	var tempRect = new openfl_geom_Rectangle(0,0,frameWidth,frameHeight);
	var tempPoint = new openfl_geom_Point();
	var _g1 = 0;
	while(_g1 < numHorizontalFrames) {
		var i = _g1++;
		tempPoint.x = i * (frameWidth + spaceX + 2 * borderX) + borderX;
		tempRect.x = i * frameWidth + region.x;
		var _g3 = 0;
		while(_g3 < numVerticalFrames) {
			var j = _g3++;
			tempPoint.y = j * (frameHeight + spaceY + 2 * borderY) + borderY;
			tempRect.y = j * frameHeight + region.y;
			result.copyPixels(bitmapData,tempRect,tempPoint);
		}
	}
	flixel_util_FlxBitmapDataUtil.copyBorderPixels(result,frameWidth,frameHeight,spaceX,spaceY,borderX,borderY,numHorizontalFrames,numVerticalFrames);
	return result;
};
flixel_util_FlxBitmapDataUtil.copyBorderPixels = function(bitmapData,frameWidth,frameHeight,spaceX,spaceY,borderX,borderY,horizontalFrames,verticalFrames) {
	var tempRect = new openfl_geom_Rectangle(0,0,1,bitmapData.height);
	var tempPoint = new openfl_geom_Point();
	var _g1 = 0;
	while(_g1 < horizontalFrames) {
		tempRect.x = _g1++ * (frameWidth + 2 * borderX + spaceX) + borderX;
		var _g3 = 0;
		while(_g3 < borderX) {
			tempPoint.x = tempRect.x - _g3++ - 1;
			bitmapData.copyPixels(bitmapData,tempRect,tempPoint);
		}
		tempRect.x += frameWidth - 1;
		var _g31 = 0;
		while(_g31 < borderX) {
			tempPoint.x = tempRect.x + _g31++ + 1;
			bitmapData.copyPixels(bitmapData,tempRect,tempPoint);
		}
	}
	tempPoint.setTo(0,0);
	tempRect.setTo(0,0,bitmapData.width,1);
	var _g11 = 0;
	while(_g11 < verticalFrames) {
		tempRect.y = _g11++ * (frameHeight + 2 * borderY + spaceY) + borderY;
		var _g32 = 0;
		while(_g32 < borderY) {
			tempPoint.y = tempRect.y - _g32++ - 1;
			bitmapData.copyPixels(bitmapData,tempRect,tempPoint);
		}
		tempRect.y += frameHeight - 1;
		var _g33 = 0;
		while(_g33 < borderY) {
			tempPoint.y = tempRect.y + _g33++ + 1;
			bitmapData.copyPixels(bitmapData,tempRect,tempPoint);
		}
	}
	return bitmapData;
};
flixel_util_FlxBitmapDataUtil.generateRotations = function(brush,rotations,antiAliasing,autoBuffer) {
	if(autoBuffer == null) {
		autoBuffer = false;
	}
	if(antiAliasing == null) {
		antiAliasing = false;
	}
	if(rotations == null) {
		rotations = 16;
	}
	var brushWidth = brush.width;
	var brushHeight = brush.height;
	var max = brushHeight > brushWidth ? brushHeight : brushWidth;
	if(autoBuffer) {
		max = max * 1.5 | 0;
	} else {
		max = max;
	}
	var rows = Math.sqrt(rotations) | 0;
	var columns = Math.ceil(rotations / rows);
	var bakedRotationAngle = 360 / rotations;
	var result = new openfl_display_BitmapData(max * columns,max * rows,true,0);
	var row = 0;
	var column = 0;
	var bakedAngle = 0;
	var halfBrushWidth = brushWidth * 0.5 | 0;
	var halfBrushHeight = brushHeight * 0.5 | 0;
	var midpointX = max * 0.5 | 0;
	var midpointY = max * 0.5 | 0;
	while(row < rows) {
		column = 0;
		while(column < columns) {
			flixel_util_FlxBitmapDataUtil.matrix.identity();
			flixel_util_FlxBitmapDataUtil.matrix.translate(-halfBrushWidth,-halfBrushHeight);
			flixel_util_FlxBitmapDataUtil.matrix.rotate(bakedAngle * (Math.PI / 180));
			flixel_util_FlxBitmapDataUtil.matrix.translate(max * column + midpointX,midpointY);
			bakedAngle += bakedRotationAngle;
			result.draw(brush,flixel_util_FlxBitmapDataUtil.matrix,null,null,null,antiAliasing);
			++column;
		}
		midpointY += max;
		++row;
	}
	return result;
};
var flixel_util_FlxCollision = function() { };
$hxClasses["flixel.util.FlxCollision"] = flixel_util_FlxCollision;
flixel_util_FlxCollision.__name__ = ["flixel","util","FlxCollision"];
flixel_util_FlxCollision.pixelPerfectCheck = function(Contact,Target,AlphaTolerance,Camera) {
	if(AlphaTolerance == null) {
		AlphaTolerance = 1;
	}
	var considerRotation = Contact.angle != 0 || Target.angle != 0;
	if(Camera != null) {
		Camera = Camera;
	} else {
		Camera = flixel_FlxG.camera;
	}
	flixel_util_FlxCollision.pointA.set_x(Contact.x - (Camera.scroll.x * Contact.scrollFactor.x | 0) - Contact.offset.x);
	flixel_util_FlxCollision.pointA.set_y(Contact.y - (Camera.scroll.y * Contact.scrollFactor.y | 0) - Contact.offset.y);
	flixel_util_FlxCollision.pointB.set_x(Target.x - (Camera.scroll.x * Target.scrollFactor.x | 0) - Target.offset.x);
	flixel_util_FlxCollision.pointB.set_y(Target.y - (Camera.scroll.y * Target.scrollFactor.y | 0) - Target.offset.y);
	if(considerRotation) {
		Contact.origin.copyTo(flixel_util_FlxCollision.centerA);
		Target.origin.copyTo(flixel_util_FlxCollision.centerB);
		var _this = flixel_util_FlxCollision.centerA;
		var lengthA = Math.sqrt(_this.x * _this.x + _this.y * _this.y);
		flixel_util_FlxCollision.boundsA.x = flixel_util_FlxCollision.pointA.x + flixel_util_FlxCollision.centerA.x - lengthA;
		flixel_util_FlxCollision.boundsA.y = flixel_util_FlxCollision.pointA.y + flixel_util_FlxCollision.centerA.y - lengthA;
		flixel_util_FlxCollision.boundsA.width = lengthA * 2;
		flixel_util_FlxCollision.boundsA.height = flixel_util_FlxCollision.boundsA.width;
		var _this1 = flixel_util_FlxCollision.centerB;
		var lengthB = Math.sqrt(_this1.x * _this1.x + _this1.y * _this1.y);
		flixel_util_FlxCollision.boundsB.x = flixel_util_FlxCollision.pointB.x + flixel_util_FlxCollision.centerB.x - lengthB;
		flixel_util_FlxCollision.boundsB.y = flixel_util_FlxCollision.pointB.y + flixel_util_FlxCollision.centerB.y - lengthB;
		flixel_util_FlxCollision.boundsB.width = lengthB * 2;
		flixel_util_FlxCollision.boundsB.height = flixel_util_FlxCollision.boundsB.width;
	} else {
		flixel_util_FlxCollision.boundsA.x = flixel_util_FlxCollision.pointA.x;
		flixel_util_FlxCollision.boundsA.y = flixel_util_FlxCollision.pointA.y;
		flixel_util_FlxCollision.boundsA.width = Contact.frameWidth;
		flixel_util_FlxCollision.boundsA.height = Contact.frameHeight;
		flixel_util_FlxCollision.boundsB.x = flixel_util_FlxCollision.pointB.x;
		flixel_util_FlxCollision.boundsB.y = flixel_util_FlxCollision.pointB.y;
		flixel_util_FlxCollision.boundsB.width = Target.frameWidth;
		flixel_util_FlxCollision.boundsB.height = Target.frameHeight;
	}
	var _this2 = flixel_util_FlxCollision.intersect;
	_this2.x = 0;
	_this2.y = 0;
	_this2.width = 0;
	_this2.height = 0;
	flixel_util_FlxCollision.boundsA.intersection(flixel_util_FlxCollision.boundsB,_this2);
	var tmp;
	var tmp1;
	var _this3 = flixel_util_FlxCollision.intersect;
	if(!(_this3.width == 0 || _this3.height == 0)) {
		tmp1 = flixel_util_FlxCollision.intersect.width < 1;
	} else {
		tmp1 = true;
	}
	if(!tmp1) {
		tmp = flixel_util_FlxCollision.intersect.height < 1;
	} else {
		tmp = true;
	}
	if(tmp) {
		return false;
	}
	flixel_util_FlxCollision.matrixA.identity();
	flixel_util_FlxCollision.matrixA.translate(-(flixel_util_FlxCollision.intersect.x - flixel_util_FlxCollision.boundsA.x),-(flixel_util_FlxCollision.intersect.y - flixel_util_FlxCollision.boundsA.y));
	flixel_util_FlxCollision.matrixB.identity();
	flixel_util_FlxCollision.matrixB.translate(-(flixel_util_FlxCollision.intersect.x - flixel_util_FlxCollision.boundsB.x),-(flixel_util_FlxCollision.intersect.y - flixel_util_FlxCollision.boundsB.y));
	Contact.drawFrame();
	Target.drawFrame();
	var testA = Contact.framePixels;
	var testB = Target.framePixels;
	var overlapWidth = flixel_util_FlxCollision.intersect.width | 0;
	var overlapHeight = flixel_util_FlxCollision.intersect.height | 0;
	if(considerRotation) {
		flixel_util_FlxCollision.testMatrix.identity();
		flixel_util_FlxCollision.testMatrix.translate(-Contact.origin.x,-Contact.origin.y);
		flixel_util_FlxCollision.testMatrix.rotate(Contact.angle * (Math.PI / 180));
		flixel_util_FlxCollision.testMatrix.translate(flixel_util_FlxCollision.boundsA.width / 2,flixel_util_FlxCollision.boundsA.height / 2);
		var testA2 = flixel_util_FlxBitmapDataPool.get(Math.floor(flixel_util_FlxCollision.boundsA.width),Math.floor(flixel_util_FlxCollision.boundsA.height),true,0,false);
		testA2.draw(testA,flixel_util_FlxCollision.testMatrix,null,null,null,false);
		testA = testA2;
		flixel_util_FlxCollision.testMatrix.identity();
		flixel_util_FlxCollision.testMatrix.translate(-Target.origin.x,-Target.origin.y);
		flixel_util_FlxCollision.testMatrix.rotate(Target.angle * (Math.PI / 180));
		flixel_util_FlxCollision.testMatrix.translate(flixel_util_FlxCollision.boundsB.width / 2,flixel_util_FlxCollision.boundsB.height / 2);
		var testB2 = flixel_util_FlxBitmapDataPool.get(Math.floor(flixel_util_FlxCollision.boundsB.width),Math.floor(flixel_util_FlxCollision.boundsB.height),true,0,false);
		testB2.draw(testB,flixel_util_FlxCollision.testMatrix,null,null,null,false);
		testB = testB2;
	}
	flixel_util_FlxCollision.boundsA.x = -flixel_util_FlxCollision.matrixA.tx | 0;
	flixel_util_FlxCollision.boundsA.y = -flixel_util_FlxCollision.matrixA.ty | 0;
	flixel_util_FlxCollision.boundsA.width = overlapWidth;
	flixel_util_FlxCollision.boundsA.height = overlapHeight;
	flixel_util_FlxCollision.boundsB.x = -flixel_util_FlxCollision.matrixB.tx | 0;
	flixel_util_FlxCollision.boundsB.y = -flixel_util_FlxCollision.matrixB.ty | 0;
	flixel_util_FlxCollision.boundsB.width = overlapWidth;
	flixel_util_FlxCollision.boundsB.height = overlapHeight;
	var _this4 = flixel_util_FlxCollision.boundsA;
	var FlashRect = flixel_util_FlxCollision.flashRect;
	if(FlashRect == null) {
		FlashRect = new openfl_geom_Rectangle();
	}
	FlashRect.x = _this4.x;
	FlashRect.y = _this4.y;
	FlashRect.width = _this4.width;
	FlashRect.height = _this4.height;
	var pixelsA = testA.getPixels(flixel_util_FlxCollision.flashRect);
	var _this5 = flixel_util_FlxCollision.boundsB;
	var FlashRect1 = flixel_util_FlxCollision.flashRect;
	if(FlashRect1 == null) {
		FlashRect1 = new openfl_geom_Rectangle();
	}
	FlashRect1.x = _this5.x;
	FlashRect1.y = _this5.y;
	FlashRect1.width = _this5.width;
	FlashRect1.height = _this5.height;
	var pixelsB = testB.getPixels(flixel_util_FlxCollision.flashRect);
	var hit = false;
	var alphaA = 0;
	var alphaB = 0;
	var overlapPixels = overlapWidth * overlapHeight;
	var alphaIdx = 0;
	var _g1 = 0;
	var _g = Math.ceil(overlapPixels / 2);
	while(_g1 < _g) {
		alphaIdx = _g1++ << 3;
		pixelsA.position = pixelsB.position = alphaIdx;
		alphaA = pixelsA.readUnsignedByte();
		alphaB = pixelsB.readUnsignedByte();
		if(alphaA >= AlphaTolerance && alphaB >= AlphaTolerance) {
			hit = true;
			break;
		}
	}
	if(!hit) {
		var _g11 = 0;
		var _g2 = overlapPixels >> 1;
		while(_g11 < _g2) {
			alphaIdx = (_g11++ << 3) + 4;
			pixelsA.position = pixelsB.position = alphaIdx;
			alphaA = pixelsA.readUnsignedByte();
			alphaB = pixelsB.readUnsignedByte();
			if(alphaA >= AlphaTolerance && alphaB >= AlphaTolerance) {
				hit = true;
				break;
			}
		}
	}
	if(considerRotation) {
		flixel_util_FlxBitmapDataPool.put(testA);
		flixel_util_FlxBitmapDataPool.put(testB);
	}
	return hit;
};
flixel_util_FlxCollision.pixelPerfectPointCheck = function(PointX,PointY,Target,AlphaTolerance) {
	if(AlphaTolerance == null) {
		AlphaTolerance = 1;
	}
	if(!flixel_math_FlxMath.pointInCoordinates(PointX,PointY,Math.floor(Target.x),Math.floor(Target.y),Target.get_width() | 0,Target.get_height() | 0)) {
		return false;
	}
	if(flixel_FlxG.renderTile) {
		Target.drawFrame();
	}
	var pixelAlpha = flixel_util__$FlxColor_FlxColor_$Impl_$._new(Target.framePixels.getPixel32(Math.floor(PointX - Target.x),Math.floor(PointY - Target.y))) >> 24 & 255;
	if(flixel_FlxG.renderTile) {
		pixelAlpha = pixelAlpha * Target.alpha | 0;
	}
	return pixelAlpha >= AlphaTolerance;
};
flixel_util_FlxCollision.createCameraWall = function(Camera,PlaceOutside,Thickness,AdjustWorldBounds) {
	if(AdjustWorldBounds == null) {
		AdjustWorldBounds = false;
	}
	if(PlaceOutside == null) {
		PlaceOutside = true;
	}
	var left = null;
	var right = null;
	var top = null;
	var bottom = null;
	if(PlaceOutside) {
		left = new flixel_tile_FlxTileblock(Math.floor(Camera.x - Thickness),Math.floor(Camera.y + Thickness),Thickness,Camera.height - Thickness * 2);
		right = new flixel_tile_FlxTileblock(Math.floor(Camera.x + Camera.width),Math.floor(Camera.y + Thickness),Thickness,Camera.height - Thickness * 2);
		top = new flixel_tile_FlxTileblock(Math.floor(Camera.x - Thickness),Math.floor(Camera.y - Thickness),Camera.width + Thickness * 2,Thickness);
		bottom = new flixel_tile_FlxTileblock(Math.floor(Camera.x - Thickness),Camera.height,Camera.width + Thickness * 2,Thickness);
		if(AdjustWorldBounds) {
			var _this = flixel_FlxG.worldBounds;
			_this.x = Camera.x - Thickness;
			_this.y = Camera.y - Thickness;
			_this.width = Camera.width + Thickness * 2;
			_this.height = Camera.height + Thickness * 2;
		}
	} else {
		left = new flixel_tile_FlxTileblock(Math.floor(Camera.x),Math.floor(Camera.y + Thickness),Thickness,Camera.height - Thickness * 2);
		right = new flixel_tile_FlxTileblock(Math.floor(Camera.x + Camera.width - Thickness),Math.floor(Camera.y + Thickness),Thickness,Camera.height - Thickness * 2);
		top = new flixel_tile_FlxTileblock(Math.floor(Camera.x),Math.floor(Camera.y),Camera.width,Thickness);
		bottom = new flixel_tile_FlxTileblock(Math.floor(Camera.x),Camera.height - Thickness,Camera.width,Thickness);
		if(AdjustWorldBounds) {
			var _this1 = flixel_FlxG.worldBounds;
			_this1.x = Camera.x;
			_this1.y = Camera.y;
			_this1.width = Camera.width;
			_this1.height = Camera.height;
		}
	}
	var result = new flixel_group_FlxTypedGroup();
	result.add(left);
	result.add(right);
	result.add(top);
	result.add(bottom);
	return result;
};
var flixel_util__$FlxColor_FlxColor_$Impl_$ = {};
$hxClasses["flixel.util._FlxColor.FlxColor_Impl_"] = flixel_util__$FlxColor_FlxColor_$Impl_$;
flixel_util__$FlxColor_FlxColor_$Impl_$.__name__ = ["flixel","util","_FlxColor","FlxColor_Impl_"];
flixel_util__$FlxColor_FlxColor_$Impl_$.__properties__ = {set_lightness:"set_lightness",get_lightness:"get_lightness",set_brightness:"set_brightness",get_brightness:"get_brightness",set_saturation:"set_saturation",get_saturation:"get_saturation",set_hue:"set_hue",get_hue:"get_hue",set_black:"set_black",get_black:"get_black",set_yellow:"set_yellow",get_yellow:"get_yellow",set_magenta:"set_magenta",get_magenta:"get_magenta",set_cyan:"set_cyan",get_cyan:"get_cyan",set_alphaFloat:"set_alphaFloat",get_alphaFloat:"get_alphaFloat",set_greenFloat:"set_greenFloat",get_greenFloat:"get_greenFloat",set_blueFloat:"set_blueFloat",get_blueFloat:"get_blueFloat",set_redFloat:"set_redFloat",get_redFloat:"get_redFloat",set_alpha:"set_alpha",get_alpha:"get_alpha",set_green:"set_green",get_green:"get_green",set_blue:"set_blue",get_blue:"get_blue",set_red:"set_red",get_red:"get_red"}
flixel_util__$FlxColor_FlxColor_$Impl_$.fromInt = function(Value) {
	return flixel_util__$FlxColor_FlxColor_$Impl_$._new(Value);
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromRGB = function(Red,Green,Blue,Alpha) {
	if(Alpha == null) {
		Alpha = 255;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	color &= -65281;
	color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	color &= -256;
	color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	color &= 16777215;
	color |= (Alpha > 255 ? 255 : Alpha < 0 ? 0 : Alpha) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromRGBFloat = function(Red,Green,Blue,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var Value = Math.round(Red * 255);
	color &= -16711681;
	color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	var Value1 = Math.round(Green * 255);
	color &= -65281;
	color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	var Value2 = Math.round(Blue * 255);
	color &= -256;
	color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
	var Value3 = Math.round(Alpha * 255);
	color &= 16777215;
	color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromCMYK = function(Cyan,Magenta,Yellow,Black,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var Value = Math.round((1 - Cyan) * (1 - Black) * 255);
	color &= -16711681;
	color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	var Value1 = Math.round((1 - Magenta) * (1 - Black) * 255);
	color &= -65281;
	color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	var Value2 = Math.round((1 - Yellow) * (1 - Black) * 255);
	color &= -256;
	color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
	var Value3 = Math.round(Alpha * 255);
	color &= 16777215;
	color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB = function(Hue,Saturation,Brightness,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var chroma = Brightness * Saturation;
	var match = Brightness - chroma;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 = Hue % 360;
	var hueD = Hue1 / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value = Math.round(Chroma * 255);
		color &= -16711681;
		color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		color &= -65281;
		color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(match * 255);
		color &= -256;
		color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		color &= -16711681;
		color |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		color &= -65281;
		color |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(match * 255);
		color &= -256;
		color |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(match * 255);
		color &= -16711681;
		color |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		color &= -65281;
		color |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		color &= -256;
		color |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(match * 255);
		color &= -16711681;
		color |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		color &= -65281;
		color |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		color &= -256;
		color |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		color &= -16711681;
		color |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(match * 255);
		color &= -65281;
		color |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		color &= -256;
		color |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		color &= -16711681;
		color |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(match * 255);
		color &= -65281;
		color |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		color &= -256;
		color |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSL = function(Hue,Saturation,Lightness,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var chroma = (1 - Math.abs(2 * Lightness - 1)) * Saturation;
	var match = Lightness - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 = Hue % 360;
	var hueD = Hue1 / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value = Math.round(Chroma * 255);
		color &= -16711681;
		color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		color &= -65281;
		color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(match * 255);
		color &= -256;
		color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		color &= -16711681;
		color |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		color &= -65281;
		color |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(match * 255);
		color &= -256;
		color |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(match * 255);
		color &= -16711681;
		color |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		color &= -65281;
		color |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		color &= -256;
		color |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(match * 255);
		color &= -16711681;
		color |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		color &= -65281;
		color |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		color &= -256;
		color |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		color &= -16711681;
		color |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(match * 255);
		color &= -65281;
		color |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		color &= -256;
		color |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		color &= -16711681;
		color |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(match * 255);
		color &= -65281;
		color |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		color &= -256;
		color |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		color &= 16777215;
		color |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.fromString = function(str) {
	var result = null;
	str = StringTools.trim(str);
	if(flixel_util__$FlxColor_FlxColor_$Impl_$.COLOR_REGEX.match(str)) {
		var hexColor = "0x" + flixel_util__$FlxColor_FlxColor_$Impl_$.COLOR_REGEX.matched(2);
		result = flixel_util__$FlxColor_FlxColor_$Impl_$._new(Std.parseInt(hexColor));
		if(hexColor.length == 8) {
			var Value = Math.round(255);
			result &= 16777215;
			result |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 24;
		}
	} else {
		str = str.toUpperCase();
		var key = flixel_util__$FlxColor_FlxColor_$Impl_$.colorLookup.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			if(key1.toUpperCase() == str) {
				var _this = flixel_util__$FlxColor_FlxColor_$Impl_$.colorLookup;
				result = flixel_util__$FlxColor_FlxColor_$Impl_$._new(__map_reserved[key1] != null ? _this.getReserved(key1) : _this.h[key1]);
				break;
			}
		}
	}
	return result;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getHSBColorWheel = function(Alpha) {
	if(Alpha == null) {
		Alpha = 255;
	}
	var _g = [];
	var _g1 = 0;
	while(_g1 < 360) _g.push(flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(_g1++,1.0,1.0,Alpha));
	return _g;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.interpolate = function(Color1,Color2,Factor) {
	if(Factor == null) {
		Factor = 0.5;
	}
	var r = ((Color2 >> 16 & 255) - (Color1 >> 16 & 255)) * Factor + (Color1 >> 16 & 255) | 0;
	var g = ((Color2 >> 8 & 255) - (Color1 >> 8 & 255)) * Factor + (Color1 >> 8 & 255) | 0;
	var b = ((Color2 & 255) - (Color1 & 255)) * Factor + (Color1 & 255) | 0;
	var a = ((Color2 >> 24 & 255) - (Color1 >> 24 & 255)) * Factor + (Color1 >> 24 & 255) | 0;
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (r > 255 ? 255 : r < 0 ? 0 : r) << 16;
	color &= -65281;
	color |= (g > 255 ? 255 : g < 0 ? 0 : g) << 8;
	color &= -256;
	color |= b > 255 ? 255 : b < 0 ? 0 : b;
	color &= 16777215;
	color |= (a > 255 ? 255 : a < 0 ? 0 : a) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.gradient = function(Color1,Color2,Steps,Ease) {
	var output = [];
	if(Ease == null) {
		Ease = function(t) {
			return t;
		};
	}
	var _g1 = 0;
	while(_g1 < Steps) {
		var step = _g1++;
		var Factor = Ease(step / (Steps - 1));
		var r = ((Color2 >> 16 & 255) - (Color1 >> 16 & 255)) * Factor + (Color1 >> 16 & 255) | 0;
		var g = ((Color2 >> 8 & 255) - (Color1 >> 8 & 255)) * Factor + (Color1 >> 8 & 255) | 0;
		var b = ((Color2 & 255) - (Color1 & 255)) * Factor + (Color1 & 255) | 0;
		var a = ((Color2 >> 24 & 255) - (Color1 >> 24 & 255)) * Factor + (Color1 >> 24 & 255) | 0;
		var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
		color &= -16711681;
		color |= (r > 255 ? 255 : r < 0 ? 0 : r) << 16;
		color &= -65281;
		color |= (g > 255 ? 255 : g < 0 ? 0 : g) << 8;
		color &= -256;
		color |= b > 255 ? 255 : b < 0 ? 0 : b;
		color &= 16777215;
		color |= (a > 255 ? 255 : a < 0 ? 0 : a) << 24;
		output[step] = color;
	}
	return output;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.multiply = function(lhs,rhs) {
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	var Value = Math.round((lhs >> 16 & 255) / 255 * ((rhs >> 16 & 255) / 255) * 255);
	color &= -16711681;
	color |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	var Value1 = Math.round((lhs >> 8 & 255) / 255 * ((rhs >> 8 & 255) / 255) * 255);
	color &= -65281;
	color |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	var Value2 = Math.round((lhs & 255) / 255 * ((rhs & 255) / 255) * 255);
	color &= -256;
	color |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
	var Value3 = Math.round(255);
	color &= 16777215;
	color |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.add = function(lhs,rhs) {
	var Red = (lhs >> 16 & 255) + (rhs >> 16 & 255);
	var Green = (lhs >> 8 & 255) + (rhs >> 8 & 255);
	var Blue = (lhs & 255) + (rhs & 255);
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	color &= -65281;
	color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	color &= -256;
	color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	color &= 16777215;
	color |= -16777216;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.subtract = function(lhs,rhs) {
	var Red = (lhs >> 16 & 255) - (rhs >> 16 & 255);
	var Green = (lhs >> 8 & 255) - (rhs >> 8 & 255);
	var Blue = (lhs & 255) - (rhs & 255);
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	color &= -65281;
	color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	color &= -256;
	color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	color &= 16777215;
	color |= -16777216;
	return color;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getComplementHarmony = function(this1) {
	return flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) + 180,0,350),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255);
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getAnalogousHarmony = function(this1,Threshold) {
	if(Threshold == null) {
		Threshold = 30;
	}
	return { original : this1, warmer : flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) - Threshold,0,350),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255), colder : flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) + Threshold,0,350),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255)};
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getSplitComplementHarmony = function(this1,Threshold) {
	if(Threshold == null) {
		Threshold = 30;
	}
	var oppositeHue = flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) + 180,0,350);
	return { original : this1, warmer : flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap(oppositeHue - Threshold,0,350),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255), colder : flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap(oppositeHue + Threshold,0,350),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255)};
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getTriadicHarmony = function(this1) {
	var triadic1 = flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1) | 0) + 120,0,359),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255);
	return { color1 : this1, color2 : triadic1, color3 : flixel_util__$FlxColor_FlxColor_$Impl_$.fromHSB(flixel_math_FlxMath.wrap((flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(triadic1) | 0) + 120,0,359),(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),(this1 >> 24 & 255) / 255)};
};
flixel_util__$FlxColor_FlxColor_$Impl_$.to24Bit = function(this1) {
	return this1 & 16777215;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.toHexString = function(this1,Alpha,Prefix) {
	if(Prefix == null) {
		Prefix = true;
	}
	if(Alpha == null) {
		Alpha = true;
	}
	var tmp = Alpha ? StringTools.hex(this1 >> 24 & 255,2) : "";
	return (Prefix ? "0x" : "") + tmp + StringTools.hex(this1 >> 16 & 255,2) + StringTools.hex(this1 >> 8 & 255,2) + StringTools.hex(this1 & 255,2);
};
flixel_util__$FlxColor_FlxColor_$Impl_$.toWebString = function(this1) {
	return "#" + ("" + StringTools.hex(this1 >> 16 & 255,2) + StringTools.hex(this1 >> 8 & 255,2) + StringTools.hex(this1 & 255,2));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getColorInfo = function(this1) {
	var result = "0x" + StringTools.hex(this1 >> 24 & 255,2) + StringTools.hex(this1 >> 16 & 255,2) + StringTools.hex(this1 >> 8 & 255,2) + StringTools.hex(this1 & 255,2) + "\n";
	result += "Alpha: " + (this1 >> 24 & 255) + " Red: " + (this1 >> 16 & 255) + " Green: " + (this1 >> 8 & 255) + " Blue: " + (this1 & 255) + "\n";
	result += "Hue: " + flixel_math_FlxMath.roundDecimal(flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1),2) + " Saturation: " + flixel_math_FlxMath.roundDecimal((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),2) + " Brightness: " + flixel_math_FlxMath.roundDecimal(Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)),2) + " Lightness: " + flixel_math_FlxMath.roundDecimal((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) + Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / 2,2);
	return result;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getDarkened = function(this1,Factor) {
	if(Factor == null) {
		Factor = 0.2;
	}
	var lowerBound = Factor < 0 ? 0 : Factor;
	if(lowerBound > 1) {
		Factor = 1;
	} else {
		Factor = lowerBound;
	}
	var output = this1;
	var Value = (Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)) + Math.min((output >> 16 & 255) / 255,Math.min((output >> 8 & 255) / 255,(output & 255) / 255))) / 2 * (1 - Factor);
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(output);
	var Alpha = (output >> 24 & 255) / 255;
	var chroma = (1 - Math.abs(2 * Value - 1)) * ((Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)) - Math.min((output >> 16 & 255) / 255,Math.min((output >> 8 & 255) / 255,(output & 255) / 255))) / Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)));
	var match = Value - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 = Hue % 360;
	var hueD = Hue1 / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		output &= -16711681;
		output |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		output &= -65281;
		output |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		output &= -256;
		output |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		output &= -16711681;
		output |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		output &= -65281;
		output |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		output &= -256;
		output |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		output &= -16711681;
		output |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		output &= -65281;
		output |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		output &= -256;
		output |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		output &= -16711681;
		output |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		output &= -65281;
		output |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		output &= -256;
		output |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		output &= -16711681;
		output |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		output &= -65281;
		output |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		output &= -256;
		output |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		output &= -16711681;
		output |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		output &= -65281;
		output |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		output &= -256;
		output |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return output;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getLightened = function(this1,Factor) {
	if(Factor == null) {
		Factor = 0.2;
	}
	var lowerBound = Factor < 0 ? 0 : Factor;
	if(lowerBound > 1) {
		Factor = 1;
	} else {
		Factor = lowerBound;
	}
	var output = this1;
	var Value = (Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)) + Math.min((output >> 16 & 255) / 255,Math.min((output >> 8 & 255) / 255,(output & 255) / 255))) / 2 + (1 - (Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) + Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / 2) * Factor;
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(output);
	var Alpha = (output >> 24 & 255) / 255;
	var chroma = (1 - Math.abs(2 * Value - 1)) * ((Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)) - Math.min((output >> 16 & 255) / 255,Math.min((output >> 8 & 255) / 255,(output & 255) / 255))) / Math.max((output >> 16 & 255) / 255,Math.max((output >> 8 & 255) / 255,(output & 255) / 255)));
	var match = Value - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 = Hue % 360;
	var hueD = Hue1 / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		output &= -16711681;
		output |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		output &= -65281;
		output |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		output &= -256;
		output |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		output &= -16711681;
		output |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		output &= -65281;
		output |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		output &= -256;
		output |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		output &= -16711681;
		output |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		output &= -65281;
		output |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		output &= -256;
		output |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		output &= -16711681;
		output |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		output &= -65281;
		output |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		output &= -256;
		output |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		output &= -16711681;
		output |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		output &= -65281;
		output |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		output &= -256;
		output |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		output &= -16711681;
		output |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		output &= -65281;
		output |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		output &= -256;
		output |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		output &= 16777215;
		output |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return output;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getInverted = function(this1) {
	var oldAlpha = this1 >> 24 & 255;
	var Red = 255 - (this1 >> 16 & 255);
	var Green = 255 - (this1 >> 8 & 255);
	var Blue = 255 - (this1 & 255);
	var color = flixel_util__$FlxColor_FlxColor_$Impl_$._new();
	color &= -16711681;
	color |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	color &= -65281;
	color |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	color &= -256;
	color |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	color &= 16777215;
	color |= -16777216;
	var output = color;
	output &= 16777215;
	output |= (oldAlpha > 255 ? 255 : oldAlpha < 0 ? 0 : oldAlpha) << 24;
	return output;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setRGB = function(this1,Red,Green,Blue,Alpha) {
	if(Alpha == null) {
		Alpha = 255;
	}
	this1 &= -16711681;
	this1 |= (Red > 255 ? 255 : Red < 0 ? 0 : Red) << 16;
	this1 &= -65281;
	this1 |= (Green > 255 ? 255 : Green < 0 ? 0 : Green) << 8;
	this1 &= -256;
	this1 |= Blue > 255 ? 255 : Blue < 0 ? 0 : Blue;
	this1 &= 16777215;
	this1 |= (Alpha > 255 ? 255 : Alpha < 0 ? 0 : Alpha) << 24;
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setRGBFloat = function(this1,Red,Green,Blue,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var Value = Math.round(Red * 255);
	this1 &= -16711681;
	this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	var Value1 = Math.round(Green * 255);
	this1 &= -65281;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	var Value2 = Math.round(Blue * 255);
	this1 &= -256;
	this1 |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
	var Value3 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setCMYK = function(this1,Cyan,Magenta,Yellow,Black,Alpha) {
	if(Alpha == null) {
		Alpha = 1;
	}
	var Value = Math.round((1 - Cyan) * (1 - Black) * 255);
	this1 &= -16711681;
	this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	var Value1 = Math.round((1 - Magenta) * (1 - Black) * 255);
	this1 &= -65281;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	var Value2 = Math.round((1 - Yellow) * (1 - Black) * 255);
	this1 &= -256;
	this1 |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
	var Value3 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setHSB = function(this1,Hue,Saturation,Brightness,Alpha) {
	var chroma = Brightness * Saturation;
	var match = Brightness - chroma;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 = Hue % 360;
	var hueD = Hue1 / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setHSL = function(this1,Hue,Saturation,Lightness,Alpha) {
	var chroma = (1 - Math.abs(2 * Lightness - 1)) * Saturation;
	var match = Lightness - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 = Hue % 360;
	var hueD = Hue1 / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.setHSChromaMatch = function(this1,Hue,Saturation,Chroma,Match,Alpha) {
	Hue %= 360;
	var hueD = Hue / 60;
	var mid = Chroma * (1 - Math.abs(hueD % 2 - 1)) + Match;
	Chroma += Match;
	switch(hueD | 0) {
	case 0:
		var Value = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
		var Value1 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
		var Value2 = Math.round(Match * 255);
		this1 &= -256;
		this1 |= Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2;
		var Value3 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3) << 24;
		break;
	case 1:
		var Value4 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 16;
		var Value5 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 8;
		var Value6 = Math.round(Match * 255);
		this1 &= -256;
		this1 |= Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6;
		var Value7 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7) << 24;
		break;
	case 2:
		var Value8 = Math.round(Match * 255);
		this1 &= -16711681;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 16;
		var Value9 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 8;
		var Value10 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10;
		var Value11 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11) << 24;
		break;
	case 3:
		var Value12 = Math.round(Match * 255);
		this1 &= -16711681;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 16;
		var Value13 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 8;
		var Value14 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14;
		var Value15 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15) << 24;
		break;
	case 4:
		var Value16 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 16;
		var Value17 = Math.round(Match * 255);
		this1 &= -65281;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 8;
		var Value18 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18;
		var Value19 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19) << 24;
		break;
	case 5:
		var Value20 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 16;
		var Value21 = Math.round(Match * 255);
		this1 &= -65281;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 8;
		var Value22 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22;
		var Value23 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23) << 24;
		break;
	}
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$._new = function(Value) {
	if(Value == null) {
		Value = 0;
	}
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.getThis = function(this1) {
	return this1;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.validate = function(this1) {
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_red = function(this1) {
	return this1 >> 16 & 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_green = function(this1) {
	return this1 >> 8 & 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_blue = function(this1) {
	return this1 & 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_alpha = function(this1) {
	return this1 >> 24 & 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_redFloat = function(this1) {
	return (this1 >> 16 & 255) / 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_greenFloat = function(this1) {
	return (this1 >> 8 & 255) / 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_blueFloat = function(this1) {
	return (this1 & 255) / 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_alphaFloat = function(this1) {
	return (this1 >> 24 & 255) / 255;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_red = function(this1,Value) {
	this1 &= -16711681;
	this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 16;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_green = function(this1,Value) {
	this1 &= -65281;
	this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 8;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_blue = function(this1,Value) {
	this1 &= -256;
	this1 |= Value > 255 ? 255 : Value < 0 ? 0 : Value;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_alpha = function(this1,Value) {
	this1 &= 16777215;
	this1 |= (Value > 255 ? 255 : Value < 0 ? 0 : Value) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_redFloat = function(this1,Value) {
	var Value1 = Math.round(Value * 255);
	this1 &= -16711681;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_greenFloat = function(this1,Value) {
	var Value1 = Math.round(Value * 255);
	this1 &= -65281;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 8;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_blueFloat = function(this1,Value) {
	var Value1 = Math.round(Value * 255);
	this1 &= -256;
	this1 |= Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_alphaFloat = function(this1,Value) {
	var Value1 = Math.round(Value * 255);
	this1 &= 16777215;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_cyan = function(this1) {
	return (1 - (this1 >> 16 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_magenta = function(this1) {
	return (1 - (this1 >> 8 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_yellow = function(this1) {
	return (1 - (this1 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_black = function(this1) {
	return 1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_cyan = function(this1,Value) {
	var Magenta = (1 - (this1 >> 8 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Yellow = (1 - (this1 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Black = 1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var Value1 = Math.round((1 - Value) * (1 - Black) * 255);
	this1 &= -16711681;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
	var Value2 = Math.round((1 - Magenta) * (1 - Black) * 255);
	this1 &= -65281;
	this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
	var Value3 = Math.round((1 - Yellow) * (1 - Black) * 255);
	this1 &= -256;
	this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
	var Value4 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_magenta = function(this1,Value) {
	var Yellow = (1 - (this1 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Black = 1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var Value1 = Math.round((1 - (1 - (this1 >> 16 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) * (1 - Black) * 255);
	this1 &= -16711681;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
	var Value2 = Math.round((1 - Value) * (1 - Black) * 255);
	this1 &= -65281;
	this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
	var Value3 = Math.round((1 - Yellow) * (1 - Black) * 255);
	this1 &= -256;
	this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
	var Value4 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_yellow = function(this1,Value) {
	var Magenta = (1 - (this1 >> 8 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Black = 1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var Value1 = Math.round((1 - (1 - (this1 >> 16 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) * (1 - Black) * 255);
	this1 &= -16711681;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
	var Value2 = Math.round((1 - Magenta) * (1 - Black) * 255);
	this1 &= -65281;
	this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
	var Value3 = Math.round((1 - Value) * (1 - Black) * 255);
	this1 &= -256;
	this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
	var Value4 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_black = function(this1,Value) {
	var Magenta = (1 - (this1 >> 8 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Yellow = (1 - (this1 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var Value1 = Math.round((1 - (1 - (this1 >> 16 & 255) / 255 - (1 - Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) * (1 - Value) * 255);
	this1 &= -16711681;
	this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
	var Value2 = Math.round((1 - Magenta) * (1 - Value) * 255);
	this1 &= -65281;
	this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
	var Value3 = Math.round((1 - Yellow) * (1 - Value) * 255);
	this1 &= -256;
	this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
	var Value4 = Math.round(Alpha * 255);
	this1 &= 16777215;
	this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue = function(this1) {
	var hue = 0;
	if(Math.atan2(Math.sqrt(3) * ((this1 >> 8 & 255) / 255 - (this1 & 255) / 255),2 * ((this1 >> 16 & 255) / 255) - (this1 >> 8 & 255) / 255 - (this1 & 255) / 255) != 0) {
		hue = 180 / Math.PI * Math.atan2(Math.sqrt(3) * ((this1 >> 8 & 255) / 255 - (this1 & 255) / 255),2 * ((this1 >> 16 & 255) / 255) - (this1 >> 8 & 255) / 255 - (this1 & 255) / 255);
	}
	if(hue < 0) {
		return hue + 360;
	} else {
		return hue;
	}
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_brightness = function(this1) {
	return Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_saturation = function(this1) {
	return (Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.get_lightness = function(this1) {
	return (Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) + Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / 2;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_hue = function(this1,Value) {
	var Brightness = Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var chroma = Brightness * ((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)));
	var match = Brightness - chroma;
	var Hue = Value;
	var Chroma = chroma;
	Hue = Value % 360;
	var hueD = Hue / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_saturation = function(this1,Value) {
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1);
	var Brightness = Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
	var Alpha = (this1 >> 24 & 255) / 255;
	var chroma = Brightness * Value;
	var match = Brightness - chroma;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 = Hue % 360;
	var hueD = Hue1 / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_brightness = function(this1,Value) {
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1);
	var Alpha = (this1 >> 24 & 255) / 255;
	var chroma = Value * ((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)));
	var match = Value - chroma;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 = Hue % 360;
	var hueD = Hue1 / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.set_lightness = function(this1,Value) {
	var Hue = flixel_util__$FlxColor_FlxColor_$Impl_$.get_hue(this1);
	var Alpha = (this1 >> 24 & 255) / 255;
	var chroma = (1 - Math.abs(2 * Value - 1)) * ((Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)) - Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255))) / Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255)));
	var match = Value - chroma / 2;
	var Hue1 = Hue;
	var Chroma = chroma;
	Hue1 = Hue % 360;
	var hueD = Hue1 / 60;
	var mid = chroma * (1 - Math.abs(hueD % 2 - 1)) + match;
	Chroma = chroma + match;
	switch(hueD | 0) {
	case 0:
		var Value1 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value1 > 255 ? 255 : Value1 < 0 ? 0 : Value1) << 16;
		var Value2 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value2 > 255 ? 255 : Value2 < 0 ? 0 : Value2) << 8;
		var Value3 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value3 > 255 ? 255 : Value3 < 0 ? 0 : Value3;
		var Value4 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value4 > 255 ? 255 : Value4 < 0 ? 0 : Value4) << 24;
		break;
	case 1:
		var Value5 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value5 > 255 ? 255 : Value5 < 0 ? 0 : Value5) << 16;
		var Value6 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value6 > 255 ? 255 : Value6 < 0 ? 0 : Value6) << 8;
		var Value7 = Math.round(match * 255);
		this1 &= -256;
		this1 |= Value7 > 255 ? 255 : Value7 < 0 ? 0 : Value7;
		var Value8 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value8 > 255 ? 255 : Value8 < 0 ? 0 : Value8) << 24;
		break;
	case 2:
		var Value9 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value9 > 255 ? 255 : Value9 < 0 ? 0 : Value9) << 16;
		var Value10 = Math.round(Chroma * 255);
		this1 &= -65281;
		this1 |= (Value10 > 255 ? 255 : Value10 < 0 ? 0 : Value10) << 8;
		var Value11 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value11 > 255 ? 255 : Value11 < 0 ? 0 : Value11;
		var Value12 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value12 > 255 ? 255 : Value12 < 0 ? 0 : Value12) << 24;
		break;
	case 3:
		var Value13 = Math.round(match * 255);
		this1 &= -16711681;
		this1 |= (Value13 > 255 ? 255 : Value13 < 0 ? 0 : Value13) << 16;
		var Value14 = Math.round(mid * 255);
		this1 &= -65281;
		this1 |= (Value14 > 255 ? 255 : Value14 < 0 ? 0 : Value14) << 8;
		var Value15 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value15 > 255 ? 255 : Value15 < 0 ? 0 : Value15;
		var Value16 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value16 > 255 ? 255 : Value16 < 0 ? 0 : Value16) << 24;
		break;
	case 4:
		var Value17 = Math.round(mid * 255);
		this1 &= -16711681;
		this1 |= (Value17 > 255 ? 255 : Value17 < 0 ? 0 : Value17) << 16;
		var Value18 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value18 > 255 ? 255 : Value18 < 0 ? 0 : Value18) << 8;
		var Value19 = Math.round(Chroma * 255);
		this1 &= -256;
		this1 |= Value19 > 255 ? 255 : Value19 < 0 ? 0 : Value19;
		var Value20 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value20 > 255 ? 255 : Value20 < 0 ? 0 : Value20) << 24;
		break;
	case 5:
		var Value21 = Math.round(Chroma * 255);
		this1 &= -16711681;
		this1 |= (Value21 > 255 ? 255 : Value21 < 0 ? 0 : Value21) << 16;
		var Value22 = Math.round(match * 255);
		this1 &= -65281;
		this1 |= (Value22 > 255 ? 255 : Value22 < 0 ? 0 : Value22) << 8;
		var Value23 = Math.round(mid * 255);
		this1 &= -256;
		this1 |= Value23 > 255 ? 255 : Value23 < 0 ? 0 : Value23;
		var Value24 = Math.round(Alpha * 255);
		this1 &= 16777215;
		this1 |= (Value24 > 255 ? 255 : Value24 < 0 ? 0 : Value24) << 24;
		break;
	}
	return Value;
};
flixel_util__$FlxColor_FlxColor_$Impl_$.maxColor = function(this1) {
	return Math.max((this1 >> 16 & 255) / 255,Math.max((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.minColor = function(this1) {
	return Math.min((this1 >> 16 & 255) / 255,Math.min((this1 >> 8 & 255) / 255,(this1 & 255) / 255));
};
flixel_util__$FlxColor_FlxColor_$Impl_$.boundChannel = function(this1,Value) {
	if(Value > 255) {
		return 255;
	} else if(Value < 0) {
		return 0;
	} else {
		return Value;
	}
};
var flixel_util_FlxColorTransformUtil = function() { };
$hxClasses["flixel.util.FlxColorTransformUtil"] = flixel_util_FlxColorTransformUtil;
flixel_util_FlxColorTransformUtil.__name__ = ["flixel","util","FlxColorTransformUtil"];
flixel_util_FlxColorTransformUtil.setMultipliers = function(transform,red,green,blue,alpha) {
	transform.redMultiplier = red;
	transform.greenMultiplier = green;
	transform.blueMultiplier = blue;
	transform.alphaMultiplier = alpha;
	return transform;
};
flixel_util_FlxColorTransformUtil.setOffsets = function(transform,red,green,blue,alpha) {
	transform.redOffset = red;
	transform.greenOffset = green;
	transform.blueOffset = blue;
	transform.alphaOffset = alpha;
	return transform;
};
flixel_util_FlxColorTransformUtil.hasRGBMultipliers = function(transform) {
	if(!(transform.redMultiplier != 1 || transform.greenMultiplier != 1)) {
		return transform.blueMultiplier != 1;
	} else {
		return true;
	}
};
flixel_util_FlxColorTransformUtil.hasRGBAMultipliers = function(transform) {
	if(!flixel_util_FlxColorTransformUtil.hasRGBMultipliers(transform)) {
		return transform.alphaMultiplier != 1;
	} else {
		return true;
	}
};
flixel_util_FlxColorTransformUtil.hasRGBOffsets = function(transform) {
	if(!(transform.redOffset != 0 || transform.greenOffset != 0)) {
		return transform.blueOffset != 0;
	} else {
		return true;
	}
};
flixel_util_FlxColorTransformUtil.hasRGBAOffsets = function(transform) {
	if(!flixel_util_FlxColorTransformUtil.hasRGBOffsets(transform)) {
		return transform.alphaOffset != 0;
	} else {
		return true;
	}
};
var flixel_util_FlxDestroyUtil = function() { };
$hxClasses["flixel.util.FlxDestroyUtil"] = flixel_util_FlxDestroyUtil;
flixel_util_FlxDestroyUtil.__name__ = ["flixel","util","FlxDestroyUtil"];
flixel_util_FlxDestroyUtil.destroy = function(object) {
	if(object != null) {
		object.destroy();
	}
	return null;
};
flixel_util_FlxDestroyUtil.destroyArray = function(array) {
	if(array != null) {
		var _g = 0;
		while(_g < array.length) {
			var e = array[_g];
			++_g;
			flixel_util_FlxDestroyUtil.destroy(e);
		}
		array.splice(0,array.length);
	}
	return null;
};
flixel_util_FlxDestroyUtil.put = function(object) {
	if(object != null) {
		object.put();
	}
	return null;
};
flixel_util_FlxDestroyUtil.putArray = function(array) {
	if(array != null) {
		var _g = 0;
		while(_g < array.length) {
			var e = array[_g];
			++_g;
			flixel_util_FlxDestroyUtil.put(e);
		}
		array.splice(0,array.length);
	}
	return null;
};
flixel_util_FlxDestroyUtil.dispose = function(bitmapData) {
	if(bitmapData != null) {
		bitmapData.dispose();
	}
	return null;
};
flixel_util_FlxDestroyUtil.disposeIfNotEqual = function(bitmapData,width,height) {
	if(bitmapData != null && (bitmapData.width != width || bitmapData.height != height)) {
		bitmapData.dispose();
		return null;
	} else if(bitmapData != null) {
		return bitmapData;
	}
	return null;
};
flixel_util_FlxDestroyUtil.removeChild = function(parent,child) {
	if(parent != null && child != null && parent.contains(child)) {
		parent.removeChild(child);
	}
	return null;
};
var flixel_util_FlxGradient = function() { };
$hxClasses["flixel.util.FlxGradient"] = flixel_util_FlxGradient;
flixel_util_FlxGradient.__name__ = ["flixel","util","FlxGradient"];
flixel_util_FlxGradient.createGradientMatrix = function(width,height,colors,chunkSize,rotation) {
	if(rotation == null) {
		rotation = 90;
	}
	if(chunkSize == null) {
		chunkSize = 1;
	}
	var gradientMatrix = new openfl_geom_Matrix();
	gradientMatrix.createGradientBox(width,_$UInt_UInt_$Impl_$.toFloat(height) / _$UInt_UInt_$Impl_$.toFloat(chunkSize),rotation * (Math.PI / 180),0,0);
	var alpha = [];
	var _g1 = 0;
	var _g = colors.length;
	while(_g1 < _g) alpha.push((colors[_g1++] >> 24 & 255) / 255);
	var ratio = [];
	if(colors.length == 2) {
		ratio[0] = 0;
		ratio[1] = 255;
	} else {
		var spread = 255 / (colors.length - 1) | 0;
		ratio.push(0);
		var _g11 = 1;
		var _g2 = colors.length - 1;
		while(_g11 < _g2) ratio.push(_g11++ * spread);
		ratio.push(255);
	}
	return { matrix : gradientMatrix, alpha : alpha, ratio : ratio};
};
flixel_util_FlxGradient.createGradientArray = function(width,height,colors,chunkSize,rotation,interpolate) {
	if(interpolate == null) {
		interpolate = true;
	}
	if(rotation == null) {
		rotation = 90;
	}
	if(chunkSize == null) {
		chunkSize = 1;
	}
	var data = flixel_util_FlxGradient.createGradientBitmapData(width,height,colors,chunkSize,rotation,interpolate);
	var result = [];
	var _g1 = 0;
	var _g = data.height;
	while(_g1 < _g) result.push(data.getPixel32(0,_g1++));
	return result;
};
flixel_util_FlxGradient.createGradientFlxSprite = function(width,height,colors,chunkSize,rotation,interpolate) {
	if(interpolate == null) {
		interpolate = true;
	}
	if(rotation == null) {
		rotation = 90;
	}
	if(chunkSize == null) {
		chunkSize = 1;
	}
	var data = flixel_util_FlxGradient.createGradientBitmapData(width,height,colors,chunkSize,rotation,interpolate);
	var dest = new flixel_FlxSprite();
	dest.set_pixels(data);
	return dest;
};
flixel_util_FlxGradient.createGradientBitmapData = function(width,height,colors,chunkSize,rotation,interpolate) {
	if(interpolate == null) {
		interpolate = true;
	}
	if(rotation == null) {
		rotation = 90;
	}
	if(chunkSize == null) {
		chunkSize = 1;
	}
	if(_$UInt_UInt_$Impl_$.gt(1,width)) {
		width = 1;
	}
	if(_$UInt_UInt_$Impl_$.gt(1,height)) {
		height = 1;
	}
	var gradient = flixel_util_FlxGradient.createGradientMatrix(width,height,colors,chunkSize,rotation);
	var shape = new openfl_display_Shape();
	shape.get_graphics().beginGradientFill(0,colors,gradient.alpha,gradient.ratio,gradient.matrix,0,interpolate ? 1 : 0,0);
	shape.get_graphics().drawRect(0,0,_$UInt_UInt_$Impl_$.toFloat(width),_$UInt_UInt_$Impl_$.toFloat(height) / _$UInt_UInt_$Impl_$.toFloat(chunkSize));
	var data = new openfl_display_BitmapData(width,height,true,0);
	if(chunkSize == 1) {
		data.draw(shape);
	} else {
		var tempBitmap = new openfl_display_Bitmap(new openfl_display_BitmapData(width,_$UInt_UInt_$Impl_$.toFloat(height) / _$UInt_UInt_$Impl_$.toFloat(chunkSize) | 0,true,0));
		tempBitmap.bitmapData.draw(shape);
		tempBitmap.set_scaleY(_$UInt_UInt_$Impl_$.toFloat(chunkSize));
		var sM = new openfl_geom_Matrix();
		sM.scale(tempBitmap.get_scaleX(),tempBitmap.get_scaleY());
		data.draw(tempBitmap,sM);
	}
	return data;
};
flixel_util_FlxGradient.overlayGradientOnFlxSprite = function(dest,width,height,colors,destX,destY,chunkSize,rotation,interpolate) {
	if(interpolate == null) {
		interpolate = true;
	}
	if(rotation == null) {
		rotation = 90;
	}
	if(chunkSize == null) {
		chunkSize = 1;
	}
	if(destY == null) {
		destY = 0;
	}
	if(destX == null) {
		destX = 0;
	}
	if(width > dest.get_width()) {
		width = dest.get_width() | 0;
	}
	if(height > dest.get_height()) {
		height = dest.get_height() | 0;
	}
	var source = flixel_util_FlxGradient.createGradientFlxSprite(width,height,colors,chunkSize,rotation,interpolate);
	dest.stamp(source,destX,destY);
	source.destroy();
	return dest;
};
flixel_util_FlxGradient.overlayGradientOnBitmapData = function(dest,width,height,colors,destX,destY,chunkSize,rotation,interpolate) {
	if(interpolate == null) {
		interpolate = true;
	}
	if(rotation == null) {
		rotation = 90;
	}
	if(chunkSize == null) {
		chunkSize = 1;
	}
	if(destY == null) {
		destY = 0;
	}
	if(destX == null) {
		destX = 0;
	}
	if(width > dest.width) {
		width = dest.width;
	}
	if(height > dest.height) {
		height = dest.height;
	}
	var source = flixel_util_FlxGradient.createGradientBitmapData(width,height,colors,chunkSize,rotation,interpolate);
	dest.copyPixels(source,new openfl_geom_Rectangle(0,0,source.width,source.height),new openfl_geom_Point(destX,destY),null,null,true);
	source.dispose();
	return dest;
};
var flixel_util_FlxHorizontalAlign = $hxClasses["flixel.util.FlxHorizontalAlign"] = { __ename__ : ["flixel","util","FlxHorizontalAlign"], __constructs__ : ["LEFT","CENTER","RIGHT"] };
flixel_util_FlxHorizontalAlign.LEFT = ["LEFT",0];
flixel_util_FlxHorizontalAlign.LEFT.toString = $estr;
flixel_util_FlxHorizontalAlign.LEFT.__enum__ = flixel_util_FlxHorizontalAlign;
flixel_util_FlxHorizontalAlign.CENTER = ["CENTER",1];
flixel_util_FlxHorizontalAlign.CENTER.toString = $estr;
flixel_util_FlxHorizontalAlign.CENTER.__enum__ = flixel_util_FlxHorizontalAlign;
flixel_util_FlxHorizontalAlign.RIGHT = ["RIGHT",2];
flixel_util_FlxHorizontalAlign.RIGHT.toString = $estr;
flixel_util_FlxHorizontalAlign.RIGHT.__enum__ = flixel_util_FlxHorizontalAlign;
var flixel_util_FlxPath = function(Nodes) {
	this._firstUpdate = false;
	this._wasObjectImmovable = null;
	this._autoRotate = false;
	this._inc = 1;
	this.finished = false;
	this.nodeIndex = 0;
	this.active = false;
	this.autoCenter = true;
	this.angle = 0;
	this.speed = 0;
	if(Nodes != null) {
		this._nodes = Nodes.slice();
	} else {
		this._nodes = [];
	}
};
$hxClasses["flixel.util.FlxPath"] = flixel_util_FlxPath;
flixel_util_FlxPath.__name__ = ["flixel","util","FlxPath"];
flixel_util_FlxPath.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_FlxPath.prototype = {
	reset: function() {
		this.autoCenter = true;
		return this;
	}
	,setProperties: function(Speed,Mode,AutoRotate) {
		if(AutoRotate == null) {
			AutoRotate = false;
		}
		if(Mode == null) {
			Mode = 0;
		}
		if(Speed == null) {
			Speed = 100;
		}
		this.speed = Math.abs(Speed);
		this._mode = Mode;
		this._autoRotate = AutoRotate;
		return this;
	}
	,start: function(Nodes,Speed,Mode,AutoRotate,NodesAsReference) {
		if(NodesAsReference == null) {
			NodesAsReference = false;
		}
		if(AutoRotate == null) {
			AutoRotate = false;
		}
		if(Mode == null) {
			Mode = 0;
		}
		if(Speed == null) {
			Speed = 100;
		}
		if(Nodes != null) {
			if(NodesAsReference) {
				this._nodes = Nodes;
			} else {
				this._nodes = Nodes.slice();
			}
		}
		this.setProperties(Speed,Mode,AutoRotate);
		if(this._nodes.length > 0) {
			this.restart();
		}
		return this;
	}
	,restart: function() {
		this.finished = false;
		this._firstUpdate = true;
		this.active = this._nodes.length > 0;
		if(!this.active) {
			return this;
		}
		if(this._mode == 1 || this._mode == 256) {
			this.nodeIndex = this._nodes.length - 1;
			this._inc = -1;
		} else {
			this.nodeIndex = 0;
			this._inc = 1;
		}
		return this;
	}
	,setNode: function(NodeIndex) {
		if(NodeIndex < 0) {
			NodeIndex = 0;
		} else if(NodeIndex > this._nodes.length - 1) {
			NodeIndex = this._nodes.length - 1;
		}
		this.nodeIndex = NodeIndex;
		this.advancePath();
		return this;
	}
	,update: function(elapsed) {
		if(this.object == null) {
			return;
		}
		if(this._firstUpdate) {
			this._wasObjectImmovable = this.object.immovable;
			this.object.set_immovable(true);
			this._firstUpdate = false;
		}
		flixel_util_FlxPath._point.set_x(this.object.x);
		flixel_util_FlxPath._point.set_y(this.object.y);
		if(this.autoCenter) {
			var _this = flixel_util_FlxPath._point;
			var X = this.object.get_width() * 0.5;
			var Y = this.object.get_height() * 0.5;
			_this.set_x(_this.x + X);
			_this.set_y(_this.y + Y);
		}
		var node = this._nodes[this.nodeIndex];
		var deltaX = node.x - flixel_util_FlxPath._point.x;
		var deltaY = node.y - flixel_util_FlxPath._point.y;
		var horizontalOnly = (this._mode & 65536) > 0;
		var verticalOnly = (this._mode & 1048576) > 0;
		if(horizontalOnly) {
			if((deltaX > 0 ? deltaX : -deltaX) < this.speed * elapsed) {
				node = this.advancePath();
			}
		} else if(verticalOnly) {
			if((deltaY > 0 ? deltaY : -deltaY) < this.speed * elapsed) {
				node = this.advancePath();
			}
		} else if(Math.sqrt(deltaX * deltaX + deltaY * deltaY) < this.speed * elapsed) {
			node = this.advancePath();
		}
		if(this.object != null && this.speed != 0) {
			flixel_util_FlxPath._point.set_x(this.object.x);
			flixel_util_FlxPath._point.set_y(this.object.y);
			if(this.autoCenter) {
				var _this1 = flixel_util_FlxPath._point;
				var X1 = this.object.get_width() * 0.5;
				var Y1 = this.object.get_height() * 0.5;
				_this1.set_x(_this1.x + X1);
				_this1.set_y(_this1.y + Y1);
			}
			var _this2 = flixel_util_FlxPath._point;
			var result = Math.abs(_this2.x - node.x) <= 0.0000001 && Math.abs(_this2.y - node.y) <= 0.0000001;
			if(node._weak) {
				node.put();
			}
			if(!result) {
				this.calculateVelocity(node,horizontalOnly,verticalOnly);
			} else {
				this.object.velocity.set();
			}
			if(this._autoRotate) {
				this.object.angularVelocity = 0;
				this.object.angularAcceleration = 0;
				this.object.set_angle(this.angle);
			}
			if(this.finished) {
				this.cancel();
			}
		}
	}
	,calculateVelocity: function(node,horizontalOnly,verticalOnly) {
		if(horizontalOnly || flixel_util_FlxPath._point.y == node.y) {
			this.object.velocity.set_x(flixel_util_FlxPath._point.x < node.x ? this.speed : -this.speed);
			this.angle = this.object.velocity.x < 0 ? -90 : 90;
			if(!horizontalOnly) {
				this.object.velocity.set_y(0);
			}
		} else if(verticalOnly || flixel_util_FlxPath._point.x == node.x) {
			this.object.velocity.set_y(flixel_util_FlxPath._point.y < node.y ? this.speed : -this.speed);
			this.angle = this.object.velocity.y < 0 ? 0 : 180;
			if(!verticalOnly) {
				this.object.velocity.set_x(0);
			}
		} else {
			this.object.velocity.set_x(flixel_util_FlxPath._point.x < node.x ? this.speed : -this.speed);
			this.object.velocity.set_y(flixel_util_FlxPath._point.y < node.y ? this.speed : -this.speed);
			this.angle = flixel_util_FlxPath._point.angleBetween(node);
			this.object.velocity.set(0,-this.speed);
			var tmp = this.object.velocity;
			var point = flixel_math_FlxPoint._pool.get().set(0,0);
			point._inPool = false;
			point._weak = true;
			tmp.rotate(point,this.angle);
		}
	}
	,advancePath: function(Snap) {
		if(Snap == null) {
			Snap = true;
		}
		if(Snap) {
			var oldNode = this._nodes[this.nodeIndex];
			if(oldNode != null) {
				if((this._mode & 1048576) == 0) {
					this.object.set_x(oldNode.x);
					if(this.autoCenter) {
						var _g = this.object;
						_g.set_x(_g.x - this.object.get_width() * 0.5);
					}
				}
				if((this._mode & 65536) == 0) {
					this.object.set_y(oldNode.y);
					if(this.autoCenter) {
						var _g1 = this.object;
						_g1.set_y(_g1.y - this.object.get_height() * 0.5);
					}
				}
			}
		}
		var callComplete = false;
		this.nodeIndex += this._inc;
		if((this._mode & 1) > 0) {
			if(this.nodeIndex < 0) {
				this.nodeIndex = 0;
				callComplete = true;
				this.onEnd();
			}
		} else if((this._mode & 16) > 0) {
			if(this.nodeIndex >= this._nodes.length) {
				callComplete = true;
				this.nodeIndex = 0;
			}
		} else if((this._mode & 256) > 0) {
			if(this.nodeIndex < 0) {
				this.nodeIndex = this._nodes.length - 1;
				callComplete = true;
				if(this.nodeIndex < 0) {
					this.nodeIndex = 0;
				}
			}
		} else if((this._mode & 4096) > 0) {
			if(this._inc > 0) {
				if(this.nodeIndex >= this._nodes.length) {
					this.nodeIndex = this._nodes.length - 2;
					callComplete = true;
					if(this.nodeIndex < 0) {
						this.nodeIndex = 0;
					}
					this._inc = -this._inc;
				}
			} else if(this.nodeIndex < 0) {
				this.nodeIndex = 1;
				callComplete = true;
				if(this.nodeIndex >= this._nodes.length) {
					this.nodeIndex = this._nodes.length - 1;
				}
				if(this.nodeIndex < 0) {
					this.nodeIndex = 0;
				}
				this._inc = -this._inc;
			}
		} else if(this.nodeIndex >= this._nodes.length) {
			this.nodeIndex = this._nodes.length - 1;
			callComplete = true;
			this.onEnd();
		}
		if(callComplete && this.onComplete != null) {
			this.onComplete(this);
		}
		return this._nodes[this.nodeIndex];
	}
	,cancel: function() {
		this.onEnd();
		if(this.object != null) {
			this.object.velocity.set(0,0);
		}
		return this;
	}
	,onEnd: function() {
		this.finished = true;
		this.active = false;
		if(this._wasObjectImmovable != null) {
			this.object.set_immovable(this._wasObjectImmovable);
		}
		this._wasObjectImmovable = null;
	}
	,destroy: function() {
		flixel_util_FlxDestroyUtil.putArray(this._nodes);
		this._nodes = null;
		this.object = null;
		this.onComplete = null;
	}
	,add: function(X,Y) {
		var tmp = this._nodes;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		tmp.push(point);
		return this;
	}
	,addAt: function(X,Y,Index) {
		if(Index < 0) {
			return this;
		}
		var _this = this._nodes;
		var point = flixel_math_FlxPoint._pool.get().set(X,Y);
		point._inPool = false;
		_this.splice(Index,0,point);
		return this;
	}
	,addPoint: function(Node,AsReference) {
		if(AsReference == null) {
			AsReference = false;
		}
		if(AsReference) {
			this._nodes.push(Node);
		} else {
			var tmp = this._nodes;
			var X = Node.x;
			var Y = Node.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			tmp.push(point);
		}
		return this;
	}
	,addPointAt: function(Node,Index,AsReference) {
		if(AsReference == null) {
			AsReference = false;
		}
		if(Index < 0) {
			return this;
		}
		if(AsReference) {
			this._nodes.splice(Index,0,Node);
		} else {
			var _this = this._nodes;
			var X = Node.x;
			var Y = Node.y;
			var point = flixel_math_FlxPoint._pool.get().set(X,Y);
			point._inPool = false;
			_this.splice(Index,0,point);
		}
		return this;
	}
	,remove: function(Node) {
		var index = this._nodes.indexOf(Node);
		if(index >= 0) {
			return this._nodes.splice(index,1)[0];
		}
		return null;
	}
	,removeAt: function(Index) {
		if(this._nodes.length <= 0) {
			return null;
		}
		if(Index >= this._nodes.length - 1) {
			this._nodes.pop();
		}
		return this._nodes.splice(Index,1)[0];
	}
	,head: function() {
		if(this._nodes.length > 0) {
			return this._nodes[0];
		}
		return null;
	}
	,tail: function() {
		if(this._nodes.length > 0) {
			return this._nodes[this._nodes.length - 1];
		}
		return null;
	}
	,get_nodes: function() {
		return this._nodes;
	}
	,set_nodes: function(Nodes) {
		if(Nodes != null) {
			this._nodes = Nodes;
		}
		return this._nodes;
	}
	,__class__: flixel_util_FlxPath
	,__properties__: {set_nodes:"set_nodes",get_nodes:"get_nodes"}
};
var flixel_util_FlxPool = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool"] = flixel_util_FlxPool;
flixel_util_FlxPool.__name__ = ["flixel","util","FlxPool"];
flixel_util_FlxPool.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool
	,__properties__: {get_length:"get_length"}
};
var flixel_util_FlxPool_$flixel_$util_$LabelValuePair = function(classObj) {
	this._count = 0;
	this._pool = [];
	this._class = classObj;
};
$hxClasses["flixel.util.FlxPool_flixel_util_LabelValuePair"] = flixel_util_FlxPool_$flixel_$util_$LabelValuePair;
flixel_util_FlxPool_$flixel_$util_$LabelValuePair.__name__ = ["flixel","util","FlxPool_flixel_util_LabelValuePair"];
flixel_util_FlxPool_$flixel_$util_$LabelValuePair.__interfaces__ = [flixel_util_IFlxPool];
flixel_util_FlxPool_$flixel_$util_$LabelValuePair.prototype = {
	get: function() {
		if(this._count == 0) {
			return Type.createInstance(this._class,[]);
		}
		return this._pool[--this._count];
	}
	,put: function(obj) {
		if(obj != null) {
			var i = this._pool.indexOf(obj);
			if(i == -1 || i >= this._count) {
				obj.destroy();
				this._pool[this._count++] = obj;
			}
		}
	}
	,putUnsafe: function(obj) {
		if(obj != null) {
			obj.destroy();
			this._pool[this._count++] = obj;
		}
	}
	,preAllocate: function(numObjects) {
		while(numObjects-- > 0) this._pool[this._count++] = Type.createInstance(this._class,[]);
	}
	,clear: function() {
		this._count = 0;
		var oldPool = this._pool;
		this._pool = [];
		return oldPool;
	}
	,get_length: function() {
		return this._count;
	}
	,__class__: flixel_util_FlxPool_$flixel_$util_$LabelValuePair
	,__properties__: {get_length:"get_length"}
};
var flixel_util_FlxSaveStatus = $hxClasses["flixel.util.FlxSaveStatus"] = { __ename__ : ["flixel","util","FlxSaveStatus"], __constructs__ : ["SUCCESS","PENDING","ERROR"] };
flixel_util_FlxSaveStatus.SUCCESS = ["SUCCESS",0];
flixel_util_FlxSaveStatus.SUCCESS.toString = $estr;
flixel_util_FlxSaveStatus.SUCCESS.__enum__ = flixel_util_FlxSaveStatus;
flixel_util_FlxSaveStatus.PENDING = ["PENDING",1];
flixel_util_FlxSaveStatus.PENDING.toString = $estr;
flixel_util_FlxSaveStatus.PENDING.__enum__ = flixel_util_FlxSaveStatus;
flixel_util_FlxSaveStatus.ERROR = ["ERROR",2];
flixel_util_FlxSaveStatus.ERROR.toString = $estr;
flixel_util_FlxSaveStatus.ERROR.__enum__ = flixel_util_FlxSaveStatus;
var flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$ = {};
$hxClasses["flixel.util._FlxSignal.FlxTypedSignal_Impl_"] = flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$;
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.__name__ = ["flixel","util","_FlxSignal","FlxTypedSignal_Impl_"];
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.__properties__ = {get_dispatch:"get_dispatch"}
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.add = function(this1,listener) {
	this1.add(listener);
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.addOnce = function(this1,listener) {
	this1.addOnce(listener);
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.remove = function(this1,listener) {
	this1.remove(listener);
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.has = function(this1,listener) {
	return this1.has(listener);
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.removeAll = function(this1) {
	this1.removeAll();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.get_dispatch = function(this1) {
	return this1.dispatch;
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal0 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal0();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal1 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal1();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal2 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal2();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal3 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal3();
};
flixel_util__$FlxSignal_FlxTypedSignal_$Impl_$.toSignal4 = function(signal) {
	return new flixel_util__$FlxSignal_FlxSignal4();
};
var flixel_util__$FlxSignal_FlxSignalHandler = function(listener,dispatchOnce) {
	this.dispatchOnce = false;
	this.listener = listener;
	this.dispatchOnce = dispatchOnce;
};
$hxClasses["flixel.util._FlxSignal.FlxSignalHandler"] = flixel_util__$FlxSignal_FlxSignalHandler;
flixel_util__$FlxSignal_FlxSignalHandler.__name__ = ["flixel","util","_FlxSignal","FlxSignalHandler"];
flixel_util__$FlxSignal_FlxSignalHandler.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util__$FlxSignal_FlxSignalHandler.prototype = {
	destroy: function() {
		this.listener = null;
	}
	,__class__: flixel_util__$FlxSignal_FlxSignalHandler
};
var flixel_util_IFlxSignal = function() { };
$hxClasses["flixel.util.IFlxSignal"] = flixel_util_IFlxSignal;
flixel_util_IFlxSignal.__name__ = ["flixel","util","IFlxSignal"];
flixel_util_IFlxSignal.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_IFlxSignal.prototype = {
	__class__: flixel_util_IFlxSignal
};
var flixel_util__$FlxSignal_FlxBaseSignal = function() {
	this.processingListeners = false;
	this.handlers = [];
	this.pendingRemove = [];
};
$hxClasses["flixel.util._FlxSignal.FlxBaseSignal"] = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxBaseSignal.__name__ = ["flixel","util","_FlxSignal","FlxBaseSignal"];
flixel_util__$FlxSignal_FlxBaseSignal.__interfaces__ = [flixel_util_IFlxSignal];
flixel_util__$FlxSignal_FlxBaseSignal.prototype = {
	add: function(listener) {
		if(listener != null) {
			this.registerListener(listener,false);
		}
	}
	,addOnce: function(listener) {
		if(listener != null) {
			this.registerListener(listener,true);
		}
	}
	,remove: function(listener) {
		if(listener != null) {
			var handler = this.getHandler(listener);
			if(handler != null) {
				if(this.processingListeners) {
					this.pendingRemove.push(handler);
				} else {
					HxOverrides.remove(this.handlers,handler);
					handler.destroy();
				}
			}
		}
	}
	,has: function(listener) {
		if(listener == null) {
			return false;
		}
		return this.getHandler(listener) != null;
	}
	,removeAll: function() {
		flixel_util_FlxDestroyUtil.destroyArray(this.handlers);
	}
	,destroy: function() {
		flixel_util_FlxDestroyUtil.destroyArray(this.handlers);
		this.handlers = null;
		this.pendingRemove = null;
	}
	,registerListener: function(listener,dispatchOnce) {
		var handler = this.getHandler(listener);
		if(handler == null) {
			handler = new flixel_util__$FlxSignal_FlxSignalHandler(listener,dispatchOnce);
			this.handlers.push(handler);
			return handler;
		} else if(handler.dispatchOnce != dispatchOnce) {
			throw new js__$Boot_HaxeError("You cannot addOnce() then add() the same listener without removing the relationship first.");
		} else {
			return handler;
		}
	}
	,getHandler: function(listener) {
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			if(handler.listener == listener) {
				return handler;
			}
		}
		return null;
	}
	,__class__: flixel_util__$FlxSignal_FlxBaseSignal
};
var flixel_util__$FlxSignal_FlxSignal0 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch0);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal0"] = flixel_util__$FlxSignal_FlxSignal0;
flixel_util__$FlxSignal_FlxSignal0.__name__ = ["flixel","util","_FlxSignal","FlxSignal0"];
flixel_util__$FlxSignal_FlxSignal0.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal0.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch0: function() {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener();
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal0
});
var flixel_util__$FlxSignal_FlxSignal1 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch1);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal1"] = flixel_util__$FlxSignal_FlxSignal1;
flixel_util__$FlxSignal_FlxSignal1.__name__ = ["flixel","util","_FlxSignal","FlxSignal1"];
flixel_util__$FlxSignal_FlxSignal1.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal1.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch1: function(value1) {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener(value1);
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal1
});
var flixel_util__$FlxSignal_FlxSignal2 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch2);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal2"] = flixel_util__$FlxSignal_FlxSignal2;
flixel_util__$FlxSignal_FlxSignal2.__name__ = ["flixel","util","_FlxSignal","FlxSignal2"];
flixel_util__$FlxSignal_FlxSignal2.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal2.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch2: function(value1,value2) {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener(value1,value2);
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal2
});
var flixel_util__$FlxSignal_FlxSignal3 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch3);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal3"] = flixel_util__$FlxSignal_FlxSignal3;
flixel_util__$FlxSignal_FlxSignal3.__name__ = ["flixel","util","_FlxSignal","FlxSignal3"];
flixel_util__$FlxSignal_FlxSignal3.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal3.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch3: function(value1,value2,value3) {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener(value1,value2,value3);
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal3
});
var flixel_util__$FlxSignal_FlxSignal4 = function() {
	flixel_util__$FlxSignal_FlxBaseSignal.call(this);
	this.dispatch = $bind(this,this.dispatch4);
};
$hxClasses["flixel.util._FlxSignal.FlxSignal4"] = flixel_util__$FlxSignal_FlxSignal4;
flixel_util__$FlxSignal_FlxSignal4.__name__ = ["flixel","util","_FlxSignal","FlxSignal4"];
flixel_util__$FlxSignal_FlxSignal4.__super__ = flixel_util__$FlxSignal_FlxBaseSignal;
flixel_util__$FlxSignal_FlxSignal4.prototype = $extend(flixel_util__$FlxSignal_FlxBaseSignal.prototype,{
	dispatch4: function(value1,value2,value3,value4) {
		this.processingListeners = true;
		var _g = 0;
		var _g1 = this.handlers;
		while(_g < _g1.length) {
			var handler = _g1[_g];
			++_g;
			handler.listener(value1,value2,value3,value4);
			if(handler.dispatchOnce) {
				this.remove(handler.listener);
			}
		}
		this.processingListeners = false;
		var _g2 = 0;
		var _g11 = this.pendingRemove;
		while(_g2 < _g11.length) {
			var handler1 = _g11[_g2];
			++_g2;
			this.remove(handler1.listener);
		}
		if(this.pendingRemove.length > 0) {
			this.pendingRemove = [];
		}
	}
	,__class__: flixel_util__$FlxSignal_FlxSignal4
});
var flixel_util__$FlxSignal_Macro = function() { };
$hxClasses["flixel.util._FlxSignal.Macro"] = flixel_util__$FlxSignal_Macro;
flixel_util__$FlxSignal_Macro.__name__ = ["flixel","util","_FlxSignal","Macro"];
var flixel_util_FlxSort = function() { };
$hxClasses["flixel.util.FlxSort"] = flixel_util_FlxSort;
flixel_util_FlxSort.__name__ = ["flixel","util","FlxSort"];
flixel_util_FlxSort.byY = function(Order,Obj1,Obj2) {
	var Value1 = Obj1.y;
	var Value2 = Obj2.y;
	var result = 0;
	if(Value1 < Value2) {
		result = Order;
	} else if(Value1 > Value2) {
		result = -Order;
	}
	return result;
};
flixel_util_FlxSort.byValues = function(Order,Value1,Value2) {
	var result = 0;
	if(Value1 < Value2) {
		result = Order;
	} else if(Value1 > Value2) {
		result = -Order;
	}
	return result;
};
var flixel_util_FlxSpriteUtil = function() { };
$hxClasses["flixel.util.FlxSpriteUtil"] = flixel_util_FlxSpriteUtil;
flixel_util_FlxSpriteUtil.__name__ = ["flixel","util","FlxSpriteUtil"];
flixel_util_FlxSpriteUtil.alphaMask = function(output,source,mask) {
	var data = flixel_system_FlxAssets.resolveBitmapData(source);
	var maskData = flixel_system_FlxAssets.resolveBitmapData(mask);
	if(data == null || maskData == null) {
		return null;
	}
	data = data.clone();
	data.copyChannel(maskData,new openfl_geom_Rectangle(0,0,data.width,data.height),new openfl_geom_Point(),8,8);
	output.set_pixels(data);
	return output;
};
flixel_util_FlxSpriteUtil.alphaMaskFlxSprite = function(sprite,mask,output) {
	sprite.drawFrame();
	var data = sprite.get_pixels().clone();
	data.copyChannel(mask.get_pixels(),new openfl_geom_Rectangle(0,0,sprite.get_width(),sprite.get_height()),new openfl_geom_Point(),8,8);
	output.set_pixels(data);
	return output;
};
flixel_util_FlxSpriteUtil.screenWrap = function(sprite,Left,Right,Top,Bottom) {
	if(Bottom == null) {
		Bottom = true;
	}
	if(Top == null) {
		Top = true;
	}
	if(Right == null) {
		Right = true;
	}
	if(Left == null) {
		Left = true;
	}
	if(Left && sprite.x + sprite.frameWidth / 2 <= 0) {
		sprite.set_x(flixel_FlxG.width);
	} else if(Right && sprite.x >= flixel_FlxG.width) {
		sprite.set_x(0);
	}
	if(Top && sprite.y + sprite.frameHeight / 2 <= 0) {
		sprite.set_y(flixel_FlxG.height);
	} else if(Bottom && sprite.y >= flixel_FlxG.height) {
		sprite.set_y(0);
	}
	return sprite;
};
flixel_util_FlxSpriteUtil.bound = function(sprite,MinX,MaxX,MinY,MaxY) {
	if(MaxY == null) {
		MaxY = 0;
	}
	if(MinY == null) {
		MinY = 0;
	}
	if(MaxX == null) {
		MaxX = 0;
	}
	if(MinX == null) {
		MinX = 0;
	}
	if(MaxX <= 0) {
		MaxX = flixel_FlxG.width;
	}
	if(MaxY <= 0) {
		MaxY = flixel_FlxG.height;
	}
	MaxX -= sprite.frameWidth;
	MaxY -= sprite.frameHeight;
	var Value = sprite.x;
	var lowerBound = MinX != null && Value < MinX ? MinX : Value;
	sprite.set_x(MaxX != null && lowerBound > MaxX ? MaxX : lowerBound);
	var Value1 = sprite.y;
	var lowerBound1 = MinY != null && Value1 < MinY ? MinY : Value1;
	sprite.set_y(MaxY != null && lowerBound1 > MaxY ? MaxY : lowerBound1);
	return sprite;
};
flixel_util_FlxSpriteUtil.space = function(objects,startX,startY,horizontalSpacing,verticalSpacing,spaceFromBounds) {
	if(spaceFromBounds == null) {
		spaceFromBounds = false;
	}
	if(verticalSpacing == null) {
		verticalSpacing = 0;
	}
	if(horizontalSpacing == null) {
		horizontalSpacing = 0;
	}
	var _g1 = 0;
	var _g = objects.length;
	while(_g1 < _g) {
		var i = _g1++;
		var object = objects[i];
		if(spaceFromBounds) {
			object.set_x(startX + i * horizontalSpacing);
			object.set_y(startY + i * verticalSpacing);
		} else {
			object.set_x(startX + i * horizontalSpacing);
			object.set_y(startY + i * verticalSpacing);
		}
	}
};
flixel_util_FlxSpriteUtil.drawLine = function(sprite,StartX,StartY,EndX,EndY,lineStyle,drawStyle) {
	var lineStyle1 = lineStyle;
	if(lineStyle1 == null) {
		lineStyle1 = { thickness : 1, color : -1};
	}
	if(lineStyle1.thickness == null) {
		lineStyle1.thickness = 1;
	}
	if(lineStyle1.color == null) {
		lineStyle1.color = -1;
	}
	lineStyle = lineStyle1;
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	flixel_util_FlxSpriteUtil.flashGfx.moveTo(StartX,StartY);
	flixel_util_FlxSpriteUtil.flashGfx.lineTo(EndX,EndY);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawCurve = function(sprite,StartX,StartY,EndX,EndY,ControlX,ControlY,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = 0;
	}
	var lineStyle1 = lineStyle;
	if(lineStyle1 == null) {
		lineStyle1 = { thickness : 1, color : -1};
	}
	if(lineStyle1.thickness == null) {
		lineStyle1.thickness = 1;
	}
	if(lineStyle1.color == null) {
		lineStyle1.color = -1;
	}
	lineStyle = lineStyle1;
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.moveTo(StartX,StartY);
	flixel_util_FlxSpriteUtil.flashGfx.curveTo(EndX,EndY,ControlX,ControlY);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawRect = function(sprite,X,Y,Width,Height,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.drawRect(X,Y,Width,Height);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawRoundRect = function(sprite,X,Y,Width,Height,EllipseWidth,EllipseHeight,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.drawRoundRect(X,Y,Width,Height,EllipseWidth,EllipseHeight);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawCircle = function(sprite,X,Y,Radius,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	if(Radius == null) {
		Radius = -1;
	}
	if(Y == null) {
		Y = -1;
	}
	if(X == null) {
		X = -1;
	}
	if(X == -1 || Y == -1) {
		var midPoint = sprite.getGraphicMidpoint();
		if(X == -1) {
			X = midPoint.x - sprite.x;
		}
		if(Y == -1) {
			Y = midPoint.y - sprite.y;
		}
		midPoint.put();
	}
	if(Radius < 1) {
		Radius = Math.min(sprite.frameWidth,sprite.frameHeight) / 2;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.drawCircle(X,Y,Radius);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawEllipse = function(sprite,X,Y,Width,Height,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.drawEllipse(X,Y,Width,Height);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawTriangle = function(sprite,X,Y,Height,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	flixel_util_FlxSpriteUtil.flashGfx.moveTo(X + Height / 2,Y);
	flixel_util_FlxSpriteUtil.flashGfx.lineTo(X + Height,Height + Y);
	flixel_util_FlxSpriteUtil.flashGfx.lineTo(X,Height + Y);
	flixel_util_FlxSpriteUtil.flashGfx.lineTo(X + Height / 2,Y);
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.drawPolygon = function(sprite,Vertices,FillColor,lineStyle,drawStyle) {
	if(FillColor == null) {
		FillColor = -1;
	}
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
	var p = Vertices.shift();
	flixel_util_FlxSpriteUtil.flashGfx.moveTo(p.x,p.y);
	var _g = 0;
	while(_g < Vertices.length) {
		var p1 = Vertices[_g];
		++_g;
		flixel_util_FlxSpriteUtil.flashGfx.lineTo(p1.x,p1.y);
	}
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	Vertices.unshift(p);
	return sprite;
};
flixel_util_FlxSpriteUtil.beginDraw = function(FillColor,lineStyle) {
	flixel_util_FlxSpriteUtil.flashGfx.clear();
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
	if(FillColor != 0) {
		flixel_util_FlxSpriteUtil.flashGfx.beginFill(FillColor & 16777215,(FillColor >> 24 & 255) / 255);
	}
};
flixel_util_FlxSpriteUtil.endDraw = function(sprite,drawStyle) {
	flixel_util_FlxSpriteUtil.flashGfx.endFill();
	flixel_util_FlxSpriteUtil.updateSpriteGraphic(sprite,drawStyle);
	return sprite;
};
flixel_util_FlxSpriteUtil.updateSpriteGraphic = function(sprite,drawStyle) {
	if(drawStyle == null) {
		drawStyle = { smoothing : false};
	} else if(drawStyle.smoothing == null) {
		drawStyle.smoothing = false;
	}
	sprite.get_pixels().draw(flixel_util_FlxSpriteUtil.flashGfxSprite,drawStyle.matrix,drawStyle.colorTransform,drawStyle.blendMode,drawStyle.clipRect,drawStyle.smoothing);
	sprite.dirty = true;
	return sprite;
};
flixel_util_FlxSpriteUtil.setLineStyle = function(lineStyle) {
	if(lineStyle != null) {
		var color = lineStyle.color == null ? -16777216 : lineStyle.color;
		if(lineStyle.thickness == null) {
			lineStyle.thickness = 1;
		}
		if(lineStyle.pixelHinting == null) {
			lineStyle.pixelHinting = false;
		}
		if(lineStyle.miterLimit == null) {
			lineStyle.miterLimit = 3;
		}
		flixel_util_FlxSpriteUtil.flashGfx.lineStyle(lineStyle.thickness,color & 16777215,(color >> 24 & 255) / 255,lineStyle.pixelHinting,lineStyle.scaleMode,lineStyle.capsStyle,lineStyle.jointStyle,lineStyle.miterLimit);
	}
};
flixel_util_FlxSpriteUtil.getDefaultLineStyle = function(lineStyle) {
	if(lineStyle == null) {
		lineStyle = { thickness : 1, color : -1};
	}
	if(lineStyle.thickness == null) {
		lineStyle.thickness = 1;
	}
	if(lineStyle.color == null) {
		lineStyle.color = -1;
	}
	return lineStyle;
};
flixel_util_FlxSpriteUtil.fill = function(sprite,FillColor) {
	sprite.get_pixels().fillRect(sprite.get_pixels().rect,FillColor);
	if(sprite.get_pixels() != sprite.framePixels) {
		sprite.dirty = true;
	}
	return sprite;
};
flixel_util_FlxSpriteUtil.flicker = function(Object,Duration,Interval,EndVisibility,ForceRestart,CompletionCallback,ProgressCallback) {
	if(ForceRestart == null) {
		ForceRestart = true;
	}
	if(EndVisibility == null) {
		EndVisibility = true;
	}
	if(Interval == null) {
		Interval = 0.04;
	}
	if(Duration == null) {
		Duration = 1;
	}
	return flixel_effects_FlxFlicker.flicker(Object,Duration,Interval,EndVisibility,ForceRestart,CompletionCallback,ProgressCallback);
};
flixel_util_FlxSpriteUtil.isFlickering = function(Object) {
	return flixel_effects_FlxFlicker.isFlickering(Object);
};
flixel_util_FlxSpriteUtil.stopFlickering = function(Object) {
	flixel_effects_FlxFlicker.stopFlickering(Object);
	return Object;
};
flixel_util_FlxSpriteUtil.fadeIn = function(sprite,Duration,ResetAlpha,OnComplete) {
	if(Duration == null) {
		Duration = 1;
	}
	if(ResetAlpha) {
		sprite.set_alpha(0);
	}
	var a1 = sprite;
	var tmp = function(f) {
		flixel_util_FlxSpriteUtil.alphaTween(a1,f);
	};
	flixel_tweens_FlxTween.num(sprite.alpha,1,Duration,{ onComplete : OnComplete},tmp);
	return sprite;
};
flixel_util_FlxSpriteUtil.fadeOut = function(sprite,Duration,OnComplete) {
	if(Duration == null) {
		Duration = 1;
	}
	var a1 = sprite;
	var tmp = function(f) {
		flixel_util_FlxSpriteUtil.alphaTween(a1,f);
	};
	flixel_tweens_FlxTween.num(sprite.alpha,0,Duration,{ onComplete : OnComplete},tmp);
	return sprite;
};
flixel_util_FlxSpriteUtil.alphaTween = function(sprite,f) {
	sprite.set_alpha(f);
};
var flixel_util_FlxStringUtil = function() { };
$hxClasses["flixel.util.FlxStringUtil"] = flixel_util_FlxStringUtil;
flixel_util_FlxStringUtil.__name__ = ["flixel","util","FlxStringUtil"];
flixel_util_FlxStringUtil.formatTicks = function(StartTicks,EndTicks) {
	return Math.abs(EndTicks - StartTicks) / 1000 + "s";
};
flixel_util_FlxStringUtil.formatTime = function(Seconds,ShowMS) {
	if(ShowMS == null) {
		ShowMS = false;
	}
	var timeString = (Seconds / 60 | 0) + ":";
	var timeStringHelper = (Seconds | 0) % 60;
	if(timeStringHelper < 10) {
		timeString += "0";
	}
	timeString += timeStringHelper;
	if(ShowMS) {
		timeString += ".";
		timeStringHelper = (Seconds - (Seconds | 0)) * 100 | 0;
		if(timeStringHelper < 10) {
			timeString += "0";
		}
		timeString += timeStringHelper;
	}
	return timeString;
};
flixel_util_FlxStringUtil.formatArray = function(AnyArray) {
	var string = "";
	if(AnyArray != null && AnyArray.length > 0) {
		string = Std.string(AnyArray[0]);
		var i = 1;
		var l = AnyArray.length;
		while(i < l) string += ", " + Std.string(AnyArray[i++]);
	}
	return string;
};
flixel_util_FlxStringUtil.formatStringMap = function(AnyMap) {
	var string = "";
	var key = AnyMap.keys();
	while(key.hasNext()) {
		var key1 = key.next();
		string += key1 == null ? "null" : "" + key1;
		string += ", ";
	}
	return string.substring(0,string.length - 2);
};
flixel_util_FlxStringUtil.formatMoney = function(Amount,ShowDecimal,EnglishStyle) {
	if(EnglishStyle == null) {
		EnglishStyle = true;
	}
	if(ShowDecimal == null) {
		ShowDecimal = true;
	}
	var isNegative = Amount < 0;
	Amount = Math.abs(Amount);
	var string = "";
	var comma = "";
	var amount = Math.floor(Amount);
	while(amount > 0) {
		if(string.length > 0 && comma.length <= 0) {
			if(EnglishStyle) {
				comma = ",";
			} else {
				comma = ".";
			}
		}
		var zeroes = "";
		var helper = amount - Math.floor(amount / 1000) * 1000;
		amount = Math.floor(amount / 1000);
		if(amount > 0) {
			if(helper < 100) {
				zeroes = "0";
			}
			if(helper < 10) {
				zeroes += "0";
			}
		}
		string = zeroes + helper + comma + string;
	}
	if(string == "") {
		string = "0";
	}
	if(ShowDecimal) {
		amount = Math.floor(Amount * 100) - Math.floor(Amount) * 100;
		string += (EnglishStyle ? "." : ",") + amount;
		if(amount < 10) {
			string += "0";
		}
	}
	if(isNegative) {
		string = "-" + string;
	}
	return string;
};
flixel_util_FlxStringUtil.formatBytes = function(Bytes,Precision) {
	if(Precision == null) {
		Precision = 2;
	}
	var units = ["Bytes","kB","MB","GB","TB","PB"];
	var curUnit = 0;
	while(Bytes >= 1024 && curUnit < units.length - 1) {
		Bytes /= 1024;
		++curUnit;
	}
	return flixel_math_FlxMath.roundDecimal(Bytes,Precision) + units[curUnit];
};
flixel_util_FlxStringUtil.filterDigits = function(Input) {
	var output_b = "";
	var _g1 = 0;
	var _g = Input.length;
	while(_g1 < _g) {
		var c = HxOverrides.cca(Input,_g1++);
		if(c >= 48 && c <= 57) {
			output_b += String.fromCharCode(c);
		}
	}
	return output_b;
};
flixel_util_FlxStringUtil.htmlFormat = function(Text,Size,Color,Bold,Italic,Underlined) {
	if(Underlined == null) {
		Underlined = false;
	}
	if(Italic == null) {
		Italic = false;
	}
	if(Bold == null) {
		Bold = false;
	}
	if(Color == null) {
		Color = "FFFFFF";
	}
	if(Size == null) {
		Size = 12;
	}
	var prefix = "<font size='" + Size + "' color='#" + Color + "'>";
	var suffix = "</font>";
	if(Bold) {
		prefix = "<b>" + prefix;
		suffix = "</font>" + "</b>";
	}
	if(Italic) {
		prefix = "<i>" + prefix;
		suffix += "</i>";
	}
	if(Underlined) {
		prefix = "<u>" + prefix;
		suffix += "</u>";
	}
	return prefix + Text + suffix;
};
flixel_util_FlxStringUtil.getClassName = function(Obj,Simple) {
	if(Simple == null) {
		Simple = false;
	}
	var cl;
	if(js_Boot.__instanceof(Obj,Class)) {
		cl = Obj;
	} else if(Obj == null) {
		cl = null;
	} else {
		cl = js_Boot.getClass(Obj);
	}
	var s = Type.getClassName(cl);
	if(s != null) {
		s = StringTools.replace(s,"::",".");
		if(Simple) {
			s = HxOverrides.substr(s,s.lastIndexOf(".") + 1,null);
		}
	}
	return s;
};
flixel_util_FlxStringUtil.getDomain = function(url) {
	var urlStart = url.indexOf("://") + 3;
	var home = url.substring(urlStart,url.indexOf("/",urlStart));
	home = home.substring(home.lastIndexOf(".",home.lastIndexOf(".") - 1) + 1,home.length);
	home = home.split(":")[0];
	if(home == "") {
		return "local";
	} else {
		return home;
	}
};
flixel_util_FlxStringUtil.sameClassName = function(Obj1,Obj2,Simple) {
	if(Simple == null) {
		Simple = true;
	}
	return flixel_util_FlxStringUtil.getClassName(Obj1,Simple) == flixel_util_FlxStringUtil.getClassName(Obj2,Simple);
};
flixel_util_FlxStringUtil.toIntArray = function(Data) {
	if(Data != null && Data != "") {
		var strArray = Data.split(",");
		var iArray = [];
		var _g = 0;
		while(_g < strArray.length) {
			var str = strArray[_g];
			++_g;
			iArray.push(Std.parseInt(str));
		}
		return iArray;
	}
	return null;
};
flixel_util_FlxStringUtil.toFloatArray = function(Data) {
	if(Data != null && Data != "") {
		var strArray = Data.split(",");
		var fArray = [];
		var _g = 0;
		while(_g < strArray.length) {
			var str = strArray[_g];
			++_g;
			fArray.push(parseFloat(str));
		}
		return fArray;
	}
	return null;
};
flixel_util_FlxStringUtil.arrayToCSV = function(Data,Width,Invert) {
	if(Invert == null) {
		Invert = false;
	}
	var row = 0;
	var column;
	var csv = "";
	var height = Data.length / Width | 0;
	var index;
	var offset = 0;
	while(row < height) {
		column = 0;
		while(column < Width) {
			index = Data[offset];
			if(Invert) {
				if(index == 0) {
					index = 1;
				} else if(index == 1) {
					index = 0;
				}
			}
			if(column == 0) {
				if(row == 0) {
					csv += index;
				} else {
					csv += "\n" + index;
				}
			} else {
				csv += ", " + index;
			}
			++column;
			++offset;
		}
		++row;
	}
	return csv;
};
flixel_util_FlxStringUtil.bitmapToCSV = function(Bitmap,Invert,Scale,ColorMap) {
	if(Scale == null) {
		Scale = 1;
	}
	if(Invert == null) {
		Invert = false;
	}
	if(Scale < 1) {
		Scale = 1;
	}
	if(Scale > 1) {
		var bd = Bitmap;
		Bitmap = new openfl_display_BitmapData(Bitmap.width * Scale,Bitmap.height * Scale);
		var bdW = bd.width;
		var bdH = bd.height;
		var pCol = 0;
		var _g1 = 0;
		while(_g1 < bdW) {
			var i = _g1++;
			var _g3 = 0;
			while(_g3 < bdH) {
				var j = _g3++;
				pCol = bd.getPixel(i,j);
				var _g5 = 0;
				var _g4 = Scale;
				while(_g5 < _g4) {
					var k = _g5++;
					var _g7 = 0;
					var _g6 = Scale;
					while(_g7 < _g6) Bitmap.setPixel(i * Scale + k,j * Scale + _g7++,pCol);
				}
			}
		}
	}
	if(ColorMap != null) {
		var _g11 = 0;
		var _g = ColorMap.length;
		while(_g11 < _g) {
			var i1 = _g11++;
			ColorMap[i1] = ColorMap[i1] & 16777215;
		}
	}
	var row = 0;
	var column;
	var pixel;
	var csv = "";
	var bitmapWidth = Bitmap.width;
	var bitmapHeight = Bitmap.height;
	while(row < bitmapHeight) {
		column = 0;
		while(column < bitmapWidth) {
			pixel = Bitmap.getPixel(column,row);
			if(ColorMap != null) {
				pixel = ColorMap.indexOf(pixel);
			} else if(Invert && pixel > 0 || !Invert && pixel == 0) {
				pixel = 1;
			} else {
				pixel = 0;
			}
			if(column == 0) {
				if(row == 0) {
					csv += pixel;
				} else {
					csv += "\n" + pixel;
				}
			} else {
				csv += ", " + pixel;
			}
			++column;
		}
		++row;
	}
	return csv;
};
flixel_util_FlxStringUtil.imageToCSV = function(ImageFile,Invert,Scale,ColorMap) {
	if(Scale == null) {
		Scale = 1;
	}
	if(Invert == null) {
		Invert = false;
	}
	var tempBitmapData;
	if(typeof(ImageFile) == "string") {
		var id = ImageFile;
		if(openfl_Assets.exists(id)) {
			tempBitmapData = openfl_Assets.getBitmapData(id,false);
		} else {
			tempBitmapData = null;
		}
	} else {
		tempBitmapData = Type.createInstance(ImageFile,[]).bitmapData;
	}
	return flixel_util_FlxStringUtil.bitmapToCSV(tempBitmapData,Invert,Scale,ColorMap);
};
flixel_util_FlxStringUtil.getDebugString = function(LabelValuePairs) {
	var output = "(";
	var _g = 0;
	while(_g < LabelValuePairs.length) {
		var pair = LabelValuePairs[_g];
		++_g;
		output += pair.label + ": ";
		var value = pair.value;
		if(typeof(value) == "number") {
			value = flixel_math_FlxMath.roundDecimal(value,flixel_FlxG["debugger"].precision);
		}
		output += Std.string(value) + " | ";
		flixel_util_LabelValuePair._pool.put(pair);
	}
	output = StringTools.trim(HxOverrides.substr(output,0,output.length - 2));
	return output + ")";
};
flixel_util_FlxStringUtil.contains = function(s,str) {
	return s.indexOf(str) != -1;
};
flixel_util_FlxStringUtil.remove = function(s,sub) {
	return StringTools.replace(s,sub,"");
};
flixel_util_FlxStringUtil.insert = function(s,pos,insertion) {
	return s.substring(0,pos) + insertion + HxOverrides.substr(s,pos,null);
};
flixel_util_FlxStringUtil.sortAlphabetically = function(list) {
	list.sort(function(a,b) {
		a = a.toLowerCase();
		b = b.toLowerCase();
		if(a < b) {
			return -1;
		}
		if(a > b) {
			return 1;
		}
		return 0;
	});
	return list;
};
flixel_util_FlxStringUtil.isNullOrEmpty = function(s) {
	if(s != null) {
		return s.length == 0;
	} else {
		return true;
	}
};
var flixel_util_LabelValuePair = function() {
};
$hxClasses["flixel.util.LabelValuePair"] = flixel_util_LabelValuePair;
flixel_util_LabelValuePair.__name__ = ["flixel","util","LabelValuePair"];
flixel_util_LabelValuePair.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_LabelValuePair.weak = function(label,value) {
	var _this = flixel_util_LabelValuePair._pool.get();
	_this.label = label;
	_this.value = value;
	return _this;
};
flixel_util_LabelValuePair.prototype = {
	create: function(label,value) {
		this.label = label;
		this.value = value;
		return this;
	}
	,put: function() {
		flixel_util_LabelValuePair._pool.put(this);
	}
	,destroy: function() {
		this.label = null;
		this.value = null;
	}
	,__class__: flixel_util_LabelValuePair
};
var flixel_util_FlxTimer = function(manager) {
	this._inManager = false;
	this._loopsCounter = 0;
	this._timeCounter = 0;
	this.finished = false;
	this.active = false;
	this.loops = 0;
	this.time = 0;
	this.manager = manager != null ? manager : flixel_util_FlxTimer.globalManager;
};
$hxClasses["flixel.util.FlxTimer"] = flixel_util_FlxTimer;
flixel_util_FlxTimer.__name__ = ["flixel","util","FlxTimer"];
flixel_util_FlxTimer.__interfaces__ = [flixel_util_IFlxDestroyable];
flixel_util_FlxTimer.globalManager = null;
flixel_util_FlxTimer.prototype = {
	destroy: function() {
		this.onComplete = null;
	}
	,start: function(Time,OnComplete,Loops) {
		if(Loops == null) {
			Loops = 1;
		}
		if(Time == null) {
			Time = 1;
		}
		if(this.manager != null && !this._inManager) {
			this.manager.add(this);
			this._inManager = true;
		}
		this.active = true;
		this.finished = false;
		this.time = Math.abs(Time);
		if(Loops < 0) {
			Loops *= -1;
		}
		this.loops = Loops;
		this.onComplete = OnComplete;
		this._timeCounter = 0;
		this._loopsCounter = 0;
		return this;
	}
	,reset: function(NewTime) {
		if(NewTime == null) {
			NewTime = -1;
		}
		if(NewTime < 0) {
			NewTime = this.time;
		}
		this.start(NewTime,this.onComplete,this.loops);
		return this;
	}
	,cancel: function() {
		this.finished = true;
		this.active = false;
		if(this.manager != null && this._inManager) {
			this.manager.remove(this);
			this._inManager = false;
		}
	}
	,update: function(elapsed) {
		this._timeCounter += elapsed;
		while(this._timeCounter >= this.time && this.active && !this.finished) {
			this._timeCounter -= this.time;
			this._loopsCounter++;
			if(this.loops > 0 && this._loopsCounter >= this.loops) {
				this.finished = true;
			}
		}
	}
	,onLoopFinished: function() {
		if(this.onComplete != null) {
			this.onComplete(this);
		}
		if(this.finished) {
			this.cancel();
		}
	}
	,get_timeLeft: function() {
		return this.time - this._timeCounter;
	}
	,get_elapsedTime: function() {
		return this._timeCounter;
	}
	,get_loopsLeft: function() {
		return this.loops - this._loopsCounter;
	}
	,get_elapsedLoops: function() {
		return this._loopsCounter;
	}
	,get_progress: function() {
		if(this.time > 0) {
			return this._timeCounter / this.time;
		} else {
			return 0;
		}
	}
	,__class__: flixel_util_FlxTimer
	,__properties__: {get_progress:"get_progress",get_elapsedLoops:"get_elapsedLoops",get_loopsLeft:"get_loopsLeft",get_elapsedTime:"get_elapsedTime",get_timeLeft:"get_timeLeft"}
};
var flixel_util_FlxTimerManager = function() {
	this._timers = [];
	flixel_FlxBasic.call(this);
	this.set_visible(false);
	flixel_FlxG.signals.stateSwitched.add($bind(this,this.clear));
};
$hxClasses["flixel.util.FlxTimerManager"] = flixel_util_FlxTimerManager;
flixel_util_FlxTimerManager.__name__ = ["flixel","util","FlxTimerManager"];
flixel_util_FlxTimerManager.__super__ = flixel_FlxBasic;
flixel_util_FlxTimerManager.prototype = $extend(flixel_FlxBasic.prototype,{
	destroy: function() {
		flixel_util_FlxArrayUtil.clearArray(this._timers);
		this._timers = null;
		flixel_FlxG.signals.stateSwitched.remove($bind(this,this.clear));
		flixel_FlxBasic.prototype.destroy.call(this);
	}
	,update: function(elapsed) {
		var loopedTimers = null;
		var _g = 0;
		var _g1 = this._timers;
		while(_g < _g1.length) {
			var timer = _g1[_g];
			++_g;
			if(timer.active && !timer.finished && timer.time >= 0) {
				var timerLoops = timer._loopsCounter;
				timer.update(elapsed);
				if(timerLoops != timer._loopsCounter) {
					if(loopedTimers == null) {
						loopedTimers = [];
					}
					loopedTimers.push(timer);
				}
			}
		}
		if(loopedTimers != null) {
			while(loopedTimers.length > 0) loopedTimers.shift().onLoopFinished();
		}
	}
	,add: function(Timer) {
		this._timers.push(Timer);
	}
	,remove: function(Timer) {
		var array = this._timers;
		var index = array.indexOf(Timer);
		if(index != -1) {
			array[index] = array[array.length - 1];
			array.pop();
		}
	}
	,completeAll: function() {
		var timersToFinish = [];
		var _g = 0;
		var _g1 = this._timers;
		while(_g < _g1.length) {
			var timer = _g1[_g];
			++_g;
			if(timer.loops > 0 && timer.active) {
				timersToFinish.push(timer);
			}
		}
		var _g2 = 0;
		while(_g2 < timersToFinish.length) {
			var timer1 = timersToFinish[_g2];
			++_g2;
			while(!timer1.finished) {
				timer1.update(timer1.time - timer1._timeCounter);
				timer1.onLoopFinished();
			}
		}
	}
	,clear: function() {
		flixel_util_FlxArrayUtil.clearArray(this._timers);
	}
	,forEach: function(Function) {
		var _g = 0;
		var _g1 = this._timers;
		while(_g < _g1.length) {
			var timer = _g1[_g];
			++_g;
			Function(timer);
		}
	}
	,__class__: flixel_util_FlxTimerManager
});
var flixel_util_FlxVerticalAlign = $hxClasses["flixel.util.FlxVerticalAlign"] = { __ename__ : ["flixel","util","FlxVerticalAlign"], __constructs__ : ["TOP","CENTER","BOTTOM"] };
flixel_util_FlxVerticalAlign.TOP = ["TOP",0];
flixel_util_FlxVerticalAlign.TOP.toString = $estr;
flixel_util_FlxVerticalAlign.TOP.__enum__ = flixel_util_FlxVerticalAlign;
flixel_util_FlxVerticalAlign.CENTER = ["CENTER",1];
flixel_util_FlxVerticalAlign.CENTER.toString = $estr;
flixel_util_FlxVerticalAlign.CENTER.__enum__ = flixel_util_FlxVerticalAlign;
flixel_util_FlxVerticalAlign.BOTTOM = ["BOTTOM",2];
flixel_util_FlxVerticalAlign.BOTTOM.toString = $estr;
flixel_util_FlxVerticalAlign.BOTTOM.__enum__ = flixel_util_FlxVerticalAlign;
var flixel_util_helpers_FlxRange = function(start,end) {
	this.active = true;
	this.start = start;
	this.end = end == null ? start : end;
};
$hxClasses["flixel.util.helpers.FlxRange"] = flixel_util_helpers_FlxRange;
flixel_util_helpers_FlxRange.__name__ = ["flixel","util","helpers","FlxRange"];
flixel_util_helpers_FlxRange.prototype = {
	set: function(start,end) {
		this.start = start;
		this.end = end == null ? start : end;
		return this;
	}
	,equals: function(OtherFlxRange) {
		if(this.start == OtherFlxRange.start) {
			return this.end == OtherFlxRange.end;
		} else {
			return false;
		}
	}
	,toString: function() {
		var value = this.start;
		var _this = flixel_util_LabelValuePair._pool.get();
		_this.label = "start";
		_this.value = value;
		var value1 = this.end;
		var _this1 = flixel_util_LabelValuePair._pool.get();
		_this1.label = "end";
		_this1.value = value1;
		return flixel_util_FlxStringUtil.getDebugString([_this,_this1]);
	}
	,__class__: flixel_util_helpers_FlxRange
};
var haxe_StackItem = $hxClasses["haxe.StackItem"] = { __ename__ : ["haxe","StackItem"], __constructs__ : ["CFunction","Module","FilePos","Method","LocalFunction"] };
haxe_StackItem.CFunction = ["CFunction",0];
haxe_StackItem.CFunction.toString = $estr;
haxe_StackItem.CFunction.__enum__ = haxe_StackItem;
haxe_StackItem.Module = function(m) { var $x = ["Module",1,m]; $x.__enum__ = haxe_StackItem; $x.toString = $estr; return $x; };
haxe_StackItem.FilePos = function(s,file,line) { var $x = ["FilePos",2,s,file,line]; $x.__enum__ = haxe_StackItem; $x.toString = $estr; return $x; };
haxe_StackItem.Method = function(classname,method) { var $x = ["Method",3,classname,method]; $x.__enum__ = haxe_StackItem; $x.toString = $estr; return $x; };
haxe_StackItem.LocalFunction = function(v) { var $x = ["LocalFunction",4,v]; $x.__enum__ = haxe_StackItem; $x.toString = $estr; return $x; };
var haxe_CallStack = function() { };
$hxClasses["haxe.CallStack"] = haxe_CallStack;
haxe_CallStack.__name__ = ["haxe","CallStack"];
haxe_CallStack.lastException = null;
haxe_CallStack.getStack = function(e) {
	if(e == null) {
		return [];
	}
	var oldValue = Error.prepareStackTrace;
	Error.prepareStackTrace = function(error,callsites) {
		var stack = [];
		var _g = 0;
		while(_g < callsites.length) {
			var site = callsites[_g];
			++_g;
			if(haxe_CallStack.wrapCallSite != null) {
				site = haxe_CallStack.wrapCallSite(site);
			}
			var method = null;
			var fullName = site.getFunctionName();
			if(fullName != null) {
				var idx = fullName.lastIndexOf(".");
				if(idx >= 0) {
					var className = HxOverrides.substr(fullName,0,idx);
					var methodName = HxOverrides.substr(fullName,idx + 1,null);
					method = haxe_StackItem.Method(className,methodName);
				}
			}
			stack.push(haxe_StackItem.FilePos(method,site.getFileName(),site.getLineNumber()));
		}
		return stack;
	};
	var a = haxe_CallStack.makeStack(e.stack);
	Error.prepareStackTrace = oldValue;
	return a;
};
haxe_CallStack.wrapCallSite = null;
haxe_CallStack.callStack = function() {
	try {
		throw new Error();
	} catch( e ) {
		haxe_CallStack.lastException = e;
		if (e instanceof js__$Boot_HaxeError) e = e.val;
		var a = haxe_CallStack.getStack(e);
		a.shift();
		return a;
	}
};
haxe_CallStack.exceptionStack = function() {
	return haxe_CallStack.getStack(haxe_CallStack.lastException);
};
haxe_CallStack.toString = function(stack) {
	var b = new StringBuf();
	var _g = 0;
	while(_g < stack.length) {
		var s = stack[_g];
		++_g;
		b.b += "\nCalled from ";
		haxe_CallStack.itemToString(b,s);
	}
	return b.b;
};
haxe_CallStack.itemToString = function(b,s) {
	switch(s[1]) {
	case 0:
		b.b += "a C function";
		break;
	case 1:
		var m = s[2];
		b.b = (b.b += "module ") + (m == null ? "null" : "" + m);
		break;
	case 2:
		var line = s[4];
		var file = s[3];
		var s1 = s[2];
		if(s1 != null) {
			haxe_CallStack.itemToString(b,s1);
			b.b += " (";
		}
		b.b = (b.b += file == null ? "null" : "" + file) + " line ";
		b.b += line == null ? "null" : "" + line;
		if(s1 != null) {
			b.b += ")";
		}
		break;
	case 3:
		var meth = s[3];
		var cname = s[2];
		b.b = (b.b += cname == null ? "null" : "" + cname) + ".";
		b.b += meth == null ? "null" : "" + meth;
		break;
	case 4:
		var n = s[2];
		b.b = (b.b += "local function #") + (n == null ? "null" : "" + n);
		break;
	}
};
haxe_CallStack.makeStack = function(s) {
	if(s == null) {
		return [];
	} else if(typeof(s) == "string") {
		var stack = s.split("\n");
		if(stack[0] == "Error") {
			stack.shift();
		}
		var m = [];
		var rie10 = new EReg("^   at ([A-Za-z0-9_. ]+) \\(([^)]+):([0-9]+):([0-9]+)\\)$","");
		var _g = 0;
		while(_g < stack.length) {
			var line = stack[_g];
			++_g;
			if(rie10.match(line)) {
				var path = rie10.matched(1).split(".");
				var meth = path.pop();
				var file = rie10.matched(2);
				var line1 = Std.parseInt(rie10.matched(3));
				m.push(haxe_StackItem.FilePos(meth == "Anonymous function" ? haxe_StackItem.LocalFunction() : meth == "Global code" ? null : haxe_StackItem.Method(path.join("."),meth),file,line1));
			} else {
				m.push(haxe_StackItem.Module(StringTools.trim(line)));
			}
		}
		return m;
	} else {
		return s;
	}
};
var haxe_IMap = function() { };
$hxClasses["haxe.IMap"] = haxe_IMap;
haxe_IMap.__name__ = ["haxe","IMap"];
haxe_IMap.prototype = {
	__class__: haxe_IMap
};
var haxe__$Int64__$_$_$Int64 = function(high,low) {
	this.high = high;
	this.low = low;
};
$hxClasses["haxe._Int64.___Int64"] = haxe__$Int64__$_$_$Int64;
haxe__$Int64__$_$_$Int64.__name__ = ["haxe","_Int64","___Int64"];
haxe__$Int64__$_$_$Int64.prototype = {
	__class__: haxe__$Int64__$_$_$Int64
};
var haxe_Resource = function() { };
$hxClasses["haxe.Resource"] = haxe_Resource;
haxe_Resource.__name__ = ["haxe","Resource"];
haxe_Resource.content = null;
haxe_Resource.getString = function(name) {
	var _g = 0;
	var _g1 = haxe_Resource.content;
	while(_g < _g1.length) {
		var x = _g1[_g];
		++_g;
		if(x.name == name) {
			if(x.str != null) {
				return x.str;
			}
			return haxe_crypto_Base64.decode(x.data).toString();
		}
	}
	return null;
};
haxe_Resource.getBytes = function(name) {
	var _g = 0;
	var _g1 = haxe_Resource.content;
	while(_g < _g1.length) {
		var x = _g1[_g];
		++_g;
		if(x.name == name) {
			if(x.str != null) {
				return haxe_io_Bytes.ofString(x.str);
			}
			return haxe_crypto_Base64.decode(x.data);
		}
	}
	return null;
};
var haxe_Serializer = function() {
	this.buf = new StringBuf();
	this.cache = [];
	this.useCache = haxe_Serializer.USE_CACHE;
	this.useEnumIndex = haxe_Serializer.USE_ENUM_INDEX;
	this.shash = new haxe_ds_StringMap();
	this.scount = 0;
};
$hxClasses["haxe.Serializer"] = haxe_Serializer;
haxe_Serializer.__name__ = ["haxe","Serializer"];
haxe_Serializer.run = function(v) {
	var s = new haxe_Serializer();
	s.serialize(v);
	return s.toString();
};
haxe_Serializer.prototype = {
	toString: function() {
		return this.buf.b;
	}
	,serializeString: function(s) {
		var _this = this.shash;
		var x = __map_reserved[s] != null ? _this.getReserved(s) : _this.h[s];
		if(x != null) {
			this.buf.b += "R";
			this.buf.b += x == null ? "null" : "" + x;
			return;
		}
		var _this1 = this.shash;
		var value = this.scount++;
		if(__map_reserved[s] != null) {
			_this1.setReserved(s,value);
		} else {
			_this1.h[s] = value;
		}
		this.buf.b += "y";
		s = encodeURIComponent(s);
		this.buf.b += Std.string(s.length);
		this.buf.b += ":";
		this.buf.b += s == null ? "null" : "" + s;
	}
	,serializeRef: function(v) {
		var vt = typeof(v);
		var _g1 = 0;
		var _g = this.cache.length;
		while(_g1 < _g) {
			var i = _g1++;
			var ci = this.cache[i];
			if(typeof(ci) == vt && ci == v) {
				this.buf.b += "r";
				this.buf.b += i == null ? "null" : "" + i;
				return true;
			}
		}
		this.cache.push(v);
		return false;
	}
	,serializeFields: function(v) {
		var _g = 0;
		var _g1 = Reflect.fields(v);
		while(_g < _g1.length) {
			var f = _g1[_g];
			++_g;
			this.serializeString(f);
			this.serialize(Reflect.field(v,f));
		}
		this.buf.b += "g";
	}
	,serialize: function(v) {
		var _g = Type["typeof"](v);
		switch(_g[1]) {
		case 0:
			this.buf.b += "n";
			break;
		case 1:
			var v1 = v;
			if(v1 == 0) {
				this.buf.b += "z";
				return;
			}
			this.buf.b += "i";
			this.buf.b += v1 == null ? "null" : "" + v1;
			break;
		case 2:
			var v2 = v;
			if(isNaN(v2)) {
				this.buf.b += "k";
			} else if(!isFinite(v2)) {
				this.buf.b += v2 < 0 ? "m" : "p";
			} else {
				this.buf.b += "d";
				this.buf.b += v2 == null ? "null" : "" + v2;
			}
			break;
		case 3:
			this.buf.b += v ? "t" : "f";
			break;
		case 4:
			if(js_Boot.__instanceof(v,Class)) {
				var className = Type.getClassName(v);
				this.buf.b += "A";
				this.serializeString(className);
			} else if(js_Boot.__instanceof(v,Enum)) {
				this.buf.b += "B";
				this.serializeString(Type.getEnumName(v));
			} else {
				if(this.useCache && this.serializeRef(v)) {
					return;
				}
				this.buf.b += "o";
				this.serializeFields(v);
			}
			break;
		case 5:
			throw new js__$Boot_HaxeError("Cannot serialize function");
			break;
		case 6:
			var c = _g[2];
			if(c == String) {
				this.serializeString(v);
				return;
			}
			if(this.useCache && this.serializeRef(v)) {
				return;
			}
			switch(c) {
			case Array:
				var ucount = 0;
				this.buf.b += "a";
				var _g1 = 0;
				var _g2 = v["length"];
				while(_g1 < _g2) {
					var i = _g1++;
					if(v[i] == null) {
						++ucount;
					} else {
						if(ucount > 0) {
							if(ucount == 1) {
								this.buf.b += "n";
							} else {
								this.buf.b += "u";
								this.buf.b += ucount == null ? "null" : "" + ucount;
							}
							ucount = 0;
						}
						this.serialize(v[i]);
					}
				}
				if(ucount > 0) {
					if(ucount == 1) {
						this.buf.b += "n";
					} else {
						this.buf.b += "u";
						this.buf.b += ucount == null ? "null" : "" + ucount;
					}
				}
				this.buf.b += "h";
				break;
			case Date:
				this.buf.b += "v";
				this.buf.b += Std.string(v.getTime());
				break;
			case List:
				this.buf.b += "l";
				var _g_head = v.h;
				while(_g_head != null) {
					var val = _g_head.item;
					_g_head = _g_head.next;
					this.serialize(val);
				}
				this.buf.b += "h";
				break;
			case haxe_ds_IntMap:
				this.buf.b += "q";
				var v3 = v;
				var k = v3.keys();
				while(k.hasNext()) {
					var k1 = k.next();
					this.buf.b += ":";
					this.buf.b += k1 == null ? "null" : "" + k1;
					this.serialize(v3.h[k1]);
				}
				this.buf.b += "h";
				break;
			case haxe_ds_ObjectMap:
				this.buf.b += "M";
				var v4 = v;
				var k2 = v4.keys();
				while(k2.hasNext()) {
					var k3 = k2.next();
					var id = Reflect.field(k3,"__id__");
					Reflect.deleteField(k3,"__id__");
					this.serialize(k3);
					k3["__id__"] = id;
					this.serialize(v4.h[k3.__id__]);
				}
				this.buf.b += "h";
				break;
			case haxe_ds_StringMap:
				this.buf.b += "b";
				var v5 = v;
				var k4 = v5.keys();
				while(k4.hasNext()) {
					var k5 = k4.next();
					this.serializeString(k5);
					this.serialize(__map_reserved[k5] != null ? v5.getReserved(k5) : v5.h[k5]);
				}
				this.buf.b += "h";
				break;
			case haxe_io_Bytes:
				var v6 = v;
				this.buf.b += "s";
				this.buf.b += Std.string(Math.ceil(v6.length * 8 / 6));
				this.buf.b += ":";
				var i1 = 0;
				var max = v6.length - 2;
				var b64 = haxe_Serializer.BASE64_CODES;
				if(b64 == null) {
					var length = haxe_Serializer.BASE64.length;
					b64 = new Array(length);
					var _g11 = 0;
					var _g3 = haxe_Serializer.BASE64.length;
					while(_g11 < _g3) {
						var i2 = _g11++;
						b64[i2] = HxOverrides.cca(haxe_Serializer.BASE64,i2);
					}
					haxe_Serializer.BASE64_CODES = b64;
				}
				while(i1 < max) {
					var b1 = v6.b[i1++];
					var b2 = v6.b[i1++];
					var b3 = v6.b[i1++];
					this.buf.b += String.fromCharCode(b64[b1 >> 2]);
					this.buf.b += String.fromCharCode(b64[(b1 << 4 | b2 >> 4) & 63]);
					this.buf.b += String.fromCharCode(b64[(b2 << 2 | b3 >> 6) & 63]);
					this.buf.b += String.fromCharCode(b64[b3 & 63]);
				}
				if(i1 == max) {
					var b11 = v6.b[i1++];
					var b21 = v6.b[i1++];
					this.buf.b += String.fromCharCode(b64[b11 >> 2]);
					this.buf.b += String.fromCharCode(b64[(b11 << 4 | b21 >> 4) & 63]);
					this.buf.b += String.fromCharCode(b64[b21 << 2 & 63]);
				} else if(i1 == max + 1) {
					var b12 = v6.b[i1++];
					this.buf.b += String.fromCharCode(b64[b12 >> 2]);
					this.buf.b += String.fromCharCode(b64[b12 << 4 & 63]);
				}
				break;
			default:
				if(this.useCache) {
					this.cache.pop();
				}
				if(v.hxSerialize != null) {
					this.buf.b += "C";
					this.serializeString(Type.getClassName(c));
					if(this.useCache) {
						this.cache.push(v);
					}
					v.hxSerialize(this);
					this.buf.b += "g";
				} else {
					this.buf.b += "c";
					this.serializeString(Type.getClassName(c));
					if(this.useCache) {
						this.cache.push(v);
					}
					this.serializeFields(v);
				}
			}
			break;
		case 7:
			if(this.useCache) {
				if(this.serializeRef(v)) {
					return;
				}
				this.cache.pop();
			}
			this.buf.b += Std.string(this.useEnumIndex ? "j" : "w");
			this.serializeString(Type.getEnumName(_g[2]));
			if(this.useEnumIndex) {
				this.buf.b += ":";
				this.buf.b += Std.string(v[1]);
			} else {
				this.serializeString(v[0]);
			}
			this.buf.b += ":";
			var l = v["length"];
			this.buf.b += Std.string(l - 2);
			var _g12 = 2;
			var _g4 = l;
			while(_g12 < _g4) this.serialize(v[_g12++]);
			if(this.useCache) {
				this.cache.push(v);
			}
			break;
		default:
			throw new js__$Boot_HaxeError("Cannot serialize " + Std.string(v));
		}
	}
	,__class__: haxe_Serializer
};
var haxe_Timer = function(time_ms) {
	var me = this;
	this.id = setInterval(function() {
		me.run();
	},time_ms);
};
$hxClasses["haxe.Timer"] = haxe_Timer;
haxe_Timer.__name__ = ["haxe","Timer"];
haxe_Timer.delay = function(f,time_ms) {
	var t = new haxe_Timer(time_ms);
	t.run = function() {
		t.stop();
		f();
	};
	return t;
};
haxe_Timer.measure = function(f,pos) {
	var t0 = haxe_Timer.stamp();
	var r = f();
	haxe_Log.trace(haxe_Timer.stamp() - t0 + "s",pos);
	return r;
};
haxe_Timer.stamp = function() {
	return new Date().getTime() / 1000;
};
haxe_Timer.prototype = {
	stop: function() {
		if(this.id == null) {
			return;
		}
		clearInterval(this.id);
		this.id = null;
	}
	,run: function() {
	}
	,__class__: haxe_Timer
};
var haxe__$Unserializer_DefaultResolver = function() {
};
$hxClasses["haxe._Unserializer.DefaultResolver"] = haxe__$Unserializer_DefaultResolver;
haxe__$Unserializer_DefaultResolver.__name__ = ["haxe","_Unserializer","DefaultResolver"];
haxe__$Unserializer_DefaultResolver.prototype = {
	resolveClass: function(name) {
		return Type.resolveClass(name);
	}
	,resolveEnum: function(name) {
		return Type.resolveEnum(name);
	}
	,__class__: haxe__$Unserializer_DefaultResolver
};
var haxe_Unserializer = function(buf) {
	this.buf = buf;
	this.length = buf.length;
	this.pos = 0;
	this.scache = [];
	this.cache = [];
	var r = haxe_Unserializer.DEFAULT_RESOLVER;
	if(r == null) {
		r = new haxe__$Unserializer_DefaultResolver();
		haxe_Unserializer.DEFAULT_RESOLVER = r;
	}
	this.resolver = r;
};
$hxClasses["haxe.Unserializer"] = haxe_Unserializer;
haxe_Unserializer.__name__ = ["haxe","Unserializer"];
haxe_Unserializer.initCodes = function() {
	var codes = [];
	var _g1 = 0;
	var _g = haxe_Unserializer.BASE64.length;
	while(_g1 < _g) {
		var i = _g1++;
		codes[haxe_Unserializer.BASE64.charCodeAt(i)] = i;
	}
	return codes;
};
haxe_Unserializer.prototype = {
	setResolver: function(r) {
		if(r == null) {
			if(haxe__$Unserializer_NullResolver.instance == null) {
				haxe__$Unserializer_NullResolver.instance = new haxe__$Unserializer_NullResolver();
			}
			this.resolver = haxe__$Unserializer_NullResolver.instance;
		} else {
			this.resolver = r;
		}
	}
	,readDigits: function() {
		var k = 0;
		var s = false;
		var fpos = this.pos;
		while(true) {
			var c = this.buf.charCodeAt(this.pos);
			if(c != c) {
				break;
			}
			if(c == 45) {
				if(this.pos != fpos) {
					break;
				}
				s = true;
				this.pos++;
				continue;
			}
			if(c < 48 || c > 57) {
				break;
			}
			k = k * 10 + (c - 48);
			this.pos++;
		}
		if(s) {
			k *= -1;
		}
		return k;
	}
	,readFloat: function() {
		var p1 = this.pos;
		while(true) {
			var c = this.buf.charCodeAt(this.pos);
			if(c != c) {
				break;
			}
			if(c >= 43 && c < 58 || c == 101 || c == 69) {
				this.pos++;
			} else {
				break;
			}
		}
		return parseFloat(HxOverrides.substr(this.buf,p1,this.pos - p1));
	}
	,unserializeObject: function(o) {
		while(true) {
			if(this.pos >= this.length) {
				throw new js__$Boot_HaxeError("Invalid object");
			}
			if(this.buf.charCodeAt(this.pos) == 103) {
				break;
			}
			var k = this.unserialize();
			if(typeof(k) != "string") {
				throw new js__$Boot_HaxeError("Invalid object key");
			}
			o[k] = this.unserialize();
		}
		this.pos++;
	}
	,unserializeEnum: function(edecl,tag) {
		if(this.buf.charCodeAt(this.pos++) != 58) {
			throw new js__$Boot_HaxeError("Invalid enum format");
		}
		var nargs = this.readDigits();
		if(nargs == 0) {
			return Type.createEnum(edecl,tag);
		}
		var args = [];
		while(nargs-- > 0) args.push(this.unserialize());
		return Type.createEnum(edecl,tag,args);
	}
	,unserialize: function() {
		switch(this.buf.charCodeAt(this.pos++)) {
		case 65:
			var name = this.unserialize();
			var cl = this.resolver.resolveClass(name);
			if(cl == null) {
				throw new js__$Boot_HaxeError("Class not found " + name);
			}
			return cl;
		case 66:
			var name1 = this.unserialize();
			var e = this.resolver.resolveEnum(name1);
			if(e == null) {
				throw new js__$Boot_HaxeError("Enum not found " + name1);
			}
			return e;
		case 67:
			var name2 = this.unserialize();
			var cl1 = this.resolver.resolveClass(name2);
			if(cl1 == null) {
				throw new js__$Boot_HaxeError("Class not found " + name2);
			}
			var o = Type.createEmptyInstance(cl1);
			this.cache.push(o);
			o.hxUnserialize(this);
			if(this.buf.charCodeAt(this.pos++) != 103) {
				throw new js__$Boot_HaxeError("Invalid custom data");
			}
			return o;
		case 77:
			var h = new haxe_ds_ObjectMap();
			this.cache.push(h);
			while(this.buf.charCodeAt(this.pos) != 104) h.set(this.unserialize(),this.unserialize());
			this.pos++;
			return h;
		case 82:
			var n = this.readDigits();
			if(n < 0 || n >= this.scache.length) {
				throw new js__$Boot_HaxeError("Invalid string reference");
			}
			return this.scache[n];
		case 97:
			var a = [];
			this.cache.push(a);
			while(true) {
				var c = this.buf.charCodeAt(this.pos);
				if(c == 104) {
					this.pos++;
					break;
				}
				if(c == 117) {
					this.pos++;
					var n1 = this.readDigits();
					a[a.length + n1 - 1] = null;
				} else {
					a.push(this.unserialize());
				}
			}
			return a;
		case 98:
			var h1 = new haxe_ds_StringMap();
			this.cache.push(h1);
			while(this.buf.charCodeAt(this.pos) != 104) {
				var s = this.unserialize();
				var value = this.unserialize();
				if(__map_reserved[s] != null) {
					h1.setReserved(s,value);
				} else {
					h1.h[s] = value;
				}
			}
			this.pos++;
			return h1;
		case 99:
			var name3 = this.unserialize();
			var cl2 = this.resolver.resolveClass(name3);
			if(cl2 == null) {
				throw new js__$Boot_HaxeError("Class not found " + name3);
			}
			var o1 = Type.createEmptyInstance(cl2);
			this.cache.push(o1);
			this.unserializeObject(o1);
			return o1;
		case 100:
			return this.readFloat();
		case 102:
			return false;
		case 105:
			return this.readDigits();
		case 106:
			var name4 = this.unserialize();
			var edecl = this.resolver.resolveEnum(name4);
			if(edecl == null) {
				throw new js__$Boot_HaxeError("Enum not found " + name4);
			}
			this.pos++;
			var index = this.readDigits();
			var tag = edecl.__constructs__.slice()[index];
			if(tag == null) {
				throw new js__$Boot_HaxeError("Unknown enum index " + name4 + "@" + index);
			}
			var e1 = this.unserializeEnum(edecl,tag);
			this.cache.push(e1);
			return e1;
		case 107:
			return NaN;
		case 108:
			var l = new List();
			this.cache.push(l);
			while(this.buf.charCodeAt(this.pos) != 104) l.add(this.unserialize());
			this.pos++;
			return l;
		case 109:
			return -Infinity;
		case 110:
			return null;
		case 111:
			var o2 = { };
			this.cache.push(o2);
			this.unserializeObject(o2);
			return o2;
		case 112:
			return Infinity;
		case 113:
			var h2 = new haxe_ds_IntMap();
			this.cache.push(h2);
			var c1 = this.buf.charCodeAt(this.pos++);
			while(c1 == 58) {
				var i = this.readDigits();
				var value1 = this.unserialize();
				h2.h[i] = value1;
				c1 = this.buf.charCodeAt(this.pos++);
			}
			if(c1 != 104) {
				throw new js__$Boot_HaxeError("Invalid IntMap format");
			}
			return h2;
		case 114:
			var n2 = this.readDigits();
			if(n2 < 0 || n2 >= this.cache.length) {
				throw new js__$Boot_HaxeError("Invalid reference");
			}
			return this.cache[n2];
		case 115:
			var len = this.readDigits();
			var buf = this.buf;
			if(this.buf.charCodeAt(this.pos++) != 58 || this.length - this.pos < len) {
				throw new js__$Boot_HaxeError("Invalid bytes length");
			}
			var codes = haxe_Unserializer.CODES;
			if(codes == null) {
				codes = haxe_Unserializer.initCodes();
				haxe_Unserializer.CODES = codes;
			}
			var i1 = this.pos;
			var rest = len & 3;
			var max = i1 + (len - rest);
			var bytes = new haxe_io_Bytes(new ArrayBuffer((len >> 2) * 3 + (rest >= 2 ? rest - 1 : 0)));
			var bpos = 0;
			while(i1 < max) {
				var c11 = codes[buf.charCodeAt(i1++)];
				var c2 = codes[buf.charCodeAt(i1++)];
				bytes.b[bpos++] = (c11 << 2 | c2 >> 4) & 255;
				var c3 = codes[buf.charCodeAt(i1++)];
				bytes.b[bpos++] = (c2 << 4 | c3 >> 2) & 255;
				var c4 = codes[buf.charCodeAt(i1++)];
				bytes.b[bpos++] = (c3 << 6 | c4) & 255;
			}
			if(rest >= 2) {
				var c12 = codes[buf.charCodeAt(i1++)];
				var c21 = codes[buf.charCodeAt(i1++)];
				bytes.b[bpos++] = (c12 << 2 | c21 >> 4) & 255;
				if(rest == 3) {
					var c31 = codes[buf.charCodeAt(i1++)];
					bytes.b[bpos++] = (c21 << 4 | c31 >> 2) & 255;
				}
			}
			this.pos += len;
			this.cache.push(bytes);
			return bytes;
		case 116:
			return true;
		case 118:
			var d;
			if(this.buf.charCodeAt(this.pos) >= 48 && this.buf.charCodeAt(this.pos) <= 57 && this.buf.charCodeAt(this.pos + 1) >= 48 && this.buf.charCodeAt(this.pos + 1) <= 57 && this.buf.charCodeAt(this.pos + 2) >= 48 && this.buf.charCodeAt(this.pos + 2) <= 57 && this.buf.charCodeAt(this.pos + 3) >= 48 && this.buf.charCodeAt(this.pos + 3) <= 57 && this.buf.charCodeAt(this.pos + 4) == 45) {
				d = HxOverrides.strDate(HxOverrides.substr(this.buf,this.pos,19));
				this.pos += 19;
			} else {
				var t = this.readFloat();
				d = new Date(t);
			}
			this.cache.push(d);
			return d;
		case 119:
			var name5 = this.unserialize();
			var edecl1 = this.resolver.resolveEnum(name5);
			if(edecl1 == null) {
				throw new js__$Boot_HaxeError("Enum not found " + name5);
			}
			var e2 = this.unserializeEnum(edecl1,this.unserialize());
			this.cache.push(e2);
			return e2;
		case 120:
			throw js__$Boot_HaxeError.wrap(this.unserialize());
			break;
		case 121:
			var len1 = this.readDigits();
			if(this.buf.charCodeAt(this.pos++) != 58 || this.length - this.pos < len1) {
				throw new js__$Boot_HaxeError("Invalid string length");
			}
			var s1 = HxOverrides.substr(this.buf,this.pos,len1);
			this.pos += len1;
			s1 = decodeURIComponent(s1.split("+").join(" "));
			this.scache.push(s1);
			return s1;
		case 122:
			return 0;
		default:
		}
		this.pos--;
		throw new js__$Boot_HaxeError("Invalid char " + this.buf.charAt(this.pos) + " at position " + this.pos);
	}
	,__class__: haxe_Unserializer
};
var haxe__$Unserializer_NullResolver = function() {
};
$hxClasses["haxe._Unserializer.NullResolver"] = haxe__$Unserializer_NullResolver;
haxe__$Unserializer_NullResolver.__name__ = ["haxe","_Unserializer","NullResolver"];
haxe__$Unserializer_NullResolver.instance = null;
haxe__$Unserializer_NullResolver.prototype = {
	resolveClass: function(name) {
		return null;
	}
	,resolveEnum: function(name) {
		return null;
	}
	,__class__: haxe__$Unserializer_NullResolver
};
var haxe_Utf8 = function() { };
$hxClasses["haxe.Utf8"] = haxe_Utf8;
haxe_Utf8.__name__ = ["haxe","Utf8"];
haxe_Utf8.compare = function(a,b) {
	if(a > b) {
		return 1;
	} else if(a == b) {
		return 0;
	} else {
		return -1;
	}
};
var haxe_crypto_Base64 = function() { };
$hxClasses["haxe.crypto.Base64"] = haxe_crypto_Base64;
haxe_crypto_Base64.__name__ = ["haxe","crypto","Base64"];
haxe_crypto_Base64.decode = function(str,complement) {
	if(complement == null) {
		complement = true;
	}
	if(complement) {
		while(HxOverrides.cca(str,str.length - 1) == 61) str = HxOverrides.substr(str,0,-1);
	}
	return new haxe_crypto_BaseCode(haxe_crypto_Base64.BYTES).decodeBytes(haxe_io_Bytes.ofString(str));
};
var haxe_crypto_BaseCode = function(base) {
	var len = base.length;
	var nbits = 1;
	while(len > 1 << nbits) ++nbits;
	if(nbits > 8 || len != 1 << nbits) {
		throw new js__$Boot_HaxeError("BaseCode : base length must be a power of two.");
	}
	this.base = base;
	this.nbits = nbits;
};
$hxClasses["haxe.crypto.BaseCode"] = haxe_crypto_BaseCode;
haxe_crypto_BaseCode.__name__ = ["haxe","crypto","BaseCode"];
haxe_crypto_BaseCode.prototype = {
	encodeBytes: function(b) {
		var nbits = this.nbits;
		var base = this.base;
		var size = b.length * 8 / nbits | 0;
		var out = new haxe_io_Bytes(new ArrayBuffer(size + (b.length * 8 % nbits == 0 ? 0 : 1)));
		var buf = 0;
		var curbits = 0;
		var mask = (1 << nbits) - 1;
		var pin = 0;
		var pout = 0;
		while(pout < size) {
			while(curbits < nbits) {
				curbits += 8;
				buf <<= 8;
				buf |= b.b[pin++];
			}
			curbits -= nbits;
			out.b[pout++] = base.b[buf >> curbits & mask] & 255;
		}
		if(curbits > 0) {
			out.b[pout++] = base.b[buf << nbits - curbits & mask] & 255;
		}
		return out;
	}
	,initTable: function() {
		var tbl = [];
		var _g = 0;
		while(_g < 256) tbl[_g++] = -1;
		var _g1 = 0;
		var _g2 = this.base.length;
		while(_g1 < _g2) {
			var i = _g1++;
			tbl[this.base.b[i]] = i;
		}
		this.tbl = tbl;
	}
	,decodeBytes: function(b) {
		var nbits = this.nbits;
		if(this.tbl == null) {
			this.initTable();
		}
		var tbl = this.tbl;
		var size = b.length * nbits >> 3;
		var out = new haxe_io_Bytes(new ArrayBuffer(size));
		var buf = 0;
		var curbits = 0;
		var pin = 0;
		var pout = 0;
		while(pout < size) {
			while(curbits < 8) {
				curbits += nbits;
				buf <<= nbits;
				var i = tbl[b.b[pin++]];
				if(i == -1) {
					throw new js__$Boot_HaxeError("BaseCode : invalid encoded char");
				}
				buf |= i;
			}
			curbits -= 8;
			out.b[pout++] = buf >> curbits & 255 & 255;
		}
		return out;
	}
	,__class__: haxe_crypto_BaseCode
};
var haxe_crypto_Md5 = function() {
};
$hxClasses["haxe.crypto.Md5"] = haxe_crypto_Md5;
haxe_crypto_Md5.__name__ = ["haxe","crypto","Md5"];
haxe_crypto_Md5.encode = function(s) {
	var m = new haxe_crypto_Md5();
	return m.hex(m.doEncode(haxe_crypto_Md5.str2blks(s)));
};
haxe_crypto_Md5.str2blks = function(str) {
	var str1 = haxe_io_Bytes.ofString(str);
	var nblk = (str1.length + 8 >> 6) + 1;
	var blks = [];
	var blksSize = nblk * 16;
	var _g1 = 0;
	while(_g1 < blksSize) blks[_g1++] = 0;
	var i = 0;
	var max = str1.length;
	var l = max * 8;
	while(i < max) {
		blks[i >> 2] |= str1.b[i] << (l + i) % 4 * 8;
		++i;
	}
	blks[i >> 2] |= 128 << (l + i) % 4 * 8;
	var k = nblk * 16 - 2;
	blks[k] = l & 255;
	blks[k] = (blks[k] |= (l >>> 8 & 255) << 8) | (l >>> 16 & 255) << 16;
	blks[k] |= (l >>> 24 & 255) << 24;
	return blks;
};
haxe_crypto_Md5.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(x,y) {
		var lsw = (x & 65535) + (y & 65535);
		return (x >> 16) + (y >> 16) + (lsw >> 16) << 16 | lsw & 65535;
	}
	,hex: function(a) {
		var str = "";
		var _g = 0;
		while(_g < a.length) {
			var num = a[_g];
			++_g;
			var _g1 = 0;
			while(_g1 < 4) {
				var j = _g1++;
				str += "0123456789abcdef".charAt(num >> j * 8 + 4 & 15) + "0123456789abcdef".charAt(num >> j * 8 & 15);
			}
		}
		return str;
	}
	,rol: function(num,cnt) {
		return num << cnt | num >>> 32 - cnt;
	}
	,cmn: function(q,a,b,x,s,t) {
		return this.addme(this.rol(this.addme(this.addme(a,q),this.addme(x,t)),s),b);
	}
	,ff: function(a,b,c,d,x,s,t) {
		return this.cmn(this.bitOR(this.bitAND(b,c),this.bitAND(~b,d)),a,b,x,s,t);
	}
	,gg: function(a,b,c,d,x,s,t) {
		return this.cmn(this.bitOR(this.bitAND(b,d),this.bitAND(c,~d)),a,b,x,s,t);
	}
	,hh: function(a,b,c,d,x,s,t) {
		return this.cmn(this.bitXOR(this.bitXOR(b,c),d),a,b,x,s,t);
	}
	,ii: function(a,b,c,d,x,s,t) {
		return this.cmn(this.bitXOR(c,this.bitOR(b,~d)),a,b,x,s,t);
	}
	,doEncode: function(x) {
		var a = 1732584193;
		var b = -271733879;
		var c = -1732584194;
		var d = 271733878;
		var i = 0;
		while(i < x.length) {
			var olda = a;
			var oldb = b;
			var oldc = c;
			var oldd = d;
			a = this.ff(a,b,c,d,x[i],7,-680876936);
			d = this.ff(d,a,b,c,x[i + 1],12,-389564586);
			c = this.ff(c,d,a,b,x[i + 2],17,606105819);
			b = this.ff(b,c,d,a,x[i + 3],22,-1044525330);
			a = this.ff(a,b,c,d,x[i + 4],7,-176418897);
			d = this.ff(d,a,b,c,x[i + 5],12,1200080426);
			c = this.ff(c,d,a,b,x[i + 6],17,-1473231341);
			b = this.ff(b,c,d,a,x[i + 7],22,-45705983);
			a = this.ff(a,b,c,d,x[i + 8],7,1770035416);
			d = this.ff(d,a,b,c,x[i + 9],12,-1958414417);
			c = this.ff(c,d,a,b,x[i + 10],17,-42063);
			b = this.ff(b,c,d,a,x[i + 11],22,-1990404162);
			a = this.ff(a,b,c,d,x[i + 12],7,1804603682);
			d = this.ff(d,a,b,c,x[i + 13],12,-40341101);
			c = this.ff(c,d,a,b,x[i + 14],17,-1502002290);
			b = this.ff(b,c,d,a,x[i + 15],22,1236535329);
			a = this.gg(a,b,c,d,x[i + 1],5,-165796510);
			d = this.gg(d,a,b,c,x[i + 6],9,-1069501632);
			c = this.gg(c,d,a,b,x[i + 11],14,643717713);
			b = this.gg(b,c,d,a,x[i],20,-373897302);
			a = this.gg(a,b,c,d,x[i + 5],5,-701558691);
			d = this.gg(d,a,b,c,x[i + 10],9,38016083);
			c = this.gg(c,d,a,b,x[i + 15],14,-660478335);
			b = this.gg(b,c,d,a,x[i + 4],20,-405537848);
			a = this.gg(a,b,c,d,x[i + 9],5,568446438);
			d = this.gg(d,a,b,c,x[i + 14],9,-1019803690);
			c = this.gg(c,d,a,b,x[i + 3],14,-187363961);
			b = this.gg(b,c,d,a,x[i + 8],20,1163531501);
			a = this.gg(a,b,c,d,x[i + 13],5,-1444681467);
			d = this.gg(d,a,b,c,x[i + 2],9,-51403784);
			c = this.gg(c,d,a,b,x[i + 7],14,1735328473);
			b = this.gg(b,c,d,a,x[i + 12],20,-1926607734);
			a = this.hh(a,b,c,d,x[i + 5],4,-378558);
			d = this.hh(d,a,b,c,x[i + 8],11,-2022574463);
			c = this.hh(c,d,a,b,x[i + 11],16,1839030562);
			b = this.hh(b,c,d,a,x[i + 14],23,-35309556);
			a = this.hh(a,b,c,d,x[i + 1],4,-1530992060);
			d = this.hh(d,a,b,c,x[i + 4],11,1272893353);
			c = this.hh(c,d,a,b,x[i + 7],16,-155497632);
			b = this.hh(b,c,d,a,x[i + 10],23,-1094730640);
			a = this.hh(a,b,c,d,x[i + 13],4,681279174);
			d = this.hh(d,a,b,c,x[i],11,-358537222);
			c = this.hh(c,d,a,b,x[i + 3],16,-722521979);
			b = this.hh(b,c,d,a,x[i + 6],23,76029189);
			a = this.hh(a,b,c,d,x[i + 9],4,-640364487);
			d = this.hh(d,a,b,c,x[i + 12],11,-421815835);
			c = this.hh(c,d,a,b,x[i + 15],16,530742520);
			b = this.hh(b,c,d,a,x[i + 2],23,-995338651);
			a = this.ii(a,b,c,d,x[i],6,-198630844);
			d = this.ii(d,a,b,c,x[i + 7],10,1126891415);
			c = this.ii(c,d,a,b,x[i + 14],15,-1416354905);
			b = this.ii(b,c,d,a,x[i + 5],21,-57434055);
			a = this.ii(a,b,c,d,x[i + 12],6,1700485571);
			d = this.ii(d,a,b,c,x[i + 3],10,-1894986606);
			c = this.ii(c,d,a,b,x[i + 10],15,-1051523);
			b = this.ii(b,c,d,a,x[i + 1],21,-2054922799);
			a = this.ii(a,b,c,d,x[i + 8],6,1873313359);
			d = this.ii(d,a,b,c,x[i + 15],10,-30611744);
			c = this.ii(c,d,a,b,x[i + 6],15,-1560198380);
			b = this.ii(b,c,d,a,x[i + 13],21,1309151649);
			a = this.ii(a,b,c,d,x[i + 4],6,-145523070);
			d = this.ii(d,a,b,c,x[i + 11],10,-1120210379);
			c = this.ii(c,d,a,b,x[i + 2],15,718787259);
			b = this.ii(b,c,d,a,x[i + 9],21,-343485551);
			a = this.addme(a,olda);
			b = this.addme(b,oldb);
			c = this.addme(c,oldc);
			d = this.addme(d,oldd);
			i += 16;
		}
		return [a,b,c,d];
	}
	,__class__: haxe_crypto_Md5
};
var haxe_ds_ArraySort = function() { };
$hxClasses["haxe.ds.ArraySort"] = haxe_ds_ArraySort;
haxe_ds_ArraySort.__name__ = ["haxe","ds","ArraySort"];
haxe_ds_ArraySort.sort = function(a,cmp) {
	haxe_ds_ArraySort.rec(a,cmp,0,a.length);
};
haxe_ds_ArraySort.rec = function(a,cmp,from,to) {
	var middle = from + to >> 1;
	if(to - from < 12) {
		if(to <= from) {
			return;
		}
		var _g1 = from + 1;
		while(_g1 < to) {
			var j = _g1++;
			while(j > from) {
				if(cmp(a[j],a[j - 1]) < 0) {
					haxe_ds_ArraySort.swap(a,j - 1,j);
				} else {
					break;
				}
				--j;
			}
		}
		return;
	}
	haxe_ds_ArraySort.rec(a,cmp,from,middle);
	haxe_ds_ArraySort.rec(a,cmp,middle,to);
	haxe_ds_ArraySort.doMerge(a,cmp,from,middle,to,middle - from,to - middle);
};
haxe_ds_ArraySort.doMerge = function(a,cmp,from,pivot,to,len1,len2) {
	var first_cut;
	var second_cut;
	var len11;
	var len22;
	var new_mid;
	if(len1 == 0 || len2 == 0) {
		return;
	}
	if(len1 + len2 == 2) {
		if(cmp(a[pivot],a[from]) < 0) {
			haxe_ds_ArraySort.swap(a,pivot,from);
		}
		return;
	}
	if(len1 > len2) {
		len11 = len1 >> 1;
		first_cut = from + len11;
		second_cut = haxe_ds_ArraySort.lower(a,cmp,pivot,to,first_cut);
		len22 = second_cut - pivot;
	} else {
		len22 = len2 >> 1;
		second_cut = pivot + len22;
		first_cut = haxe_ds_ArraySort.upper(a,cmp,from,pivot,second_cut);
		len11 = first_cut - from;
	}
	haxe_ds_ArraySort.rotate(a,cmp,first_cut,pivot,second_cut);
	new_mid = first_cut + len22;
	haxe_ds_ArraySort.doMerge(a,cmp,from,first_cut,new_mid,len11,len22);
	haxe_ds_ArraySort.doMerge(a,cmp,new_mid,second_cut,to,len1 - len11,len2 - len22);
};
haxe_ds_ArraySort.rotate = function(a,cmp,from,mid,to) {
	var n;
	if(from == mid || mid == to) {
		return;
	}
	n = haxe_ds_ArraySort.gcd(to - from,mid - from);
	while(n-- != 0) {
		var val = a[from + n];
		var shift = mid - from;
		var p1 = from + n;
		var p2 = from + n + shift;
		while(p2 != from + n) {
			a[p1] = a[p2];
			p1 = p2;
			if(to - p2 > shift) {
				p2 += shift;
			} else {
				p2 = from + (shift - (to - p2));
			}
		}
		a[p1] = val;
	}
};
haxe_ds_ArraySort.gcd = function(m,n) {
	while(n != 0) {
		var t = m % n;
		m = n;
		n = t;
	}
	return m;
};
haxe_ds_ArraySort.upper = function(a,cmp,from,to,val) {
	var len = to - from;
	var half;
	var mid;
	while(len > 0) {
		half = len >> 1;
		mid = from + half;
		if(cmp(a[val],a[mid]) < 0) {
			len = half;
		} else {
			from = mid + 1;
			len = len - half - 1;
		}
	}
	return from;
};
haxe_ds_ArraySort.lower = function(a,cmp,from,to,val) {
	var len = to - from;
	var half;
	var mid;
	while(len > 0) {
		half = len >> 1;
		mid = from + half;
		if(cmp(a[mid],a[val]) < 0) {
			from = mid + 1;
			len = len - half - 1;
		} else {
			len = half;
		}
	}
	return from;
};
haxe_ds_ArraySort.swap = function(a,i,j) {
	var tmp = a[i];
	a[i] = a[j];
	a[j] = tmp;
};
var haxe_ds_BalancedTree = function() {
};
$hxClasses["haxe.ds.BalancedTree"] = haxe_ds_BalancedTree;
haxe_ds_BalancedTree.__name__ = ["haxe","ds","BalancedTree"];
haxe_ds_BalancedTree.prototype = {
	set: function(key,value) {
		this.root = this.setLoop(key,value,this.root);
	}
	,get: function(key) {
		var node = this.root;
		while(node != null) {
			var c = this.compare(key,node.key);
			if(c == 0) {
				return node.value;
			}
			if(c < 0) {
				node = node.left;
			} else {
				node = node.right;
			}
		}
		return null;
	}
	,remove: function(key) {
		try {
			this.root = this.removeLoop(key,this.root);
			return true;
		} catch( e ) {
			haxe_CallStack.lastException = e;
			if (e instanceof js__$Boot_HaxeError) e = e.val;
			if( js_Boot.__instanceof(e,String) ) {
				return false;
			} else throw(e);
		}
	}
	,exists: function(key) {
		var node = this.root;
		while(node != null) {
			var c = this.compare(key,node.key);
			if(c == 0) {
				return true;
			} else if(c < 0) {
				node = node.left;
			} else {
				node = node.right;
			}
		}
		return false;
	}
	,keys: function() {
		var ret = [];
		this.keysLoop(this.root,ret);
		return HxOverrides.iter(ret);
	}
	,setLoop: function(k,v,node) {
		if(node == null) {
			return new haxe_ds_TreeNode(null,k,v,null);
		}
		var c = this.compare(k,node.key);
		if(c == 0) {
			return new haxe_ds_TreeNode(node.left,k,v,node.right,node == null ? 0 : node._height);
		} else if(c < 0) {
			return this.balance(this.setLoop(k,v,node.left),node.key,node.value,node.right);
		} else {
			var nr = this.setLoop(k,v,node.right);
			return this.balance(node.left,node.key,node.value,nr);
		}
	}
	,removeLoop: function(k,node) {
		if(node == null) {
			throw new js__$Boot_HaxeError("Not_found");
		}
		var c = this.compare(k,node.key);
		if(c == 0) {
			return this.merge(node.left,node.right);
		} else if(c < 0) {
			return this.balance(this.removeLoop(k,node.left),node.key,node.value,node.right);
		} else {
			return this.balance(node.left,node.key,node.value,this.removeLoop(k,node.right));
		}
	}
	,keysLoop: function(node,acc) {
		if(node != null) {
			this.keysLoop(node.left,acc);
			acc.push(node.key);
			this.keysLoop(node.right,acc);
		}
	}
	,merge: function(t1,t2) {
		if(t1 == null) {
			return t2;
		}
		if(t2 == null) {
			return t1;
		}
		var t = this.minBinding(t2);
		return this.balance(t1,t.key,t.value,this.removeMinBinding(t2));
	}
	,minBinding: function(t) {
		if(t == null) {
			throw new js__$Boot_HaxeError("Not_found");
		} else if(t.left == null) {
			return t;
		} else {
			return this.minBinding(t.left);
		}
	}
	,removeMinBinding: function(t) {
		if(t.left == null) {
			return t.right;
		} else {
			return this.balance(this.removeMinBinding(t.left),t.key,t.value,t.right);
		}
	}
	,balance: function(l,k,v,r) {
		var hl = l == null ? 0 : l._height;
		var hr = r == null ? 0 : r._height;
		if(hl > hr + 2) {
			var _this = l.left;
			var _this1 = l.right;
			if((_this == null ? 0 : _this._height) >= (_this1 == null ? 0 : _this1._height)) {
				return new haxe_ds_TreeNode(l.left,l.key,l.value,new haxe_ds_TreeNode(l.right,k,v,r));
			} else {
				return new haxe_ds_TreeNode(new haxe_ds_TreeNode(l.left,l.key,l.value,l.right.left),l.right.key,l.right.value,new haxe_ds_TreeNode(l.right.right,k,v,r));
			}
		} else if(hr > hl + 2) {
			var _this2 = r.right;
			var _this3 = r.left;
			if((_this2 == null ? 0 : _this2._height) > (_this3 == null ? 0 : _this3._height)) {
				return new haxe_ds_TreeNode(new haxe_ds_TreeNode(l,k,v,r.left),r.key,r.value,r.right);
			} else {
				return new haxe_ds_TreeNode(new haxe_ds_TreeNode(l,k,v,r.left.left),r.left.key,r.left.value,new haxe_ds_TreeNode(r.left.right,r.key,r.value,r.right));
			}
		} else {
			return new haxe_ds_TreeNode(l,k,v,r,(hl > hr ? hl : hr) + 1);
		}
	}
	,compare: function(k1,k2) {
		return Reflect.compare(k1,k2);
	}
	,__class__: haxe_ds_BalancedTree
};
var haxe_ds_TreeNode = function(l,k,v,r,h) {
	if(h == null) {
		h = -1;
	}
	this.left = l;
	this.key = k;
	this.value = v;
	this.right = r;
	if(h == -1) {
		var tmp;
		var _this = this.left;
		var _this1 = this.right;
		if((_this == null ? 0 : _this._height) > (_this1 == null ? 0 : _this1._height)) {
			var _this2 = this.left;
			if(_this2 == null) {
				tmp = 0;
			} else {
				tmp = _this2._height;
			}
		} else {
			var _this3 = this.right;
			if(_this3 == null) {
				tmp = 0;
			} else {
				tmp = _this3._height;
			}
		}
		this._height = tmp + 1;
	} else {
		this._height = h;
	}
};
$hxClasses["haxe.ds.TreeNode"] = haxe_ds_TreeNode;
haxe_ds_TreeNode.__name__ = ["haxe","ds","TreeNode"];
haxe_ds_TreeNode.prototype = {
	__class__: haxe_ds_TreeNode
};
var haxe_ds_EnumValueMap = function() {
	haxe_ds_BalancedTree.call(this);
};
$hxClasses["haxe.ds.EnumValueMap"] = haxe_ds_EnumValueMap;
haxe_ds_EnumValueMap.__name__ = ["haxe","ds","EnumValueMap"];
haxe_ds_EnumValueMap.__interfaces__ = [haxe_IMap];
haxe_ds_EnumValueMap.__super__ = haxe_ds_BalancedTree;
haxe_ds_EnumValueMap.prototype = $extend(haxe_ds_BalancedTree.prototype,{
	compare: function(k1,k2) {
		var d = k1[1] - k2[1];
		if(d != 0) {
			return d;
		}
		var p1 = k1.slice(2);
		var p2 = k2.slice(2);
		if(p1.length == 0 && p2.length == 0) {
			return 0;
		}
		return this.compareArgs(p1,p2);
	}
	,compareArgs: function(a1,a2) {
		var ld = a1.length - a2.length;
		if(ld != 0) {
			return ld;
		}
		var _g1 = 0;
		var _g = a1.length;
		while(_g1 < _g) {
			var i = _g1++;
			var d = this.compareArg(a1[i],a2[i]);
			if(d != 0) {
				return d;
			}
		}
		return 0;
	}
	,compareArg: function(v1,v2) {
		if(Reflect.isEnumValue(v1) && Reflect.isEnumValue(v2)) {
			return this.compare(v1,v2);
		} else if((v1 instanceof Array) && v1.__enum__ == null && ((v2 instanceof Array) && v2.__enum__ == null)) {
			return this.compareArgs(v1,v2);
		} else {
			return Reflect.compare(v1,v2);
		}
	}
	,__class__: haxe_ds_EnumValueMap
});
var haxe_ds_IntMap = function() {
	this.h = { };
};
$hxClasses["haxe.ds.IntMap"] = haxe_ds_IntMap;
haxe_ds_IntMap.__name__ = ["haxe","ds","IntMap"];
haxe_ds_IntMap.__interfaces__ = [haxe_IMap];
haxe_ds_IntMap.prototype = {
	set: function(key,value) {
		this.h[key] = value;
	}
	,get: function(key) {
		return this.h[key];
	}
	,exists: function(key) {
		return this.h.hasOwnProperty(key);
	}
	,remove: function(key) {
		if(!this.h.hasOwnProperty(key)) {
			return false;
		}
		delete(this.h[key]);
		return true;
	}
	,keys: function() {
		var a = [];
		for( var key in this.h ) if(this.h.hasOwnProperty(key)) {
			a.push(key | 0);
		}
		return HxOverrides.iter(a);
	}
	,__class__: haxe_ds_IntMap
};
var haxe_ds_ObjectMap = function() {
	this.h = { __keys__ : { }};
};
$hxClasses["haxe.ds.ObjectMap"] = haxe_ds_ObjectMap;
haxe_ds_ObjectMap.__name__ = ["haxe","ds","ObjectMap"];
haxe_ds_ObjectMap.__interfaces__ = [haxe_IMap];
haxe_ds_ObjectMap.assignId = function(obj) {
	return obj.__id__ = ++haxe_ds_ObjectMap.count;
};
haxe_ds_ObjectMap.getId = function(obj) {
	return obj.__id__;
};
haxe_ds_ObjectMap.prototype = {
	set: function(key,value) {
		var id = key.__id__ || (key.__id__ = ++haxe_ds_ObjectMap.count);
		this.h[id] = value;
		this.h.__keys__[id] = key;
	}
	,get: function(key) {
		return this.h[key.__id__];
	}
	,exists: function(key) {
		return this.h.__keys__[key.__id__] != null;
	}
	,remove: function(key) {
		var id = key.__id__;
		if(this.h.__keys__[id] == null) {
			return false;
		}
		delete(this.h[id]);
		delete(this.h.__keys__[id]);
		return true;
	}
	,keys: function() {
		var a = [];
		for( var key in this.h.__keys__ ) {
		if(this.h.hasOwnProperty(key)) {
			a.push(this.h.__keys__[key]);
		}
		}
		return HxOverrides.iter(a);
	}
	,__class__: haxe_ds_ObjectMap
};
var haxe_ds__$StringMap_StringMapIterator = function(map,keys) {
	this.map = map;
	this.keys = keys;
	this.index = 0;
	this.count = keys.length;
};
$hxClasses["haxe.ds._StringMap.StringMapIterator"] = haxe_ds__$StringMap_StringMapIterator;
haxe_ds__$StringMap_StringMapIterator.__name__ = ["haxe","ds","_StringMap","StringMapIterator"];
haxe_ds__$StringMap_StringMapIterator.prototype = {
	hasNext: function() {
		return this.index < this.count;
	}
	,next: function() {
		var _this = this.map;
		var key = this.keys[this.index++];
		if(__map_reserved[key] != null) {
			return _this.getReserved(key);
		} else {
			return _this.h[key];
		}
	}
	,__class__: haxe_ds__$StringMap_StringMapIterator
};
var haxe_ds_StringMap = function() {
	this.h = { };
};
$hxClasses["haxe.ds.StringMap"] = haxe_ds_StringMap;
haxe_ds_StringMap.__name__ = ["haxe","ds","StringMap"];
haxe_ds_StringMap.__interfaces__ = [haxe_IMap];
haxe_ds_StringMap.prototype = {
	set: function(key,value) {
		if(__map_reserved[key] != null) {
			this.setReserved(key,value);
		} else {
			this.h[key] = value;
		}
	}
	,get: function(key) {
		if(__map_reserved[key] != null) {
			return this.getReserved(key);
		}
		return this.h[key];
	}
	,exists: function(key) {
		if(__map_reserved[key] != null) {
			return this.existsReserved(key);
		}
		return this.h.hasOwnProperty(key);
	}
	,setReserved: function(key,value) {
		if(this.rh == null) {
			this.rh = { };
		}
		this.rh["$" + key] = value;
	}
	,getReserved: function(key) {
		if(this.rh == null) {
			return null;
		} else {
			return this.rh["$" + key];
		}
	}
	,existsReserved: function(key) {
		if(this.rh == null) {
			return false;
		}
		return this.rh.hasOwnProperty("$" + key);
	}
	,remove: function(key) {
		if(__map_reserved[key] != null) {
			key = "$" + key;
			if(this.rh == null || !this.rh.hasOwnProperty(key)) {
				return false;
			}
			delete(this.rh[key]);
			return true;
		} else {
			if(!this.h.hasOwnProperty(key)) {
				return false;
			}
			delete(this.h[key]);
			return true;
		}
	}
	,keys: function() {
		return HxOverrides.iter(this.arrayKeys());
	}
	,arrayKeys: function() {
		var out = [];
		for( var key in this.h ) {
		if(this.h.hasOwnProperty(key)) {
			out.push(key);
		}
		}
		if(this.rh != null) {
			for( var key in this.rh ) {
			if(key.charCodeAt(0) == 36) {
				out.push(key.substr(1));
			}
			}
		}
		return out;
	}
	,__class__: haxe_ds_StringMap
};
var haxe_ds__$Vector_Vector_$Impl_$ = {};
$hxClasses["haxe.ds._Vector.Vector_Impl_"] = haxe_ds__$Vector_Vector_$Impl_$;
haxe_ds__$Vector_Vector_$Impl_$.__name__ = ["haxe","ds","_Vector","Vector_Impl_"];
haxe_ds__$Vector_Vector_$Impl_$.blit = function(src,srcPos,dest,destPos,len) {
	if(src == dest) {
		if(srcPos < destPos) {
			var i = srcPos + len;
			var j = destPos + len;
			var _g1 = 0;
			while(_g1 < len) {
				++_g1;
				--i;
				--j;
				src[j] = src[i];
			}
		} else if(srcPos > destPos) {
			var i1 = srcPos;
			var j1 = destPos;
			var _g11 = 0;
			while(_g11 < len) {
				++_g11;
				src[j1] = src[i1];
				++i1;
				++j1;
			}
		}
	} else {
		var _g12 = 0;
		while(_g12 < len) {
			var i2 = _g12++;
			dest[destPos + i2] = src[srcPos + i2];
		}
	}
};
var haxe_io_Eof = function() { };
$hxClasses["haxe.io.Eof"] = haxe_io_Eof;
haxe_io_Eof.__name__ = ["haxe","io","Eof"];
haxe_io_Eof.prototype = {
	toString: function() {
		return "Eof";
	}
	,__class__: haxe_io_Eof
};
var haxe_io_Error = $hxClasses["haxe.io.Error"] = { __ename__ : ["haxe","io","Error"], __constructs__ : ["Blocked","Overflow","OutsideBounds","Custom"] };
haxe_io_Error.Blocked = ["Blocked",0];
haxe_io_Error.Blocked.toString = $estr;
haxe_io_Error.Blocked.__enum__ = haxe_io_Error;
haxe_io_Error.Overflow = ["Overflow",1];
haxe_io_Error.Overflow.toString = $estr;
haxe_io_Error.Overflow.__enum__ = haxe_io_Error;
haxe_io_Error.OutsideBounds = ["OutsideBounds",2];
haxe_io_Error.OutsideBounds.toString = $estr;
haxe_io_Error.OutsideBounds.__enum__ = haxe_io_Error;
haxe_io_Error.Custom = function(e) { var $x = ["Custom",3,e]; $x.__enum__ = haxe_io_Error; $x.toString = $estr; return $x; };
var haxe_io_FPHelper = function() { };
$hxClasses["haxe.io.FPHelper"] = haxe_io_FPHelper;
haxe_io_FPHelper.__name__ = ["haxe","io","FPHelper"];
haxe_io_FPHelper.i32ToFloat = function(i) {
	var exp = i >>> 23 & 255;
	var sig = i & 8388607;
	if(sig == 0 && exp == 0) {
		return 0.0;
	}
	return (1 - (i >>> 31 << 1)) * (1 + Math.pow(2,-23) * sig) * Math.pow(2,exp - 127);
};
haxe_io_FPHelper.floatToI32 = function(f) {
	if(f == 0) {
		return 0;
	}
	var af = f < 0 ? -f : f;
	var exp = Math.floor(Math.log(af) / 0.6931471805599453);
	if(exp < -127) {
		exp = -127;
	} else if(exp > 128) {
		exp = 128;
	}
	var sig = Math.round((af / Math.pow(2,exp) - 1) * 8388608);
	if(sig == 8388608 && exp < 128) {
		sig = 0;
		++exp;
	}
	return (f < 0 ? -2147483648 : 0) | exp + 127 << 23 | sig;
};
haxe_io_FPHelper.i64ToDouble = function(low,high) {
	var exp = (high >> 20 & 2047) - 1023;
	var sig = (high & 1048575) * 4294967296. + (low >>> 31) * 2147483648. + (low & 2147483647);
	if(sig == 0 && exp == -1023) {
		return 0.0;
	}
	return (1 - (high >>> 31 << 1)) * (1.0 + Math.pow(2,-52) * sig) * Math.pow(2,exp);
};
haxe_io_FPHelper.doubleToI64 = function(v) {
	var i64 = haxe_io_FPHelper.i64tmp;
	if(v == 0) {
		i64.low = 0;
		i64.high = 0;
	} else if(!isFinite(v)) {
		if(v > 0) {
			i64.low = 0;
			i64.high = 2146435072;
		} else {
			i64.low = 0;
			i64.high = -1048576;
		}
	} else {
		var av = v < 0 ? -v : v;
		var exp = Math.floor(Math.log(av) / 0.6931471805599453);
		var sig = Math.round((av / Math.pow(2,exp) - 1) * 4503599627370496.);
		i64.low = sig | 0;
		i64.high = (v < 0 ? -2147483648 : 0) | exp + 1023 << 20 | (sig / 4294967296.0 | 0);
	}
	return i64;
};
var haxe_io_Path = function(path) {
	switch(path) {
	case ".":case "..":
		this.dir = path;
		this.file = "";
		return;
	}
	var c1 = path.lastIndexOf("/");
	var c2 = path.lastIndexOf("\\");
	if(c1 < c2) {
		this.dir = HxOverrides.substr(path,0,c2);
		path = HxOverrides.substr(path,c2 + 1,null);
		this.backslash = true;
	} else if(c2 < c1) {
		this.dir = HxOverrides.substr(path,0,c1);
		path = HxOverrides.substr(path,c1 + 1,null);
	} else {
		this.dir = null;
	}
	var cp = path.lastIndexOf(".");
	if(cp != -1) {
		this.ext = HxOverrides.substr(path,cp + 1,null);
		this.file = HxOverrides.substr(path,0,cp);
	} else {
		this.ext = null;
		this.file = path;
	}
};
$hxClasses["haxe.io.Path"] = haxe_io_Path;
haxe_io_Path.__name__ = ["haxe","io","Path"];
haxe_io_Path.withoutExtension = function(path) {
	var s = new haxe_io_Path(path);
	s.ext = null;
	return s.toString();
};
haxe_io_Path.prototype = {
	toString: function() {
		return (this.dir == null ? "" : this.dir + (this.backslash ? "\\" : "/")) + this.file + (this.ext == null ? "" : "." + this.ext);
	}
	,__class__: haxe_io_Path
};
var haxe_xml__$Fast_NodeAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.NodeAccess"] = haxe_xml__$Fast_NodeAccess;
haxe_xml__$Fast_NodeAccess.__name__ = ["haxe","xml","_Fast","NodeAccess"];
haxe_xml__$Fast_NodeAccess.prototype = {
	resolve: function(name) {
		var x = this.__x.elementsNamed(name).next();
		if(x == null) {
			var xname;
			if(this.__x.nodeType == Xml.Document) {
				xname = "Document";
			} else {
				var _this = this.__x;
				if(_this.nodeType != Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + _this.nodeType);
				}
				xname = _this.nodeName;
			}
			throw new js__$Boot_HaxeError(xname + " is missing element " + name);
		}
		return new haxe_xml_Fast(x);
	}
	,__class__: haxe_xml__$Fast_NodeAccess
};
var haxe_xml__$Fast_AttribAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.AttribAccess"] = haxe_xml__$Fast_AttribAccess;
haxe_xml__$Fast_AttribAccess.__name__ = ["haxe","xml","_Fast","AttribAccess"];
haxe_xml__$Fast_AttribAccess.prototype = {
	resolve: function(name) {
		if(this.__x.nodeType == Xml.Document) {
			throw new js__$Boot_HaxeError("Cannot access document attribute " + name);
		}
		var v = this.__x.get(name);
		if(v == null) {
			var _this = this.__x;
			if(_this.nodeType != Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + _this.nodeType);
			}
			throw new js__$Boot_HaxeError(_this.nodeName + " is missing attribute " + name);
		}
		return v;
	}
	,__class__: haxe_xml__$Fast_AttribAccess
};
var haxe_xml__$Fast_HasAttribAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.HasAttribAccess"] = haxe_xml__$Fast_HasAttribAccess;
haxe_xml__$Fast_HasAttribAccess.__name__ = ["haxe","xml","_Fast","HasAttribAccess"];
haxe_xml__$Fast_HasAttribAccess.prototype = {
	resolve: function(name) {
		if(this.__x.nodeType == Xml.Document) {
			throw new js__$Boot_HaxeError("Cannot access document attribute " + name);
		}
		return this.__x.exists(name);
	}
	,__class__: haxe_xml__$Fast_HasAttribAccess
};
var haxe_xml__$Fast_HasNodeAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.HasNodeAccess"] = haxe_xml__$Fast_HasNodeAccess;
haxe_xml__$Fast_HasNodeAccess.__name__ = ["haxe","xml","_Fast","HasNodeAccess"];
haxe_xml__$Fast_HasNodeAccess.prototype = {
	resolve: function(name) {
		return this.__x.elementsNamed(name).hasNext();
	}
	,__class__: haxe_xml__$Fast_HasNodeAccess
};
var haxe_xml__$Fast_NodeListAccess = function(x) {
	this.__x = x;
};
$hxClasses["haxe.xml._Fast.NodeListAccess"] = haxe_xml__$Fast_NodeListAccess;
haxe_xml__$Fast_NodeListAccess.__name__ = ["haxe","xml","_Fast","NodeListAccess"];
haxe_xml__$Fast_NodeListAccess.prototype = {
	resolve: function(name) {
		var l = new List();
		var x = this.__x.elementsNamed(name);
		while(x.hasNext()) l.add(new haxe_xml_Fast(x.next()));
		return l;
	}
	,__class__: haxe_xml__$Fast_NodeListAccess
};
var haxe_xml_Fast = function(x) {
	if(x.nodeType != Xml.Document && x.nodeType != Xml.Element) {
		throw new js__$Boot_HaxeError("Invalid nodeType " + x.nodeType);
	}
	this.x = x;
	this.node = new haxe_xml__$Fast_NodeAccess(x);
	this.nodes = new haxe_xml__$Fast_NodeListAccess(x);
	this.att = new haxe_xml__$Fast_AttribAccess(x);
	this.has = new haxe_xml__$Fast_HasAttribAccess(x);
	this.hasNode = new haxe_xml__$Fast_HasNodeAccess(x);
};
$hxClasses["haxe.xml.Fast"] = haxe_xml_Fast;
haxe_xml_Fast.__name__ = ["haxe","xml","Fast"];
haxe_xml_Fast.prototype = {
	get_name: function() {
		if(this.x.nodeType == Xml.Document) {
			return "Document";
		} else {
			var _this = this.x;
			if(_this.nodeType != Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + _this.nodeType);
			}
			return _this.nodeName;
		}
	}
	,get_innerData: function() {
		var _this = this.x;
		if(_this.nodeType != Xml.Document && _this.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + _this.nodeType);
		}
		var it = HxOverrides.iter(_this.children);
		if(!it.hasNext()) {
			throw new js__$Boot_HaxeError(this.get_name() + " does not have data");
		}
		var v = it.next();
		if(it.hasNext()) {
			var n = it.next();
			var tmp;
			if(v.nodeType == Xml.PCData && n.nodeType == Xml.CData) {
				if(v.nodeType == Xml.Document || v.nodeType == Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, unexpected " + v.nodeType);
				}
				tmp = StringTools.trim(v.nodeValue) == "";
			} else {
				tmp = false;
			}
			if(tmp) {
				if(!it.hasNext()) {
					if(n.nodeType == Xml.Document || n.nodeType == Xml.Element) {
						throw new js__$Boot_HaxeError("Bad node type, unexpected " + n.nodeType);
					}
					return n.nodeValue;
				}
				var n2 = it.next();
				var tmp1;
				var tmp2;
				if(n2.nodeType == Xml.PCData) {
					if(n2.nodeType == Xml.Document || n2.nodeType == Xml.Element) {
						throw new js__$Boot_HaxeError("Bad node type, unexpected " + n2.nodeType);
					}
					tmp2 = StringTools.trim(n2.nodeValue) == "";
				} else {
					tmp2 = false;
				}
				if(tmp2) {
					tmp1 = !it.hasNext();
				} else {
					tmp1 = false;
				}
				if(tmp1) {
					if(n.nodeType == Xml.Document || n.nodeType == Xml.Element) {
						throw new js__$Boot_HaxeError("Bad node type, unexpected " + n.nodeType);
					}
					return n.nodeValue;
				}
			}
			throw new js__$Boot_HaxeError(this.get_name() + " does not only have data");
		}
		if(v.nodeType != Xml.PCData && v.nodeType != Xml.CData) {
			throw new js__$Boot_HaxeError(this.get_name() + " does not have data");
		}
		if(v.nodeType == Xml.Document || v.nodeType == Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, unexpected " + v.nodeType);
		}
		return v.nodeValue;
	}
	,get_elements: function() {
		var it = this.x.elements();
		return { hasNext : $bind(it,it.hasNext), next : function() {
			var x = it.next();
			if(x == null) {
				return null;
			}
			return new haxe_xml_Fast(x);
		}};
	}
	,__class__: haxe_xml_Fast
	,__properties__: {get_elements:"get_elements",get_innerData:"get_innerData",get_name:"get_name"}
};
var haxe_xml_XmlParserException = function(message,xml,position) {
	this.xml = xml;
	this.message = message;
	this.position = position;
	this.lineNumber = 1;
	this.positionAtLine = 0;
	var _g1 = 0;
	while(_g1 < position) {
		var c = xml.charCodeAt(_g1++);
		if(c == 10) {
			this.lineNumber++;
			this.positionAtLine = 0;
		} else if(c != 13) {
			this.positionAtLine++;
		}
	}
};
$hxClasses["haxe.xml.XmlParserException"] = haxe_xml_XmlParserException;
haxe_xml_XmlParserException.__name__ = ["haxe","xml","XmlParserException"];
haxe_xml_XmlParserException.prototype = {
	toString: function() {
		return Type.getClassName(js_Boot.getClass(this)) + ": " + this.message + " at line " + this.lineNumber + " char " + this.positionAtLine;
	}
	,__class__: haxe_xml_XmlParserException
};
var haxe_xml_Parser = function() { };
$hxClasses["haxe.xml.Parser"] = haxe_xml_Parser;
haxe_xml_Parser.__name__ = ["haxe","xml","Parser"];
haxe_xml_Parser.parse = function(str,strict) {
	if(strict == null) {
		strict = false;
	}
	var doc = Xml.createDocument();
	haxe_xml_Parser.doParse(str,strict,0,doc);
	return doc;
};
haxe_xml_Parser.doParse = function(str,strict,p,parent) {
	if(p == null) {
		p = 0;
	}
	var xml = null;
	var state = 1;
	var next = 1;
	var aname = null;
	var start = 0;
	var nsubs = 0;
	var nbrackets = 0;
	var c = str.charCodeAt(p);
	var buf = new StringBuf();
	var escapeNext = 1;
	var attrValQuote = -1;
	while(c == c) {
		switch(state) {
		case 0:
			switch(c) {
			case 9:case 10:case 13:case 32:
				break;
			default:
				state = next;
				continue;
			}
			break;
		case 1:
			if(c == 60) {
				state = 0;
				next = 2;
			} else {
				start = p;
				state = 13;
				continue;
			}
			break;
		case 2:
			switch(c) {
			case 33:
				if(str.charCodeAt(p + 1) == 91) {
					p += 2;
					if(HxOverrides.substr(str,p,6).toUpperCase() != "CDATA[") {
						throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected <![CDATA[",str,p));
					}
					p += 5;
					state = 17;
					start = p + 1;
				} else if(str.charCodeAt(p + 1) == 68 || str.charCodeAt(p + 1) == 100) {
					if(HxOverrides.substr(str,p + 2,6).toUpperCase() != "OCTYPE") {
						throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected <!DOCTYPE",str,p));
					}
					p += 8;
					state = 16;
					start = p + 1;
				} else if(str.charCodeAt(p + 1) != 45 || str.charCodeAt(p + 2) != 45) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected <!--",str,p));
				} else {
					p += 2;
					state = 15;
					start = p + 1;
				}
				break;
			case 47:
				if(parent == null) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",str,p));
				}
				start = p + 1;
				state = 0;
				next = 10;
				break;
			case 63:
				state = 14;
				start = p;
				break;
			default:
				state = 3;
				start = p;
				continue;
			}
			break;
		case 3:
			if(!(c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c == 58 || c == 46 || c == 95 || c == 45)) {
				if(p == start) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",str,p));
				}
				xml = Xml.createElement(HxOverrides.substr(str,start,p - start));
				parent.addChild(xml);
				++nsubs;
				state = 0;
				next = 4;
				continue;
			}
			break;
		case 4:
			switch(c) {
			case 47:
				state = 11;
				break;
			case 62:
				state = 9;
				break;
			default:
				state = 5;
				start = p;
				continue;
			}
			break;
		case 5:
			if(!(c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c == 58 || c == 46 || c == 95 || c == 45)) {
				var tmp;
				if(start == p) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected attribute name",str,p));
				}
				tmp = HxOverrides.substr(str,start,p - start);
				aname = tmp;
				if(xml.exists(tmp)) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Duplicate attribute [" + tmp + "]",str,p));
				}
				state = 0;
				next = 6;
				continue;
			}
			break;
		case 6:
			if(c == 61) {
				state = 0;
				next = 7;
			} else {
				throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected =",str,p));
			}
			break;
		case 7:
			switch(c) {
			case 34:case 39:
				buf = new StringBuf();
				state = 8;
				start = p + 1;
				attrValQuote = c;
				break;
			default:
				throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected \"",str,p));
			}
			break;
		case 8:
			switch(c) {
			case 38:
				var len = p - start;
				buf.b += len == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len);
				state = 18;
				escapeNext = 8;
				start = p + 1;
				break;
			case 60:case 62:
				if(strict) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Invalid unescaped " + String.fromCharCode(c) + " in attribute value",str,p));
				} else if(c == attrValQuote) {
					var len1 = p - start;
					buf.b += len1 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len1);
					var val = buf.b;
					buf = new StringBuf();
					xml.set(aname,val);
					state = 0;
					next = 4;
				}
				break;
			default:
				if(c == attrValQuote) {
					var len2 = p - start;
					buf.b += len2 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len2);
					var val1 = buf.b;
					buf = new StringBuf();
					xml.set(aname,val1);
					state = 0;
					next = 4;
				}
			}
			break;
		case 9:
			p = haxe_xml_Parser.doParse(str,strict,p,xml);
			start = p;
			state = 1;
			break;
		case 10:
			if(!(c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c == 58 || c == 46 || c == 95 || c == 45)) {
				if(start == p) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected node name",str,p));
				}
				var v = HxOverrides.substr(str,start,p - start);
				if(parent.nodeType != Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + parent.nodeType);
				}
				if(v != parent.nodeName) {
					if(parent.nodeType != Xml.Element) {
						throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + parent.nodeType);
					}
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected </" + parent.nodeName + ">",str,p));
				}
				state = 0;
				next = 12;
				continue;
			}
			break;
		case 11:
			if(c == 62) {
				state = 1;
			} else {
				throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",str,p));
			}
			break;
		case 12:
			if(c == 62) {
				if(nsubs == 0) {
					parent.addChild(Xml.createPCData(""));
				}
				return p;
			} else {
				throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Expected >",str,p));
			}
			break;
		case 13:
			if(c == 60) {
				var len3 = p - start;
				buf.b += len3 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len3);
				var child = Xml.createPCData(buf.b);
				buf = new StringBuf();
				parent.addChild(child);
				++nsubs;
				state = 0;
				next = 2;
			} else if(c == 38) {
				var len4 = p - start;
				buf.b += len4 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len4);
				state = 18;
				escapeNext = 13;
				start = p + 1;
			}
			break;
		case 14:
			if(c == 63 && str.charCodeAt(p + 1) == 62) {
				++p;
				parent.addChild(Xml.createProcessingInstruction(HxOverrides.substr(str,start + 1,p - start - 2)));
				++nsubs;
				state = 1;
			}
			break;
		case 15:
			if(c == 45 && str.charCodeAt(p + 1) == 45 && str.charCodeAt(p + 2) == 62) {
				parent.addChild(Xml.createComment(HxOverrides.substr(str,start,p - start)));
				++nsubs;
				p += 2;
				state = 1;
			}
			break;
		case 16:
			if(c == 91) {
				++nbrackets;
			} else if(c == 93) {
				--nbrackets;
			} else if(c == 62 && nbrackets == 0) {
				parent.addChild(Xml.createDocType(HxOverrides.substr(str,start,p - start)));
				++nsubs;
				state = 1;
			}
			break;
		case 17:
			if(c == 93 && str.charCodeAt(p + 1) == 93 && str.charCodeAt(p + 2) == 62) {
				parent.addChild(Xml.createCData(HxOverrides.substr(str,start,p - start)));
				++nsubs;
				p += 2;
				state = 1;
			}
			break;
		case 18:
			if(c == 59) {
				var s = HxOverrides.substr(str,start,p - start);
				if(s.charCodeAt(0) == 35) {
					var c1 = s.charCodeAt(1) == 120 ? Std.parseInt("0" + HxOverrides.substr(s,1,s.length - 1)) : Std.parseInt(HxOverrides.substr(s,1,s.length - 1));
					buf.b += String.fromCharCode(c1);
				} else {
					var _this = haxe_xml_Parser.escapes;
					if(!(__map_reserved[s] != null ? _this.existsReserved(s) : _this.h.hasOwnProperty(s))) {
						if(strict) {
							throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Undefined entity: " + s,str,p));
						}
						buf.b += Std.string("&" + s + ";");
					} else {
						var _this1 = haxe_xml_Parser.escapes;
						buf.b += Std.string(__map_reserved[s] != null ? _this1.getReserved(s) : _this1.h[s]);
					}
				}
				start = p + 1;
				state = escapeNext;
			} else if(!(c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c == 58 || c == 46 || c == 95 || c == 45) && c != 35) {
				if(strict) {
					throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Invalid character in entity: " + String.fromCharCode(c),str,p));
				}
				buf.b += "&";
				var len5 = p - start;
				buf.b += len5 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len5);
				start = p--;
				state = escapeNext;
			}
			break;
		}
		c = str.charCodeAt(++p);
	}
	if(state == 1) {
		start = p;
		state = 13;
	}
	if(state == 13) {
		if(p != start || nsubs == 0) {
			var len6 = p - start;
			buf.b += len6 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len6);
			parent.addChild(Xml.createPCData(buf.b));
		}
		return p;
	}
	if(!strict && state == 18 && escapeNext == 13) {
		buf.b += "&";
		var len7 = p - start;
		buf.b += len7 == null ? HxOverrides.substr(str,start,null) : HxOverrides.substr(str,start,len7);
		parent.addChild(Xml.createPCData(buf.b));
		return p;
	}
	throw new js__$Boot_HaxeError(new haxe_xml_XmlParserException("Unexpected end",str,p));
};
var haxe_xml_Printer = function(pretty) {
	this.output = new StringBuf();
	this.pretty = pretty;
};
$hxClasses["haxe.xml.Printer"] = haxe_xml_Printer;
haxe_xml_Printer.__name__ = ["haxe","xml","Printer"];
haxe_xml_Printer.print = function(xml,pretty) {
	if(pretty == null) {
		pretty = false;
	}
	var printer = new haxe_xml_Printer(pretty);
	printer.writeNode(xml,"");
	return printer.output.b;
};
haxe_xml_Printer.prototype = {
	writeNode: function(value,tabs) {
		switch(value.nodeType) {
		case 0:
			this.output.b += Std.string(tabs + "<");
			if(value.nodeType != Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + value.nodeType);
			}
			this.output.b += Std.string(value.nodeName);
			var attribute = value.attributes();
			while(attribute.hasNext()) {
				var attribute1 = attribute.next();
				this.output.b += Std.string(" " + attribute1 + "=\"");
				var input = StringTools.htmlEscape(value.get(attribute1),true);
				this.output.b += Std.string(input);
				this.output.b += "\"";
			}
			if(this.hasChildren(value)) {
				this.output.b += ">";
				if(this.pretty) {
					this.output.b += "\n";
				}
				if(value.nodeType != Xml.Document && value.nodeType != Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + value.nodeType);
				}
				var child = HxOverrides.iter(value.children);
				while(child.hasNext()) this.writeNode(child.next(),this.pretty ? tabs + "\t" : tabs);
				this.output.b += Std.string(tabs + "</");
				if(value.nodeType != Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, expected Element but found " + value.nodeType);
				}
				this.output.b += Std.string(value.nodeName);
				this.output.b += ">";
				if(this.pretty) {
					this.output.b += "\n";
				}
			} else {
				this.output.b += "/>";
				if(this.pretty) {
					this.output.b += "\n";
				}
			}
			break;
		case 1:
			if(value.nodeType == Xml.Document || value.nodeType == Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, unexpected " + value.nodeType);
			}
			var nodeValue = value.nodeValue;
			if(nodeValue.length != 0) {
				var input1 = tabs + StringTools.htmlEscape(nodeValue);
				this.output.b += Std.string(input1);
				if(this.pretty) {
					this.output.b += "\n";
				}
			}
			break;
		case 2:
			this.output.b += Std.string(tabs + "<![CDATA[");
			if(value.nodeType == Xml.Document || value.nodeType == Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, unexpected " + value.nodeType);
			}
			var input2 = StringTools.trim(value.nodeValue);
			this.output.b += Std.string(input2);
			this.output.b += "]]>";
			if(this.pretty) {
				this.output.b += "\n";
			}
			break;
		case 3:
			if(value.nodeType == Xml.Document || value.nodeType == Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, unexpected " + value.nodeType);
			}
			var commentContent = value.nodeValue;
			var _this_r = new RegExp("[\n\r\t]+","g".split("u").join(""));
			commentContent = commentContent.replace(_this_r,"");
			commentContent = "<!--" + commentContent + "-->";
			this.output.b += tabs == null ? "null" : "" + tabs;
			var input3 = StringTools.trim(commentContent);
			this.output.b += Std.string(input3);
			if(this.pretty) {
				this.output.b += "\n";
			}
			break;
		case 4:
			if(value.nodeType == Xml.Document || value.nodeType == Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, unexpected " + value.nodeType);
			}
			this.output.b += Std.string("<!DOCTYPE " + value.nodeValue + ">");
			if(this.pretty) {
				this.output.b += "\n";
			}
			break;
		case 5:
			if(value.nodeType == Xml.Document || value.nodeType == Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, unexpected " + value.nodeType);
			}
			this.output.b += Std.string("<?" + value.nodeValue + "?>");
			if(this.pretty) {
				this.output.b += "\n";
			}
			break;
		case 6:
			if(value.nodeType != Xml.Document && value.nodeType != Xml.Element) {
				throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + value.nodeType);
			}
			var child1 = HxOverrides.iter(value.children);
			while(child1.hasNext()) this.writeNode(child1.next(),tabs);
			break;
		}
	}
	,hasChildren: function(value) {
		if(value.nodeType != Xml.Document && value.nodeType != Xml.Element) {
			throw new js__$Boot_HaxeError("Bad node type, expected Element or Document but found " + value.nodeType);
		}
		var child = HxOverrides.iter(value.children);
		while(child.hasNext()) {
			var child1 = child.next();
			switch(child1.nodeType) {
			case 0:case 1:
				return true;
			case 2:case 3:
				if(child1.nodeType == Xml.Document || child1.nodeType == Xml.Element) {
					throw new js__$Boot_HaxeError("Bad node type, unexpected " + child1.nodeType);
				}
				if(StringTools.ltrim(child1.nodeValue).length != 0) {
					return true;
				}
				break;
			default:
			}
		}
		return false;
	}
	,__class__: haxe_xml_Printer
};
var js__$Boot_HaxeError = function(val) {
	Error.call(this);
	this.val = val;
	this.message = String(val);
	if(Error.captureStackTrace) {
		Error.captureStackTrace(this,js__$Boot_HaxeError);
	}
};
$hxClasses["js._Boot.HaxeError"] = js__$Boot_HaxeError;
js__$Boot_HaxeError.__name__ = ["js","_Boot","HaxeError"];
js__$Boot_HaxeError.wrap = function(val) {
	if((val instanceof Error)) {
		return val;
	} else {
		return new js__$Boot_HaxeError(val);
	}
};
js__$Boot_HaxeError.__super__ = Error;
js__$Boot_HaxeError.prototype = $extend(Error.prototype,{
	__class__: js__$Boot_HaxeError
});
var js_Browser = function() { };
$hxClasses["js.Browser"] = js_Browser;
js_Browser.__name__ = ["js","Browser"];
js_Browser.getLocalStorage = function() {
	try {
		var s = window.localStorage;
		s.getItem("");
		return s;
	} catch( e ) {
		haxe_CallStack.lastException = e;
		return null;
	}
};
js_Browser.alert = function(v) {
	window.alert(js_Boot.__string_rec(v,""));
};
var js_html_compat_ArrayBuffer = function(a) {
	if((a instanceof Array) && a.__enum__ == null) {
		this.a = a;
		this.byteLength = a.length;
	} else {
		var len = a;
		this.a = [];
		var _g1 = 0;
		var _g = len;
		while(_g1 < _g) this.a[_g1++] = 0;
		this.byteLength = len;
	}
};
$hxClasses["js.html.compat.ArrayBuffer"] = js_html_compat_ArrayBuffer;
js_html_compat_ArrayBuffer.__name__ = ["js","html","compat","ArrayBuffer"];
js_html_compat_ArrayBuffer.sliceImpl = function(begin,end) {
	var u = new Uint8Array(this,begin,end == null ? null : end - begin);
	var result = new ArrayBuffer(u.byteLength);
	new Uint8Array(result).set(u);
	return result;
};
js_html_compat_ArrayBuffer.prototype = {
	slice: function(begin,end) {
		return new js_html_compat_ArrayBuffer(this.a.slice(begin,end));
	}
	,__class__: js_html_compat_ArrayBuffer
};
var js_html_compat_DataView = function(buffer,byteOffset,byteLength) {
	this.buf = buffer;
	this.offset = byteOffset == null ? 0 : byteOffset;
	this.length = byteLength == null ? buffer.byteLength - this.offset : byteLength;
	if(this.offset < 0 || this.length < 0 || this.offset + this.length > buffer.byteLength) {
		throw new js__$Boot_HaxeError(haxe_io_Error.OutsideBounds);
	}
	this.byteLength = this.length;
	this.byteOffset = this.offset;
	this.buffer = this.buf;
};
$hxClasses["js.html.compat.DataView"] = js_html_compat_DataView;
js_html_compat_DataView.__name__ = ["js","html","compat","DataView"];
js_html_compat_DataView.prototype = {
	getInt8: function(byteOffset) {
		var v = this.buf.a[this.offset + byteOffset];
		if(v >= 128) {
			return v - 256;
		} else {
			return v;
		}
	}
	,getUint8: function(byteOffset) {
		return this.buf.a[this.offset + byteOffset];
	}
	,getInt16: function(byteOffset,littleEndian) {
		var v = this.getUint16(byteOffset,littleEndian);
		if(v >= 32768) {
			return v - 65536;
		} else {
			return v;
		}
	}
	,getUint16: function(byteOffset,littleEndian) {
		if(littleEndian) {
			return this.buf.a[this.offset + byteOffset] | this.buf.a[this.offset + byteOffset + 1] << 8;
		} else {
			return this.buf.a[this.offset + byteOffset] << 8 | this.buf.a[this.offset + byteOffset + 1];
		}
	}
	,getInt32: function(byteOffset,littleEndian) {
		var p = this.offset + byteOffset;
		var a = this.buf.a[p++];
		var b = this.buf.a[p++];
		var c = this.buf.a[p++];
		var d = this.buf.a[p++];
		if(littleEndian) {
			return a | b << 8 | c << 16 | d << 24;
		} else {
			return d | c << 8 | b << 16 | a << 24;
		}
	}
	,getUint32: function(byteOffset,littleEndian) {
		var v = this.getInt32(byteOffset,littleEndian);
		if(v < 0) {
			return v + 4294967296.;
		} else {
			return v;
		}
	}
	,getFloat32: function(byteOffset,littleEndian) {
		return haxe_io_FPHelper.i32ToFloat(this.getInt32(byteOffset,littleEndian));
	}
	,getFloat64: function(byteOffset,littleEndian) {
		var a = this.getInt32(byteOffset,littleEndian);
		var b = this.getInt32(byteOffset + 4,littleEndian);
		return haxe_io_FPHelper.i64ToDouble(littleEndian ? a : b,littleEndian ? b : a);
	}
	,setInt8: function(byteOffset,value) {
		this.buf.a[byteOffset + this.offset] = value < 0 ? value + 128 & 255 : value & 255;
	}
	,setUint8: function(byteOffset,value) {
		this.buf.a[byteOffset + this.offset] = value & 255;
	}
	,setInt16: function(byteOffset,value,littleEndian) {
		this.setUint16(byteOffset,value < 0 ? value + 65536 : value,littleEndian);
	}
	,setUint16: function(byteOffset,value,littleEndian) {
		var p = byteOffset + this.offset;
		if(littleEndian) {
			this.buf.a[p] = value & 255;
			this.buf.a[p++] = value >> 8 & 255;
		} else {
			this.buf.a[p++] = value >> 8 & 255;
			this.buf.a[p] = value & 255;
		}
	}
	,setInt32: function(byteOffset,value,littleEndian) {
		this.setUint32(byteOffset,value,littleEndian);
	}
	,setUint32: function(byteOffset,value,littleEndian) {
		var p = byteOffset + this.offset;
		if(littleEndian) {
			this.buf.a[p++] = value & 255;
			this.buf.a[p++] = value >> 8 & 255;
			this.buf.a[p++] = value >> 16 & 255;
			this.buf.a[p++] = value >>> 24;
		} else {
			this.buf.a[p++] = value >>> 24;
			this.buf.a[p++] = value >> 16 & 255;
			this.buf.a[p++] = value >> 8 & 255;
			this.buf.a[p++] = value & 255;
		}
	}
	,setFloat32: function(byteOffset,value,littleEndian) {
		this.setUint32(byteOffset,haxe_io_FPHelper.floatToI32(value),littleEndian);
	}
	,setFloat64: function(byteOffset,value,littleEndian) {
		var i64 = haxe_io_FPHelper.doubleToI64(value);
		if(littleEndian) {
			this.setUint32(byteOffset,i64.low);
			this.setUint32(byteOffset,i64.high);
		} else {
			this.setUint32(byteOffset,i64.high);
			this.setUint32(byteOffset,i64.low);
		}
	}
	,__class__: js_html_compat_DataView
};
var js_html_compat_Float32Array = function() { };
$hxClasses["js.html.compat.Float32Array"] = js_html_compat_Float32Array;
js_html_compat_Float32Array.__name__ = ["js","html","compat","Float32Array"];
js_html_compat_Float32Array._new = function(arg1,offset,length) {
	var arr;
	if(typeof(arg1) == "number") {
		arr = [];
		var _g1 = 0;
		var _g = arg1;
		while(_g1 < _g) {
			var i = _g1++;
			arr[i] = 0;
		}
		arr.byteLength = arr.length << 2;
		arr.byteOffset = 0;
		var _g2 = [];
		var _g21 = 0;
		var _g11 = arr.length << 2;
		while(_g21 < _g11) {
			var i1 = _g21++;
			_g2.push(0);
		}
		arr.buffer = new js_html_compat_ArrayBuffer(_g2);
	} else if(js_Boot.__instanceof(arg1,js_html_compat_ArrayBuffer)) {
		var buffer = arg1;
		if(offset == null) {
			offset = 0;
		}
		if(length == null) {
			length = buffer.byteLength - offset >> 2;
		}
		arr = [];
		var _g12 = 0;
		var _g3 = length;
		while(_g12 < _g3) {
			var i2 = _g12++;
			var val = buffer.a[offset++] | buffer.a[offset++] << 8 | buffer.a[offset++] << 16 | buffer.a[offset++] << 24;
			arr.push(haxe_io_FPHelper.i32ToFloat(val));
		}
		arr.byteLength = arr.length << 2;
		arr.byteOffset = offset;
		arr.buffer = buffer;
	} else if((arg1 instanceof Array) && arg1.__enum__ == null) {
		arr = arg1.slice();
		var buffer1 = [];
		var _g4 = 0;
		while(_g4 < arr.length) {
			var f = arr[_g4];
			++_g4;
			var i3 = haxe_io_FPHelper.floatToI32(f);
			buffer1.push(i3 & 255);
			buffer1.push(i3 >> 8 & 255);
			buffer1.push(i3 >> 16 & 255);
			buffer1.push(i3 >>> 24);
		}
		arr.byteLength = arr.length << 2;
		arr.byteOffset = 0;
		arr.buffer = new js_html_compat_ArrayBuffer(buffer1);
	} else {
		throw new js__$Boot_HaxeError("TODO " + Std.string(arg1));
	}
	arr.subarray = js_html_compat_Float32Array._subarray;
	arr.set = js_html_compat_Float32Array._set;
	return arr;
};
js_html_compat_Float32Array._set = function(arg,offset) {
	if(js_Boot.__instanceof(arg.buffer,js_html_compat_ArrayBuffer)) {
		var a = arg;
		if(arg.byteLength + offset > this.byteLength) {
			throw new js__$Boot_HaxeError("set() outside of range");
		}
		var _g1 = 0;
		var _g = arg.byteLength;
		while(_g1 < _g) {
			var i = _g1++;
			this[i + offset] = a[i];
		}
	} else if((arg instanceof Array) && arg.__enum__ == null) {
		var a1 = arg;
		if(a1.length + offset > this.byteLength) {
			throw new js__$Boot_HaxeError("set() outside of range");
		}
		var _g11 = 0;
		var _g2 = a1.length;
		while(_g11 < _g2) {
			var i1 = _g11++;
			this[i1 + offset] = a1[i1];
		}
	} else {
		throw new js__$Boot_HaxeError("TODO");
	}
};
js_html_compat_Float32Array._subarray = function(start,end) {
	var a = js_html_compat_Float32Array._new(this.slice(start,end));
	a.byteOffset = start * 4;
	return a;
};
var js_html_compat_Uint8Array = function() { };
$hxClasses["js.html.compat.Uint8Array"] = js_html_compat_Uint8Array;
js_html_compat_Uint8Array.__name__ = ["js","html","compat","Uint8Array"];
js_html_compat_Uint8Array._new = function(arg1,offset,length) {
	var arr;
	if(typeof(arg1) == "number") {
		arr = [];
		var _g1 = 0;
		var _g = arg1;
		while(_g1 < _g) {
			var i = _g1++;
			arr[i] = 0;
		}
		arr.byteLength = arr.length;
		arr.byteOffset = 0;
		arr.buffer = new js_html_compat_ArrayBuffer(arr);
	} else if(js_Boot.__instanceof(arg1,js_html_compat_ArrayBuffer)) {
		var buffer = arg1;
		if(offset == null) {
			offset = 0;
		}
		if(length == null) {
			length = buffer.byteLength - offset;
		}
		if(offset == 0) {
			arr = buffer.a;
		} else {
			arr = buffer.a.slice(offset,offset + length);
		}
		arr.byteLength = arr.length;
		arr.byteOffset = offset;
		arr.buffer = buffer;
	} else if((arg1 instanceof Array) && arg1.__enum__ == null) {
		arr = arg1.slice();
		arr.byteLength = arr.length;
		arr.byteOffset = 0;
		arr.buffer = new js_html_compat_ArrayBuffer(arr);
	} else {
		throw new js__$Boot_HaxeError("TODO " + Std.string(arg1));
	}
	arr.subarray = js_html_compat_Uint8Array._subarray;
	arr.set = js_html_compat_Uint8Array._set;
	return arr;
};
js_html_compat_Uint8Array._set = function(arg,offset) {
	if(js_Boot.__instanceof(arg.buffer,js_html_compat_ArrayBuffer)) {
		var a = arg;
		if(arg.byteLength + offset > this.byteLength) {
			throw new js__$Boot_HaxeError("set() outside of range");
		}
		var _g1 = 0;
		var _g = arg.byteLength;
		while(_g1 < _g) {
			var i = _g1++;
			this[i + offset] = a[i];
		}
	} else if((arg instanceof Array) && arg.__enum__ == null) {
		var a1 = arg;
		if(a1.length + offset > this.byteLength) {
			throw new js__$Boot_HaxeError("set() outside of range");
		}
		var _g11 = 0;
		var _g2 = a1.length;
		while(_g11 < _g2) {
			var i1 = _g11++;
			this[i1 + offset] = a1[i1];
		}
	} else {
		throw new js__$Boot_HaxeError("TODO");
	}
};
js_html_compat_Uint8Array._subarray = function(start,end) {
	var a = js_html_compat_Uint8Array._new(this.slice(start,end));
	a.byteOffset = start;
	return a;
};
var lime_AssetCache = function() {
	this.enabled = true;
	this.audio = new haxe_ds_StringMap();
	this.font = new haxe_ds_StringMap();
	this.image = new haxe_ds_StringMap();
	this.version = Math.random() * 1000000 | 0;
};
$hxClasses["lime.AssetCache"] = lime_AssetCache;
lime_AssetCache.__name__ = ["lime","AssetCache"];
lime_AssetCache.prototype = {
	clear: function(prefix) {
		if(prefix == null) {
			this.audio = new haxe_ds_StringMap();
			this.font = new haxe_ds_StringMap();
			this.image = new haxe_ds_StringMap();
		} else {
			var keys = this.audio.keys();
			while(keys.hasNext()) {
				var key = keys.next();
				if(StringTools.startsWith(key,prefix)) {
					this.audio.remove(key);
				}
			}
			var keys1 = this.font.keys();
			while(keys1.hasNext()) {
				var key1 = keys1.next();
				if(StringTools.startsWith(key1,prefix)) {
					this.font.remove(key1);
				}
			}
			var keys2 = this.image.keys();
			while(keys2.hasNext()) {
				var key2 = keys2.next();
				if(StringTools.startsWith(key2,prefix)) {
					this.image.remove(key2);
				}
			}
		}
	}
	,__class__: lime_AssetCache
};
var lime_app_Event_$Void_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Void_Void"] = lime_app_Event_$Void_$Void;
lime_app_Event_$Void_$Void.__name__ = ["lime","app","Event_Void_Void"];
lime_app_Event_$Void_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function() {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i]();
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Void_$Void
};
var lime_Assets = function() { };
$hxClasses["lime.Assets"] = lime_Assets;
lime_Assets.__name__ = ["lime","Assets"];
lime_Assets.exists = function(id,type) {
	lime_Assets.initialize();
	if(type == null) {
		type = "BINARY";
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		return library.exists(symbolName,type);
	}
	return false;
};
lime_Assets.getAudioBuffer = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.audio;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.audio;
		var audio = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
		if(lime_Assets.isValidAudio(audio)) {
			return audio;
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"SOUND")) {
			if(library.isLocal(symbolName,"SOUND")) {
				var audio1 = library.getAudioBuffer(symbolName);
				if(useCache && lime_Assets.cache.enabled) {
					var _this2 = lime_Assets.cache.audio;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,audio1);
					} else {
						_this2.h[id] = audio1;
					}
				}
				return audio1;
			} else {
				haxe_Log.trace("[Assets] Audio asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 122, className : "lime.Assets", methodName : "getAudioBuffer"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no audio asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 128, className : "lime.Assets", methodName : "getAudioBuffer"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 134, className : "lime.Assets", methodName : "getAudioBuffer"});
	}
	return null;
};
lime_Assets.getBytes = function(id) {
	lime_Assets.initialize();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"BINARY")) {
			if(library.isLocal(symbolName,"BINARY")) {
				return library.getBytes(symbolName);
			} else {
				haxe_Log.trace("[Assets] String or Bytes asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 171, className : "lime.Assets", methodName : "getBytes"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no String or Bytes asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 177, className : "lime.Assets", methodName : "getBytes"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 183, className : "lime.Assets", methodName : "getBytes"});
	}
	return null;
};
lime_Assets.getFont = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.font;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.font;
		if(__map_reserved[id] != null) {
			return _this1.getReserved(id);
		} else {
			return _this1.h[id];
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"FONT")) {
			if(library.isLocal(symbolName,"FONT")) {
				var font = library.getFont(symbolName);
				if(useCache && lime_Assets.cache.enabled) {
					var _this2 = lime_Assets.cache.font;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,font);
					} else {
						_this2.h[id] = font;
					}
				}
				return font;
			} else {
				haxe_Log.trace("[Assets] Font asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 234, className : "lime.Assets", methodName : "getFont"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no Font asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 240, className : "lime.Assets", methodName : "getFont"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 246, className : "lime.Assets", methodName : "getFont"});
	}
	return null;
};
lime_Assets.getImage = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.image;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.image;
		var image = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
		if(lime_Assets.isValidImage(image)) {
			return image;
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"IMAGE")) {
			if(library.isLocal(symbolName,"IMAGE")) {
				var image1 = library.getImage(symbolName);
				if(useCache && lime_Assets.cache.enabled) {
					var _this2 = lime_Assets.cache.image;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,image1);
					} else {
						_this2.h[id] = image1;
					}
				}
				return image1;
			} else {
				haxe_Log.trace("[Assets] Image asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 304, className : "lime.Assets", methodName : "getImage"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no Image asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 310, className : "lime.Assets", methodName : "getImage"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 316, className : "lime.Assets", methodName : "getImage"});
	}
	return null;
};
lime_Assets.getLibrary = function(name) {
	if(name == null || name == "") {
		name = "default";
	}
	var _this = lime_Assets.libraries;
	if(__map_reserved[name] != null) {
		return _this.getReserved(name);
	} else {
		return _this.h[name];
	}
};
lime_Assets.getPath = function(id) {
	lime_Assets.initialize();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,null)) {
			return library.getPath(symbolName);
		} else {
			haxe_Log.trace("[Assets] There is no asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 364, className : "lime.Assets", methodName : "getPath"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 370, className : "lime.Assets", methodName : "getPath"});
	}
	return null;
};
lime_Assets.getText = function(id) {
	lime_Assets.initialize();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"TEXT")) {
			if(library.isLocal(symbolName,"TEXT")) {
				return library.getText(symbolName);
			} else {
				haxe_Log.trace("[Assets] String asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 407, className : "lime.Assets", methodName : "getText"});
			}
		} else {
			haxe_Log.trace("[Assets] There is no String asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 413, className : "lime.Assets", methodName : "getText"});
		}
	} else {
		haxe_Log.trace("[Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 419, className : "lime.Assets", methodName : "getText"});
	}
	return null;
};
lime_Assets.initialize = function() {
	if(!lime_Assets.initialized) {
		lime_Assets.registerLibrary("default",new DefaultAssetLibrary());
		lime_Assets.initialized = true;
	}
};
lime_Assets.isLocal = function(id,type,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	if(useCache && lime_Assets.cache.enabled) {
		if(type == "IMAGE" || type == null) {
			var _this = lime_Assets.cache.image;
			if(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id)) {
				return true;
			}
		}
		if(type == "FONT" || type == null) {
			var _this1 = lime_Assets.cache.font;
			if(__map_reserved[id] != null ? _this1.existsReserved(id) : _this1.h.hasOwnProperty(id)) {
				return true;
			}
		}
		if(type == "SOUND" || type == "MUSIC" || type == null) {
			var _this2 = lime_Assets.cache.audio;
			if(__map_reserved[id] != null ? _this2.existsReserved(id) : _this2.h.hasOwnProperty(id)) {
				return true;
			}
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		return library.isLocal(symbolName,type);
	}
	return false;
};
lime_Assets.isValidAudio = function(buffer) {
	return buffer != null;
};
lime_Assets.isValidImage = function(buffer) {
	return true;
};
lime_Assets.list = function(type) {
	lime_Assets.initialize();
	var items = [];
	var _this = lime_Assets.libraries;
	var library = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
	while(library.hasNext()) {
		var libraryItems = library.next().list(type);
		if(libraryItems != null) {
			items = items.concat(libraryItems);
		}
	}
	return items;
};
lime_Assets.loadAudioBuffer = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.audio;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.audio;
		var audio = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
		if(lime_Assets.isValidAudio(audio)) {
			promise.complete(audio);
			return promise.future;
		}
	}
	var libraryName = id.indexOf(":");
	var libraryName1 = id.substring(0,libraryName);
	var pos = id.indexOf(":") + 1;
	var symbolName = HxOverrides.substr(id,pos,null);
	var library = lime_Assets.getLibrary(libraryName1);
	if(library != null) {
		if(library.exists(symbolName,"SOUND")) {
			var future = library.loadAudioBuffer(symbolName);
			if(useCache && lime_Assets.cache.enabled) {
				future.onComplete(function(audio1) {
					var _this2 = lime_Assets.cache.audio;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,audio1);
					} else {
						_this2.h[id] = audio1;
					}
				});
			}
			promise.completeWith(future);
		} else {
			promise.error("[Assets] There is no audio asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName1 + "\"");
	}
	return promise.future;
};
lime_Assets.loadBytes = function(id) {
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"BINARY")) {
			promise.completeWith(library.loadBytes(symbolName));
		} else {
			promise.error("[Assets] There is no String or Bytes asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName + "\"");
	}
	return promise.future;
};
lime_Assets.loadFont = function(id) {
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"FONT")) {
			promise.completeWith(library.loadFont(symbolName));
		} else {
			promise.error("[Assets] There is no Font asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName + "\"");
	}
	return promise.future;
};
lime_Assets.loadImage = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var tmp;
	if(useCache && lime_Assets.cache.enabled) {
		var _this = lime_Assets.cache.image;
		if(__map_reserved[id] != null) {
			tmp = _this.existsReserved(id);
		} else {
			tmp = _this.h.hasOwnProperty(id);
		}
	} else {
		tmp = false;
	}
	if(tmp) {
		var _this1 = lime_Assets.cache.image;
		var image = __map_reserved[id] != null ? _this1.getReserved(id) : _this1.h[id];
		if(lime_Assets.isValidImage(image)) {
			promise.complete(image);
			return promise.future;
		}
	}
	var libraryName = id.indexOf(":");
	var libraryName1 = id.substring(0,libraryName);
	var pos = id.indexOf(":") + 1;
	var symbolName = HxOverrides.substr(id,pos,null);
	var library = lime_Assets.getLibrary(libraryName1);
	if(library != null) {
		if(library.exists(symbolName,"IMAGE")) {
			var future = library.loadImage(symbolName);
			if(useCache && lime_Assets.cache.enabled) {
				future.onComplete(function(image1) {
					var _this2 = lime_Assets.cache.image;
					if(__map_reserved[id] != null) {
						_this2.setReserved(id,image1);
					} else {
						_this2.h[id] = image1;
					}
				});
			}
			promise.completeWith(future);
		} else {
			promise.error("[Assets] There is no Image asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName1 + "\"");
	}
	return promise.future;
};
lime_Assets.loadLibrary = function(name) {
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var data = lime_Assets.getText("libraries/" + name + ".json");
	if(data != null && data != "") {
		var info = JSON.parse(data);
		var library = Type.createInstance(Type.resolveClass(info.type),info.args);
		var _this = lime_Assets.libraries;
		if(__map_reserved[name] != null) {
			_this.setReserved(name,library);
		} else {
			_this.h[name] = library;
		}
		library.onChange.add(($_=lime_Assets.onChange,$bind($_,$_.dispatch)));
		promise.completeWith(library.load());
	} else {
		promise.error("[Assets] There is no asset library named \"" + name + "\"");
	}
	return promise.future;
};
lime_Assets.loadText = function(id) {
	lime_Assets.initialize();
	var promise = new lime_app_Promise();
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = lime_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"TEXT")) {
			promise.completeWith(library.loadText(symbolName));
		} else {
			promise.error("[Assets] There is no String asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName + "\"");
	}
	return promise.future;
};
lime_Assets.registerLibrary = function(name,library) {
	var _this = lime_Assets.libraries;
	if(__map_reserved[name] != null ? _this.existsReserved(name) : _this.h.hasOwnProperty(name)) {
		var _this1 = lime_Assets.libraries;
		if((__map_reserved[name] != null ? _this1.getReserved(name) : _this1.h[name]) == library) {
			return;
		} else {
			lime_Assets.unloadLibrary(name);
		}
	}
	if(library != null) {
		library.onChange.add(lime_Assets.library_onChange);
	}
	var _this2 = lime_Assets.libraries;
	if(__map_reserved[name] != null) {
		_this2.setReserved(name,library);
	} else {
		_this2.h[name] = library;
	}
};
lime_Assets.unloadLibrary = function(name) {
	lime_Assets.initialize();
	var _this = lime_Assets.libraries;
	var library = __map_reserved[name] != null ? _this.getReserved(name) : _this.h[name];
	if(library != null) {
		lime_Assets.cache.clear(name + ":");
		library.onChange.remove(lime_Assets.library_onChange);
	}
	lime_Assets.libraries.remove(name);
};
lime_Assets.library_onChange = function() {
	lime_Assets.cache.clear();
	lime_Assets.onChange.dispatch();
};
var lime__$backend_html5_HTML5Application = function(parent) {
	this.gameDeviceCache = new haxe_ds_IntMap();
	this.parent = parent;
	this.currentUpdate = 0;
	this.lastUpdate = 0;
	this.nextUpdate = 0;
	this.framePeriod = -1;
	lime_audio_AudioManager.init();
};
$hxClasses["lime._backend.html5.HTML5Application"] = lime__$backend_html5_HTML5Application;
lime__$backend_html5_HTML5Application.__name__ = ["lime","_backend","html5","HTML5Application"];
lime__$backend_html5_HTML5Application.prototype = {
	convertKeyCode: function(keyCode) {
		if(keyCode >= 65 && keyCode <= 90) {
			return keyCode + 32;
		}
		switch(keyCode) {
		case 16:
			return 1073742049;
		case 17:
			return 1073742048;
		case 18:
			return 1073742050;
		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 45:
			return 1073741897;
		case 46:
			return 127;
		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 144:
			return 1073741907;
		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;
		}
		return keyCode;
	}
	,create: function(config) {
	}
	,exec: function() {
		window.addEventListener("keydown",$bind(this,this.handleKeyEvent),false);
		window.addEventListener("keyup",$bind(this,this.handleKeyEvent),false);
		window.addEventListener("focus",$bind(this,this.handleWindowEvent),false);
		window.addEventListener("blur",$bind(this,this.handleWindowEvent),false);
		window.addEventListener("resize",$bind(this,this.handleWindowEvent),false);
		window.addEventListener("beforeunload",$bind(this,this.handleWindowEvent),false);
		
			if (!CanvasRenderingContext2D.prototype.isPointInStroke) {
				CanvasRenderingContext2D.prototype.isPointInStroke = function (path, x, y) {
					return false;
				};
			}
			
			var lastTime = 0;
			var vendors = ['ms', 'moz', 'webkit', 'o'];
			for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
				window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
				window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
			}
			
			if (!window.requestAnimationFrame)
				window.requestAnimationFrame = function(callback, element) {
					var currTime = new Date().getTime();
					var timeToCall = Math.max(0, 16 - (currTime - lastTime));
					var id = window.setTimeout(function() { callback(currTime + timeToCall); }, 
					  timeToCall);
					lastTime = currTime + timeToCall;
					return id;
				};
			
			if (!window.cancelAnimationFrame)
				window.cancelAnimationFrame = function(id) {
					clearTimeout(id);
				};
			
			window.requestAnimFrame = window.requestAnimationFrame;
		;
		this.lastUpdate = new Date().getTime();
		this.handleApplicationEvent();
		return 0;
	}
	,exit: function() {
	}
	,getFrameRate: function() {
		if(this.framePeriod < 0) {
			return 60;
		} else if(this.framePeriod == 1000) {
			return 0;
		} else {
			return 1000 / this.framePeriod;
		}
	}
	,handleApplicationEvent: function(__) {
		this.updateGameDevices();
		this.currentUpdate = new Date().getTime();
		if(this.currentUpdate >= this.nextUpdate) {
			this.deltaTime = this.currentUpdate - this.lastUpdate;
			this.parent.onUpdate.dispatch(this.deltaTime | 0);
			if(this.parent.renderers[0] != null) {
				this.parent.renderers[0].onRender.dispatch();
				this.parent.renderers[0].flip();
			}
			if(this.framePeriod < 0) {
				this.nextUpdate = this.currentUpdate;
				this.nextUpdate = this.currentUpdate;
			} else {
				this.nextUpdate = this.currentUpdate + this.framePeriod;
			}
			this.lastUpdate = this.currentUpdate;
		}
		window.requestAnimationFrame($bind(this,this.handleApplicationEvent));
	}
	,handleKeyEvent: function(event) {
		if(this.parent.windows[0] != null) {
			var keyCode = this.convertKeyCode(event.keyCode != null ? event.keyCode : event.which);
			var modifier = (event.shiftKey ? 3 : 0) | (event.ctrlKey ? 192 : 0) | (event.altKey ? 768 : 0) | (event.metaKey ? 3072 : 0);
			if(event.type == "keydown") {
				this.parent.windows[0].onKeyDown.dispatch(keyCode,modifier);
				if(this.parent.windows[0].onKeyDown.canceled) {
					event.preventDefault();
				}
			} else {
				this.parent.windows[0].onKeyUp.dispatch(keyCode,modifier);
				if(this.parent.windows[0].onKeyUp.canceled) {
					event.preventDefault();
				}
			}
		}
	}
	,handleWindowEvent: function(event) {
		if(this.parent.windows[0] != null) {
			switch(event.type) {
			case "beforeunload":
				this.parent.windows[0].onClose.dispatch();
				break;
			case "blur":
				this.parent.windows[0].onFocusOut.dispatch();
				this.parent.windows[0].onDeactivate.dispatch();
				break;
			case "focus":
				this.parent.windows[0].onFocusIn.dispatch();
				this.parent.windows[0].onActivate.dispatch();
				break;
			case "resize":
				var cacheWidth = this.parent.windows[0].__width;
				var cacheHeight = this.parent.windows[0].__height;
				this.parent.windows[0].backend.handleResize();
				if(this.parent.windows[0].__width != cacheWidth || this.parent.windows[0].__height != cacheHeight) {
					this.parent.windows[0].onResize.dispatch(this.parent.windows[0].__width,this.parent.windows[0].__height);
				}
				break;
			}
		}
	}
	,setFrameRate: function(value) {
		if(value >= 60) {
			this.framePeriod = -1;
		} else if(value > 0) {
			this.framePeriod = 1000 / value;
		} else {
			this.framePeriod = 1000;
		}
		return value;
	}
	,updateGameDevices: function() {
		var devices = lime_ui_Joystick.__getDeviceData();
		if(devices == null) {
			return;
		}
		var gamepad;
		var joystick;
		var data;
		var cache;
		var _g1 = 0;
		var _g = devices.length;
		while(_g1 < _g) {
			var i = _g1++;
			data = devices[i];
			if(data == null) {
				continue;
			}
			if(!this.gameDeviceCache.h.hasOwnProperty(i)) {
				cache = new lime__$backend_html5_GameDeviceData();
				cache.id = i;
				cache.connected = data.connected;
				var _g3 = 0;
				var _g2 = data.buttons.length;
				while(_g3 < _g2) cache.buttons.push(data.buttons[_g3++].value);
				var _g31 = 0;
				var _g21 = data.axes.length;
				while(_g31 < _g21) cache.axes.push(data.axes[_g31++]);
				if(data.mapping == "standard") {
					cache.isGamepad = true;
				}
				this.gameDeviceCache.h[i] = cache;
				if(data.connected) {
					lime_ui_Joystick.__connect(i);
					if(cache.isGamepad) {
						lime_ui_Gamepad.__connect(i);
					}
				}
			}
			cache = this.gameDeviceCache.h[i];
			joystick = lime_ui_Joystick.devices.h[i];
			gamepad = lime_ui_Gamepad.devices.h[i];
			if(data.connected) {
				var button;
				var value;
				var _g32 = 0;
				var _g22 = data.buttons.length;
				while(_g32 < _g22) {
					var i1 = _g32++;
					value = data.buttons[i1].value;
					if(value != cache.buttons[i1]) {
						if(i1 == 6) {
							joystick.onAxisMove.dispatch(data.axes.length,value);
							if(gamepad != null) {
								gamepad.onAxisMove.dispatch(4,value);
							}
						} else if(i1 == 7) {
							joystick.onAxisMove.dispatch(data.axes.length + 1,value);
							if(gamepad != null) {
								gamepad.onAxisMove.dispatch(5,value);
							}
						} else {
							if(value > 0) {
								joystick.onButtonDown.dispatch(i1);
							} else {
								joystick.onButtonUp.dispatch(i1);
							}
							if(gamepad != null) {
								switch(i1) {
								case 0:
									button = 0;
									break;
								case 1:
									button = 1;
									break;
								case 2:
									button = 2;
									break;
								case 3:
									button = 3;
									break;
								case 4:
									button = 9;
									break;
								case 5:
									button = 10;
									break;
								case 8:
									button = 4;
									break;
								case 9:
									button = 6;
									break;
								case 10:
									button = 7;
									break;
								case 11:
									button = 8;
									break;
								case 12:
									button = 11;
									break;
								case 13:
									button = 12;
									break;
								case 14:
									button = 13;
									break;
								case 15:
									button = 14;
									break;
								case 16:
									button = 5;
									break;
								default:
									continue;
								}
								if(value > 0) {
									gamepad.onButtonDown.dispatch(button);
								} else {
									gamepad.onButtonUp.dispatch(button);
								}
							}
						}
						cache.buttons[i1] = value;
					}
				}
				var _g33 = 0;
				var _g23 = data.axes.length;
				while(_g33 < _g23) {
					var i2 = _g33++;
					if(data.axes[i2] != cache.axes[i2]) {
						joystick.onAxisMove.dispatch(i2,data.axes[i2]);
						if(gamepad != null) {
							gamepad.onAxisMove.dispatch(i2,data.axes[i2]);
						}
						cache.axes[i2] = data.axes[i2];
					}
				}
			} else if(cache.connected) {
				cache.connected = false;
				lime_ui_Joystick.__disconnect(i);
				lime_ui_Gamepad.__disconnect(i);
			}
		}
	}
	,__class__: lime__$backend_html5_HTML5Application
};
var lime__$backend_html5_GameDeviceData = function() {
	this.connected = true;
	this.buttons = [];
	this.axes = [];
};
$hxClasses["lime._backend.html5.GameDeviceData"] = lime__$backend_html5_GameDeviceData;
lime__$backend_html5_GameDeviceData.__name__ = ["lime","_backend","html5","GameDeviceData"];
lime__$backend_html5_GameDeviceData.prototype = {
	__class__: lime__$backend_html5_GameDeviceData
};
var lime__$backend_html5_HTML5Mouse = function() { };
$hxClasses["lime._backend.html5.HTML5Mouse"] = lime__$backend_html5_HTML5Mouse;
lime__$backend_html5_HTML5Mouse.__name__ = ["lime","_backend","html5","HTML5Mouse"];
lime__$backend_html5_HTML5Mouse.__cursor = null;
lime__$backend_html5_HTML5Mouse.__hidden = null;
lime__$backend_html5_HTML5Mouse.hide = function() {
	if(!lime__$backend_html5_HTML5Mouse.__hidden) {
		lime__$backend_html5_HTML5Mouse.__hidden = true;
		var _g = 0;
		var _g1 = lime_app_Application.current.windows;
		while(_g < _g1.length) {
			var $window = _g1[_g];
			++_g;
			$window.backend.element.style.cursor = "none";
		}
	}
};
lime__$backend_html5_HTML5Mouse.show = function() {
	if(lime__$backend_html5_HTML5Mouse.__hidden) {
		lime__$backend_html5_HTML5Mouse.__hidden = false;
		var cacheValue = lime__$backend_html5_HTML5Mouse.__cursor;
		lime__$backend_html5_HTML5Mouse.__cursor = null;
		lime__$backend_html5_HTML5Mouse.set_cursor(cacheValue);
	}
};
lime__$backend_html5_HTML5Mouse.warp = function(x,y,window) {
};
lime__$backend_html5_HTML5Mouse.get_cursor = function() {
	if(lime__$backend_html5_HTML5Mouse.__cursor == null) {
		return lime_ui_MouseCursor.DEFAULT;
	}
	return lime__$backend_html5_HTML5Mouse.__cursor;
};
lime__$backend_html5_HTML5Mouse.set_cursor = function(value) {
	if(lime__$backend_html5_HTML5Mouse.__cursor != value) {
		if(!lime__$backend_html5_HTML5Mouse.__hidden) {
			var _g = 0;
			var _g1 = lime_app_Application.current.windows;
			while(_g < _g1.length) {
				var $window = _g1[_g];
				++_g;
				var tmp;
				switch(value[1]) {
				case 0:
					tmp = "default";
					break;
				case 1:
					tmp = "crosshair";
					break;
				case 3:
					tmp = "move";
					break;
				case 4:
					tmp = "pointer";
					break;
				case 5:
					tmp = "nesw-resize";
					break;
				case 6:
					tmp = "ns-resize";
					break;
				case 7:
					tmp = "nwse-resize";
					break;
				case 8:
					tmp = "ew-resize";
					break;
				case 9:
					tmp = "text";
					break;
				case 10:
					tmp = "wait";
					break;
				case 11:
					tmp = "wait";
					break;
				default:
					tmp = "auto";
				}
				$window.backend.element.style.cursor = tmp;
			}
		}
		lime__$backend_html5_HTML5Mouse.__cursor = value;
	}
	return lime__$backend_html5_HTML5Mouse.__cursor;
};
lime__$backend_html5_HTML5Mouse.get_lock = function() {
	return false;
};
lime__$backend_html5_HTML5Mouse.set_lock = function(value) {
	return value;
};
var lime__$backend_html5_HTML5Renderer = function(parent) {
	this.parent = parent;
};
$hxClasses["lime._backend.html5.HTML5Renderer"] = lime__$backend_html5_HTML5Renderer;
lime__$backend_html5_HTML5Renderer.__name__ = ["lime","_backend","html5","HTML5Renderer"];
lime__$backend_html5_HTML5Renderer.prototype = {
	create: function() {
		this.createContext();
		if(this.parent.context[1] == 0) {
			this.parent.window.backend.canvas.addEventListener("webglcontextlost",$bind(this,this.handleEvent),false);
			this.parent.window.backend.canvas.addEventListener("webglcontextrestored",$bind(this,this.handleEvent),false);
		}
	}
	,createContext: function() {
		if(this.parent.window.backend.div != null) {
			this.parent.context = lime_graphics_RenderContext.DOM(this.parent.window.backend.div);
			this.parent.type = lime_graphics_RendererType.DOM;
		} else if(this.parent.window.backend.canvas != null) {
			var webgl = null;
			if(webgl == null) {
				this.parent.context = lime_graphics_RenderContext.CANVAS(this.parent.window.backend.canvas.getContext("2d"));
				this.parent.type = lime_graphics_RendererType.CANVAS;
			} else {
				lime_graphics_opengl_GL.context = webgl;
				this.parent.context = lime_graphics_RenderContext.OPENGL(lime_graphics_opengl_GL.context);
				this.parent.type = lime_graphics_RendererType.OPENGL;
			}
		}
	}
	,flip: function() {
	}
	,handleEvent: function(event) {
		switch(event.type) {
		case "webglcontextlost":
			event.preventDefault();
			this.parent.context = null;
			this.parent.onContextLost.dispatch();
			break;
		case "webglcontextrestored":
			this.createContext();
			this.parent.onContextRestored.dispatch(this.parent.context);
			break;
		default:
		}
	}
	,readPixels: function(rect) {
		if(this.parent.window.backend.canvas != null) {
			if(rect == null) {
				rect = new lime_math_Rectangle(0,0,this.parent.window.backend.canvas.width,this.parent.window.backend.canvas.height);
			} else {
				rect.__contract(0,0,this.parent.window.backend.canvas.width,this.parent.window.backend.canvas.height);
			}
			if(rect.width > 0 && rect.height > 0) {
				var canvas = window.document.createElement("canvas");
				canvas.width = rect.width | 0;
				canvas.height = rect.height | 0;
				canvas.getContext("2d").drawImage(this.parent.window.backend.canvas,-rect.x,-rect.y);
				return lime_graphics_Image.fromCanvas(canvas);
			}
		}
		return null;
	}
	,render: function() {
	}
	,__class__: lime__$backend_html5_HTML5Renderer
};
var lime__$backend_html5_HTML5Window = function(parent) {
	this.unusedTouchesPool = new List();
	this.currentTouches = new haxe_ds_IntMap();
	this.parent = parent;
	if(parent.config != null && Object.prototype.hasOwnProperty.call(parent.config,"element")) {
		this.element = parent.config.element;
	}
};
$hxClasses["lime._backend.html5.HTML5Window"] = lime__$backend_html5_HTML5Window;
lime__$backend_html5_HTML5Window.__name__ = ["lime","_backend","html5","HTML5Window"];
lime__$backend_html5_HTML5Window.textInput = null;
lime__$backend_html5_HTML5Window.prototype = {
	alert: function(message,title) {
		if(message != null) {
			js_Browser.alert(message);
		}
	}
	,close: function() {
		this.parent.application.removeWindow(this.parent);
	}
	,create: function(application) {
		this.setWidth = this.parent.__width;
		this.setHeight = this.parent.__height;
		this.parent.id = lime__$backend_html5_HTML5Window.windowID++;
		if(js_Boot.__instanceof(this.element,HTMLCanvasElement)) {
			this.canvas = this.element;
		} else {
			this.canvas = window.document.createElement("canvas");
		}
		if(this.canvas != null) {
			var style = this.canvas.style;
			style.setProperty("-webkit-transform","translateZ(0)",null);
			style.setProperty("transform","translateZ(0)",null);
		} else if(this.div != null) {
			var style1 = this.div.style;
			style1.setProperty("-webkit-transform","translate3D(0,0,0)",null);
			style1.setProperty("transform","translate3D(0,0,0)",null);
			style1.position = "relative";
			style1.overflow = "hidden";
			style1.setProperty("-webkit-user-select","none",null);
			style1.setProperty("-moz-user-select","none",null);
			style1.setProperty("-ms-user-select","none",null);
			style1.setProperty("-o-user-select","none",null);
		}
		if(this.parent.__width == 0 && this.parent.__height == 0) {
			if(this.element != null) {
				this.parent.set_width(this.element.clientWidth);
				this.parent.set_height(this.element.clientHeight);
			} else {
				this.parent.set_width(window.innerWidth);
				this.parent.set_height(window.innerHeight);
			}
			this.parent.set_fullscreen(true);
		}
		if(this.canvas != null) {
			this.canvas.width = this.parent.__width;
			this.canvas.height = this.parent.__height;
		} else {
			this.div.style.width = this.parent.__width + "px";
			this.div.style.height = this.parent.__height + "px";
		}
		this.handleResize();
		if(this.element != null) {
			if(this.canvas != null) {
				if(this.element != this.canvas) {
					this.element.appendChild(this.canvas);
				}
			} else {
				this.element.appendChild(this.div);
			}
			var events = ["mousedown","mouseenter","mouseleave","mousemove","mouseup","wheel"];
			var _g = 0;
			while(_g < events.length) {
				var event = events[_g];
				++_g;
				this.element.addEventListener(event,$bind(this,this.handleMouseEvent),true);
			}
			window.document.addEventListener("dragstart",function(e) {
				if(e.target.nodeName.toLowerCase() == "img") {
					e.preventDefault();
					return false;
				}
				return true;
			},false);
			this.element.addEventListener("touchstart",$bind(this,this.handleTouchEvent),true);
			this.element.addEventListener("touchmove",$bind(this,this.handleTouchEvent),true);
			this.element.addEventListener("touchend",$bind(this,this.handleTouchEvent),true);
			this.element.addEventListener("gamepadconnected",$bind(this,this.handleGamepadEvent),true);
			this.element.addEventListener("gamepaddisconnected",$bind(this,this.handleGamepadEvent),true);
		}
	}
	,focus: function() {
	}
	,getDisplay: function() {
		return lime_system_System.getDisplay(0);
	}
	,getEnableTextEvents: function() {
		return this.enableTextEvents;
	}
	,handleFocusEvent: function(event) {
		if(this.enableTextEvents) {
			haxe_Timer.delay(function() {
				lime__$backend_html5_HTML5Window.textInput.focus();
			},20);
		}
	}
	,handleGamepadEvent: function(event) {
		switch(event.type) {
		case "gamepadconnected":
			lime_ui_Joystick.__connect(event.gamepad.index);
			if(event.gamepad.mapping == "standard") {
				lime_ui_Gamepad.__connect(event.gamepad.index);
			}
			break;
		case "gamepaddisconnected":
			lime_ui_Joystick.__disconnect(event.gamepad.index);
			lime_ui_Gamepad.__disconnect(event.gamepad.index);
			break;
		default:
		}
	}
	,handleInputEvent: function(event) {
		if(lime__$backend_html5_HTML5Window.textInput.value != "") {
			this.parent.onTextInput.dispatch(lime__$backend_html5_HTML5Window.textInput.value);
			lime__$backend_html5_HTML5Window.textInput.value = "";
		}
	}
	,handleMouseEvent: function(event) {
		var x = 0.0;
		var y = 0.0;
		if(event.type != "wheel") {
			if(this.element != null) {
				if(this.canvas != null) {
					var rect = this.canvas.getBoundingClientRect();
					x = (event.clientX - rect.left) * (this.parent.__width / rect.width);
					y = (event.clientY - rect.top) * (this.parent.__height / rect.height);
				} else if(this.div != null) {
					var rect1 = this.div.getBoundingClientRect();
					x = event.clientX - rect1.left;
					y = event.clientY - rect1.top;
				} else {
					var rect2 = this.element.getBoundingClientRect();
					x = (event.clientX - rect2.left) * (this.parent.__width / rect2.width);
					y = (event.clientY - rect2.top) * (this.parent.__height / rect2.height);
				}
			} else {
				x = event.clientX;
				y = event.clientY;
			}
			var _g = event.type;
			switch(_g) {
			case "mousedown":
				this.parent.onMouseDown.dispatch(x,y,event.button);
				break;
			case "mouseenter":
				this.parent.onEnter.dispatch();
				break;
			case "mouseleave":
				this.parent.onLeave.dispatch();
				break;
			case "mousemove":
				this.parent.onMouseMove.dispatch(x,y);
				break;
			case "mouseup":
				this.parent.onMouseUp.dispatch(x,y,event.button);
				break;
			default:
			}
		} else {
			this.parent.onMouseWheel.dispatch(event.deltaX,-event.deltaY);
		}
	}
	,handleResize: function() {
		var stretch = this.parent.__fullscreen || this.setWidth == 0 && this.setHeight == 0;
		if(this.element != null && (this.div == null || this.div != null && stretch)) {
			if(stretch) {
				if(this.parent.__width != this.element.clientWidth || this.parent.__height != this.element.clientHeight) {
					this.parent.set_width(this.element.clientWidth);
					this.parent.set_height(this.element.clientHeight);
					if(this.canvas != null) {
						if(this.element != this.canvas) {
							this.canvas.width = this.element.clientWidth;
							this.canvas.height = this.element.clientHeight;
						}
					} else {
						this.div.style.width = this.element.clientWidth + "px";
						this.div.style.height = this.element.clientHeight + "px";
					}
				}
			} else {
				var targetRatio = Math.min(this.element.clientWidth / this.setWidth,this.element.clientHeight / this.setHeight);
				if(this.canvas != null) {
					if(this.element != this.canvas) {
						this.canvas.style.width = this.setWidth * targetRatio + "px";
						this.canvas.style.height = this.setHeight * targetRatio + "px";
						this.canvas.style.marginLeft = (this.element.clientWidth - this.setWidth * targetRatio) / 2 + "px";
						this.canvas.style.marginTop = (this.element.clientHeight - this.setHeight * targetRatio) / 2 + "px";
					}
				} else {
					this.div.style.width = this.setWidth * targetRatio + "px";
					this.div.style.height = this.setHeight * targetRatio + "px";
					this.div.style.marginLeft = (this.element.clientWidth - this.setWidth * targetRatio) / 2 + "px";
					this.div.style.marginTop = (this.element.clientHeight - this.setHeight * targetRatio) / 2 + "px";
				}
			}
		}
	}
	,handleTouchEvent: function(event) {
		event.preventDefault();
		var rect = null;
		if(this.element != null) {
			if(this.canvas != null) {
				rect = this.canvas.getBoundingClientRect();
			} else if(this.div != null) {
				rect = this.div.getBoundingClientRect();
			} else {
				rect = this.element.getBoundingClientRect();
			}
		}
		var windowWidth = this.setWidth;
		var windowHeight = this.setHeight;
		if(windowWidth == 0 || windowHeight == 0) {
			if(rect != null) {
				windowWidth = rect.width;
				windowHeight = rect.height;
			} else {
				windowWidth = 1;
				windowHeight = 1;
			}
		}
		var _g = 0;
		var _g1 = event.changedTouches;
		while(_g < _g1.length) {
			var data = _g1[_g];
			++_g;
			var x = 0.0;
			var y = 0.0;
			if(rect != null) {
				x = (data.clientX - rect.left) * (windowWidth / rect.width);
				y = (data.clientY - rect.top) * (windowHeight / rect.height);
			} else {
				x = data.clientX;
				y = data.clientY;
			}
			switch(event.type) {
			case "touchend":
				var touch = this.currentTouches.get(data.identifier);
				if(touch != null) {
					var cacheX = touch.x;
					var cacheY = touch.y;
					touch.x = x / windowWidth;
					touch.y = y / windowHeight;
					touch.dx = touch.x - cacheX;
					touch.dy = touch.y - cacheY;
					touch.pressure = data.force;
					lime_ui_Touch.onEnd.dispatch(touch);
					this.currentTouches.remove(data.identifier);
					this.unusedTouchesPool.add(touch);
					if(touch == this.primaryTouch) {
						this.parent.onMouseUp.dispatch(x,y,0);
						this.primaryTouch = null;
					}
				}
				break;
			case "touchmove":
				var touch1 = this.currentTouches.get(data.identifier);
				if(touch1 != null) {
					var cacheX1 = touch1.x;
					var cacheY1 = touch1.y;
					touch1.x = x / windowWidth;
					touch1.y = y / windowHeight;
					touch1.dx = touch1.x - cacheX1;
					touch1.dy = touch1.y - cacheY1;
					touch1.pressure = data.force;
					lime_ui_Touch.onMove.dispatch(touch1);
					if(touch1 == this.primaryTouch) {
						this.parent.onMouseMove.dispatch(x,y);
					}
				}
				break;
			case "touchstart":
				var touch2 = this.unusedTouchesPool.pop();
				if(touch2 == null) {
					touch2 = new lime_ui_Touch(x / windowWidth,y / windowHeight,data.identifier,0,0,data.force,this.parent.id);
				} else {
					touch2.x = x / windowWidth;
					touch2.y = y / windowHeight;
					touch2.id = data.identifier;
					touch2.dx = 0;
					touch2.dy = 0;
					touch2.pressure = data.force;
					touch2.device = this.parent.id;
				}
				this.currentTouches.set(data.identifier,touch2);
				lime_ui_Touch.onStart.dispatch(touch2);
				if(this.primaryTouch == null) {
					this.primaryTouch = touch2;
				}
				if(touch2 == this.primaryTouch) {
					this.parent.onMouseDown.dispatch(x,y,0);
				}
				break;
			default:
			}
		}
	}
	,move: function(x,y) {
	}
	,resize: function(width,height) {
	}
	,setBorderless: function(value) {
		return value;
	}
	,setEnableTextEvents: function(value) {
		if(value) {
			if(lime__$backend_html5_HTML5Window.textInput == null) {
				lime__$backend_html5_HTML5Window.textInput = window.document.createElement("input");
				lime__$backend_html5_HTML5Window.textInput.type = "text";
				lime__$backend_html5_HTML5Window.textInput.style.position = "absolute";
				lime__$backend_html5_HTML5Window.textInput.style.opacity = "0";
				lime__$backend_html5_HTML5Window.textInput.style.color = "transparent";
				lime__$backend_html5_HTML5Window.textInput.value = "";
				lime__$backend_html5_HTML5Window.textInput.autocapitalize = "off";
				lime__$backend_html5_HTML5Window.textInput.autocorrect = "off";
				lime__$backend_html5_HTML5Window.textInput.autocomplete = "off";
				lime__$backend_html5_HTML5Window.textInput.style.left = "0px";
				lime__$backend_html5_HTML5Window.textInput.style.top = "50%";
				if(new EReg("(iPad|iPhone|iPod).*OS 8_","gi").match(window.navigator.userAgent)) {
					lime__$backend_html5_HTML5Window.textInput.style.fontSize = "0px";
					lime__$backend_html5_HTML5Window.textInput.style.width = "0px";
					lime__$backend_html5_HTML5Window.textInput.style.height = "0px";
				} else {
					lime__$backend_html5_HTML5Window.textInput.style.width = "1px";
					lime__$backend_html5_HTML5Window.textInput.style.height = "1px";
				}
				lime__$backend_html5_HTML5Window.textInput.style.pointerEvents = "none";
				lime__$backend_html5_HTML5Window.textInput.style.zIndex = "-10000000";
				window.document.body.appendChild(lime__$backend_html5_HTML5Window.textInput);
			}
			if(!this.enableTextEvents) {
				lime__$backend_html5_HTML5Window.textInput.addEventListener("input",$bind(this,this.handleInputEvent),true);
				lime__$backend_html5_HTML5Window.textInput.addEventListener("blur",$bind(this,this.handleFocusEvent),true);
			}
			lime__$backend_html5_HTML5Window.textInput.focus();
		} else if(lime__$backend_html5_HTML5Window.textInput != null) {
			lime__$backend_html5_HTML5Window.textInput.removeEventListener("input",$bind(this,this.handleInputEvent),true);
			lime__$backend_html5_HTML5Window.textInput.removeEventListener("blur",$bind(this,this.handleFocusEvent),true);
			lime__$backend_html5_HTML5Window.textInput.blur();
		}
		return this.enableTextEvents = value;
	}
	,setFullscreen: function(value) {
		return false;
	}
	,setIcon: function(image) {
	}
	,setMaximized: function(value) {
		return false;
	}
	,setMinimized: function(value) {
		return false;
	}
	,setResizable: function(value) {
		return value;
	}
	,setTitle: function(value) {
		return value;
	}
	,__class__: lime__$backend_html5_HTML5Window
};
var lime_app_IModule = function() { };
$hxClasses["lime.app.IModule"] = lime_app_IModule;
lime_app_IModule.__name__ = ["lime","app","IModule"];
lime_app_IModule.prototype = {
	__class__: lime_app_IModule
};
var lime_app_Module = function() {
	this.onExit = new lime_app_Event_$Int_$Void();
};
$hxClasses["lime.app.Module"] = lime_app_Module;
lime_app_Module.__name__ = ["lime","app","Module"];
lime_app_Module.__interfaces__ = [lime_app_IModule];
lime_app_Module.prototype = {
	onGamepadAxisMove: function(gamepad,axis,value) {
	}
	,onGamepadButtonDown: function(gamepad,button) {
	}
	,onGamepadButtonUp: function(gamepad,button) {
	}
	,onGamepadConnect: function(gamepad) {
		haxe_Log.trace("onGamepadConnect (module)",{ fileName : "Module.hx", lineNumber : 64, className : "lime.app.Module", methodName : "onGamepadConnect"});
	}
	,onGamepadDisconnect: function(gamepad) {
	}
	,onJoystickAxisMove: function(joystick,axis,value) {
	}
	,onJoystickButtonDown: function(joystick,button) {
	}
	,onJoystickButtonUp: function(joystick,button) {
	}
	,onJoystickConnect: function(joystick) {
	}
	,onJoystickDisconnect: function(joystick) {
	}
	,onJoystickHatMove: function(joystick,hat,position) {
	}
	,onJoystickTrackballMove: function(joystick,trackball,value) {
	}
	,onKeyDown: function(window,keyCode,modifier) {
	}
	,onKeyUp: function(window,keyCode,modifier) {
	}
	,onModuleExit: function(code) {
	}
	,onMouseDown: function(window,x,y,button) {
	}
	,onMouseMove: function(window,x,y) {
	}
	,onMouseMoveRelative: function(window,x,y) {
	}
	,onMouseUp: function(window,x,y,button) {
	}
	,onMouseWheel: function(window,deltaX,deltaY) {
	}
	,onPreloadComplete: function() {
	}
	,onPreloadProgress: function(loaded,total) {
	}
	,onRenderContextLost: function(renderer) {
	}
	,onRenderContextRestored: function(renderer,context) {
	}
	,onTextEdit: function(window,text,start,length) {
	}
	,onTextInput: function(window,text) {
	}
	,onTouchEnd: function(touch) {
	}
	,onTouchMove: function(touch) {
	}
	,onTouchStart: function(touch) {
	}
	,onWindowActivate: function(window) {
	}
	,onWindowClose: function(window) {
	}
	,onWindowCreate: function(window) {
	}
	,onWindowDeactivate: function(window) {
	}
	,onWindowDropFile: function(window,file) {
	}
	,onWindowEnter: function(window) {
	}
	,onWindowFocusIn: function(window) {
	}
	,onWindowFocusOut: function(window) {
	}
	,onWindowFullscreen: function(window) {
	}
	,onWindowLeave: function(window) {
	}
	,onWindowMove: function(window,x,y) {
	}
	,onWindowMinimize: function(window) {
	}
	,onWindowResize: function(window,width,height) {
	}
	,onWindowRestore: function(window) {
	}
	,render: function(renderer) {
	}
	,update: function(deltaTime) {
	}
	,__class__: lime_app_Module
};
var lime_app_Application = function() {
	this.onUpdate = new lime_app_Event_$Int_$Void();
	lime_app_Module.call(this);
	if(lime_app_Application.current == null) {
		lime_app_Application.current = this;
	}
	this.modules = [];
	this.renderers = [];
	this.windows = [];
	this.windowByID = new haxe_ds_IntMap();
	this.backend = new lime__$backend_html5_HTML5Application(this);
	this.onExit.add($bind(this,this.onModuleExit));
	this.onUpdate.add($bind(this,this.update));
	lime_ui_Gamepad.onConnect.add($bind(this,this.__onGamepadConnect));
	lime_ui_Joystick.onConnect.add($bind(this,this.__onJoystickConnect));
	lime_ui_Touch.onStart.add($bind(this,this.onTouchStart));
	lime_ui_Touch.onMove.add($bind(this,this.onTouchMove));
	lime_ui_Touch.onEnd.add($bind(this,this.onTouchEnd));
};
$hxClasses["lime.app.Application"] = lime_app_Application;
lime_app_Application.__name__ = ["lime","app","Application"];
lime_app_Application.current = null;
lime_app_Application.__super__ = lime_app_Module;
lime_app_Application.prototype = $extend(lime_app_Module.prototype,{
	addModule: function(module) {
		this.modules.push(module);
		if(this.windows.length > 0) {
			var _g = 0;
			var _g1 = this.windows;
			while(_g < _g1.length) {
				var $window = _g1[_g];
				++_g;
				module.onWindowCreate($window);
			}
			if(this.preloader == null || this.preloader.complete) {
				module.onPreloadComplete();
			}
		}
	}
	,addRenderer: function(renderer) {
		var f = $bind(this,this.render);
		var a1 = renderer;
		var tmp = function() {
			f(a1);
		};
		renderer.onRender.add(tmp);
		var f1 = $bind(this,this.onRenderContextLost);
		var a11 = renderer;
		var tmp1 = function() {
			f1(a11);
		};
		renderer.onContextLost.add(tmp1);
		var f2 = $bind(this,this.onRenderContextRestored);
		var a12 = renderer;
		var tmp2 = function(a2) {
			f2(a12,a2);
		};
		renderer.onContextRestored.add(tmp2);
		this.renderers.push(renderer);
	}
	,create: function(config) {
		this.config = config;
		if(config != null) {
			if(Object.prototype.hasOwnProperty.call(config,"fps")) {
				this.backend.setFrameRate(config.fps);
			}
			if(Object.prototype.hasOwnProperty.call(config,"windows")) {
				var _g1 = config.windows;
				while(0 < _g1.length) {
					this.createWindow(new lime_ui_Window(_g1[0]));
					break;
				}
			}
			if(this.preloader == null || this.preloader.complete) {
				this.onPreloadComplete();
			}
		}
	}
	,createWindow: function(window) {
		var f = $bind(this,this.onWindowActivate);
		var a1 = window;
		var tmp = function() {
			f(a1);
		};
		window.onActivate.add(tmp);
		var f1 = $bind(this,this.onWindowClose);
		var a11 = window;
		var tmp1 = function() {
			f1(a11);
		};
		window.onClose.add(tmp1);
		var f2 = $bind(this,this.onWindowCreate);
		var a12 = window;
		var tmp2 = function() {
			f2(a12);
		};
		window.onCreate.add(tmp2);
		var f3 = $bind(this,this.onWindowDeactivate);
		var a13 = window;
		var tmp3 = function() {
			f3(a13);
		};
		window.onDeactivate.add(tmp3);
		var f4 = $bind(this,this.onWindowDropFile);
		var a14 = window;
		var tmp4 = function(a2) {
			f4(a14,a2);
		};
		window.onDropFile.add(tmp4);
		var f5 = $bind(this,this.onWindowEnter);
		var a15 = window;
		var tmp5 = function() {
			f5(a15);
		};
		window.onEnter.add(tmp5);
		var f6 = $bind(this,this.onWindowFocusIn);
		var a16 = window;
		var tmp6 = function() {
			f6(a16);
		};
		window.onFocusIn.add(tmp6);
		var f7 = $bind(this,this.onWindowFocusOut);
		var a17 = window;
		var tmp7 = function() {
			f7(a17);
		};
		window.onFocusOut.add(tmp7);
		var f8 = $bind(this,this.onWindowFullscreen);
		var a18 = window;
		var tmp8 = function() {
			f8(a18);
		};
		window.onFullscreen.add(tmp8);
		var f9 = $bind(this,this.onKeyDown);
		var a19 = window;
		var tmp9 = function(a21,a3) {
			f9(a19,a21,a3);
		};
		window.onKeyDown.add(tmp9);
		var f10 = $bind(this,this.onKeyUp);
		var a110 = window;
		var tmp10 = function(a22,a31) {
			f10(a110,a22,a31);
		};
		window.onKeyUp.add(tmp10);
		var f11 = $bind(this,this.onWindowLeave);
		var a111 = window;
		var tmp11 = function() {
			f11(a111);
		};
		window.onLeave.add(tmp11);
		var f12 = $bind(this,this.onWindowMinimize);
		var a112 = window;
		var tmp12 = function() {
			f12(a112);
		};
		window.onMinimize.add(tmp12);
		var f13 = $bind(this,this.onMouseDown);
		var a113 = window;
		var tmp13 = function(x,y,a23) {
			f13(a113,x,y,a23);
		};
		window.onMouseDown.add(tmp13);
		var f14 = $bind(this,this.onMouseMove);
		var a114 = window;
		var tmp14 = function(x1,y1) {
			f14(a114,x1,y1);
		};
		window.onMouseMove.add(tmp14);
		var f15 = $bind(this,this.onMouseMoveRelative);
		var a115 = window;
		var tmp15 = function(x2,y2) {
			f15(a115,x2,y2);
		};
		window.onMouseMoveRelative.add(tmp15);
		var f16 = $bind(this,this.onMouseUp);
		var a116 = window;
		var tmp16 = function(x3,y3,a24) {
			f16(a116,x3,y3,a24);
		};
		window.onMouseUp.add(tmp16);
		var f17 = $bind(this,this.onMouseWheel);
		var a117 = window;
		var tmp17 = function(a25,a32) {
			f17(a117,a25,a32);
		};
		window.onMouseWheel.add(tmp17);
		var f18 = $bind(this,this.onWindowMove);
		var a118 = window;
		var tmp18 = function(x4,y4) {
			f18(a118,x4,y4);
		};
		window.onMove.add(tmp18);
		var f19 = $bind(this,this.onWindowResize);
		var a119 = window;
		var tmp19 = function(a26,a33) {
			f19(a119,a26,a33);
		};
		window.onResize.add(tmp19);
		var f20 = $bind(this,this.onWindowRestore);
		var a120 = window;
		var tmp20 = function() {
			f20(a120);
		};
		window.onRestore.add(tmp20);
		var f21 = $bind(this,this.onTextEdit);
		var a121 = window;
		var tmp21 = function(a27,a34,a4) {
			f21(a121,a27,a34,a4);
		};
		window.onTextEdit.add(tmp21);
		var f22 = $bind(this,this.onTextInput);
		var a122 = window;
		var tmp22 = function(a28) {
			f22(a122,a28);
		};
		window.onTextInput.add(tmp22);
		if(window.renderer == null) {
			this.addRenderer(new lime_graphics_Renderer(window));
		}
		window.create(this);
		this.windows.push(window);
		this.windowByID.h[window.id] = window;
		window.onCreate.dispatch();
	}
	,exec: function() {
		lime_app_Application.current = this;
		return this.backend.exec();
	}
	,onGamepadAxisMove: function(gamepad,axis,value) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadAxisMove(gamepad,axis,value);
		}
	}
	,onGamepadButtonDown: function(gamepad,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadButtonDown(gamepad,button);
		}
	}
	,onGamepadButtonUp: function(gamepad,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadButtonUp(gamepad,button);
		}
	}
	,onGamepadConnect: function(gamepad) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadConnect(gamepad);
		}
	}
	,onGamepadDisconnect: function(gamepad) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onGamepadDisconnect(gamepad);
		}
	}
	,onJoystickAxisMove: function(joystick,axis,value) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickAxisMove(joystick,axis,value);
		}
	}
	,onJoystickButtonDown: function(joystick,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickButtonDown(joystick,button);
		}
	}
	,onJoystickButtonUp: function(joystick,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickButtonUp(joystick,button);
		}
	}
	,onJoystickConnect: function(joystick) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickConnect(joystick);
		}
	}
	,onJoystickDisconnect: function(joystick) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickDisconnect(joystick);
		}
	}
	,onJoystickHatMove: function(joystick,hat,position) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickHatMove(joystick,hat,position);
		}
	}
	,onJoystickTrackballMove: function(joystick,trackball,value) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onJoystickTrackballMove(joystick,trackball,value);
		}
	}
	,onKeyDown: function(window,keyCode,modifier) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onKeyDown(window,keyCode,modifier);
		}
	}
	,onKeyUp: function(window,keyCode,modifier) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onKeyUp(window,keyCode,modifier);
		}
	}
	,onModuleExit: function(code) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onModuleExit(code);
		}
	}
	,onMouseDown: function(window,x,y,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseDown(window,x,y,button);
		}
	}
	,onMouseMove: function(window,x,y) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseMove(window,x,y);
		}
	}
	,onMouseMoveRelative: function(window,x,y) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseMoveRelative(window,x,y);
		}
	}
	,onMouseUp: function(window,x,y,button) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseUp(window,x,y,button);
		}
	}
	,onMouseWheel: function(window,deltaX,deltaY) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onMouseWheel(window,deltaX,deltaY);
		}
	}
	,onPreloadComplete: function() {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onPreloadComplete();
		}
	}
	,onPreloadProgress: function(loaded,total) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onPreloadProgress(loaded,total);
		}
	}
	,onRenderContextLost: function(renderer) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onRenderContextLost(renderer);
		}
	}
	,onRenderContextRestored: function(renderer,context) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onRenderContextRestored(renderer,context);
		}
	}
	,onTextEdit: function(window,text,start,length) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTextEdit(window,text,start,length);
		}
	}
	,onTextInput: function(window,text) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTextInput(window,text);
		}
	}
	,onTouchEnd: function(touch) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTouchEnd(touch);
		}
	}
	,onTouchMove: function(touch) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTouchMove(touch);
		}
	}
	,onTouchStart: function(touch) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onTouchStart(touch);
		}
	}
	,onWindowActivate: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowActivate(window);
		}
	}
	,onWindowClose: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowClose(window);
		}
		this.removeWindow(window);
	}
	,onWindowCreate: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowCreate(window);
		}
	}
	,onWindowDeactivate: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowDeactivate(window);
		}
	}
	,onWindowDropFile: function(window,file) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowDropFile(window,file);
		}
	}
	,onWindowEnter: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowEnter(window);
		}
	}
	,onWindowFocusIn: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowFocusIn(window);
		}
	}
	,onWindowFocusOut: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowFocusOut(window);
		}
	}
	,onWindowFullscreen: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowFullscreen(window);
		}
	}
	,onWindowLeave: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowLeave(window);
		}
	}
	,onWindowMinimize: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowMinimize(window);
		}
	}
	,onWindowMove: function(window,x,y) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowMove(window,x,y);
		}
	}
	,onWindowResize: function(window,width,height) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowResize(window,width,height);
		}
	}
	,onWindowRestore: function(window) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.onWindowRestore(window);
		}
	}
	,removeModule: function(module) {
		if(module != null) {
			module.onModuleExit(0);
			HxOverrides.remove(this.modules,module);
		}
	}
	,removeRenderer: function(renderer) {
		if(renderer != null && this.renderers.indexOf(renderer) > -1) {
			HxOverrides.remove(this.renderers,renderer);
		}
	}
	,removeWindow: function(window) {
		if(window != null && this.windowByID.h.hasOwnProperty(window.id)) {
			HxOverrides.remove(this.windows,window);
			this.windowByID.remove(window.id);
			window.close();
			if(this.windows[0] == window) {
				this.window = null;
			}
		}
	}
	,render: function(renderer) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.render(renderer);
		}
	}
	,setPreloader: function(preloader) {
		if(this.preloader != null) {
			this.preloader.onProgress.remove($bind(this,this.onPreloadProgress));
			this.preloader.onComplete.remove($bind(this,this.onPreloadComplete));
		}
		this.preloader = preloader;
		if(preloader.complete) {
			this.onPreloadComplete();
		} else {
			preloader.onProgress.add($bind(this,this.onPreloadProgress));
			preloader.onComplete.add($bind(this,this.onPreloadComplete));
		}
	}
	,update: function(deltaTime) {
		var _g = 0;
		var _g1 = this.modules;
		while(_g < _g1.length) {
			var module = _g1[_g];
			++_g;
			module.update(deltaTime);
		}
	}
	,__onGamepadConnect: function(gamepad) {
		this.onGamepadConnect(gamepad);
		var f = $bind(this,this.onGamepadAxisMove);
		var a1 = gamepad;
		var tmp = function(a2,a3) {
			f(a1,a2,a3);
		};
		gamepad.onAxisMove.add(tmp);
		var f1 = $bind(this,this.onGamepadButtonDown);
		var a11 = gamepad;
		var tmp1 = function(a21) {
			f1(a11,a21);
		};
		gamepad.onButtonDown.add(tmp1);
		var f2 = $bind(this,this.onGamepadButtonUp);
		var a12 = gamepad;
		var tmp2 = function(a22) {
			f2(a12,a22);
		};
		gamepad.onButtonUp.add(tmp2);
		var f3 = $bind(this,this.onGamepadDisconnect);
		var a13 = gamepad;
		var tmp3 = function() {
			f3(a13);
		};
		gamepad.onDisconnect.add(tmp3);
	}
	,__onJoystickConnect: function(joystick) {
		this.onJoystickConnect(joystick);
		var f = $bind(this,this.onJoystickAxisMove);
		var a1 = joystick;
		var tmp = function(a2,a3) {
			f(a1,a2,a3);
		};
		joystick.onAxisMove.add(tmp);
		var f1 = $bind(this,this.onJoystickButtonDown);
		var a11 = joystick;
		var tmp1 = function(a21) {
			f1(a11,a21);
		};
		joystick.onButtonDown.add(tmp1);
		var f2 = $bind(this,this.onJoystickButtonUp);
		var a12 = joystick;
		var tmp2 = function(a22) {
			f2(a12,a22);
		};
		joystick.onButtonUp.add(tmp2);
		var f3 = $bind(this,this.onJoystickDisconnect);
		var a13 = joystick;
		var tmp3 = function() {
			f3(a13);
		};
		joystick.onDisconnect.add(tmp3);
		var f4 = $bind(this,this.onJoystickHatMove);
		var a14 = joystick;
		var tmp4 = function(a23,a31) {
			f4(a14,a23,a31);
		};
		joystick.onHatMove.add(tmp4);
		var f5 = $bind(this,this.onJoystickTrackballMove);
		var a15 = joystick;
		var tmp5 = function(a24,a32) {
			f5(a15,a24,a32);
		};
		joystick.onTrackballMove.add(tmp5);
	}
	,get_frameRate: function() {
		return this.backend.getFrameRate();
	}
	,set_frameRate: function(value) {
		return this.backend.setFrameRate(value);
	}
	,get_renderer: function() {
		return this.renderers[0];
	}
	,get_window: function() {
		return this.windows[0];
	}
	,__class__: lime_app_Application
	,__properties__: {get_window:"get_window",get_renderer:"get_renderer",set_frameRate:"set_frameRate",get_frameRate:"get_frameRate"}
});
var lime_app_Event = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event"] = lime_app_Event;
lime_app_Event.__name__ = ["lime","app","Event"];
lime_app_Event.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,__class__: lime_app_Event
};
var lime_app_Event_$Dynamic_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Dynamic_Void"] = lime_app_Event_$Dynamic_$Void;
lime_app_Event_$Dynamic_$Void.__name__ = ["lime","app","Event_Dynamic_Void"];
lime_app_Event_$Dynamic_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Dynamic_$Void
};
var lime_app_Event_$Float_$Float_$Int_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Float_Float_Int_Void"] = lime_app_Event_$Float_$Float_$Int_$Void;
lime_app_Event_$Float_$Float_$Int_$Void.__name__ = ["lime","app","Event_Float_Float_Int_Void"];
lime_app_Event_$Float_$Float_$Int_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1,a2) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1,a2);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Float_$Float_$Int_$Void
};
var lime_app_Event_$Float_$Float_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Float_Float_Void"] = lime_app_Event_$Float_$Float_$Void;
lime_app_Event_$Float_$Float_$Void.__name__ = ["lime","app","Event_Float_Float_Void"];
lime_app_Event_$Float_$Float_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Float_$Float_$Void
};
var lime_app_Event_$Int_$Float_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Int_Float_Void"] = lime_app_Event_$Int_$Float_$Void;
lime_app_Event_$Int_$Float_$Void.__name__ = ["lime","app","Event_Int_Float_Void"];
lime_app_Event_$Int_$Float_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Int_$Float_$Void
};
var lime_app_Event_$Int_$Int_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Int_Int_Void"] = lime_app_Event_$Int_$Int_$Void;
lime_app_Event_$Int_$Int_$Void.__name__ = ["lime","app","Event_Int_Int_Void"];
lime_app_Event_$Int_$Int_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Int_$Int_$Void
};
var lime_app_Event_$Int_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Int_Void"] = lime_app_Event_$Int_$Void;
lime_app_Event_$Int_$Void.__name__ = ["lime","app","Event_Int_Void"];
lime_app_Event_$Int_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Int_$Void
};
var lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_Int_lime_ui_JoystickHatPosition_Void"] = lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void;
lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void.__name__ = ["lime","app","Event_Int_lime_ui_JoystickHatPosition_Void"];
lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void
};
var lime_app_Event_$String_$Int_$Int_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_String_Int_Int_Void"] = lime_app_Event_$String_$Int_$Int_$Void;
lime_app_Event_$String_$Int_$Int_$Void.__name__ = ["lime","app","Event_String_Int_Int_Void"];
lime_app_Event_$String_$Int_$Int_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1,a2) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1,a2);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$String_$Int_$Int_$Void
};
var lime_app_Event_$String_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_String_Void"] = lime_app_Event_$String_$Void;
lime_app_Event_$String_$Void.__name__ = ["lime","app","Event_String_Void"];
lime_app_Event_$String_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$String_$Void
};
var lime_app_Event_$lime_$graphics_$RenderContext_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_graphics_RenderContext_Void"] = lime_app_Event_$lime_$graphics_$RenderContext_$Void;
lime_app_Event_$lime_$graphics_$RenderContext_$Void.__name__ = ["lime","app","Event_lime_graphics_RenderContext_Void"];
lime_app_Event_$lime_$graphics_$RenderContext_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$graphics_$RenderContext_$Void
};
var lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_GamepadAxis_Float_Void"] = lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void;
lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void.__name__ = ["lime","app","Event_lime_ui_GamepadAxis_Float_Void"];
lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void
};
var lime_app_Event_$lime_$ui_$GamepadButton_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_GamepadButton_Void"] = lime_app_Event_$lime_$ui_$GamepadButton_$Void;
lime_app_Event_$lime_$ui_$GamepadButton_$Void.__name__ = ["lime","app","Event_lime_ui_GamepadButton_Void"];
lime_app_Event_$lime_$ui_$GamepadButton_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$GamepadButton_$Void
};
var lime_app_Event_$lime_$ui_$Gamepad_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_Gamepad_Void"] = lime_app_Event_$lime_$ui_$Gamepad_$Void;
lime_app_Event_$lime_$ui_$Gamepad_$Void.__name__ = ["lime","app","Event_lime_ui_Gamepad_Void"];
lime_app_Event_$lime_$ui_$Gamepad_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$Gamepad_$Void
};
var lime_app_Event_$lime_$ui_$Joystick_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_Joystick_Void"] = lime_app_Event_$lime_$ui_$Joystick_$Void;
lime_app_Event_$lime_$ui_$Joystick_$Void.__name__ = ["lime","app","Event_lime_ui_Joystick_Void"];
lime_app_Event_$lime_$ui_$Joystick_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$Joystick_$Void
};
var lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"] = lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void;
lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void.__name__ = ["lime","app","Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"];
lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a,a1) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a,a1);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void
};
var lime_app_Event_$lime_$ui_$Touch_$Void = function() {
	this.canceled = false;
	this.__listeners = [];
	this.__priorities = [];
	this.__repeat = [];
};
$hxClasses["lime.app.Event_lime_ui_Touch_Void"] = lime_app_Event_$lime_$ui_$Touch_$Void;
lime_app_Event_$lime_$ui_$Touch_$Void.__name__ = ["lime","app","Event_lime_ui_Touch_Void"];
lime_app_Event_$lime_$ui_$Touch_$Void.prototype = {
	add: function(listener,once,priority) {
		if(priority == null) {
			priority = 0;
		}
		if(once == null) {
			once = false;
		}
		var _g1 = 0;
		var _g = this.__priorities.length;
		while(_g1 < _g) {
			var i = _g1++;
			if(priority > this.__priorities[i]) {
				this.__listeners.splice(i,0,listener);
				this.__priorities.splice(i,0,priority);
				this.__repeat.splice(i,0,!once);
				return;
			}
		}
		this.__listeners.push(listener);
		this.__priorities.push(priority);
		this.__repeat.push(!once);
	}
	,cancel: function() {
		this.canceled = true;
	}
	,has: function(listener) {
		var _g = 0;
		var _g1 = this.__listeners;
		while(_g < _g1.length) {
			var l = _g1[_g];
			++_g;
			if(Reflect.compareMethods(l,listener)) {
				return true;
			}
		}
		return false;
	}
	,remove: function(listener) {
		var i = this.__listeners.length;
		while(--i >= 0) if(Reflect.compareMethods(this.__listeners[i],listener)) {
			this.__listeners.splice(i,1);
			this.__priorities.splice(i,1);
			this.__repeat.splice(i,1);
		}
	}
	,dispatch: function(a) {
		this.canceled = false;
		var listeners = this.__listeners;
		var repeat = this.__repeat;
		var i = 0;
		while(i < listeners.length) {
			listeners[i](a);
			if(!repeat[i]) {
				this.remove(listeners[i]);
			} else {
				++i;
			}
			if(this.canceled) {
				break;
			}
		}
	}
	,__class__: lime_app_Event_$lime_$ui_$Touch_$Void
};
var lime_app_Future = function(work) {
	if(work != null) {
		if(lime_app_Future.__threadPool == null) {
			lime_app_Future.__threadPool = new lime_system_ThreadPool();
			lime_app_Future.__threadPool.doWork.add(lime_app_Future.threadPool_doWork);
			lime_app_Future.__threadPool.onComplete.add(lime_app_Future.threadPool_onComplete);
			lime_app_Future.__threadPool.onError.add(lime_app_Future.threadPool_onError);
		}
		var promise = new lime_app_Promise();
		promise.future = this;
		lime_app_Future.__threadPool.queue({ promise : promise, work : work});
	}
};
$hxClasses["lime.app.Future"] = lime_app_Future;
lime_app_Future.__name__ = ["lime","app","Future"];
lime_app_Future.__threadPool = null;
lime_app_Future.threadPool_doWork = function(state) {
	try {
		var result = state.work();
		lime_app_Future.__threadPool.sendComplete({ promise : state.promise, result : result});
	} catch( e ) {
		haxe_CallStack.lastException = e;
		if (e instanceof js__$Boot_HaxeError) e = e.val;
		lime_app_Future.__threadPool.sendError({ promise : state.promise, error : e});
	}
};
lime_app_Future.threadPool_onComplete = function(state) {
	state.promise.complete(state.result);
};
lime_app_Future.threadPool_onError = function(state) {
	state.promise.error(state.error);
};
lime_app_Future.prototype = {
	onComplete: function(listener) {
		if(listener != null) {
			if(this.__completed) {
				listener(this.value);
			} else if(!this.__errored) {
				if(this.__completeListeners == null) {
					this.__completeListeners = [];
				}
				this.__completeListeners.push(listener);
			}
		}
		return this;
	}
	,onError: function(listener) {
		if(listener != null) {
			if(this.__errored) {
				listener(this.__errorMessage);
			} else if(!this.__completed) {
				if(this.__errorListeners == null) {
					this.__errorListeners = [];
				}
				this.__errorListeners.push(listener);
			}
		}
		return this;
	}
	,onProgress: function(listener) {
		if(listener != null) {
			if(this.__progressListeners == null) {
				this.__progressListeners = [];
			}
			this.__progressListeners.push(listener);
		}
		return this;
	}
	,then: function(next) {
		if(this.__completed) {
			return next(this.value);
		} else if(this.__errored) {
			var future = new lime_app_Future();
			future.onError(this.__errorMessage);
			return future;
		} else {
			var promise = new lime_app_Promise();
			this.onError($bind(promise,promise.error));
			this.onProgress($bind(promise,promise.progress));
			this.onComplete(function(val) {
				var future1 = next(val);
				future1.onError($bind(promise,promise.error));
				future1.onComplete($bind(promise,promise.complete));
			});
			return promise.future;
		}
	}
	,get_isCompleted: function() {
		if(!this.__completed) {
			return this.__errored;
		} else {
			return true;
		}
	}
	,__class__: lime_app_Future
	,__properties__: {get_isCompleted:"get_isCompleted"}
};
var lime_app_Preloader = function() {
	this.total = 0;
	this.loaded = 0;
	this.onProgress = new lime_app_Event_$Int_$Int_$Void();
	this.onComplete = new lime_app_Event_$Void_$Void();
	this.onProgress.add($bind(this,this.update));
};
$hxClasses["lime.app.Preloader"] = lime_app_Preloader;
lime_app_Preloader.__name__ = ["lime","app","Preloader"];
lime_app_Preloader.prototype = {
	create: function(config) {
	}
	,load: function(urls,types) {
		var url = null;
		var cacheVersion = lime_Assets.cache.version;
		var _g1 = 0;
		var _g = urls.length;
		while(_g1 < _g) {
			var i = _g1++;
			url = urls[i];
			switch(types[i]) {
			case "BINARY":
				if(!lime_app_Preloader.loaders.exists(url)) {
					var loader = new lime_net_HTTPRequest();
					lime_app_Preloader.loaders.set(url,loader);
					this.total++;
				}
				break;
			case "FONT":
				this.total++;
				this.loadFont(url);
				break;
			case "IMAGE":
				if(!lime_app_Preloader.images.exists(url)) {
					var image = new Image();
					lime_app_Preloader.images.set(url,image);
					image.onload = $bind(this,this.image_onLoad);
					image.src = url + "?" + cacheVersion;
					this.total++;
				}
				break;
			case "TEXT":
				if(!lime_app_Preloader.loaders.exists(url)) {
					var loader1 = new lime_net_HTTPRequest();
					lime_app_Preloader.loaders.set(url,loader1);
					this.total++;
				}
				break;
			default:
			}
		}
		var url1 = lime_app_Preloader.loaders.keys();
		while(url1.hasNext()) {
			var url2 = url1.next();
			var _this = lime_app_Preloader.loaders;
			(__map_reserved[url2] != null ? _this.getReserved(url2) : _this.h[url2]).load(url2 + "?" + cacheVersion).onComplete($bind(this,this.loader_onComplete));
		}
		if(this.total == 0) {
			this.start();
		}
	}
	,loadFont: function(font) {
		var _gthis = this;
		if(window.document.fonts && ($_=window.document.fonts,$bind($_,$_.load))) {
			window.document.fonts.load("1em '" + font + "'").then(function(_) {
				_gthis.loaded++;
				_gthis.onProgress.dispatch(_gthis.loaded,_gthis.total);
				if(_gthis.loaded == _gthis.total) {
					_gthis.start();
				}
			});
		} else {
			var node = window.document.createElement("span");
			node.innerHTML = "giItT1WQy@!-/#";
			var style = node.style;
			style.position = "absolute";
			style.left = "-10000px";
			style.top = "-10000px";
			style.fontSize = "300px";
			style.fontFamily = "sans-serif";
			style.fontVariant = "normal";
			style.fontStyle = "normal";
			style.fontWeight = "normal";
			style.letterSpacing = "0";
			window.document.body.appendChild(node);
			var width = node.offsetWidth;
			style.fontFamily = "'" + font + "', sans-serif";
			var interval = null;
			var found = false;
			var checkFont = function() {
				if(node.offsetWidth != width) {
					if(!found) {
						found = true;
						return false;
					}
					_gthis.loaded++;
					if(interval != null) {
						window.clearInterval(interval);
					}
					node.parentNode.removeChild(node);
					node = null;
					_gthis.onProgress.dispatch(_gthis.loaded,_gthis.total);
					if(_gthis.loaded == _gthis.total) {
						_gthis.start();
					}
					return true;
				}
				return false;
			};
			if(!checkFont()) {
				interval = window.setInterval(checkFont,50);
			}
		}
	}
	,start: function() {
		this.complete = true;
		this.onComplete.dispatch();
	}
	,update: function(loaded,total) {
	}
	,image_onLoad: function(_) {
		this.loaded++;
		this.onProgress.dispatch(this.loaded,this.total);
		if(this.loaded == this.total) {
			this.start();
		}
	}
	,loader_onComplete: function(_) {
		this.loaded++;
		this.onProgress.dispatch(this.loaded,this.total);
		if(this.loaded == this.total) {
			this.start();
		}
	}
	,__class__: lime_app_Preloader
};
var lime_app_Promise = function() {
	this.future = new lime_app_Future();
};
$hxClasses["lime.app.Promise"] = lime_app_Promise;
lime_app_Promise.__name__ = ["lime","app","Promise"];
lime_app_Promise.prototype = {
	complete: function(data) {
		if(!this.future.__errored) {
			this.future.__completed = true;
			this.future.value = data;
			if(this.future.__completeListeners != null) {
				var _g = 0;
				var _g1 = this.future.__completeListeners;
				while(_g < _g1.length) {
					var listener = _g1[_g];
					++_g;
					listener(data);
				}
				this.future.__completeListeners = null;
			}
		}
		return this;
	}
	,completeWith: function(future) {
		future.onComplete($bind(this,this.complete));
		future.onError($bind(this,this.error));
		future.onProgress($bind(this,this.progress));
		return this;
	}
	,error: function(msg) {
		if(!this.future.__completed) {
			this.future.__errored = true;
			this.future.__errorMessage = msg;
			if(this.future.__errorListeners != null) {
				var _g = 0;
				var _g1 = this.future.__errorListeners;
				while(_g < _g1.length) {
					var listener = _g1[_g];
					++_g;
					listener(msg);
				}
				this.future.__errorListeners = null;
			}
		}
		return this;
	}
	,progress: function(progress) {
		if(!this.future.__errored && !this.future.__completed) {
			if(this.future.__progressListeners != null) {
				var _g = 0;
				var _g1 = this.future.__progressListeners;
				while(_g < _g1.length) {
					var listener = _g1[_g];
					++_g;
					listener(progress);
				}
			}
		}
		return this;
	}
	,get_isCompleted: function() {
		return this.future.get_isCompleted();
	}
	,__class__: lime_app_Promise
	,__properties__: {get_isCompleted:"get_isCompleted"}
};
var lime_audio_ALAudioContext = function() {
	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.FALSE = 0;
	this.NONE = 0;
};
$hxClasses["lime.audio.ALAudioContext"] = lime_audio_ALAudioContext;
lime_audio_ALAudioContext.__name__ = ["lime","audio","ALAudioContext"];
lime_audio_ALAudioContext.prototype = {
	bufferData: function(buffer,format,data,size,freq) {
	}
	,buffer3f: function(buffer,param,value1,value2,value3) {
	}
	,buffer3i: function(buffer,param,value1,value2,value3) {
	}
	,bufferf: function(buffer,param,value) {
	}
	,bufferfv: function(buffer,param,values) {
	}
	,bufferi: function(buffer,param,value) {
	}
	,bufferiv: function(buffer,param,values) {
	}
	,deleteBuffer: function(buffer) {
	}
	,deleteBuffers: function(buffers) {
	}
	,deleteSource: function(source) {
	}
	,deleteSources: function(sources) {
	}
	,disable: function(capability) {
	}
	,distanceModel: function(distanceModel) {
	}
	,dopplerFactor: function(value) {
	}
	,dopplerVelocity: function(value) {
	}
	,enable: function(capability) {
	}
	,genSource: function() {
		return lime_audio_openal_AL.genSource();
	}
	,genSources: function(n) {
		return lime_audio_openal_AL.genSources(n);
	}
	,genBuffer: function() {
		return lime_audio_openal_AL.genBuffer();
	}
	,genBuffers: function(n) {
		return lime_audio_openal_AL.genBuffers(n);
	}
	,getBoolean: function(param) {
		return lime_audio_openal_AL.getBoolean(param);
	}
	,getBooleanv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getBooleanv(param,count);
	}
	,getBuffer3f: function(buffer,param) {
		return lime_audio_openal_AL.getBuffer3f(buffer,param);
	}
	,getBuffer3i: function(buffer,param) {
		return lime_audio_openal_AL.getBuffer3i(buffer,param);
	}
	,getBufferf: function(buffer,param) {
		return lime_audio_openal_AL.getBufferf(buffer,param);
	}
	,getBufferfv: function(buffer,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getBufferfv(buffer,param,count);
	}
	,getBufferi: function(buffer,param) {
		return lime_audio_openal_AL.getBufferi(buffer,param);
	}
	,getBufferiv: function(buffer,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getBufferiv(buffer,param,count);
	}
	,getDouble: function(param) {
		return lime_audio_openal_AL.getDouble(param);
	}
	,getDoublev: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getDoublev(param,count);
	}
	,getEnumValue: function(ename) {
		return lime_audio_openal_AL.getEnumValue(ename);
	}
	,getError: function() {
		return lime_audio_openal_AL.getError();
	}
	,getErrorString: function() {
		return lime_audio_openal_AL.getErrorString();
	}
	,getFloat: function(param) {
		return lime_audio_openal_AL.getFloat(param);
	}
	,getFloatv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getFloatv(param,count);
	}
	,getInteger: function(param) {
		return lime_audio_openal_AL.getInteger(param);
	}
	,getIntegerv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getIntegerv(param,count);
	}
	,getListener3f: function(param) {
		return lime_audio_openal_AL.getListener3f(param);
	}
	,getListener3i: function(param) {
		return lime_audio_openal_AL.getListener3i(param);
	}
	,getListenerf: function(param) {
		return lime_audio_openal_AL.getListenerf(param);
	}
	,getListenerfv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getListenerfv(param,count);
	}
	,getListeneri: function(param) {
		return lime_audio_openal_AL.getListeneri(param);
	}
	,getListeneriv: function(param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getListeneriv(param,count);
	}
	,getProcAddress: function(fname) {
		return lime_audio_openal_AL.getProcAddress(fname);
	}
	,getSource3f: function(source,param) {
		return lime_audio_openal_AL.getSource3f(source,param);
	}
	,getSourcef: function(source,param) {
		return lime_audio_openal_AL.getSourcef(source,param);
	}
	,getSource3i: function(source,param) {
		return lime_audio_openal_AL.getSource3i(source,param);
	}
	,getSourcefv: function(source,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getSourcefv(source,param);
	}
	,getSourcei: function(source,param) {
		return lime_audio_openal_AL.getSourcei(source,param);
	}
	,getSourceiv: function(source,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_AL.getSourceiv(source,param,count);
	}
	,getString: function(param) {
		return lime_audio_openal_AL.getString(param);
	}
	,isBuffer: function(buffer) {
		return lime_audio_openal_AL.isBuffer(buffer);
	}
	,isEnabled: function(capability) {
		return lime_audio_openal_AL.isEnabled(capability);
	}
	,isExtensionPresent: function(extname) {
		return lime_audio_openal_AL.isExtensionPresent(extname);
	}
	,isSource: function(source) {
		return lime_audio_openal_AL.isSource(source);
	}
	,listener3f: function(param,value1,value2,value3) {
	}
	,listener3i: function(param,value1,value2,value3) {
	}
	,listenerf: function(param,value) {
	}
	,listenerfv: function(param,values) {
	}
	,listeneri: function(param,value) {
	}
	,listeneriv: function(param,values) {
	}
	,source3f: function(source,param,value1,value2,value3) {
	}
	,source3i: function(source,param,value1,value2,value3) {
	}
	,sourcef: function(source,param,value) {
	}
	,sourcefv: function(source,param,values) {
	}
	,sourcei: function(source,param,value) {
	}
	,sourceiv: function(source,param,values) {
	}
	,sourcePlay: function(source) {
	}
	,sourcePlayv: function(sources) {
	}
	,sourceStop: function(source) {
	}
	,sourceStopv: function(sources) {
	}
	,sourceRewind: function(source) {
	}
	,sourceRewindv: function(sources) {
	}
	,sourcePause: function(source) {
	}
	,sourcePausev: function(sources) {
	}
	,sourceQueueBuffer: function(source,buffer) {
	}
	,sourceQueueBuffers: function(source,nb,buffers) {
	}
	,sourceUnqueueBuffer: function(source) {
		return lime_audio_openal_AL.sourceUnqueueBuffer(source);
	}
	,sourceUnqueueBuffers: function(source,nb) {
		return lime_audio_openal_AL.sourceUnqueueBuffers(source,nb);
	}
	,speedOfSound: function(value) {
	}
	,__class__: lime_audio_ALAudioContext
};
var lime_audio_ALCAudioContext = function() {
	this.ALL_DEVICES_SPECIFIER = 4115;
	this.DEFAULT_ALL_DEVICES_SPECIFIER = 4114;
	this.ENUMERATE_ALL_EXT = 1;
	this.EXTENSIONS = 4102;
	this.DEVICE_SPECIFIER = 4101;
	this.DEFAULT_DEVICE_SPECIFIER = 4100;
	this.ALL_ATTRIBUTES = 4099;
	this.ATTRIBUTES_SIZE = 4098;
	this.OUT_OF_MEMORY = 40965;
	this.INVALID_VALUE = 40964;
	this.INVALID_ENUM = 40963;
	this.INVALID_CONTEXT = 40962;
	this.INVALID_DEVICE = 40961;
	this.NO_ERROR = 0;
	this.STEREO_SOURCES = 4113;
	this.MONO_SOURCES = 4112;
	this.SYNC = 4105;
	this.REFRESH = 4104;
	this.FREQUENCY = 4103;
	this.TRUE = 1;
	this.FALSE = 0;
};
$hxClasses["lime.audio.ALCAudioContext"] = lime_audio_ALCAudioContext;
lime_audio_ALCAudioContext.__name__ = ["lime","audio","ALCAudioContext"];
lime_audio_ALCAudioContext.prototype = {
	closeDevice: function(device) {
		return lime_audio_openal_ALC.closeDevice(device);
	}
	,createContext: function(device,attrlist) {
		return lime_audio_openal_ALC.createContext(device,attrlist);
	}
	,destroyContext: function(context) {
	}
	,getContextsDevice: function(context) {
		return lime_audio_openal_ALC.getContextsDevice(context);
	}
	,getCurrentContext: function() {
		return lime_audio_openal_ALC.getCurrentContext();
	}
	,getError: function(device) {
		return lime_audio_openal_ALC.getError(device);
	}
	,getErrorString: function(device) {
		return lime_audio_openal_ALC.getErrorString(device);
	}
	,getIntegerv: function(device,param,count) {
		if(count == null) {
			count = 1;
		}
		return lime_audio_openal_ALC.getIntegerv(device,param,count);
	}
	,getString: function(device,param) {
		return lime_audio_openal_ALC.getString(device,param);
	}
	,makeContextCurrent: function(context) {
		return lime_audio_openal_ALC.makeContextCurrent(context);
	}
	,openDevice: function(deviceName) {
		return lime_audio_openal_ALC.openDevice(deviceName);
	}
	,processContext: function(context) {
	}
	,suspendContext: function(context) {
	}
	,__class__: lime_audio_ALCAudioContext
};
var lime_audio_AudioBuffer = function() {
	this.id = 0;
};
$hxClasses["lime.audio.AudioBuffer"] = lime_audio_AudioBuffer;
lime_audio_AudioBuffer.__name__ = ["lime","audio","AudioBuffer"];
lime_audio_AudioBuffer.fromBytes = function(bytes) {
	return null;
};
lime_audio_AudioBuffer.fromFile = function(path) {
	return null;
};
lime_audio_AudioBuffer.fromURL = function(url,handler) {
	if(url != null && url.indexOf("http://") == -1 && url.indexOf("https://") == -1) {
		handler(lime_audio_AudioBuffer.fromFile(url));
	}
};
lime_audio_AudioBuffer.prototype = {
	dispose: function() {
	}
	,__class__: lime_audio_AudioBuffer
};
var lime_audio_AudioContext = $hxClasses["lime.audio.AudioContext"] = { __ename__ : ["lime","audio","AudioContext"], __constructs__ : ["OPENAL","HTML5","WEB","FLASH","CUSTOM"] };
lime_audio_AudioContext.OPENAL = function(alc,al) { var $x = ["OPENAL",0,alc,al]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
lime_audio_AudioContext.HTML5 = function(context) { var $x = ["HTML5",1,context]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
lime_audio_AudioContext.WEB = function(context) { var $x = ["WEB",2,context]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
lime_audio_AudioContext.FLASH = function(context) { var $x = ["FLASH",3,context]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
lime_audio_AudioContext.CUSTOM = function(data) { var $x = ["CUSTOM",4,data]; $x.__enum__ = lime_audio_AudioContext; $x.toString = $estr; return $x; };
var lime_audio_AudioManager = function() { };
$hxClasses["lime.audio.AudioManager"] = lime_audio_AudioManager;
lime_audio_AudioManager.__name__ = ["lime","audio","AudioManager"];
lime_audio_AudioManager.context = null;
lime_audio_AudioManager.init = function(context) {
	if(lime_audio_AudioManager.context == null) {
		if(context == null) {
			try {
				window.AudioContext = window.AudioContext || window.webkitAudioContext;
				lime_audio_AudioManager.context = lime_audio_AudioContext.WEB(new AudioContext ());
			} catch( e ) {
				haxe_CallStack.lastException = e;
				lime_audio_AudioManager.context = lime_audio_AudioContext.HTML5(new lime_audio_HTML5AudioContext());
			}
		} else {
			lime_audio_AudioManager.context = context;
		}
	}
};
lime_audio_AudioManager.resume = function() {
	if(lime_audio_AudioManager.context != null) {
		var _g = lime_audio_AudioManager.context;
	}
};
lime_audio_AudioManager.shutdown = function() {
	if(lime_audio_AudioManager.context != null) {
		var _g = lime_audio_AudioManager.context;
	}
};
lime_audio_AudioManager.suspend = function() {
	if(lime_audio_AudioManager.context != null) {
		var _g = lime_audio_AudioManager.context;
	}
};
var lime_audio_AudioSource = function(buffer,offset,length,loops) {
	if(loops == null) {
		loops = 0;
	}
	if(offset == null) {
		offset = 0;
	}
	this.onComplete = new lime_app_Event_$Void_$Void();
	this.buffer = buffer;
	this.offset = offset;
	if(length != null && length != 0) {
		this.set_length(length);
	}
	this.set_loops(loops);
	this.id = 0;
	if(buffer != null) {
		this.init();
	}
};
$hxClasses["lime.audio.AudioSource"] = lime_audio_AudioSource;
lime_audio_AudioSource.__name__ = ["lime","audio","AudioSource"];
lime_audio_AudioSource.prototype = {
	dispose: function() {
		var _g = lime_audio_AudioManager.context;
	}
	,init: function() {
		var _g = lime_audio_AudioManager.context;
		if(_g[1] == 0) {
			var al = _g[3];
			if(this.buffer.id == 0) {
				this.buffer.id = al.genBuffer();
				var format = 0;
				if(this.buffer.channels == 1) {
					if(this.buffer.bitsPerSample == 8) {
						format = al.FORMAT_MONO8;
					} else if(this.buffer.bitsPerSample == 16) {
						format = al.FORMAT_MONO16;
					}
				} else if(this.buffer.channels == 2) {
					if(this.buffer.bitsPerSample == 8) {
						format = al.FORMAT_STEREO8;
					} else if(this.buffer.bitsPerSample == 16) {
						format = al.FORMAT_STEREO16;
					}
				}
			}
			this.id = al.genSource();
		}
	}
	,play: function() {
	}
	,pause: function() {
	}
	,stop: function() {
	}
	,timer_onRun: function() {
	}
	,get_currentTime: function() {
		return 0;
	}
	,set_currentTime: function(value) {
		return this.pauseTime = value;
	}
	,get_gain: function() {
		return 1;
	}
	,set_gain: function(value) {
		return 1;
	}
	,get_length: function() {
		if(this.__length != null) {
			return this.__length;
		}
		return 0;
	}
	,set_length: function(value) {
		return this.__length = value;
	}
	,get_loops: function() {
		return this.__loops;
	}
	,set_loops: function(loops) {
		return this.__loops = loops;
	}
	,__class__: lime_audio_AudioSource
	,__properties__: {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 lime_audio_FlashAudioContext = function() {
};
$hxClasses["lime.audio.FlashAudioContext"] = lime_audio_FlashAudioContext;
lime_audio_FlashAudioContext.__name__ = ["lime","audio","FlashAudioContext"];
lime_audio_FlashAudioContext.prototype = {
	createBuffer: function(stream,context) {
		return null;
	}
	,getBytesLoaded: function(buffer) {
		return 0;
	}
	,getBytesTotal: function(buffer) {
		return 0;
	}
	,getID3: function(buffer) {
		return null;
	}
	,getIsBuffering: function(buffer) {
		return false;
	}
	,getIsURLInaccessible: function(buffer) {
		return false;
	}
	,getLength: function(buffer) {
		return 0;
	}
	,getURL: function(buffer) {
		return null;
	}
	,close: function(buffer) {
	}
	,extract: function(buffer,target,length,startPosition) {
		if(startPosition == null) {
			startPosition = -1;
		}
		return 0;
	}
	,load: function(buffer,stream,context) {
	}
	,loadCompressedDataFromByteArray: function(buffer,bytes,bytesLength) {
	}
	,loadPCMFromByteArray: function(buffer,bytes,samples,format,stereo,sampleRate) {
		if(sampleRate == null) {
			sampleRate = 44100;
		}
		if(stereo == null) {
			stereo = true;
		}
	}
	,play: function(buffer,startTime,loops,sndTransform) {
		if(loops == null) {
			loops = 0;
		}
		if(startTime == null) {
			startTime = 0;
		}
		return null;
	}
	,__class__: lime_audio_FlashAudioContext
};
var lime_audio_HTML5AudioContext = function() {
	this.NETWORK_NO_SOURCE = 3;
	this.NETWORK_LOADING = 2;
	this.NETWORK_IDLE = 1;
	this.NETWORK_EMPTY = 0;
	this.HAVE_NOTHING = 0;
	this.HAVE_METADATA = 1;
	this.HAVE_FUTURE_DATA = 3;
	this.HAVE_ENOUGH_DATA = 4;
	this.HAVE_CURRENT_DATA = 2;
};
$hxClasses["lime.audio.HTML5AudioContext"] = lime_audio_HTML5AudioContext;
lime_audio_HTML5AudioContext.__name__ = ["lime","audio","HTML5AudioContext"];
lime_audio_HTML5AudioContext.prototype = {
	canPlayType: function(buffer,type) {
		if(buffer.src != null) {
			return buffer.src.canPlayType(type);
		}
		return null;
	}
	,createBuffer: function(urlString) {
		var buffer = new lime_audio_AudioBuffer();
		buffer.src = new Audio();
		buffer.src.src = urlString;
		return buffer;
	}
	,getAutoplay: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.autoplay;
		}
		return false;
	}
	,getBuffered: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.buffered;
		}
		return null;
	}
	,getCurrentSrc: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.currentSrc;
		}
		return null;
	}
	,getCurrentTime: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.currentTime;
		}
		return 0;
	}
	,getDefaultPlaybackRate: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.defaultPlaybackRate;
		}
		return 1;
	}
	,getDuration: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.duration;
		}
		return 0;
	}
	,getEnded: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.ended;
		}
		return false;
	}
	,getError: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.error;
		}
		return null;
	}
	,getLoop: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.loop;
		}
		return false;
	}
	,getMuted: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.muted;
		}
		return false;
	}
	,getNetworkState: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.networkState;
		}
		return 0;
	}
	,getPaused: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.paused;
		}
		return false;
	}
	,getPlaybackRate: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.playbackRate;
		}
		return 1;
	}
	,getPlayed: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.played;
		}
		return null;
	}
	,getPreload: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.preload;
		}
		return null;
	}
	,getReadyState: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.readyState;
		}
		return 0;
	}
	,getSeekable: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.seekable;
		}
		return null;
	}
	,getSeeking: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.seeking;
		}
		return false;
	}
	,getSrc: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.src;
		}
		return null;
	}
	,getStartTime: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.playbackRate;
		}
		return 0;
	}
	,getVolume: function(buffer) {
		if(buffer.src != null) {
			return buffer.src.volume;
		}
		return 1;
	}
	,load: function(buffer) {
		if(buffer.src != null) {
			buffer.src.load();
			return;
		}
	}
	,pause: function(buffer) {
		if(buffer.src != null) {
			buffer.src.pause();
			return;
		}
	}
	,play: function(buffer) {
		if(buffer.src != null) {
			buffer.src.play();
			return;
		}
	}
	,setAutoplay: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.autoplay = value;
		}
	}
	,setCurrentTime: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.currentTime = value;
		}
	}
	,setDefaultPlaybackRate: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.defaultPlaybackRate = value;
		}
	}
	,setLoop: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.loop = value;
		}
	}
	,setMuted: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.muted = value;
		}
	}
	,setPlaybackRate: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.playbackRate = value;
		}
	}
	,setPreload: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.preload = value;
		}
	}
	,setSrc: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.src = value;
		}
	}
	,setVolume: function(buffer,value) {
		if(buffer.src != null) {
			buffer.src.volume = value;
		}
	}
	,__class__: lime_audio_HTML5AudioContext
};
var lime_audio_openal_AL = function() { };
$hxClasses["lime.audio.openal.AL"] = lime_audio_openal_AL;
lime_audio_openal_AL.__name__ = ["lime","audio","openal","AL"];
lime_audio_openal_AL.bufferData = function(buffer,format,data,size,freq) {
};
lime_audio_openal_AL.buffer3f = function(buffer,param,value1,value2,value3) {
};
lime_audio_openal_AL.buffer3i = function(buffer,param,value1,value2,value3) {
};
lime_audio_openal_AL.bufferf = function(buffer,param,value) {
};
lime_audio_openal_AL.bufferfv = function(buffer,param,values) {
};
lime_audio_openal_AL.bufferi = function(buffer,param,value) {
};
lime_audio_openal_AL.bufferiv = function(buffer,param,values) {
};
lime_audio_openal_AL.deleteBuffer = function(buffer) {
};
lime_audio_openal_AL.deleteBuffers = function(buffers) {
};
lime_audio_openal_AL.deleteSource = function(source) {
};
lime_audio_openal_AL.deleteSources = function(sources) {
};
lime_audio_openal_AL.disable = function(capability) {
};
lime_audio_openal_AL.distanceModel = function(distanceModel) {
};
lime_audio_openal_AL.dopplerFactor = function(value) {
};
lime_audio_openal_AL.dopplerVelocity = function(value) {
};
lime_audio_openal_AL.enable = function(capability) {
};
lime_audio_openal_AL.genSource = function() {
	return 0;
};
lime_audio_openal_AL.genSources = function(n) {
	return null;
};
lime_audio_openal_AL.genBuffer = function() {
	return 0;
};
lime_audio_openal_AL.genBuffers = function(n) {
	return null;
};
lime_audio_openal_AL.getBoolean = function(param) {
	return false;
};
lime_audio_openal_AL.getBooleanv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getBuffer3f = function(buffer,param) {
	return null;
};
lime_audio_openal_AL.getBuffer3i = function(buffer,param) {
	return null;
};
lime_audio_openal_AL.getBufferf = function(buffer,param) {
	return 0;
};
lime_audio_openal_AL.getBufferfv = function(buffer,param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getBufferi = function(buffer,param) {
	return 0;
};
lime_audio_openal_AL.getBufferiv = function(buffer,param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getDouble = function(param) {
	return 0;
};
lime_audio_openal_AL.getDoublev = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getEnumValue = function(ename) {
	return 0;
};
lime_audio_openal_AL.getError = function() {
	return 0;
};
lime_audio_openal_AL.getErrorString = function() {
	switch(lime_audio_openal_AL.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 "";
	}
};
lime_audio_openal_AL.getFloat = function(param) {
	return 0;
};
lime_audio_openal_AL.getFloatv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getInteger = function(param) {
	return 0;
};
lime_audio_openal_AL.getIntegerv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getListener3f = function(param) {
	return null;
};
lime_audio_openal_AL.getListener3i = function(param) {
	return null;
};
lime_audio_openal_AL.getListenerf = function(param) {
	return 0;
};
lime_audio_openal_AL.getListenerfv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getListeneri = function(param) {
	return 0;
};
lime_audio_openal_AL.getListeneriv = function(param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getProcAddress = function(fname) {
	return null;
};
lime_audio_openal_AL.getSource3f = function(source,param) {
	return null;
};
lime_audio_openal_AL.getSourcef = function(source,param) {
	return 0;
};
lime_audio_openal_AL.getSource3i = function(source,param) {
	return null;
};
lime_audio_openal_AL.getSourcefv = function(source,param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getSourcei = function(source,param) {
	return 0;
};
lime_audio_openal_AL.getSourceiv = function(source,param,count) {
	if(count == null) {
		count = 1;
	}
	return null;
};
lime_audio_openal_AL.getString = function(param) {
	return null;
};
lime_audio_openal_AL.isBuffer = function(buffer) {
	return false;
};
lime_audio_openal_AL.isEnabled = function(capability) {
	return false;
};
lime_audio_openal_AL.isExtensionPresent = function(extname) {
	return false;
};
lime_audio_openal_AL.isSource = function(source) {
	return false;
};
lime_audio_openal_AL.listener3f = function(param,value1,value2,value3) {
};
lime_audio_openal_AL.listener3i = function(param,value1,value2,value3) {
};
lime_audio_openal_AL.listenerf = function(param,value) {
};
lime_audio_openal_AL.listenerfv = function(param,values) {
};
lime_audio_openal_AL.listeneri = function(param,value) {
};
lime_audio_openal_AL.listeneriv = function(param,values) {
};
lime_audio_openal_AL.source3f = function(source,param,value1,value2,value3) {
};
lime_audio_openal_AL.source3i = function(source,param,value1,value2,value3) {
};
lime_audio_openal_AL.sourcef = function(source,param,value) {
};
lime_audio_openal_AL.sourcefv = function(source,param,values) {
};
lime_audio_openal_AL.sourcei = function(source,param,value) {
};
lime_audio_openal_AL.sourceiv = function(source,param,values) {
};
lime_audio_openal_AL.sourcePlay = function(source) {
};
lime_audio_openal_AL.sourcePlayv = function(sources) {
};
lime_audio_openal_AL.sourceStop = function(source) {
};
lime_audio_openal_AL.sourceStopv = function(sources) {
};
lime_audio_openal_AL.sourceRewind = function(source) {
};
lime_audio_openal_AL.sourceRewindv = function(sources) {
};
lime_audio_openal_AL.sourcePause = function(source) {
};
lime_audio_openal_AL.sourcePausev = function(sources) {
};
lime_audio_openal_AL.sourceQueueBuffer = function(source,buffer) {
};
lime_audio_openal_AL.sourceQueueBuffers = function(source,nb,buffers) {
};
lime_audio_openal_AL.sourceUnqueueBuffer = function(source) {
	return 0;
};
lime_audio_openal_AL.sourceUnqueueBuffers = function(source,nb) {
	return null;
};
lime_audio_openal_AL.speedOfSound = function(value) {
};
var lime_audio_openal_ALC = function() { };
$hxClasses["lime.audio.openal.ALC"] = lime_audio_openal_ALC;
lime_audio_openal_ALC.__name__ = ["lime","audio","openal","ALC"];
lime_audio_openal_ALC.closeDevice = function(device) {
	return false;
};
lime_audio_openal_ALC.createContext = function(device,attrlist) {
	return null;
};
lime_audio_openal_ALC.destroyContext = function(context) {
};
lime_audio_openal_ALC.getContextsDevice = function(context) {
	return null;
};
lime_audio_openal_ALC.getCurrentContext = function() {
	return null;
};
lime_audio_openal_ALC.getError = function(device) {
	return 0;
};
lime_audio_openal_ALC.getErrorString = function(device) {
	switch(lime_audio_openal_ALC.getError(device)) {
	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 "";
	}
};
lime_audio_openal_ALC.getIntegerv = function(device,param,size) {
	return null;
};
lime_audio_openal_ALC.getString = function(device,param) {
	return null;
};
lime_audio_openal_ALC.makeContextCurrent = function(context) {
	return false;
};
lime_audio_openal_ALC.openDevice = function(deviceName) {
	return null;
};
lime_audio_openal_ALC.processContext = function(context) {
};
lime_audio_openal_ALC.suspendContext = function(context) {
};
var lime_audio_openal__$ALContext_ALContext_$Impl_$ = {};
$hxClasses["lime.audio.openal._ALContext.ALContext_Impl_"] = lime_audio_openal__$ALContext_ALContext_$Impl_$;
lime_audio_openal__$ALContext_ALContext_$Impl_$.__name__ = ["lime","audio","openal","_ALContext","ALContext_Impl_"];
lime_audio_openal__$ALContext_ALContext_$Impl_$._new = function(handle) {
	return handle;
};
var lime_audio_openal__$ALDevice_ALDevice_$Impl_$ = {};
$hxClasses["lime.audio.openal._ALDevice.ALDevice_Impl_"] = lime_audio_openal__$ALDevice_ALDevice_$Impl_$;
lime_audio_openal__$ALDevice_ALDevice_$Impl_$.__name__ = ["lime","audio","openal","_ALDevice","ALDevice_Impl_"];
lime_audio_openal__$ALDevice_ALDevice_$Impl_$._new = function(handle) {
	return handle;
};
var lime_graphics_ConsoleRenderContext = function() {
};
$hxClasses["lime.graphics.ConsoleRenderContext"] = lime_graphics_ConsoleRenderContext;
lime_graphics_ConsoleRenderContext.__name__ = ["lime","graphics","ConsoleRenderContext"];
lime_graphics_ConsoleRenderContext.prototype = {
	createIndexBuffer: function(indices,count) {
		return new lime_graphics_console_IndexBuffer();
	}
	,createVertexBuffer: function(decl,count) {
		return new lime_graphics_console_VertexBuffer();
	}
	,lookupShader: function(name) {
		return new lime_graphics_console_Shader();
	}
	,clear: function(r,g,b,a,depth,stencil) {
		if(stencil == null) {
			stencil = 0;
		}
		if(depth == null) {
			depth = 1.0;
		}
	}
	,bindShader: function(shader) {
	}
	,setViewport: function(x,y,width,height,nearPlane,farPlane) {
		if(farPlane == null) {
			farPlane = 1.0;
		}
		if(nearPlane == null) {
			nearPlane = 0.0;
		}
	}
	,setVertexShaderConstantF: function(startRegister,vec4,vec4count) {
	}
	,setVertexSource: function(vb) {
	}
	,setIndexSource: function(ib) {
	}
	,draw: function(primitive,startVertex,primitiveCount) {
	}
	,drawIndexed: function(primitive,vertexCount,startIndex,primitiveCount) {
	}
	,get_width: function() {
		return 0;
	}
	,get_height: function() {
		return 0;
	}
	,__class__: lime_graphics_ConsoleRenderContext
	,__properties__: {get_height:"get_height",get_width:"get_width"}
};
var lime_graphics_FlashRenderContext = function() {
};
$hxClasses["lime.graphics.FlashRenderContext"] = lime_graphics_FlashRenderContext;
lime_graphics_FlashRenderContext.__name__ = ["lime","graphics","FlashRenderContext"];
lime_graphics_FlashRenderContext.prototype = {
	addChild: function(child) {
		return null;
	}
	,addChildAt: function(child,index) {
		return null;
	}
	,addEventListener: function(type,listener,useCapture,priority,useWeakReference) {
		if(useWeakReference == null) {
			useWeakReference = false;
		}
		if(priority == null) {
			priority = 0;
		}
		if(useCapture == null) {
			useCapture = false;
		}
	}
	,areInaccessibleObjectsUnderPoint: function(point) {
		return false;
	}
	,contains: function(child) {
		return false;
	}
	,dispatchEvent: function(event) {
		return false;
	}
	,getBounds: function(targetCoordinateSpace) {
		return null;
	}
	,getChildAt: function(index) {
		return null;
	}
	,getChildByName: function(name) {
		return null;
	}
	,getChildIndex: function(child) {
		return 0;
	}
	,getObjectsUnderPoint: function(point) {
		return null;
	}
	,getRect: function(targetCoordinateSpace) {
		return null;
	}
	,globalToLocal: function(point) {
		return null;
	}
	,globalToLocal3D: function(point) {
		return null;
	}
	,hasEventListener: function(type) {
		return false;
	}
	,hitTestObject: function(obj) {
		return false;
	}
	,hitTestPoint: function(x,y,shapeFlag) {
		if(shapeFlag == null) {
			shapeFlag = false;
		}
		return false;
	}
	,local3DToGlobal: function(point3d) {
		return null;
	}
	,localToGlobal: function(point) {
		return null;
	}
	,removeChild: function(child) {
		return null;
	}
	,removeChildAt: function(index) {
		return null;
	}
	,removeChildren: function(beginIndex,endIndex) {
		if(endIndex == null) {
			endIndex = 2147483647;
		}
		if(beginIndex == null) {
			beginIndex = 0;
		}
	}
	,removeEventListener: function(type,listener,useCapture) {
		if(useCapture == null) {
			useCapture = false;
		}
	}
	,requestSoftKeyboard: function() {
		return false;
	}
	,setChildIndex: function(child,index) {
	}
	,startDrag: function(lockCenter,bounds) {
		if(lockCenter == null) {
			lockCenter = false;
		}
	}
	,startTouchDrag: function(touchPointID,lockCenter,bounds) {
		if(lockCenter == null) {
			lockCenter = false;
		}
	}
	,stopAllMovieClips: function() {
	}
	,stopDrag: function() {
	}
	,stopTouchDrag: function(touchPointID) {
	}
	,swapChildren: function(child1,child2) {
	}
	,swapChildrenAt: function(index1,index2) {
	}
	,toString: function() {
		return null;
	}
	,willTrigger: function(type) {
		return false;
	}
	,__class__: lime_graphics_FlashRenderContext
};
var lime_graphics_Image = function(buffer,offsetX,offsetY,width,height,color,type) {
	if(height == null) {
		height = -1;
	}
	if(width == null) {
		width = -1;
	}
	if(offsetY == null) {
		offsetY = 0;
	}
	if(offsetX == null) {
		offsetX = 0;
	}
	this.offsetX = offsetX;
	this.offsetY = offsetY;
	this.width = width;
	this.height = height;
	if(type == null) {
		if(lime_app_Application.current != null && lime_app_Application.current.renderers[0] != null) {
			var tmp;
			switch(lime_app_Application.current.renderers[0].context[1]) {
			case 1:case 2:
				tmp = lime_graphics_ImageType.CANVAS;
				break;
			case 3:
				tmp = lime_graphics_ImageType.FLASH;
				break;
			default:
				tmp = lime_graphics_ImageType.DATA;
			}
			this.type = tmp;
		} else {
			this.type = lime_graphics_ImageType.DATA;
		}
	} else {
		this.type = type;
	}
	if(buffer == null) {
		if(width > 0 && height > 0) {
			switch(this.type[1]) {
			case 0:
				this.buffer = new lime_graphics_ImageBuffer(null,width,height);
				lime_graphics_utils_ImageCanvasUtil.createCanvas(this,width,height);
				if(color != null) {
					this.fillRect(new lime_math_Rectangle(0,0,width,height),color);
				}
				break;
			case 1:
				var elements = width * height * 4;
				var this1;
				if(elements != null) {
					this1 = new Uint8Array(elements);
				} else {
					this1 = null;
				}
				this.buffer = new lime_graphics_ImageBuffer(this1,width,height);
				if(color != null) {
					this.fillRect(new lime_math_Rectangle(0,0,width,height),color);
				}
				break;
			case 2:
				break;
			default:
			}
		}
	} else {
		this.__fromImageBuffer(buffer);
	}
};
$hxClasses["lime.graphics.Image"] = lime_graphics_Image;
lime_graphics_Image.__name__ = ["lime","graphics","Image"];
lime_graphics_Image.__base64Encoder = null;
lime_graphics_Image.fromBase64 = function(base64,type,onload) {
	if(base64 == null) {
		return null;
	}
	var image = new lime_graphics_Image();
	image.__fromBase64(base64,type,onload);
	return image;
};
lime_graphics_Image.fromBitmapData = function(bitmapData) {
	if(bitmapData == null) {
		return null;
	}
	return bitmapData.image;
};
lime_graphics_Image.fromBytes = function(bytes,onload) {
	if(bytes == null) {
		return null;
	}
	var image = new lime_graphics_Image();
	image.__fromBytes(bytes,onload);
	return image;
};
lime_graphics_Image.fromCanvas = function(canvas) {
	if(canvas == null) {
		return null;
	}
	var buffer = new lime_graphics_ImageBuffer(null,canvas.width,canvas.height);
	buffer.set_src(canvas);
	return new lime_graphics_Image(buffer);
};
lime_graphics_Image.fromFile = function(path,onload,onerror) {
	var image = new lime_graphics_Image();
	image.__fromFile(path,onload,onerror);
	return image;
};
lime_graphics_Image.fromImageElement = function(image) {
	if(image == null) {
		return null;
	}
	var buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
	buffer.set_src(image);
	return new lime_graphics_Image(buffer);
};
lime_graphics_Image.__base64Encode = function(bytes) {
	var extension;
	switch(bytes.length % 3) {
	case 1:
		extension = "==";
		break;
	case 2:
		extension = "=";
		break;
	default:
		extension = "";
	}
	if(lime_graphics_Image.__base64Encoder == null) {
		lime_graphics_Image.__base64Encoder = new haxe_crypto_BaseCode(haxe_io_Bytes.ofString(lime_graphics_Image.__base64Chars));
	}
	return lime_graphics_Image.__base64Encoder.encodeBytes(bytes).toString() + extension;
};
lime_graphics_Image.__isJPG = function(bytes) {
	if(bytes.b[0] == 255) {
		return bytes.b[1] == 216;
	} else {
		return false;
	}
};
lime_graphics_Image.__isPNG = function(bytes) {
	if(bytes.b[0] == 137 && bytes.b[1] == 80 && bytes.b[2] == 78 && bytes.b[3] == 71 && bytes.b[4] == 13 && bytes.b[5] == 10 && bytes.b[6] == 26) {
		return bytes.b[7] == 10;
	} else {
		return false;
	}
};
lime_graphics_Image.__isGIF = function(bytes) {
	if(bytes.b[0] == 71 && bytes.b[1] == 73 && bytes.b[2] == 70 && bytes.b[3] == 56) {
		var b = bytes.b[4];
		if(b == 55 || b == 57) {
			return bytes.b[5] == 97;
		} else {
			return false;
		}
	}
	return false;
};
lime_graphics_Image.prototype = {
	clone: function() {
		if(this.buffer != null) {
			if(this.type == lime_graphics_ImageType.CANVAS && this.buffer.__srcImage == null) {
				lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
				lime_graphics_utils_ImageCanvasUtil.sync(this,true);
			}
			var image = new lime_graphics_Image(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);
			image.dirty = this.dirty;
			return image;
		} else {
			return new lime_graphics_Image(null,this.offsetX,this.offsetY,this.width,this.height,null,this.type);
		}
	}
	,colorTransform: function(rect,colorMatrix) {
		rect = this.__clipRect(rect);
		if(this.buffer == null || rect == null) {
			return;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.colorTransform(this,rect,colorMatrix);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.colorTransform(this,rect,colorMatrix);
			break;
		case 2:
			rect.offset(this.offsetX,this.offsetY);
			this.buffer.__srcBitmapData.colorTransform(rect.__toFlashRectangle(),lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform(colorMatrix));
			break;
		default:
		}
	}
	,copyChannel: function(sourceImage,sourceRect,destPoint,sourceChannel,destChannel) {
		sourceRect = this.__clipRect(sourceRect);
		if(this.buffer == null || sourceRect == null) {
			return;
		}
		if(destChannel == lime_graphics_ImageChannel.ALPHA && !this.get_transparent()) {
			return;
		}
		if(sourceRect.width <= 0 || sourceRect.height <= 0) {
			return;
		}
		if(sourceRect.x + sourceRect.width > sourceImage.width) {
			sourceRect.width = sourceImage.width - sourceRect.x;
		}
		if(sourceRect.y + sourceRect.height > sourceImage.height) {
			sourceRect.height = sourceImage.height - sourceRect.y;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.copyChannel(this,sourceImage,sourceRect,destPoint,sourceChannel,destChannel);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.copyChannel(this,sourceImage,sourceRect,destPoint,sourceChannel,destChannel);
			break;
		case 2:
			var srcChannel;
			switch(sourceChannel[1]) {
			case 0:
				srcChannel = 1;
				break;
			case 1:
				srcChannel = 2;
				break;
			case 2:
				srcChannel = 4;
				break;
			case 3:
				srcChannel = 8;
				break;
			}
			var dstChannel;
			switch(destChannel[1]) {
			case 0:
				dstChannel = 1;
				break;
			case 1:
				dstChannel = 2;
				break;
			case 2:
				dstChannel = 4;
				break;
			case 3:
				dstChannel = 8;
				break;
			}
			sourceRect.offset(sourceImage.offsetX,sourceImage.offsetY);
			destPoint.offset(this.offsetX,this.offsetY);
			this.buffer.__srcBitmapData.copyChannel(sourceImage.buffer.get_src(),sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),srcChannel,dstChannel);
			break;
		default:
		}
	}
	,copyPixels: function(sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha) {
		if(mergeAlpha == null) {
			mergeAlpha = false;
		}
		if(this.buffer == null || sourceImage == null) {
			return;
		}
		if(sourceRect.width <= 0 || sourceRect.height <= 0) {
			return;
		}
		if(this.width <= 0 || this.height <= 0) {
			return;
		}
		if(sourceRect.x + sourceRect.width > sourceImage.width) {
			sourceRect.width = sourceImage.width - sourceRect.x;
		}
		if(sourceRect.y + sourceRect.height > sourceImage.height) {
			sourceRect.height = sourceImage.height - sourceRect.y;
		}
		if(sourceRect.x < 0) {
			sourceRect.width += sourceRect.x;
			sourceRect.x = 0;
		}
		if(sourceRect.y < 0) {
			sourceRect.height += sourceRect.y;
			sourceRect.y = 0;
		}
		if(destPoint.x + sourceRect.width > this.width) {
			sourceRect.width = this.width - destPoint.x;
		}
		if(destPoint.y + sourceRect.height > this.height) {
			sourceRect.height = this.height - destPoint.y;
		}
		if(destPoint.x < 0) {
			sourceRect.width += destPoint.x;
			sourceRect.x = -destPoint.x;
			destPoint.x = 0;
		}
		if(destPoint.y < 0) {
			sourceRect.height += destPoint.y;
			sourceRect.y = -destPoint.y;
			destPoint.y = 0;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
			lime_graphics_utils_ImageCanvasUtil.copyPixels(this,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
			lime_graphics_utils_ImageDataUtil.copyPixels(this,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha);
			break;
		case 2:
			sourceRect.offset(sourceImage.offsetX,sourceImage.offsetY);
			destPoint.offset(this.offsetX,this.offsetY);
			if(alphaImage != null && alphaPoint != null) {
				alphaPoint.offset(alphaImage.offsetX,alphaImage.offsetY);
			}
			this.buffer.__srcBitmapData.copyPixels(sourceImage.buffer.__srcBitmapData,sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),alphaImage != null ? alphaImage.buffer.get_src() : null,alphaPoint != null ? alphaPoint.__toFlashPoint() : null,mergeAlpha);
			break;
		default:
		}
	}
	,encode: function(format,quality) {
		if(quality == null) {
			quality = 90;
		}
		if(format == null) {
			format = "png";
		}
		switch(format) {
		case "bmp":
			return lime_graphics_format_BMP.encode(this);
		case "jpeg":case "jpg":
			return lime_graphics_format_JPEG.encode(this,quality);
		case "png":
			return lime_graphics_format_PNG.encode(this);
		default:
		}
		return null;
	}
	,fillRect: function(rect,color,format) {
		rect = this.__clipRect(rect);
		if(this.buffer == null || rect == null) {
			return;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.fillRect(this,rect,color,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			if(this.buffer.data.length == 0) {
				return;
			}
			lime_graphics_utils_ImageDataUtil.fillRect(this,rect,color,format);
			break;
		case 2:
			rect.offset(this.offsetX,this.offsetY);
			var argb;
			if(format == null) {
				var rgba = color;
				var argb1 = 0;
				argb1 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				argb = argb1;
			} else {
				switch(format) {
				case 1:
					argb = color;
					break;
				case 2:
					var bgra = color;
					var argb2 = 0;
					argb2 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					argb = argb2;
					break;
				default:
					var rgba1 = color;
					var argb3 = 0;
					argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					argb = argb3;
				}
			}
			this.buffer.__srcBitmapData.fillRect(rect.__toFlashRectangle(),argb);
			break;
		default:
		}
	}
	,floodFill: function(x,y,color,format) {
		if(this.buffer == null) {
			return;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.floodFill(this,x,y,color,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.floodFill(this,x,y,color,format);
			break;
		case 2:
			var argb;
			if(format == null) {
				var rgba = color;
				var argb1 = 0;
				argb1 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				argb = argb1;
			} else {
				switch(format) {
				case 1:
					argb = color;
					break;
				case 2:
					var bgra = color;
					var argb2 = 0;
					argb2 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					argb = argb2;
					break;
				default:
					var rgba1 = color;
					var argb3 = 0;
					argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					argb = argb3;
				}
			}
			this.buffer.__srcBitmapData.floodFill(x + this.offsetX,y + this.offsetY,argb);
			break;
		default:
		}
	}
	,getColorBoundsRect: function(mask,color,findColor,format) {
		if(findColor == null) {
			findColor = true;
		}
		if(this.buffer == null) {
			return null;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.getColorBoundsRect(this,mask,color,findColor,format);
		case 1:
			return lime_graphics_utils_ImageDataUtil.getColorBoundsRect(this,mask,color,findColor,format);
		case 2:
			var rect = this.buffer.__srcBitmapData.getColorBoundsRect(mask,color,findColor);
			return new lime_math_Rectangle(rect.x,rect.y,rect.width,rect.height);
		default:
			return null;
		}
	}
	,getPixel: function(x,y,format) {
		if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) {
			return 0;
		}
		switch(this.type[1]) {
		case 0:
			return lime_graphics_utils_ImageCanvasUtil.getPixel(this,x,y,format);
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.getPixel(this,x,y,format);
		case 2:
			var color = this.buffer.__srcBitmapData.getPixel(x + this.offsetX,y + this.offsetY);
			if(format == null) {
				var rgba = 0;
				rgba = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
				return rgba;
			} else {
				switch(format) {
				case 1:
					return color;
				case 2:
					var bgra = 0;
					bgra = (color & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color >> 16 & 255 & 255) << 8 | color >> 24 & 255 & 255;
					return bgra;
				default:
					var rgba1 = 0;
					rgba1 = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
					return rgba1;
				}
			}
			break;
		default:
			return 0;
		}
	}
	,getPixel32: function(x,y,format) {
		if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) {
			return 0;
		}
		switch(this.type[1]) {
		case 0:
			return lime_graphics_utils_ImageCanvasUtil.getPixel32(this,x,y,format);
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.getPixel32(this,x,y,format);
		case 2:
			var color = this.buffer.__srcBitmapData.getPixel32(x + this.offsetX,y + this.offsetY);
			if(format == null) {
				var rgba = 0;
				rgba = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
				return rgba;
			} else {
				switch(format) {
				case 1:
					return color;
				case 2:
					var bgra = 0;
					bgra = (color & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color >> 16 & 255 & 255) << 8 | color >> 24 & 255 & 255;
					return bgra;
				default:
					var rgba1 = 0;
					rgba1 = (color >> 16 & 255 & 255) << 24 | (color >> 8 & 255 & 255) << 16 | (color & 255 & 255) << 8 | color >> 24 & 255 & 255;
					return rgba1;
				}
			}
			break;
		default:
			return 0;
		}
	}
	,getPixels: function(rect,format) {
		if(this.buffer == null) {
			return null;
		}
		switch(this.type[1]) {
		case 0:
			return lime_graphics_utils_ImageCanvasUtil.getPixels(this,rect,format);
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.getPixels(this,rect,format);
		case 2:
			return null;
		default:
			return null;
		}
	}
	,merge: function(sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
		if(this.buffer == null || sourceImage == null) {
			return;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
			lime_graphics_utils_ImageCanvasUtil.merge(this,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageCanvasUtil.convertToData(sourceImage);
			lime_graphics_utils_ImageDataUtil.merge(this,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
			break;
		case 2:
			sourceRect.offset(this.offsetX,this.offsetY);
			this.buffer.__srcBitmapData.merge(sourceImage.buffer.__srcBitmapData,sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
			break;
		default:
			return;
		}
	}
	,resize: function(newWidth,newHeight) {
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.resize(this,newWidth,newHeight);
			break;
		case 1:
			lime_graphics_utils_ImageDataUtil.resize(this,newWidth,newHeight);
			break;
		case 2:
			break;
		default:
		}
		this.buffer.width = newWidth;
		this.buffer.height = newHeight;
		this.offsetX = 0;
		this.offsetY = 0;
		this.width = newWidth;
		this.height = newHeight;
	}
	,scroll: function(x,y) {
		if(this.buffer == null) {
			return;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.scroll(this,x,y);
			break;
		case 1:
			this.copyPixels(this,this.get_rect(),new lime_math_Vector2(x,y));
			break;
		case 2:
			this.buffer.__srcBitmapData.scroll(x + this.offsetX,y + this.offsetX);
			break;
		default:
		}
	}
	,setPixel: function(x,y,color,format) {
		if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) {
			return;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.setPixel(this,x,y,color,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.setPixel(this,x,y,color,format);
			break;
		case 2:
			var argb;
			if(format == null) {
				var rgba = color;
				var argb1 = 0;
				argb1 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				argb = argb1;
			} else {
				switch(format) {
				case 1:
					argb = color;
					break;
				case 2:
					var bgra = color;
					var argb2 = 0;
					argb2 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					argb = argb2;
					break;
				default:
					var rgba1 = color;
					var argb3 = 0;
					argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					argb = argb3;
				}
			}
			this.buffer.__srcBitmapData.setPixel(x + this.offsetX,y + this.offsetX,argb);
			break;
		default:
		}
	}
	,setPixel32: function(x,y,color,format) {
		if(this.buffer == null || x < 0 || y < 0 || x >= this.width || y >= this.height) {
			return;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.setPixel32(this,x,y,color,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.setPixel32(this,x,y,color,format);
			break;
		case 2:
			var argb;
			if(format == null) {
				var rgba = color;
				var argb1 = 0;
				argb1 = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				argb = argb1;
			} else {
				switch(format) {
				case 1:
					argb = color;
					break;
				case 2:
					var bgra = color;
					var argb2 = 0;
					argb2 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					argb = argb2;
					break;
				default:
					var rgba1 = color;
					var argb3 = 0;
					argb3 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					argb = argb3;
				}
			}
			this.buffer.__srcBitmapData.setPixel32(x + this.offsetX,y + this.offsetY,argb);
			break;
		default:
		}
	}
	,setPixels: function(rect,bytes,format) {
		rect = this.__clipRect(rect);
		if(this.buffer == null || rect == null) {
			return;
		}
		switch(this.type[1]) {
		case 0:
			lime_graphics_utils_ImageCanvasUtil.setPixels(this,rect,bytes,format);
			break;
		case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			lime_graphics_utils_ImageDataUtil.setPixels(this,rect,bytes,format);
			break;
		case 2:
			break;
		default:
		}
	}
	,threshold: function(sourceImage,sourceRect,destPoint,operation,threshold,color,mask,copySource,format) {
		if(copySource == null) {
			copySource = false;
		}
		if(mask == null) {
			mask = -1;
		}
		if(color == null) {
			color = 0;
		}
		if(this.buffer == null || sourceImage == null || sourceRect == null) {
			return 0;
		}
		switch(this.type[1]) {
		case 0:case 1:
			lime_graphics_utils_ImageCanvasUtil.convertToData(this);
			return lime_graphics_utils_ImageDataUtil.threshold(this,sourceImage,sourceRect,destPoint,operation,threshold,color,mask,copySource,format);
		case 2:
			var _color;
			if(format == null) {
				var rgba = color;
				var argb = 0;
				argb = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
				_color = argb;
			} else {
				switch(format) {
				case 1:
					_color = color;
					break;
				case 2:
					var bgra = color;
					var argb1 = 0;
					argb1 = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
					_color = argb1;
					break;
				default:
					var rgba1 = color;
					var argb2 = 0;
					argb2 = (rgba1 & 255 & 255) << 24 | (rgba1 >> 24 & 255 & 255) << 16 | (rgba1 >> 16 & 255 & 255) << 8 | rgba1 >> 8 & 255 & 255;
					_color = argb2;
				}
			}
			var _mask;
			if(format == null) {
				var rgba2 = mask;
				var argb3 = 0;
				argb3 = (rgba2 & 255 & 255) << 24 | (rgba2 >> 24 & 255 & 255) << 16 | (rgba2 >> 16 & 255 & 255) << 8 | rgba2 >> 8 & 255 & 255;
				_mask = argb3;
			} else {
				switch(format) {
				case 1:
					_mask = mask;
					break;
				case 2:
					var bgra1 = mask;
					var argb4 = 0;
					argb4 = (bgra1 & 255 & 255) << 24 | (bgra1 >> 8 & 255 & 255) << 16 | (bgra1 >> 16 & 255 & 255) << 8 | bgra1 >> 24 & 255 & 255;
					_mask = argb4;
					break;
				default:
					var rgba3 = mask;
					var argb5 = 0;
					argb5 = (rgba3 & 255 & 255) << 24 | (rgba3 >> 24 & 255 & 255) << 16 | (rgba3 >> 16 & 255 & 255) << 8 | rgba3 >> 8 & 255 & 255;
					_mask = argb5;
				}
			}
			sourceRect.offset(sourceImage.offsetX,sourceImage.offsetY);
			destPoint.offset(this.offsetX,this.offsetY);
			return this.buffer.__srcBitmapData.threshold(sourceImage.buffer.get_src(),sourceRect.__toFlashRectangle(),destPoint.__toFlashPoint(),operation,threshold,_color,_mask,copySource);
		default:
		}
		return 0;
	}
	,__clipRect: function(r) {
		if(r == null) {
			return null;
		}
		if(r.x < 0) {
			r.width -= -r.x;
			r.x = 0;
			if(r.x + r.width <= 0) {
				return null;
			}
		}
		if(r.y < 0) {
			r.height -= -r.y;
			r.y = 0;
			if(r.y + r.height <= 0) {
				return null;
			}
		}
		if(r.x + r.width >= this.width) {
			r.width -= r.x + r.width - this.width;
			if(r.width <= 0) {
				return null;
			}
		}
		if(r.y + r.height >= this.height) {
			r.height -= r.y + r.height - this.height;
			if(r.height <= 0) {
				return null;
			}
		}
		return r;
	}
	,__fromBase64: function(base64,type,onload) {
		var _gthis = this;
		var image = new Image();
		image.crossOrigin = "Anonymous";
		var image_onLoaded = function(event) {
			_gthis.buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
			_gthis.buffer.__srcImage = image;
			_gthis.offsetX = 0;
			_gthis.offsetY = 0;
			_gthis.width = _gthis.buffer.width;
			_gthis.height = _gthis.buffer.height;
			if(onload != null) {
				onload(_gthis);
			}
		};
		image.addEventListener("load",image_onLoaded,false);
		image.src = "data:" + type + ";base64," + base64;
	}
	,__fromBytes: function(bytes,onload) {
		var type = "";
		if(lime_graphics_Image.__isPNG(bytes)) {
			type = "image/png";
		} else if(lime_graphics_Image.__isJPG(bytes)) {
			type = "image/jpeg";
		} else if(lime_graphics_Image.__isGIF(bytes)) {
			type = "image/gif";
		} else {
			throw new js__$Boot_HaxeError("Image tried to read PNG/JPG Bytes, but found an invalid header.");
		}
		this.__fromBase64(lime_graphics_Image.__base64Encode(bytes),type,onload);
	}
	,__fromFile: function(path,onload,onerror) {
		var _gthis = this;
		var image = new Image();
		image.crossOrigin = "Anonymous";
		image.onload = function(_) {
			_gthis.buffer = new lime_graphics_ImageBuffer(null,image.width,image.height);
			_gthis.buffer.__srcImage = image;
			_gthis.width = image.width;
			_gthis.height = image.height;
			if(onload != null) {
				onload(_gthis);
			}
		};
		image.onerror = function(_1) {
			if(onerror != null) {
				onerror();
			}
		};
		image.src = path;
	}
	,__fromImageBuffer: function(buffer) {
		this.buffer = buffer;
		if(buffer != null) {
			if(this.width == -1) {
				this.width = buffer.width;
			}
			if(this.height == -1) {
				this.height = buffer.height;
			}
		}
	}
	,get_data: function() {
		if(this.buffer.data == null && this.buffer.width > 0 && this.buffer.height > 0) {
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
			lime_graphics_utils_ImageCanvasUtil.sync(this,false);
			lime_graphics_utils_ImageCanvasUtil.createImageData(this);
		}
		return this.buffer.data;
	}
	,set_data: function(value) {
		return this.buffer.data = value;
	}
	,get_format: function() {
		return this.buffer.format;
	}
	,set_format: function(value) {
		if(this.buffer.format != value) {
			if(this.type[1] == 1) {
				lime_graphics_utils_ImageDataUtil.setFormat(this,value);
			}
		}
		return this.buffer.format = value;
	}
	,get_powerOfTwo: function() {
		if(this.buffer.width != 0 && (this.buffer.width & ~this.buffer.width + 1) == this.buffer.width) {
			if(this.buffer.height != 0) {
				return (this.buffer.height & ~this.buffer.height + 1) == this.buffer.height;
			} else {
				return false;
			}
		} else {
			return false;
		}
	}
	,set_powerOfTwo: function(value) {
		if(value != this.get_powerOfTwo()) {
			var newWidth = 1;
			var newHeight = 1;
			while(newWidth < this.buffer.width) newWidth <<= 1;
			while(newHeight < this.buffer.height) newHeight <<= 1;
			switch(this.type[1]) {
			case 0:
				break;
			case 1:
				lime_graphics_utils_ImageDataUtil.resizeBuffer(this,newWidth,newHeight);
				break;
			case 2:
				break;
			default:
			}
		}
		return value;
	}
	,get_premultiplied: function() {
		return this.buffer.premultiplied;
	}
	,set_premultiplied: function(value) {
		if(value && !this.buffer.premultiplied) {
			if(this.type[1] == 1) {
				lime_graphics_utils_ImageCanvasUtil.convertToData(this);
				lime_graphics_utils_ImageDataUtil.multiplyAlpha(this);
			}
		} else if(!value && this.buffer.premultiplied) {
			if(this.type[1] == 1) {
				lime_graphics_utils_ImageCanvasUtil.convertToData(this);
				lime_graphics_utils_ImageDataUtil.unmultiplyAlpha(this);
			}
		}
		return value;
	}
	,get_rect: function() {
		return new lime_math_Rectangle(0,0,this.width,this.height);
	}
	,get_src: function() {
		if(this.buffer.__srcCanvas == null) {
			lime_graphics_utils_ImageCanvasUtil.convertToCanvas(this);
		}
		return this.buffer.get_src();
	}
	,set_src: function(value) {
		return this.buffer.set_src(value);
	}
	,get_transparent: function() {
		if(this.buffer == null) {
			return false;
		}
		return this.buffer.transparent;
	}
	,set_transparent: function(value) {
		if(this.buffer == null) {
			return false;
		}
		return this.buffer.transparent = value;
	}
	,__class__: lime_graphics_Image
	,__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 lime_graphics_ImageBuffer = function(data,width,height,bitsPerPixel,format) {
	if(bitsPerPixel == null) {
		bitsPerPixel = 32;
	}
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	this.data = data;
	this.width = width;
	this.height = height;
	this.bitsPerPixel = bitsPerPixel;
	this.format = format == null ? 0 : format;
	this.transparent = true;
};
$hxClasses["lime.graphics.ImageBuffer"] = lime_graphics_ImageBuffer;
lime_graphics_ImageBuffer.__name__ = ["lime","graphics","ImageBuffer"];
lime_graphics_ImageBuffer.prototype = {
	clone: function() {
		var buffer = new lime_graphics_ImageBuffer(this.data,this.width,this.height,this.bitsPerPixel);
		if(this.data != null) {
			var elements = this.data.byteLength;
			var this1;
			if(elements != null) {
				this1 = new Uint8Array(elements);
			} else {
				this1 = null;
			}
			buffer.data = this1;
			var view = this.data;
			var this2;
			if(view != null) {
				this2 = new Uint8Array(view);
			} else {
				this2 = null;
			}
			buffer.data.set(this2);
		} else if(this.__srcImageData != null) {
			buffer.__srcCanvas = window.document.createElement("canvas");
			buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
			buffer.__srcCanvas.width = this.__srcImageData.width;
			buffer.__srcCanvas.height = this.__srcImageData.height;
			buffer.__srcImageData = buffer.__srcContext.createImageData(this.__srcImageData.width,this.__srcImageData.height);
			var copy = new Uint8ClampedArray(this.__srcImageData.data);
			buffer.__srcImageData.data.set(copy);
		} else if(this.__srcCanvas != null) {
			buffer.__srcCanvas = window.document.createElement("canvas");
			buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
			buffer.__srcCanvas.width = this.__srcCanvas.width;
			buffer.__srcCanvas.height = this.__srcCanvas.height;
			buffer.__srcContext.drawImage(this.__srcCanvas,0,0);
		} else {
			buffer.__srcImage = this.__srcImage;
		}
		buffer.bitsPerPixel = this.bitsPerPixel;
		buffer.format = this.format;
		buffer.premultiplied = this.premultiplied;
		buffer.transparent = this.transparent;
		return buffer;
	}
	,get_src: function() {
		if(this.__srcImage != null) {
			return this.__srcImage;
		}
		return this.__srcCanvas;
	}
	,set_src: function(value) {
		if(js_Boot.__instanceof(value,Image)) {
			this.__srcImage = value;
		} else if(js_Boot.__instanceof(value,HTMLCanvasElement)) {
			this.__srcCanvas = value;
			this.__srcContext = this.__srcCanvas.getContext("2d");
		}
		return value;
	}
	,get_stride: function() {
		return this.width * 4;
	}
	,__class__: lime_graphics_ImageBuffer
	,__properties__: {get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}
};
var lime_graphics_ImageChannel = $hxClasses["lime.graphics.ImageChannel"] = { __ename__ : ["lime","graphics","ImageChannel"], __constructs__ : ["RED","GREEN","BLUE","ALPHA"] };
lime_graphics_ImageChannel.RED = ["RED",0];
lime_graphics_ImageChannel.RED.toString = $estr;
lime_graphics_ImageChannel.RED.__enum__ = lime_graphics_ImageChannel;
lime_graphics_ImageChannel.GREEN = ["GREEN",1];
lime_graphics_ImageChannel.GREEN.toString = $estr;
lime_graphics_ImageChannel.GREEN.__enum__ = lime_graphics_ImageChannel;
lime_graphics_ImageChannel.BLUE = ["BLUE",2];
lime_graphics_ImageChannel.BLUE.toString = $estr;
lime_graphics_ImageChannel.BLUE.__enum__ = lime_graphics_ImageChannel;
lime_graphics_ImageChannel.ALPHA = ["ALPHA",3];
lime_graphics_ImageChannel.ALPHA.toString = $estr;
lime_graphics_ImageChannel.ALPHA.__enum__ = lime_graphics_ImageChannel;
var lime_graphics_ImageType = $hxClasses["lime.graphics.ImageType"] = { __ename__ : ["lime","graphics","ImageType"], __constructs__ : ["CANVAS","DATA","FLASH","CUSTOM"] };
lime_graphics_ImageType.CANVAS = ["CANVAS",0];
lime_graphics_ImageType.CANVAS.toString = $estr;
lime_graphics_ImageType.CANVAS.__enum__ = lime_graphics_ImageType;
lime_graphics_ImageType.DATA = ["DATA",1];
lime_graphics_ImageType.DATA.toString = $estr;
lime_graphics_ImageType.DATA.__enum__ = lime_graphics_ImageType;
lime_graphics_ImageType.FLASH = ["FLASH",2];
lime_graphics_ImageType.FLASH.toString = $estr;
lime_graphics_ImageType.FLASH.__enum__ = lime_graphics_ImageType;
lime_graphics_ImageType.CUSTOM = ["CUSTOM",3];
lime_graphics_ImageType.CUSTOM.toString = $estr;
lime_graphics_ImageType.CUSTOM.__enum__ = lime_graphics_ImageType;
var lime_graphics_RenderContext = $hxClasses["lime.graphics.RenderContext"] = { __ename__ : ["lime","graphics","RenderContext"], __constructs__ : ["OPENGL","CANVAS","DOM","FLASH","CAIRO","CONSOLE","CUSTOM","NONE"] };
lime_graphics_RenderContext.OPENGL = function(gl) { var $x = ["OPENGL",0,gl]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CANVAS = function(context) { var $x = ["CANVAS",1,context]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.DOM = function(element) { var $x = ["DOM",2,element]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.FLASH = function(stage) { var $x = ["FLASH",3,stage]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CAIRO = function(cairo) { var $x = ["CAIRO",4,cairo]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CONSOLE = function(context) { var $x = ["CONSOLE",5,context]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.CUSTOM = function(data) { var $x = ["CUSTOM",6,data]; $x.__enum__ = lime_graphics_RenderContext; $x.toString = $estr; return $x; };
lime_graphics_RenderContext.NONE = ["NONE",7];
lime_graphics_RenderContext.NONE.toString = $estr;
lime_graphics_RenderContext.NONE.__enum__ = lime_graphics_RenderContext;
var lime_graphics_Renderer = function(window) {
	this.onRender = new lime_app_Event_$Void_$Void();
	this.onContextRestored = new lime_app_Event_$lime_$graphics_$RenderContext_$Void();
	this.onContextLost = new lime_app_Event_$Void_$Void();
	this.window = window;
	this.backend = new lime__$backend_html5_HTML5Renderer(this);
	this.window.renderer = this;
};
$hxClasses["lime.graphics.Renderer"] = lime_graphics_Renderer;
lime_graphics_Renderer.__name__ = ["lime","graphics","Renderer"];
lime_graphics_Renderer.prototype = {
	create: function() {
		this.backend.create();
	}
	,flip: function() {
	}
	,readPixels: function(rect) {
		return this.backend.readPixels(rect);
	}
	,render: function() {
	}
	,__class__: lime_graphics_Renderer
};
var lime_graphics_RendererType = $hxClasses["lime.graphics.RendererType"] = { __ename__ : ["lime","graphics","RendererType"], __constructs__ : ["OPENGL","CANVAS","DOM","FLASH","CAIRO","CONSOLE","CUSTOM"] };
lime_graphics_RendererType.OPENGL = ["OPENGL",0];
lime_graphics_RendererType.OPENGL.toString = $estr;
lime_graphics_RendererType.OPENGL.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CANVAS = ["CANVAS",1];
lime_graphics_RendererType.CANVAS.toString = $estr;
lime_graphics_RendererType.CANVAS.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.DOM = ["DOM",2];
lime_graphics_RendererType.DOM.toString = $estr;
lime_graphics_RendererType.DOM.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.FLASH = ["FLASH",3];
lime_graphics_RendererType.FLASH.toString = $estr;
lime_graphics_RendererType.FLASH.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CAIRO = ["CAIRO",4];
lime_graphics_RendererType.CAIRO.toString = $estr;
lime_graphics_RendererType.CAIRO.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CONSOLE = ["CONSOLE",5];
lime_graphics_RendererType.CONSOLE.toString = $estr;
lime_graphics_RendererType.CONSOLE.__enum__ = lime_graphics_RendererType;
lime_graphics_RendererType.CUSTOM = ["CUSTOM",6];
lime_graphics_RendererType.CUSTOM.toString = $estr;
lime_graphics_RendererType.CUSTOM.__enum__ = lime_graphics_RendererType;
var lime_graphics_cairo_Cairo = function(surface) {
};
$hxClasses["lime.graphics.cairo.Cairo"] = lime_graphics_cairo_Cairo;
lime_graphics_cairo_Cairo.__name__ = ["lime","graphics","cairo","Cairo"];
lime_graphics_cairo_Cairo.__properties__ = {get_versionString:"get_versionString",get_version:"get_version"}
lime_graphics_cairo_Cairo.version = null;
lime_graphics_cairo_Cairo.versionString = null;
lime_graphics_cairo_Cairo.get_version = function() {
	return 0;
};
lime_graphics_cairo_Cairo.get_versionString = function() {
	return "";
};
lime_graphics_cairo_Cairo.prototype = {
	arc: function(xc,yc,radius,angle1,angle2) {
	}
	,arcNegative: function(xc,yc,radius,angle1,angle2) {
	}
	,clip: function() {
	}
	,clipExtents: function(x1,y1,x2,y2) {
	}
	,clipPreserve: function() {
	}
	,closePath: function() {
	}
	,copyPage: function() {
	}
	,curveTo: function(x1,y1,x2,y2,x3,y3) {
	}
	,fill: function() {
	}
	,fillExtents: function(x1,y1,x2,y2) {
	}
	,fillPreserve: function() {
	}
	,identityMatrix: function() {
	}
	,inClip: function(x,y) {
		return false;
	}
	,inFill: function(x,y) {
		return false;
	}
	,inStroke: function(x,y) {
		return false;
	}
	,lineTo: function(x,y) {
	}
	,moveTo: function(x,y) {
	}
	,mask: function(pattern) {
	}
	,maskSurface: function(surface,x,y) {
	}
	,newPath: function() {
	}
	,paint: function() {
	}
	,paintWithAlpha: function(alpha) {
	}
	,popGroup: function() {
		return null;
	}
	,popGroupToSource: function() {
	}
	,pushGroup: function() {
	}
	,pushGroupWithContent: function(content) {
	}
	,recreate: function(surface) {
	}
	,rectangle: function(x,y,width,height) {
	}
	,relCurveTo: function(dx1,dy1,dx2,dy2,dx3,dy3) {
	}
	,relLineTo: function(dx,dy) {
	}
	,relMoveTo: function(dx,dy) {
	}
	,resetClip: function() {
	}
	,restore: function() {
	}
	,save: function() {
	}
	,setFontSize: function(size) {
	}
	,setSourceRGB: function(r,g,b) {
	}
	,setSourceRGBA: function(r,g,b,a) {
	}
	,setSourceSurface: function(surface,x,y) {
	}
	,showPage: function() {
	}
	,showText: function(utf8) {
	}
	,status: function() {
		return 0;
	}
	,stroke: function() {
	}
	,strokeExtents: function(x1,y1,x2,y2) {
	}
	,strokePreserve: function() {
	}
	,transform: function(matrix) {
	}
	,rotate: function(amount) {
	}
	,scale: function(x,y) {
	}
	,translate: function(x,y) {
	}
	,get_antialias: function() {
		return 0;
	}
	,set_antialias: function(value) {
		return value;
	}
	,get_currentPoint: function() {
		return null;
	}
	,get_dash: function() {
		return [];
	}
	,set_dash: function(value) {
		return value;
	}
	,get_dashCount: function() {
		return 0;
	}
	,get_fillRule: function() {
		return 0;
	}
	,set_fillRule: function(value) {
		return value;
	}
	,get_fontFace: function() {
		return 0;
	}
	,set_fontFace: function(value) {
		return value;
	}
	,get_fontOptions: function() {
		return null;
	}
	,set_fontOptions: function(value) {
		return value;
	}
	,get_groupTarget: function() {
		return 0;
	}
	,get_hasCurrentPoint: function() {
		return false;
	}
	,get_lineCap: function() {
		return 0;
	}
	,set_lineCap: function(value) {
		return value;
	}
	,get_lineJoin: function() {
		return 0;
	}
	,set_lineJoin: function(value) {
		return value;
	}
	,get_lineWidth: function() {
		return 0;
	}
	,set_lineWidth: function(value) {
		return value;
	}
	,get_matrix: function() {
		return null;
	}
	,set_matrix: function(value) {
		return value;
	}
	,get_miterLimit: function() {
		return 0;
	}
	,set_miterLimit: function(value) {
		return value;
	}
	,get_operator: function() {
		return 0;
	}
	,set_operator: function(value) {
		return value;
	}
	,get_source: function() {
		return 0;
	}
	,set_source: function(value) {
		return value;
	}
	,get_target: function() {
		return 0;
	}
	,get_tolerance: function() {
		return 0;
	}
	,set_tolerance: function(value) {
		return value;
	}
	,__class__: lime_graphics_cairo_Cairo
	,__properties__: {set_tolerance:"set_tolerance",get_tolerance:"get_tolerance",get_target:"get_target",set_source:"set_source",get_source:"get_source",set_operator:"set_operator",get_operator:"get_operator",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 lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoFTFontFace.CairoFTFontFace_Impl_"] = lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$;
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoFTFontFace","CairoFTFontFace_Impl_"];
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$._new = function() {
	return 0;
};
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$.create = function(face,loadFlags) {
	return 0;
};
var lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoFontFace.CairoFontFace_Impl_"] = lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$;
lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoFontFace","CairoFontFace_Impl_"];
lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$._new = function() {
	return null;
};
lime_graphics_cairo__$CairoFontFace_CairoFontFace_$Impl_$.status = function(this1) {
	return 0;
};
var lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoFontOptions.CairoFontOptions_Impl_"] = lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$;
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoFontOptions","CairoFontOptions_Impl_"];
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.__properties__ = {set_subpixelOrder:"set_subpixelOrder",get_subpixelOrder:"get_subpixelOrder",set_hintStyle:"set_hintStyle",get_hintStyle:"get_hintStyle",set_hintMetrics:"set_hintMetrics",get_hintMetrics:"get_hintMetrics",set_antialias:"set_antialias",get_antialias:"get_antialias"}
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$._new = function() {
	return null;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_antialias = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_antialias = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_hintMetrics = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_hintMetrics = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_hintStyle = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_hintStyle = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.get_subpixelOrder = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoFontOptions_CairoFontOptions_$Impl_$.set_subpixelOrder = function(this1,value) {
	return value;
};
var lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoImageSurface.CairoImageSurface_Impl_"] = lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$;
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoImageSurface","CairoImageSurface_Impl_"];
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.__properties__ = {get_width:"get_width",get_stride:"get_stride",get_height:"get_height",get_format:"get_format",get_data:"get_data"}
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$._new = function(format,width,height) {
	return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.create = function(data,format,width,height,stride) {
	return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.fromImage = function(image) {
	return null;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_data = function(this1) {
	return null;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_format = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_height = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_stride = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoImageSurface_CairoImageSurface_$Impl_$.get_width = function(this1) {
	return 0;
};
var lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoPattern.CairoPattern_Impl_"] = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$;
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoPattern","CairoPattern_Impl_"];
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.__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"}
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$._new = function(handle) {
	return handle;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.addColorStopRGB = function(this1,offset,r,g,b) {
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.addColorStopRGBA = function(this1,offset,r,g,b,a) {
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface = function(surface) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createLinear = function(x0,y0,x1,y1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRadial = function(cx0,cy0,radius0,cx1,cy1,radius1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGB = function(r,g,b) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGBA = function(r,g,b,a) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_colorStopCount = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_extend = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_extend = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_filter = function(this1) {
	return 0;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_filter = function(this1,value) {
	return value;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_matrix = function(this1) {
	return null;
};
lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.set_matrix = function(this1,value) {
	return value;
};
var lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$ = {};
$hxClasses["lime.graphics.cairo._CairoSurface.CairoSurface_Impl_"] = lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$;
lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.__name__ = ["lime","graphics","cairo","_CairoSurface","CairoSurface_Impl_"];
lime_graphics_cairo__$CairoSurface_CairoSurface_$Impl_$.flush = function(this1) {
};
var lime_graphics_console_IndexBuffer = function() {
};
$hxClasses["lime.graphics.console.IndexBuffer"] = lime_graphics_console_IndexBuffer;
lime_graphics_console_IndexBuffer.__name__ = ["lime","graphics","console","IndexBuffer"];
lime_graphics_console_IndexBuffer.prototype = {
	__class__: lime_graphics_console_IndexBuffer
};
var lime_graphics_console_Primitive = $hxClasses["lime.graphics.console.Primitive"] = { __ename__ : ["lime","graphics","console","Primitive"], __constructs__ : ["Point","Line","LineStrip","Triangle","TriangleStrip"] };
lime_graphics_console_Primitive.Point = ["Point",0];
lime_graphics_console_Primitive.Point.toString = $estr;
lime_graphics_console_Primitive.Point.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.Line = ["Line",1];
lime_graphics_console_Primitive.Line.toString = $estr;
lime_graphics_console_Primitive.Line.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.LineStrip = ["LineStrip",2];
lime_graphics_console_Primitive.LineStrip.toString = $estr;
lime_graphics_console_Primitive.LineStrip.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.Triangle = ["Triangle",3];
lime_graphics_console_Primitive.Triangle.toString = $estr;
lime_graphics_console_Primitive.Triangle.__enum__ = lime_graphics_console_Primitive;
lime_graphics_console_Primitive.TriangleStrip = ["TriangleStrip",4];
lime_graphics_console_Primitive.TriangleStrip.toString = $estr;
lime_graphics_console_Primitive.TriangleStrip.__enum__ = lime_graphics_console_Primitive;
var lime_graphics_console_Shader = function() {
};
$hxClasses["lime.graphics.console.Shader"] = lime_graphics_console_Shader;
lime_graphics_console_Shader.__name__ = ["lime","graphics","console","Shader"];
lime_graphics_console_Shader.prototype = {
	__class__: lime_graphics_console_Shader
};
var lime_graphics_console_VertexBuffer = function() {
};
$hxClasses["lime.graphics.console.VertexBuffer"] = lime_graphics_console_VertexBuffer;
lime_graphics_console_VertexBuffer.__name__ = ["lime","graphics","console","VertexBuffer"];
lime_graphics_console_VertexBuffer.prototype = {
	lock: function() {
		return new lime_graphics_console_VertexOutput();
	}
	,unlock: function() {
	}
	,__class__: lime_graphics_console_VertexBuffer
};
var lime_graphics_console_VertexOutput = function() {
};
$hxClasses["lime.graphics.console.VertexOutput"] = lime_graphics_console_VertexOutput;
lime_graphics_console_VertexOutput.__name__ = ["lime","graphics","console","VertexOutput"];
lime_graphics_console_VertexOutput.prototype = {
	vec2: function(x,y) {
	}
	,vec3: function(x,y,z) {
	}
	,color: function(r,g,b,a) {
	}
	,__class__: lime_graphics_console_VertexOutput
};
var lime_graphics_format_BMP = function() { };
$hxClasses["lime.graphics.format.BMP"] = lime_graphics_format_BMP;
lime_graphics_format_BMP.__name__ = ["lime","graphics","format","BMP"];
lime_graphics_format_BMP.encode = function(image,type) {
	if(image.get_premultiplied() || image.get_format() != 0) {
		image = image.clone();
		image.set_premultiplied(false);
		image.set_format(0);
	}
	if(type == null) {
		type = lime_graphics_format_BMPType.RGB;
	}
	var fileHeaderLength = 14;
	var infoHeaderLength = 40;
	var pixelValuesLength = image.width * image.height * 4;
	if(type != null) {
		switch(type[1]) {
		case 0:
			pixelValuesLength = image.width * 3 + image.width * 3 % 4 + image.height * 3 + image.height * 3;
			break;
		case 1:
			infoHeaderLength = 108;
			break;
		case 2:
			fileHeaderLength = 0;
			pixelValuesLength += image.width * image.height;
			break;
		}
	}
	var data = new haxe_io_Bytes(new ArrayBuffer(fileHeaderLength + infoHeaderLength + pixelValuesLength));
	var position = 0;
	if(fileHeaderLength > 0) {
		position = 1;
		data.b[0] = 66;
		position = 2;
		data.b[1] = 77;
		data.setInt32(2,data.length);
		position = 6;
		data.setUInt16(6,0);
		position = 8;
		data.setUInt16(8,0);
		position = 10;
		data.setInt32(10,fileHeaderLength + infoHeaderLength);
		position = 14;
	}
	data.setInt32(position,infoHeaderLength);
	position += 4;
	data.setInt32(position,image.width);
	position += 4;
	data.setInt32(position,type == lime_graphics_format_BMPType.ICO ? image.height * 2 : image.height);
	position += 4;
	data.setUInt16(position,1);
	position += 2;
	data.setUInt16(position,type == lime_graphics_format_BMPType.RGB ? 24 : 32);
	position += 2;
	data.setInt32(position,type == lime_graphics_format_BMPType.BITFIELD ? 3 : 0);
	position += 4;
	data.setInt32(position,pixelValuesLength);
	position += 4;
	data.setInt32(position,11824);
	position += 4;
	data.setInt32(position,11824);
	position += 4;
	data.setInt32(position,0);
	position += 4;
	data.setInt32(position,0);
	position += 4;
	if(type == lime_graphics_format_BMPType.BITFIELD) {
		data.setInt32(position,16711680);
		position += 4;
		data.setInt32(position,65280);
		position += 4;
		data.setInt32(position,255);
		position += 4;
		data.setInt32(position,-16777216);
		position += 4;
		data.b[position++] = 32;
		data.b[position++] = 110;
		data.b[position++] = 105;
		data.b[position++] = 87;
		var _g = 0;
		while(_g < 48) {
			++_g;
			data.b[position++] = 0;
		}
	}
	var pixels = image.getPixels(new lime_math_Rectangle(0,0,image.width,image.height),1);
	var readPosition = 0;
	var a;
	var r;
	var g;
	var b;
	if(type != null) {
		switch(type[1]) {
		case 0:
			var _g1 = 0;
			var _g2 = image.height;
			while(_g1 < _g2) {
				readPosition = (image.height - 1 - _g1++) * 4 * image.width;
				var _g3 = 0;
				var _g21 = image.width;
				while(_g3 < _g21) {
					++_g3;
					++readPosition;
					r = pixels.b[readPosition++];
					g = pixels.b[readPosition++];
					b = pixels.b[readPosition++];
					data.b[position++] = b & 255;
					data.b[position++] = g & 255;
					data.b[position++] = r & 255;
				}
				var _g31 = 0;
				var _g22 = image.width * 3 % 4;
				while(_g31 < _g22) {
					++_g31;
					data.b[position++] = 0;
				}
			}
			break;
		case 1:
			var _g11 = 0;
			var _g4 = image.height;
			while(_g11 < _g4) {
				readPosition = (image.height - 1 - _g11++) * 4 * image.width;
				var _g32 = 0;
				var _g23 = image.width;
				while(_g32 < _g23) {
					++_g32;
					a = pixels.b[readPosition++];
					r = pixels.b[readPosition++];
					g = pixels.b[readPosition++];
					b = pixels.b[readPosition++];
					data.b[position++] = b & 255;
					data.b[position++] = g & 255;
					data.b[position++] = r & 255;
					data.b[position++] = a & 255;
				}
			}
			break;
		case 2:
			var andMask = new haxe_io_Bytes(new ArrayBuffer(image.width * image.height));
			var maskPosition = 0;
			var _g12 = 0;
			var _g5 = image.height;
			while(_g12 < _g5) {
				readPosition = (image.height - 1 - _g12++) * 4 * image.width;
				var _g33 = 0;
				var _g24 = image.width;
				while(_g33 < _g24) {
					++_g33;
					a = pixels.b[readPosition++];
					r = pixels.b[readPosition++];
					g = pixels.b[readPosition++];
					b = pixels.b[readPosition++];
					data.b[position++] = b & 255;
					data.b[position++] = g & 255;
					data.b[position++] = r & 255;
					data.b[position++] = a & 255;
					andMask.b[maskPosition++] = 0;
				}
			}
			data.blit(position,andMask,0,image.width * image.height);
			break;
		}
	}
	return data;
};
var lime_graphics_format_BMPType = $hxClasses["lime.graphics.format.BMPType"] = { __ename__ : ["lime","graphics","format","BMPType"], __constructs__ : ["RGB","BITFIELD","ICO"] };
lime_graphics_format_BMPType.RGB = ["RGB",0];
lime_graphics_format_BMPType.RGB.toString = $estr;
lime_graphics_format_BMPType.RGB.__enum__ = lime_graphics_format_BMPType;
lime_graphics_format_BMPType.BITFIELD = ["BITFIELD",1];
lime_graphics_format_BMPType.BITFIELD.toString = $estr;
lime_graphics_format_BMPType.BITFIELD.__enum__ = lime_graphics_format_BMPType;
lime_graphics_format_BMPType.ICO = ["ICO",2];
lime_graphics_format_BMPType.ICO.toString = $estr;
lime_graphics_format_BMPType.ICO.__enum__ = lime_graphics_format_BMPType;
var lime_graphics_format_JPEG = function() { };
$hxClasses["lime.graphics.format.JPEG"] = lime_graphics_format_JPEG;
lime_graphics_format_JPEG.__name__ = ["lime","graphics","format","JPEG"];
lime_graphics_format_JPEG.decodeBytes = function(bytes,decodeData) {
	if(decodeData == null) {
		decodeData = true;
	}
	return null;
};
lime_graphics_format_JPEG.decodeFile = function(path,decodeData) {
	if(decodeData == null) {
		decodeData = true;
	}
	return null;
};
lime_graphics_format_JPEG.encode = function(image,quality) {
	if(image.get_premultiplied() || image.get_format() != 0) {
		image = image.clone();
		image.set_premultiplied(false);
		image.set_format(0);
	}
	lime_graphics_utils_ImageCanvasUtil.sync(image,false);
	if(image.buffer.__srcCanvas != null) {
		var buffer = window.atob(image.buffer.__srcCanvas.toDataURL("image/jpeg",quality / 100).split(";base64,")[1]);
		var bytes = new haxe_io_Bytes(new ArrayBuffer(buffer.length));
		var _g1 = 0;
		var _g = buffer.length;
		while(_g1 < _g) {
			var i = _g1++;
			var v = HxOverrides.cca(buffer,i);
			bytes.b[i] = v & 255;
		}
		return bytes;
	}
	return null;
};
var lime_graphics_format_PNG = function() { };
$hxClasses["lime.graphics.format.PNG"] = lime_graphics_format_PNG;
lime_graphics_format_PNG.__name__ = ["lime","graphics","format","PNG"];
lime_graphics_format_PNG.decodeBytes = function(bytes,decodeData) {
	if(decodeData == null) {
		decodeData = true;
	}
	return null;
};
lime_graphics_format_PNG.decodeFile = function(path,decodeData) {
	if(decodeData == null) {
		decodeData = true;
	}
	return null;
};
lime_graphics_format_PNG.encode = function(image) {
	if(image.get_premultiplied() || image.get_format() != 0) {
		image = image.clone();
		image.set_premultiplied(false);
		image.set_format(0);
	}
	return null;
};
var lime_graphics_opengl_GL = function() { };
$hxClasses["lime.graphics.opengl.GL"] = lime_graphics_opengl_GL;
lime_graphics_opengl_GL.__name__ = ["lime","graphics","opengl","GL"];
lime_graphics_opengl_GL.__properties__ = {get_version:"get_version"}
lime_graphics_opengl_GL.version = null;
lime_graphics_opengl_GL.context = null;
lime_graphics_opengl_GL.activeTexture = function(texture) {
	lime_graphics_opengl_GL.context.activeTexture(texture);
};
lime_graphics_opengl_GL.attachShader = function(program,shader) {
	lime_graphics_opengl_GL.context.attachShader(program,shader);
};
lime_graphics_opengl_GL.bindAttribLocation = function(program,index,name) {
	lime_graphics_opengl_GL.context.bindAttribLocation(program,index,name);
};
lime_graphics_opengl_GL.bindBuffer = function(target,buffer) {
	lime_graphics_opengl_GL.context.bindBuffer(target,buffer);
};
lime_graphics_opengl_GL.bindFramebuffer = function(target,framebuffer) {
	lime_graphics_opengl_GL.context.bindFramebuffer(target,framebuffer);
};
lime_graphics_opengl_GL.bindRenderbuffer = function(target,renderbuffer) {
	lime_graphics_opengl_GL.context.bindRenderbuffer(target,renderbuffer);
};
lime_graphics_opengl_GL.bindTexture = function(target,texture) {
	lime_graphics_opengl_GL.context.bindTexture(target,texture);
};
lime_graphics_opengl_GL.blendColor = function(red,green,blue,alpha) {
	lime_graphics_opengl_GL.context.blendColor(red,green,blue,alpha);
};
lime_graphics_opengl_GL.blendEquation = function(mode) {
	lime_graphics_opengl_GL.context.blendEquation(mode);
};
lime_graphics_opengl_GL.blendEquationSeparate = function(modeRGB,modeAlpha) {
	lime_graphics_opengl_GL.context.blendEquationSeparate(modeRGB,modeAlpha);
};
lime_graphics_opengl_GL.blendFunc = function(sfactor,dfactor) {
	lime_graphics_opengl_GL.context.blendFunc(sfactor,dfactor);
};
lime_graphics_opengl_GL.blendFuncSeparate = function(srcRGB,dstRGB,srcAlpha,dstAlpha) {
	lime_graphics_opengl_GL.context.blendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
};
lime_graphics_opengl_GL.bufferData = function(target,data,usage) {
	lime_graphics_opengl_GL.context.bufferData(target,data,usage);
};
lime_graphics_opengl_GL.bufferSubData = function(target,offset,data) {
	lime_graphics_opengl_GL.context.bufferSubData(target,offset,data);
};
lime_graphics_opengl_GL.checkFramebufferStatus = function(target) {
	return lime_graphics_opengl_GL.context.checkFramebufferStatus(target);
};
lime_graphics_opengl_GL.clear = function(mask) {
	lime_graphics_opengl_GL.context.clear(mask);
};
lime_graphics_opengl_GL.clearColor = function(red,green,blue,alpha) {
	lime_graphics_opengl_GL.context.clearColor(red,green,blue,alpha);
};
lime_graphics_opengl_GL.clearDepth = function(depth) {
	lime_graphics_opengl_GL.context.clearDepth(depth);
};
lime_graphics_opengl_GL.clearStencil = function(s) {
	lime_graphics_opengl_GL.context.clearStencil(s);
};
lime_graphics_opengl_GL.colorMask = function(red,green,blue,alpha) {
	lime_graphics_opengl_GL.context.colorMask(red,green,blue,alpha);
};
lime_graphics_opengl_GL.compileShader = function(shader) {
	lime_graphics_opengl_GL.context.compileShader(shader);
};
lime_graphics_opengl_GL.compressedTexImage2D = function(target,level,internalformat,width,height,border,data) {
	lime_graphics_opengl_GL.context.compressedTexImage2D(target,level,internalformat,width,height,border,data);
};
lime_graphics_opengl_GL.compressedTexSubImage2D = function(target,level,xoffset,yoffset,width,height,format,data) {
	lime_graphics_opengl_GL.context.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,data);
};
lime_graphics_opengl_GL.copyTexImage2D = function(target,level,internalformat,x,y,width,height,border) {
	lime_graphics_opengl_GL.context.copyTexImage2D(target,level,internalformat,x,y,width,height,border);
};
lime_graphics_opengl_GL.copyTexSubImage2D = function(target,level,xoffset,yoffset,x,y,width,height) {
	lime_graphics_opengl_GL.context.copyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
};
lime_graphics_opengl_GL.createBuffer = function() {
	return lime_graphics_opengl_GL.context.createBuffer();
};
lime_graphics_opengl_GL.createFramebuffer = function() {
	return lime_graphics_opengl_GL.context.createFramebuffer();
};
lime_graphics_opengl_GL.createProgram = function() {
	return lime_graphics_opengl_GL.context.createProgram();
};
lime_graphics_opengl_GL.createRenderbuffer = function() {
	return lime_graphics_opengl_GL.context.createRenderbuffer();
};
lime_graphics_opengl_GL.createShader = function(type) {
	return lime_graphics_opengl_GL.context.createShader(type);
};
lime_graphics_opengl_GL.createTexture = function() {
	return lime_graphics_opengl_GL.context.createTexture();
};
lime_graphics_opengl_GL.cullFace = function(mode) {
	lime_graphics_opengl_GL.context.cullFace(mode);
};
lime_graphics_opengl_GL.deleteBuffer = function(buffer) {
	lime_graphics_opengl_GL.context.deleteBuffer(buffer);
};
lime_graphics_opengl_GL.deleteFramebuffer = function(framebuffer) {
	lime_graphics_opengl_GL.context.deleteFramebuffer(framebuffer);
};
lime_graphics_opengl_GL.deleteProgram = function(program) {
	lime_graphics_opengl_GL.context.deleteProgram(program);
};
lime_graphics_opengl_GL.deleteRenderbuffer = function(renderbuffer) {
	lime_graphics_opengl_GL.context.deleteRenderbuffer(renderbuffer);
};
lime_graphics_opengl_GL.deleteShader = function(shader) {
	lime_graphics_opengl_GL.context.deleteShader(shader);
};
lime_graphics_opengl_GL.deleteTexture = function(texture) {
	lime_graphics_opengl_GL.context.deleteTexture(texture);
};
lime_graphics_opengl_GL.depthFunc = function(func) {
	lime_graphics_opengl_GL.context.depthFunc(func);
};
lime_graphics_opengl_GL.depthMask = function(flag) {
	lime_graphics_opengl_GL.context.depthMask(flag);
};
lime_graphics_opengl_GL.depthRange = function(zNear,zFar) {
	lime_graphics_opengl_GL.context.depthRange(zNear,zFar);
};
lime_graphics_opengl_GL.detachShader = function(program,shader) {
	lime_graphics_opengl_GL.context.detachShader(program,shader);
};
lime_graphics_opengl_GL.disable = function(cap) {
	lime_graphics_opengl_GL.context.disable(cap);
};
lime_graphics_opengl_GL.disableVertexAttribArray = function(index) {
	lime_graphics_opengl_GL.context.disableVertexAttribArray(index);
};
lime_graphics_opengl_GL.drawArrays = function(mode,first,count) {
	lime_graphics_opengl_GL.context.drawArrays(mode,first,count);
};
lime_graphics_opengl_GL.drawElements = function(mode,count,type,offset) {
	lime_graphics_opengl_GL.context.drawElements(mode,count,type,offset);
};
lime_graphics_opengl_GL.enable = function(cap) {
	lime_graphics_opengl_GL.context.enable(cap);
};
lime_graphics_opengl_GL.enableVertexAttribArray = function(index) {
	lime_graphics_opengl_GL.context.enableVertexAttribArray(index);
};
lime_graphics_opengl_GL.finish = function() {
	lime_graphics_opengl_GL.context.finish();
};
lime_graphics_opengl_GL.flush = function() {
	lime_graphics_opengl_GL.context.flush();
};
lime_graphics_opengl_GL.framebufferRenderbuffer = function(target,attachment,renderbuffertarget,renderbuffer) {
	lime_graphics_opengl_GL.context.framebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
};
lime_graphics_opengl_GL.framebufferTexture2D = function(target,attachment,textarget,texture,level) {
	lime_graphics_opengl_GL.context.framebufferTexture2D(target,attachment,textarget,texture,level);
};
lime_graphics_opengl_GL.frontFace = function(mode) {
	lime_graphics_opengl_GL.context.frontFace(mode);
};
lime_graphics_opengl_GL.generateMipmap = function(target) {
	lime_graphics_opengl_GL.context.generateMipmap(target);
};
lime_graphics_opengl_GL.getActiveAttrib = function(program,index) {
	return lime_graphics_opengl_GL.context.getActiveAttrib(program,index);
};
lime_graphics_opengl_GL.getActiveUniform = function(program,index) {
	return lime_graphics_opengl_GL.context.getActiveUniform(program,index);
};
lime_graphics_opengl_GL.getAttachedShaders = function(program) {
	return lime_graphics_opengl_GL.context.getAttachedShaders(program);
};
lime_graphics_opengl_GL.getAttribLocation = function(program,name) {
	return lime_graphics_opengl_GL.context.getAttribLocation(program,name);
};
lime_graphics_opengl_GL.getBufferParameter = function(target,pname) {
	return lime_graphics_opengl_GL.context.getBufferParameter(target,pname);
};
lime_graphics_opengl_GL.getContextAttributes = function() {
	return lime_graphics_opengl_GL.context.getContextAttributes();
};
lime_graphics_opengl_GL.getError = function() {
	return lime_graphics_opengl_GL.context.getError();
};
lime_graphics_opengl_GL.getExtension = function(name) {
	return lime_graphics_opengl_GL.context.getExtension(name);
};
lime_graphics_opengl_GL.getFramebufferAttachmentParameter = function(target,attachment,pname) {
	return lime_graphics_opengl_GL.context.getFramebufferAttachmentParameter(target,attachment,pname);
};
lime_graphics_opengl_GL.getParameter = function(pname) {
	return lime_graphics_opengl_GL.context.getParameter(pname);
};
lime_graphics_opengl_GL.getProgramInfoLog = function(program) {
	return lime_graphics_opengl_GL.context.getProgramInfoLog(program);
};
lime_graphics_opengl_GL.getProgramParameter = function(program,pname) {
	return lime_graphics_opengl_GL.context.getProgramParameter(program,pname);
};
lime_graphics_opengl_GL.getRenderbufferParameter = function(target,pname) {
	return lime_graphics_opengl_GL.context.getRenderbufferParameter(target,pname);
};
lime_graphics_opengl_GL.getShaderInfoLog = function(shader) {
	return lime_graphics_opengl_GL.context.getShaderInfoLog(shader);
};
lime_graphics_opengl_GL.getShaderParameter = function(shader,pname) {
	return lime_graphics_opengl_GL.context.getShaderParameter(shader,pname);
};
lime_graphics_opengl_GL.getShaderPrecisionFormat = function(shadertype,precisiontype) {
	return lime_graphics_opengl_GL.context.getShaderPrecisionFormat(shadertype,precisiontype);
};
lime_graphics_opengl_GL.getShaderSource = function(shader) {
	return lime_graphics_opengl_GL.context.getShaderSource(shader);
};
lime_graphics_opengl_GL.getSupportedExtensions = function() {
	return lime_graphics_opengl_GL.context.getSupportedExtensions();
};
lime_graphics_opengl_GL.getTexParameter = function(target,pname) {
	return lime_graphics_opengl_GL.context.getTexParameter(target,pname);
};
lime_graphics_opengl_GL.getUniform = function(program,location) {
	return lime_graphics_opengl_GL.context.getUniform(program,location);
};
lime_graphics_opengl_GL.getUniformLocation = function(program,name) {
	return lime_graphics_opengl_GL.context.getUniformLocation(program,name);
};
lime_graphics_opengl_GL.getVertexAttrib = function(index,pname) {
	return lime_graphics_opengl_GL.context.getVertexAttrib(index,pname);
};
lime_graphics_opengl_GL.getVertexAttribOffset = function(index,pname) {
	return lime_graphics_opengl_GL.context.getVertexAttribOffset(index,pname);
};
lime_graphics_opengl_GL.hint = function(target,mode) {
	lime_graphics_opengl_GL.context.hint(target,mode);
};
lime_graphics_opengl_GL.isBuffer = function(buffer) {
	return lime_graphics_opengl_GL.context.isBuffer(buffer);
};
lime_graphics_opengl_GL.isContextLost = function() {
	return lime_graphics_opengl_GL.context.isContextLost();
};
lime_graphics_opengl_GL.isEnabled = function(cap) {
	return lime_graphics_opengl_GL.context.isEnabled(cap);
};
lime_graphics_opengl_GL.isFramebuffer = function(framebuffer) {
	return lime_graphics_opengl_GL.context.isFramebuffer(framebuffer);
};
lime_graphics_opengl_GL.isProgram = function(program) {
	return lime_graphics_opengl_GL.context.isProgram(program);
};
lime_graphics_opengl_GL.isRenderbuffer = function(renderbuffer) {
	return lime_graphics_opengl_GL.context.isRenderbuffer(renderbuffer);
};
lime_graphics_opengl_GL.isShader = function(shader) {
	return lime_graphics_opengl_GL.context.isShader(shader);
};
lime_graphics_opengl_GL.isTexture = function(texture) {
	return lime_graphics_opengl_GL.context.isTexture(texture);
};
lime_graphics_opengl_GL.lineWidth = function(width) {
	lime_graphics_opengl_GL.context.lineWidth(width);
};
lime_graphics_opengl_GL.linkProgram = function(program) {
	lime_graphics_opengl_GL.context.linkProgram(program);
};
lime_graphics_opengl_GL.pixelStorei = function(pname,param) {
	lime_graphics_opengl_GL.context.pixelStorei(pname,param);
};
lime_graphics_opengl_GL.polygonOffset = function(factor,units) {
	lime_graphics_opengl_GL.context.polygonOffset(factor,units);
};
lime_graphics_opengl_GL.readPixels = function(x,y,width,height,format,type,pixels) {
	lime_graphics_opengl_GL.context.readPixels(x,y,width,height,format,type,pixels);
};
lime_graphics_opengl_GL.renderbufferStorage = function(target,internalformat,width,height) {
	lime_graphics_opengl_GL.context.renderbufferStorage(target,internalformat,width,height);
};
lime_graphics_opengl_GL.sampleCoverage = function(value,invert) {
	lime_graphics_opengl_GL.context.sampleCoverage(value,invert);
};
lime_graphics_opengl_GL.scissor = function(x,y,width,height) {
	lime_graphics_opengl_GL.context.scissor(x,y,width,height);
};
lime_graphics_opengl_GL.shaderSource = function(shader,source) {
	lime_graphics_opengl_GL.context.shaderSource(shader,source);
};
lime_graphics_opengl_GL.stencilFunc = function(func,ref,mask) {
	lime_graphics_opengl_GL.context.stencilFunc(func,ref,mask);
};
lime_graphics_opengl_GL.stencilFuncSeparate = function(face,func,ref,mask) {
	lime_graphics_opengl_GL.context.stencilFuncSeparate(face,func,ref,mask);
};
lime_graphics_opengl_GL.stencilMask = function(mask) {
	lime_graphics_opengl_GL.context.stencilMask(mask);
};
lime_graphics_opengl_GL.stencilMaskSeparate = function(face,mask) {
	lime_graphics_opengl_GL.context.stencilMaskSeparate(face,mask);
};
lime_graphics_opengl_GL.stencilOp = function(fail,zfail,zpass) {
	lime_graphics_opengl_GL.context.stencilOp(fail,zfail,zpass);
};
lime_graphics_opengl_GL.stencilOpSeparate = function(face,fail,zfail,zpass) {
	lime_graphics_opengl_GL.context.stencilOpSeparate(face,fail,zfail,zpass);
};
lime_graphics_opengl_GL.texImage2D = function(target,level,internalformat,width,height,border,format,type,pixels) {
	lime_graphics_opengl_GL.context.texImage2D(target,level,internalformat,width,height,border,format,type,pixels);
};
lime_graphics_opengl_GL.texParameterf = function(target,pname,param) {
	lime_graphics_opengl_GL.context.texParameterf(target,pname,param);
};
lime_graphics_opengl_GL.texParameteri = function(target,pname,param) {
	lime_graphics_opengl_GL.context.texParameteri(target,pname,param);
};
lime_graphics_opengl_GL.texSubImage2D = function(target,level,xoffset,yoffset,width,height,format,type,pixels) {
	lime_graphics_opengl_GL.context.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);
};
lime_graphics_opengl_GL.uniform1f = function(location,x) {
	lime_graphics_opengl_GL.context.uniform1f(location,x);
};
lime_graphics_opengl_GL.uniform1fv = function(location,x) {
	lime_graphics_opengl_GL.context.uniform1fv(location,x);
};
lime_graphics_opengl_GL.uniform1i = function(location,x) {
	lime_graphics_opengl_GL.context.uniform1i(location,x);
};
lime_graphics_opengl_GL.uniform1iv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform1iv(location,v);
};
lime_graphics_opengl_GL.uniform2f = function(location,x,y) {
	lime_graphics_opengl_GL.context.uniform2f(location,x,y);
};
lime_graphics_opengl_GL.uniform2fv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform2fv(location,v);
};
lime_graphics_opengl_GL.uniform2i = function(location,x,y) {
	lime_graphics_opengl_GL.context.uniform2i(location,x,y);
};
lime_graphics_opengl_GL.uniform2iv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform2iv(location,v);
};
lime_graphics_opengl_GL.uniform3f = function(location,x,y,z) {
	lime_graphics_opengl_GL.context.uniform3f(location,x,y,z);
};
lime_graphics_opengl_GL.uniform3fv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform3fv(location,v);
};
lime_graphics_opengl_GL.uniform3i = function(location,x,y,z) {
	lime_graphics_opengl_GL.context.uniform3i(location,x,y,z);
};
lime_graphics_opengl_GL.uniform3iv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform3iv(location,v);
};
lime_graphics_opengl_GL.uniform4f = function(location,x,y,z,w) {
	lime_graphics_opengl_GL.context.uniform4f(location,x,y,z,w);
};
lime_graphics_opengl_GL.uniform4fv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform4fv(location,v);
};
lime_graphics_opengl_GL.uniform4i = function(location,x,y,z,w) {
	lime_graphics_opengl_GL.context.uniform4i(location,x,y,z,w);
};
lime_graphics_opengl_GL.uniform4iv = function(location,v) {
	lime_graphics_opengl_GL.context.uniform4iv(location,v);
};
lime_graphics_opengl_GL.uniformMatrix2fv = function(location,transpose,v) {
	lime_graphics_opengl_GL.context.uniformMatrix2fv(location,transpose,v);
};
lime_graphics_opengl_GL.uniformMatrix3fv = function(location,transpose,v) {
	lime_graphics_opengl_GL.context.uniformMatrix3fv(location,transpose,v);
};
lime_graphics_opengl_GL.uniformMatrix4fv = function(location,transpose,v) {
	lime_graphics_opengl_GL.context.uniformMatrix4fv(location,transpose,v);
};
lime_graphics_opengl_GL.useProgram = function(program) {
	lime_graphics_opengl_GL.context.useProgram(program);
};
lime_graphics_opengl_GL.validateProgram = function(program) {
	lime_graphics_opengl_GL.context.validateProgram(program);
};
lime_graphics_opengl_GL.vertexAttrib1f = function(indx,x) {
	lime_graphics_opengl_GL.context.vertexAttrib1f(indx,x);
};
lime_graphics_opengl_GL.vertexAttrib1fv = function(indx,values) {
	lime_graphics_opengl_GL.context.vertexAttrib1fv(indx,values);
};
lime_graphics_opengl_GL.vertexAttrib2f = function(indx,x,y) {
	lime_graphics_opengl_GL.context.vertexAttrib2f(indx,x,y);
};
lime_graphics_opengl_GL.vertexAttrib2fv = function(indx,values) {
	lime_graphics_opengl_GL.context.vertexAttrib2fv(indx,values);
};
lime_graphics_opengl_GL.vertexAttrib3f = function(indx,x,y,z) {
	lime_graphics_opengl_GL.context.vertexAttrib3f(indx,x,y,z);
};
lime_graphics_opengl_GL.vertexAttrib3fv = function(indx,values) {
	lime_graphics_opengl_GL.context.vertexAttrib3fv(indx,values);
};
lime_graphics_opengl_GL.vertexAttrib4f = function(indx,x,y,z,w) {
	lime_graphics_opengl_GL.context.vertexAttrib4f(indx,x,y,z,w);
};
lime_graphics_opengl_GL.vertexAttrib4fv = function(indx,values) {
	lime_graphics_opengl_GL.context.vertexAttrib4fv(indx,values);
};
lime_graphics_opengl_GL.vertexAttribPointer = function(indx,size,type,normalized,stride,offset) {
	lime_graphics_opengl_GL.context.vertexAttribPointer(indx,size,type,normalized,stride,offset);
};
lime_graphics_opengl_GL.viewport = function(x,y,width,height) {
	lime_graphics_opengl_GL.context.viewport(x,y,width,height);
};
lime_graphics_opengl_GL.get_version = function() {
	return 2;
};
var lime_graphics_utils_ImageCanvasUtil = function() { };
$hxClasses["lime.graphics.utils.ImageCanvasUtil"] = lime_graphics_utils_ImageCanvasUtil;
lime_graphics_utils_ImageCanvasUtil.__name__ = ["lime","graphics","utils","ImageCanvasUtil"];
lime_graphics_utils_ImageCanvasUtil.colorTransform = function(image,rect,colorMatrix) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.colorTransform(image,rect,colorMatrix);
};
lime_graphics_utils_ImageCanvasUtil.convertToCanvas = function(image) {
	var buffer = image.buffer;
	if(buffer.__srcImage != null) {
		if(buffer.__srcCanvas == null) {
			lime_graphics_utils_ImageCanvasUtil.createCanvas(image,buffer.__srcImage.width,buffer.__srcImage.height);
			buffer.__srcContext.drawImage(buffer.__srcImage,0,0);
		}
		buffer.__srcImage = null;
	} else if(buffer.data != null && buffer.__srcCanvas == null) {
		lime_graphics_utils_ImageCanvasUtil.createCanvas(image,buffer.width,buffer.height);
		lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	} else if(buffer.data == null && buffer.__srcImageData != null) {
		buffer.data = buffer.__srcImageData.data;
	}
};
lime_graphics_utils_ImageCanvasUtil.convertToData = function(image) {
	if(image.buffer.data == null) {
		lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
		lime_graphics_utils_ImageCanvasUtil.sync(image,false);
		lime_graphics_utils_ImageCanvasUtil.createImageData(image);
		image.buffer.__srcCanvas = null;
		image.buffer.__srcContext = null;
	}
};
lime_graphics_utils_ImageCanvasUtil.copyChannel = function(image,sourceImage,sourceRect,destPoint,sourceChannel,destChannel) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(sourceImage);
	lime_graphics_utils_ImageCanvasUtil.createImageData(sourceImage);
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.copyChannel(image,sourceImage,sourceRect,destPoint,sourceChannel,destChannel);
};
lime_graphics_utils_ImageCanvasUtil.copyPixels = function(image,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha) {
	if(mergeAlpha == null) {
		mergeAlpha = false;
	}
	if(destPoint == null || destPoint.x >= image.width || destPoint.y >= image.height || sourceRect == null || sourceRect.width < 1 || sourceRect.height < 1) {
		return;
	}
	if(alphaImage != null && alphaImage.get_transparent()) {
		if(alphaPoint == null) {
			alphaPoint = new lime_math_Vector2();
		}
		var tempData = image.clone();
		tempData.copyChannel(alphaImage,new lime_math_Rectangle(alphaPoint.x,alphaPoint.y,sourceRect.width,sourceRect.height),new lime_math_Vector2(sourceRect.x,sourceRect.y),lime_graphics_ImageChannel.ALPHA,lime_graphics_ImageChannel.ALPHA);
		sourceImage = tempData;
	}
	lime_graphics_utils_ImageCanvasUtil.sync(image,true);
	if(!mergeAlpha) {
		if(image.get_transparent() && sourceImage.get_transparent()) {
			image.buffer.__srcContext.clearRect(destPoint.x + image.offsetX,destPoint.y + image.offsetY,sourceRect.width + image.offsetX,sourceRect.height + image.offsetY);
		}
	}
	lime_graphics_utils_ImageCanvasUtil.sync(sourceImage,false);
	if(sourceImage.buffer.get_src() != null) {
		image.buffer.__srcContext.drawImage(sourceImage.buffer.get_src(),sourceRect.x + sourceImage.offsetX | 0,sourceRect.y + sourceImage.offsetY | 0,sourceRect.width | 0,sourceRect.height | 0,destPoint.x + image.offsetX | 0,destPoint.y + image.offsetY | 0,sourceRect.width | 0,sourceRect.height | 0);
	}
};
lime_graphics_utils_ImageCanvasUtil.createCanvas = function(image,width,height) {
	var buffer = image.buffer;
	if(buffer.__srcCanvas == null) {
		buffer.__srcCanvas = window.document.createElement("canvas");
		buffer.__srcCanvas.width = width;
		buffer.__srcCanvas.height = height;
		if(!image.get_transparent()) {
			if(!image.get_transparent()) {
				buffer.__srcCanvas.setAttribute("moz-opaque","true");
			}
			buffer.__srcContext = buffer.__srcCanvas.getContext ("2d", { alpha: false });
		} else {
			buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
		}
		buffer.__srcContext.mozImageSmoothingEnabled = false;
		buffer.__srcContext.msImageSmoothingEnabled = false;
		buffer.__srcContext.imageSmoothingEnabled = false;
	}
};
lime_graphics_utils_ImageCanvasUtil.createImageData = function(image) {
	var buffer = image.buffer;
	if(buffer.__srcImageData == null) {
		if(buffer.data == null) {
			buffer.__srcImageData = buffer.__srcContext.getImageData(0,0,buffer.width,buffer.height);
		} else {
			buffer.__srcImageData = buffer.__srcContext.createImageData(buffer.width,buffer.height);
			buffer.__srcImageData.data.set(buffer.data);
		}
		var elements = buffer.__srcImageData.data.buffer;
		var this1;
		if(elements != null) {
			this1 = new Uint8Array(elements);
		} else {
			this1 = null;
		}
		buffer.data = this1;
	}
};
lime_graphics_utils_ImageCanvasUtil.fillRect = function(image,rect,color,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.sync(image,true);
	if(rect.x == 0 && rect.y == 0 && rect.width == image.width && rect.height == image.height) {
		if(image.get_transparent() && (color & 255) == 0) {
			image.buffer.__srcCanvas.width = image.buffer.width;
			return;
		}
	}
	var r;
	var g;
	var b;
	var a;
	if(format == 1) {
		r = color >> 16 & 255;
		g = color >> 8 & 255;
		b = color & 255;
		if(image.get_transparent()) {
			a = color >> 24 & 255;
		} else {
			a = 255;
		}
	} else {
		r = color >> 24 & 255;
		g = color >> 16 & 255;
		b = color >> 8 & 255;
		if(image.get_transparent()) {
			a = color & 255;
		} else {
			a = 255;
		}
	}
	image.buffer.__srcContext.fillStyle = "rgba(" + r + ", " + g + ", " + b + ", " + a / 255 + ")";
	image.buffer.__srcContext.fillRect(rect.x + image.offsetX,rect.y + image.offsetY,rect.width + image.offsetX,rect.height + image.offsetY);
};
lime_graphics_utils_ImageCanvasUtil.floodFill = function(image,x,y,color,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.floodFill(image,x,y,color,format);
};
lime_graphics_utils_ImageCanvasUtil.getPixel = function(image,x,y,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	return lime_graphics_utils_ImageDataUtil.getPixel(image,x,y,format);
};
lime_graphics_utils_ImageCanvasUtil.getPixel32 = function(image,x,y,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	return lime_graphics_utils_ImageDataUtil.getPixel32(image,x,y,format);
};
lime_graphics_utils_ImageCanvasUtil.getPixels = function(image,rect,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	return lime_graphics_utils_ImageDataUtil.getPixels(image,rect,format);
};
lime_graphics_utils_ImageCanvasUtil.merge = function(image,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(sourceImage);
	lime_graphics_utils_ImageCanvasUtil.createImageData(sourceImage);
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.merge(image,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier);
};
lime_graphics_utils_ImageCanvasUtil.resize = function(image,newWidth,newHeight) {
	var buffer = image.buffer;
	if(buffer.__srcCanvas == null) {
		lime_graphics_utils_ImageCanvasUtil.createCanvas(image,newWidth,newHeight);
		buffer.__srcContext.drawImage(buffer.get_src(),0,0,newWidth,newHeight);
	} else {
		lime_graphics_utils_ImageCanvasUtil.sync(image,true);
		var sourceCanvas = buffer.__srcCanvas;
		buffer.__srcCanvas = null;
		lime_graphics_utils_ImageCanvasUtil.createCanvas(image,newWidth,newHeight);
		buffer.__srcContext.drawImage(sourceCanvas,0,0,newWidth,newHeight);
	}
};
lime_graphics_utils_ImageCanvasUtil.scroll = function(image,x,y) {
	if(x % image.width == 0 && y % image.height == 0) {
		return;
	}
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.sync(image,true);
	image.buffer.__srcContext.clearRect(x,y,image.width,image.height);
	image.buffer.__srcContext.drawImage(image.buffer.__srcCanvas,x,y);
};
lime_graphics_utils_ImageCanvasUtil.setPixel = function(image,x,y,color,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.setPixel(image,x,y,color,format);
};
lime_graphics_utils_ImageCanvasUtil.setPixel32 = function(image,x,y,color,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.setPixel32(image,x,y,color,format);
};
lime_graphics_utils_ImageCanvasUtil.setPixels = function(image,rect,bytes,format) {
	lime_graphics_utils_ImageCanvasUtil.convertToCanvas(image);
	lime_graphics_utils_ImageCanvasUtil.createImageData(image);
	lime_graphics_utils_ImageDataUtil.setPixels(image,rect,bytes,format);
};
lime_graphics_utils_ImageCanvasUtil.sync = function(image,clear) {
	if(image.dirty && image.buffer.__srcImageData != null && image.type != lime_graphics_ImageType.DATA) {
		image.buffer.__srcContext.putImageData(image.buffer.__srcImageData,0,0);
		image.buffer.data = null;
		image.dirty = false;
	}
	if(clear) {
		image.buffer.__srcImageData = null;
		image.buffer.data = null;
	}
};
var lime_graphics_utils_ImageDataUtil = function() { };
$hxClasses["lime.graphics.utils.ImageDataUtil"] = lime_graphics_utils_ImageDataUtil;
lime_graphics_utils_ImageDataUtil.__name__ = ["lime","graphics","utils","ImageDataUtil"];
lime_graphics_utils_ImageDataUtil.colorTransform = function(image,rect,colorMatrix) {
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	var format = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
	var alphaTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable(colorMatrix);
	var redTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable(colorMatrix);
	var greenTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable(colorMatrix);
	var blueTable = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable(colorMatrix);
	var row;
	var offset;
	var pixel;
	var _g1 = 0;
	var _g = dataView.height;
	while(_g1 < _g) {
		row = dataView.offset + dataView.stride * _g1++;
		var _g3 = 0;
		var _g2 = dataView.width;
		while(_g3 < _g2) {
			offset = row + _g3++ * 4;
			switch(format) {
			case 0:
				pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
				break;
			case 1:
				pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
				break;
			case 2:
				pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
				break;
			}
			if(premultiplied) {
				if((pixel & 255) != 0 && (pixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
					pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
				}
			}
			pixel = (redTable[pixel >> 24 & 255] & 255) << 24 | (greenTable[pixel >> 16 & 255] & 255) << 16 | (blueTable[pixel >> 8 & 255] & 255) << 8 | alphaTable[pixel & 255] & 255;
			if(premultiplied) {
				if((pixel & 255) == 0) {
					if(pixel != 0) {
						pixel = 0;
					}
				} else if((pixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
					pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
				}
			}
			switch(format) {
			case 0:
				data[offset] = pixel >> 24 & 255;
				data[offset + 1] = pixel >> 16 & 255;
				data[offset + 2] = pixel >> 8 & 255;
				data[offset + 3] = pixel & 255;
				break;
			case 1:
				data[offset] = pixel & 255;
				data[offset + 1] = pixel >> 24 & 255;
				data[offset + 2] = pixel >> 16 & 255;
				data[offset + 3] = pixel >> 8 & 255;
				break;
			case 2:
				data[offset] = pixel >> 8 & 255;
				data[offset + 1] = pixel >> 16 & 255;
				data[offset + 2] = pixel >> 24 & 255;
				data[offset + 3] = pixel & 255;
				break;
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.copyChannel = function(image,sourceImage,sourceRect,destPoint,sourceChannel,destChannel) {
	var destIdx;
	switch(destChannel[1]) {
	case 0:
		destIdx = 0;
		break;
	case 1:
		destIdx = 1;
		break;
	case 2:
		destIdx = 2;
		break;
	case 3:
		destIdx = 3;
		break;
	}
	var srcIdx;
	switch(sourceChannel[1]) {
	case 0:
		srcIdx = 0;
		break;
	case 1:
		srcIdx = 1;
		break;
	case 2:
		srcIdx = 2;
		break;
	case 3:
		srcIdx = 3;
		break;
	}
	var srcData = sourceImage.buffer.data;
	var destData = image.buffer.data;
	if(srcData == null || destData == null) {
		return;
	}
	var srcView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
	var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,srcView.width,srcView.height));
	var srcFormat = sourceImage.buffer.format;
	var destFormat = image.buffer.format;
	var srcPremultiplied = sourceImage.buffer.premultiplied;
	var destPremultiplied = image.buffer.premultiplied;
	var srcPosition;
	var destPosition;
	var srcPixel;
	var destPixel;
	var value = 0;
	var _g1 = 0;
	var _g = destView.height;
	while(_g1 < _g) {
		var y = _g1++;
		srcPosition = srcView.offset + srcView.stride * y;
		destPosition = destView.offset + destView.stride * y;
		var _g3 = 0;
		var _g2 = destView.width;
		while(_g3 < _g2) {
			++_g3;
			switch(srcFormat) {
			case 0:
				srcPixel = (srcData[srcPosition] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition + 2] & 255) << 8 | srcData[srcPosition + 3] & 255;
				break;
			case 1:
				srcPixel = (srcData[srcPosition + 1] & 255) << 24 | (srcData[srcPosition + 2] & 255) << 16 | (srcData[srcPosition + 3] & 255) << 8 | srcData[srcPosition] & 255;
				break;
			case 2:
				srcPixel = (srcData[srcPosition + 2] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition] & 255) << 8 | srcData[srcPosition + 3] & 255;
				break;
			}
			if(srcPremultiplied) {
				if((srcPixel & 255) != 0 && (srcPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (srcPixel & 255);
					srcPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | srcPixel & 255 & 255;
				}
			}
			switch(destFormat) {
			case 0:
				destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
				break;
			case 1:
				destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
				break;
			case 2:
				destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
				break;
			}
			if(destPremultiplied) {
				if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
					destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | destPixel & 255 & 255;
				}
			}
			switch(srcIdx) {
			case 0:
				value = srcPixel >> 24 & 255;
				break;
			case 1:
				value = srcPixel >> 16 & 255;
				break;
			case 2:
				value = srcPixel >> 8 & 255;
				break;
			case 3:
				value = srcPixel & 255;
				break;
			}
			switch(destIdx) {
			case 0:
				destPixel = (value & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
				break;
			case 1:
				destPixel = (destPixel >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
				break;
			case 2:
				destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (value & 255) << 8 | destPixel & 255 & 255;
				break;
			case 3:
				destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | value & 255;
				break;
			}
			if(destPremultiplied) {
				if((destPixel & 255) == 0) {
					if(destPixel != 0) {
						destPixel = 0;
					}
				} else if((destPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
					destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
				}
			}
			switch(destFormat) {
			case 0:
				destData[destPosition] = destPixel >> 24 & 255;
				destData[destPosition + 1] = destPixel >> 16 & 255;
				destData[destPosition + 2] = destPixel >> 8 & 255;
				destData[destPosition + 3] = destPixel & 255;
				break;
			case 1:
				destData[destPosition] = destPixel & 255;
				destData[destPosition + 1] = destPixel >> 24 & 255;
				destData[destPosition + 2] = destPixel >> 16 & 255;
				destData[destPosition + 3] = destPixel >> 8 & 255;
				break;
			case 2:
				destData[destPosition] = destPixel >> 8 & 255;
				destData[destPosition + 1] = destPixel >> 16 & 255;
				destData[destPosition + 2] = destPixel >> 24 & 255;
				destData[destPosition + 3] = destPixel & 255;
				break;
			}
			srcPosition += 4;
			destPosition += 4;
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.copyPixels = function(image,sourceImage,sourceRect,destPoint,alphaImage,alphaPoint,mergeAlpha) {
	if(mergeAlpha == null) {
		mergeAlpha = false;
	}
	var sourceData = sourceImage.buffer.data;
	var destData = image.buffer.data;
	if(sourceData == null || destData == null) {
		return;
	}
	var sourceView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
	var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,sourceView.width,sourceView.height));
	var sourceFormat = sourceImage.buffer.format;
	var destFormat = image.buffer.format;
	var sourcePremultiplied = sourceImage.buffer.premultiplied;
	var destPremultiplied = image.buffer.premultiplied;
	var sourcePosition;
	var destPosition;
	var sourcePixel;
	if(!mergeAlpha || !sourceImage.get_transparent()) {
		var _g1 = 0;
		var _g = destView.height;
		while(_g1 < _g) {
			var y = _g1++;
			sourcePosition = sourceView.offset + sourceView.stride * y;
			destPosition = destView.offset + destView.stride * y;
			var _g3 = 0;
			var _g2 = destView.width;
			while(_g3 < _g2) {
				++_g3;
				switch(sourceFormat) {
				case 0:
					sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
					break;
				case 1:
					sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
					break;
				case 2:
					sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
					break;
				}
				if(sourcePremultiplied) {
					if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
						sourcePixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | sourcePixel & 255 & 255;
					}
				}
				if(destPremultiplied) {
					if((sourcePixel & 255) == 0) {
						if(sourcePixel != 0) {
							sourcePixel = 0;
						}
					} else if((sourcePixel & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[sourcePixel & 255];
						sourcePixel = ((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | sourcePixel & 255 & 255;
					}
				}
				switch(destFormat) {
				case 0:
					destData[destPosition] = sourcePixel >> 24 & 255;
					destData[destPosition + 1] = sourcePixel >> 16 & 255;
					destData[destPosition + 2] = sourcePixel >> 8 & 255;
					destData[destPosition + 3] = sourcePixel & 255;
					break;
				case 1:
					destData[destPosition] = sourcePixel & 255;
					destData[destPosition + 1] = sourcePixel >> 24 & 255;
					destData[destPosition + 2] = sourcePixel >> 16 & 255;
					destData[destPosition + 3] = sourcePixel >> 8 & 255;
					break;
				case 2:
					destData[destPosition] = sourcePixel >> 8 & 255;
					destData[destPosition + 1] = sourcePixel >> 16 & 255;
					destData[destPosition + 2] = sourcePixel >> 24 & 255;
					destData[destPosition + 3] = sourcePixel & 255;
					break;
				}
				sourcePosition += 4;
				destPosition += 4;
			}
		}
	} else {
		var sourceAlpha;
		var destAlpha;
		var oneMinusSourceAlpha;
		var blendAlpha;
		var destPixel;
		if(alphaImage == null) {
			var _g11 = 0;
			var _g4 = destView.height;
			while(_g11 < _g4) {
				var y1 = _g11++;
				sourcePosition = sourceView.offset + sourceView.stride * y1;
				destPosition = destView.offset + destView.stride * y1;
				var _g31 = 0;
				var _g21 = destView.width;
				while(_g31 < _g21) {
					++_g31;
					switch(sourceFormat) {
					case 0:
						sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
						break;
					case 1:
						sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
						break;
					case 2:
						sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
						break;
					}
					if(sourcePremultiplied) {
						if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
							sourcePixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | sourcePixel & 255 & 255;
						}
					}
					switch(destFormat) {
					case 0:
						destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
						break;
					case 1:
						destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
						break;
					case 2:
						destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
						break;
					}
					if(destPremultiplied) {
						if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
							destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | destPixel & 255 & 255;
						}
					}
					sourceAlpha = (sourcePixel & 255) / 255.0;
					destAlpha = (destPixel & 255) / 255.0;
					oneMinusSourceAlpha = 1 - sourceAlpha;
					blendAlpha = sourceAlpha + destAlpha * oneMinusSourceAlpha;
					if(blendAlpha == 0) {
						destPixel = 0;
					} else {
						destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 24 & 255) * sourceAlpha + (destPixel >> 24 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)] & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 16 & 255) * sourceAlpha + (destPixel >> 16 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)] & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 8 & 255) * sourceAlpha + (destPixel >> 8 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)] & 255) << 8 | destPixel & 255 & 255;
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(blendAlpha * 255.0)] & 255;
					}
					if(destPremultiplied) {
						if((destPixel & 255) == 0) {
							if(destPixel != 0) {
								destPixel = 0;
							}
						} else if((destPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
							destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
						}
					}
					switch(destFormat) {
					case 0:
						destData[destPosition] = destPixel >> 24 & 255;
						destData[destPosition + 1] = destPixel >> 16 & 255;
						destData[destPosition + 2] = destPixel >> 8 & 255;
						destData[destPosition + 3] = destPixel & 255;
						break;
					case 1:
						destData[destPosition] = destPixel & 255;
						destData[destPosition + 1] = destPixel >> 24 & 255;
						destData[destPosition + 2] = destPixel >> 16 & 255;
						destData[destPosition + 3] = destPixel >> 8 & 255;
						break;
					case 2:
						destData[destPosition] = destPixel >> 8 & 255;
						destData[destPosition + 1] = destPixel >> 16 & 255;
						destData[destPosition + 2] = destPixel >> 24 & 255;
						destData[destPosition + 3] = destPixel & 255;
						break;
					}
					sourcePosition += 4;
					destPosition += 4;
				}
			}
		} else {
			if(alphaPoint == null) {
				alphaPoint = new lime_math_Vector2();
			}
			var alphaData = alphaImage.buffer.data;
			var alphaFormat = alphaImage.buffer.format;
			var alphaPremultiplied = alphaImage.buffer.premultiplied;
			var alphaView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(alphaImage,new lime_math_Rectangle(alphaPoint.x,alphaPoint.y,destView.width,destView.height));
			var alphaPosition;
			var alphaPixel;
			var _g12 = 0;
			var _g5 = alphaView.height;
			while(_g12 < _g5) {
				var y2 = _g12++;
				sourcePosition = sourceView.offset + sourceView.stride * y2;
				destPosition = destView.offset + destView.stride * y2;
				alphaPosition = alphaView.offset + alphaView.stride * y2;
				var _g32 = 0;
				var _g22 = alphaView.width;
				while(_g32 < _g22) {
					++_g32;
					switch(sourceFormat) {
					case 0:
						sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
						break;
					case 1:
						sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
						break;
					case 2:
						sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
						break;
					}
					if(sourcePremultiplied) {
						if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
							sourcePixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | sourcePixel & 255 & 255;
						}
					}
					switch(destFormat) {
					case 0:
						destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
						break;
					case 1:
						destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
						break;
					case 2:
						destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
						break;
					}
					if(destPremultiplied) {
						if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
							destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | destPixel & 255 & 255;
						}
					}
					switch(alphaFormat) {
					case 0:
						alphaPixel = (alphaData[alphaPosition] & 255) << 24 | (alphaData[alphaPosition + 1] & 255) << 16 | (alphaData[alphaPosition + 2] & 255) << 8 | alphaData[alphaPosition + 3] & 255;
						break;
					case 1:
						alphaPixel = (alphaData[alphaPosition + 1] & 255) << 24 | (alphaData[alphaPosition + 2] & 255) << 16 | (alphaData[alphaPosition + 3] & 255) << 8 | alphaData[alphaPosition] & 255;
						break;
					case 2:
						alphaPixel = (alphaData[alphaPosition + 2] & 255) << 24 | (alphaData[alphaPosition + 1] & 255) << 16 | (alphaData[alphaPosition] & 255) << 8 | alphaData[alphaPosition + 3] & 255;
						break;
					}
					if(alphaPremultiplied) {
						if((alphaPixel & 255) != 0 && (alphaPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (alphaPixel & 255);
							alphaPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((alphaPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((alphaPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((alphaPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | alphaPixel & 255 & 255;
						}
					}
					sourceAlpha = (alphaPixel & 255) / 255;
					destAlpha = (destPixel & 255) / 255;
					oneMinusSourceAlpha = 1 - sourceAlpha;
					blendAlpha = sourceAlpha + destAlpha * oneMinusSourceAlpha;
					if(blendAlpha == 0) {
						destPixel = 0;
					} else {
						destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 24 & 255) * sourceAlpha + (destPixel >> 24 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)] & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 16 & 255) * sourceAlpha + (destPixel >> 16 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)] & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(((sourcePixel >> 8 & 255) * sourceAlpha + (destPixel >> 8 & 255) * destAlpha * oneMinusSourceAlpha) / blendAlpha)] & 255) << 8 | destPixel & 255 & 255;
						destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round(blendAlpha * 255.0)] & 255;
					}
					if(destPremultiplied) {
						if((destPixel & 255) == 0) {
							if(destPixel != 0) {
								destPixel = 0;
							}
						} else if((destPixel & 255) != 255) {
							lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
							destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
						}
					}
					switch(destFormat) {
					case 0:
						destData[destPosition] = destPixel >> 24 & 255;
						destData[destPosition + 1] = destPixel >> 16 & 255;
						destData[destPosition + 2] = destPixel >> 8 & 255;
						destData[destPosition + 3] = destPixel & 255;
						break;
					case 1:
						destData[destPosition] = destPixel & 255;
						destData[destPosition + 1] = destPixel >> 24 & 255;
						destData[destPosition + 2] = destPixel >> 16 & 255;
						destData[destPosition + 3] = destPixel >> 8 & 255;
						break;
					case 2:
						destData[destPosition] = destPixel >> 8 & 255;
						destData[destPosition + 1] = destPixel >> 16 & 255;
						destData[destPosition + 2] = destPixel >> 24 & 255;
						destData[destPosition + 3] = destPixel & 255;
						break;
					}
					sourcePosition += 4;
					destPosition += 4;
				}
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.fillRect = function(image,rect,color,format) {
	var fillColor;
	switch(format) {
	case 1:
		var argb = color;
		var rgba = 0;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		fillColor = rgba;
		break;
	case 2:
		var bgra = color;
		var rgba1 = 0;
		rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		fillColor = rgba1;
		break;
	default:
		fillColor = color;
	}
	if(!image.get_transparent()) {
		fillColor = (fillColor >> 24 & 255 & 255) << 24 | (fillColor >> 16 & 255 & 255) << 16 | (fillColor >> 8 & 255 & 255) << 8 | 255;
	}
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	var format1 = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
	var row;
	var _g1 = 0;
	var _g = dataView.height;
	while(_g1 < _g) {
		row = dataView.offset + dataView.stride * _g1++;
		var _g3 = 0;
		var _g2 = dataView.width;
		while(_g3 < _g2) {
			var offset = row + _g3++ * 4;
			if(premultiplied) {
				if((fillColor & 255) == 0) {
					if(fillColor != 0) {
						fillColor = 0;
					}
				} else if((fillColor & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[fillColor & 255];
					fillColor = ((fillColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((fillColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((fillColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | fillColor & 255 & 255;
				}
			}
			switch(format1) {
			case 0:
				data[offset] = fillColor >> 24 & 255;
				data[offset + 1] = fillColor >> 16 & 255;
				data[offset + 2] = fillColor >> 8 & 255;
				data[offset + 3] = fillColor & 255;
				break;
			case 1:
				data[offset] = fillColor & 255;
				data[offset + 1] = fillColor >> 24 & 255;
				data[offset + 2] = fillColor >> 16 & 255;
				data[offset + 3] = fillColor >> 8 & 255;
				break;
			case 2:
				data[offset] = fillColor >> 8 & 255;
				data[offset + 1] = fillColor >> 16 & 255;
				data[offset + 2] = fillColor >> 24 & 255;
				data[offset + 3] = fillColor & 255;
				break;
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.floodFill = function(image,x,y,color,format) {
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	if(format == 1) {
		color = (color & 16777215) << 8 | color >> 24 & 255;
	}
	var format1 = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var fillColor = color;
	var hitColor;
	var offset = (y + image.offsetY) * (image.buffer.width * 4) + (x + image.offsetX) * 4;
	switch(format1) {
	case 0:
		hitColor = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		hitColor = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		hitColor = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((hitColor & 255) != 0 && (hitColor & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (hitColor & 255);
			hitColor = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((hitColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((hitColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((hitColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | hitColor & 255 & 255;
		}
	}
	if(!image.get_transparent()) {
		fillColor = (fillColor >> 24 & 255 & 255) << 24 | (fillColor >> 16 & 255 & 255) << 16 | (fillColor >> 8 & 255 & 255) << 8 | 255;
		hitColor = (hitColor >> 24 & 255 & 255) << 24 | (hitColor >> 16 & 255 & 255) << 16 | (hitColor >> 8 & 255 & 255) << 8 | 255;
	}
	if(fillColor == hitColor) {
		return;
	}
	var dx = [0,-1,1,0];
	var dy = [-1,0,0,1];
	var minX = -image.offsetX;
	var minY = -image.offsetY;
	var maxX = minX + image.width;
	var maxY = minY + image.height;
	var queue = [];
	queue.push(x);
	queue.push(y);
	var curPointX;
	var curPointY;
	var nextPointX;
	var nextPointY;
	var nextPointOffset;
	var readColor;
	while(queue.length > 0) {
		curPointY = queue.pop();
		curPointX = queue.pop();
		var _g = 0;
		while(_g < 4) {
			var i = _g++;
			nextPointX = curPointX + dx[i];
			nextPointY = curPointY + dy[i];
			if(nextPointX < minX || nextPointY < minY || nextPointX >= maxX || nextPointY >= maxY) {
				continue;
			}
			nextPointOffset = (nextPointY * image.width + nextPointX) * 4;
			switch(format1) {
			case 0:
				readColor = (data[nextPointOffset] & 255) << 24 | (data[nextPointOffset + 1] & 255) << 16 | (data[nextPointOffset + 2] & 255) << 8 | data[nextPointOffset + 3] & 255;
				break;
			case 1:
				readColor = (data[nextPointOffset + 1] & 255) << 24 | (data[nextPointOffset + 2] & 255) << 16 | (data[nextPointOffset + 3] & 255) << 8 | data[nextPointOffset] & 255;
				break;
			case 2:
				readColor = (data[nextPointOffset + 2] & 255) << 24 | (data[nextPointOffset + 1] & 255) << 16 | (data[nextPointOffset] & 255) << 8 | data[nextPointOffset + 3] & 255;
				break;
			}
			if(premultiplied) {
				if((readColor & 255) != 0 && (readColor & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (readColor & 255);
					readColor = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((readColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((readColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((readColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | readColor & 255 & 255;
				}
			}
			if(readColor == hitColor) {
				if(premultiplied) {
					if((fillColor & 255) == 0) {
						if(fillColor != 0) {
							fillColor = 0;
						}
					} else if((fillColor & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[fillColor & 255];
						fillColor = ((fillColor >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((fillColor >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((fillColor >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | fillColor & 255 & 255;
					}
				}
				switch(format1) {
				case 0:
					data[nextPointOffset] = fillColor >> 24 & 255;
					data[nextPointOffset + 1] = fillColor >> 16 & 255;
					data[nextPointOffset + 2] = fillColor >> 8 & 255;
					data[nextPointOffset + 3] = fillColor & 255;
					break;
				case 1:
					data[nextPointOffset] = fillColor & 255;
					data[nextPointOffset + 1] = fillColor >> 24 & 255;
					data[nextPointOffset + 2] = fillColor >> 16 & 255;
					data[nextPointOffset + 3] = fillColor >> 8 & 255;
					break;
				case 2:
					data[nextPointOffset] = fillColor >> 8 & 255;
					data[nextPointOffset + 1] = fillColor >> 16 & 255;
					data[nextPointOffset + 2] = fillColor >> 24 & 255;
					data[nextPointOffset + 3] = fillColor & 255;
					break;
				}
				queue.push(nextPointX);
				queue.push(nextPointY);
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.getColorBoundsRect = function(image,mask,color,findColor,format) {
	if(findColor == null) {
		findColor = true;
	}
	var left = image.width + 1;
	var right = 0;
	var top = image.height + 1;
	var bottom = 0;
	var _color;
	var _mask;
	switch(format) {
	case 1:
		var argb = color;
		var rgba = 0;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		_color = rgba;
		var argb1 = mask;
		var rgba1 = 0;
		rgba1 = (argb1 >> 16 & 255 & 255) << 24 | (argb1 >> 8 & 255 & 255) << 16 | (argb1 & 255 & 255) << 8 | argb1 >> 24 & 255 & 255;
		_mask = rgba1;
		break;
	case 2:
		var bgra = color;
		var rgba2 = 0;
		rgba2 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		_color = rgba2;
		var bgra1 = mask;
		var rgba3 = 0;
		rgba3 = (bgra1 >> 8 & 255 & 255) << 24 | (bgra1 >> 16 & 255 & 255) << 16 | (bgra1 >> 24 & 255 & 255) << 8 | bgra1 & 255 & 255;
		_mask = rgba3;
		break;
	default:
		_color = color;
		_mask = mask;
	}
	if(!image.get_transparent()) {
		_color = (_color >> 24 & 255 & 255) << 24 | (_color >> 16 & 255 & 255) << 16 | (_color >> 8 & 255 & 255) << 8 | 255;
		_mask = (_mask >> 24 & 255 & 255) << 24 | (_mask >> 16 & 255 & 255) << 16 | (_mask >> 8 & 255 & 255) << 8 | 255;
	}
	var pixel;
	var hit;
	var _g1 = 0;
	var _g = image.width;
	while(_g1 < _g) {
		var x = _g1++;
		hit = false;
		var _g3 = 0;
		var _g2 = image.height;
		while(_g3 < _g2) {
			pixel = image.getPixel32(x,_g3++,0);
			if(findColor) {
				hit = (pixel & _mask) == _color;
			} else {
				hit = (pixel & _mask) != _color;
			}
			if(hit) {
				if(x < left) {
					left = x;
				}
				break;
			}
		}
		if(hit) {
			break;
		}
	}
	var ix;
	var _g11 = 0;
	var _g4 = image.width;
	while(_g11 < _g4) {
		ix = image.width - 1 - _g11++;
		hit = false;
		var _g31 = 0;
		var _g21 = image.height;
		while(_g31 < _g21) {
			pixel = image.getPixel32(ix,_g31++,0);
			if(findColor) {
				hit = (pixel & _mask) == _color;
			} else {
				hit = (pixel & _mask) != _color;
			}
			if(hit) {
				if(ix > right) {
					right = ix;
				}
				break;
			}
		}
		if(hit) {
			break;
		}
	}
	var _g12 = 0;
	var _g5 = image.height;
	while(_g12 < _g5) {
		var y = _g12++;
		hit = false;
		var _g32 = 0;
		var _g22 = image.width;
		while(_g32 < _g22) {
			pixel = image.getPixel32(_g32++,y,0);
			if(findColor) {
				hit = (pixel & _mask) == _color;
			} else {
				hit = (pixel & _mask) != _color;
			}
			if(hit) {
				if(y < top) {
					top = y;
				}
				break;
			}
		}
		if(hit) {
			break;
		}
	}
	var iy;
	var _g13 = 0;
	var _g6 = image.height;
	while(_g13 < _g6) {
		iy = image.height - 1 - _g13++;
		hit = false;
		var _g33 = 0;
		var _g23 = image.width;
		while(_g33 < _g23) {
			pixel = image.getPixel32(_g33++,iy,0);
			if(findColor) {
				hit = (pixel & _mask) == _color;
			} else {
				hit = (pixel & _mask) != _color;
			}
			if(hit) {
				if(iy > bottom) {
					bottom = iy;
				}
				break;
			}
		}
		if(hit) {
			break;
		}
	}
	var w = right - left;
	var h = bottom - top;
	if(w > 0) {
		++w;
	}
	if(h > 0) {
		++h;
	}
	if(w < 0) {
		w = 0;
	}
	if(h < 0) {
		h = 0;
	}
	if(left == right) {
		w = 1;
	}
	if(top == bottom) {
		h = 1;
	}
	if(left > image.width) {
		left = 0;
	}
	if(top > image.height) {
		top = 0;
	}
	return new lime_math_Rectangle(left,top,w,h);
};
lime_graphics_utils_ImageDataUtil.getPixel = function(image,x,y,format) {
	var pixel;
	var data = image.buffer.data;
	var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	var premultiplied = image.buffer.premultiplied;
	switch(image.buffer.format) {
	case 0:
		pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((pixel & 255) != 0 && (pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
			pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
		}
	}
	pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | 0;
	switch(format) {
	case 1:
		var argb = 0;
		argb = (pixel & 255 & 255) << 24 | (pixel >> 24 & 255 & 255) << 16 | (pixel >> 16 & 255 & 255) << 8 | pixel >> 8 & 255 & 255;
		return argb;
	case 2:
		var bgra = 0;
		bgra = (pixel >> 8 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 24 & 255 & 255) << 8 | pixel & 255 & 255;
		return bgra;
	default:
		return pixel;
	}
};
lime_graphics_utils_ImageDataUtil.getPixel32 = function(image,x,y,format) {
	var pixel;
	var data = image.buffer.data;
	var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	var premultiplied = image.buffer.premultiplied;
	switch(image.buffer.format) {
	case 0:
		pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((pixel & 255) != 0 && (pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
			pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
		}
	}
	switch(format) {
	case 1:
		var argb = 0;
		argb = (pixel & 255 & 255) << 24 | (pixel >> 24 & 255 & 255) << 16 | (pixel >> 16 & 255 & 255) << 8 | pixel >> 8 & 255 & 255;
		return argb;
	case 2:
		var bgra = 0;
		bgra = (pixel >> 8 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 24 & 255 & 255) << 8 | pixel & 255 & 255;
		return bgra;
	default:
		return pixel;
	}
};
lime_graphics_utils_ImageDataUtil.getPixels = function(image,rect,format) {
	if(image.buffer.data == null) {
		return null;
	}
	var bytes = new haxe_io_Bytes(new ArrayBuffer((rect.width * rect.height | 0) * 4));
	var data = image.buffer.data;
	var sourceFormat = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
	var position;
	var argb;
	var bgra;
	var pixel;
	var destPosition = 0;
	var _g1 = 0;
	var _g = dataView.height;
	while(_g1 < _g) {
		position = dataView.offset + dataView.stride * _g1++;
		var _g3 = 0;
		var _g2 = dataView.width;
		while(_g3 < _g2) {
			++_g3;
			switch(sourceFormat) {
			case 0:
				pixel = (data[position] & 255) << 24 | (data[position + 1] & 255) << 16 | (data[position + 2] & 255) << 8 | data[position + 3] & 255;
				break;
			case 1:
				pixel = (data[position + 1] & 255) << 24 | (data[position + 2] & 255) << 16 | (data[position + 3] & 255) << 8 | data[position] & 255;
				break;
			case 2:
				pixel = (data[position + 2] & 255) << 24 | (data[position + 1] & 255) << 16 | (data[position] & 255) << 8 | data[position + 3] & 255;
				break;
			}
			if(premultiplied) {
				if((pixel & 255) != 0 && (pixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
					pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
				}
			}
			switch(format) {
			case 1:
				var argb1 = 0;
				argb1 = (pixel & 255 & 255) << 24 | (pixel >> 24 & 255 & 255) << 16 | (pixel >> 16 & 255 & 255) << 8 | pixel >> 8 & 255 & 255;
				argb = argb1;
				pixel = argb;
				break;
			case 2:
				var bgra1 = 0;
				bgra1 = (pixel >> 8 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 24 & 255 & 255) << 8 | pixel & 255 & 255;
				bgra = bgra1;
				pixel = bgra;
				break;
			default:
			}
			bytes.b[destPosition++] = pixel >> 24 & 255 & 255;
			bytes.b[destPosition++] = pixel >> 16 & 255 & 255;
			bytes.b[destPosition++] = pixel >> 8 & 255 & 255;
			bytes.b[destPosition++] = pixel & 255 & 255;
			position += 4;
		}
	}
	return bytes;
};
lime_graphics_utils_ImageDataUtil.merge = function(image,sourceImage,sourceRect,destPoint,redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) {
	if(image.buffer.data == null || sourceImage.buffer.data == null) {
		return;
	}
	var sourceView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
	var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,sourceView.width,sourceView.height));
	var sourceData = sourceImage.buffer.data;
	var destData = image.buffer.data;
	var sourceFormat = sourceImage.buffer.format;
	var destFormat = image.buffer.format;
	var sourcePremultiplied = sourceImage.buffer.premultiplied;
	var destPremultiplied = image.buffer.premultiplied;
	var sourcePosition;
	var destPosition;
	var sourcePixel;
	var destPixel;
	var _g1 = 0;
	var _g = destView.height;
	while(_g1 < _g) {
		var y = _g1++;
		sourcePosition = sourceView.offset + sourceView.stride * y;
		destPosition = destView.offset + destView.stride * y;
		var _g3 = 0;
		var _g2 = destView.width;
		while(_g3 < _g2) {
			++_g3;
			switch(sourceFormat) {
			case 0:
				sourcePixel = (sourceData[sourcePosition] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition + 2] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
				break;
			case 1:
				sourcePixel = (sourceData[sourcePosition + 1] & 255) << 24 | (sourceData[sourcePosition + 2] & 255) << 16 | (sourceData[sourcePosition + 3] & 255) << 8 | sourceData[sourcePosition] & 255;
				break;
			case 2:
				sourcePixel = (sourceData[sourcePosition + 2] & 255) << 24 | (sourceData[sourcePosition + 1] & 255) << 16 | (sourceData[sourcePosition] & 255) << 8 | sourceData[sourcePosition + 3] & 255;
				break;
			}
			if(sourcePremultiplied) {
				if((sourcePixel & 255) != 0 && (sourcePixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (sourcePixel & 255);
					sourcePixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((sourcePixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | sourcePixel & 255 & 255;
				}
			}
			switch(destFormat) {
			case 0:
				destPixel = (destData[destPosition] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition + 2] & 255) << 8 | destData[destPosition + 3] & 255;
				break;
			case 1:
				destPixel = (destData[destPosition + 1] & 255) << 24 | (destData[destPosition + 2] & 255) << 16 | (destData[destPosition + 3] & 255) << 8 | destData[destPosition] & 255;
				break;
			case 2:
				destPixel = (destData[destPosition + 2] & 255) << 24 | (destData[destPosition + 1] & 255) << 16 | (destData[destPosition] & 255) << 8 | destData[destPosition + 3] & 255;
				break;
			}
			if(destPremultiplied) {
				if((destPixel & 255) != 0 && (destPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (destPixel & 255);
					destPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | destPixel & 255 & 255;
				}
			}
			destPixel = ((((sourcePixel >> 24 & 255) * redMultiplier + (destPixel >> 24 & 255) * (256 - redMultiplier)) / 256 | 0) & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
			destPixel = (destPixel >> 24 & 255 & 255) << 24 | ((((sourcePixel >> 16 & 255) * greenMultiplier + (destPixel >> 16 & 255) * (256 - greenMultiplier)) / 256 | 0) & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | destPixel & 255 & 255;
			destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | ((((sourcePixel >> 8 & 255) * blueMultiplier + (destPixel >> 8 & 255) * (256 - blueMultiplier)) / 256 | 0) & 255) << 8 | destPixel & 255 & 255;
			destPixel = (destPixel >> 24 & 255 & 255) << 24 | (destPixel >> 16 & 255 & 255) << 16 | (destPixel >> 8 & 255 & 255) << 8 | (((sourcePixel & 255) * alphaMultiplier + (destPixel & 255) * (256 - alphaMultiplier)) / 256 | 0) & 255;
			if(destPremultiplied) {
				if((destPixel & 255) == 0) {
					if(destPixel != 0) {
						destPixel = 0;
					}
				} else if((destPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[destPixel & 255];
					destPixel = ((destPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((destPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((destPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | destPixel & 255 & 255;
				}
			}
			switch(destFormat) {
			case 0:
				destData[destPosition] = destPixel >> 24 & 255;
				destData[destPosition + 1] = destPixel >> 16 & 255;
				destData[destPosition + 2] = destPixel >> 8 & 255;
				destData[destPosition + 3] = destPixel & 255;
				break;
			case 1:
				destData[destPosition] = destPixel & 255;
				destData[destPosition + 1] = destPixel >> 24 & 255;
				destData[destPosition + 2] = destPixel >> 16 & 255;
				destData[destPosition + 3] = destPixel >> 8 & 255;
				break;
			case 2:
				destData[destPosition] = destPixel >> 8 & 255;
				destData[destPosition + 1] = destPixel >> 16 & 255;
				destData[destPosition + 2] = destPixel >> 24 & 255;
				destData[destPosition + 3] = destPixel & 255;
				break;
			}
			sourcePosition += 4;
			destPosition += 4;
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.multiplyAlpha = function(image) {
	var data = image.buffer.data;
	if(data == null || !image.buffer.transparent) {
		return;
	}
	var format = image.buffer.format;
	var length = data.length / 4 | 0;
	var pixel;
	var _g1 = 0;
	while(_g1 < length) {
		var i = _g1++;
		var offset = i * 4;
		switch(format) {
		case 0:
			pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
			break;
		case 1:
			pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
			break;
		case 2:
			pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
			break;
		}
		var offset1 = i * 4;
		if((pixel & 255) == 0) {
			if(pixel != 0) {
				pixel = 0;
			}
		} else if((pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
			pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
		}
		switch(format) {
		case 0:
			data[offset1] = pixel >> 24 & 255;
			data[offset1 + 1] = pixel >> 16 & 255;
			data[offset1 + 2] = pixel >> 8 & 255;
			data[offset1 + 3] = pixel & 255;
			break;
		case 1:
			data[offset1] = pixel & 255;
			data[offset1 + 1] = pixel >> 24 & 255;
			data[offset1 + 2] = pixel >> 16 & 255;
			data[offset1 + 3] = pixel >> 8 & 255;
			break;
		case 2:
			data[offset1] = pixel >> 8 & 255;
			data[offset1 + 1] = pixel >> 16 & 255;
			data[offset1 + 2] = pixel >> 24 & 255;
			data[offset1 + 3] = pixel & 255;
			break;
		}
	}
	image.buffer.premultiplied = true;
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.resize = function(image,newWidth,newHeight) {
	var buffer = image.buffer;
	if(buffer.width == newWidth && buffer.height == newHeight) {
		return;
	}
	var elements = newWidth * newHeight * 4;
	var this1;
	if(elements != null) {
		this1 = new Uint8Array(elements);
	} else {
		this1 = null;
	}
	var newBuffer = new lime_graphics_ImageBuffer(this1,newWidth,newHeight);
	var imageWidth = image.width;
	var imageHeight = image.height;
	var data = image.get_data();
	var newData = newBuffer.data;
	var sourceIndex;
	var sourceIndexX;
	var sourceIndexY;
	var sourceIndexXY;
	var index;
	var sourceX;
	var sourceY;
	var u;
	var v;
	var uRatio;
	var vRatio;
	var uOpposite;
	var vOpposite;
	var _g1 = 0;
	while(_g1 < newHeight) {
		var y = _g1++;
		var _g3 = 0;
		while(_g3 < newWidth) {
			var x = _g3++;
			u = (x + 0.5) / newWidth * imageWidth - 0.5;
			v = (y + 0.5) / newHeight * imageHeight - 0.5;
			sourceX = u | 0;
			sourceY = v | 0;
			sourceIndex = (sourceY * imageWidth + sourceX) * 4;
			if(sourceX < imageWidth - 1) {
				sourceIndexX = sourceIndex + 4;
			} else {
				sourceIndexX = sourceIndex;
			}
			if(sourceY < imageHeight - 1) {
				sourceIndexY = sourceIndex + imageWidth * 4;
			} else {
				sourceIndexY = sourceIndex;
			}
			if(sourceIndexX != sourceIndex) {
				sourceIndexXY = sourceIndexY + 4;
			} else {
				sourceIndexXY = sourceIndexY;
			}
			index = (y * newWidth + x) * 4;
			uRatio = u - sourceX;
			vRatio = v - sourceY;
			uOpposite = 1 - uRatio;
			vOpposite = 1 - vRatio;
			newData[index] = (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndex]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexX]) * uRatio) * vOpposite + (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndexY]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexXY]) * uRatio) * vRatio | 0;
			newData[index + 1] = (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndex + 1]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexX + 1]) * uRatio) * vOpposite + (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndexY + 1]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexXY + 1]) * uRatio) * vRatio | 0;
			newData[index + 2] = (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndex + 2]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexX + 2]) * uRatio) * vOpposite + (_$UInt_UInt_$Impl_$.toFloat(data[sourceIndexY + 2]) * uOpposite + _$UInt_UInt_$Impl_$.toFloat(data[sourceIndexXY + 2]) * uRatio) * vRatio | 0;
			if(data[sourceIndexX + 3] == 0 || data[sourceIndexY + 3] == 0 || data[sourceIndexXY + 3] == 0) {
				newData[index + 3] = 0;
			} else {
				newData[index + 3] = data[sourceIndex + 3];
			}
		}
	}
	buffer.data = newBuffer.data;
	buffer.width = newWidth;
	buffer.height = newHeight;
};
lime_graphics_utils_ImageDataUtil.resizeBuffer = function(image,newWidth,newHeight) {
	var buffer = image.buffer;
	var data = image.get_data();
	var elements = newWidth * newHeight * 4;
	var this1;
	if(elements != null) {
		this1 = new Uint8Array(elements);
	} else {
		this1 = null;
	}
	var newData = this1;
	var sourceIndex;
	var index;
	var _g1 = 0;
	var _g = buffer.height;
	while(_g1 < _g) {
		var y = _g1++;
		var _g3 = 0;
		var _g2 = buffer.width;
		while(_g3 < _g2) {
			var x = _g3++;
			sourceIndex = (y * buffer.width + x) * 4;
			index = (y * newWidth + x) * 4;
			newData[index] = data[sourceIndex];
			newData[index + 1] = data[sourceIndex + 1];
			newData[index + 2] = data[sourceIndex + 2];
			newData[index + 3] = data[sourceIndex + 3];
		}
	}
	buffer.data = newData;
	buffer.width = newWidth;
	buffer.height = newHeight;
};
lime_graphics_utils_ImageDataUtil.setFormat = function(image,format) {
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	var index;
	var length = data.length / 4 | 0;
	var r1;
	var g1;
	var b1;
	var a1;
	var r2;
	var g2;
	var b2;
	var a2;
	var r;
	var g;
	var b;
	var a;
	switch(image.get_format()) {
	case 0:
		r1 = 0;
		g1 = 1;
		b1 = 2;
		a1 = 3;
		break;
	case 1:
		r1 = 1;
		g1 = 2;
		b1 = 3;
		a1 = 0;
		break;
	case 2:
		r1 = 2;
		g1 = 1;
		b1 = 0;
		a1 = 3;
		break;
	}
	switch(format) {
	case 0:
		r2 = 0;
		g2 = 1;
		b2 = 2;
		a2 = 3;
		break;
	case 1:
		r2 = 1;
		g2 = 2;
		b2 = 3;
		a2 = 0;
		break;
	case 2:
		r2 = 2;
		g2 = 1;
		b2 = 0;
		a2 = 3;
		break;
	}
	var _g2 = 0;
	while(_g2 < length) {
		index = _g2++ * 4;
		r = data[index + r1];
		g = data[index + g1];
		b = data[index + b1];
		a = data[index + a1];
		data[index + r2] = r;
		data[index + g2] = g;
		data[index + b2] = b;
		data[index + a2] = a;
	}
	image.buffer.format = format;
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.setPixel = function(image,x,y,color,format) {
	var pixel;
	switch(format) {
	case 1:
		var argb = color;
		var rgba = 0;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		pixel = rgba;
		break;
	case 2:
		var bgra = color;
		var rgba1 = 0;
		rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		pixel = rgba1;
		break;
	default:
		pixel = color;
	}
	var source = 0;
	var data = image.buffer.data;
	var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	var premultiplied = image.buffer.premultiplied;
	switch(image.buffer.format) {
	case 0:
		source = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		source = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		source = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((source & 255) != 0 && (source & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (source & 255);
			source = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((source >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((source >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((source >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | source & 255 & 255;
		}
	}
	pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | source & 255 & 255;
	var data1 = image.buffer.data;
	var offset1 = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	if(image.buffer.premultiplied) {
		if((pixel & 255) == 0) {
			if(pixel != 0) {
				pixel = 0;
			}
		} else if((pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
			pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
		}
	}
	switch(image.buffer.format) {
	case 0:
		data1[offset1] = pixel >> 24 & 255;
		data1[offset1 + 1] = pixel >> 16 & 255;
		data1[offset1 + 2] = pixel >> 8 & 255;
		data1[offset1 + 3] = pixel & 255;
		break;
	case 1:
		data1[offset1] = pixel & 255;
		data1[offset1 + 1] = pixel >> 24 & 255;
		data1[offset1 + 2] = pixel >> 16 & 255;
		data1[offset1 + 3] = pixel >> 8 & 255;
		break;
	case 2:
		data1[offset1] = pixel >> 8 & 255;
		data1[offset1 + 1] = pixel >> 16 & 255;
		data1[offset1 + 2] = pixel >> 24 & 255;
		data1[offset1 + 3] = pixel & 255;
		break;
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.setPixel32 = function(image,x,y,color,format) {
	var pixel;
	switch(format) {
	case 1:
		var argb = color;
		var rgba = 0;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		pixel = rgba;
		break;
	case 2:
		var bgra = color;
		var rgba1 = 0;
		rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		pixel = rgba1;
		break;
	default:
		pixel = color;
	}
	if(!image.get_transparent()) {
		pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | 255;
	}
	var data = image.buffer.data;
	var offset = 4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4;
	if(image.buffer.premultiplied) {
		if((pixel & 255) == 0) {
			if(pixel != 0) {
				pixel = 0;
			}
		} else if((pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
			pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
		}
	}
	switch(image.buffer.format) {
	case 0:
		data[offset] = pixel >> 24 & 255;
		data[offset + 1] = pixel >> 16 & 255;
		data[offset + 2] = pixel >> 8 & 255;
		data[offset + 3] = pixel & 255;
		break;
	case 1:
		data[offset] = pixel & 255;
		data[offset + 1] = pixel >> 24 & 255;
		data[offset + 2] = pixel >> 16 & 255;
		data[offset + 3] = pixel >> 8 & 255;
		break;
	case 2:
		data[offset] = pixel >> 8 & 255;
		data[offset + 1] = pixel >> 16 & 255;
		data[offset + 2] = pixel >> 24 & 255;
		data[offset + 3] = pixel & 255;
		break;
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.setPixels = function(image,rect,bytes,format) {
	if(image.buffer.data == null) {
		return;
	}
	var data = image.buffer.data;
	var sourceFormat = image.buffer.format;
	var premultiplied = image.buffer.premultiplied;
	var dataView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,rect);
	var row;
	var color;
	var pixel;
	var transparent = image.get_transparent();
	var dataPosition = 0;
	var _g1 = 0;
	var _g = dataView.height;
	while(_g1 < _g) {
		row = dataView.offset + dataView.stride * _g1++;
		var _g3 = 0;
		var _g2 = dataView.width;
		while(_g3 < _g2) {
			var x = _g3++;
			color = bytes.b[dataPosition + 3] | bytes.b[dataPosition + 2] << 8 | bytes.b[dataPosition + 1] << 16 | bytes.b[dataPosition] << 24;
			dataPosition += 4;
			switch(format) {
			case 1:
				var argb = color;
				var rgba = 0;
				rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
				pixel = rgba;
				break;
			case 2:
				var bgra = color;
				var rgba1 = 0;
				rgba1 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
				pixel = rgba1;
				break;
			default:
				pixel = color;
			}
			if(!transparent) {
				pixel = (pixel >> 24 & 255 & 255) << 24 | (pixel >> 16 & 255 & 255) << 16 | (pixel >> 8 & 255 & 255) << 8 | 255;
			}
			var offset = row + x * 4;
			if(premultiplied) {
				if((pixel & 255) == 0) {
					if(pixel != 0) {
						pixel = 0;
					}
				} else if((pixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[pixel & 255];
					pixel = ((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | pixel & 255 & 255;
				}
			}
			switch(sourceFormat) {
			case 0:
				data[offset] = pixel >> 24 & 255;
				data[offset + 1] = pixel >> 16 & 255;
				data[offset + 2] = pixel >> 8 & 255;
				data[offset + 3] = pixel & 255;
				break;
			case 1:
				data[offset] = pixel & 255;
				data[offset + 1] = pixel >> 24 & 255;
				data[offset + 2] = pixel >> 16 & 255;
				data[offset + 3] = pixel >> 8 & 255;
				break;
			case 2:
				data[offset] = pixel >> 8 & 255;
				data[offset + 1] = pixel >> 16 & 255;
				data[offset + 2] = pixel >> 24 & 255;
				data[offset + 3] = pixel & 255;
				break;
			}
		}
	}
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.threshold = function(image,sourceImage,sourceRect,destPoint,operation,threshold,color,mask,copySource,format) {
	var _color;
	var _mask;
	var _threshold;
	switch(format) {
	case 1:
		var argb = color;
		var rgba = 0;
		rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
		_color = rgba;
		var argb1 = mask;
		var rgba1 = 0;
		rgba1 = (argb1 >> 16 & 255 & 255) << 24 | (argb1 >> 8 & 255 & 255) << 16 | (argb1 & 255 & 255) << 8 | argb1 >> 24 & 255 & 255;
		_mask = rgba1;
		var argb2 = threshold;
		var rgba2 = 0;
		rgba2 = (argb2 >> 16 & 255 & 255) << 24 | (argb2 >> 8 & 255 & 255) << 16 | (argb2 & 255 & 255) << 8 | argb2 >> 24 & 255 & 255;
		_threshold = rgba2;
		break;
	case 2:
		var bgra = color;
		var rgba3 = 0;
		rgba3 = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
		_color = rgba3;
		var bgra1 = mask;
		var rgba4 = 0;
		rgba4 = (bgra1 >> 8 & 255 & 255) << 24 | (bgra1 >> 16 & 255 & 255) << 16 | (bgra1 >> 24 & 255 & 255) << 8 | bgra1 & 255 & 255;
		_mask = rgba4;
		var bgra2 = threshold;
		var rgba5 = 0;
		rgba5 = (bgra2 >> 8 & 255 & 255) << 24 | (bgra2 >> 16 & 255 & 255) << 16 | (bgra2 >> 24 & 255 & 255) << 8 | bgra2 & 255 & 255;
		_threshold = rgba5;
		break;
	default:
		_color = color;
		_mask = mask;
		_threshold = threshold;
	}
	var _operation;
	switch(operation) {
	case "!=":
		_operation = 0;
		break;
	case "<":
		_operation = 2;
		break;
	case "<=":
		_operation = 3;
		break;
	case "==":
		_operation = 1;
		break;
	case ">":
		_operation = 4;
		break;
	case ">=":
		_operation = 5;
		break;
	default:
		_operation = -1;
	}
	if(_operation == -1) {
		return 0;
	}
	var srcData = sourceImage.buffer.data;
	var destData = image.buffer.data;
	if(srcData == null || destData == null) {
		return 0;
	}
	var hits = 0;
	var srcView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(sourceImage,sourceRect);
	var destView = new lime_graphics_utils__$ImageDataUtil_ImageDataView(image,new lime_math_Rectangle(destPoint.x,destPoint.y,srcView.width,srcView.height));
	var srcFormat = sourceImage.buffer.format;
	var destFormat = image.buffer.format;
	var srcPremultiplied = sourceImage.buffer.premultiplied;
	var destPremultiplied = image.buffer.premultiplied;
	var srcPosition;
	var destPosition;
	var srcPixel;
	var pixelMask;
	var test;
	var value;
	var _g1 = 0;
	var _g = destView.height;
	while(_g1 < _g) {
		var y = _g1++;
		srcPosition = srcView.offset + srcView.stride * y;
		destPosition = destView.offset + destView.stride * y;
		var _g3 = 0;
		var _g2 = destView.width;
		while(_g3 < _g2) {
			++_g3;
			switch(srcFormat) {
			case 0:
				srcPixel = (srcData[srcPosition] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition + 2] & 255) << 8 | srcData[srcPosition + 3] & 255;
				break;
			case 1:
				srcPixel = (srcData[srcPosition + 1] & 255) << 24 | (srcData[srcPosition + 2] & 255) << 16 | (srcData[srcPosition + 3] & 255) << 8 | srcData[srcPosition] & 255;
				break;
			case 2:
				srcPixel = (srcData[srcPosition + 2] & 255) << 24 | (srcData[srcPosition + 1] & 255) << 16 | (srcData[srcPosition] & 255) << 8 | srcData[srcPosition + 3] & 255;
				break;
			}
			if(srcPremultiplied) {
				if((srcPixel & 255) != 0 && (srcPixel & 255) != 255) {
					lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (srcPixel & 255);
					srcPixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((srcPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | srcPixel & 255 & 255;
				}
			}
			pixelMask = srcPixel & _mask;
			var tmp1;
			var tmp2;
			tmp1 = pixelMask >> 24 & 255;
			tmp2 = _threshold >> 24 & 255;
			if(tmp1 != tmp2) {
				if(tmp1 > tmp2) {
					value = 1;
				} else {
					value = -1;
				}
			} else {
				tmp1 = pixelMask >> 16 & 255;
				tmp2 = _threshold >> 16 & 255;
				if(tmp1 != tmp2) {
					if(tmp1 > tmp2) {
						value = 1;
					} else {
						value = -1;
					}
				} else {
					tmp1 = pixelMask >> 8 & 255;
					tmp2 = _threshold >> 8 & 255;
					if(tmp1 != tmp2) {
						if(tmp1 > tmp2) {
							value = 1;
						} else {
							value = -1;
						}
					} else {
						tmp1 = pixelMask & 255;
						tmp2 = _threshold & 255;
						if(tmp1 != tmp2) {
							if(tmp1 > tmp2) {
								value = 1;
							} else {
								value = -1;
							}
						} else {
							value = 0;
						}
					}
				}
			}
			switch(_operation) {
			case 0:
				test = value != 0;
				break;
			case 1:
				test = value == 0;
				break;
			case 2:
				test = value == -1;
				break;
			case 3:
				if(value != 0) {
					test = value == -1;
				} else {
					test = true;
				}
				break;
			case 4:
				test = value == 1;
				break;
			case 5:
				if(value != 0) {
					test = value == 1;
				} else {
					test = true;
				}
				break;
			default:
				test = false;
			}
			if(test) {
				if(destPremultiplied) {
					if((_color & 255) == 0) {
						if(_color != 0) {
							_color = 0;
						}
					} else if((_color & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[_color & 255];
						_color = ((_color >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((_color >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((_color >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | _color & 255 & 255;
					}
				}
				switch(destFormat) {
				case 0:
					destData[destPosition] = _color >> 24 & 255;
					destData[destPosition + 1] = _color >> 16 & 255;
					destData[destPosition + 2] = _color >> 8 & 255;
					destData[destPosition + 3] = _color & 255;
					break;
				case 1:
					destData[destPosition] = _color & 255;
					destData[destPosition + 1] = _color >> 24 & 255;
					destData[destPosition + 2] = _color >> 16 & 255;
					destData[destPosition + 3] = _color >> 8 & 255;
					break;
				case 2:
					destData[destPosition] = _color >> 8 & 255;
					destData[destPosition + 1] = _color >> 16 & 255;
					destData[destPosition + 2] = _color >> 24 & 255;
					destData[destPosition + 3] = _color & 255;
					break;
				}
				++hits;
			} else if(copySource) {
				if(destPremultiplied) {
					if((srcPixel & 255) == 0) {
						if(srcPixel != 0) {
							srcPixel = 0;
						}
					} else if((srcPixel & 255) != 255) {
						lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[srcPixel & 255];
						srcPixel = ((srcPixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((srcPixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((srcPixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | srcPixel & 255 & 255;
					}
				}
				switch(destFormat) {
				case 0:
					destData[destPosition] = srcPixel >> 24 & 255;
					destData[destPosition + 1] = srcPixel >> 16 & 255;
					destData[destPosition + 2] = srcPixel >> 8 & 255;
					destData[destPosition + 3] = srcPixel & 255;
					break;
				case 1:
					destData[destPosition] = srcPixel & 255;
					destData[destPosition + 1] = srcPixel >> 24 & 255;
					destData[destPosition + 2] = srcPixel >> 16 & 255;
					destData[destPosition + 3] = srcPixel >> 8 & 255;
					break;
				case 2:
					destData[destPosition] = srcPixel >> 8 & 255;
					destData[destPosition + 1] = srcPixel >> 16 & 255;
					destData[destPosition + 2] = srcPixel >> 24 & 255;
					destData[destPosition + 3] = srcPixel & 255;
					break;
				}
			}
			srcPosition += 4;
			destPosition += 4;
		}
	}
	if(hits > 0) {
		image.dirty = true;
	}
	return hits;
};
lime_graphics_utils_ImageDataUtil.unmultiplyAlpha = function(image) {
	var data = image.buffer.data;
	if(data == null) {
		return;
	}
	var format = image.buffer.format;
	var length = data.length / 4 | 0;
	var pixel;
	var _g1 = 0;
	while(_g1 < length) {
		var i = _g1++;
		var offset = i * 4;
		switch(format) {
		case 0:
			pixel = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
			break;
		case 1:
			pixel = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
			break;
		case 2:
			pixel = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
			break;
		}
		if((pixel & 255) != 0 && (pixel & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (pixel & 255);
			pixel = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((pixel >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | pixel & 255 & 255;
		}
		var offset1 = i * 4;
		switch(format) {
		case 0:
			data[offset1] = pixel >> 24 & 255;
			data[offset1 + 1] = pixel >> 16 & 255;
			data[offset1 + 2] = pixel >> 8 & 255;
			data[offset1 + 3] = pixel & 255;
			break;
		case 1:
			data[offset1] = pixel & 255;
			data[offset1 + 1] = pixel >> 24 & 255;
			data[offset1 + 2] = pixel >> 16 & 255;
			data[offset1 + 3] = pixel >> 8 & 255;
			break;
		case 2:
			data[offset1] = pixel >> 8 & 255;
			data[offset1 + 1] = pixel >> 16 & 255;
			data[offset1 + 2] = pixel >> 24 & 255;
			data[offset1 + 3] = pixel & 255;
			break;
		}
	}
	image.buffer.premultiplied = false;
	image.dirty = true;
};
lime_graphics_utils_ImageDataUtil.__pixelCompare = function(n1,n2) {
	var tmp1;
	var tmp2;
	tmp1 = n1 >> 24 & 255;
	tmp2 = n2 >> 24 & 255;
	if(tmp1 != tmp2) {
		if(tmp1 > tmp2) {
			return 1;
		} else {
			return -1;
		}
	} else {
		tmp1 = n1 >> 16 & 255;
		tmp2 = n2 >> 16 & 255;
		if(tmp1 != tmp2) {
			if(tmp1 > tmp2) {
				return 1;
			} else {
				return -1;
			}
		} else {
			tmp1 = n1 >> 8 & 255;
			tmp2 = n2 >> 8 & 255;
			if(tmp1 != tmp2) {
				if(tmp1 > tmp2) {
					return 1;
				} else {
					return -1;
				}
			} else {
				tmp1 = n1 & 255;
				tmp2 = n2 & 255;
				if(tmp1 != tmp2) {
					if(tmp1 > tmp2) {
						return 1;
					} else {
						return -1;
					}
				} else {
					return 0;
				}
			}
		}
	}
};
var lime_graphics_utils__$ImageDataUtil_ImageDataView = function(image,rect) {
	this.image = image;
	if(rect == null) {
		this.rect = image.get_rect();
	} else {
		if(rect.x < 0) {
			rect.x = 0;
		}
		if(rect.y < 0) {
			rect.y = 0;
		}
		if(rect.x + rect.width > image.width) {
			rect.width = image.width - rect.x;
		}
		if(rect.y + rect.height > image.height) {
			rect.height = image.height - rect.y;
		}
		if(rect.width < 0) {
			rect.width = 0;
		}
		if(rect.height < 0) {
			rect.height = 0;
		}
		this.rect = rect;
	}
	this.stride = image.buffer.get_stride();
	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.offset = this.stride * (this.y + image.offsetY) + (this.x + image.offsetX) * 4;
};
$hxClasses["lime.graphics.utils._ImageDataUtil.ImageDataView"] = lime_graphics_utils__$ImageDataUtil_ImageDataView;
lime_graphics_utils__$ImageDataUtil_ImageDataView.__name__ = ["lime","graphics","utils","_ImageDataUtil","ImageDataView"];
lime_graphics_utils__$ImageDataUtil_ImageDataView.prototype = {
	clip: function(x,y,width,height) {
		this.rect.__contract(x,y,width,height);
		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.offset = this.stride * (this.y + this.image.offsetY) + (this.x + this.image.offsetX) * 4;
	}
	,row: function(y) {
		return this.offset + this.stride * y;
	}
	,__class__: lime_graphics_utils__$ImageDataUtil_ImageDataView
};
var lime_math__$ColorMatrix_ColorMatrix_$Impl_$ = {};
$hxClasses["lime.math._ColorMatrix.ColorMatrix_Impl_"] = lime_math__$ColorMatrix_ColorMatrix_$Impl_$;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__name__ = ["lime","math","_ColorMatrix","ColorMatrix_Impl_"];
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__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"}
lime_math__$ColorMatrix_ColorMatrix_$Impl_$._new = function(data) {
	var this1;
	if(data != null && data.length == 20) {
		this1 = data;
	} else {
		var array = lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__identity;
		var this2;
		if(array != null) {
			this2 = new Float32Array(array);
		} else {
			this2 = null;
		}
		this1 = this2;
	}
	return this1;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.clone = function(this1) {
	var this2;
	if(this1 != null) {
		this2 = new Float32Array(this1);
	} else {
		this2 = null;
	}
	return lime_math__$ColorMatrix_ColorMatrix_$Impl_$._new(this2);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.concat = function(this1,second) {
	this1[0] += second[0];
	this1[6] += second[6];
	this1[12] += second[12];
	this1[18] += second[18];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.copyFrom = function(this1,other) {
	this1.set(other);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.identity = function(this1) {
	this1[0] = 1;
	this1[1] = 0;
	this1[2] = 0;
	this1[3] = 0;
	this1[4] = 0;
	this1[5] = 0;
	this1[6] = 1;
	this1[7] = 0;
	this1[8] = 0;
	this1[9] = 0;
	this1[10] = 0;
	this1[11] = 0;
	this1[12] = 1;
	this1[13] = 0;
	this1[14] = 0;
	this1[15] = 0;
	this1[16] = 0;
	this1[17] = 0;
	this1[18] = 1;
	this1[19] = 0;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getAlphaTable = function(this1) {
	var table = new Uint8Array(256);
	var multiplier = this1[18];
	var offset = this1[19] * 255;
	var value;
	var _g = 0;
	while(_g < 256) {
		var i = _g++;
		value = Math.floor(i * multiplier + offset);
		if(value > 255) {
			value = 255;
		}
		if(value < 0) {
			value = 0;
		}
		table[i] = value;
	}
	return table;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getBlueTable = function(this1) {
	var table = new Uint8Array(256);
	var multiplier = this1[12];
	var offset = this1[14] * 255;
	var value;
	var _g = 0;
	while(_g < 256) {
		var i = _g++;
		value = Math.floor(i * multiplier + offset);
		if(value > 255) {
			value = 255;
		}
		if(value < 0) {
			value = 0;
		}
		table[i] = value;
	}
	return table;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getGreenTable = function(this1) {
	var table = new Uint8Array(256);
	var multiplier = this1[6];
	var offset = this1[9] * 255;
	var value;
	var _g = 0;
	while(_g < 256) {
		var i = _g++;
		value = Math.floor(i * multiplier + offset);
		if(value > 255) {
			value = 255;
		}
		if(value < 0) {
			value = 0;
		}
		table[i] = value;
	}
	return table;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.getRedTable = function(this1) {
	var table = new Uint8Array(256);
	var multiplier = this1[0];
	var offset = this1[4] * 255;
	var value;
	var _g = 0;
	while(_g < 256) {
		var i = _g++;
		value = Math.floor(i * multiplier + offset);
		if(value > 255) {
			value = 255;
		}
		if(value < 0) {
			value = 0;
		}
		table[i] = value;
	}
	return table;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__toFlashColorTransform = function(this1) {
	return null;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_alphaMultiplier = function(this1) {
	return this1[18];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_alphaMultiplier = function(this1,value) {
	return this1[18] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_alphaOffset = function(this1) {
	return this1[19] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_alphaOffset = function(this1,value) {
	return this1[19] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_blueMultiplier = function(this1) {
	return this1[12];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_blueMultiplier = function(this1,value) {
	return this1[12] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_blueOffset = function(this1) {
	return this1[14] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_blueOffset = function(this1,value) {
	return this1[14] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_color = function(this1) {
	return (this1[4] * 255 | 0) << 16 | (this1[9] * 255 | 0) << 8 | (this1[14] * 255 | 0);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_color = function(this1,value) {
	this1[4] = (value >> 16 & 255) / 255;
	this1[9] = (value >> 8 & 255) / 255;
	this1[14] = (value & 255) / 255;
	this1[0] = 0;
	this1[6] = 0;
	this1[12] = 0;
	return lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_color(this1);
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_greenMultiplier = function(this1) {
	return this1[6];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_greenMultiplier = function(this1,value) {
	return this1[6] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_greenOffset = function(this1) {
	return this1[9] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_greenOffset = function(this1,value) {
	return this1[9] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_redMultiplier = function(this1) {
	return this1[0];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_redMultiplier = function(this1,value) {
	return this1[0] = value;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get_redOffset = function(this1) {
	return this1[4] * 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set_redOffset = function(this1,value) {
	return this1[4] = value / 255;
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.get = function(this1,index) {
	return this1[index];
};
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.set = function(this1,index,value) {
	return this1[index] = value;
};
var lime_math_Matrix3 = function(a,b,c,d,tx,ty) {
	if(ty == null) {
		ty = 0;
	}
	if(tx == null) {
		tx = 0;
	}
	if(d == null) {
		d = 1;
	}
	if(c == null) {
		c = 0;
	}
	if(b == null) {
		b = 0;
	}
	if(a == null) {
		a = 1;
	}
	this.a = a;
	this.b = b;
	this.c = c;
	this.d = d;
	this.tx = tx;
	this.ty = ty;
};
$hxClasses["lime.math.Matrix3"] = lime_math_Matrix3;
lime_math_Matrix3.__name__ = ["lime","math","Matrix3"];
lime_math_Matrix3.prototype = {
	clone: function() {
		return new lime_math_Matrix3(this.a,this.b,this.c,this.d,this.tx,this.ty);
	}
	,concat: function(m) {
		var a1 = this.a * m.a + this.b * m.c;
		this.b = this.a * m.b + this.b * m.d;
		this.a = a1;
		var c1 = this.c * m.a + this.d * m.c;
		this.d = this.c * m.b + this.d * m.d;
		this.c = c1;
		var tx1 = this.tx * m.a + this.ty * m.c + m.tx;
		this.ty = this.tx * m.b + this.ty * m.d + m.ty;
		this.tx = tx1;
	}
	,copyColumnFrom: function(column,vector4) {
		if(column > 2) {
			throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)");
		} else if(column == 0) {
			this.a = vector4.x;
			this.c = vector4.y;
		} else if(column == 1) {
			this.b = vector4.x;
			this.d = vector4.y;
		} else {
			this.tx = vector4.x;
			this.ty = vector4.y;
		}
	}
	,copyColumnTo: function(column,vector4) {
		if(column > 2) {
			throw new js__$Boot_HaxeError("Column " + column + " out of bounds (2)");
		} else if(column == 0) {
			vector4.x = this.a;
			vector4.y = this.c;
			vector4.z = 0;
		} else if(column == 1) {
			vector4.x = this.b;
			vector4.y = this.d;
			vector4.z = 0;
		} else {
			vector4.x = this.tx;
			vector4.y = this.ty;
			vector4.z = 1;
		}
	}
	,copyFrom: function(sourceMatrix3) {
		this.a = sourceMatrix3.a;
		this.b = sourceMatrix3.b;
		this.c = sourceMatrix3.c;
		this.d = sourceMatrix3.d;
		this.tx = sourceMatrix3.tx;
		this.ty = sourceMatrix3.ty;
	}
	,copyRowFrom: function(row,vector4) {
		if(row > 2) {
			throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)");
		} else if(row == 0) {
			this.a = vector4.x;
			this.c = vector4.y;
		} else if(row == 1) {
			this.b = vector4.x;
			this.d = vector4.y;
		} else {
			this.tx = vector4.x;
			this.ty = vector4.y;
		}
	}
	,copyRowTo: function(row,vector4) {
		if(row > 2) {
			throw new js__$Boot_HaxeError("Row " + row + " out of bounds (2)");
		} else if(row == 0) {
			vector4.x = this.a;
			vector4.y = this.b;
			vector4.z = this.tx;
		} else if(row == 1) {
			vector4.x = this.c;
			vector4.y = this.d;
			vector4.z = this.ty;
		} else {
			vector4.x = 0;
			vector4.y = 0;
			vector4.z = 1;
		}
	}
	,createBox: function(scaleX,scaleY,rotation,tx,ty) {
		if(ty == null) {
			ty = 0;
		}
		if(tx == null) {
			tx = 0;
		}
		if(rotation == null) {
			rotation = 0;
		}
		this.a = scaleX;
		this.d = scaleY;
		this.b = rotation;
		this.tx = tx;
		this.ty = ty;
	}
	,createGradientBox: function(width,height,rotation,tx,ty) {
		if(ty == null) {
			ty = 0;
		}
		if(tx == null) {
			tx = 0;
		}
		if(rotation == null) {
			rotation = 0;
		}
		this.a = width / 1638.4;
		this.d = height / 1638.4;
		if(rotation != 0) {
			var cos = Math.cos(rotation);
			var sin = Math.sin(rotation);
			this.b = sin * this.d;
			this.c = -sin * this.a;
			this.a *= cos;
			this.d *= cos;
		} else {
			this.b = 0;
			this.c = 0;
		}
		this.tx = tx + width / 2;
		this.ty = ty + height / 2;
	}
	,equals: function(Matrix3) {
		if(Matrix3 != null && this.tx == Matrix3.tx && this.ty == Matrix3.ty && this.a == Matrix3.a && this.b == Matrix3.b && this.c == Matrix3.c) {
			return this.d == Matrix3.d;
		} else {
			return false;
		}
	}
	,deltaTransformVector2: function(Vector2) {
		return new lime_math_Vector2(Vector2.x * this.a + Vector2.y * this.c,Vector2.x * this.b + Vector2.y * this.d);
	}
	,identity: function() {
		this.a = 1;
		this.b = 0;
		this.c = 0;
		this.d = 1;
		this.tx = 0;
		this.ty = 0;
	}
	,invert: function() {
		var norm = this.a * this.d - this.b * this.c;
		if(norm == 0) {
			this.a = this.b = this.c = this.d = 0;
			this.tx = -this.tx;
			this.ty = -this.ty;
		} else {
			norm = 1.0 / norm;
			var a1 = this.d * norm;
			this.d = this.a * norm;
			this.a = a1;
			this.b *= -norm;
			this.c *= -norm;
			var tx1 = -this.a * this.tx - this.c * this.ty;
			this.ty = -this.b * this.tx - this.d * this.ty;
			this.tx = tx1;
		}
		return this;
	}
	,mult: function(m) {
		var result = new lime_math_Matrix3(this.a,this.b,this.c,this.d,this.tx,this.ty);
		result.concat(m);
		return result;
	}
	,rotate: function(theta) {
		var cos = Math.cos(theta);
		var sin = Math.sin(theta);
		var a1 = this.a * cos - this.b * sin;
		this.b = this.a * sin + this.b * cos;
		this.a = a1;
		var c1 = this.c * cos - this.d * sin;
		this.d = this.c * sin + this.d * cos;
		this.c = c1;
		var tx1 = this.tx * cos - this.ty * sin;
		this.ty = this.tx * sin + this.ty * cos;
		this.tx = tx1;
	}
	,scale: function(sx,sy) {
		this.a *= sx;
		this.b *= sy;
		this.c *= sx;
		this.d *= sy;
		this.tx *= sx;
		this.ty *= sy;
	}
	,setRotation: function(theta,scale) {
		if(scale == null) {
			scale = 1;
		}
		this.a = Math.cos(theta) * scale;
		this.c = Math.sin(theta) * scale;
		this.b = -this.c;
		this.d = this.a;
	}
	,setTo: function(a,b,c,d,tx,ty) {
		this.a = a;
		this.b = b;
		this.c = c;
		this.d = d;
		this.tx = tx;
		this.ty = ty;
	}
	,to3DString: function(roundPixels) {
		if(roundPixels == null) {
			roundPixels = false;
		}
		if(roundPixels) {
			return "Matrix33d(" + this.a + ", " + this.b + ", " + "0, 0, " + this.c + ", " + this.d + ", " + "0, 0, 0, 0, 1, 0, " + (this.tx | 0) + ", " + (this.ty | 0) + ", 0, 1)";
		} else {
			return "Matrix33d(" + 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 "Matrix3(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + "px, " + this.ty + "px)";
	}
	,toString: function() {
		return "Matrix3(" + this.a + ", " + this.b + ", " + this.c + ", " + this.d + ", " + this.tx + ", " + this.ty + ")";
	}
	,transformVector2: function(pos) {
		return new lime_math_Vector2(pos.x * this.a + pos.y * this.c + this.tx,pos.x * this.b + pos.y * this.d + this.ty);
	}
	,translate: function(dx,dy) {
		this.tx += dx;
		this.ty += dy;
	}
	,__cleanValues: function() {
		this.a = Math.round(this.a * 1000) / 1000;
		this.b = Math.round(this.b * 1000) / 1000;
		this.c = Math.round(this.c * 1000) / 1000;
		this.d = Math.round(this.d * 1000) / 1000;
		this.tx = Math.round(this.tx * 10) / 10;
		this.ty = Math.round(this.ty * 10) / 10;
	}
	,__transformX: function(pos) {
		return pos.x * this.a + pos.y * this.c + this.tx;
	}
	,__transformY: function(pos) {
		return pos.x * this.b + pos.y * this.d + this.ty;
	}
	,__translateTransformed: function(pos) {
		this.tx = pos.x * this.a + pos.y * this.c + this.tx;
		this.ty = pos.x * this.b + pos.y * this.d + this.ty;
	}
	,__class__: lime_math_Matrix3
};
var lime_math__$Matrix4_Matrix4_$Impl_$ = {};
$hxClasses["lime.math._Matrix4.Matrix4_Impl_"] = lime_math__$Matrix4_Matrix4_$Impl_$;
lime_math__$Matrix4_Matrix4_$Impl_$.__name__ = ["lime","math","_Matrix4","Matrix4_Impl_"];
lime_math__$Matrix4_Matrix4_$Impl_$.__properties__ = {set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}
lime_math__$Matrix4_Matrix4_$Impl_$._new = function(data) {
	var this1;
	if(data != null && data.length == 16) {
		this1 = data;
	} else {
		var array = lime_math__$Matrix4_Matrix4_$Impl_$.__identity;
		var this2;
		if(array != null) {
			this2 = new Float32Array(array);
		} else {
			this2 = null;
		}
		this1 = this2;
	}
	return this1;
};
lime_math__$Matrix4_Matrix4_$Impl_$.append = function(this1,lhs) {
	var m111 = this1[0];
	var m121 = this1[4];
	var m131 = this1[8];
	var m141 = this1[12];
	var m112 = this1[1];
	var m122 = this1[5];
	var m132 = this1[9];
	var m142 = this1[13];
	var m113 = this1[2];
	var m123 = this1[6];
	var m133 = this1[10];
	var m143 = this1[14];
	var m114 = this1[3];
	var m124 = this1[7];
	var m134 = this1[11];
	var m144 = this1[15];
	var m211 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,0);
	var m221 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,4);
	var m231 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,8);
	var m241 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,12);
	var m212 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,1);
	var m222 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,5);
	var m232 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,9);
	var m242 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,13);
	var m213 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,2);
	var m223 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,6);
	var m233 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,10);
	var m243 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,14);
	var m214 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,3);
	var m224 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,7);
	var m234 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,11);
	var m244 = lime_math__$Matrix4_Matrix4_$Impl_$.get(lhs,15);
	this1[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
	this1[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
	this1[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
	this1[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
	this1[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
	this1[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
	this1[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
	this1[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
	this1[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
	this1[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
	this1[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
	this1[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
	this1[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
	this1[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
	this1[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
	this1[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
};
lime_math__$Matrix4_Matrix4_$Impl_$.appendRotation = function(this1,degrees,axis,pivotPoint) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$.getAxisRotation(axis.x,axis.y,axis.z,degrees);
	if(pivotPoint != null) {
		lime_math__$Matrix4_Matrix4_$Impl_$.appendTranslation(m,pivotPoint.x,pivotPoint.y,pivotPoint.z);
	}
	lime_math__$Matrix4_Matrix4_$Impl_$.append(this1,m);
};
lime_math__$Matrix4_Matrix4_$Impl_$.appendScale = function(this1,xScale,yScale,zScale) {
	var array = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
	var this2;
	if(array != null) {
		this2 = new Float32Array(array);
	} else {
		this2 = null;
	}
	lime_math__$Matrix4_Matrix4_$Impl_$.append(this1,lime_math__$Matrix4_Matrix4_$Impl_$._new(this2));
};
lime_math__$Matrix4_Matrix4_$Impl_$.appendTranslation = function(this1,x,y,z) {
	this1[12] += x;
	this1[13] += y;
	this1[14] += z;
};
lime_math__$Matrix4_Matrix4_$Impl_$.clone = function(this1) {
	var this2;
	if(this1 != null) {
		this2 = new Float32Array(this1);
	} else {
		this2 = null;
	}
	return lime_math__$Matrix4_Matrix4_$Impl_$._new(this2);
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyColumnFrom = function(this1,column,vector) {
	switch(column) {
	case 0:
		this1[0] = vector.x;
		this1[1] = vector.y;
		this1[2] = vector.z;
		this1[3] = vector.w;
		break;
	case 1:
		this1[4] = vector.x;
		this1[5] = vector.y;
		this1[6] = vector.z;
		this1[7] = vector.w;
		break;
	case 2:
		this1[8] = vector.x;
		this1[9] = vector.y;
		this1[10] = vector.z;
		this1[11] = vector.w;
		break;
	case 3:
		this1[12] = vector.x;
		this1[13] = vector.y;
		this1[14] = vector.z;
		this1[15] = vector.w;
		break;
	default:
		throw new js__$Boot_HaxeError("Error, Column " + column + " out of bounds [0, ..., 3]");
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyColumnTo = function(this1,column,vector) {
	switch(column) {
	case 0:
		vector.x = this1[0];
		vector.y = this1[1];
		vector.z = this1[2];
		vector.w = this1[3];
		break;
	case 1:
		vector.x = this1[4];
		vector.y = this1[5];
		vector.z = this1[6];
		vector.w = this1[7];
		break;
	case 2:
		vector.x = this1[8];
		vector.y = this1[9];
		vector.z = this1[10];
		vector.w = this1[11];
		break;
	case 3:
		vector.x = this1[12];
		vector.y = this1[13];
		vector.z = this1[14];
		vector.w = this1[15];
		break;
	default:
		throw new js__$Boot_HaxeError("Error, Column " + column + " out of bounds [0, ..., 3]");
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyFrom = function(this1,other) {
	this1.set(other);
};
lime_math__$Matrix4_Matrix4_$Impl_$.copythisFrom = function(this1,array,index,transposeValues) {
	if(transposeValues == null) {
		transposeValues = false;
	}
	if(index == null) {
		index = 0;
	}
	if(transposeValues) {
		lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
	}
	var _g1 = 0;
	var _g = array.length - index;
	while(_g1 < _g) {
		var c = _g1++;
		this1[c] = array[c + index];
	}
	if(transposeValues) {
		lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copythisTo = function(this1,array,index,transposeValues) {
	if(transposeValues == null) {
		transposeValues = false;
	}
	if(index == null) {
		index = 0;
	}
	if(transposeValues) {
		lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
	}
	var _g1 = 0;
	var _g = this1.length;
	while(_g1 < _g) {
		var c = _g1++;
		array[c + index] = this1[c];
	}
	if(transposeValues) {
		lime_math__$Matrix4_Matrix4_$Impl_$.transpose(this1);
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyRowFrom = function(this1,row,vector) {
	switch(row) {
	case 0:
		this1[0] = vector.x;
		this1[4] = vector.y;
		this1[8] = vector.z;
		this1[12] = vector.w;
		break;
	case 1:
		this1[1] = vector.x;
		this1[5] = vector.y;
		this1[9] = vector.z;
		this1[13] = vector.w;
		break;
	case 2:
		this1[2] = vector.x;
		this1[6] = vector.y;
		this1[10] = vector.z;
		this1[14] = vector.w;
		break;
	case 3:
		this1[3] = vector.x;
		this1[7] = vector.y;
		this1[11] = vector.z;
		this1[15] = vector.w;
		break;
	default:
		throw new js__$Boot_HaxeError("Error, Row " + Std.string(_$UInt_UInt_$Impl_$.toFloat(row)) + " out of bounds [0, ..., 3]");
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.create2D = function(x,y,scale,rotation) {
	if(rotation == null) {
		rotation = 0;
	}
	if(scale == null) {
		scale = 1;
	}
	var theta = rotation * Math.PI / 180.0;
	var c = Math.cos(theta);
	var s = Math.sin(theta);
	var array = [c * scale,-s * scale,0,0,s * scale,c * scale,0,0,0,0,1,0,x,y,0,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	return lime_math__$Matrix4_Matrix4_$Impl_$._new(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.createABCD = function(a,b,c,d,tx,ty) {
	var array = [a,b,0,0,c,d,0,0,0,0,1,0,tx,ty,0,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	return lime_math__$Matrix4_Matrix4_$Impl_$._new(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.createOrtho = function(x0,x1,y0,y1,zNear,zFar) {
	var sx = 1.0 / (x1 - x0);
	var sy = 1.0 / (y1 - y0);
	var sz = 1.0 / (zFar - zNear);
	var array = [2.0 * sx,0,0,0,0,2.0 * sy,0,0,0,0,-2.0 * sz,0,-(x0 + x1) * sx,-(y0 + y1) * sy,-(zNear + zFar) * sz,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	return lime_math__$Matrix4_Matrix4_$Impl_$._new(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyRowTo = function(this1,row,vector) {
	switch(row) {
	case 0:
		vector.x = this1[0];
		vector.y = this1[4];
		vector.z = this1[8];
		vector.w = this1[12];
		break;
	case 1:
		vector.x = this1[1];
		vector.y = this1[5];
		vector.z = this1[9];
		vector.w = this1[13];
		break;
	case 2:
		vector.x = this1[2];
		vector.y = this1[6];
		vector.z = this1[10];
		vector.w = this1[14];
		break;
	case 3:
		vector.x = this1[3];
		vector.y = this1[7];
		vector.z = this1[11];
		vector.w = this1[15];
		break;
	default:
		throw new js__$Boot_HaxeError("Error, Row " + row + " out of bounds [0, ..., 3]");
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.copyToMatrix4 = function(this1,other) {
	(js_Boot.__cast(other , Float32Array)).set(this1);
};
lime_math__$Matrix4_Matrix4_$Impl_$.deltaTransformVector = function(this1,v) {
	var x = v.x;
	var y = v.y;
	var z = v.z;
	return new lime_math_Vector4(x * this1[0] + y * this1[4] + z * this1[8] + this1[3],x * this1[1] + y * this1[5] + z * this1[9] + this1[7],x * this1[2] + y * this1[6] + z * this1[10] + this1[11],0);
};
lime_math__$Matrix4_Matrix4_$Impl_$.identity = function(this1) {
	this1[0] = 1;
	this1[1] = 0;
	this1[2] = 0;
	this1[3] = 0;
	this1[4] = 0;
	this1[5] = 1;
	this1[6] = 0;
	this1[7] = 0;
	this1[8] = 0;
	this1[9] = 0;
	this1[10] = 1;
	this1[11] = 0;
	this1[12] = 0;
	this1[13] = 0;
	this1[14] = 0;
	this1[15] = 1;
};
lime_math__$Matrix4_Matrix4_$Impl_$.interpolate = function(thisMat,toMat,percent) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$._new();
	var _g = 0;
	while(_g < 16) {
		var i = _g++;
		lime_math__$Matrix4_Matrix4_$Impl_$.set(m,i,lime_math__$Matrix4_Matrix4_$Impl_$.get(thisMat,i) + (lime_math__$Matrix4_Matrix4_$Impl_$.get(toMat,i) - lime_math__$Matrix4_Matrix4_$Impl_$.get(thisMat,i)) * percent);
	}
	return m;
};
lime_math__$Matrix4_Matrix4_$Impl_$.interpolateTo = function(this1,toMat,percent) {
	var _g = 0;
	while(_g < 16) {
		var i = _g++;
		this1[i] += (lime_math__$Matrix4_Matrix4_$Impl_$.get(toMat,i) - this1[i]) * percent;
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.invert = function(this1) {
	var d = lime_math__$Matrix4_Matrix4_$Impl_$.get_determinant(this1);
	var invertable = Math.abs(d) > 0.00000000001;
	if(invertable) {
		d = 1 / d;
		var m11 = this1[0];
		var m21 = this1[4];
		var m31 = this1[8];
		var m41 = this1[12];
		var m12 = this1[1];
		var m22 = this1[5];
		var m32 = this1[9];
		var m42 = this1[13];
		var m13 = this1[2];
		var m23 = this1[6];
		var m33 = this1[10];
		var m43 = this1[14];
		var m14 = this1[3];
		var m24 = this1[7];
		var m34 = this1[11];
		var m44 = this1[15];
		this1[0] = d * (m22 * (m33 * m44 - m43 * m34) - m32 * (m23 * m44 - m43 * m24) + m42 * (m23 * m34 - m33 * m24));
		this1[1] = -d * (m12 * (m33 * m44 - m43 * m34) - m32 * (m13 * m44 - m43 * m14) + m42 * (m13 * m34 - m33 * m14));
		this1[2] = d * (m12 * (m23 * m44 - m43 * m24) - m22 * (m13 * m44 - m43 * m14) + m42 * (m13 * m24 - m23 * m14));
		this1[3] = -d * (m12 * (m23 * m34 - m33 * m24) - m22 * (m13 * m34 - m33 * m14) + m32 * (m13 * m24 - m23 * m14));
		this1[4] = -d * (m21 * (m33 * m44 - m43 * m34) - m31 * (m23 * m44 - m43 * m24) + m41 * (m23 * m34 - m33 * m24));
		this1[5] = d * (m11 * (m33 * m44 - m43 * m34) - m31 * (m13 * m44 - m43 * m14) + m41 * (m13 * m34 - m33 * m14));
		this1[6] = -d * (m11 * (m23 * m44 - m43 * m24) - m21 * (m13 * m44 - m43 * m14) + m41 * (m13 * m24 - m23 * m14));
		this1[7] = d * (m11 * (m23 * m34 - m33 * m24) - m21 * (m13 * m34 - m33 * m14) + m31 * (m13 * m24 - m23 * m14));
		this1[8] = d * (m21 * (m32 * m44 - m42 * m34) - m31 * (m22 * m44 - m42 * m24) + m41 * (m22 * m34 - m32 * m24));
		this1[9] = -d * (m11 * (m32 * m44 - m42 * m34) - m31 * (m12 * m44 - m42 * m14) + m41 * (m12 * m34 - m32 * m14));
		this1[10] = d * (m11 * (m22 * m44 - m42 * m24) - m21 * (m12 * m44 - m42 * m14) + m41 * (m12 * m24 - m22 * m14));
		this1[11] = -d * (m11 * (m22 * m34 - m32 * m24) - m21 * (m12 * m34 - m32 * m14) + m31 * (m12 * m24 - m22 * m14));
		this1[12] = -d * (m21 * (m32 * m43 - m42 * m33) - m31 * (m22 * m43 - m42 * m23) + m41 * (m22 * m33 - m32 * m23));
		this1[13] = d * (m11 * (m32 * m43 - m42 * m33) - m31 * (m12 * m43 - m42 * m13) + m41 * (m12 * m33 - m32 * m13));
		this1[14] = -d * (m11 * (m22 * m43 - m42 * m23) - m21 * (m12 * m43 - m42 * m13) + m41 * (m12 * m23 - m22 * m13));
		this1[15] = d * (m11 * (m22 * m33 - m32 * m23) - m21 * (m12 * m33 - m32 * m13) + m31 * (m12 * m23 - m22 * m13));
	}
	return invertable;
};
lime_math__$Matrix4_Matrix4_$Impl_$.pointAt = function(this1,pos,at,up) {
	if(at == null) {
		at = new lime_math_Vector4(0,0,-1);
	}
	if(up == null) {
		up = new lime_math_Vector4(0,-1,0);
	}
	var dir = new lime_math_Vector4(at.x - pos.x,at.y - pos.y,at.z - pos.z);
	var vup = new lime_math_Vector4(up.x,up.y,up.z,up.w);
	var right;
	var l = Math.sqrt(dir.x * dir.x + dir.y * dir.y + dir.z * dir.z);
	if(l != 0) {
		dir.x /= l;
		dir.y /= l;
		dir.z /= l;
	}
	var l1 = Math.sqrt(vup.x * vup.x + vup.y * vup.y + vup.z * vup.z);
	if(l1 != 0) {
		vup.x /= l1;
		vup.y /= l1;
		vup.z /= l1;
	}
	var dir2 = new lime_math_Vector4(dir.x,dir.y,dir.z,dir.w);
	var s = vup.x * dir.x + vup.y * dir.y + vup.z * dir.z;
	dir2.x *= s;
	dir2.y *= s;
	dir2.z *= s;
	vup = new lime_math_Vector4(vup.x - dir2.x,vup.y - dir2.y,vup.z - dir2.z);
	if(Math.sqrt(vup.x * vup.x + vup.y * vup.y + vup.z * vup.z) > 0) {
		var l2 = Math.sqrt(vup.x * vup.x + vup.y * vup.y + vup.z * vup.z);
		if(l2 != 0) {
			vup.x /= l2;
			vup.y /= l2;
			vup.z /= l2;
		}
	} else if(dir.x != 0) {
		vup = new lime_math_Vector4(-dir.y,dir.x,0);
	} else {
		vup = new lime_math_Vector4(1,0,0);
	}
	right = new lime_math_Vector4(vup.y * dir.z - vup.z * dir.y,vup.z * dir.x - vup.x * dir.z,vup.x * dir.y - vup.y * dir.x,1);
	var l3 = Math.sqrt(right.x * right.x + right.y * right.y + right.z * right.z);
	if(l3 != 0) {
		right.x /= l3;
		right.y /= l3;
		right.z /= l3;
	}
	this1[0] = right.x;
	this1[4] = right.y;
	this1[8] = right.z;
	this1[12] = 0.0;
	this1[1] = vup.x;
	this1[5] = vup.y;
	this1[9] = vup.z;
	this1[13] = 0.0;
	this1[2] = dir.x;
	this1[6] = dir.y;
	this1[10] = dir.z;
	this1[14] = 0.0;
	this1[3] = pos.x;
	this1[7] = pos.y;
	this1[11] = pos.z;
	this1[15] = 1.0;
};
lime_math__$Matrix4_Matrix4_$Impl_$.prepend = function(this1,rhs) {
	var m111 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,0);
	var m121 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,4);
	var m131 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,8);
	var m141 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,12);
	var m112 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,1);
	var m122 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,5);
	var m132 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,9);
	var m142 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,13);
	var m113 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,2);
	var m123 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,6);
	var m133 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,10);
	var m143 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,14);
	var m114 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,3);
	var m124 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,7);
	var m134 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,11);
	var m144 = lime_math__$Matrix4_Matrix4_$Impl_$.get(rhs,15);
	var m211 = this1[0];
	var m221 = this1[4];
	var m231 = this1[8];
	var m241 = this1[12];
	var m212 = this1[1];
	var m222 = this1[5];
	var m232 = this1[9];
	var m242 = this1[13];
	var m213 = this1[2];
	var m223 = this1[6];
	var m233 = this1[10];
	var m243 = this1[14];
	var m214 = this1[3];
	var m224 = this1[7];
	var m234 = this1[11];
	var m244 = this1[15];
	this1[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
	this1[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
	this1[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
	this1[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
	this1[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
	this1[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
	this1[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
	this1[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
	this1[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
	this1[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
	this1[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
	this1[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
	this1[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
	this1[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
	this1[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
	this1[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
};
lime_math__$Matrix4_Matrix4_$Impl_$.prependRotation = function(this1,degrees,axis,pivotPoint) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$.getAxisRotation(axis.x,axis.y,axis.z,degrees);
	if(pivotPoint != null) {
		lime_math__$Matrix4_Matrix4_$Impl_$.appendTranslation(m,pivotPoint.x,pivotPoint.y,pivotPoint.z);
	}
	lime_math__$Matrix4_Matrix4_$Impl_$.prepend(this1,m);
};
lime_math__$Matrix4_Matrix4_$Impl_$.prependScale = function(this1,xScale,yScale,zScale) {
	var array = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
	var this2;
	if(array != null) {
		this2 = new Float32Array(array);
	} else {
		this2 = null;
	}
	lime_math__$Matrix4_Matrix4_$Impl_$.prepend(this1,lime_math__$Matrix4_Matrix4_$Impl_$._new(this2));
};
lime_math__$Matrix4_Matrix4_$Impl_$.prependTranslation = function(this1,x,y,z) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$._new();
	lime_math__$Matrix4_Matrix4_$Impl_$.set_position(m,new lime_math_Vector4(x,y,z));
	lime_math__$Matrix4_Matrix4_$Impl_$.prepend(this1,m);
};
lime_math__$Matrix4_Matrix4_$Impl_$.transformVector = function(this1,v) {
	var x = v.x;
	var y = v.y;
	var z = v.z;
	return new lime_math_Vector4(x * this1[0] + y * this1[4] + z * this1[8] + this1[12],x * this1[1] + y * this1[5] + z * this1[9] + this1[13],x * this1[2] + y * this1[6] + z * this1[10] + this1[14],x * this1[3] + y * this1[7] + z * this1[11] + this1[15]);
};
lime_math__$Matrix4_Matrix4_$Impl_$.transformVectors = function(this1,ain,aout) {
	var i = 0;
	while(i + 3 <= ain.length) {
		var x = ain[i];
		var y = ain[i + 1];
		var z = ain[i + 2];
		aout[i] = x * this1[0] + y * this1[4] + z * this1[8] + this1[12];
		aout[i + 1] = x * this1[1] + y * this1[5] + z * this1[9] + this1[13];
		aout[i + 2] = x * this1[2] + y * this1[6] + z * this1[10] + this1[14];
		i += 3;
	}
};
lime_math__$Matrix4_Matrix4_$Impl_$.transpose = function(this1) {
	var this2;
	if(this1 != null) {
		this2 = new Float32Array(this1);
	} else {
		this2 = null;
	}
	var othis = this2;
	this1[1] = othis[4];
	this1[2] = othis[8];
	this1[3] = othis[12];
	this1[4] = othis[1];
	this1[6] = othis[9];
	this1[7] = othis[13];
	this1[8] = othis[2];
	this1[9] = othis[6];
	this1[11] = othis[14];
	this1[12] = othis[3];
	this1[13] = othis[7];
	this1[14] = othis[11];
};
lime_math__$Matrix4_Matrix4_$Impl_$.getAxisRotation = function(x,y,z,degrees) {
	var m = lime_math__$Matrix4_Matrix4_$Impl_$._new();
	var a1 = new lime_math_Vector4(x,y,z);
	var rad = -degrees * (Math.PI / 180);
	var c = Math.cos(rad);
	var s = Math.sin(rad);
	var t = 1.0 - c;
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,0,c + a1.x * a1.x * t);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,5,c + a1.y * a1.y * t);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,10,c + a1.z * a1.z * t);
	var tmp1 = a1.x * a1.y * t;
	var tmp2 = a1.z * s;
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,4,tmp1 + tmp2);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,1,tmp1 - tmp2);
	tmp1 = a1.x * a1.z * t;
	tmp2 = a1.y * s;
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,8,tmp1 - tmp2);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,2,tmp1 + tmp2);
	tmp1 = a1.y * a1.z * t;
	tmp2 = a1.x * s;
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,9,tmp1 + tmp2);
	lime_math__$Matrix4_Matrix4_$Impl_$.set(m,6,tmp1 - tmp2);
	return m;
};
lime_math__$Matrix4_Matrix4_$Impl_$.get_determinant = function(this1) {
	return (this1[0] * this1[5] - this1[4] * this1[1]) * (this1[10] * this1[15] - this1[14] * this1[11]) - (this1[0] * this1[9] - this1[8] * this1[1]) * (this1[6] * this1[15] - this1[14] * this1[7]) + (this1[0] * this1[13] - this1[12] * this1[1]) * (this1[6] * this1[11] - this1[10] * this1[7]) + (this1[4] * this1[9] - this1[8] * this1[5]) * (this1[2] * this1[15] - this1[14] * this1[3]) - (this1[4] * this1[13] - this1[12] * this1[5]) * (this1[2] * this1[11] - this1[10] * this1[3]) + (this1[8] * this1[13] - this1[12] * this1[9]) * (this1[2] * this1[7] - this1[6] * this1[3]);
};
lime_math__$Matrix4_Matrix4_$Impl_$.get_position = function(this1) {
	return new lime_math_Vector4(this1[12],this1[13],this1[14]);
};
lime_math__$Matrix4_Matrix4_$Impl_$.set_position = function(this1,val) {
	this1[12] = val.x;
	this1[13] = val.y;
	this1[14] = val.z;
	return val;
};
lime_math__$Matrix4_Matrix4_$Impl_$.get = function(this1,index) {
	return this1[index];
};
lime_math__$Matrix4_Matrix4_$Impl_$.set = function(this1,index,value) {
	this1[index] = value;
	return value;
};
var lime_math_Rectangle = function(x,y,width,height) {
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.x = x;
	this.y = y;
	this.width = width;
	this.height = height;
};
$hxClasses["lime.math.Rectangle"] = lime_math_Rectangle;
lime_math_Rectangle.__name__ = ["lime","math","Rectangle"];
lime_math_Rectangle.prototype = {
	clone: function() {
		return new lime_math_Rectangle(this.x,this.y,this.width,this.height);
	}
	,contains: function(x,y) {
		if(x >= this.x && y >= this.y && x < this.get_right()) {
			return y < this.get_bottom();
		} else {
			return false;
		}
	}
	,containsPoint: function(point) {
		return this.contains(point.x,point.y);
	}
	,containsRect: function(rect) {
		if(rect.width <= 0 || rect.height <= 0) {
			if(rect.x > this.x && rect.y > this.y && rect.get_right() < this.get_right()) {
				return rect.get_bottom() < this.get_bottom();
			} else {
				return false;
			}
		} else if(rect.x >= this.x && rect.y >= this.y && rect.get_right() <= this.get_right()) {
			return rect.get_bottom() <= this.get_bottom();
		} else {
			return false;
		}
	}
	,copyFrom: function(sourceRect) {
		this.x = sourceRect.x;
		this.y = sourceRect.y;
		this.width = sourceRect.width;
		this.height = sourceRect.height;
	}
	,equals: function(toCompare) {
		if(toCompare != null && this.x == toCompare.x && this.y == toCompare.y && this.width == toCompare.width) {
			return this.height == toCompare.height;
		} else {
			return false;
		}
	}
	,inflate: function(dx,dy) {
		this.x -= dx;
		this.width += dx * 2;
		this.y -= dy;
		this.height += dy * 2;
	}
	,inflatePoint: function(point) {
		this.inflate(point.x,point.y);
	}
	,intersection: function(toIntersect) {
		var x0 = this.x < toIntersect.x ? toIntersect.x : this.x;
		var x1 = this.get_right() > toIntersect.get_right() ? toIntersect.get_right() : this.get_right();
		if(x1 <= x0) {
			return new lime_math_Rectangle();
		}
		var y0 = this.y < toIntersect.y ? toIntersect.y : this.y;
		var y1 = this.get_bottom() > toIntersect.get_bottom() ? toIntersect.get_bottom() : this.get_bottom();
		if(y1 <= y0) {
			return new lime_math_Rectangle();
		}
		return new lime_math_Rectangle(x0,y0,x1 - x0,y1 - y0);
	}
	,intersects: function(toIntersect) {
		if((this.get_right() > toIntersect.get_right() ? toIntersect.get_right() : this.get_right()) <= (this.x < toIntersect.x ? toIntersect.x : this.x)) {
			return false;
		}
		return (this.get_bottom() > toIntersect.get_bottom() ? toIntersect.get_bottom() : this.get_bottom()) > (this.y < toIntersect.y ? toIntersect.y : this.y);
	}
	,isEmpty: function() {
		if(!(this.width <= 0)) {
			return this.height <= 0;
		} else {
			return true;
		}
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
	}
	,offsetPoint: function(point) {
		this.x += point.x;
		this.y += point.y;
	}
	,setEmpty: function() {
		this.x = this.y = this.width = this.height = 0;
	}
	,setTo: function(xa,ya,widtha,heighta) {
		this.x = xa;
		this.y = ya;
		this.width = widtha;
		this.height = heighta;
	}
	,transform: function(m) {
		var tx0 = m.a * this.x + m.c * this.y;
		var tx1 = tx0;
		var ty0 = m.b * this.x + m.d * this.y;
		var ty1 = ty0;
		var tx = m.a * (this.x + this.width) + m.c * this.y;
		var ty = m.b * (this.x + this.width) + m.d * this.y;
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		tx = m.a * (this.x + this.width) + m.c * (this.y + this.height);
		ty = m.b * (this.x + this.width) + m.d * (this.y + this.height);
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		tx = m.a * this.x + m.c * (this.y + this.height);
		ty = m.b * this.x + m.d * (this.y + this.height);
		if(tx < tx0) {
			tx0 = tx;
		}
		if(ty < ty0) {
			ty0 = ty;
		}
		if(tx > tx1) {
			tx1 = tx;
		}
		if(ty > ty1) {
			ty1 = ty;
		}
		return new lime_math_Rectangle(tx0 + m.tx,ty0 + m.ty,tx1 - tx0,ty1 - ty0);
	}
	,union: function(toUnion) {
		if(this.width == 0 || this.height == 0) {
			return toUnion.clone();
		} else if(toUnion.width == 0 || toUnion.height == 0) {
			return this.clone();
		}
		var x0 = this.x > toUnion.x ? toUnion.x : this.x;
		var y0 = this.y > toUnion.y ? toUnion.y : this.y;
		return new lime_math_Rectangle(x0,y0,(this.get_right() < toUnion.get_right() ? toUnion.get_right() : this.get_right()) - x0,(this.get_bottom() < toUnion.get_bottom() ? toUnion.get_bottom() : this.get_bottom()) - y0);
	}
	,__contract: function(x,y,width,height) {
		if(this.width == 0 && this.height == 0) {
			return;
		}
		if(this.x < x) {
			this.x = x;
		}
		if(this.y < y) {
			this.y = y;
		}
		if(this.get_right() > x + width) {
			this.width = x + width - this.x;
		}
		if(this.get_bottom() > y + height) {
			this.height = y + height - this.y;
		}
	}
	,__expand: function(x,y,width,height) {
		if(this.width == 0 && this.height == 0) {
			this.x = x;
			this.y = y;
			this.width = width;
			this.height = height;
			return;
		}
		var cacheRight = this.get_right();
		var cacheBottom = this.get_bottom();
		if(this.x > x) {
			this.x = x;
		}
		if(this.y > y) {
			this.y = y;
		}
		if(cacheRight < x + width) {
			this.width = x + width - this.x;
		}
		if(cacheBottom < y + height) {
			this.height = y + height - this.y;
		}
	}
	,__toFlashRectangle: function() {
		return null;
	}
	,get_bottom: function() {
		return this.y + this.height;
	}
	,set_bottom: function(b) {
		this.height = b - this.y;
		return b;
	}
	,get_bottomRight: function() {
		return new lime_math_Vector2(this.x + this.width,this.y + this.height);
	}
	,set_bottomRight: function(p) {
		this.width = p.x - this.x;
		this.height = p.y - this.y;
		return p.clone();
	}
	,get_left: function() {
		return this.x;
	}
	,set_left: function(l) {
		this.width -= l - this.x;
		this.x = l;
		return l;
	}
	,get_right: function() {
		return this.x + this.width;
	}
	,set_right: function(r) {
		this.width = r - this.x;
		return r;
	}
	,get_size: function() {
		return new lime_math_Vector2(this.width,this.height);
	}
	,set_size: function(p) {
		this.width = p.x;
		this.height = p.y;
		return p.clone();
	}
	,get_top: function() {
		return this.y;
	}
	,set_top: function(t) {
		this.height -= t - this.y;
		this.y = t;
		return t;
	}
	,get_topLeft: function() {
		return new lime_math_Vector2(this.x,this.y);
	}
	,set_topLeft: function(p) {
		this.x = p.x;
		this.y = p.y;
		return p.clone();
	}
	,__class__: lime_math_Rectangle
	,__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 lime_math_Vector2 = function(x,y) {
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.x = x;
	this.y = y;
};
$hxClasses["lime.math.Vector2"] = lime_math_Vector2;
lime_math_Vector2.__name__ = ["lime","math","Vector2"];
lime_math_Vector2.distance = function(pt1,pt2) {
	var dx = pt1.x - pt2.x;
	var dy = pt1.y - pt2.y;
	return Math.sqrt(dx * dx + dy * dy);
};
lime_math_Vector2.interpolate = function(pt1,pt2,f) {
	return new lime_math_Vector2(pt2.x + f * (pt1.x - pt2.x),pt2.y + f * (pt1.y - pt2.y));
};
lime_math_Vector2.polar = function(len,angle) {
	return new lime_math_Vector2(len * Math.cos(angle),len * Math.sin(angle));
};
lime_math_Vector2.prototype = {
	add: function(v) {
		return new lime_math_Vector2(v.x + this.x,v.y + this.y);
	}
	,clone: function() {
		return new lime_math_Vector2(this.x,this.y);
	}
	,equals: function(toCompare) {
		if(toCompare != null && toCompare.x == this.x) {
			return toCompare.y == this.y;
		} else {
			return false;
		}
	}
	,normalize: function(thickness) {
		if(this.x == 0 && this.y == 0) {
			return;
		} else {
			var norm = thickness / Math.sqrt(this.x * this.x + this.y * this.y);
			this.x *= norm;
			this.y *= norm;
		}
	}
	,offset: function(dx,dy) {
		this.x += dx;
		this.y += dy;
	}
	,setTo: function(xa,ya) {
		this.x = xa;
		this.y = ya;
	}
	,subtract: function(v) {
		return new lime_math_Vector2(this.x - v.x,this.y - v.y);
	}
	,__toFlashPoint: function() {
		return null;
	}
	,get_length: function() {
		return Math.sqrt(this.x * this.x + this.y * this.y);
	}
	,__class__: lime_math_Vector2
	,__properties__: {get_length:"get_length"}
};
var lime_math_Vector4 = function(x,y,z,w) {
	if(w == null) {
		w = 0.;
	}
	if(z == null) {
		z = 0.;
	}
	if(y == null) {
		y = 0.;
	}
	if(x == null) {
		x = 0.;
	}
	this.w = w;
	this.x = x;
	this.y = y;
	this.z = z;
};
$hxClasses["lime.math.Vector4"] = lime_math_Vector4;
lime_math_Vector4.__name__ = ["lime","math","Vector4"];
lime_math_Vector4.__properties__ = {get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"}
lime_math_Vector4.X_AXIS = null;
lime_math_Vector4.Y_AXIS = null;
lime_math_Vector4.Z_AXIS = null;
lime_math_Vector4.angleBetween = function(a,b) {
	var a0 = new lime_math_Vector4(a.x,a.y,a.z,a.w);
	var l = Math.sqrt(a0.x * a0.x + a0.y * a0.y + a0.z * a0.z);
	if(l != 0) {
		a0.x /= l;
		a0.y /= l;
		a0.z /= l;
	}
	var b0 = new lime_math_Vector4(b.x,b.y,b.z,b.w);
	var l1 = Math.sqrt(b0.x * b0.x + b0.y * b0.y + b0.z * b0.z);
	if(l1 != 0) {
		b0.x /= l1;
		b0.y /= l1;
		b0.z /= l1;
	}
	return Math.acos(a0.x * b0.x + a0.y * b0.y + a0.z * b0.z);
};
lime_math_Vector4.distance = function(pt1,pt2) {
	var x = pt2.x - pt1.x;
	var y = pt2.y - pt1.y;
	var z = pt2.z - pt1.z;
	return Math.sqrt(x * x + y * y + z * z);
};
lime_math_Vector4.get_X_AXIS = function() {
	return new lime_math_Vector4(1,0,0);
};
lime_math_Vector4.get_Y_AXIS = function() {
	return new lime_math_Vector4(0,1,0);
};
lime_math_Vector4.get_Z_AXIS = function() {
	return new lime_math_Vector4(0,0,1);
};
lime_math_Vector4.prototype = {
	add: function(a) {
		return new lime_math_Vector4(this.x + a.x,this.y + a.y,this.z + a.z);
	}
	,clone: function() {
		return new lime_math_Vector4(this.x,this.y,this.z,this.w);
	}
	,copyFrom: function(sourceVector4) {
		this.x = sourceVector4.x;
		this.y = sourceVector4.y;
		this.z = sourceVector4.z;
	}
	,crossProduct: function(a) {
		return new lime_math_Vector4(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(toCompare,allFour) {
		if(allFour == null) {
			allFour = false;
		}
		if(this.x == toCompare.x && this.y == toCompare.y && this.z == toCompare.z) {
			if(!(!allFour)) {
				return this.w == toCompare.w;
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,incrementBy: function(a) {
		this.x += a.x;
		this.y += a.y;
		this.z += a.z;
	}
	,nearEquals: function(toCompare,tolerance,allFour) {
		if(allFour == null) {
			allFour = false;
		}
		if(Math.abs(this.x - toCompare.x) < tolerance && Math.abs(this.y - toCompare.y) < tolerance && Math.abs(this.z - toCompare.z) < tolerance) {
			if(!(!allFour)) {
				return Math.abs(this.w - toCompare.w) < tolerance;
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,negate: function() {
		this.x *= -1;
		this.y *= -1;
		this.z *= -1;
	}
	,normalize: function() {
		var l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
		if(l != 0) {
			this.x /= l;
			this.y /= l;
			this.z /= l;
		}
		return l;
	}
	,project: function() {
		this.x /= this.w;
		this.y /= this.w;
		this.z /= this.w;
	}
	,scaleBy: function(s) {
		this.x *= s;
		this.y *= s;
		this.z *= s;
	}
	,setTo: function(xa,ya,za) {
		this.x = xa;
		this.y = ya;
		this.z = za;
	}
	,subtract: function(a) {
		return new lime_math_Vector4(this.x - a.x,this.y - a.y,this.z - a.z);
	}
	,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__: lime_math_Vector4
	,__properties__: {get_lengthSquared:"get_lengthSquared",get_length:"get_length"}
};
var lime_math_color__$ARGB_ARGB_$Impl_$ = {};
$hxClasses["lime.math.color._ARGB.ARGB_Impl_"] = lime_math_color__$ARGB_ARGB_$Impl_$;
lime_math_color__$ARGB_ARGB_$Impl_$.__name__ = ["lime","math","color","_ARGB","ARGB_Impl_"];
lime_math_color__$ARGB_ARGB_$Impl_$.__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"}
lime_math_color__$ARGB_ARGB_$Impl_$.a16 = null;
lime_math_color__$ARGB_ARGB_$Impl_$.unmult = null;
lime_math_color__$ARGB_ARGB_$Impl_$._new = function(argb) {
	if(argb == null) {
		argb = 0;
	}
	return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.create = function(a,r,g,b) {
	var argb = 0;
	argb = (a & 255) << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;
	return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.multiplyAlpha = function(this1) {
	if((this1 >> 24 & 255) == 0) {
		this1 = 0;
	} else if((this1 >> 24 & 255) != 255) {
		lime_math_color__$ARGB_ARGB_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 >> 24 & 255];
		this1 = (this1 >> 24 & 255 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 8 | (this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255;
	}
};
lime_math_color__$ARGB_ARGB_$Impl_$.readUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	switch(format) {
	case 0:
		this1 = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 1:
		this1 = (data[offset + 2] & 255) << 24 | (data[offset + 3] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 1] & 255;
		break;
	case 2:
		this1 = (data[offset + 1] & 255) << 24 | (data[offset] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset + 2] & 255;
		break;
	}
	if(premultiplied) {
		if((this1 >> 24 & 255) != 0 && (this1 >> 24 & 255) != 255) {
			lime_math_color__$ARGB_ARGB_$Impl_$.unmult = 255.0 / (this1 >> 24 & 255);
			this1 = (this1 >> 24 & 255 & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255) << 8 | lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255;
		}
	}
};
lime_math_color__$ARGB_ARGB_$Impl_$.set = function(this1,a,r,g,b) {
	this1 = (a & 255) << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.unmultiplyAlpha = function(this1) {
	if((this1 >> 24 & 255) != 0 && (this1 >> 24 & 255) != 255) {
		lime_math_color__$ARGB_ARGB_$Impl_$.unmult = 255.0 / (this1 >> 24 & 255);
		this1 = (this1 >> 24 & 255 & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255) << 8 | lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.unmult)] & 255;
	}
};
lime_math_color__$ARGB_ARGB_$Impl_$.writeUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	if(premultiplied) {
		if((this1 >> 24 & 255) == 0) {
			this1 = 0;
		} else if((this1 >> 24 & 255) != 255) {
			lime_math_color__$ARGB_ARGB_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 >> 24 & 255];
			this1 = (this1 >> 24 & 255 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255) << 8 | (this1 & 255) * lime_math_color__$ARGB_ARGB_$Impl_$.a16 >> 16 & 255;
		}
	}
	switch(format) {
	case 0:
		data[offset] = this1 >> 16 & 255;
		data[offset + 1] = this1 >> 8 & 255;
		data[offset + 2] = this1 & 255;
		data[offset + 3] = this1 >> 24 & 255;
		break;
	case 1:
		data[offset] = this1 >> 24 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 8 & 255;
		data[offset + 3] = this1 & 255;
		break;
	case 2:
		data[offset] = this1 & 255;
		data[offset + 1] = this1 >> 8 & 255;
		data[offset + 2] = this1 >> 16 & 255;
		data[offset + 3] = this1 >> 24 & 255;
		break;
	}
};
lime_math_color__$ARGB_ARGB_$Impl_$.__fromBGRA = function(bgra) {
	var argb = 0;
	argb = (bgra & 255 & 255) << 24 | (bgra >> 8 & 255 & 255) << 16 | (bgra >> 16 & 255 & 255) << 8 | bgra >> 24 & 255 & 255;
	return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.__fromRGBA = function(rgba) {
	var argb = 0;
	argb = (rgba & 255 & 255) << 24 | (rgba >> 24 & 255 & 255) << 16 | (rgba >> 16 & 255 & 255) << 8 | rgba >> 8 & 255 & 255;
	return argb;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_a = function(this1) {
	return this1 >> 24 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_a = function(this1,value) {
	this1 = (value & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_b = function(this1) {
	return this1 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_b = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | value & 255;
	return value;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_g = function(this1) {
	return this1 >> 8 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_g = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (value & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$ARGB_ARGB_$Impl_$.get_r = function(this1) {
	return this1 >> 16 & 255;
};
lime_math_color__$ARGB_ARGB_$Impl_$.set_r = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
var lime_math_color__$BGRA_BGRA_$Impl_$ = {};
$hxClasses["lime.math.color._BGRA.BGRA_Impl_"] = lime_math_color__$BGRA_BGRA_$Impl_$;
lime_math_color__$BGRA_BGRA_$Impl_$.__name__ = ["lime","math","color","_BGRA","BGRA_Impl_"];
lime_math_color__$BGRA_BGRA_$Impl_$.__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"}
lime_math_color__$BGRA_BGRA_$Impl_$.a16 = null;
lime_math_color__$BGRA_BGRA_$Impl_$.unmult = null;
lime_math_color__$BGRA_BGRA_$Impl_$._new = function(bgra) {
	if(bgra == null) {
		bgra = 0;
	}
	return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.create = function(b,g,r,a) {
	var bgra = 0;
	bgra = (b & 255) << 24 | (g & 255) << 16 | (r & 255) << 8 | a & 255;
	return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.multiplyAlpha = function(this1) {
	if((this1 & 255) == 0) {
		this1 = 0;
	} else if((this1 & 255) != 255) {
		lime_math_color__$BGRA_BGRA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
		this1 = ((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
	}
};
lime_math_color__$BGRA_BGRA_$Impl_$.readUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	switch(format) {
	case 0:
		this1 = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		this1 = (data[offset + 3] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 1] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		this1 = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((this1 & 255) != 0 && (this1 & 255) != 255) {
			lime_math_color__$BGRA_BGRA_$Impl_$.unmult = 255.0 / (this1 & 255);
			this1 = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 8 | this1 & 255 & 255;
		}
	}
};
lime_math_color__$BGRA_BGRA_$Impl_$.set = function(this1,b,g,r,a) {
	this1 = (b & 255) << 24 | (g & 255) << 16 | (r & 255) << 8 | a & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.unmultiplyAlpha = function(this1) {
	if((this1 & 255) != 0 && (this1 & 255) != 255) {
		lime_math_color__$BGRA_BGRA_$Impl_$.unmult = 255.0 / (this1 & 255);
		this1 = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.floor((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.unmult)] & 255) << 8 | this1 & 255 & 255;
	}
};
lime_math_color__$BGRA_BGRA_$Impl_$.writeUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	if(premultiplied) {
		if((this1 & 255) == 0) {
			this1 = 0;
		} else if((this1 & 255) != 255) {
			lime_math_color__$BGRA_BGRA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
			this1 = ((this1 >> 24 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$BGRA_BGRA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
		}
	}
	switch(format) {
	case 0:
		data[offset] = this1 >> 8 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 24 & 255;
		data[offset + 3] = this1 & 255;
		break;
	case 1:
		data[offset] = this1 & 255;
		data[offset + 1] = this1 >> 8 & 255;
		data[offset + 2] = this1 >> 16 & 255;
		data[offset + 3] = this1 >> 24 & 255;
		break;
	case 2:
		data[offset] = this1 >> 24 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 8 & 255;
		data[offset + 3] = this1 & 255;
		break;
	}
};
lime_math_color__$BGRA_BGRA_$Impl_$.__fromARGB = function(argb) {
	var bgra = 0;
	bgra = (argb & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb >> 16 & 255 & 255) << 8 | argb >> 24 & 255 & 255;
	return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.__fromRGBA = function(rgba) {
	var bgra = 0;
	bgra = (rgba >> 8 & 255 & 255) << 24 | (rgba >> 16 & 255 & 255) << 16 | (rgba >> 24 & 255 & 255) << 8 | rgba & 255 & 255;
	return bgra;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_a = function(this1) {
	return this1 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_a = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | value & 255;
	return value;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_b = function(this1) {
	return this1 >> 24 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_b = function(this1,value) {
	this1 = (value & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_g = function(this1) {
	return this1 >> 16 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_g = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$BGRA_BGRA_$Impl_$.get_r = function(this1) {
	return this1 >> 8 & 255;
};
lime_math_color__$BGRA_BGRA_$Impl_$.set_r = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (value & 255) << 8 | this1 & 255 & 255;
	return value;
};
var lime_math_color__$RGBA_RGBA_$Impl_$ = {};
$hxClasses["lime.math.color._RGBA.RGBA_Impl_"] = lime_math_color__$RGBA_RGBA_$Impl_$;
lime_math_color__$RGBA_RGBA_$Impl_$.__name__ = ["lime","math","color","_RGBA","RGBA_Impl_"];
lime_math_color__$RGBA_RGBA_$Impl_$.__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"}
lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16 = null;
lime_math_color__$RGBA_RGBA_$Impl_$.__clamp = null;
lime_math_color__$RGBA_RGBA_$Impl_$.a16 = null;
lime_math_color__$RGBA_RGBA_$Impl_$.unmult = null;
lime_math_color__$RGBA_RGBA_$Impl_$._new = function(rgba) {
	if(rgba == null) {
		rgba = 0;
	}
	return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.create = function(r,g,b,a) {
	var rgba = 0;
	rgba = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | a & 255;
	return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.multiplyAlpha = function(this1) {
	if((this1 & 255) == 0) {
		if(this1 != 0) {
			this1 = 0;
		}
	} else if((this1 & 255) != 255) {
		lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
		this1 = ((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
	}
};
lime_math_color__$RGBA_RGBA_$Impl_$.readUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	switch(format) {
	case 0:
		this1 = (data[offset] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset + 2] & 255) << 8 | data[offset + 3] & 255;
		break;
	case 1:
		this1 = (data[offset + 1] & 255) << 24 | (data[offset + 2] & 255) << 16 | (data[offset + 3] & 255) << 8 | data[offset] & 255;
		break;
	case 2:
		this1 = (data[offset + 2] & 255) << 24 | (data[offset + 1] & 255) << 16 | (data[offset] & 255) << 8 | data[offset + 3] & 255;
		break;
	}
	if(premultiplied) {
		if((this1 & 255) != 0 && (this1 & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (this1 & 255);
			this1 = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | this1 & 255 & 255;
		}
	}
};
lime_math_color__$RGBA_RGBA_$Impl_$.set = function(this1,r,g,b,a) {
	this1 = (r & 255) << 24 | (g & 255) << 16 | (b & 255) << 8 | a & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.unmultiplyAlpha = function(this1) {
	if((this1 & 255) != 0 && (this1 & 255) != 255) {
		lime_math_color__$RGBA_RGBA_$Impl_$.unmult = 255.0 / (this1 & 255);
		this1 = (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 24 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 16 | (lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[Math.round((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.unmult)] & 255) << 8 | this1 & 255 & 255;
	}
};
lime_math_color__$RGBA_RGBA_$Impl_$.writeUInt8 = function(this1,data,offset,format,premultiplied) {
	if(premultiplied == null) {
		premultiplied = false;
	}
	if(format == null) {
		format = 0;
	}
	if(premultiplied) {
		if((this1 & 255) == 0) {
			if(this1 != 0) {
				this1 = 0;
			}
		} else if((this1 & 255) != 255) {
			lime_math_color__$RGBA_RGBA_$Impl_$.a16 = lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[this1 & 255];
			this1 = ((this1 >> 24 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 24 | ((this1 >> 16 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 16 | ((this1 >> 8 & 255) * lime_math_color__$RGBA_RGBA_$Impl_$.a16 >> 16 & 255) << 8 | this1 & 255 & 255;
		}
	}
	switch(format) {
	case 0:
		data[offset] = this1 >> 24 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 8 & 255;
		data[offset + 3] = this1 & 255;
		break;
	case 1:
		data[offset] = this1 & 255;
		data[offset + 1] = this1 >> 24 & 255;
		data[offset + 2] = this1 >> 16 & 255;
		data[offset + 3] = this1 >> 8 & 255;
		break;
	case 2:
		data[offset] = this1 >> 8 & 255;
		data[offset + 1] = this1 >> 16 & 255;
		data[offset + 2] = this1 >> 24 & 255;
		data[offset + 3] = this1 & 255;
		break;
	}
};
lime_math_color__$RGBA_RGBA_$Impl_$.__fromARGB = function(argb) {
	var rgba = 0;
	rgba = (argb >> 16 & 255 & 255) << 24 | (argb >> 8 & 255 & 255) << 16 | (argb & 255 & 255) << 8 | argb >> 24 & 255 & 255;
	return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.__fromBGRA = function(bgra) {
	var rgba = 0;
	rgba = (bgra >> 8 & 255 & 255) << 24 | (bgra >> 16 & 255 & 255) << 16 | (bgra >> 24 & 255 & 255) << 8 | bgra & 255 & 255;
	return rgba;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_a = function(this1) {
	return this1 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_a = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | value & 255;
	return value;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_b = function(this1) {
	return this1 >> 8 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_b = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (value & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_g = function(this1) {
	return this1 >> 16 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_g = function(this1,value) {
	this1 = (this1 >> 24 & 255 & 255) << 24 | (value & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
lime_math_color__$RGBA_RGBA_$Impl_$.get_r = function(this1) {
	return this1 >> 24 & 255;
};
lime_math_color__$RGBA_RGBA_$Impl_$.set_r = function(this1,value) {
	this1 = (value & 255) << 24 | (this1 >> 16 & 255 & 255) << 16 | (this1 >> 8 & 255 & 255) << 8 | this1 & 255 & 255;
	return value;
};
var lime_net_HTTPRequest = function() {
	this.promise = new lime_app_Promise();
};
$hxClasses["lime.net.HTTPRequest"] = lime_net_HTTPRequest;
lime_net_HTTPRequest.__name__ = ["lime","net","HTTPRequest"];
lime_net_HTTPRequest.prototype = {
	load: function(url) {
		var _gthis = this;
		this.bytesLoaded = 0;
		this.bytesTotal = 0;
		var request = new XMLHttpRequest();
		request.addEventListener("progress",$bind(this,this.request_onProgress),false);
		request.onreadystatechange = function() {
			if(request.readyState != 4) {
				return;
			}
			if(request.status != null && request.status >= 200 && request.status <= 400) {
				_gthis.bytes = lime_utils_Bytes.ofData(request.response);
				_gthis.promise.complete(_gthis.bytes);
			} else {
				_gthis.promise.error(request.status);
			}
		};
		request.open("GET",url,true);
		request.responseType = "arraybuffer";
		request.send("");
		return this.promise.future;
	}
	,curl_onProgress: function(dltotal,dlnow,uptotal,upnow) {
		if(upnow > this.bytesLoaded || dlnow > this.bytesLoaded || uptotal > this.bytesTotal || dltotal > this.bytesTotal) {
			if(upnow > this.bytesLoaded) {
				this.bytesLoaded = upnow | 0;
			}
			if(dlnow > this.bytesLoaded) {
				this.bytesLoaded = dlnow | 0;
			}
			if(uptotal > this.bytesTotal) {
				this.bytesTotal = uptotal | 0;
			}
			if(dltotal > this.bytesTotal) {
				this.bytesTotal = dltotal | 0;
			}
			this.promise.progress(this.bytesLoaded / this.bytesTotal);
		}
		return 0;
	}
	,curl_onWrite: function(output,size,nmemb) {
		var cacheBytes = this.bytes;
		this.bytes = lime_utils_Bytes.alloc(this.bytes.length + output.length);
		this.bytes.blit(0,cacheBytes,0,cacheBytes.length);
		this.bytes.blit(cacheBytes.length,output,0,output.length);
		return size * nmemb;
	}
	,request_onProgress: function(event) {
		this.promise.progress(event.loaded / event.total);
	}
	,__class__: lime_net_HTTPRequest
};
var lime_net_curl__$CURL_CURL_$Impl_$ = {};
$hxClasses["lime.net.curl._CURL.CURL_Impl_"] = lime_net_curl__$CURL_CURL_$Impl_$;
lime_net_curl__$CURL_CURL_$Impl_$.__name__ = ["lime","net","curl","_CURL","CURL_Impl_"];
lime_net_curl__$CURL_CURL_$Impl_$.getDate = function(date,now) {
	return 0;
};
lime_net_curl__$CURL_CURL_$Impl_$.globalCleanup = function() {
};
lime_net_curl__$CURL_CURL_$Impl_$.globalInit = function(flags) {
	return 0;
};
lime_net_curl__$CURL_CURL_$Impl_$.version = function() {
	return null;
};
lime_net_curl__$CURL_CURL_$Impl_$.versionInfo = function(type) {
	return null;
};
lime_net_curl__$CURL_CURL_$Impl_$.intGt = function(a,b) {
	return a > b;
};
var lime_net_curl_CURLEasy = function() { };
$hxClasses["lime.net.curl.CURLEasy"] = lime_net_curl_CURLEasy;
lime_net_curl_CURLEasy.__name__ = ["lime","net","curl","CURLEasy"];
lime_net_curl_CURLEasy.cleanup = function(handle) {
};
lime_net_curl_CURLEasy.duphandle = function(handle) {
	return 0;
};
lime_net_curl_CURLEasy.escape = function(handle,url,length) {
	return null;
};
lime_net_curl_CURLEasy.getinfo = function(handle,info) {
	return null;
};
lime_net_curl_CURLEasy.init = function() {
	return 0;
};
lime_net_curl_CURLEasy.pause = function(handle,bitMask) {
	return 0;
};
lime_net_curl_CURLEasy.perform = function(handle) {
	return 0;
};
lime_net_curl_CURLEasy.reset = function(handle) {
};
lime_net_curl_CURLEasy.setopt = function(handle,option,parameter) {
	return 0;
};
lime_net_curl_CURLEasy.strerror = function(code) {
	return null;
};
lime_net_curl_CURLEasy.unescape = function(handle,url,inLength,outLength) {
	return null;
};
lime_net_curl_CURLEasy.__writeCallback = function(callback,output,size,nmemb) {
	return 0;
};
var lime_system_BackgroundWorker = function() {
	this.onProgress = new lime_app_Event_$Dynamic_$Void();
	this.onError = new lime_app_Event_$Dynamic_$Void();
	this.onComplete = new lime_app_Event_$Dynamic_$Void();
	this.doWork = new lime_app_Event_$Dynamic_$Void();
};
$hxClasses["lime.system.BackgroundWorker"] = lime_system_BackgroundWorker;
lime_system_BackgroundWorker.__name__ = ["lime","system","BackgroundWorker"];
lime_system_BackgroundWorker.prototype = {
	cancel: function() {
		this.canceled = true;
	}
	,run: function(message) {
		this.canceled = false;
		this.__runMessage = message;
		this.__doWork();
	}
	,sendComplete: function(message) {
		if(!this.canceled) {
			this.canceled = true;
			this.onComplete.dispatch(message);
		}
	}
	,sendError: function(message) {
		if(!this.canceled) {
			this.canceled = true;
			this.onError.dispatch(message);
		}
	}
	,sendProgress: function(message) {
		if(!this.canceled) {
			this.onProgress.dispatch(message);
		}
	}
	,__doWork: function() {
		this.doWork.dispatch(this.__runMessage);
	}
	,__update: function(deltaTime) {
	}
	,__class__: lime_system_BackgroundWorker
};
var lime_system_CFFI = function() { };
$hxClasses["lime.system.CFFI"] = lime_system_CFFI;
lime_system_CFFI.__name__ = ["lime","system","CFFI"];
lime_system_CFFI.available = null;
lime_system_CFFI.enabled = null;
lime_system_CFFI.load = function(library,method,args,lazy) {
	if(lazy == null) {
		lazy = false;
	}
	if(args == null) {
		args = 0;
	}
	if(!lime_system_CFFI.enabled) {
		return Reflect.makeVarArgs(function(__) {
			return { };
		});
	}
	return null;
};
lime_system_CFFI.__findHaxelib = function(library) {
	return "";
};
lime_system_CFFI.__loaderTrace = function(message) {
};
lime_system_CFFI.__sysName = function() {
	return null;
};
lime_system_CFFI.__tryLoad = function(name,library,func,args) {
	return null;
};
var lime_system__$CFFIPointer_CFFIPointer_$Impl_$ = {};
$hxClasses["lime.system._CFFIPointer.CFFIPointer_Impl_"] = lime_system__$CFFIPointer_CFFIPointer_$Impl_$;
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.__name__ = ["lime","system","_CFFIPointer","CFFIPointer_Impl_"];
lime_system__$CFFIPointer_CFFIPointer_$Impl_$._new = function(handle) {
	return handle;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get = function(this1) {
	return 0;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.equals = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) == b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.equalsPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) == lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThan = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) > b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThanPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) > lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThanOrEqual = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) >= b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.greaterThanOrEqualPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) >= lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThan = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) < b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThanPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) < lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThanOrEqual = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) <= b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.lessThanOrEqualPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) <= lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.notEquals = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) != b;
};
lime_system__$CFFIPointer_CFFIPointer_$Impl_$.notEqualsPointer = function(a,b) {
	return lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(a) != lime_system__$CFFIPointer_CFFIPointer_$Impl_$.get(b);
};
var lime_system_Clipboard = function() { };
$hxClasses["lime.system.Clipboard"] = lime_system_Clipboard;
lime_system_Clipboard.__name__ = ["lime","system","Clipboard"];
lime_system_Clipboard.__properties__ = {set_text:"set_text",get_text:"get_text"}
lime_system_Clipboard.get_text = function() {
	return null;
};
lime_system_Clipboard.set_text = function(value) {
	return null;
};
var lime_system_Display = function() {
};
$hxClasses["lime.system.Display"] = lime_system_Display;
lime_system_Display.__name__ = ["lime","system","Display"];
lime_system_Display.prototype = {
	__class__: lime_system_Display
};
var lime_system_DisplayMode = function(width,height,refreshRate,pixelFormat) {
	this.width = width;
	this.height = height;
	this.refreshRate = refreshRate;
	this.pixelFormat = pixelFormat;
};
$hxClasses["lime.system.DisplayMode"] = lime_system_DisplayMode;
lime_system_DisplayMode.__name__ = ["lime","system","DisplayMode"];
lime_system_DisplayMode.prototype = {
	__class__: lime_system_DisplayMode
};
var lime_system_Endian = $hxClasses["lime.system.Endian"] = { __ename__ : ["lime","system","Endian"], __constructs__ : ["LITTLE_ENDIAN","BIG_ENDIAN"] };
lime_system_Endian.LITTLE_ENDIAN = ["LITTLE_ENDIAN",0];
lime_system_Endian.LITTLE_ENDIAN.toString = $estr;
lime_system_Endian.LITTLE_ENDIAN.__enum__ = lime_system_Endian;
lime_system_Endian.BIG_ENDIAN = ["BIG_ENDIAN",1];
lime_system_Endian.BIG_ENDIAN.toString = $estr;
lime_system_Endian.BIG_ENDIAN.__enum__ = lime_system_Endian;
var lime_system_System = function() { };
$hxClasses["lime.system.System"] = lime_system_System;
lime_system_System.__name__ = ["lime","system","System"];
lime_system_System.__properties__ = {get_userDirectory:"get_userDirectory",get_numDisplays:"get_numDisplays",get_fontsDirectory:"get_fontsDirectory",get_endianness:"get_endianness",get_documentsDirectory:"get_documentsDirectory",get_desktopDirectory:"get_desktopDirectory",get_applicationStorageDirectory:"get_applicationStorageDirectory",get_applicationDirectory:"get_applicationDirectory",set_allowScreenTimeout:"set_allowScreenTimeout",get_allowScreenTimeout:"get_allowScreenTimeout"}
lime_system_System.applicationDirectory = null;
lime_system_System.applicationStorageDirectory = null;
lime_system_System.desktopDirectory = null;
lime_system_System.disableCFFI = null;
lime_system_System.documentsDirectory = null;
lime_system_System.endianness = null;
lime_system_System.fontsDirectory = null;
lime_system_System.numDisplays = null;
lime_system_System.userDirectory = null;
lime_system_System.embed = $hx_exports["lime"]["embed"] = function(element,width,height,background,assetsPrefix) {
	var htmlElement = null;
	if(typeof(element) == "string") {
		htmlElement = window.document.getElementById(js_Boot.__cast(element , String));
	} else if(element == null) {
		htmlElement = window.document.createElement("div");
	} else {
		htmlElement = element;
	}
	var color = null;
	if(background != null) {
		background = StringTools.replace(background,"#","");
		if(background.indexOf("0x") > -1) {
			color = Std.parseInt(background);
		} else {
			color = Std.parseInt("0x" + background);
		}
	}
	if(width == null) {
		width = 0;
	}
	if(height == null) {
		height = 0;
	}
	ApplicationMain.config.windows[0].background = color;
	ApplicationMain.config.windows[0].element = htmlElement;
	ApplicationMain.config.windows[0].width = width;
	ApplicationMain.config.windows[0].height = height;
	ApplicationMain.config.assetsPrefix = assetsPrefix;
	ApplicationMain.create();
};
lime_system_System.exit = function(code) {
};
lime_system_System.getDisplay = function(id) {
	if(id == 0) {
		var display = new lime_system_Display();
		display.id = 0;
		display.name = "Generic Display";
		display.dpi = 96;
		display.currentMode = new lime_system_DisplayMode(window.screen.width,window.screen.height,60,1);
		display.supportedModes = [display.currentMode];
		display.bounds = new lime_math_Rectangle(0,0,display.currentMode.width,display.currentMode.height);
		return display;
	}
	return null;
};
lime_system_System.getTimer = function() {
	return new Date().getTime();
};
lime_system_System.load = function(library,method,args,lazy) {
	if(lazy == null) {
		lazy = false;
	}
	if(args == null) {
		args = 0;
	}
	return lime_system_CFFI.load(library,method,args,lazy);
};
lime_system_System.get_allowScreenTimeout = function() {
	return true;
};
lime_system_System.set_allowScreenTimeout = function(value) {
	return true;
};
lime_system_System.get_applicationDirectory = function() {
	return null;
};
lime_system_System.get_applicationStorageDirectory = function() {
	lime_app_Application.current != null && lime_app_Application.current.config != null;
	return null;
};
lime_system_System.get_desktopDirectory = function() {
	return null;
};
lime_system_System.get_documentsDirectory = function() {
	return null;
};
lime_system_System.get_fontsDirectory = function() {
	return null;
};
lime_system_System.get_numDisplays = function() {
	return 1;
};
lime_system_System.get_userDirectory = function() {
	return null;
};
lime_system_System.get_endianness = function() {
	return lime_system_Endian.LITTLE_ENDIAN;
};
var lime_system_ThreadPool = function(minThreads,maxThreads) {
	if(maxThreads == null) {
		maxThreads = 1;
	}
	if(minThreads == null) {
		minThreads = 0;
	}
	this.onProgress = new lime_app_Event_$Dynamic_$Void();
	this.onError = new lime_app_Event_$Dynamic_$Void();
	this.onComplete = new lime_app_Event_$Dynamic_$Void();
	this.doWork = new lime_app_Event_$Dynamic_$Void();
	this.minThreads = minThreads;
	this.maxThreads = maxThreads;
	this.currentThreads = 0;
};
$hxClasses["lime.system.ThreadPool"] = lime_system_ThreadPool;
lime_system_ThreadPool.__name__ = ["lime","system","ThreadPool"];
lime_system_ThreadPool.prototype = {
	queue: function(state) {
		this.doWork.dispatch(state);
	}
	,sendComplete: function(state) {
		this.onComplete.dispatch(state);
	}
	,sendError: function(state) {
		this.onError.dispatch(state);
	}
	,sendProgress: function(state) {
		this.onProgress.dispatch(state);
	}
	,__class__: lime_system_ThreadPool
};
var lime_system__$ThreadPool_ThreadPoolMessageType = $hxClasses["lime.system._ThreadPool.ThreadPoolMessageType"] = { __ename__ : ["lime","system","_ThreadPool","ThreadPoolMessageType"], __constructs__ : ["COMPLETE","ERROR","EXIT","PROGRESS","WORK"] };
lime_system__$ThreadPool_ThreadPoolMessageType.COMPLETE = ["COMPLETE",0];
lime_system__$ThreadPool_ThreadPoolMessageType.COMPLETE.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.COMPLETE.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.ERROR = ["ERROR",1];
lime_system__$ThreadPool_ThreadPoolMessageType.ERROR.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.ERROR.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.EXIT = ["EXIT",2];
lime_system__$ThreadPool_ThreadPoolMessageType.EXIT.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.EXIT.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.PROGRESS = ["PROGRESS",3];
lime_system__$ThreadPool_ThreadPoolMessageType.PROGRESS.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.PROGRESS.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
lime_system__$ThreadPool_ThreadPoolMessageType.WORK = ["WORK",4];
lime_system__$ThreadPool_ThreadPoolMessageType.WORK.toString = $estr;
lime_system__$ThreadPool_ThreadPoolMessageType.WORK.__enum__ = lime_system__$ThreadPool_ThreadPoolMessageType;
var lime_system__$ThreadPool_ThreadPoolMessage = function(type,state) {
	this.type = type;
	this.state = state;
};
$hxClasses["lime.system._ThreadPool.ThreadPoolMessage"] = lime_system__$ThreadPool_ThreadPoolMessage;
lime_system__$ThreadPool_ThreadPoolMessage.__name__ = ["lime","system","_ThreadPool","ThreadPoolMessage"];
lime_system__$ThreadPool_ThreadPoolMessage.prototype = {
	__class__: lime_system__$ThreadPool_ThreadPoolMessage
};
var lime_text__$Glyph_Glyph_$Impl_$ = {};
$hxClasses["lime.text._Glyph.Glyph_Impl_"] = lime_text__$Glyph_Glyph_$Impl_$;
lime_text__$Glyph_Glyph_$Impl_$.__name__ = ["lime","text","_Glyph","Glyph_Impl_"];
lime_text__$Glyph_Glyph_$Impl_$._new = function(i) {
	return i;
};
var lime_text_GlyphMetrics = function() {
};
$hxClasses["lime.text.GlyphMetrics"] = lime_text_GlyphMetrics;
lime_text_GlyphMetrics.__name__ = ["lime","text","GlyphMetrics"];
lime_text_GlyphMetrics.prototype = {
	__class__: lime_text_GlyphMetrics
};
var lime_text_GlyphPosition = function(glyph,advance,offset) {
	this.glyph = glyph;
	this.advance = advance;
	if(offset != null) {
		this.offset = offset;
	} else {
		this.offset = new lime_math_Vector2();
	}
};
$hxClasses["lime.text.GlyphPosition"] = lime_text_GlyphPosition;
lime_text_GlyphPosition.__name__ = ["lime","text","GlyphPosition"];
lime_text_GlyphPosition.prototype = {
	__class__: lime_text_GlyphPosition
};
var lime_text__$TextDirection_TextDirection_$Impl_$ = {};
$hxClasses["lime.text._TextDirection.TextDirection_Impl_"] = lime_text__$TextDirection_TextDirection_$Impl_$;
lime_text__$TextDirection_TextDirection_$Impl_$.__name__ = ["lime","text","_TextDirection","TextDirection_Impl_"];
lime_text__$TextDirection_TextDirection_$Impl_$.__properties__ = {get_vertical:"get_vertical",get_horizontal:"get_horizontal",get_forward:"get_forward",get_backward:"get_backward"}
lime_text__$TextDirection_TextDirection_$Impl_$.reverse = function(this1) {
	this1 ^= 1;
};
lime_text__$TextDirection_TextDirection_$Impl_$.toString = function(this1) {
	switch(this1) {
	case 4:
		return "leftToRight";
	case 5:
		return "rightToLeft";
	case 6:
		return "topToBottom";
	case 7:
		return "bottomToTop";
	default:
		return "";
	}
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_backward = function(this1) {
	return (this1 & -3) == 5;
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_forward = function(this1) {
	return (this1 & -3) == 4;
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_horizontal = function(this1) {
	return (this1 & -2) == 4;
};
lime_text__$TextDirection_TextDirection_$Impl_$.get_vertical = function(this1) {
	return (this1 & -2) == 6;
};
var lime_text_TextLayout = function(text,font,size,direction,script,language) {
	if(language == null) {
		language = "en";
	}
	if(script == null) {
		script = "Zyyy";
	}
	if(direction == null) {
		direction = 4;
	}
	if(size == null) {
		size = 12;
	}
	if(text == null) {
		text = "";
	}
	this.set_text(text);
	this.set_font(font);
	this.set_size(size);
	this.__direction = direction;
	this.__script = script;
	this.__language = language;
	this.positions = [];
	this.__dirty = true;
};
$hxClasses["lime.text.TextLayout"] = lime_text_TextLayout;
lime_text_TextLayout.__name__ = ["lime","text","TextLayout"];
lime_text_TextLayout.prototype = {
	__position: function() {
		this.positions = [];
	}
	,get_positions: function() {
		if(this.__dirty) {
			this.__dirty = false;
			this.__position();
		}
		return this.positions;
	}
	,get_direction: function() {
		return this.__direction;
	}
	,set_direction: function(value) {
		if(value == this.__direction) {
			return value;
		}
		this.__direction = value;
		this.__dirty = true;
		return value;
	}
	,set_font: function(value) {
		if(value == this.font) {
			return value;
		}
		this.font = value;
		this.__dirty = true;
		return value;
	}
	,get_glyphs: function() {
		var glyphs = [];
		var _g = 0;
		var _g1 = this.get_positions();
		while(_g < _g1.length) {
			var position = _g1[_g];
			++_g;
			glyphs.push(position.glyph);
		}
		return glyphs;
	}
	,get_language: function() {
		return this.__language;
	}
	,set_language: function(value) {
		if(value == this.__language) {
			return value;
		}
		this.__language = value;
		this.__dirty = true;
		return value;
	}
	,get_script: function() {
		return this.__script;
	}
	,set_script: function(value) {
		if(value == this.__script) {
			return value;
		}
		this.__script = value;
		this.__dirty = true;
		return value;
	}
	,set_size: function(value) {
		if(value == this.size) {
			return value;
		}
		this.size = value;
		this.__dirty = true;
		return value;
	}
	,set_text: function(value) {
		if(value == this.text) {
			return value;
		}
		this.text = value;
		this.__dirty = true;
		return value;
	}
	,__class__: lime_text_TextLayout
	,__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 lime_text__$TextScript_TextScript_$Impl_$ = {};
$hxClasses["lime.text._TextScript.TextScript_Impl_"] = lime_text__$TextScript_TextScript_$Impl_$;
lime_text__$TextScript_TextScript_$Impl_$.__name__ = ["lime","text","_TextScript","TextScript_Impl_"];
lime_text__$TextScript_TextScript_$Impl_$.__properties__ = {get_rightToLeft:"get_rightToLeft"}
lime_text__$TextScript_TextScript_$Impl_$.get_rightToLeft = function(this1) {
	switch(this1) {
	case "Arab":case "Armi":case "Avst":case "Cprt":case "Hebr":case "Khar":case "Lydi":case "Mand":case "Nkoo":case "Orkh":case "Phli":case "Phlp":case "Phnx":case "Samr":case "Sarb":case "Syrc":case "Thaa":
		return true;
	default:
		return false;
	}
};
var lime_ui_Gamepad = function(id) {
	this.onDisconnect = new lime_app_Event_$Void_$Void();
	this.onButtonUp = new lime_app_Event_$lime_$ui_$GamepadButton_$Void();
	this.onButtonDown = new lime_app_Event_$lime_$ui_$GamepadButton_$Void();
	this.onAxisMove = new lime_app_Event_$lime_$ui_$GamepadAxis_$Float_$Void();
	this.id = id;
	this.connected = true;
};
$hxClasses["lime.ui.Gamepad"] = lime_ui_Gamepad;
lime_ui_Gamepad.__name__ = ["lime","ui","Gamepad"];
lime_ui_Gamepad.addMappings = function(mappings) {
};
lime_ui_Gamepad.__connect = function(id) {
	if(!lime_ui_Gamepad.devices.h.hasOwnProperty(id)) {
		var gamepad = new lime_ui_Gamepad(id);
		lime_ui_Gamepad.devices.h[id] = gamepad;
		lime_ui_Gamepad.onConnect.dispatch(gamepad);
	}
};
lime_ui_Gamepad.__disconnect = function(id) {
	var gamepad = lime_ui_Gamepad.devices.h[id];
	if(gamepad != null) {
		gamepad.connected = false;
	}
	lime_ui_Gamepad.devices.remove(id);
	if(gamepad != null) {
		gamepad.onDisconnect.dispatch();
	}
};
lime_ui_Gamepad.prototype = {
	get_guid: function() {
		return lime_ui_Joystick.__getDeviceData()[this.id].id;
	}
	,get_name: function() {
		return lime_ui_Joystick.__getDeviceData()[this.id].id;
	}
	,__class__: lime_ui_Gamepad
	,__properties__: {get_name:"get_name",get_guid:"get_guid"}
};
var lime_ui__$GamepadAxis_GamepadAxis_$Impl_$ = {};
$hxClasses["lime.ui._GamepadAxis.GamepadAxis_Impl_"] = lime_ui__$GamepadAxis_GamepadAxis_$Impl_$;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.__name__ = ["lime","ui","_GamepadAxis","GamepadAxis_Impl_"];
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.toString = function(this1) {
	switch(this1) {
	case 0:
		return "LEFT_X";
	case 1:
		return "LEFT_Y";
	case 2:
		return "RIGHT_X";
	case 3:
		return "RIGHT_Y";
	case 4:
		return "TRIGGER_LEFT";
	case 5:
		return "TRIGGER_RIGHT";
	default:
		return "UNKNOWN (" + this1 + ")";
	}
};
var lime_ui__$GamepadButton_GamepadButton_$Impl_$ = {};
$hxClasses["lime.ui._GamepadButton.GamepadButton_Impl_"] = lime_ui__$GamepadButton_GamepadButton_$Impl_$;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.__name__ = ["lime","ui","_GamepadButton","GamepadButton_Impl_"];
lime_ui__$GamepadButton_GamepadButton_$Impl_$.toString = function(this1) {
	switch(this1) {
	case 0:
		return "A";
	case 1:
		return "B";
	case 2:
		return "X";
	case 3:
		return "Y";
	case 4:
		return "BACK";
	case 5:
		return "GUIDE";
	case 6:
		return "START";
	case 7:
		return "LEFT_STICK";
	case 8:
		return "RIGHT_STICK";
	case 9:
		return "LEFT_SHOULDER";
	case 10:
		return "RIGHT_SHOULDER";
	case 11:
		return "DPAD_UP";
	case 12:
		return "DPAD_DOWN";
	case 13:
		return "DPAD_LEFT";
	case 14:
		return "DPAD_RIGHT";
	default:
		return "UNKNOWN (" + this1 + ")";
	}
};
var lime_ui_Joystick = function(id) {
	this.onTrackballMove = new lime_app_Event_$Int_$Float_$Void();
	this.onHatMove = new lime_app_Event_$Int_$lime_$ui_$JoystickHatPosition_$Void();
	this.onDisconnect = new lime_app_Event_$Void_$Void();
	this.onButtonUp = new lime_app_Event_$Int_$Void();
	this.onButtonDown = new lime_app_Event_$Int_$Void();
	this.onAxisMove = new lime_app_Event_$Int_$Float_$Void();
	this.id = id;
	this.connected = true;
};
$hxClasses["lime.ui.Joystick"] = lime_ui_Joystick;
lime_ui_Joystick.__name__ = ["lime","ui","Joystick"];
lime_ui_Joystick.__connect = function(id) {
	if(!lime_ui_Joystick.devices.h.hasOwnProperty(id)) {
		var joystick = new lime_ui_Joystick(id);
		lime_ui_Joystick.devices.h[id] = joystick;
		lime_ui_Joystick.onConnect.dispatch(joystick);
	}
};
lime_ui_Joystick.__disconnect = function(id) {
	var joystick = lime_ui_Joystick.devices.h[id];
	if(joystick != null) {
		joystick.connected = false;
	}
	lime_ui_Joystick.devices.remove(id);
	if(joystick != null) {
		joystick.onDisconnect.dispatch();
	}
};
lime_ui_Joystick.__getDeviceData = function() {
	if(navigator.getGamepads) {
		return navigator.getGamepads();
	} else if(navigator.webkitGetGamepads) {
		return navigator.webkitGetGamepads();
	} else {
		return null;
	}
};
lime_ui_Joystick.prototype = {
	get_guid: function() {
		return lime_ui_Joystick.__getDeviceData()[this.id].id;
	}
	,get_name: function() {
		return lime_ui_Joystick.__getDeviceData()[this.id].id;
	}
	,get_numAxes: function() {
		return lime_ui_Joystick.__getDeviceData()[this.id].axes.length;
	}
	,get_numButtons: function() {
		return lime_ui_Joystick.__getDeviceData()[this.id].buttons.length;
	}
	,get_numHats: function() {
		return 0;
	}
	,get_numTrackballs: function() {
		return 0;
	}
	,__class__: lime_ui_Joystick
	,__properties__: {get_numTrackballs:"get_numTrackballs",get_numHats:"get_numHats",get_numButtons:"get_numButtons",get_numAxes:"get_numAxes",get_name:"get_name",get_guid:"get_guid"}
};
var lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$ = {};
$hxClasses["lime.ui._JoystickHatPosition.JoystickHatPosition_Impl_"] = lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.__name__ = ["lime","ui","_JoystickHatPosition","JoystickHatPosition_Impl_"];
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.__properties__ = {set_up:"set_up",get_up:"get_up",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_down:"set_down",get_down:"get_down",set_center:"set_center",get_center:"get_center"}
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$._new = function(value) {
	return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_center = function(this1) {
	return this1 == 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_center = function(this1,value) {
	if(value) {
		this1 = 0;
	}
	return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_down = function(this1) {
	return (this1 & 4) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_down = function(this1,value) {
	if(value) {
		this1 |= 4;
	} else {
		this1 &= 268435451;
	}
	return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_left = function(this1) {
	return (this1 & 8) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_left = function(this1,value) {
	if(value) {
		this1 |= 8;
	} else {
		this1 &= 268435447;
	}
	return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_right = function(this1) {
	return (this1 & 2) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_right = function(this1,value) {
	if(value) {
		this1 |= 2;
	} else {
		this1 &= 268435453;
	}
	return value;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.get_up = function(this1) {
	return (this1 & 1) > 0;
};
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.set_up = function(this1,value) {
	if(value) {
		this1 |= 1;
	} else {
		this1 &= 268435454;
	}
	return value;
};
var lime_ui__$KeyCode_KeyCode_$Impl_$ = {};
$hxClasses["lime.ui._KeyCode.KeyCode_Impl_"] = lime_ui__$KeyCode_KeyCode_$Impl_$;
lime_ui__$KeyCode_KeyCode_$Impl_$.__name__ = ["lime","ui","_KeyCode","KeyCode_Impl_"];
lime_ui__$KeyCode_KeyCode_$Impl_$.gt = function(a,b) {
	return a > b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.gte = function(a,b) {
	return a >= b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.lt = function(a,b) {
	return a < b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.lte = function(a,b) {
	return a <= b;
};
lime_ui__$KeyCode_KeyCode_$Impl_$.plus = function(a,b) {
	return a + b;
};
var lime_ui__$KeyModifier_KeyModifier_$Impl_$ = {};
$hxClasses["lime.ui._KeyModifier.KeyModifier_Impl_"] = lime_ui__$KeyModifier_KeyModifier_$Impl_$;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.__name__ = ["lime","ui","_KeyModifier","KeyModifier_Impl_"];
lime_ui__$KeyModifier_KeyModifier_$Impl_$.__properties__ = {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"}
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey = function(this1) {
	if((this1 & 256) <= 0) {
		return (this1 & 512) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_altKey = function(this1,value) {
	if(value) {
		this1 |= 768;
	} else {
		this1 &= 268434687;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_capsLock = function(this1) {
	if((this1 & 8192) <= 0) {
		return (this1 & 8192) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_capsLock = function(this1,value) {
	if(value) {
		this1 |= 8192;
	} else {
		this1 &= 268427263;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey = function(this1) {
	if((this1 & 64) <= 0) {
		return (this1 & 128) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_ctrlKey = function(this1,value) {
	if(value) {
		this1 |= 192;
	} else {
		this1 &= 268435263;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey = function(this1) {
	if((this1 & 1024) <= 0) {
		return (this1 & 2048) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_metaKey = function(this1,value) {
	if(value) {
		this1 |= 3072;
	} else {
		this1 &= 268432383;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_numLock = function(this1) {
	if((this1 & 4096) <= 0) {
		return (this1 & 4096) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_numLock = function(this1,value) {
	if(value) {
		this1 |= 4096;
	} else {
		this1 &= 268431359;
	}
	return value;
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey = function(this1) {
	if((this1 & 1) <= 0) {
		return (this1 & 2) > 0;
	} else {
		return true;
	}
};
lime_ui__$KeyModifier_KeyModifier_$Impl_$.set_shiftKey = function(this1,value) {
	if(value) {
		this1 |= 3;
	} else {
		this1 &= 268435452;
	}
	return value;
};
var lime_ui_Mouse = function() { };
$hxClasses["lime.ui.Mouse"] = lime_ui_Mouse;
lime_ui_Mouse.__name__ = ["lime","ui","Mouse"];
lime_ui_Mouse.__properties__ = {set_lock:"set_lock",get_lock:"get_lock",set_cursor:"set_cursor",get_cursor:"get_cursor"}
lime_ui_Mouse.hide = function() {
	lime__$backend_html5_HTML5Mouse.hide();
};
lime_ui_Mouse.show = function() {
	lime__$backend_html5_HTML5Mouse.show();
};
lime_ui_Mouse.warp = function(x,y,window) {
};
lime_ui_Mouse.get_cursor = function() {
	return lime__$backend_html5_HTML5Mouse.get_cursor();
};
lime_ui_Mouse.set_cursor = function(value) {
	return lime__$backend_html5_HTML5Mouse.set_cursor(value);
};
lime_ui_Mouse.get_lock = function() {
	return lime__$backend_html5_HTML5Mouse.get_lock();
};
lime_ui_Mouse.set_lock = function(value) {
	return lime__$backend_html5_HTML5Mouse.set_lock(value);
};
var lime_ui_MouseCursor = $hxClasses["lime.ui.MouseCursor"] = { __ename__ : ["lime","ui","MouseCursor"], __constructs__ : ["ARROW","CROSSHAIR","DEFAULT","MOVE","POINTER","RESIZE_NESW","RESIZE_NS","RESIZE_NWSE","RESIZE_WE","TEXT","WAIT","WAIT_ARROW","CUSTOM"] };
lime_ui_MouseCursor.ARROW = ["ARROW",0];
lime_ui_MouseCursor.ARROW.toString = $estr;
lime_ui_MouseCursor.ARROW.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.CROSSHAIR = ["CROSSHAIR",1];
lime_ui_MouseCursor.CROSSHAIR.toString = $estr;
lime_ui_MouseCursor.CROSSHAIR.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.DEFAULT = ["DEFAULT",2];
lime_ui_MouseCursor.DEFAULT.toString = $estr;
lime_ui_MouseCursor.DEFAULT.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.MOVE = ["MOVE",3];
lime_ui_MouseCursor.MOVE.toString = $estr;
lime_ui_MouseCursor.MOVE.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.POINTER = ["POINTER",4];
lime_ui_MouseCursor.POINTER.toString = $estr;
lime_ui_MouseCursor.POINTER.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_NESW = ["RESIZE_NESW",5];
lime_ui_MouseCursor.RESIZE_NESW.toString = $estr;
lime_ui_MouseCursor.RESIZE_NESW.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_NS = ["RESIZE_NS",6];
lime_ui_MouseCursor.RESIZE_NS.toString = $estr;
lime_ui_MouseCursor.RESIZE_NS.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_NWSE = ["RESIZE_NWSE",7];
lime_ui_MouseCursor.RESIZE_NWSE.toString = $estr;
lime_ui_MouseCursor.RESIZE_NWSE.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.RESIZE_WE = ["RESIZE_WE",8];
lime_ui_MouseCursor.RESIZE_WE.toString = $estr;
lime_ui_MouseCursor.RESIZE_WE.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.TEXT = ["TEXT",9];
lime_ui_MouseCursor.TEXT.toString = $estr;
lime_ui_MouseCursor.TEXT.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.WAIT = ["WAIT",10];
lime_ui_MouseCursor.WAIT.toString = $estr;
lime_ui_MouseCursor.WAIT.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.WAIT_ARROW = ["WAIT_ARROW",11];
lime_ui_MouseCursor.WAIT_ARROW.toString = $estr;
lime_ui_MouseCursor.WAIT_ARROW.__enum__ = lime_ui_MouseCursor;
lime_ui_MouseCursor.CUSTOM = ["CUSTOM",12];
lime_ui_MouseCursor.CUSTOM.toString = $estr;
lime_ui_MouseCursor.CUSTOM.__enum__ = lime_ui_MouseCursor;
var lime_ui_Touch = function(x,y,id,dx,dy,pressure,device) {
	this.x = x;
	this.y = y;
	this.id = id;
	this.dx = dx;
	this.dy = dy;
	this.pressure = pressure;
	this.device = device;
};
$hxClasses["lime.ui.Touch"] = lime_ui_Touch;
lime_ui_Touch.__name__ = ["lime","ui","Touch"];
lime_ui_Touch.prototype = {
	__class__: lime_ui_Touch
};
var lime_ui_Window = function(config) {
	this.onTextInput = new lime_app_Event_$String_$Void();
	this.onTextEdit = new lime_app_Event_$String_$Int_$Int_$Void();
	this.onRestore = new lime_app_Event_$Void_$Void();
	this.onResize = new lime_app_Event_$Int_$Int_$Void();
	this.onMove = new lime_app_Event_$Float_$Float_$Void();
	this.onMouseWheel = new lime_app_Event_$Float_$Float_$Void();
	this.onMouseUp = new lime_app_Event_$Float_$Float_$Int_$Void();
	this.onMouseMoveRelative = new lime_app_Event_$Float_$Float_$Void();
	this.onMouseMove = new lime_app_Event_$Float_$Float_$Void();
	this.onMouseDown = new lime_app_Event_$Float_$Float_$Int_$Void();
	this.onMinimize = new lime_app_Event_$Void_$Void();
	this.onLeave = new lime_app_Event_$Void_$Void();
	this.onKeyUp = new lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void();
	this.onKeyDown = new lime_app_Event_$lime_$ui_$KeyCode_$lime_$ui_$KeyModifier_$Void();
	this.onFullscreen = new lime_app_Event_$Void_$Void();
	this.onFocusOut = new lime_app_Event_$Void_$Void();
	this.onFocusIn = new lime_app_Event_$Void_$Void();
	this.onEnter = new lime_app_Event_$Void_$Void();
	this.onDropFile = new lime_app_Event_$String_$Void();
	this.onDeactivate = new lime_app_Event_$Void_$Void();
	this.onCreate = new lime_app_Event_$Void_$Void();
	this.onClose = new lime_app_Event_$Void_$Void();
	this.onActivate = new lime_app_Event_$Void_$Void();
	this.config = config;
	this.__width = 0;
	this.__height = 0;
	this.__fullscreen = false;
	this.__scale = 1;
	this.__x = 0;
	this.__y = 0;
	this.__title = "";
	this.id = -1;
	if(config != null) {
		if(Object.prototype.hasOwnProperty.call(config,"width")) {
			this.__width = config.width;
		}
		if(Object.prototype.hasOwnProperty.call(config,"height")) {
			this.__height = config.height;
		}
		if(Object.prototype.hasOwnProperty.call(config,"x")) {
			this.__x = config.x;
		}
		if(Object.prototype.hasOwnProperty.call(config,"y")) {
			this.__y = config.y;
		}
		if(Object.prototype.hasOwnProperty.call(config,"fullscreen")) {
			this.__fullscreen = config.fullscreen;
		}
		if(Object.prototype.hasOwnProperty.call(config,"borderless")) {
			this.__borderless = config.borderless;
		}
		if(Object.prototype.hasOwnProperty.call(config,"resizable")) {
			this.__resizable = config.resizable;
		}
		if(Object.prototype.hasOwnProperty.call(config,"title")) {
			this.__title = config.title;
		}
	}
	this.backend = new lime__$backend_html5_HTML5Window(this);
};
$hxClasses["lime.ui.Window"] = lime_ui_Window;
lime_ui_Window.__name__ = ["lime","ui","Window"];
lime_ui_Window.prototype = {
	alert: function(message,title) {
		this.backend.alert(message,title);
	}
	,close: function() {
		this.backend.close();
	}
	,create: function(application) {
		this.application = application;
		this.backend.create(application);
		if(this.renderer != null) {
			this.renderer.create();
		}
	}
	,focus: function() {
	}
	,move: function(x,y) {
		this.__x = x;
		this.__y = y;
	}
	,resize: function(width,height) {
		this.__width = width;
		this.__height = height;
	}
	,setIcon: function(image) {
		if(image == null) {
			return;
		}
	}
	,toString: function() {
		return "[object Window]";
	}
	,get_display: function() {
		return this.backend.getDisplay();
	}
	,get_borderless: function() {
		return this.__borderless;
	}
	,set_borderless: function(value) {
		return this.__borderless = this.backend.setBorderless(value);
	}
	,get_enableTextEvents: function() {
		return this.backend.getEnableTextEvents();
	}
	,set_enableTextEvents: function(value) {
		return this.backend.setEnableTextEvents(value);
	}
	,get_fullscreen: function() {
		return this.__fullscreen;
	}
	,set_fullscreen: function(value) {
		return this.__fullscreen = this.backend.setFullscreen(value);
	}
	,get_height: function() {
		return this.__height;
	}
	,set_height: function(value) {
		this.resize(this.__width,value);
		return this.__height;
	}
	,get_maximized: function() {
		return this.__maximized;
	}
	,set_maximized: function(value) {
		this.__minimized = false;
		return this.__maximized = this.backend.setMaximized(value);
	}
	,get_minimized: function() {
		return this.__minimized;
	}
	,set_minimized: function(value) {
		this.__maximized = false;
		return this.__minimized = this.backend.setMinimized(value);
	}
	,get_resizable: function() {
		return this.__resizable;
	}
	,set_resizable: function(value) {
		this.__resizable = this.backend.setResizable(value);
		return this.__resizable;
	}
	,get_scale: function() {
		return this.__scale;
	}
	,get_title: function() {
		return this.__title;
	}
	,set_title: function(value) {
		return this.__title = this.backend.setTitle(this.__title);
	}
	,get_width: function() {
		return this.__width;
	}
	,set_width: function(value) {
		this.resize(value,this.__height);
		return this.__width;
	}
	,get_x: function() {
		return this.__x;
	}
	,set_x: function(value) {
		this.move(value,this.__y);
		return this.__x;
	}
	,get_y: function() {
		return this.__y;
	}
	,set_y: function(value) {
		this.move(this.__x,value);
		return this.__y;
	}
	,__class__: lime_ui_Window
	,__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_title:"set_title",get_title:"get_title",get_scale:"get_scale",set_resizable:"set_resizable",get_resizable:"get_resizable",set_minimized:"set_minimized",get_minimized:"get_minimized",set_maximized:"set_maximized",get_maximized:"get_maximized",set_height:"set_height",get_height:"get_height",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_enableTextEvents:"set_enableTextEvents",get_enableTextEvents:"get_enableTextEvents",get_display:"get_display",set_borderless:"set_borderless",get_borderless:"get_borderless"}
};
var lime_utils_TAError = $hxClasses["lime.utils.TAError"] = { __ename__ : ["lime","utils","TAError"], __constructs__ : ["RangeError"] };
lime_utils_TAError.RangeError = ["RangeError",0];
lime_utils_TAError.RangeError.toString = $estr;
lime_utils_TAError.RangeError.__enum__ = lime_utils_TAError;
var lime_utils_Bytes = function(length,bytesData) {
	haxe_io_Bytes.call(this,bytesData);
};
$hxClasses["lime.utils.Bytes"] = lime_utils_Bytes;
lime_utils_Bytes.__name__ = ["lime","utils","Bytes"];
lime_utils_Bytes.alloc = function(length) {
	var bytes = new haxe_io_Bytes(new ArrayBuffer(length));
	return new lime_utils_Bytes(bytes.length,bytes.b.bufferValue);
};
lime_utils_Bytes.fastGet = function(b,pos) {
	return b.bytes[pos];
};
lime_utils_Bytes.ofData = function(b) {
	var bytes = haxe_io_Bytes.ofData(b);
	return new lime_utils_Bytes(bytes.length,bytes.b.bufferValue);
};
lime_utils_Bytes.ofString = function(s) {
	var bytes = haxe_io_Bytes.ofString(s);
	return new lime_utils_Bytes(bytes.length,bytes.b.bufferValue);
};
lime_utils_Bytes.readFile = function(path) {
	return null;
};
lime_utils_Bytes.lime_bytes_from_data_pointer = function(data,length) {
	return lime_utils_Bytes.cffi_lime_bytes_from_data_pointer(data,length);
};
lime_utils_Bytes.lime_bytes_get_data_pointer = function(data) {
	return lime_utils_Bytes.cffi_lime_bytes_get_data_pointer(data);
};
lime_utils_Bytes.lime_bytes_read_file = function(path) {
	return lime_utils_Bytes.cffi_lime_bytes_read_file(path);
};
lime_utils_Bytes.__super__ = haxe_io_Bytes;
lime_utils_Bytes.prototype = $extend(haxe_io_Bytes.prototype,{
	__class__: lime_utils_Bytes
});
var lime_utils__$Float32Array_Float32Array_$Impl_$ = {};
$hxClasses["lime.utils._Float32Array.Float32Array_Impl_"] = lime_utils__$Float32Array_Float32Array_$Impl_$;
lime_utils__$Float32Array_Float32Array_$Impl_$.__name__ = ["lime","utils","_Float32Array","Float32Array_Impl_"];
lime_utils__$Float32Array_Float32Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$Float32Array_Float32Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$Float32Array_Float32Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Float32Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Float32Array(bytes.b.bufferValue,byteOffset);
	}
	return new Float32Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Float32Array_Float32Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Float32Array_Float32Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "Float32Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils_GLUtils = function() { };
$hxClasses["lime.utils.GLUtils"] = lime_utils_GLUtils;
lime_utils_GLUtils.__name__ = ["lime","utils","GLUtils"];
lime_utils_GLUtils.compileShader = function(source,type) {
	var shader = lime_graphics_opengl_GL.context.createShader(type);
	lime_graphics_opengl_GL.context.shaderSource(shader,source);
	lime_graphics_opengl_GL.context.compileShader(shader);
	if(lime_graphics_opengl_GL.context.getShaderParameter(shader,35713) == 0) {
		switch(type) {
		case 35632:
			throw new js__$Boot_HaxeError("Error compiling fragment shader");
			break;
		case 35633:
			throw new js__$Boot_HaxeError("Error compiling vertex shader");
			break;
		default:
			throw new js__$Boot_HaxeError("Error compiling unknown shader type");
		}
	}
	return shader;
};
lime_utils_GLUtils.createProgram = function(vertexSource,fragmentSource) {
	var vertexShader = lime_utils_GLUtils.compileShader(vertexSource,35633);
	var fragmentShader = lime_utils_GLUtils.compileShader(fragmentSource,35632);
	var program = lime_graphics_opengl_GL.context.createProgram();
	lime_graphics_opengl_GL.context.attachShader(program,vertexShader);
	lime_graphics_opengl_GL.context.attachShader(program,fragmentShader);
	lime_graphics_opengl_GL.context.linkProgram(program);
	if(lime_graphics_opengl_GL.context.getProgramParameter(program,35714) == 0) {
		throw new js__$Boot_HaxeError("Unable to initialize the shader program.");
	}
	return program;
};
var lime_utils__$Int16Array_Int16Array_$Impl_$ = {};
$hxClasses["lime.utils._Int16Array.Int16Array_Impl_"] = lime_utils__$Int16Array_Int16Array_$Impl_$;
lime_utils__$Int16Array_Int16Array_$Impl_$.__name__ = ["lime","utils","_Int16Array","Int16Array_Impl_"];
lime_utils__$Int16Array_Int16Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$Int16Array_Int16Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$Int16Array_Int16Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Int16Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Int16Array(bytes.b.bufferValue,byteOffset);
	}
	return new Int16Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Int16Array_Int16Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Int16Array_Int16Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "Int16Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils__$Int32Array_Int32Array_$Impl_$ = {};
$hxClasses["lime.utils._Int32Array.Int32Array_Impl_"] = lime_utils__$Int32Array_Int32Array_$Impl_$;
lime_utils__$Int32Array_Int32Array_$Impl_$.__name__ = ["lime","utils","_Int32Array","Int32Array_Impl_"];
lime_utils__$Int32Array_Int32Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$Int32Array_Int32Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$Int32Array_Int32Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Int32Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Int32Array(bytes.b.bufferValue,byteOffset);
	}
	return new Int32Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$Int32Array_Int32Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$Int32Array_Int32Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "Int32Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils_LZMA = function() { };
$hxClasses["lime.utils.LZMA"] = lime_utils_LZMA;
lime_utils_LZMA.__name__ = ["lime","utils","LZMA"];
lime_utils_LZMA.decode = function(bytes) {
	return null;
};
lime_utils_LZMA.encode = function(bytes) {
	return null;
};
var lime_utils__$UInt16Array_UInt16Array_$Impl_$ = {};
$hxClasses["lime.utils._UInt16Array.UInt16Array_Impl_"] = lime_utils__$UInt16Array_UInt16Array_$Impl_$;
lime_utils__$UInt16Array_UInt16Array_$Impl_$.__name__ = ["lime","utils","_UInt16Array","UInt16Array_Impl_"];
lime_utils__$UInt16Array_UInt16Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Uint16Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Uint16Array(bytes.b.bufferValue,byteOffset);
	}
	return new Uint16Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt16Array_UInt16Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "UInt16Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils__$UInt32Array_UInt32Array_$Impl_$ = {};
$hxClasses["lime.utils._UInt32Array.UInt32Array_Impl_"] = lime_utils__$UInt32Array_UInt32Array_$Impl_$;
lime_utils__$UInt32Array_UInt32Array_$Impl_$.__name__ = ["lime","utils","_UInt32Array","UInt32Array_Impl_"];
lime_utils__$UInt32Array_UInt32Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		byteOffset = 0;
	}
	if(byteOffset == null) {
		return new Uint32Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Uint32Array(bytes.b.bufferValue,byteOffset);
	}
	return new Uint32Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt32Array_UInt32Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "UInt32Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var lime_utils__$UInt8Array_UInt8Array_$Impl_$ = {};
$hxClasses["lime.utils._UInt8Array.UInt8Array_Impl_"] = lime_utils__$UInt8Array_UInt8Array_$Impl_$;
lime_utils__$UInt8Array_UInt8Array_$Impl_$.__name__ = ["lime","utils","_UInt8Array","UInt8Array_Impl_"];
lime_utils__$UInt8Array_UInt8Array_$Impl_$.__set = function(this1,idx,val) {
	return this1[idx] = val;
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.__get = function(this1,idx) {
	return this1[idx];
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.fromBytes = function(bytes,byteOffset,len) {
	if(byteOffset == null) {
		return new Uint8Array(bytes.b.bufferValue);
	}
	if(len == null) {
		return new Uint8Array(bytes.b.bufferValue,byteOffset);
	}
	return new Uint8Array(bytes.b.bufferValue,byteOffset,len);
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.toBytes = function(this1) {
	return new haxe_io_Bytes(new Uint8Array(this1.buffer));
};
lime_utils__$UInt8Array_UInt8Array_$Impl_$.toString = function(this1) {
	if(this1 != null) {
		return "UInt8Array [byteLength:" + this1.byteLength + ", length:" + this1.length + "]";
	} else {
		return null;
	}
};
var openfl_IAssetCache = function() { };
$hxClasses["openfl.IAssetCache"] = openfl_IAssetCache;
openfl_IAssetCache.__name__ = ["openfl","IAssetCache"];
openfl_IAssetCache.prototype = {
	__class__: openfl_IAssetCache
	,__properties__: {set_enabled:"set_enabled",get_enabled:"get_enabled"}
};
var openfl_AssetCache = function() {
	this.__enabled = true;
	this.bitmapData = new haxe_ds_StringMap();
	this.font = new haxe_ds_StringMap();
	this.sound = new haxe_ds_StringMap();
};
$hxClasses["openfl.AssetCache"] = openfl_AssetCache;
openfl_AssetCache.__name__ = ["openfl","AssetCache"];
openfl_AssetCache.__interfaces__ = [openfl_IAssetCache];
openfl_AssetCache.prototype = {
	clear: function(prefix) {
		if(prefix == null) {
			this.bitmapData = new haxe_ds_StringMap();
			this.font = new haxe_ds_StringMap();
			this.sound = new haxe_ds_StringMap();
		} else {
			var keys = this.bitmapData.keys();
			while(keys.hasNext()) {
				var key = keys.next();
				if(StringTools.startsWith(key,prefix)) {
					this.bitmapData.remove(key);
				}
			}
			var keys1 = this.font.keys();
			while(keys1.hasNext()) {
				var key1 = keys1.next();
				if(StringTools.startsWith(key1,prefix)) {
					this.font.remove(key1);
				}
			}
			var keys2 = this.sound.keys();
			while(keys2.hasNext()) {
				var key2 = keys2.next();
				if(StringTools.startsWith(key2,prefix)) {
					this.sound.remove(key2);
				}
			}
		}
	}
	,getBitmapData: function(id) {
		var _this = this.bitmapData;
		if(__map_reserved[id] != null) {
			return _this.getReserved(id);
		} else {
			return _this.h[id];
		}
	}
	,getFont: function(id) {
		var _this = this.font;
		if(__map_reserved[id] != null) {
			return _this.getReserved(id);
		} else {
			return _this.h[id];
		}
	}
	,getSound: function(id) {
		var _this = this.sound;
		if(__map_reserved[id] != null) {
			return _this.getReserved(id);
		} else {
			return _this.h[id];
		}
	}
	,hasBitmapData: function(id) {
		var _this = this.bitmapData;
		if(__map_reserved[id] != null) {
			return _this.existsReserved(id);
		} else {
			return _this.h.hasOwnProperty(id);
		}
	}
	,hasFont: function(id) {
		var _this = this.font;
		if(__map_reserved[id] != null) {
			return _this.existsReserved(id);
		} else {
			return _this.h.hasOwnProperty(id);
		}
	}
	,hasSound: function(id) {
		var _this = this.sound;
		if(__map_reserved[id] != null) {
			return _this.existsReserved(id);
		} else {
			return _this.h.hasOwnProperty(id);
		}
	}
	,removeBitmapData: function(id) {
		return this.bitmapData.remove(id);
	}
	,removeFont: function(id) {
		return this.font.remove(id);
	}
	,removeSound: function(id) {
		return this.sound.remove(id);
	}
	,setBitmapData: function(id,bitmapData) {
		var _this = this.bitmapData;
		if(__map_reserved[id] != null) {
			_this.setReserved(id,bitmapData);
		} else {
			_this.h[id] = bitmapData;
		}
	}
	,setFont: function(id,font) {
		var _this = this.font;
		if(__map_reserved[id] != null) {
			_this.setReserved(id,font);
		} else {
			_this.h[id] = font;
		}
	}
	,setSound: function(id,sound) {
		var _this = this.sound;
		if(__map_reserved[id] != null) {
			_this.setReserved(id,sound);
		} else {
			_this.h[id] = sound;
		}
	}
	,get_enabled: function() {
		return this.__enabled;
	}
	,set_enabled: function(value) {
		return this.__enabled = value;
	}
	,__class__: openfl_AssetCache
	,__properties__: {set_enabled:"set_enabled",get_enabled:"get_enabled"}
};
var openfl_Assets = function() { };
$hxClasses["openfl.Assets"] = openfl_Assets;
openfl_Assets.__name__ = ["openfl","Assets"];
openfl_Assets.addEventListener = function(type,listener,useCapture,priority,useWeakReference) {
	if(useWeakReference == null) {
		useWeakReference = false;
	}
	if(priority == null) {
		priority = 0;
	}
	if(useCapture == null) {
		useCapture = false;
	}
	if(!lime_Assets.onChange.has(openfl_Assets.LimeAssets_onChange)) {
		lime_Assets.onChange.add(openfl_Assets.LimeAssets_onChange);
	}
	openfl_Assets.dispatcher.addEventListener(type,listener,useCapture,priority,useWeakReference);
};
openfl_Assets.dispatchEvent = function(event) {
	return openfl_Assets.dispatcher.dispatchEvent(event);
};
openfl_Assets.exists = function(id,type) {
	return lime_Assets.exists(id,type);
};
openfl_Assets.getBitmapData = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasBitmapData(id)) {
		var bitmapData = openfl_Assets.cache.getBitmapData(id);
		if(openfl_Assets.isValidBitmapData(bitmapData)) {
			return bitmapData;
		}
	}
	var image = lime_Assets.getImage(id,false);
	if(image != null) {
		var bitmapData1 = openfl_display_BitmapData.fromImage(image);
		if(useCache && openfl_Assets.cache.get_enabled()) {
			openfl_Assets.cache.setBitmapData(id,bitmapData1);
		}
		return bitmapData1;
	}
	return null;
};
openfl_Assets.getBytes = function(id) {
	return openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(lime_Assets.getBytes(id));
};
openfl_Assets.getFont = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasFont(id)) {
		return openfl_Assets.cache.getFont(id);
	}
	var limeFont = lime_Assets.getFont(id,false);
	if(limeFont != null) {
		var font = openfl_text_Font.__fromLimeFont(limeFont);
		if(useCache && openfl_Assets.cache.get_enabled()) {
			openfl_Assets.cache.setFont(id,font);
		}
		return font;
	}
	return new openfl_text_Font();
};
openfl_Assets.getLibrary = function(name) {
	return lime_Assets.getLibrary(name);
};
openfl_Assets.getMovieClip = function(id) {
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = openfl_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"MOVIE_CLIP")) {
			if(library.isLocal(symbolName,"MOVIE_CLIP")) {
				return library.getMovieClip(symbolName);
			} else {
				haxe_Log.trace("[openfl.Assets] MovieClip asset \"" + id + "\" exists, but only asynchronously",{ fileName : "Assets.hx", lineNumber : 223, className : "openfl.Assets", methodName : "getMovieClip"});
			}
		} else {
			haxe_Log.trace("[openfl.Assets] There is no MovieClip asset with an ID of \"" + id + "\"",{ fileName : "Assets.hx", lineNumber : 229, className : "openfl.Assets", methodName : "getMovieClip"});
		}
	} else {
		haxe_Log.trace("[openfl.Assets] There is no asset library named \"" + libraryName + "\"",{ fileName : "Assets.hx", lineNumber : 235, className : "openfl.Assets", methodName : "getMovieClip"});
	}
	return null;
};
openfl_Assets.getMusic = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	var path = lime_Assets.getPath(id);
	if(path != null) {
		return new openfl_media_Sound(new openfl_net_URLRequest(path));
	}
	return null;
};
openfl_Assets.getPath = function(id) {
	return lime_Assets.getPath(id);
};
openfl_Assets.getSound = function(id,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasSound(id)) {
		var sound = openfl_Assets.cache.getSound(id);
		if(openfl_Assets.isValidSound(sound)) {
			return sound;
		}
	}
	var path = lime_Assets.getPath(id);
	if(path != null) {
		return new openfl_media_Sound(new openfl_net_URLRequest(path));
	}
	return null;
};
openfl_Assets.getText = function(id) {
	return lime_Assets.getText(id);
};
openfl_Assets.hasEventListener = function(type) {
	return openfl_Assets.dispatcher.hasEventListener(type);
};
openfl_Assets.isLocal = function(id,type,useCache) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache && openfl_Assets.cache.get_enabled()) {
		if(type == "IMAGE" || type == null) {
			if(openfl_Assets.cache.hasBitmapData(id)) {
				return true;
			}
		}
		if(type == "FONT" || type == null) {
			if(openfl_Assets.cache.hasFont(id)) {
				return true;
			}
		}
		if(type == "SOUND" || type == "MUSIC" || type == null) {
			if(openfl_Assets.cache.hasSound(id)) {
				return true;
			}
		}
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = openfl_Assets.getLibrary(libraryName);
	if(library != null) {
		return library.isLocal(symbolName,type);
	}
	return false;
};
openfl_Assets.isValidBitmapData = function(bitmapData) {
	if(bitmapData != null) {
		return bitmapData.image != null;
	} else {
		return false;
	}
};
openfl_Assets.isValidSound = function(sound) {
	return true;
};
openfl_Assets.list = function(type) {
	return lime_Assets.list(type);
};
openfl_Assets.loadBitmapData = function(id,useCache,handler) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache == null) {
		useCache = true;
	}
	var promise = new lime_app_Promise();
	if(handler != null) {
		promise.future.onComplete(handler);
		promise.future.onError(function(_) {
			handler(null);
		});
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasBitmapData(id)) {
		var bitmapData = openfl_Assets.cache.getBitmapData(id);
		if(openfl_Assets.isValidBitmapData(bitmapData)) {
			promise.complete(bitmapData);
			return promise.future;
		}
	}
	lime_Assets.loadImage(id,false).onComplete(function(image) {
		if(image != null) {
			var bitmapData1 = openfl_display_BitmapData.fromImage(image);
			if(useCache && openfl_Assets.cache.get_enabled()) {
				openfl_Assets.cache.setBitmapData(id,bitmapData1);
			}
			promise.complete(bitmapData1);
		} else {
			promise.error("[Assets] Could not load Image \"" + id + "\"");
		}
	}).onError($bind(promise,promise.error)).onProgress($bind(promise,promise.progress));
	return promise.future;
};
openfl_Assets.loadBytes = function(id,handler) {
	var promise = new lime_app_Promise();
	var future = lime_Assets.loadBytes(id);
	if(handler != null) {
		promise.future.onComplete(handler);
		promise.future.onError(function(_) {
			handler(null);
		});
		future.onComplete(function(bytes) {
			promise.complete(openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes(bytes));
		});
		future.onProgress(function(progress) {
			promise.progress(progress);
		});
		future.onError(function(msg) {
			promise.error(msg);
		});
	}
	return promise.future;
};
openfl_Assets.loadFont = function(id,useCache,handler) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache == null) {
		useCache = true;
	}
	var promise = new lime_app_Promise();
	if(handler != null) {
		promise.future.onComplete(handler);
		promise.future.onError(function(_) {
			handler(null);
		});
	}
	if(useCache && openfl_Assets.cache.get_enabled() && openfl_Assets.cache.hasFont(id)) {
		var tmp = openfl_Assets.cache.getFont(id);
		promise.complete(tmp);
		return promise.future;
	}
	lime_Assets.loadFont(id).onComplete(function(limeFont) {
		var font = openfl_text_Font.__fromLimeFont(limeFont);
		if(useCache && openfl_Assets.cache.get_enabled()) {
			openfl_Assets.cache.setFont(id,font);
		}
		promise.complete(font);
	}).onError($bind(promise,promise.error)).onProgress($bind(promise,promise.progress));
	return promise.future;
};
openfl_Assets.loadLibrary = function(name,handler) {
	var future = lime_Assets.loadLibrary(name);
	if(handler != null) {
		future.onComplete(handler);
		future.onError(function(_) {
			handler(null);
		});
	}
	return future;
};
openfl_Assets.loadMusic = function(id,useCache,handler) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache == null) {
		useCache = true;
	}
	return new lime_app_Future(function() {
		return openfl_Assets.getMusic(id,useCache);
	});
};
openfl_Assets.loadMovieClip = function(id,handler) {
	var promise = new lime_app_Promise();
	if(handler != null) {
		promise.future.onComplete(handler);
		promise.future.onError(function(_) {
			handler(null);
		});
	}
	var libraryName = id.substring(0,id.indexOf(":"));
	var symbolName = HxOverrides.substr(id,id.indexOf(":") + 1,null);
	var library = openfl_Assets.getLibrary(libraryName);
	if(library != null) {
		if(library.exists(symbolName,"MOVIE_CLIP")) {
			promise.completeWith(library.loadMovieClip(symbolName));
		} else {
			promise.error("[Assets] There is no MovieClip asset with an ID of \"" + id + "\"");
		}
	} else {
		promise.error("[Assets] There is no asset library named \"" + libraryName + "\"");
	}
	return promise.future;
};
openfl_Assets.loadSound = function(id,useCache,handler) {
	if(useCache == null) {
		useCache = true;
	}
	if(useCache == null) {
		useCache = true;
	}
	return new lime_app_Future(function() {
		return openfl_Assets.getSound(id,useCache);
	});
};
openfl_Assets.loadText = function(id,handler) {
	var future = lime_Assets.loadText(id);
	if(handler != null) {
		future.onComplete(handler);
		future.onError(function(_) {
			handler(null);
		});
	}
	return future;
};
openfl_Assets.registerLibrary = function(name,library) {
	lime_Assets.registerLibrary(name,library);
};
openfl_Assets.removeEventListener = function(type,listener,capture) {
	if(capture == null) {
		capture = false;
	}
	openfl_Assets.dispatcher.removeEventListener(type,listener,capture);
};
openfl_Assets.resolveClass = function(name) {
	return Type.resolveClass(name);
};
openfl_Assets.resolveEnum = function(name) {
	return Type.resolveEnum(name);
};
openfl_Assets.unloadLibrary = function(name) {
	lime_Assets.unloadLibrary(name);
};
openfl_Assets.LimeAssets_onChange = function() {
	openfl_Assets.dispatchEvent(new openfl_events_Event("change"));
};
var openfl_AssetLibrary = function() {
	lime_AssetLibrary.call(this);
};
$hxClasses["openfl.AssetLibrary"] = openfl_AssetLibrary;
openfl_AssetLibrary.__name__ = ["openfl","AssetLibrary"];
openfl_AssetLibrary.__super__ = lime_AssetLibrary;
openfl_AssetLibrary.prototype = $extend(lime_AssetLibrary.prototype,{
	getMovieClip: function(id) {
		return null;
	}
	,loadMovieClip: function(id) {
		var _gthis = this;
		return new lime_app_Future(function() {
			return _gthis.getMovieClip(id);
		});
	}
	,__class__: openfl_AssetLibrary
});
var openfl_display_MovieClip = function() {
	openfl_display_Sprite.call(this);
	this.__currentFrame = 0;
	this.__currentLabels = [];
	this.__totalFrames = 0;
	this.enabled = true;
};
$hxClasses["openfl.display.MovieClip"] = openfl_display_MovieClip;
openfl_display_MovieClip.__name__ = ["openfl","display","MovieClip"];
openfl_display_MovieClip.__super__ = openfl_display_Sprite;
openfl_display_MovieClip.prototype = $extend(openfl_display_Sprite.prototype,{
	addFrameScript: function(index,method) {
		if(method != null) {
			if(this.__frameScripts == null) {
				this.__frameScripts = new haxe_ds_IntMap();
			}
			this.__frameScripts.h[index] = method;
		} else if(this.__frameScripts != null) {
			this.__frameScripts.remove(index);
		}
	}
	,gotoAndPlay: function(frame,scene) {
	}
	,gotoAndStop: function(frame,scene) {
	}
	,nextFrame: function() {
	}
	,play: function() {
	}
	,prevFrame: function() {
	}
	,stop: function() {
	}
	,get_currentFrame: function() {
		return this.__currentFrame;
	}
	,get_currentFrameLabel: function() {
		return this.__currentFrameLabel;
	}
	,get_currentLabel: function() {
		return this.__currentLabel;
	}
	,get_currentLabels: function() {
		return this.__currentLabels;
	}
	,get_framesLoaded: function() {
		return this.__totalFrames;
	}
	,get_totalFrames: function() {
		return this.__totalFrames;
	}
	,__class__: openfl_display_MovieClip
	,__properties__: $extend(openfl_display_Sprite.prototype.__properties__,{get_totalFrames:"get_totalFrames",get_framesLoaded:"get_framesLoaded",get_currentLabels:"get_currentLabels",get_currentLabel:"get_currentLabel",get_currentFrameLabel:"get_currentFrameLabel",get_currentFrame:"get_currentFrame"})
});
var openfl_Lib = function() { };
$hxClasses["openfl.Lib"] = openfl_Lib;
openfl_Lib.__name__ = ["openfl","Lib"];
openfl_Lib.application = null;
openfl_Lib["as"] = function(v,c) {
	if(js_Boot.__instanceof(v,c)) {
		return v;
	} else {
		return null;
	}
};
openfl_Lib.attach = function(name) {
	return new openfl_display_MovieClip();
};
openfl_Lib.embed = $hx_exports["openfl"]["embed"] = function(elementName,width,height,background,assetsPrefix) {
	lime_system_System.embed(elementName,width,height,background,assetsPrefix);
};
openfl_Lib.getTimer = function() {
	return lime_system_System.getTimer();
};
openfl_Lib.getURL = function(request,target) {
	if(target == null) {
		target = "_blank";
	}
	window.open(request.url,target);
};
openfl_Lib.notImplemented = function(api) {
	var _this = openfl_Lib.__sentWarnings;
	if(!(__map_reserved[api] != null ? _this.existsReserved(api) : _this.h.hasOwnProperty(api))) {
		var _this1 = openfl_Lib.__sentWarnings;
		if(__map_reserved[api] != null) {
			_this1.setReserved(api,true);
		} else {
			_this1.h[api] = true;
		}
		haxe_Log.trace("Warning: " + api + " is not implemented",{ fileName : "Lib.hx", lineNumber : 113, className : "openfl.Lib", methodName : "notImplemented"});
	}
};
openfl_Lib.preventDefaultTouchMove = function() {
	window.document.addEventListener("touchmove",function(evt) {
		evt.preventDefault();
	},false);
};
openfl_Lib.trace = function(arg) {
	haxe_Log.trace(arg,{ fileName : "Lib.hx", lineNumber : 144, className : "openfl.Lib", methodName : "trace"});
};
var openfl__$Vector_Vector_$Impl_$ = {};
$hxClasses["openfl._Vector.Vector_Impl_"] = openfl__$Vector_Vector_$Impl_$;
openfl__$Vector_Vector_$Impl_$.__name__ = ["openfl","_Vector","Vector_Impl_"];
openfl__$Vector_Vector_$Impl_$.__properties__ = {set_fixed:"set_fixed",get_fixed:"get_fixed",set_length:"set_length",get_length:"get_length"}
openfl__$Vector_Vector_$Impl_$._new = function(length,fixed) {
	if(fixed == null) {
		fixed = false;
	}
	if(length == null) {
		length = 0;
	}
	var this1 = new openfl_VectorData();
	this1.data = new Array(length);
	this1.length = length;
	this1.fixed = fixed;
	return this1;
};
openfl__$Vector_Vector_$Impl_$.concat = function(this1,a) {
	var vectorData = new openfl_VectorData();
	vectorData.length = a != null ? this1.length + a.length : this1.length;
	vectorData.fixed = false;
	var length = vectorData.length;
	vectorData.data = new Array(length);
	haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
	if(a != null) {
		haxe_ds__$Vector_Vector_$Impl_$.blit(a.data,0,vectorData.data,this1.length,a.length);
	}
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.copy = function(this1) {
	var vectorData = new openfl_VectorData();
	vectorData.length = this1.length;
	vectorData.fixed = this1.fixed;
	var length = this1.length;
	vectorData.data = new Array(length);
	haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.iterator = function(this1) {
	return new openfl_VectorDataIterator(this1);
};
openfl__$Vector_Vector_$Impl_$.join = function(this1,sep) {
	var output = "";
	var _g1 = 0;
	var _g = this1.length;
	while(_g1 < _g) {
		var i = _g1++;
		if(i > 0) {
			output += sep;
		}
		output += Std.string(this1.data[i]);
	}
	return output;
};
openfl__$Vector_Vector_$Impl_$.pop = function(this1) {
	var value = null;
	if(!this1.fixed) {
		if(this1.length > 0) {
			this1.length--;
			value = this1.data[this1.length];
		}
	}
	return value;
};
openfl__$Vector_Vector_$Impl_$.push = function(this1,x) {
	if(!this1.fixed) {
		this1.length++;
		if(this1.data.length < this1.length) {
			var length = this1.data.length + 10;
			var data = new Array(length);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
			this1.data = data;
		}
		this1.data[this1.length - 1] = x;
	}
	return this1.length;
};
openfl__$Vector_Vector_$Impl_$.reverse = function(this1) {
	var length = this1.length;
	var data = new Array(length);
	var _g1 = 0;
	var _g = this1.length;
	while(_g1 < _g) {
		var i = _g1++;
		data[this1.length - 1 - i] = this1.data[i];
	}
	this1.data = data;
};
openfl__$Vector_Vector_$Impl_$.shift = function(this1) {
	if(!this1.fixed && this1.length > 0) {
		this1.length--;
		var value = this1.data[0];
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,1,this1.data,0,this1.length);
		return value;
	}
	return null;
};
openfl__$Vector_Vector_$Impl_$.unshift = function(this1,x) {
	if(!this1.fixed) {
		this1.length++;
		if(this1.data.length < this1.length) {
			var length = this1.length + 10;
			var data = new Array(length);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,1,this1.data.length);
			this1.data = data;
		} else {
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,this1.data,1,this1.length - 1);
		}
		this1.data[0] = x;
	}
};
openfl__$Vector_Vector_$Impl_$.slice = function(this1,pos,end) {
	if(end == null) {
		end = 0;
	}
	if(pos == null) {
		pos = 0;
	}
	if(pos < 0) {
		pos += this1.length;
	}
	if(end <= 0) {
		end += this1.length;
	}
	if(end > this1.length) {
		end = this1.length;
	}
	var length = end - pos;
	if(length <= 0 || length > this1.length) {
		length = this1.length;
	}
	var vectorData = new openfl_VectorData();
	vectorData.length = end - pos;
	vectorData.fixed = true;
	vectorData.data = new Array(length);
	haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos,vectorData.data,0,length);
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.sort = function(this1,f) {
	var array = this1.data.slice(0);
	array.sort(f);
	this1.data = array.slice(0);
};
openfl__$Vector_Vector_$Impl_$.splice = function(this1,pos,len) {
	if(pos < 0) {
		pos += this1.length;
	}
	if(pos + len > this1.length) {
		len = this1.length - pos;
	}
	if(len < 0) {
		len = 0;
	}
	var vectorData = new openfl_VectorData();
	vectorData.length = len;
	vectorData.fixed = false;
	vectorData.data = new Array(len);
	haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos,vectorData.data,0,len);
	if(len > 0) {
		this1.length -= len;
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,pos + len,this1.data,pos,this1.length - pos);
	}
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.toString = function(this1) {
	return this1.data.slice(0).toString();
};
openfl__$Vector_Vector_$Impl_$.indexOf = function(this1,x,from) {
	if(from == null) {
		from = 0;
	}
	var value = -1;
	var _g1 = from;
	var _g = this1.length;
	while(_g1 < _g) {
		var i = _g1++;
		if(this1.data[i] == x) {
			value = i;
			break;
		}
	}
	return value;
};
openfl__$Vector_Vector_$Impl_$.lastIndexOf = function(this1,x,from) {
	if(from == null) {
		from = 0;
	}
	var value = -1;
	var i = this1.length - 1;
	while(i >= from) {
		if(this1.data[i] == x) {
			value = i;
			break;
		}
		--i;
	}
	return value;
};
openfl__$Vector_Vector_$Impl_$.ofArray = function(a) {
	var vectorData = new openfl_VectorData();
	vectorData.length = a.length;
	vectorData.fixed = true;
	vectorData.data = a.slice(0);
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.convert = function(v) {
	return v;
};
openfl__$Vector_Vector_$Impl_$.get = function(this1,index) {
	return this1.data[index];
};
openfl__$Vector_Vector_$Impl_$.set = function(this1,key,value) {
	if(!this1.fixed) {
		if(key >= this1.length) {
			this1.length = key + 1;
		}
		if(this1.data.length < this1.length) {
			var length = this1.data.length + 10;
			var data = new Array(length);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
			this1.data = data;
		}
	}
	return this1.data[key] = value;
};
openfl__$Vector_Vector_$Impl_$.fromArray = function(value) {
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value.slice(0);
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.toArray = function(this1) {
	var value = [];
	var _g1 = 0;
	var _g = this1.data.length;
	while(_g1 < _g) value.push(this1.data[_g1++]);
	return value;
};
openfl__$Vector_Vector_$Impl_$.fromHaxeVector = function(value) {
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value;
	return vectorData;
};
openfl__$Vector_Vector_$Impl_$.toHaxeVector = function(this1) {
	return this1.data;
};
openfl__$Vector_Vector_$Impl_$.fromVectorData = function(value) {
	return value;
};
openfl__$Vector_Vector_$Impl_$.toVectorData = function(this1) {
	return this1;
};
openfl__$Vector_Vector_$Impl_$.get_length = function(this1) {
	return this1.length;
};
openfl__$Vector_Vector_$Impl_$.set_length = function(this1,value) {
	if(!this1.fixed) {
		if(value > this1.length) {
			var data = new Array(value);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,Math.min(this1.data.length,value) | 0);
			this1.data = data;
		}
		this1.length = value;
	}
	return value;
};
openfl__$Vector_Vector_$Impl_$.get_fixed = function(this1) {
	return this1.fixed;
};
openfl__$Vector_Vector_$Impl_$.set_fixed = function(this1,value) {
	return this1.fixed = value;
};
var openfl_VectorDataIterator = function(data) {
	this.index = 0;
	this.vectorData = data;
};
$hxClasses["openfl.VectorDataIterator"] = openfl_VectorDataIterator;
openfl_VectorDataIterator.__name__ = ["openfl","VectorDataIterator"];
openfl_VectorDataIterator.prototype = {
	hasNext: function() {
		return this.index < this.vectorData.length;
	}
	,next: function() {
		return this.vectorData.data[this.index++];
	}
	,__class__: openfl_VectorDataIterator
};
var openfl__$internal_renderer_AbstractMaskManager = function(renderSession) {
	this.renderSession = renderSession;
};
$hxClasses["openfl._internal.renderer.AbstractMaskManager"] = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_AbstractMaskManager.__name__ = ["openfl","_internal","renderer","AbstractMaskManager"];
openfl__$internal_renderer_AbstractMaskManager.prototype = {
	pushMask: function(mask) {
	}
	,pushRect: function(rect,transform) {
	}
	,popMask: function() {
	}
	,popRect: function() {
	}
	,saveState: function() {
	}
	,restoreState: function() {
	}
	,__class__: openfl__$internal_renderer_AbstractMaskManager
};
var openfl__$internal_renderer_AbstractRenderer = function(width,height) {
	this.width = width;
	this.height = height;
};
$hxClasses["openfl._internal.renderer.AbstractRenderer"] = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_AbstractRenderer.__name__ = ["openfl","_internal","renderer","AbstractRenderer"];
openfl__$internal_renderer_AbstractRenderer.prototype = {
	render: function(stage) {
	}
	,renderShape: function(shape) {
	}
	,setViewport: function(x,y,width,height) {
	}
	,resize: function(width,height) {
	}
	,__class__: openfl__$internal_renderer_AbstractRenderer
};
var openfl__$internal_renderer_DrawCommandBuffer = function() {
	this.types = [];
	this.b = [];
	this.i = [];
	this.f = [];
	this.o = [];
	this.ff = [];
	this.ii = [];
	this.ts = [];
};
$hxClasses["openfl._internal.renderer.DrawCommandBuffer"] = openfl__$internal_renderer_DrawCommandBuffer;
openfl__$internal_renderer_DrawCommandBuffer.__name__ = ["openfl","_internal","renderer","DrawCommandBuffer"];
openfl__$internal_renderer_DrawCommandBuffer.prototype = {
	append: function(other) {
		var data = new openfl__$internal_renderer_DrawCommandReader(other);
		var _g = 0;
		var _g1 = other.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 0:
				var c = data.readBeginBitmapFill();
				this.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
				break;
			case 1:
				var c1 = data.readBeginFill();
				this.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1),openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1));
				break;
			case 2:
				var c2 = data.readBeginGradientFill();
				this.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c2));
				break;
			case 3:
				var c3 = data.readCubicCurveTo();
				this.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
				break;
			case 4:
				var c4 = data.readCurveTo();
				this.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
				break;
			case 5:
				var c5 = data.readDrawCircle();
				this.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
				break;
			case 6:
				var c6 = data.readDrawEllipse();
				this.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
				break;
			case 7:
				var c7 = data.readDrawPath();
				this.drawPath(openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_commands(c7),openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c7),openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_winding(c7));
				break;
			case 8:
				var c8 = data.readDrawRect();
				this.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c8));
				break;
			case 9:
				var c9 = data.readDrawRoundRect();
				this.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c9),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c9));
				break;
			case 10:
				var c10 = data.readDrawTiles();
				this.drawTiles(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_smooth(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_shader(c10),openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c10));
				break;
			case 11:
				var c11 = data.readDrawTriangles();
				this.drawTriangles(openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices(c11),openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices(c11),openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c11),openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling(c11));
				break;
			case 12:
				data.readEndFill();
				this.endFill();
				break;
			case 13:
				var c12 = data.readLineBitmapStyle();
				this.lineBitmapStyle(openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c12),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix(c12),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c12),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_smooth(c12));
				break;
			case 14:
				var c13 = data.readLineGradientStyle();
				this.lineGradientStyle(openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c13),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c13),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c13),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c13),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c13),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c13),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c13),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c13));
				break;
			case 15:
				var c14 = data.readLineStyle();
				this.lineStyle(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c14),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c14),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c14),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_pixelHinting(c14),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode(c14),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c14),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c14),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c14));
				break;
			case 16:
				var c15 = data.readLineTo();
				this.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c15),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c15));
				break;
			case 17:
				var c16 = data.readMoveTo();
				this.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c16),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c16));
				break;
			case 18:
				this.overrideMatrix(openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.get_matrix(data.readOverrideMatrix()));
				break;
			default:
			}
		}
		data.destroy();
		return other;
	}
	,beginBitmapFill: function(bitmap,matrix,repeat,smooth) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL);
		this.o.push(bitmap);
		this.o.push(matrix);
		this.b.push(repeat);
		this.b.push(smooth);
	}
	,beginFill: function(color,alpha) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_FILL);
		this.i.push(color);
		this.f.push(alpha);
	}
	,beginGradientFill: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL);
		this.o.push(type);
		this.ii.push(colors);
		this.ff.push(alphas);
		this.ii.push(ratios);
		this.o.push(matrix);
		this.o.push(spreadMethod);
		this.o.push(interpolationMethod);
		this.f.push(focalPointRatio);
	}
	,clear: function() {
		this.types.splice(0,this.types.length);
		this.b.splice(0,this.b.length);
		this.i.splice(0,this.i.length);
		this.f.splice(0,this.f.length);
		this.o.splice(0,this.o.length);
		this.ff.splice(0,this.ff.length);
		this.ii.splice(0,this.ii.length);
		this.ts.splice(0,this.ts.length);
	}
	,copy: function() {
		var copy = new openfl__$internal_renderer_DrawCommandBuffer();
		copy.append(this);
		return copy;
	}
	,cubicCurveTo: function(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO);
		this.f.push(controlX1);
		this.f.push(controlY1);
		this.f.push(controlX2);
		this.f.push(controlY2);
		this.f.push(anchorX);
		this.f.push(anchorY);
	}
	,curveTo: function(controlX,controlY,anchorX,anchorY) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.CURVE_TO);
		this.f.push(controlX);
		this.f.push(controlY);
		this.f.push(anchorX);
		this.f.push(anchorY);
	}
	,destroy: function() {
		this.clear();
		this.types = null;
		this.b = null;
		this.i = null;
		this.f = null;
		this.o = null;
		this.ff = null;
		this.ii = null;
		this.ts = null;
	}
	,drawCircle: function(x,y,radius) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE);
		this.f.push(x);
		this.f.push(y);
		this.f.push(radius);
	}
	,drawEllipse: function(x,y,width,height) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE);
		this.f.push(x);
		this.f.push(y);
		this.f.push(width);
		this.f.push(height);
	}
	,drawPath: function(commands,data,winding) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_PATH);
		this.o.push(commands);
		this.o.push(data);
		this.o.push(winding);
	}
	,drawRect: function(x,y,width,height) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_RECT);
		this.f.push(x);
		this.f.push(y);
		this.f.push(width);
		this.f.push(height);
	}
	,drawRoundRect: function(x,y,width,height,ellipseWidth,ellipseHeight) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT);
		this.f.push(x);
		this.f.push(y);
		this.f.push(width);
		this.f.push(height);
		this.f.push(ellipseWidth);
		this.o.push(ellipseHeight);
	}
	,drawTiles: function(sheet,tileData,smooth,flags,shader,count) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_TILES);
		this.ts.push(sheet);
		this.ff.push(tileData);
		this.b.push(smooth);
		this.i.push(flags);
		this.o.push(shader);
		this.i.push(count);
	}
	,drawTriangles: function(vertices,indices,uvtData,culling) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES);
		this.o.push(vertices);
		this.o.push(indices);
		this.o.push(uvtData);
		this.o.push(culling);
	}
	,endFill: function() {
		this.types.push(openfl__$internal_renderer_DrawCommandType.END_FILL);
	}
	,lineBitmapStyle: function(bitmap,matrix,repeat,smooth) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE);
		this.o.push(bitmap);
		this.o.push(matrix);
		this.b.push(repeat);
		this.b.push(smooth);
	}
	,lineGradientStyle: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE);
		this.o.push(type);
		this.ii.push(colors);
		this.ff.push(alphas);
		this.ii.push(ratios);
		this.o.push(matrix);
		this.o.push(spreadMethod);
		this.o.push(interpolationMethod);
		this.f.push(focalPointRatio);
	}
	,lineStyle: function(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_STYLE);
		this.o.push(thickness);
		this.i.push(color);
		this.f.push(alpha);
		this.b.push(pixelHinting);
		this.o.push(scaleMode);
		this.o.push(caps);
		this.o.push(joints);
		this.f.push(miterLimit);
	}
	,lineTo: function(x,y) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.LINE_TO);
		this.f.push(x);
		this.f.push(y);
	}
	,moveTo: function(x,y) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.MOVE_TO);
		this.f.push(x);
		this.f.push(y);
	}
	,overrideMatrix: function(matrix) {
		this.types.push(openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX);
		this.o.push(matrix);
	}
	,get_length: function() {
		return this.types.length;
	}
	,__class__: openfl__$internal_renderer_DrawCommandBuffer
	,__properties__: {get_length:"get_length"}
};
var openfl__$internal_renderer_DrawCommandReader = function(buffer) {
	this.buffer = buffer;
	this.bPos = this.iPos = this.fPos = this.oPos = this.ffPos = this.iiPos = this.tsPos = 0;
	this.prev = openfl__$internal_renderer_DrawCommandType.UNKNOWN;
};
$hxClasses["openfl._internal.renderer.DrawCommandReader"] = openfl__$internal_renderer_DrawCommandReader;
openfl__$internal_renderer_DrawCommandReader.__name__ = ["openfl","_internal","renderer","DrawCommandReader"];
openfl__$internal_renderer_DrawCommandReader.prototype = {
	advance: function() {
		switch(this.prev[1]) {
		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.fPos += 6;
			break;
		case 4:
			this.fPos += 4;
			break;
		case 5:
			this.fPos += 3;
			break;
		case 6:
			this.fPos += 4;
			break;
		case 7:
			this.oPos += 3;
			break;
		case 8:
			this.fPos += 4;
			break;
		case 9:
			this.fPos += 5;
			this.oPos += 1;
			break;
		case 10:
			this.tsPos += 1;
			this.ffPos += 1;
			this.bPos += 1;
			this.iPos += 2;
			this.oPos += 1;
			break;
		case 11:
			this.oPos += 4;
			break;
		case 12:
			break;
		case 13:
			this.oPos += 2;
			this.bPos += 2;
			break;
		case 14:
			this.oPos += 4;
			this.iiPos += 2;
			this.ffPos += 1;
			this.fPos += 1;
			break;
		case 15:
			this.oPos += 4;
			this.iPos += 1;
			this.fPos += 2;
			this.bPos += 1;
			break;
		case 16:
			this.fPos += 2;
			break;
		case 17:
			this.fPos += 2;
			break;
		case 18:
			this.oPos += 1;
			break;
		default:
		}
	}
	,bool: function(index) {
		return this.buffer.b[this.bPos + index];
	}
	,destroy: function() {
		this.buffer = null;
		this.reset();
	}
	,fArr: function(index) {
		return this.buffer.ff[this.ffPos + index];
	}
	,'float': function(index) {
		return this.buffer.f[this.fPos + index];
	}
	,iArr: function(index) {
		return this.buffer.ii[this.iiPos + index];
	}
	,'int': function(index) {
		return this.buffer.i[this.iPos + index];
	}
	,obj: function(index) {
		return this.buffer.o[this.oPos + index];
	}
	,readBeginBitmapFill: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL;
		return openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$._new(this);
	}
	,readBeginFill: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_FILL;
		return openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$._new(this);
	}
	,readBeginGradientFill: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL;
		return openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$._new(this);
	}
	,readCubicCurveTo: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO;
		return openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$._new(this);
	}
	,readCurveTo: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.CURVE_TO;
		return openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$._new(this);
	}
	,readDrawCircle: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE;
		return openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$._new(this);
	}
	,readDrawEllipse: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE;
		return openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$._new(this);
	}
	,readDrawPath: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_PATH;
		return openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$._new(this);
	}
	,readDrawRect: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_RECT;
		return openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$._new(this);
	}
	,readDrawRoundRect: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT;
		return openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$._new(this);
	}
	,readDrawTiles: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_TILES;
		return openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$._new(this);
	}
	,readDrawTriangles: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES;
		return openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$._new(this);
	}
	,readEndFill: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.END_FILL;
		return openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$._new(this);
	}
	,readLineBitmapStyle: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE;
		return openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$._new(this);
	}
	,readLineGradientStyle: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE;
		return openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$._new(this);
	}
	,readLineStyle: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.LINE_STYLE;
		return openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$._new(this);
	}
	,readLineTo: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.LINE_TO;
		return openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$._new(this);
	}
	,readMoveTo: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.MOVE_TO;
		return openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$._new(this);
	}
	,readOverrideMatrix: function() {
		this.advance();
		this.prev = openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX;
		return openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$._new(this);
	}
	,reset: function() {
		this.bPos = this.iPos = this.fPos = this.oPos = this.ffPos = this.iiPos = this.tsPos = 0;
	}
	,skip: function(type) {
		this.advance();
		this.prev = type;
	}
	,tileSheet: function(index) {
		return this.buffer.ts[this.tsPos + index];
	}
	,__class__: openfl__$internal_renderer_DrawCommandReader
};
var openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.BeginBitmapFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","BeginBitmapFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.__properties__ = {get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"}
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat = function(this1) {
	return this1.bool(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth = function(this1) {
	return this1.bool(1);
};
var openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.BeginFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","BeginFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.__properties__ = {get_alpha:"get_alpha",get_color:"get_color"}
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color = function(this1) {
	return this1["int"](0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha = function(this1) {
	return this1["float"](0);
};
var openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.BeginGradientFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","BeginGradientFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.__properties__ = {get_focalPointRatio:"get_focalPointRatio",get_interpolationMethod:"get_interpolationMethod",get_spreadMethod:"get_spreadMethod",get_matrix:"get_matrix",get_ratios:"get_ratios",get_alphas:"get_alphas",get_colors:"get_colors",get_type:"get_type"}
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors = function(this1) {
	return this1.iArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas = function(this1) {
	return this1.fArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios = function(this1) {
	return this1.iArr(1);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod = function(this1) {
	return this1.obj(2);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod = function(this1) {
	return this1.obj(3);
};
openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio = function(this1) {
	return this1["float"](0);
};
var openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.CubicCurveToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","CubicCurveToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.__properties__ = {get_anchorY:"get_anchorY",get_anchorX:"get_anchorX",get_controlY2:"get_controlY2",get_controlX2:"get_controlX2",get_controlY1:"get_controlY1",get_controlX1:"get_controlX1"}
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1 = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1 = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2 = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2 = function(this1) {
	return this1["float"](3);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX = function(this1) {
	return this1["float"](4);
};
openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY = function(this1) {
	return this1["float"](5);
};
var openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.CurveToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","CurveToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.__properties__ = {get_anchorY:"get_anchorY",get_anchorX:"get_anchorX",get_controlY:"get_controlY",get_controlX:"get_controlX"}
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY = function(this1) {
	return this1["float"](3);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawCircleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawCircleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.__properties__ = {get_radius:"get_radius",get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius = function(this1) {
	return this1["float"](2);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawEllipseView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawEllipseView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.__properties__ = {get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height = function(this1) {
	return this1["float"](3);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawPathView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawPathView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.__properties__ = {get_winding:"get_winding",get_data:"get_data",get_commands:"get_commands"}
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_commands = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_winding = function(this1) {
	return this1.obj(2);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawRectView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawRectView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.__properties__ = {get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height = function(this1) {
	return this1["float"](3);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawRoundRectView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawRoundRectView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.__properties__ = {get_ellipseHeight:"get_ellipseHeight",get_ellipseWidth:"get_ellipseWidth",get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width = function(this1) {
	return this1["float"](2);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height = function(this1) {
	return this1["float"](3);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth = function(this1) {
	return this1["float"](4);
};
openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight = function(this1) {
	return this1.obj(0);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawTilesView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawTilesView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.__properties__ = {get_count:"get_count",get_shader:"get_shader",get_flags:"get_flags",get_smooth:"get_smooth",get_tileData:"get_tileData",get_sheet:"get_sheet"}
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet = function(this1) {
	return this1.tileSheet(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData = function(this1) {
	return this1.fArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_smooth = function(this1) {
	return this1.bool(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags = function(this1) {
	return this1["int"](0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_shader = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count = function(this1) {
	return this1["int"](1);
};
var openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.DrawTrianglesView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","DrawTrianglesView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.__properties__ = {get_culling:"get_culling",get_uvtData:"get_uvtData",get_indices:"get_indices",get_vertices:"get_vertices"}
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData = function(this1) {
	return this1.obj(2);
};
openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling = function(this1) {
	return this1.obj(3);
};
var openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.EndFillView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","EndFillView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_EndFillView_$Impl_$._new = function(d) {
	return d;
};
var openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineBitmapStyleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineBitmapStyleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.__properties__ = {get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"}
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat = function(this1) {
	return this1.bool(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_smooth = function(this1) {
	return this1.bool(1);
};
var openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineGradientStyleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineGradientStyleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.__properties__ = {get_focalPointRatio:"get_focalPointRatio",get_interpolationMethod:"get_interpolationMethod",get_spreadMethod:"get_spreadMethod",get_matrix:"get_matrix",get_ratios:"get_ratios",get_alphas:"get_alphas",get_colors:"get_colors",get_type:"get_type"}
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors = function(this1) {
	return this1.iArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas = function(this1) {
	return this1.fArr(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios = function(this1) {
	return this1.iArr(1);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod = function(this1) {
	return this1.obj(2);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod = function(this1) {
	return this1.obj(3);
};
openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio = function(this1) {
	return this1["float"](0);
};
var openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineStyleView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineStyleView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.__properties__ = {get_miterLimit:"get_miterLimit",get_joints:"get_joints",get_caps:"get_caps",get_scaleMode:"get_scaleMode",get_pixelHinting:"get_pixelHinting",get_alpha:"get_alpha",get_color:"get_color",get_thickness:"get_thickness"}
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness = function(this1) {
	return this1.obj(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color = function(this1) {
	return this1["int"](0);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_pixelHinting = function(this1) {
	return this1.bool(0);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode = function(this1) {
	return this1.obj(1);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps = function(this1) {
	return this1.obj(2);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints = function(this1) {
	return this1.obj(3);
};
openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit = function(this1) {
	return this1["float"](1);
};
var openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.LineToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","LineToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.__properties__ = {get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
var openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.MoveToView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","MoveToView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.__properties__ = {get_y:"get_y",get_x:"get_x"}
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x = function(this1) {
	return this1["float"](0);
};
openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y = function(this1) {
	return this1["float"](1);
};
var openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$ = {};
$hxClasses["openfl._internal.renderer._DrawCommandReader.OverrideMatrixView_Impl_"] = openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$;
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.__name__ = ["openfl","_internal","renderer","_DrawCommandReader","OverrideMatrixView_Impl_"];
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.__properties__ = {get_matrix:"get_matrix"}
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$._new = function(d) {
	return d;
};
openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.get_matrix = function(this1) {
	return this1.obj(0);
};
var openfl__$internal_renderer_DrawCommandType = $hxClasses["openfl._internal.renderer.DrawCommandType"] = { __ename__ : ["openfl","_internal","renderer","DrawCommandType"], __constructs__ : ["BEGIN_BITMAP_FILL","BEGIN_FILL","BEGIN_GRADIENT_FILL","CUBIC_CURVE_TO","CURVE_TO","DRAW_CIRCLE","DRAW_ELLIPSE","DRAW_PATH","DRAW_RECT","DRAW_ROUND_RECT","DRAW_TILES","DRAW_TRIANGLES","END_FILL","LINE_BITMAP_STYLE","LINE_GRADIENT_STYLE","LINE_STYLE","LINE_TO","MOVE_TO","OVERRIDE_MATRIX","UNKNOWN"] };
openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL = ["BEGIN_BITMAP_FILL",0];
openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.BEGIN_FILL = ["BEGIN_FILL",1];
openfl__$internal_renderer_DrawCommandType.BEGIN_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.BEGIN_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL = ["BEGIN_GRADIENT_FILL",2];
openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO = ["CUBIC_CURVE_TO",3];
openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.CUBIC_CURVE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.CURVE_TO = ["CURVE_TO",4];
openfl__$internal_renderer_DrawCommandType.CURVE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.CURVE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE = ["DRAW_CIRCLE",5];
openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_CIRCLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE = ["DRAW_ELLIPSE",6];
openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_ELLIPSE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_PATH = ["DRAW_PATH",7];
openfl__$internal_renderer_DrawCommandType.DRAW_PATH.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_PATH.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_RECT = ["DRAW_RECT",8];
openfl__$internal_renderer_DrawCommandType.DRAW_RECT.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_RECT.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT = ["DRAW_ROUND_RECT",9];
openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_ROUND_RECT.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_TILES = ["DRAW_TILES",10];
openfl__$internal_renderer_DrawCommandType.DRAW_TILES.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_TILES.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES = ["DRAW_TRIANGLES",11];
openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES.toString = $estr;
openfl__$internal_renderer_DrawCommandType.DRAW_TRIANGLES.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.END_FILL = ["END_FILL",12];
openfl__$internal_renderer_DrawCommandType.END_FILL.toString = $estr;
openfl__$internal_renderer_DrawCommandType.END_FILL.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE = ["LINE_BITMAP_STYLE",13];
openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_BITMAP_STYLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE = ["LINE_GRADIENT_STYLE",14];
openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_GRADIENT_STYLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_STYLE = ["LINE_STYLE",15];
openfl__$internal_renderer_DrawCommandType.LINE_STYLE.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_STYLE.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.LINE_TO = ["LINE_TO",16];
openfl__$internal_renderer_DrawCommandType.LINE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.LINE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.MOVE_TO = ["MOVE_TO",17];
openfl__$internal_renderer_DrawCommandType.MOVE_TO.toString = $estr;
openfl__$internal_renderer_DrawCommandType.MOVE_TO.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX = ["OVERRIDE_MATRIX",18];
openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX.toString = $estr;
openfl__$internal_renderer_DrawCommandType.OVERRIDE_MATRIX.__enum__ = openfl__$internal_renderer_DrawCommandType;
openfl__$internal_renderer_DrawCommandType.UNKNOWN = ["UNKNOWN",19];
openfl__$internal_renderer_DrawCommandType.UNKNOWN.toString = $estr;
openfl__$internal_renderer_DrawCommandType.UNKNOWN.__enum__ = openfl__$internal_renderer_DrawCommandType;
var openfl__$internal_renderer_GraphicsPaths = function() { };
$hxClasses["openfl._internal.renderer.GraphicsPaths"] = openfl__$internal_renderer_GraphicsPaths;
openfl__$internal_renderer_GraphicsPaths.__name__ = ["openfl","_internal","renderer","GraphicsPaths"];
openfl__$internal_renderer_GraphicsPaths.ellipse = function(points,x,y,rx,ry,segmentCount) {
	var seg = Math.PI * 2 / segmentCount;
	var _g1 = 0;
	var _g = segmentCount + 1;
	while(_g1 < _g) {
		var i = _g1++;
		points.push(x + Math.sin(seg * i) * rx);
		points.push(y + Math.cos(seg * i) * ry);
	}
};
openfl__$internal_renderer_GraphicsPaths.cubicCurveTo = function(points,cx,cy,cx2,cy2,x,y) {
	var dt = 0;
	var dt2 = 0;
	var dt3 = 0;
	var t2 = 0;
	var t3 = 0;
	var fromX = points[points.length - 2];
	var fromY = points[points.length - 1];
	var px = 0;
	var py = 0;
	var tmp = 0;
	var _g1 = 1;
	while(_g1 < 21) {
		tmp = _g1++ / 20;
		dt = 1 - tmp;
		dt2 = dt * dt;
		dt3 = dt2 * dt;
		t2 = tmp * tmp;
		t3 = t2 * tmp;
		px = dt3 * fromX + 3 * dt2 * tmp * cx + 3 * dt * t2 * cx2 + t3 * x;
		py = dt3 * fromY + 3 * dt2 * tmp * cy + 3 * dt * t2 * cy2 + t3 * y;
		points.push(px);
		points.push(py);
	}
};
openfl__$internal_renderer_GraphicsPaths.curveTo = function(points,cx,cy,x,y) {
	var xa = 0;
	var ya = 0;
	var fromX = points[points.length - 2];
	var fromY = points[points.length - 1];
	var px = 0;
	var py = 0;
	var tmp = 0;
	var _g1 = 1;
	while(_g1 < 21) {
		tmp = _g1++ / 20;
		xa = fromX + (cx - fromX) * tmp;
		ya = fromY + (cy - fromY) * tmp;
		px = xa + (cx + (x - cx) * tmp - xa) * tmp;
		py = ya + (cy + (y - cy) * tmp - ya) * tmp;
		points.push(px);
		points.push(py);
	}
};
openfl__$internal_renderer_GraphicsPaths.roundRectangle = function(points,x,y,width,height,rx,ry) {
	var xe = x + width;
	var ye = y + height;
	var cx1 = -rx + rx * openfl__$internal_renderer_GraphicsPaths.SIN45;
	var cx2 = -rx + rx * openfl__$internal_renderer_GraphicsPaths.TAN22;
	var cy1 = -ry + ry * openfl__$internal_renderer_GraphicsPaths.SIN45;
	var cy2 = -ry + ry * openfl__$internal_renderer_GraphicsPaths.TAN22;
	points.push(xe);
	points.push(ye - ry);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,xe,ye + cy2,xe + cx1,ye + cy1);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,xe + cx2,ye,xe - rx,ye);
	points.push(x + rx);
	points.push(ye);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,x - cx2,ye,x - cx1,ye + cy1);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,x,ye + cy2,x,ye - ry);
	points.push(x);
	points.push(y + ry);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,x,y - cy2,x - cx1,y - cy1);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,x - cx2,y,x + rx,y);
	points.push(xe - rx);
	points.push(y);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,xe + cx2,y,xe + cx1,y - cy1);
	openfl__$internal_renderer_GraphicsPaths.curveTo(points,xe,y - cy2,xe,y + ry);
	points.push(xe);
	points.push(ye - ry);
};
var openfl__$internal_renderer_PolyK = function() { };
$hxClasses["openfl._internal.renderer.PolyK"] = openfl__$internal_renderer_PolyK;
openfl__$internal_renderer_PolyK.__name__ = ["openfl","_internal","renderer","PolyK"];
openfl__$internal_renderer_PolyK.triangulate = function(tgs,p) {
	var sign = true;
	var n = p.length >> 1;
	if(n < 3) {
		return [];
	}
	var _g = [];
	var _g2 = 0;
	while(_g2 < n) _g.push(_g2++);
	var avl = _g;
	var i = 0;
	var al = n;
	var earFound = false;
	while(al > 3) {
		var i0 = avl[i % al];
		var i1 = avl[(i + 1) % al];
		var i2 = avl[(i + 2) % al];
		var ax = p[2 * i0];
		var ay = p[2 * i0 + 1];
		var bx = p[2 * i1];
		var by = p[2 * i1 + 1];
		var cx = p[2 * i2];
		var cy = p[2 * i2 + 1];
		earFound = false;
		if(openfl__$internal_renderer_PolyK._convex(ax,ay,bx,by,cx,cy,sign)) {
			earFound = true;
			var _g21 = 0;
			var _g1 = al;
			while(_g21 < _g1) {
				var vi = avl[_g21++];
				if(vi == i0 || vi == i1 || vi == i2) {
					continue;
				}
				if(openfl__$internal_renderer_PolyK._PointInTriangle(p[2 * vi],p[2 * vi + 1],ax,ay,bx,by,cx,cy)) {
					earFound = false;
					break;
				}
			}
		}
		if(earFound) {
			tgs.push(i0);
			tgs.push(i1);
			tgs.push(i2);
			avl.splice((i + 1) % al,1);
			--al;
			i = 0;
		} else if(i++ > 3 * al) {
			if(sign) {
				tgs = [];
				var _g11 = [];
				var _g3 = 0;
				while(_g3 < n) _g11.push(_g3++);
				avl = _g11;
				i = 0;
				al = n;
				sign = false;
			} else {
				haxe_Log.trace("Warning: shape too complex to fill",{ fileName : "PolyK.hx", lineNumber : 104, className : "openfl._internal.renderer.PolyK", methodName : "triangulate"});
				return [];
			}
		}
	}
	tgs.push(avl[0]);
	tgs.push(avl[1]);
	tgs.push(avl[2]);
	return tgs;
};
openfl__$internal_renderer_PolyK._PointInTriangle = function(px,py,ax,ay,bx,by,cx,cy) {
	var v0x = cx - ax | 0;
	var v0y = cy - ay | 0;
	var v1x = bx - ax | 0;
	var v1y = by - ay | 0;
	var v2x = px - ax | 0;
	var v2y = py - ay | 0;
	var dot00 = v0x * v0x + v0y * v0y;
	var dot01 = v0x * v1x + v0y * v1y;
	var dot02 = v0x * v2x + v0y * v2y;
	var dot11 = v1x * v1x + v1y * v1y;
	var dot12 = v1x * v2x + v1y * v2y;
	var invDenom = 1 / (dot00 * dot11 - dot01 * dot01);
	var u = (dot11 * dot02 - dot01 * dot12) * invDenom;
	var v = (dot00 * dot12 - dot01 * dot02) * invDenom;
	if(u >= 0 && v >= 0) {
		return u + v < 1;
	} else {
		return false;
	}
};
openfl__$internal_renderer_PolyK._convex = function(ax,ay,bx,by,cx,cy,sign) {
	return (ay - by) * (cx - bx) + (bx - ax) * (cy - by) >= 0 == sign;
};
var openfl__$internal_renderer_RenderSession = function() {
	this.activeTextures = 0;
};
$hxClasses["openfl._internal.renderer.RenderSession"] = openfl__$internal_renderer_RenderSession;
openfl__$internal_renderer_RenderSession.__name__ = ["openfl","_internal","renderer","RenderSession"];
openfl__$internal_renderer_RenderSession.prototype = {
	__class__: openfl__$internal_renderer_RenderSession
};
var openfl__$internal_renderer_cairo_CairoBitmap = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoBitmap"] = openfl__$internal_renderer_cairo_CairoBitmap;
openfl__$internal_renderer_cairo_CairoBitmap.__name__ = ["openfl","_internal","renderer","cairo","CairoBitmap"];
openfl__$internal_renderer_cairo_CairoBitmap.render = function(bitmap,renderSession) {
	if(!bitmap.__renderable || bitmap.__worldAlpha <= 0) {
		return;
	}
	if(bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
		if(bitmap.__mask != null) {
			renderSession.maskManager.pushMask(bitmap.__mask);
		}
		var transform = bitmap.__renderTransform;
		bitmap.get_scrollRect();
		if(renderSession.roundPixels) {
			var matrix = transform.__toMatrix3();
			matrix.tx = Math.round(matrix.tx);
			matrix.ty = Math.round(matrix.ty);
		}
		if(bitmap.bitmapData.getSurface() != null) {
			if(bitmap.smoothing) {
				1;
			} else {
				3;
			}
		}
		if(bitmap.__mask != null) {
			renderSession.maskManager.popMask();
		}
	}
};
var openfl__$internal_renderer_cairo_CairoGraphics = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoGraphics"] = openfl__$internal_renderer_cairo_CairoGraphics;
openfl__$internal_renderer_cairo_CairoGraphics.__name__ = ["openfl","_internal","renderer","cairo","CairoGraphics"];
openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = null;
openfl__$internal_renderer_cairo_CairoGraphics.bitmapRepeat = null;
openfl__$internal_renderer_cairo_CairoGraphics.bounds = null;
openfl__$internal_renderer_cairo_CairoGraphics.cairo = null;
openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = null;
openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = null;
openfl__$internal_renderer_cairo_CairoGraphics.graphics = null;
openfl__$internal_renderer_cairo_CairoGraphics.hasFill = null;
openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = null;
openfl__$internal_renderer_cairo_CairoGraphics.hitTesting = null;
openfl__$internal_renderer_cairo_CairoGraphics.inversePendingMatrix = null;
openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix = null;
openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = null;
openfl__$internal_renderer_cairo_CairoGraphics.closePath = function() {
	if(openfl__$internal_renderer_cairo_CairoGraphics.strokePattern == null) {
		return;
	}
};
openfl__$internal_renderer_cairo_CairoGraphics.createGradientPattern = function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
	var pattern = null;
	switch(type) {
	case 0:
		if(matrix == null) {
			matrix = new openfl_geom_Matrix();
		}
		var point1 = matrix.transformPoint(new openfl_geom_Point(-819.2,0));
		var point2 = matrix.transformPoint(new openfl_geom_Point(819.2,0));
		point1.x += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.x;
		point2.x += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.x;
		point1.y += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.y;
		point2.y += openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.y;
		pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createLinear(point1.x,point1.y,point2.x,point2.y);
		break;
	case 1:
		if(matrix == null) {
			matrix = new openfl_geom_Matrix();
		}
		var x = matrix.tx + openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.x;
		var y = matrix.ty + openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds.y;
		pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRadial(x,y,0,x,y,(matrix.transformPoint(new openfl_geom_Point(1638.4,0)).x - matrix.tx) / 2);
		break;
	}
	var _g1 = 0;
	var _g = colors.length;
	while(_g1 < _g) {
		var i = _g1++;
		var ratio = ratios[i] / 255;
		if(ratio < 0) {
			ratio = 0;
		}
		if(ratio > 1) {
			ratio = 1;
		}
	}
	var mat = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.get_matrix(pattern);
	mat.tx = openfl__$internal_renderer_cairo_CairoGraphics.bounds.x;
	mat.ty = openfl__$internal_renderer_cairo_CairoGraphics.bounds.y;
	return pattern;
};
openfl__$internal_renderer_cairo_CairoGraphics.createImagePattern = function(bitmapFill,matrix,bitmapRepeat) {
	var pattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createForSurface(bitmapFill.getSurface());
	openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = matrix;
	return pattern;
};
openfl__$internal_renderer_cairo_CairoGraphics.drawRoundRect = function(x,y,width,height,ellipseWidth,ellipseHeight) {
	if(ellipseHeight == null) {
		ellipseHeight = ellipseWidth;
	}
	ellipseWidth *= 0.5;
	ellipseHeight *= 0.5;
	if(ellipseWidth > width / 2) {
		ellipseWidth = width / 2;
	}
	if(ellipseHeight > height / 2) {
		ellipseHeight = height / 2;
	}
	var xe = x + width;
	var ye = y + height;
	var cx1 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_cairo_CairoGraphics.SIN45;
	var cx2 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_cairo_CairoGraphics.TAN22;
	var cy1 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_cairo_CairoGraphics.SIN45;
	var cy2 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_cairo_CairoGraphics.TAN22;
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe,ye + cy2,xe + cx1,ye + cy1);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe + cx2,ye,xe - ellipseWidth,ye);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x - cx2,ye,x - cx1,ye + cy1);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x,ye + cy2,x,ye - ellipseHeight);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x,y - cy2,x - cx1,y - cy1);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(x - cx2,y,x + ellipseWidth,y);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe + cx2,y,xe + cx1,y - cy1);
	openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(xe,y - cy2,xe,y + ellipseHeight);
};
openfl__$internal_renderer_cairo_CairoGraphics.endFill = function() {
	openfl__$internal_renderer_cairo_CairoGraphics.playCommands(openfl__$internal_renderer_cairo_CairoGraphics.fillCommands,false);
	openfl__$internal_renderer_cairo_CairoGraphics.fillCommands.clear();
};
openfl__$internal_renderer_cairo_CairoGraphics.endStroke = function() {
	openfl__$internal_renderer_cairo_CairoGraphics.playCommands(openfl__$internal_renderer_cairo_CairoGraphics.strokeCommands,true);
	openfl__$internal_renderer_cairo_CairoGraphics.strokeCommands.clear();
};
openfl__$internal_renderer_cairo_CairoGraphics.hitTest = function(graphics,x,y) {
	return false;
};
openfl__$internal_renderer_cairo_CairoGraphics.isCCW = function(x1,y1,x2,y2,x3,y3) {
	return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0;
};
openfl__$internal_renderer_cairo_CairoGraphics.normalizeUVT = function(uvt,skipT) {
	if(skipT == null) {
		skipT = false;
	}
	var max = -Infinity;
	var tmp = -Infinity;
	var len = uvt.length;
	var _g1 = 1;
	var _g = len + 1;
	while(_g1 < _g) {
		var t = _g1++;
		if(skipT && t % 3 == 0) {
			continue;
		}
		tmp = uvt.data[t - 1];
		if(max < tmp) {
			max = tmp;
		}
	}
	var this1 = new openfl_VectorData();
	this1.data = new Array(0);
	this1.length = 0;
	this1.fixed = false;
	var result = this1;
	var _g11 = 1;
	var _g2 = len + 1;
	while(_g11 < _g2) {
		var t1 = _g11++;
		if(skipT && t1 % 3 == 0) {
			continue;
		}
		var x = uvt.data[t1 - 1] / max;
		if(!result.fixed) {
			result.length++;
			if(result.data.length < result.length) {
				var length = result.data.length + 10;
				var data = new Array(length);
				haxe_ds__$Vector_Vector_$Impl_$.blit(result.data,0,data,0,result.data.length);
				result.data = data;
			}
			result.data[result.length - 1] = x;
		}
	}
	return { max : max, uvt : result};
};
openfl__$internal_renderer_cairo_CairoGraphics.playCommands = function(commands,stroke) {
	if(stroke == null) {
		stroke = false;
	}
	if(commands.get_length() == 0) {
		return;
	}
	openfl__$internal_renderer_cairo_CairoGraphics.bounds = openfl__$internal_renderer_cairo_CairoGraphics.graphics.__bounds;
	var offsetX = openfl__$internal_renderer_cairo_CairoGraphics.bounds.x;
	var offsetY = openfl__$internal_renderer_cairo_CairoGraphics.bounds.y;
	var positionX = 0.0;
	var positionY = 0.0;
	var closeGap = false;
	var startX = 0.0;
	var startY = 0.0;
	var hasPath = false;
	var data = new openfl__$internal_renderer_DrawCommandReader(commands);
	var _g = 0;
	var _g1 = commands.types;
	try {
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 0:
				var c = data.readBeginBitmapFill();
				openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = openfl__$internal_renderer_cairo_CairoGraphics.createImagePattern(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c));
				openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c);
				openfl__$internal_renderer_cairo_CairoGraphics.bitmapRepeat = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c);
				openfl__$internal_renderer_cairo_CairoGraphics.hasFill = true;
				break;
			case 1:
				var c1 = data.readBeginFill();
				if(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1) < 0.005) {
					openfl__$internal_renderer_cairo_CairoGraphics.hasFill = false;
				} else {
					if(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern != null) {
						openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = null;
					}
					openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGBA(((openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 16711680) >>> 16) / 255,((openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 65280) >>> 8) / 255,(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 255) / 255,openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1));
					openfl__$internal_renderer_cairo_CairoGraphics.hasFill = true;
				}
				openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = null;
				break;
			case 2:
				var c2 = data.readBeginGradientFill();
				if(openfl__$internal_renderer_cairo_CairoGraphics.fillPattern != null) {
					openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix = null;
				}
				openfl__$internal_renderer_cairo_CairoGraphics.fillPattern = openfl__$internal_renderer_cairo_CairoGraphics.createGradientPattern(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c2),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c2));
				openfl__$internal_renderer_cairo_CairoGraphics.hasFill = true;
				openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill = null;
				break;
			case 3:
				var c3 = data.readCubicCurveTo();
				hasPath = true;
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3);
				break;
			case 4:
				var c4 = data.readCurveTo();
				hasPath = true;
				openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4) - offsetY);
				break;
			case 5:
				var c5 = data.readDrawCircle();
				hasPath = true;
				openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5);
				openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5);
				openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5);
				openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5);
				openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5);
				openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5);
				break;
			case 6:
				var c6 = data.readDrawEllipse();
				hasPath = true;
				var x = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6);
				var y = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6);
				var width = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6);
				var height = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6);
				x -= offsetX;
				y -= offsetY;
				var kappa = .5522848;
				break;
			case 8:
				var c7 = data.readDrawRect();
				hasPath = true;
				openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7);
				openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7);
				openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7);
				openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7);
				break;
			case 9:
				var c8 = data.readDrawRoundRect();
				hasPath = true;
				openfl__$internal_renderer_cairo_CairoGraphics.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
				break;
			case 10:
				var c9 = data.readDrawTiles();
				var useScale = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 1) > 0;
				var useRotation = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 2) > 0;
				var useTransform = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 16) > 0;
				var useRGB = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 4) > 0;
				var useAlpha = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 8) > 0;
				var useRect = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 32) > 0;
				var useOrigin = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 64) > 0;
				var useBlendAdd = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 65536) > 0;
				var useBlendOverlay = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 4194304) > 0;
				if(useTransform) {
					useScale = false;
					useRotation = false;
				}
				var scaleIndex = 0;
				var rotationIndex = 0;
				var rgbIndex = 0;
				var alphaIndex = 0;
				var transformIndex = 0;
				var numValues = 3;
				if(useRect) {
					if(useOrigin) {
						numValues = 8;
					} else {
						numValues = 6;
					}
				}
				if(useScale) {
					scaleIndex = numValues;
					++numValues;
				}
				if(useRotation) {
					rotationIndex = numValues;
					++numValues;
				}
				if(useTransform) {
					transformIndex = numValues;
					numValues += 4;
				}
				if(useRGB) {
					rgbIndex = numValues;
					numValues += 3;
				}
				if(useAlpha) {
					alphaIndex = numValues;
					++numValues;
				}
				var totalCount = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9).length;
				if(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9) >= 0 && totalCount > openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9)) {
					totalCount = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9);
				}
				var index = 0;
				var rect = null;
				var center = null;
				var previousTileID = -1;
				var surface;
				openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__bitmap.__sync();
				surface = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__bitmap.getSurface();
				while(index < totalCount) {
					var i = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 2] | 0;
					var tileID = !useRect ? i : -1;
					if(!useRect && tileID != previousTileID) {
						rect = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__tileRects[tileID];
						center = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__centerPoints[tileID];
						previousTileID = tileID;
					} else if(useRect) {
						rect = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__rectTile;
						rect.setTo(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 2],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 3],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 4],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 5]);
						center = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__point;
						if(useOrigin) {
							center.setTo(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 6],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 7]);
						} else {
							center.setTo(0,0);
						}
					}
					if(rect != null && rect.width > 0 && rect.height > 0 && center != null) {
						if(useTransform) {
							openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
							openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
							openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
							openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
						}
						openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
						openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
						if(useRotation) {
							openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
						}
						if(useScale) {
							openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
						}
						if(useAlpha) {
							if(!openfl__$internal_renderer_cairo_CairoGraphics.hitTesting) {
								openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
							}
						}
					}
					index += numValues;
				}
				useBlendAdd || useBlendOverlay;
				break;
			case 11:
				var c10 = data.readDrawTriangles();
				var v = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices(c10);
				var ind = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices(c10);
				var uvt = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c10);
				var colorFill = openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill == null;
				if(colorFill && uvt != null) {
					throw "__break__";
				}
				var width1 = 0;
				var height1 = 0;
				if(!colorFill) {
					if(uvt == null) {
						var this1 = new openfl_VectorData();
						this1.data = new Array(0);
						this1.length = 0;
						this1.fixed = false;
						uvt = this1;
						var _g3 = 0;
						var _g2 = v.length / 2 | 0;
						while(_g3 < _g2) {
							var i1 = _g3++;
							var x1 = v.data[i1 * 2] / openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.width;
							if(!uvt.fixed) {
								uvt.length++;
								if(uvt.data.length < uvt.length) {
									var length = uvt.data.length + 10;
									var data1 = new Array(length);
									haxe_ds__$Vector_Vector_$Impl_$.blit(uvt.data,0,data1,0,uvt.data.length);
									uvt.data = data1;
								}
								uvt.data[uvt.length - 1] = x1;
							}
							var x2 = v.data[i1 * 2 + 1] / openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.height;
							if(!uvt.fixed) {
								uvt.length++;
								if(uvt.data.length < uvt.length) {
									var length1 = uvt.data.length + 10;
									var data2 = new Array(length1);
									haxe_ds__$Vector_Vector_$Impl_$.blit(uvt.data,0,data2,0,uvt.data.length);
									uvt.data = data2;
								}
								uvt.data[uvt.length - 1] = x2;
							}
						}
					}
					var normalizedUVT = openfl__$internal_renderer_cairo_CairoGraphics.normalizeUVT(uvt,openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c10).length != v.length);
					uvt = normalizedUVT.uvt;
					if(normalizedUVT.max > 1) {
						width1 = openfl__$internal_renderer_cairo_CairoGraphics.bounds.width | 0;
						height1 = openfl__$internal_renderer_cairo_CairoGraphics.bounds.height | 0;
					} else {
						width1 = openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.width;
						height1 = openfl__$internal_renderer_cairo_CairoGraphics.bitmapFill.height;
					}
				}
				var i2 = 0;
				var l = ind.length;
				var a_;
				var b_;
				var c_;
				var iax;
				var iay;
				var ibx;
				var iby;
				var icx;
				var icy;
				var x11;
				var y1;
				var x21;
				var y2;
				var x3;
				var y3;
				var uvx1;
				var uvy1;
				var uvx2;
				var uvy2;
				var uvx3;
				var uvy3;
				var denom;
				var t1;
				var t2;
				var t3;
				var t4;
				var dx;
				var dy;
				while(i2 < l) {
					a_ = i2;
					b_ = i2 + 1;
					c_ = i2 + 2;
					iax = ind.data[a_] * 2;
					iay = ind.data[a_] * 2 + 1;
					ibx = ind.data[b_] * 2;
					iby = ind.data[b_] * 2 + 1;
					icx = ind.data[c_] * 2;
					icy = ind.data[c_] * 2 + 1;
					x11 = v.data[iax];
					y1 = v.data[iay];
					x21 = v.data[ibx];
					y2 = v.data[iby];
					x3 = v.data[icx];
					y3 = v.data[icy];
					switch(openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling(c10)) {
					case 0:
						if((x21 - x11) * (y3 - y1) - (y2 - y1) * (x3 - x11) < 0) {
							i2 += 3;
							continue;
						}
						break;
					case 2:
						if(!((x21 - x11) * (y3 - y1) - (y2 - y1) * (x3 - x11) < 0)) {
							i2 += 3;
							continue;
						}
						break;
					default:
					}
					if(colorFill) {
						i2 += 3;
						continue;
					}
					uvx1 = uvt.data[iax] * width1;
					uvx2 = uvt.data[ibx] * width1;
					uvx3 = uvt.data[icx] * width1;
					uvy1 = uvt.data[iay] * height1;
					uvy2 = uvt.data[iby] * height1;
					uvy3 = uvt.data[icy] * height1;
					denom = uvx1 * (uvy3 - uvy2) - uvx2 * uvy3 + uvx3 * uvy2 + (uvx2 - uvx3) * uvy1;
					if(denom == 0) {
						i2 += 3;
						continue;
					}
					t1 = -(uvy1 * (x3 - x21) - uvy2 * x3 + uvy3 * x21 + (uvy2 - uvy3) * x11) / denom;
					t2 = (uvy2 * y3 + uvy1 * (y2 - y3) - uvy3 * y2 + (uvy3 - uvy2) * y1) / denom;
					t3 = (uvx1 * (x3 - x21) - uvx2 * x3 + uvx3 * x21 + (uvx2 - uvx3) * x11) / denom;
					t4 = -(uvx2 * y3 + uvx1 * (y2 - y3) - uvx3 * y2 + (uvx3 - uvx2) * y1) / denom;
					dx = (uvx1 * (uvy3 * x21 - uvy2 * x3) + uvy1 * (uvx2 * x3 - uvx3 * x21) + (uvx3 * uvy2 - uvx2 * uvy3) * x11) / denom;
					dy = (uvx1 * (uvy3 * y2 - uvy2 * y3) + uvy1 * (uvx2 * y3 - uvx3 * y2) + (uvx3 * uvy2 - uvx2 * uvy3) * y1) / denom;
					i2 += 3;
				}
				break;
			case 13:
				var c11 = data.readLineBitmapStyle();
				if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) {
					openfl__$internal_renderer_cairo_CairoGraphics.closePath();
				}
				openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = openfl__$internal_renderer_cairo_CairoGraphics.createImagePattern(openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c11));
				openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = true;
				break;
			case 14:
				var c12 = data.readLineGradientStyle();
				if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) {
					openfl__$internal_renderer_cairo_CairoGraphics.closePath();
				}
				openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = openfl__$internal_renderer_cairo_CairoGraphics.createGradientPattern(openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c12));
				openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = true;
				break;
			case 15:
				var c13 = data.readLineStyle();
				if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) {
					openfl__$internal_renderer_cairo_CairoGraphics.closePath();
				}
				if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c13) == null) {
					openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = false;
				} else {
					openfl__$internal_renderer_cairo_CairoGraphics.hasStroke = true;
					if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c13) > 0) {
						openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c13);
					} else {
						1;
					}
					if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c13) != null) {
						var tmp;
						switch(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c13)) {
						case 0:
							tmp = 2;
							break;
						case 1:
							tmp = 0;
							break;
						default:
							tmp = 1;
						}
					}
					if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c13) != null) {
						var tmp1;
						switch(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c13)) {
						case 0:
							tmp1 = 0;
							break;
						case 2:
							tmp1 = 2;
							break;
						default:
							tmp1 = 1;
						}
					}
					openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c13);
					var r = ((openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c13) & 16711680) >>> 16) / 255;
					var g = ((openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c13) & 65280) >>> 8) / 255;
					var b = (openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c13) & 255) / 255;
					if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c13) == 1) {
						openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGB(r,g,b);
					} else {
						openfl__$internal_renderer_cairo_CairoGraphics.strokePattern = lime_graphics_cairo__$CairoPattern_CairoPattern_$Impl_$.createRGBA(r,g,b,openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c13));
					}
				}
				break;
			case 16:
				var c14 = data.readLineTo();
				hasPath = true;
				openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c14);
				openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c14);
				positionX = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c14);
				positionY = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c14);
				break;
			case 17:
				var c15 = data.readMoveTo();
				openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15);
				openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15);
				positionX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15);
				positionY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15);
				closeGap = true;
				startX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15);
				startY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15);
				break;
			default:
				data.skip(type);
			}
		}
	} catch( e ) { if( e != "__break__" ) throw e; }
	data.destroy();
	if(hasPath) {
		if(stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasStroke) {
			if(!(openfl__$internal_renderer_cairo_CairoGraphics.hasFill && closeGap)) {
				closeGap && positionX == startX && positionY == startY;
			}
		}
		if(!stroke && openfl__$internal_renderer_cairo_CairoGraphics.hasFill) {
			if(openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix != null) {
				var matrix = openfl__$internal_renderer_cairo_CairoGraphics.fillPatternMatrix.clone();
				matrix.invert();
				if(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix != null) {
					matrix.concat(openfl__$internal_renderer_cairo_CairoGraphics.pendingMatrix);
				}
			}
		}
	}
};
openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo = function(cx,cy,x,y) {
	var current = null;
	if(!openfl__$internal_renderer_cairo_CairoGraphics.cairo.get_hasCurrentPoint()) {
		current = new lime_math_Vector2(cx,cy);
	} else {
		current = openfl__$internal_renderer_cairo_CairoGraphics.cairo.get_currentPoint();
	}
};
openfl__$internal_renderer_cairo_CairoGraphics.render = function(graphics,renderSession) {
};
openfl__$internal_renderer_cairo_CairoGraphics.renderMask = function(graphics,renderSession) {
	if(graphics.__commands.get_length() != 0) {
		var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
		var _g = 0;
		var _g1 = graphics.__commands.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 3:
				var c = data.readCubicCurveTo();
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c);
				break;
			case 4:
				var c1 = data.readCurveTo();
				openfl__$internal_renderer_cairo_CairoGraphics.quadraticCurveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c1),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c1),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c1),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c1));
				openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c1);
				openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c1);
				break;
			case 5:
				var c2 = data.readDrawCircle();
				openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c2);
				openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c2);
				openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c2);
				break;
			case 6:
				var c3 = data.readDrawEllipse();
				var x = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c3);
				var y = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c3);
				var width = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c3);
				var height = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c3);
				x -= 0;
				y -= 0;
				break;
			case 8:
				var c4 = data.readDrawRect();
				openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c4);
				openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c4);
				openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c4);
				openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c4);
				break;
			case 9:
				var c5 = data.readDrawRoundRect();
				openfl__$internal_renderer_cairo_CairoGraphics.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c5));
				break;
			case 16:
				var c6 = data.readLineTo();
				openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c6);
				openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c6);
				openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c6);
				openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c6);
				break;
			case 17:
				var c7 = data.readMoveTo();
				openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c7);
				openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c7);
				openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c7);
				openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c7);
				break;
			default:
				data.skip(type);
			}
		}
		data.destroy();
	}
};
var openfl__$internal_renderer_cairo_CairoMaskManager = function(renderSession) {
	openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
};
$hxClasses["openfl._internal.renderer.cairo.CairoMaskManager"] = openfl__$internal_renderer_cairo_CairoMaskManager;
openfl__$internal_renderer_cairo_CairoMaskManager.__name__ = ["openfl","_internal","renderer","cairo","CairoMaskManager"];
openfl__$internal_renderer_cairo_CairoMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_cairo_CairoMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
	pushMask: function(mask) {
		mask.__getWorldTransform();
		mask.__renderCairoMask(this.renderSession);
	}
	,pushRect: function(rect,transform) {
	}
	,popMask: function() {
	}
	,popRect: function() {
	}
	,__class__: openfl__$internal_renderer_cairo_CairoMaskManager
});
var openfl__$internal_renderer_cairo_CairoRenderer = function(width,height,cairo) {
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	this.cairo = cairo;
	this.renderSession = new openfl__$internal_renderer_RenderSession();
	this.renderSession.cairo = cairo;
	this.renderSession.roundPixels = true;
	this.renderSession.renderer = this;
	this.renderSession.maskManager = new openfl__$internal_renderer_cairo_CairoMaskManager(this.renderSession);
};
$hxClasses["openfl._internal.renderer.cairo.CairoRenderer"] = openfl__$internal_renderer_cairo_CairoRenderer;
openfl__$internal_renderer_cairo_CairoRenderer.__name__ = ["openfl","_internal","renderer","cairo","CairoRenderer"];
openfl__$internal_renderer_cairo_CairoRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_cairo_CairoRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	render: function(stage) {
		stage.__renderCairo(this.renderSession);
	}
	,renderDisplayObject: function(object) {
		object.__renderCairo(this.renderSession);
	}
	,__class__: openfl__$internal_renderer_cairo_CairoRenderer
});
var openfl__$internal_renderer_cairo_CairoShape = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoShape"] = openfl__$internal_renderer_cairo_CairoShape;
openfl__$internal_renderer_cairo_CairoShape.__name__ = ["openfl","_internal","renderer","cairo","CairoShape"];
openfl__$internal_renderer_cairo_CairoShape.render = function(shape,renderSession) {
};
var openfl__$internal_renderer_cairo_CairoTextField = function() { };
$hxClasses["openfl._internal.renderer.cairo.CairoTextField"] = openfl__$internal_renderer_cairo_CairoTextField;
openfl__$internal_renderer_cairo_CairoTextField.__name__ = ["openfl","_internal","renderer","cairo","CairoTextField"];
openfl__$internal_renderer_cairo_CairoTextField.render = function(textField,renderSession) {
};
var openfl__$internal_renderer_canvas_CanvasBitmap = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasBitmap"] = openfl__$internal_renderer_canvas_CanvasBitmap;
openfl__$internal_renderer_canvas_CanvasBitmap.__name__ = ["openfl","_internal","renderer","canvas","CanvasBitmap"];
openfl__$internal_renderer_canvas_CanvasBitmap.render = function(bitmap,renderSession) {
	if(!bitmap.__renderable || bitmap.__worldAlpha <= 0) {
		return;
	}
	var context = renderSession.context;
	if(bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
		if(bitmap.__mask != null) {
			renderSession.maskManager.pushMask(bitmap.__mask);
		}
		bitmap.bitmapData.__sync();
		context.globalAlpha = bitmap.__worldAlpha;
		var transform = bitmap.__renderTransform;
		var scrollRect = bitmap.get_scrollRect();
		if(renderSession.roundPixels) {
			context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
		} else {
			context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
		}
		if(!bitmap.smoothing) {
			context.mozImageSmoothingEnabled = false;
			context.msImageSmoothingEnabled = false;
			context.imageSmoothingEnabled = false;
		}
		if(scrollRect == null) {
			context.drawImage(bitmap.bitmapData.image.get_src(),0,0);
		} else {
			context.drawImage(bitmap.bitmapData.image.get_src(),scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height,scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height);
		}
		if(!bitmap.smoothing) {
			context.mozImageSmoothingEnabled = true;
			context.msImageSmoothingEnabled = true;
			context.imageSmoothingEnabled = true;
		}
		if(bitmap.__mask != null) {
			renderSession.maskManager.popMask();
		}
	}
};
var openfl__$internal_renderer_canvas_CanvasGraphics = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasGraphics"] = openfl__$internal_renderer_canvas_CanvasGraphics;
openfl__$internal_renderer_canvas_CanvasGraphics.__name__ = ["openfl","_internal","renderer","canvas","CanvasGraphics"];
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapStroke = null;
openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat = null;
openfl__$internal_renderer_canvas_CanvasGraphics.bounds = null;
openfl__$internal_renderer_canvas_CanvasGraphics.graphics = null;
openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = null;
openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = null;
openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting = null;
openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix = null;
openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix = null;
openfl__$internal_renderer_canvas_CanvasGraphics.context = null;
openfl__$internal_renderer_canvas_CanvasGraphics.closePath = function() {
	if(openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle == null) {
		return;
	}
	openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
	openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke();
	openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
};
openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill = function(bitmap,bitmapRepeat) {
	bitmap.__sync();
	return openfl__$internal_renderer_canvas_CanvasGraphics.context.createPattern(bitmap.image.get_src(),bitmapRepeat ? "repeat" : "no-repeat");
};
openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern = function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
	var gradientFill = null;
	switch(type) {
	case 0:
		var matrix1 = matrix != null ? matrix : new openfl_geom_Matrix();
		var point1 = matrix1.transformPoint(new openfl_geom_Point(-819.2,0));
		var point2 = matrix1.transformPoint(new openfl_geom_Point(819.2,0));
		gradientFill = openfl__$internal_renderer_canvas_CanvasGraphics.context.createLinearGradient(point1.x,point1.y,point2.x,point2.y);
		break;
	case 1:
		if(matrix == null) {
			matrix = new openfl_geom_Matrix();
		}
		gradientFill = openfl__$internal_renderer_canvas_CanvasGraphics.context.createRadialGradient(matrix.tx,matrix.ty,0,matrix.tx,matrix.ty,(matrix.transformPoint(new openfl_geom_Point(1638.4,0)).x - matrix.tx) / 2);
		break;
	}
	var _g1 = 0;
	var _g = colors.length;
	while(_g1 < _g) {
		var i = _g1++;
		var rgb = colors[i];
		var ratio = ratios[i] / 255;
		if(ratio < 0) {
			ratio = 0;
		}
		if(ratio > 1) {
			ratio = 1;
		}
		gradientFill.addColorStop(ratio,"rgba(" + ((rgb & 16711680) >>> 16) + ", " + ((rgb & 65280) >>> 8) + ", " + (rgb & 255) + ", " + alphas[i] + ")");
	}
	return gradientFill;
};
openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas = function(bitmap,repeat,width,height) {
	var canvas = window.document.createElement("canvas");
	var context = canvas.getContext("2d");
	canvas.width = width;
	canvas.height = height;
	var tmp = bitmap.image.get_src();
	context.fillStyle = context.createPattern(tmp,repeat ? "repeat" : "no-repeat");
	context.beginPath();
	context.moveTo(0,0);
	context.lineTo(0,height);
	context.lineTo(width,height);
	context.lineTo(width,0);
	context.lineTo(0,0);
	context.closePath();
	if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
		context.fill();
	}
	return canvas;
};
openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect = function(x,y,width,height,ellipseWidth,ellipseHeight) {
	if(ellipseHeight == null) {
		ellipseHeight = ellipseWidth;
	}
	ellipseWidth *= 0.5;
	ellipseHeight *= 0.5;
	if(ellipseWidth > width / 2) {
		ellipseWidth = width / 2;
	}
	if(ellipseHeight > height / 2) {
		ellipseHeight = height / 2;
	}
	var xe = x + width;
	var ye = y + height;
	var cx1 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;
	var cx2 = -ellipseWidth + ellipseWidth * openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;
	var cy1 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_canvas_CanvasGraphics.SIN45;
	var cy2 = -ellipseHeight + ellipseHeight * openfl__$internal_renderer_canvas_CanvasGraphics.TAN22;
	openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(xe,ye - ellipseHeight);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe,ye + cy2,xe + cx1,ye + cy1);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe + cx2,ye,xe - ellipseWidth,ye);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x + ellipseWidth,ye);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x - cx2,ye,x - cx1,ye + cy1);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x,ye + cy2,x,ye - ellipseHeight);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x,y + ellipseHeight);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x,y - cy2,x - cx1,y - cy1);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(x - cx2,y,x + ellipseWidth,y);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(xe - ellipseWidth,y);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe + cx2,y,xe + cx1,y - cy1);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(xe,y - cy2,xe,y + ellipseHeight);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(xe,ye - ellipseHeight);
};
openfl__$internal_renderer_canvas_CanvasGraphics.endFill = function() {
	openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
	openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands,false);
	openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();
};
openfl__$internal_renderer_canvas_CanvasGraphics.endStroke = function() {
	openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
	openfl__$internal_renderer_canvas_CanvasGraphics.playCommands(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands,true);
	openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
	openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();
};
openfl__$internal_renderer_canvas_CanvasGraphics.hitTest = function(graphics,x,y) {
	if(graphics.__commands.get_length() == 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds == null || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width <= 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height <= 0) {
		return false;
	} else {
		openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting = true;
		x -= openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x;
		y -= openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y;
		if(graphics.__canvas == null) {
			graphics.__canvas = window.document.createElement("canvas");
			graphics.__context = graphics.__canvas.getContext("2d");
		}
		openfl__$internal_renderer_canvas_CanvasGraphics.context = graphics.__context;
		openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();
		openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();
		openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
		openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = false;
		openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
		openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat = false;
		openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
		var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
		var _g = 0;
		var _g1 = graphics.__commands.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 0:case 1:case 2:
				openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
				openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
				if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(x,y)) {
					data.destroy();
					return true;
				}
				if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(x,y)) {
					data.destroy();
					return true;
				}
				if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL) {
					var c = data.readBeginBitmapFill();
					openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
					openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
				} else if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL) {
					var c1 = data.readBeginGradientFill();
					openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c1));
					openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c1));
				} else {
					var c2 = data.readBeginFill();
					openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c2),1);
					openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c2),1);
				}
				break;
			case 3:
				var c3 = data.readCubicCurveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
				break;
			case 4:
				var c4 = data.readCurveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
				break;
			case 5:
				var c5 = data.readDrawCircle();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
				break;
			case 6:
				var c6 = data.readDrawEllipse();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
				break;
			case 8:
				var c7 = data.readDrawRect();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
				break;
			case 9:
				var c8 = data.readDrawRoundRect();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
				break;
			case 12:
				data.readEndFill();
				openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
				openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
				if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(x,y)) {
					data.destroy();
					return true;
				}
				if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(x,y)) {
					data.destroy();
					return true;
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
				openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
				break;
			case 13:
				var c9 = data.readLineBitmapStyle();
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineBitmapStyle(openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c9),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix(c9),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c9),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_smooth(c9));
				break;
			case 14:
				var c10 = data.readLineGradientStyle();
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineGradientStyle(openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c10),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c10));
				break;
			case 15:
				var c11 = data.readLineStyle();
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineStyle(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11),1,openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_pixelHinting(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c11),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c11));
				break;
			case 16:
				var c12 = data.readLineTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c12),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c12));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c12),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c12));
				break;
			case 17:
				var c13 = data.readMoveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13));
				openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13));
				break;
			default:
				data.skip(type);
			}
		}
		if(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.get_length() > 0) {
			openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
		}
		if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length() > 0) {
			openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
		}
		data.destroy();
		if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInPath(x,y)) {
			return true;
		}
		if(openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke && openfl__$internal_renderer_canvas_CanvasGraphics.context.isPointInStroke(x,y)) {
			return true;
		}
	}
	return false;
};
openfl__$internal_renderer_canvas_CanvasGraphics.isCCW = function(x1,y1,x2,y2,x3,y3) {
	return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0;
};
openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT = function(uvt,skipT) {
	if(skipT == null) {
		skipT = false;
	}
	var max = -Infinity;
	var tmp = -Infinity;
	var len = uvt.length;
	var _g1 = 1;
	var _g = len + 1;
	while(_g1 < _g) {
		var t = _g1++;
		if(skipT && t % 3 == 0) {
			continue;
		}
		tmp = uvt.data[t - 1];
		if(max < tmp) {
			max = tmp;
		}
	}
	var this1 = new openfl_VectorData();
	this1.data = new Array(0);
	this1.length = 0;
	this1.fixed = false;
	var result = this1;
	var _g11 = 1;
	var _g2 = len + 1;
	while(_g11 < _g2) {
		var t1 = _g11++;
		if(skipT && t1 % 3 == 0) {
			continue;
		}
		var x = uvt.data[t1 - 1] / max;
		if(!result.fixed) {
			result.length++;
			if(result.data.length < result.length) {
				var length = result.data.length + 10;
				var data = new Array(length);
				haxe_ds__$Vector_Vector_$Impl_$.blit(result.data,0,data,0,result.data.length);
				result.data = data;
			}
			result.data[result.length - 1] = x;
		}
	}
	return { max : max, uvt : result};
};
openfl__$internal_renderer_canvas_CanvasGraphics.playCommands = function(commands,stroke) {
	if(stroke == null) {
		stroke = false;
	}
	openfl__$internal_renderer_canvas_CanvasGraphics.bounds = openfl__$internal_renderer_canvas_CanvasGraphics.graphics.__bounds;
	var offsetX = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x;
	var offsetY = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y;
	var positionX = 0.0;
	var positionY = 0.0;
	var closeGap = false;
	var startX = 0.0;
	var startY = 0.0;
	var data = new openfl__$internal_renderer_DrawCommandReader(commands);
	var _g = 0;
	var _g1 = commands.types;
	while(_g < _g1.length) {
		var type = _g1[_g];
		++_g;
		switch(type[1]) {
		case 0:
			var c = data.readBeginBitmapFill();
			var tmp = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(tmp,true);
			openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = true;
			if(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c) != null) {
				openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c);
				openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c).clone();
				openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.invert();
			} else {
				openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix = null;
				openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix = null;
			}
			break;
		case 1:
			var c1 = data.readBeginFill();
			if(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1) < 0.005) {
				openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
			} else {
				if(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1) == 1) {
					var tmp1 = StringTools.hex(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1),6);
					openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = "#" + tmp1;
				} else {
					var tmp2 = "rgba(" + ((openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 16711680) >>> 16) + ", " + ((openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 65280) >>> 8) + ", " + (openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 255) + ", " + openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1);
					openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = tmp2 + ")";
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
				openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = true;
			}
			break;
		case 2:
			var c2 = data.readBeginGradientFill();
			var tmp3 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c2);
			var tmp4 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c2);
			var tmp5 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c2);
			var tmp6 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c2);
			var tmp7 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c2);
			var tmp8 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c2);
			var tmp9 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c2);
			var tmp10 = openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c2);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.fillStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern(tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10);
			openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
			openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = true;
			break;
		case 3:
			var c3 = data.readCubicCurveTo();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3) - offsetY);
			break;
		case 4:
			var c4 = data.readCurveTo();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4) - offsetY,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4) - offsetX,openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4) - offsetY);
			break;
		case 5:
			var c5 = data.readDrawCircle();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5) - offsetX + openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5) - offsetY);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.arc(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5),0,Math.PI * 2,true);
			break;
		case 6:
			var c6 = data.readDrawEllipse();
			var x = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6);
			var y = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6);
			var width = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6);
			var height = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6);
			x -= offsetX;
			y -= offsetY;
			var ox = width / 2 * .5522848;
			var oy = height / 2 * .5522848;
			var xe = x + width;
			var ye = y + height;
			var xm = x + width / 2;
			var ym = y + height / 2;
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x,ym);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x,ym - oy,xm - ox,y,xm,y);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm + ox,y,xe,ym - oy,xe,ym);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xe,ym + oy,xm + ox,ye,xm,ye);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm - ox,ye,x,ym + oy,x,ym);
			break;
		case 8:
			var c7 = data.readDrawRect();
			var optimizationUsed = false;
			if(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill != null) {
				var st = 0;
				var sr = 0;
				var sb = 0;
				var sl = 0;
				var canOptimizeMatrix = true;
				if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix != null) {
					if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.b != 0 || openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.c != 0) {
						canOptimizeMatrix = false;
					} else {
						var stl = openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.transformPoint(new openfl_geom_Point(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7)));
						var sbr = openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.transformPoint(new openfl_geom_Point(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7) + openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7) + openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7)));
						st = stl.y;
						sl = stl.x;
						sb = sbr.y;
						sr = sbr.x;
					}
				} else {
					st = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7);
					sl = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7);
					sb = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7) + openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7);
					sr = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7) + openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7);
				}
				if(canOptimizeMatrix && st >= 0 && sl >= 0 && sr <= openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width && sb <= openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height) {
					optimizationUsed = true;
					if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
						openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.image.get_src(),sl,st,sr - sl,sb - st,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
					}
				}
			}
			if(!optimizationUsed) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
			}
			break;
		case 9:
			var c8 = data.readDrawRoundRect();
			openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8) - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8) - offsetY,openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
			break;
		case 13:
			var c9 = data.readLineBitmapStyle();
			if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) {
				openfl__$internal_renderer_canvas_CanvasGraphics.closePath();
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(positionX - offsetX,positionY - offsetY);
			var tmp11 = openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c9);
			var tmp12 = openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c9);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createBitmapFill(tmp11,tmp12);
			openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = true;
			break;
		case 14:
			var c10 = data.readLineGradientStyle();
			if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) {
				openfl__$internal_renderer_canvas_CanvasGraphics.closePath();
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(positionX - offsetX,positionY - offsetY);
			var tmp13 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c10);
			var tmp14 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c10);
			var tmp15 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c10);
			var tmp16 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c10);
			var tmp17 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c10);
			var tmp18 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c10);
			var tmp19 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c10);
			var tmp20 = openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c10);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = openfl__$internal_renderer_canvas_CanvasGraphics.createGradientPattern(tmp13,tmp14,tmp15,tmp16,tmp17,tmp18,tmp19,tmp20);
			openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = true;
			break;
		case 15:
			var c11 = data.readLineStyle();
			if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
				if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
					openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke();
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(positionX - offsetX,positionY - offsetY);
			if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11) == null) {
				openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = false;
			} else {
				var tmp21 = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11) > 0 ? openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11) : 1;
				openfl__$internal_renderer_canvas_CanvasGraphics.context.lineWidth = tmp21;
				var tmp22 = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c11) == null ? "round" : openfl_display__$JointStyle_JointStyle_$Impl_$.toString(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c11)).toLowerCase();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.lineJoin = tmp22;
				var tmp23 = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c11) == null ? "round" : openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c11) == 0 ? "butt" : openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c11)).toLowerCase();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.lineCap = tmp23;
				openfl__$internal_renderer_canvas_CanvasGraphics.context.miterLimit = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c11);
				if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c11) == 1) {
					var tmp24 = StringTools.hex(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11) & 16777215,6);
					openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = "#" + tmp24;
				} else {
					var tmp25 = "rgba(" + ((openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11) & 16711680) >>> 16) + ", " + ((openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11) & 65280) >>> 8) + ", " + (openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11) & 255) + ", " + openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c11);
					openfl__$internal_renderer_canvas_CanvasGraphics.context.strokeStyle = tmp25 + ")";
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = true;
			}
			break;
		case 16:
			var c12 = data.readLineTo();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c12) - offsetX,openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c12) - offsetY);
			positionX = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c12);
			positionY = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c12);
			break;
		case 17:
			var c13 = data.readMoveTo();
			openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13) - offsetX,openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13) - offsetY);
			positionX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13);
			positionY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13);
			closeGap = true;
			startX = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13);
			startY = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13);
			break;
		default:
			data.skip(type);
		}
	}
	data.destroy();
	if(stroke && openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke) {
		if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill && closeGap) {
			openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(startX - offsetX,startY - offsetY);
		} else if(closeGap && positionX == startX && positionY == startY) {
			openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
		}
		if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
			openfl__$internal_renderer_canvas_CanvasGraphics.context.stroke();
		}
	}
	if(!stroke) {
		if(openfl__$internal_renderer_canvas_CanvasGraphics.hasFill || openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill != null) {
			openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,-openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);
			if(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix != null) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.pendingMatrix.ty);
				if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
					openfl__$internal_renderer_canvas_CanvasGraphics.context.fill();
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.a,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.b,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.c,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.d,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.tx,openfl__$internal_renderer_canvas_CanvasGraphics.inversePendingMatrix.ty);
			} else if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context.fill();
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y);
			openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
		}
	}
};
openfl__$internal_renderer_canvas_CanvasGraphics.render = function(graphics,renderSession) {
	var directRender = false;
	if(graphics.__dirty || directRender) {
		openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting = false;
		openfl__$internal_renderer_canvas_CanvasGraphics.graphics = graphics;
		openfl__$internal_renderer_canvas_CanvasGraphics.bounds = graphics.__bounds;
		if(!graphics.__visible || graphics.__commands.get_length() == 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds == null || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width <= 0 || openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height <= 0) {
			graphics.__canvas = null;
			graphics.__context = null;
			graphics.__bitmap = null;
		} else {
			if(directRender) {
				openfl__$internal_renderer_canvas_CanvasGraphics.context = renderSession.context;
				openfl__$internal_renderer_canvas_CanvasGraphics.bounds.setTo(0,0,openfl__$internal_renderer_canvas_CanvasGraphics.context.canvas.width,openfl__$internal_renderer_canvas_CanvasGraphics.context.canvas.width);
			} else {
				if(graphics.__canvas == null) {
					graphics.__canvas = window.document.createElement("canvas");
					graphics.__context = graphics.__canvas.getContext("2d");
				}
				openfl__$internal_renderer_canvas_CanvasGraphics.context = graphics.__context;
				graphics.__canvas.width = Math.ceil(openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width);
				graphics.__canvas.height = Math.ceil(openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height);
			}
			openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.clear();
			openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.clear();
			openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
			openfl__$internal_renderer_canvas_CanvasGraphics.hasStroke = false;
			openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
			openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat = false;
			var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
			var _g = 0;
			var _g1 = graphics.__commands.types;
			try {
				while(_g < _g1.length) {
					var type = _g1[_g];
					++_g;
					switch(type[1]) {
					case 0:case 1:case 2:
						openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
						openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
						if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_BITMAP_FILL) {
							var c = data.readBeginBitmapFill();
							openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
							openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginBitmapFill(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c));
						} else if(type == openfl__$internal_renderer_DrawCommandType.BEGIN_GRADIENT_FILL) {
							var c1 = data.readBeginGradientFill();
							openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c1));
							openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginGradientFill(openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_type(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_colors(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_alphas(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_ratios(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_matrix(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_spreadMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_interpolationMethod(c1),openfl__$internal_renderer__$DrawCommandReader_BeginGradientFillView_$Impl_$.get_focalPointRatio(c1));
						} else {
							var c2 = data.readBeginFill();
							openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c2),openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c2));
							openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.beginFill(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c2),openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c2));
						}
						break;
					case 3:
						var c3 = data.readCubicCurveTo();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.cubicCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c3),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c3));
						break;
					case 4:
						var c4 = data.readCurveTo();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.curveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c4),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c4));
						break;
					case 5:
						var c5 = data.readDrawCircle();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawCircle(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c5));
						break;
					case 6:
						var c6 = data.readDrawEllipse();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawEllipse(openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c6),openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c6));
						break;
					case 8:
						var c7 = data.readDrawRect();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7));
						break;
					case 9:
						var c8 = data.readDrawRoundRect();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8));
						break;
					case 10:
						var c9 = data.readDrawTiles();
						var useScale = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 1) > 0;
						var offsetX = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.x;
						var offsetY = openfl__$internal_renderer_canvas_CanvasGraphics.bounds.y;
						var useRotation = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 2) > 0;
						var useTransform = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 16) > 0;
						var useRGB = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 4) > 0;
						var useAlpha = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 8) > 0;
						var useRect = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 32) > 0;
						var useOrigin = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 64) > 0;
						var useBlendAdd = (openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9) & 65536) > 0;
						if(useTransform) {
							useScale = false;
							useRotation = false;
						}
						var scaleIndex = 0;
						var rotationIndex = 0;
						var rgbIndex = 0;
						var alphaIndex = 0;
						var transformIndex = 0;
						var numValues = 3;
						if(useRect) {
							if(useOrigin) {
								numValues = 8;
							} else {
								numValues = 6;
							}
						}
						if(useScale) {
							scaleIndex = numValues;
							++numValues;
						}
						if(useRotation) {
							rotationIndex = numValues;
							++numValues;
						}
						if(useTransform) {
							transformIndex = numValues;
							numValues += 4;
						}
						if(useRGB) {
							rgbIndex = numValues;
							numValues += 3;
						}
						if(useAlpha) {
							alphaIndex = numValues;
							++numValues;
						}
						var totalCount = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9).length;
						if(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9) >= 0 && totalCount > openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9)) {
							totalCount = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9);
						}
						var index = 0;
						var rect = null;
						var center = null;
						var previousTileID = -1;
						var surface;
						openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__bitmap.__sync();
						surface = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__bitmap.image.get_src();
						if(useBlendAdd) {
							openfl__$internal_renderer_canvas_CanvasGraphics.context.globalCompositeOperation = "lighter";
						}
						while(index < totalCount) {
							var tileID = !useRect ? openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 2] | 0 : -1;
							if(!useRect && tileID != previousTileID) {
								rect = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__tileRects[tileID];
								center = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__centerPoints[tileID];
								previousTileID = tileID;
							} else if(useRect) {
								rect = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__rectTile;
								rect.setTo(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 2],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 3],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 4],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 5]);
								center = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9).__point;
								if(useOrigin) {
									center.setTo(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 6],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 7]);
								} else {
									center.setTo(0,0);
								}
							}
							if(rect != null && rect.width > 0 && rect.height > 0 && center != null) {
								openfl__$internal_renderer_canvas_CanvasGraphics.context.save();
								openfl__$internal_renderer_canvas_CanvasGraphics.context.translate(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index] - offsetX,openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + 1] - offsetY);
								if(useRotation) {
									openfl__$internal_renderer_canvas_CanvasGraphics.context.rotate(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + rotationIndex]);
								}
								var scale = 1.0;
								if(useScale) {
									scale = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + scaleIndex];
								}
								if(useTransform) {
									openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex + 1],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex + 2],openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9)[index + transformIndex + 3],0,0);
								}
								if(useAlpha) {
									var tmp = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
									openfl__$internal_renderer_canvas_CanvasGraphics.context.globalAlpha = tmp[index + alphaIndex];
								}
								openfl__$internal_renderer_canvas_CanvasGraphics.context.imageSmoothingEnabled = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_smooth(c9);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(surface,rect.x,rect.y,rect.width,rect.height,-center.x * scale,-center.y * scale,rect.width * scale,rect.height * scale);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.restore();
							}
							index += numValues;
						}
						if(useBlendAdd) {
							openfl__$internal_renderer_canvas_CanvasGraphics.context.globalCompositeOperation = "source-over";
						}
						break;
					case 11:
						openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
						openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
						var c10 = data.readDrawTriangles();
						var v = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices(c10);
						var ind = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices(c10);
						var uvt = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c10);
						var pattern = null;
						var colorFill = openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill == null;
						if(colorFill && uvt != null) {
							throw "__break__";
						}
						if(!colorFill) {
							if(uvt == null) {
								var this1 = new openfl_VectorData();
								this1.data = new Array(0);
								this1.length = 0;
								this1.fixed = false;
								uvt = this1;
								var _g3 = 0;
								var _g2 = v.length / 2 | 0;
								while(_g3 < _g2) {
									var i = _g3++;
									var x = v.data[i * 2] / openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width;
									if(!uvt.fixed) {
										uvt.length++;
										if(uvt.data.length < uvt.length) {
											var length = uvt.data.length + 10;
											var data1 = new Array(length);
											haxe_ds__$Vector_Vector_$Impl_$.blit(uvt.data,0,data1,0,uvt.data.length);
											uvt.data = data1;
										}
										uvt.data[uvt.length - 1] = x;
									}
									var x1 = v.data[i * 2 + 1] / openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height;
									if(!uvt.fixed) {
										uvt.length++;
										if(uvt.data.length < uvt.length) {
											var length1 = uvt.data.length + 10;
											var data2 = new Array(length1);
											haxe_ds__$Vector_Vector_$Impl_$.blit(uvt.data,0,data2,0,uvt.data.length);
											uvt.data = data2;
										}
										uvt.data[uvt.length - 1] = x1;
									}
								}
							}
							var normalizedUVT = openfl__$internal_renderer_canvas_CanvasGraphics.normalizeUVT(uvt,uvt.length != v.length);
							uvt = normalizedUVT.uvt;
							if(normalizedUVT.max > 1) {
								pattern = openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.width | 0,openfl__$internal_renderer_canvas_CanvasGraphics.bounds.height | 0);
							} else {
								pattern = openfl__$internal_renderer_canvas_CanvasGraphics.createTempPatternCanvas(openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapRepeat,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.width,openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill.height);
							}
						}
						var i1 = 0;
						var l = ind.length;
						var a_;
						var b_;
						var c_;
						var iax;
						var iay;
						var ibx;
						var iby;
						var icx;
						var icy;
						var x11;
						var y1;
						var x2;
						var y2;
						var x3;
						var y3;
						var uvx1;
						var uvy1;
						var uvx2;
						var uvy2;
						var uvx3;
						var uvy3;
						var denom;
						var t1;
						var t2;
						var t3;
						var t4;
						var dx;
						var dy;
						while(i1 < l) {
							a_ = i1;
							b_ = i1 + 1;
							c_ = i1 + 2;
							iax = ind.data[a_] * 2;
							iay = ind.data[a_] * 2 + 1;
							ibx = ind.data[b_] * 2;
							iby = ind.data[b_] * 2 + 1;
							icx = ind.data[c_] * 2;
							icy = ind.data[c_] * 2 + 1;
							x11 = v.data[iax];
							y1 = v.data[iay];
							x2 = v.data[ibx];
							y2 = v.data[iby];
							x3 = v.data[icx];
							y3 = v.data[icy];
							switch(openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling(c10)) {
							case 0:
								if((x2 - x11) * (y3 - y1) - (y2 - y1) * (x3 - x11) < 0) {
									i1 += 3;
									continue;
								}
								break;
							case 2:
								if(!((x2 - x11) * (y3 - y1) - (y2 - y1) * (x3 - x11) < 0)) {
									i1 += 3;
									continue;
								}
								break;
							default:
							}
							if(colorFill) {
								openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
								openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x11,y1);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x2,y2);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x3,y3);
								openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
								if(!openfl__$internal_renderer_canvas_CanvasGraphics.hitTesting) {
									openfl__$internal_renderer_canvas_CanvasGraphics.context.fill();
								}
								i1 += 3;
								continue;
							}
							openfl__$internal_renderer_canvas_CanvasGraphics.context.save();
							openfl__$internal_renderer_canvas_CanvasGraphics.context.beginPath();
							openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x11,y1);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x2,y2);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(x3,y3);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.closePath();
							openfl__$internal_renderer_canvas_CanvasGraphics.context.clip();
							uvx1 = uvt.data[iax] * pattern.width;
							uvx2 = uvt.data[ibx] * pattern.width;
							uvx3 = uvt.data[icx] * pattern.width;
							uvy1 = uvt.data[iay] * pattern.height;
							uvy2 = uvt.data[iby] * pattern.height;
							uvy3 = uvt.data[icy] * pattern.height;
							denom = uvx1 * (uvy3 - uvy2) - uvx2 * uvy3 + uvx3 * uvy2 + (uvx2 - uvx3) * uvy1;
							if(denom == 0) {
								i1 += 3;
								continue;
							}
							t1 = -(uvy1 * (x3 - x2) - uvy2 * x3 + uvy3 * x2 + (uvy2 - uvy3) * x11) / denom;
							t2 = (uvy2 * y3 + uvy1 * (y2 - y3) - uvy3 * y2 + (uvy3 - uvy2) * y1) / denom;
							t3 = (uvx1 * (x3 - x2) - uvx2 * x3 + uvx3 * x2 + (uvx2 - uvx3) * x11) / denom;
							t4 = -(uvx2 * y3 + uvx1 * (y2 - y3) - uvx3 * y2 + (uvx3 - uvx2) * y1) / denom;
							dx = (uvx1 * (uvy3 * x2 - uvy2 * x3) + uvy1 * (uvx2 * x3 - uvx3 * x2) + (uvx3 * uvy2 - uvx2 * uvy3) * x11) / denom;
							dy = (uvx1 * (uvy3 * y2 - uvy2 * y3) + uvy1 * (uvx2 * y3 - uvx3 * y2) + (uvx3 * uvy2 - uvx2 * uvy3) * y1) / denom;
							openfl__$internal_renderer_canvas_CanvasGraphics.context.transform(t1,t2,t3,t4,dx,dy);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.drawImage(pattern,0,0);
							openfl__$internal_renderer_canvas_CanvasGraphics.context.restore();
							i1 += 3;
						}
						break;
					case 12:
						data.readEndFill();
						openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
						openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
						openfl__$internal_renderer_canvas_CanvasGraphics.hasFill = false;
						openfl__$internal_renderer_canvas_CanvasGraphics.bitmapFill = null;
						break;
					case 13:
						var c11 = data.readLineBitmapStyle();
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineBitmapStyle(openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_bitmap(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_matrix(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_repeat(c11),openfl__$internal_renderer__$DrawCommandReader_LineBitmapStyleView_$Impl_$.get_smooth(c11));
						break;
					case 14:
						var c12 = data.readLineGradientStyle();
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineGradientStyle(openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_type(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_colors(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_alphas(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_ratios(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_matrix(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_spreadMethod(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_interpolationMethod(c12),openfl__$internal_renderer__$DrawCommandReader_LineGradientStyleView_$Impl_$.get_focalPointRatio(c12));
						break;
					case 15:
						var c13 = data.readLineStyle();
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineStyle(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_pixelHinting(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c13),openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c13));
						break;
					case 16:
						var c14 = data.readLineTo();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c14),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c14));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c14),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c14));
						break;
					case 17:
						var c15 = data.readMoveTo();
						openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15));
						openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c15),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c15));
						break;
					default:
						data.skip(type);
					}
				}
			} catch( e ) { if( e != "__break__" ) throw e; }
			if(openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands.get_length() > 0) {
				openfl__$internal_renderer_canvas_CanvasGraphics.endFill();
			}
			if(openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands.get_length() > 0) {
				openfl__$internal_renderer_canvas_CanvasGraphics.endStroke();
			}
			data.destroy();
			graphics.__bitmap = openfl_display_BitmapData.fromCanvas(graphics.__canvas);
		}
		graphics.set___dirty(false);
	}
};
openfl__$internal_renderer_canvas_CanvasGraphics.renderMask = function(graphics,renderSession) {
	if(graphics.__commands.get_length() != 0) {
		openfl__$internal_renderer_canvas_CanvasGraphics.context = renderSession.context;
		var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
		var _g = 0;
		var _g1 = graphics.__commands.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 3:
				var c = data.readCubicCurveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c),openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c));
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c);
				openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c);
				break;
			case 4:
				var c1 = data.readCurveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.quadraticCurveTo(openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c1),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c1),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c1),openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c1));
				openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c1);
				openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c1);
				break;
			case 5:
				var c2 = data.readDrawCircle();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.arc(openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c2),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c2),openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c2),0,Math.PI * 2,true);
				break;
			case 6:
				var c3 = data.readDrawEllipse();
				var x = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c3);
				var y = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c3);
				var width = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c3);
				var height = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c3);
				x -= 0;
				y -= 0;
				var ox = width / 2 * .5522848;
				var oy = height / 2 * .5522848;
				var xe = x + width;
				var ye = y + height;
				var xm = x + width / 2;
				var ym = y + height / 2;
				openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(x,ym);
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(x,ym - oy,xm - ox,y,xm,y);
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm + ox,y,xe,ym - oy,xe,ym);
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xe,ym + oy,xm + ox,ye,xm,ye);
				openfl__$internal_renderer_canvas_CanvasGraphics.context.bezierCurveTo(xm - ox,ye,x,ym + oy,x,ym);
				break;
			case 8:
				var c4 = data.readDrawRect();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.rect(openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c4),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c4),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c4),openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c4));
				break;
			case 9:
				var c5 = data.readDrawRoundRect();
				openfl__$internal_renderer_canvas_CanvasGraphics.drawRoundRect(openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c5),openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c5));
				break;
			case 16:
				var c6 = data.readLineTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.lineTo(openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c6),openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c6));
				openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c6);
				openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c6);
				break;
			case 17:
				var c7 = data.readMoveTo();
				openfl__$internal_renderer_canvas_CanvasGraphics.context.moveTo(openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c7),openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c7));
				openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c7);
				openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c7);
				break;
			default:
				data.skip(type);
			}
		}
		data.destroy();
	}
};
var openfl__$internal_renderer_canvas_CanvasMaskManager = function(renderSession) {
	openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
};
$hxClasses["openfl._internal.renderer.canvas.CanvasMaskManager"] = openfl__$internal_renderer_canvas_CanvasMaskManager;
openfl__$internal_renderer_canvas_CanvasMaskManager.__name__ = ["openfl","_internal","renderer","canvas","CanvasMaskManager"];
openfl__$internal_renderer_canvas_CanvasMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_canvas_CanvasMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
	pushMask: function(mask) {
		var context = this.renderSession.context;
		context.save();
		var transform = mask.__getWorldTransform();
		context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
		context.beginPath();
		mask.__renderCanvasMask(this.renderSession);
		context.clip();
	}
	,pushRect: function(rect,transform) {
		var context = this.renderSession.context;
		context.save();
		context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
		context.beginPath();
		context.rect(rect.x,rect.y,rect.width,rect.height);
		context.clip();
	}
	,popMask: function() {
		this.renderSession.context.restore();
	}
	,popRect: function() {
		this.renderSession.context.restore();
	}
	,__class__: openfl__$internal_renderer_canvas_CanvasMaskManager
});
var openfl__$internal_renderer_canvas_CanvasRenderer = function(width,height,context) {
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	this.context = context;
	this.renderSession = new openfl__$internal_renderer_RenderSession();
	this.renderSession.context = context;
	this.renderSession.roundPixels = true;
	this.renderSession.renderer = this;
	this.renderSession.maskManager = new openfl__$internal_renderer_canvas_CanvasMaskManager(this.renderSession);
};
$hxClasses["openfl._internal.renderer.canvas.CanvasRenderer"] = openfl__$internal_renderer_canvas_CanvasRenderer;
openfl__$internal_renderer_canvas_CanvasRenderer.__name__ = ["openfl","_internal","renderer","canvas","CanvasRenderer"];
openfl__$internal_renderer_canvas_CanvasRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_canvas_CanvasRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	render: function(stage) {
		this.context.setTransform(1,0,0,1,0,0);
		this.context.globalAlpha = 1;
		if(!stage.__transparent && stage.__clearBeforeRender) {
			this.context.fillStyle = stage.__colorString;
			this.context.fillRect(0,0,stage.stageWidth,stage.stageHeight);
		} else if(stage.__transparent && stage.__clearBeforeRender) {
			this.context.clearRect(0,0,stage.stageWidth,stage.stageHeight);
		}
		stage.__renderCanvas(this.renderSession);
	}
	,__class__: openfl__$internal_renderer_canvas_CanvasRenderer
});
var openfl__$internal_renderer_canvas_CanvasShape = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasShape"] = openfl__$internal_renderer_canvas_CanvasShape;
openfl__$internal_renderer_canvas_CanvasShape.__name__ = ["openfl","_internal","renderer","canvas","CanvasShape"];
openfl__$internal_renderer_canvas_CanvasShape.render = function(shape,renderSession) {
	if(!shape.__renderable || shape.__worldAlpha <= 0) {
		return;
	}
	var graphics = shape.__graphics;
	if(graphics != null) {
		openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession);
		if(graphics.__canvas != null) {
			var context = renderSession.context;
			var scrollRect = shape.get_scrollRect();
			if(graphics.__bounds.width > 0 && graphics.__bounds.height > 0 && (scrollRect == null || scrollRect.width > 0 && scrollRect.height > 0)) {
				if(shape.__mask != null) {
					renderSession.maskManager.pushMask(shape.__mask);
				}
				context.globalAlpha = shape.__worldAlpha;
				var transform = shape.__renderTransform;
				if(renderSession.roundPixels) {
					context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
				} else {
					context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
				}
				if(scrollRect == null) {
					context.drawImage(graphics.__canvas,graphics.__bounds.x,graphics.__bounds.y);
				} else {
					context.drawImage(graphics.__canvas,Math.ceil(graphics.__bounds.x + scrollRect.x),Math.ceil(graphics.__bounds.y + scrollRect.y),scrollRect.width,scrollRect.height,Math.ceil(graphics.__bounds.x + scrollRect.x),Math.ceil(graphics.__bounds.y + scrollRect.y),scrollRect.width,scrollRect.height);
				}
				if(shape.__mask != null) {
					renderSession.maskManager.popMask();
				}
			}
		}
	}
};
var openfl__$internal_renderer_canvas_CanvasTextField = function() { };
$hxClasses["openfl._internal.renderer.canvas.CanvasTextField"] = openfl__$internal_renderer_canvas_CanvasTextField;
openfl__$internal_renderer_canvas_CanvasTextField.__name__ = ["openfl","_internal","renderer","canvas","CanvasTextField"];
openfl__$internal_renderer_canvas_CanvasTextField.context = null;
openfl__$internal_renderer_canvas_CanvasTextField.disableInputMode = function(textEngine) {
};
openfl__$internal_renderer_canvas_CanvasTextField.enableInputMode = function(textEngine) {
	textEngine.__cursorPosition = -1;
	if(textEngine.__hiddenInput == null) {
		textEngine.__hiddenInput = window.document.createElement("input");
		var hiddenInput = textEngine.__hiddenInput;
		hiddenInput.type = "text";
		hiddenInput.style.position = "absolute";
		hiddenInput.style.opacity = "0";
		hiddenInput.style.color = "transparent";
		hiddenInput.style.left = "0px";
		hiddenInput.style.top = "50%";
		if(new EReg("(iPad|iPhone|iPod).*OS 8_","gi").match(window.navigator.userAgent)) {
			hiddenInput.style.fontSize = "0px";
			hiddenInput.style.width = "0px";
			hiddenInput.style.height = "0px";
		} else {
			hiddenInput.style.width = "1px";
			hiddenInput.style.height = "1px";
		}
		hiddenInput.style.pointerEvents = "none";
		hiddenInput.style.zIndex = "-10000000";
		if(textEngine.maxChars > 0) {
			hiddenInput.maxLength = textEngine.maxChars;
		}
		window.document.body.appendChild(hiddenInput);
		hiddenInput.value = textEngine.text;
	}
};
openfl__$internal_renderer_canvas_CanvasTextField.render = function(textField,renderSession) {
	if(textField.__dirty) {
		var textEngine = textField.__textEngine;
		textField.__updateLayout();
		if((textEngine.text == null || textEngine.text == "") && !textEngine.background && !textEngine.border && !textEngine.__hasFocus || (textEngine.width <= 0 || textEngine.height <= 0) && textEngine.autoSize != 2) {
			textField.__graphics.__canvas = null;
			textField.__graphics.__context = null;
			textField.__graphics.set___dirty(false);
			textField.__dirty = false;
		} else {
			var bounds = textEngine.bounds;
			if(textField.__graphics == null || textField.__graphics.__canvas == null) {
				if(textField.__graphics == null) {
					textField.__graphics = new openfl_display_Graphics();
				}
				textField.__graphics.__canvas = window.document.createElement("canvas");
				textField.__graphics.__context = textField.__graphics.__canvas.getContext("2d");
				textField.__graphics.__bounds = new openfl_geom_Rectangle(0,0,bounds.width,bounds.height);
			}
			var graphics = textField.__graphics;
			openfl__$internal_renderer_canvas_CanvasTextField.context = graphics.__context;
			if(textEngine.text != null && textEngine.text != "" || textEngine.__hasFocus) {
				var text = textEngine.text;
				if(textEngine.displayAsPassword) {
					var length = text.length;
					var mask = "";
					var _g1 = 0;
					var _g = length;
					while(_g1 < _g) {
						var i = _g1++;
						mask += "*";
					}
					text = mask;
				}
				graphics.__canvas.width = Math.ceil(bounds.width);
				graphics.__canvas.height = Math.ceil(bounds.height);
				if(textEngine.antiAliasType != 0 || textEngine.gridFitType != 1) {
					graphics.__context.mozImageSmoothingEnabled = true;
					graphics.__context.msImageSmoothingEnabled = true;
					graphics.__context.imageSmoothingEnabled = true;
				} else {
					graphics.__context.mozImageSmoothingEnabled = false;
					graphics.__context.msImageSmoothingEnabled = false;
					graphics.__context.imageSmoothingEnabled = false;
				}
				if(textEngine.border || textEngine.background) {
					openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
					if(textEngine.background) {
						var tmp = StringTools.hex(textEngine.backgroundColor,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp;
						openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
					}
					if(textEngine.border) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
						var tmp1 = StringTools.hex(textEngine.borderColor,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp1;
						openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
					}
				}
				openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline = "top";
				openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign = "start";
				var scrollX = -textField.get_scrollH();
				var scrollY = 0.0;
				var _g11 = 0;
				var _g2 = textField.get_scrollV() - 1;
				while(_g11 < _g2) {
					var i1 = _g11++;
					scrollY -= textEngine.lineHeights[i1];
				}
				var advance;
				var offsetY = 0.0;
				var applyHack = new EReg("(iPad|iPhone|iPod|Firefox)","g").match(window.navigator.userAgent);
				var _g3 = 0;
				var _g12 = textEngine.layoutGroups;
				while(_g3 < _g12.length) {
					var group = _g12[_g3];
					++_g3;
					if(group.lineIndex < textField.get_scrollV() - 1) {
						continue;
					}
					if(group.lineIndex > textField.get_scrollV() + textEngine.bottomScrollV - 2) {
						break;
					}
					openfl__$internal_renderer_canvas_CanvasTextField.context.font = openfl__$internal_text_TextEngine.getFont(group.format);
					var tmp2 = StringTools.hex(group.format.color,6);
					openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp2;
					if(applyHack) {
						offsetY = group.format.size * 0.185;
					}
					openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
					if(textField.__caretIndex > -1 && textEngine.selectable) {
						if(textField.__selectionIndex == textField.__caretIndex) {
							if(textField.__showCursor && group.startIndex <= textField.__caretIndex && group.endIndex >= textField.__caretIndex) {
								advance = 0.0;
								var _g31 = 0;
								var _g21 = textField.__caretIndex - group.startIndex;
								while(_g31 < _g21) {
									var i2 = _g31++;
									if(group.advances.length <= i2) {
										break;
									}
									advance += group.advances[i2];
								}
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(group.offsetX + advance,group.offsetY,1,group.height);
							}
						} else if(group.startIndex <= textField.__caretIndex && group.endIndex >= textField.__caretIndex || group.startIndex <= textField.__selectionIndex && group.endIndex >= textField.__selectionIndex) {
							var selectionStart = Math.min(textField.__selectionIndex,textField.__caretIndex) | 0;
							var selectionEnd = Math.max(textField.__selectionIndex,textField.__caretIndex) | 0;
							if(group.startIndex > selectionStart) {
								selectionStart = group.startIndex;
							}
							if(group.endIndex < selectionEnd) {
								selectionEnd = group.endIndex;
							}
							var start;
							var end;
							start = textField.getCharBoundaries(selectionStart);
							if(selectionEnd >= textEngine.text.length) {
								end = textField.getCharBoundaries(textEngine.text.length - 1);
								end.x += end.width + 2;
							} else {
								end = textField.getCharBoundaries(selectionEnd);
							}
							if(start != null && end != null) {
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#000000";
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(start.x,start.y,end.x - start.x,group.height);
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#FFFFFF";
								openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(selectionStart,selectionEnd),scrollX + start.x,group.offsetY + offsetY + scrollY);
							}
						}
					}
				}
			} else {
				graphics.__canvas.width = Math.ceil(bounds.width);
				graphics.__canvas.height = Math.ceil(bounds.height);
				if(textEngine.border || textEngine.background) {
					if(textEngine.border) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
					} else {
						openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,bounds.width,bounds.height);
					}
					if(textEngine.background) {
						var tmp3 = StringTools.hex(textEngine.backgroundColor,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp3;
						openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
					}
					if(textEngine.border) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
						openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap = "square";
						var tmp4 = StringTools.hex(textEngine.borderColor,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp4;
						openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
					}
				}
			}
			graphics.__bitmap = openfl_display_BitmapData.fromCanvas(textField.__graphics.__canvas);
			textField.__dirty = false;
			graphics.set___dirty(false);
		}
	}
};
var openfl__$internal_renderer_console_ConsoleRenderer = function(width,height,ctx) {
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	throw new js__$Boot_HaxeError("ConsoleRenderer not supported");
};
$hxClasses["openfl._internal.renderer.console.ConsoleRenderer"] = openfl__$internal_renderer_console_ConsoleRenderer;
openfl__$internal_renderer_console_ConsoleRenderer.__name__ = ["openfl","_internal","renderer","console","ConsoleRenderer"];
openfl__$internal_renderer_console_ConsoleRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_console_ConsoleRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	render: function(stage) {
	}
	,__class__: openfl__$internal_renderer_console_ConsoleRenderer
});
var openfl__$internal_renderer_dom_DOMBitmap = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMBitmap"] = openfl__$internal_renderer_dom_DOMBitmap;
openfl__$internal_renderer_dom_DOMBitmap.__name__ = ["openfl","_internal","renderer","dom","DOMBitmap"];
openfl__$internal_renderer_dom_DOMBitmap.render = function(bitmap,renderSession) {
	if(bitmap.stage != null && bitmap.__worldVisible && bitmap.__renderable && bitmap.bitmapData != null && bitmap.bitmapData.__isValid) {
		if(bitmap.bitmapData.image.buffer.__srcImage != null) {
			openfl__$internal_renderer_dom_DOMBitmap.renderImage(bitmap,renderSession);
		} else {
			openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(bitmap,renderSession);
		}
	} else {
		if(bitmap.__image != null) {
			renderSession.element.removeChild(bitmap.__image);
			bitmap.__image = null;
			bitmap.__style = null;
		}
		if(bitmap.__canvas != null) {
			renderSession.element.removeChild(bitmap.__canvas);
			bitmap.__canvas = null;
			bitmap.__style = null;
		}
	}
};
openfl__$internal_renderer_dom_DOMBitmap.renderCanvas = function(bitmap,renderSession) {
	if(bitmap.__image != null) {
		renderSession.element.removeChild(bitmap.__image);
		bitmap.__image = null;
	}
	if(bitmap.__canvas == null) {
		bitmap.__canvas = window.document.createElement("canvas");
		bitmap.__context = bitmap.__canvas.getContext("2d");
		if(!bitmap.smoothing) {
			bitmap.__context.mozImageSmoothingEnabled = false;
			bitmap.__context.msImageSmoothingEnabled = false;
			bitmap.__context.imageSmoothingEnabled = false;
		}
		openfl__$internal_renderer_dom_DOMRenderer.initializeElement(bitmap,bitmap.__canvas,renderSession);
	}
	bitmap.bitmapData.__sync();
	bitmap.__canvas.width = bitmap.bitmapData.width;
	bitmap.__canvas.height = bitmap.bitmapData.height;
	bitmap.__context.globalAlpha = bitmap.__worldAlpha;
	bitmap.__context.drawImage(bitmap.bitmapData.image.buffer.__srcCanvas,0,0);
	openfl__$internal_renderer_dom_DOMRenderer.applyStyle(bitmap,renderSession,true,false,true);
};
openfl__$internal_renderer_dom_DOMBitmap.renderImage = function(bitmap,renderSession) {
	if(bitmap.__canvas != null) {
		renderSession.element.removeChild(bitmap.__canvas);
		bitmap.__canvas = null;
	}
	if(bitmap.__image == null) {
		bitmap.__image = window.document.createElement("img");
		bitmap.__image.src = bitmap.bitmapData.image.buffer.__srcImage.src;
		openfl__$internal_renderer_dom_DOMRenderer.initializeElement(bitmap,bitmap.__image,renderSession);
	}
	openfl__$internal_renderer_dom_DOMRenderer.applyStyle(bitmap,renderSession,true,true,true);
};
var openfl__$internal_renderer_dom_DOMMaskManager = function(renderSession) {
	openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
};
$hxClasses["openfl._internal.renderer.dom.DOMMaskManager"] = openfl__$internal_renderer_dom_DOMMaskManager;
openfl__$internal_renderer_dom_DOMMaskManager.__name__ = ["openfl","_internal","renderer","dom","DOMMaskManager"];
openfl__$internal_renderer_dom_DOMMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_dom_DOMMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
	pushMask: function(mask) {
	}
	,pushRect: function(rect,transform) {
	}
	,popMask: function() {
	}
	,__class__: openfl__$internal_renderer_dom_DOMMaskManager
});
var openfl__$internal_renderer_dom_DOMRenderer = function(width,height,element) {
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	this.element = element;
	this.renderSession = new openfl__$internal_renderer_RenderSession();
	this.renderSession.element = element;
	this.renderSession.roundPixels = true;
	var prefix = (function () {
		  var styles = window.getComputedStyle(document.documentElement, ''),
			pre = (Array.prototype.slice
			  .call(styles)
			  .join('') 
			  .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
			)[1],
			dom = ('WebKit|Moz|MS|O').match(new RegExp('(' + pre + ')', 'i'))[1];
		  return {
			dom: dom,
			lowercase: pre,
			css: '-' + pre + '-',
			js: pre[0].toUpperCase() + pre.substr(1)
		  };
		})();
	this.renderSession.vendorPrefix = prefix.lowercase;
	this.renderSession.transformProperty = prefix.lowercase == "webkit" ? "-webkit-transform" : "transform";
	this.renderSession.transformOriginProperty = prefix.lowercase == "webkit" ? "-webkit-transform-origin" : "transform-origin";
	this.renderSession.maskManager = new openfl__$internal_renderer_dom_DOMMaskManager(this.renderSession);
	this.renderSession.renderer = this;
};
$hxClasses["openfl._internal.renderer.dom.DOMRenderer"] = openfl__$internal_renderer_dom_DOMRenderer;
openfl__$internal_renderer_dom_DOMRenderer.__name__ = ["openfl","_internal","renderer","dom","DOMRenderer"];
openfl__$internal_renderer_dom_DOMRenderer.applyStyle = function(displayObject,renderSession,setTransform,setAlpha,setClip) {
	var style = displayObject.__style;
	if(setTransform && displayObject.__worldTransformChanged) {
		var _this = displayObject.__worldTransform;
		style.setProperty(renderSession.transformProperty,renderSession.roundPixels ? "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)",null);
	}
	if(displayObject.__worldZ != ++renderSession.z) {
		displayObject.__worldZ = renderSession.z;
		style.setProperty("z-index",displayObject.__worldZ == null ? "null" : "" + displayObject.__worldZ,null);
	}
	if(setAlpha && displayObject.__worldAlphaChanged) {
		if(displayObject.__worldAlpha < 1) {
			style.setProperty("opacity",displayObject.__worldAlpha == null ? "null" : "" + displayObject.__worldAlpha,null);
		} else {
			style.removeProperty("opacity");
		}
	}
	if(setClip && displayObject.__worldClipChanged) {
		if(displayObject.__worldClip == null) {
			style.removeProperty("clip");
		} else {
			var clip = openfl_geom_Rectangle.__temp;
			var matrix = openfl_geom_Matrix.__temp;
			matrix.copyFrom(displayObject.__worldTransform);
			matrix.invert();
			displayObject.__worldClip.__transform(clip,matrix);
			style.setProperty("clip","rect(" + clip.y + "px, " + clip.get_right() + "px, " + clip.get_bottom() + "px, " + clip.x + "px)",null);
		}
	}
};
openfl__$internal_renderer_dom_DOMRenderer.initializeElement = function(displayObject,element,renderSession) {
	var style = displayObject.__style = element.style;
	style.setProperty("position","absolute",null);
	style.setProperty("top","0",null);
	style.setProperty("left","0",null);
	style.setProperty(renderSession.transformOriginProperty,"0 0 0",null);
	renderSession.element.appendChild(element);
	displayObject.__worldAlphaChanged = true;
	displayObject.__worldClipChanged = true;
	displayObject.__worldTransformChanged = true;
	displayObject.__worldVisibleChanged = true;
	displayObject.__worldZ = -1;
};
openfl__$internal_renderer_dom_DOMRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_dom_DOMRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	render: function(stage) {
		this.element.style.background = stage.__colorString;
		this.renderSession.z = 1;
		stage.__renderDOM(this.renderSession);
	}
	,__class__: openfl__$internal_renderer_dom_DOMRenderer
});
var openfl__$internal_renderer_dom_DOMShape = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMShape"] = openfl__$internal_renderer_dom_DOMShape;
openfl__$internal_renderer_dom_DOMShape.__name__ = ["openfl","_internal","renderer","dom","DOMShape"];
openfl__$internal_renderer_dom_DOMShape.render = function(shape,renderSession) {
	var graphics = shape.__graphics;
	if(shape.stage != null && shape.__worldVisible && shape.__renderable && graphics != null) {
		if(graphics.__dirty || shape.__worldAlphaChanged || shape.__canvas == null && graphics.__canvas != null) {
			openfl__$internal_renderer_canvas_CanvasGraphics.render(graphics,renderSession);
			if(graphics.__canvas != null) {
				if(shape.__canvas == null) {
					shape.__canvas = window.document.createElement("canvas");
					shape.__context = shape.__canvas.getContext("2d");
					openfl__$internal_renderer_dom_DOMRenderer.initializeElement(shape,shape.__canvas,renderSession);
				}
				shape.__canvas.width = graphics.__canvas.width;
				shape.__canvas.height = graphics.__canvas.height;
				shape.__context.globalAlpha = shape.__worldAlpha;
				shape.__context.drawImage(graphics.__canvas,0,0);
			} else if(shape.__canvas != null) {
				renderSession.element.removeChild(shape.__canvas);
				shape.__canvas = null;
				shape.__style = null;
			}
		}
		if(shape.__canvas != null) {
			if(shape.__worldTransformChanged || graphics.__transformDirty) {
				graphics.__transformDirty = false;
				var transform = openfl_geom_Matrix.__temp;
				transform.identity();
				transform.translate(graphics.__bounds.x,graphics.__bounds.y);
				transform.concat(shape.__worldTransform);
				shape.__style.setProperty(renderSession.transformProperty,renderSession.roundPixels ? "matrix3d(" + transform.a + ", " + transform.b + ", 0, 0, " + transform.c + ", " + transform.d + ", 0, 0, 0, 0, 1, 0, " + (transform.tx | 0) + ", " + (transform.ty | 0) + ", 0, 1)" : "matrix3d(" + transform.a + ", " + transform.b + ", 0, 0, " + transform.c + ", " + transform.d + ", 0, 0, 0, 0, 1, 0, " + transform.tx + ", " + transform.ty + ", 0, 1)",null);
			}
			openfl__$internal_renderer_dom_DOMRenderer.applyStyle(shape,renderSession,false,false,true);
		}
	} else if(shape.__canvas != null) {
		renderSession.element.removeChild(shape.__canvas);
		shape.__canvas = null;
		shape.__style = null;
	}
};
var openfl__$internal_renderer_dom_DOMTextField = function() { };
$hxClasses["openfl._internal.renderer.dom.DOMTextField"] = openfl__$internal_renderer_dom_DOMTextField;
openfl__$internal_renderer_dom_DOMTextField.__name__ = ["openfl","_internal","renderer","dom","DOMTextField"];
openfl__$internal_renderer_dom_DOMTextField.measureText = function(textField) {
	var textEngine = textField.__textEngine;
	var div = textField.__div;
	if(div == null) {
		div = window.document.createElement("div");
		var _this_r = new RegExp("\n","g".split("u").join(""));
		div.innerHTML = textEngine.text.replace(_this_r,"<br>");
		div.style.setProperty("font",openfl__$internal_text_TextEngine.getFont(textField.__textFormat),null);
		div.style.setProperty("pointer-events","none",null);
		div.style.position = "absolute";
		div.style.top = "110%";
		window.document.body.appendChild(div);
	}
	textEngine.__measuredWidth = div.clientWidth;
	if(textField.__div == null) {
		div.style.width = Std.string(textEngine.width - 4) + "px";
	}
	textEngine.__measuredHeight = div.clientHeight;
	if(textField.__div == null) {
		window.document.body.removeChild(div);
	}
};
openfl__$internal_renderer_dom_DOMTextField.render = function(textField,renderSession) {
	var textEngine = textField.__textEngine;
	if(textField.stage != null && textField.__worldVisible && textField.__renderable) {
		if(textField.__dirty || textField.__div == null) {
			if(textEngine.text != "" || textEngine.background || textEngine.border || textEngine.type == 1) {
				if(textField.__div == null) {
					textField.__div = window.document.createElement("div");
					openfl__$internal_renderer_dom_DOMRenderer.initializeElement(textField,textField.__div,renderSession);
					textField.__style.setProperty("outline","none",null);
					textField.__div.addEventListener("input",function(event) {
						event.preventDefault();
						if(textField.get_htmlText() != textField.__div.innerHTML) {
							textField.set_htmlText(textField.__div.innerHTML);
							textField.__dirty = false;
						}
					},true);
				}
				if(textEngine.selectable) {
					textField.__style.setProperty("cursor","text",null);
				} else {
					textField.__style.setProperty("cursor","inherit",null);
				}
				textField.__div.contentEditable = textEngine.type == 1;
				var style = textField.__style;
				textField.__div.innerHTML = textEngine.text;
				if(textEngine.background) {
					style.setProperty("background-color","#" + StringTools.hex(textEngine.backgroundColor,6),null);
				} else {
					style.removeProperty("background-color");
				}
				if(textEngine.border) {
					style.setProperty("border","solid 1px #" + StringTools.hex(textEngine.borderColor,6),null);
				} else {
					style.removeProperty("border");
				}
				style.setProperty("font",openfl__$internal_text_TextEngine.getFont(textField.__textFormat),null);
				style.setProperty("color","#" + StringTools.hex(textField.__textFormat.color,6),null);
				if(textEngine.autoSize != 2) {
					style.setProperty("width","auto",null);
				} else {
					style.setProperty("width",textEngine.width + "px",null);
				}
				style.setProperty("height",textEngine.height + "px",null);
				var _g = textField.__textFormat.align;
				switch(_g) {
				case 0:
					style.setProperty("text-align","center",null);
					break;
				case 4:
					style.setProperty("text-align","right",null);
					break;
				default:
					style.setProperty("text-align","left",null);
				}
				textField.__dirty = false;
			} else if(textField.__div != null) {
				renderSession.element.removeChild(textField.__div);
				textField.__div = null;
			}
		}
		if(textField.__div != null) {
			openfl__$internal_renderer_dom_DOMRenderer.applyStyle(textField,renderSession,true,true,false);
		}
	} else if(textField.__div != null) {
		renderSession.element.removeChild(textField.__div);
		textField.__div = null;
		textField.__style = null;
	}
};
var openfl__$internal_renderer_opengl_GLBitmap = function() { };
$hxClasses["openfl._internal.renderer.opengl.GLBitmap"] = openfl__$internal_renderer_opengl_GLBitmap;
openfl__$internal_renderer_opengl_GLBitmap.__name__ = ["openfl","_internal","renderer","opengl","GLBitmap"];
openfl__$internal_renderer_opengl_GLBitmap.render = function(bitmap,renderSession) {
	if(!bitmap.__renderable || bitmap.__worldAlpha <= 0 || bitmap.bitmapData == null || !bitmap.bitmapData.__isValid) {
		return;
	}
	renderSession.spriteBatch.renderBitmapData(bitmap.bitmapData,bitmap.smoothing,bitmap.__renderTransform,bitmap.__worldColorTransform,bitmap.__worldAlpha,bitmap.__blendMode,bitmap.__shader,bitmap.pixelSnapping);
};
openfl__$internal_renderer_opengl_GLBitmap.pushFramebuffer = function(renderSession,texture,viewPort,smoothing,transparent,clearBuffer,powerOfTwo) {
	if(powerOfTwo == null) {
		powerOfTwo = true;
	}
	if(clearBuffer == null) {
		clearBuffer = false;
	}
	if(transparent == null) {
		transparent = true;
	}
	var gl = renderSession.gl;
	if(gl == null) {
		return null;
	}
	var renderer = renderSession.renderer;
	var x = viewPort.x | 0;
	var y = viewPort.y | 0;
	var width = viewPort.width | 0;
	var height = viewPort.height | 0;
	renderSession.spriteBatch.finish();
	if(openfl__$internal_renderer_opengl_GLBitmap.fbData.length <= 0) {
		openfl__$internal_renderer_opengl_GLBitmap.fbData.push({ texture : null, viewPort : null, transparent : renderer.transparent});
	}
	if(texture == null) {
		texture = new openfl__$internal_renderer_opengl_utils_PingPongTexture(gl,width,height,smoothing,powerOfTwo);
	}
	texture.resize(width,height);
	renderer.transparent = transparent;
	renderSession.maskManager.saveState();
	gl.bindFramebuffer(gl.FRAMEBUFFER,(texture.__swapped ? texture.__texture1 : texture.__texture0).frameBuffer);
	renderer.setViewport(x,y,width,height);
	gl.colorMask(true,true,true,true);
	renderSession.blendModeManager.setBlendMode(10);
	if(clearBuffer) {
		(texture.__swapped ? texture.__texture1 : texture.__texture0).clear(0,0,0,0,null);
	}
	openfl__$internal_renderer_opengl_GLBitmap.fbData.push({ texture : texture, viewPort : viewPort, transparent : transparent});
	return texture;
};
openfl__$internal_renderer_opengl_GLBitmap.drawBitmapDrawable = function(renderSession,target,source,matrix,colorTransform,blendMode,clipRect) {
	var data = openfl__$internal_renderer_opengl_GLBitmap.fbData[openfl__$internal_renderer_opengl_GLBitmap.fbData.length - 1];
	if(data == null) {
		throw new js__$Boot_HaxeError("No data to draw to");
	}
	var gl = renderSession.gl;
	if(gl == null) {
		return;
	}
	var viewPort = data.viewPort;
	var spritebatch = renderSession.spriteBatch;
	var drawTarget = target != null;
	var tmpRect = clipRect == null ? new openfl_geom_Rectangle(viewPort.x,viewPort.y,viewPort.width,viewPort.height) : clipRect.clone();
	spritebatch.begin(renderSession,drawTarget ? null : tmpRect);
	if(drawTarget) {
		target.__worldTransform.identity();
		var m = target.__worldTransform;
		var height = viewPort.height;
		var tx = m.tx;
		var ty = m.ty;
		m.tx = 0;
		m.ty = 0;
		m.scale(1,-1);
		m.translate(0,height);
		m.tx += tx;
		m.ty -= ty;
		target.__renderGL(renderSession);
		spritebatch.stop();
		if(target.__texture != null) {
			gl.deleteTexture(target.__texture);
		}
		target.__texture = null;
		spritebatch.start(tmpRect);
	}
	var ctCache = source.__worldColorTransform;
	var blendModeCache = source.__blendMode;
	var cached = source.__cacheAsBitmap;
	var m1 = matrix != null ? matrix.clone() : new openfl_geom_Matrix();
	var height1 = viewPort.height;
	var tx1 = m1.tx;
	var ty1 = m1.ty;
	m1.tx = 0;
	m1.ty = 0;
	m1.scale(1,-1);
	m1.translate(0,height1);
	m1.tx += tx1;
	m1.ty -= ty1;
	source.__worldColorTransform = colorTransform != null ? colorTransform : new openfl_geom_ColorTransform();
	source.__blendMode = blendMode;
	openfl_display_DisplayObject.__cacheAsBitmapMode = true;
	source.__updateTransforms(m1);
	source.__updateChildren(false);
	source.__cacheAsBitmap = false;
	source.__renderGL(renderSession);
	source.__cacheAsBitmap = cached;
	source.__worldColorTransform = ctCache;
	source.__blendMode = blendModeCache;
	openfl_display_DisplayObject.__cacheAsBitmapMode = false;
	source.__updateTransforms();
	source.__updateChildren(false);
};
openfl__$internal_renderer_opengl_GLBitmap.popFramebuffer = function(renderSession,image) {
	var gl = renderSession.gl;
	if(gl == null) {
		return;
	}
	renderSession.spriteBatch.finish();
	openfl__$internal_renderer_opengl_GLBitmap.fbData.pop();
	var data = openfl__$internal_renderer_opengl_GLBitmap.fbData[openfl__$internal_renderer_opengl_GLBitmap.fbData.length - 1];
	if(data == null) {
		throw new js__$Boot_HaxeError("oh");
	}
	var x;
	var y;
	var width;
	var height;
	if(data.viewPort == null) {
		y = 0;
		x = 0;
		width = renderSession.renderer.width;
		height = renderSession.renderer.height;
	} else {
		x = Math.floor(data.viewPort.x);
		y = Math.floor(data.viewPort.y);
		width = Math.ceil(data.viewPort.width);
		height = Math.ceil(data.viewPort.height);
	}
	if(image != null) {
		if(image.width != width || image.height != height) {
			image.resize(width,height);
		}
		gl.readPixels(x,y,width,height,gl.RGBA,gl.UNSIGNED_BYTE,image.buffer.data);
		image.dirty = false;
		image.set_premultiplied(true);
	}
	var tmp;
	if(data.texture == null) {
		tmp = renderSession.defaultFramebuffer;
	} else {
		var _this = data.texture;
		tmp = (_this.__swapped ? _this.__texture1 : _this.__texture0).frameBuffer;
	}
	gl.bindFramebuffer(gl.FRAMEBUFFER,tmp);
	renderSession.renderer.setViewport(x,y,width,height);
	renderSession.renderer.transparent = data.transparent;
	renderSession.maskManager.restoreState();
};
openfl__$internal_renderer_opengl_GLBitmap.flipMatrix = function(m,height) {
	var tx = m.tx;
	var ty = m.ty;
	m.tx = 0;
	m.ty = 0;
	m.scale(1,-1);
	m.translate(0,height);
	m.tx += tx;
	m.ty -= ty;
};
var openfl__$internal_renderer_opengl_GLRenderer = function(width,height,gl,transparent,antialias,preserveDrawingBuffer) {
	if(preserveDrawingBuffer == null) {
		preserveDrawingBuffer = false;
	}
	if(antialias == null) {
		antialias = false;
	}
	if(transparent == null) {
		transparent = false;
	}
	if(height == null) {
		height = 600;
	}
	if(width == null) {
		width = 800;
	}
	this.vpHeight = 0;
	this.vpWidth = 0;
	this.vpY = 0;
	this.vpX = 0;
	openfl__$internal_renderer_AbstractRenderer.call(this,width,height);
	this.transparent = transparent;
	this.preserveDrawingBuffer = preserveDrawingBuffer;
	this.width = width;
	this.height = height;
	this.viewport = new openfl_geom_Rectangle();
	this.options = { alpha : transparent, antialias : antialias, premultipliedAlpha : transparent, stencil : true, preserveDrawingBuffer : preserveDrawingBuffer};
	this._glContextId = openfl__$internal_renderer_opengl_GLRenderer.glContextId++;
	this.gl = gl;
	this.defaultFramebuffer = null;
	openfl__$internal_renderer_opengl_GLRenderer.glContexts[this._glContextId] = gl;
	this.projectionMatrix = new openfl_geom_Matrix();
	this.projection = new openfl_geom_Point();
	this.projection.x = this.width / 2;
	this.projection.y = -this.height / 2;
	this.offset = new openfl_geom_Point(0,0);
	this.resize(this.width,this.height);
	this.contextLost = false;
	this.shaderManager = new openfl__$internal_renderer_opengl_utils_ShaderManager(gl);
	this.spriteBatch = new openfl__$internal_renderer_opengl_utils_SpriteBatch(gl);
	this.filterManager = new openfl__$internal_renderer_opengl_utils_FilterManager(gl,this.transparent);
	this.stencilManager = new openfl__$internal_renderer_opengl_utils_StencilManager(gl);
	this.blendModeManager = new openfl__$internal_renderer_opengl_utils_BlendModeManager(gl);
	this.renderSession = new openfl__$internal_renderer_RenderSession();
	this.renderSession.gl = this.gl;
	this.renderSession.drawCount = 0;
	this.renderSession.shaderManager = this.shaderManager;
	this.renderSession.filterManager = this.filterManager;
	this.renderSession.blendModeManager = this.blendModeManager;
	this.renderSession.spriteBatch = this.spriteBatch;
	this.renderSession.stencilManager = this.stencilManager;
	this.renderSession.renderer = this;
	this.renderSession.defaultFramebuffer = this.defaultFramebuffer;
	this.renderSession.projectionMatrix = this.projectionMatrix;
	this.maskManager = new openfl__$internal_renderer_opengl_utils_GLMaskManager(this.renderSession);
	this.renderSession.maskManager = this.maskManager;
	this.shaderManager.setShader(this.shaderManager.defaultShader);
	gl.disable(gl.DEPTH_TEST);
	gl.disable(gl.CULL_FACE);
	gl.enable(gl.BLEND);
	gl.colorMask(true,true,true,this.transparent);
};
$hxClasses["openfl._internal.renderer.opengl.GLRenderer"] = openfl__$internal_renderer_opengl_GLRenderer;
openfl__$internal_renderer_opengl_GLRenderer.__name__ = ["openfl","_internal","renderer","opengl","GLRenderer"];
openfl__$internal_renderer_opengl_GLRenderer.renderBitmap = function(shape,renderSession,smooth) {
	if(smooth == null) {
		smooth = true;
	}
	if(!shape.__renderable || shape.__worldAlpha <= 0) {
		return;
	}
	if(shape.__graphics == null || shape.__graphics.__bitmap == null) {
		return;
	}
	var rect = openfl_geom_Rectangle.__temp;
	var matrix = openfl_geom_Matrix.__temp;
	rect.setEmpty();
	matrix.identity();
	shape.__getBounds(rect,matrix);
	var bitmap = shape.__graphics.__bitmap;
	matrix.translate(shape.__graphics.__bounds.x,shape.__graphics.__bounds.y);
	matrix.concat(shape.__renderTransform);
	renderSession.spriteBatch.renderBitmapData(bitmap,smooth,matrix,shape.__worldColorTransform,shape.__worldAlpha,shape.__blendMode,null,0);
};
openfl__$internal_renderer_opengl_GLRenderer.__super__ = openfl__$internal_renderer_AbstractRenderer;
openfl__$internal_renderer_opengl_GLRenderer.prototype = $extend(openfl__$internal_renderer_AbstractRenderer.prototype,{
	destroy: function() {
		openfl__$internal_renderer_opengl_GLRenderer.glContexts[this._glContextId] = null;
		this.projection = null;
		this.offset = null;
		this.shaderManager.destroy();
		this.spriteBatch.destroy();
		this.maskManager.destroy();
		this.filterManager.destroy();
		this.shaderManager = null;
		this.spriteBatch = null;
		this.maskManager = null;
		this.filterManager = null;
		this.gl = null;
		this.renderSession = null;
	}
	,setViewport: function(x,y,width,height) {
		if(!(this.vpX == x && this.vpY == y && this.vpWidth == width && this.vpHeight == height)) {
			this.vpX = x;
			this.vpY = y;
			this.vpWidth = width;
			this.vpHeight = height;
			this.gl.viewport(x,y,width,height);
			this.setOrtho(x,y,width,height);
			this.viewport.setTo(x,y,width,height);
		}
	}
	,setOrtho: function(x,y,width,height) {
		var o = this.projectionMatrix;
		o.identity();
		o.a = 1 / width * 2;
		o.d = -1 / height * 2;
		o.tx = -1 - x * o.a;
		o.ty = 1 - y * o.d;
	}
	,handleContextLost: function(event) {
		event.preventDefault();
		this.contextLost = true;
	}
	,handleContextRestored: function() {
		var gl = this.gl;
		openfl__$internal_renderer_opengl_GLRenderer.glContextId++;
		this.shaderManager.setContext(gl);
		this.spriteBatch.setContext(gl);
		this.maskManager.setContext(gl);
		this.filterManager.setContext(gl);
		this.renderSession.gl = gl;
		this.defaultFramebuffer = null;
		gl.disable(gl.DEPTH_TEST);
		gl.disable(gl.CULL_FACE);
		gl.enable(gl.BLEND);
		gl.colorMask(true,true,true,this.transparent);
		this.setViewport(0,0,this.width,this.height);
		this.contextLost = false;
	}
	,render: function(stage) {
		if(this.contextLost) {
			return;
		}
		var gl = this.gl;
		this.setViewport(0,0,this.width,this.height);
		gl.bindFramebuffer(gl.FRAMEBUFFER,this.defaultFramebuffer);
		if(this.transparent) {
			gl.clearColor(0,0,0,0);
		} else {
			gl.clearColor(stage.__colorSplit[0],stage.__colorSplit[1],stage.__colorSplit[2],1);
		}
		gl.clear(gl.COLOR_BUFFER_BIT);
		this.renderDisplayObject(stage,this.projection);
	}
	,renderDisplayObject: function(displayObject,projection,buffer) {
		this.renderSession.blendModeManager.setBlendMode(10);
		this.renderSession.drawCount = 0;
		this.renderSession.currentBlendMode = null;
		this.spriteBatch.begin(this.renderSession);
		this.filterManager.begin(this.renderSession,buffer);
		displayObject.__renderGL(this.renderSession);
		this.spriteBatch.finish();
	}
	,resize: function(width,height) {
		this.width = width;
		this.height = height;
		openfl__$internal_renderer_AbstractRenderer.prototype.resize.call(this,width,height);
		this.setViewport(0,0,width,height);
		this.projection.x = width / 2;
		this.projection.y = -height / 2;
	}
	,__class__: openfl__$internal_renderer_opengl_GLRenderer
});
var openfl__$internal_renderer_opengl_shaders2_Shader = function(gl) {
	this.wrapT = 33071;
	this.wrapS = 33071;
	this.compiled = false;
	this.uniforms = new haxe_ds_StringMap();
	this.attributes = new haxe_ds_StringMap();
	this.ID = openfl__$internal_renderer_opengl_shaders2_Shader.UID++;
	this.gl = gl;
	this.program = null;
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.Shader"] = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_Shader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","Shader"];
openfl__$internal_renderer_opengl_shaders2_Shader.compileProgram = function(gl,vertexSrc,fragmentSrc) {
	var cache = openfl__$internal_renderer_opengl_utils_ShaderManager.compiledShadersCache;
	var key = haxe_crypto_Md5.encode(vertexSrc + fragmentSrc);
	if(__map_reserved[key] != null ? cache.existsReserved(key) : cache.h.hasOwnProperty(key)) {
		return __map_reserved[key] != null ? cache.getReserved(key) : cache.h[key];
	}
	var vertexShader = openfl__$internal_renderer_opengl_shaders2_Shader.compileShader(gl,vertexSrc,gl.VERTEX_SHADER);
	var fragmentShader = openfl__$internal_renderer_opengl_shaders2_Shader.compileShader(gl,fragmentSrc,gl.FRAGMENT_SHADER);
	var program = gl.createProgram();
	if(vertexShader != null && fragmentShader != null) {
		gl.attachShader(program,vertexShader);
		gl.attachShader(program,fragmentShader);
		gl.linkProgram(program);
		gl.deleteShader(vertexShader);
		gl.deleteShader(fragmentShader);
		if(gl.getProgramParameter(program,gl.LINK_STATUS) == 0) {
			haxe_Log.trace("Could not compile the program:\n\t" + gl.getProgramInfoLog(program),{ fileName : "Shader.hx", lineNumber : 226, className : "openfl._internal.renderer.opengl.shaders2.Shader", methodName : "compileProgram"});
			haxe_Log.trace("VERTEX:\n" + vertexSrc + "\nFRAGMENT:\n" + fragmentSrc,{ fileName : "Shader.hx", lineNumber : 227, className : "openfl._internal.renderer.opengl.shaders2.Shader", methodName : "compileProgram"});
			return null;
		}
	}
	if(__map_reserved[key] != null) {
		cache.setReserved(key,program);
	} else {
		cache.h[key] = program;
	}
	return program;
};
openfl__$internal_renderer_opengl_shaders2_Shader.compileShader = function(gl,shaderSrc,type) {
	var shader = gl.createShader(type);
	gl.shaderSource(shader,shaderSrc);
	gl.compileShader(shader);
	if(gl.getShaderParameter(shader,gl.COMPILE_STATUS) == 0) {
		haxe_Log.trace("Could not compile the shader:\n\t" + gl.getShaderInfoLog(shader),{ fileName : "Shader.hx", lineNumber : 244, className : "openfl._internal.renderer.opengl.shaders2.Shader", methodName : "compileShader"});
		haxe_Log.trace(shaderSrc,{ fileName : "Shader.hx", lineNumber : 245, className : "openfl._internal.renderer.opengl.shaders2.Shader", methodName : "compileShader"});
		return null;
	}
	return shader;
};
openfl__$internal_renderer_opengl_shaders2_Shader.prototype = {
	init: function(force) {
		if(force == null) {
			force = false;
		}
		if(this.compiled && !force) {
			return;
		}
		if(this.vertexSrc != null) {
			this.vertexString = this.vertexSrc.join("\n");
		}
		if(this.fragmentSrc != null) {
			this.fragmentString = this.fragmentSrc.join("\n");
		}
		if(this.vertexString == null || this.fragmentString == null) {
			throw new js__$Boot_HaxeError("No vertex or fragment source provided");
		}
		this.program = openfl__$internal_renderer_opengl_shaders2_Shader.compileProgram(this.gl,this.vertexString,this.fragmentString);
		if(this.program != null) {
			this.compiled = true;
		}
	}
	,destroy: function() {
		if(this.program != null) {
			this.gl.deleteProgram(this.program);
		}
		this.compiled = false;
		this.attributes = null;
	}
	,applyData: function(shaderData,renderSession) {
		if(shaderData == null) {
			return;
		}
		var param;
		var u;
		var v;
		var bd;
		var key = shaderData.keys();
		while(key.hasNext()) {
			var key1 = key.next();
			u = this.getUniformLocation(key1);
			param = __map_reserved[key1] != null ? shaderData.getReserved(key1) : shaderData.h[key1];
			if(param == null) {
				continue;
			}
			v = param.value;
			bd = param.bitmap;
			if(v == null && bd == null) {
				continue;
			}
			switch(param.internalType) {
			case 1:
				switch(param.size) {
				case 1:
					this.gl.uniform1i(u,v[0] | 0);
					break;
				case 2:
					this.gl.uniform2i(u,v[0] | 0,v[1] | 0);
					break;
				case 3:
					this.gl.uniform3i(u,v[0] | 0,v[1] | 0,v[2] | 0);
					break;
				case 4:
					this.gl.uniform4i(u,v[0] | 0,v[1] | 0,v[2] | 0,v[3] | 0);
					break;
				}
				break;
			case 2:
				switch(param.size) {
				case 1:
					this.gl.uniform1f(u,v[0]);
					break;
				case 2:
					this.gl.uniform2f(u,v[0],v[1]);
					break;
				case 3:
					this.gl.uniform3f(u,v[0],v[1],v[2]);
					break;
				case 4:
					this.gl.uniform4f(u,v[0],v[1],v[2],v[3]);
					break;
				}
				break;
			case 3:
				switch(param.size) {
				case 2:
					var tmp = this.gl;
					var param1 = param.transpose;
					var array = param.value;
					var this1;
					if(array != null) {
						this1 = new Float32Array(array);
					} else {
						this1 = null;
					}
					tmp.uniformMatrix2fv(u,param1,this1);
					break;
				case 3:
					var tmp1 = this.gl;
					var param2 = param.transpose;
					var array1 = param.value;
					var this2;
					if(array1 != null) {
						this2 = new Float32Array(array1);
					} else {
						this2 = null;
					}
					tmp1.uniformMatrix3fv(u,param2,this2);
					break;
				case 4:
					var tmp2 = this.gl;
					var param3 = param.transpose;
					var array2 = param.value;
					var this3;
					if(array2 != null) {
						this3 = new Float32Array(array2);
					} else {
						this3 = null;
					}
					tmp2.uniformMatrix4fv(u,param3,this3);
					break;
				}
				break;
			case 4:
				if(bd == null || !bd.__isValid) {
					continue;
				}
				this.gl.activeTexture(this.gl.TEXTURE0 + renderSession.activeTextures);
				this.gl.bindTexture(this.gl.TEXTURE_2D,bd.getTexture(this.gl));
				this.gl.uniform1i(u,renderSession.activeTextures);
				this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,param.smooth ? this.gl.LINEAR : this.gl.NEAREST);
				this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,param.smooth ? this.gl.LINEAR : this.gl.NEAREST);
				this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,param.repeatX);
				this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,param.repeatY);
				renderSession.activeTextures++;
				break;
			default:
			}
		}
	}
	,getAttribLocation: function(attribute) {
		if(this.program == null) {
			throw new js__$Boot_HaxeError("Shader isn't initialized");
		}
		var _this = this.attributes;
		if(__map_reserved[attribute] != null ? _this.existsReserved(attribute) : _this.h.hasOwnProperty(attribute)) {
			var _this1 = this.attributes;
			if(__map_reserved[attribute] != null) {
				return _this1.getReserved(attribute);
			} else {
				return _this1.h[attribute];
			}
		} else {
			var location = this.gl.getAttribLocation(this.program,attribute);
			var _this2 = this.attributes;
			if(__map_reserved[attribute] != null) {
				_this2.setReserved(attribute,location);
			} else {
				_this2.h[attribute] = location;
			}
			return location;
		}
	}
	,getUniformLocation: function(uniform) {
		if(this.program == null) {
			throw new js__$Boot_HaxeError("Shader isn't initialized");
		}
		var _this = this.uniforms;
		if(__map_reserved[uniform] != null ? _this.existsReserved(uniform) : _this.h.hasOwnProperty(uniform)) {
			var _this1 = this.uniforms;
			if(__map_reserved[uniform] != null) {
				return _this1.getReserved(uniform);
			} else {
				return _this1.h[uniform];
			}
		} else {
			var location = this.gl.getUniformLocation(this.program,uniform);
			var _this2 = this.uniforms;
			if(__map_reserved[uniform] != null) {
				_this2.setReserved(uniform,location);
			} else {
				_this2.h[uniform] = location;
			}
			return location;
		}
	}
	,enableVertexAttribute: function(attribute,stride,offset) {
		var location = this.getAttribLocation(attribute.name);
		this.gl.enableVertexAttribArray(location);
		this.gl.vertexAttribPointer(location,attribute.components,attribute.type,attribute.normalized,stride,offset * 4);
	}
	,disableVertexAttribute: function(attribute,setDefault) {
		if(setDefault == null) {
			setDefault = true;
		}
		var location = this.getAttribLocation(attribute.name);
		this.gl.disableVertexAttribArray(location);
		if(setDefault) {
			switch(attribute.components) {
			case 1:
				this.gl.vertexAttrib1fv(location,attribute.defaultValue.subarray(0,1));
				break;
			case 2:
				this.gl.vertexAttrib2fv(location,attribute.defaultValue.subarray(0,2));
				break;
			case 3:
				this.gl.vertexAttrib3fv(location,attribute.defaultValue.subarray(0,3));
				break;
			default:
				this.gl.vertexAttrib4fv(location,attribute.defaultValue.subarray(0,4));
			}
		}
	}
	,bindVertexArray: function(va) {
		var offset = 0;
		var stride = va.get_stride();
		var _g = 0;
		var _g1 = va.attributes;
		while(_g < _g1.length) {
			var attribute = _g1[_g];
			++_g;
			if(attribute.enabled) {
				this.enableVertexAttribute(attribute,stride,offset);
				var offset1;
				switch(attribute.type) {
				case 5120:case 5121:
					offset1 = 1;
					break;
				case 5122:case 5123:
					offset1 = 2;
					break;
				default:
					offset1 = 4;
				}
				offset += Math.floor(attribute.components * offset1 / 4);
			} else {
				this.disableVertexAttribute(attribute,true);
			}
		}
	}
	,unbindVertexArray: function(va) {
		var _g = 0;
		var _g1 = va.attributes;
		while(_g < _g1.length) {
			var attribute = _g1[_g];
			++_g;
			this.disableVertexAttribute(attribute,false);
		}
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_Shader
};
var openfl__$internal_renderer_opengl_shaders2_DefaultShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = openfl__$internal_renderer_opengl_shaders2_DefaultShader.VERTEX_SRC;
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","uniform sampler2D " + "openfl_uSampler0" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","uniform bool " + "openfl_uUseColorTransform" + ";","varying vec2 " + "openfl_vTexCoord" + ";","varying vec4 " + "openfl_vColor" + ";","vec4 colorTransform(const vec4 color, const vec4 tint, const vec4 multiplier, const vec4 offset) {","\tif(!" + "openfl_uUseColorTransform" + ") {","\t\treturn color * tint;","\t}","\tvec4 unmultiply;","\tif (color.a == 0.0) {","\t\tunmultiply = vec4(0.0, 0.0, 0.0, 0.0);","\t} else {","   \tunmultiply = vec4(color.rgb / color.a, color.a);","\t}","   vec4 result = unmultiply * tint * multiplier;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   vec4 tc = texture2D(" + "openfl_uSampler0" + ", " + "openfl_vTexCoord" + ");","   gl_FragColor = colorTransform(tc, " + "openfl_vColor" + ", " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.DefaultShader"] = openfl__$internal_renderer_opengl_shaders2_DefaultShader;
openfl__$internal_renderer_opengl_shaders2_DefaultShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","DefaultShader"];
openfl__$internal_renderer_opengl_shaders2_DefaultShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_DefaultShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getAttribLocation("openfl_aTexCoord0");
		this.getAttribLocation("openfl_aColor");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uSampler0");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
		this.getUniformLocation("openfl_uUseColorTransform");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_DefaultShader
});
var openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = ["attribute vec2 " + "openfl_aPosition" + ";","attribute vec2 " + "openfl_aTexCoord0" + ";","attribute vec4 " + "openfl_aColor" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","varying vec2 vTexCoord;","varying vec4 vColor;","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   vTexCoord = " + "openfl_aTexCoord0" + ";","   vColor = " + "openfl_aColor" + ".bgra;","}"];
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","uniform sampler2D " + "openfl_uSampler0" + ";","uniform vec3 " + "openfl_uColor" + ";","uniform bool " + "openfl_uUseTexture" + ";","uniform float " + "openfl_uAlpha" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","varying vec2 vTexCoord;","varying vec4 vColor;","vec4 tmp;","vec4 colorTransform(const vec4 color, const vec4 tint, const vec4 multiplier, const vec4 offset) {","   vec4 unmultiply = vec4(color.rgb / color.a, color.a);","   vec4 result = unmultiply * tint * multiplier;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   if(" + "openfl_uUseTexture" + ") {","       tmp = texture2D(" + "openfl_uSampler0" + ", vTexCoord);","   } else {","       tmp = vec4(" + "openfl_uColor" + ", 1.);","   }","   gl_FragColor = colorTransform(tmp, vColor, " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.DrawTrianglesShader"] = openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader;
openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","DrawTrianglesShader"];
openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getAttribLocation("openfl_aTexCoord0");
		this.getAttribLocation("openfl_aColor");
		this.getUniformLocation("openfl_uSampler0");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uColor");
		this.getUniformLocation("openfl_uAlpha");
		this.getUniformLocation("openfl_uUseTexture");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader
});
var openfl__$internal_renderer_opengl_shaders2_FillShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = ["attribute vec2 " + "openfl_aPosition" + ";","uniform mat3 " + "openfl_uTranslationMatrix" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","uniform vec4 " + "openfl_uColor" + ";","uniform float " + "openfl_uAlpha" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","varying vec4 vColor;","vec4 colorTransform(const vec4 color, const float alpha, const vec4 multiplier, const vec4 offset) {","   vec4 result = color * multiplier;","   result.a *= alpha;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * " + "openfl_uTranslationMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   vColor = colorTransform(" + "openfl_uColor" + ", " + "openfl_uAlpha" + ", " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","varying vec4 vColor;","void main(void) {","   gl_FragColor = vColor;","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.FillShader"] = openfl__$internal_renderer_opengl_shaders2_FillShader;
openfl__$internal_renderer_opengl_shaders2_FillShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","FillShader"];
openfl__$internal_renderer_opengl_shaders2_FillShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_FillShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getUniformLocation("openfl_uTranslationMatrix");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uColor");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_FillShader
});
var openfl__$internal_renderer_opengl_shaders2_PatternFillShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = ["attribute vec2 " + "openfl_aPosition" + ";","uniform mat3 " + "openfl_uTranslationMatrix" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","uniform mat3 " + "openfl_uPatternMatrix" + ";","varying vec2 vPosition;","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * " + "openfl_uTranslationMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   vPosition = (" + "openfl_uPatternMatrix" + " * vec3(" + "openfl_aPosition" + ", 1)).xy;","}"];
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","uniform float " + "openfl_uAlpha" + ";","uniform vec2 " + "openfl_uPatternTL" + ";","uniform vec2 " + "openfl_uPatternBR" + ";","uniform sampler2D " + "openfl_uSampler0" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","varying vec2 vPosition;","vec4 colorTransform(const vec4 color, const float alpha, const vec4 multiplier, const vec4 offset) {","   vec4 unmultiply = vec4(color.rgb / color.a, color.a);","   vec4 result = unmultiply * multiplier;","   result.a *= alpha;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   vec2 pos = mix(" + "openfl_uPatternTL" + ", " + "openfl_uPatternBR" + ", vPosition);","   vec4 tcol = texture2D(" + "openfl_uSampler0" + ", pos);","   gl_FragColor = colorTransform(tcol, " + "openfl_uAlpha" + ", " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.PatternFillShader"] = openfl__$internal_renderer_opengl_shaders2_PatternFillShader;
openfl__$internal_renderer_opengl_shaders2_PatternFillShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","PatternFillShader"];
openfl__$internal_renderer_opengl_shaders2_PatternFillShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_PatternFillShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getUniformLocation("openfl_uTranslationMatrix");
		this.getUniformLocation("openfl_uPatternMatrix");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uSampler0");
		this.getUniformLocation("openfl_uPatternTL");
		this.getUniformLocation("openfl_uPatternBR");
		this.getUniformLocation("openfl_uAlpha");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_PatternFillShader
});
var openfl__$internal_renderer_opengl_shaders2_PrimitiveShader = function(gl) {
	openfl__$internal_renderer_opengl_shaders2_Shader.call(this,gl);
	this.vertexSrc = ["attribute vec2 " + "openfl_aPosition" + ";","attribute vec4 " + "openfl_aColor" + ";","uniform mat3 " + "openfl_uTranslationMatrix" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","uniform vec4 " + "openfl_uColorMultiplier" + ";","uniform vec4 " + "openfl_uColorOffset" + ";","uniform float " + "openfl_uAlpha" + ";","varying vec4 vColor;","vec4 colorTransform(const vec4 color, const float alpha, const vec4 multiplier, const vec4 offset) {","   vec4 result = color * multiplier;","   result.a *= alpha;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * " + "openfl_uTranslationMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   vColor = colorTransform(" + "openfl_aColor" + ", " + "openfl_uAlpha" + ", " + "openfl_uColorMultiplier" + ", " + "openfl_uColorOffset" + ");","}"];
	this.fragmentSrc = ["#ifdef GL_ES","precision lowp float;","#endif","varying vec4 vColor;","void main(void) {","   gl_FragColor = vColor;","}"];
	this.init();
};
$hxClasses["openfl._internal.renderer.opengl.shaders2.PrimitiveShader"] = openfl__$internal_renderer_opengl_shaders2_PrimitiveShader;
openfl__$internal_renderer_opengl_shaders2_PrimitiveShader.__name__ = ["openfl","_internal","renderer","opengl","shaders2","PrimitiveShader"];
openfl__$internal_renderer_opengl_shaders2_PrimitiveShader.__super__ = openfl__$internal_renderer_opengl_shaders2_Shader;
openfl__$internal_renderer_opengl_shaders2_PrimitiveShader.prototype = $extend(openfl__$internal_renderer_opengl_shaders2_Shader.prototype,{
	init: function(force) {
		if(force == null) {
			force = false;
		}
		openfl__$internal_renderer_opengl_shaders2_Shader.prototype.init.call(this,force);
		this.getAttribLocation("openfl_aPosition");
		this.getAttribLocation("openfl_aColor");
		this.getUniformLocation("openfl_uTranslationMatrix");
		this.getUniformLocation("openfl_uProjectionMatrix");
		this.getUniformLocation("openfl_uAlpha");
		this.getUniformLocation("openfl_uColorMultiplier");
		this.getUniformLocation("openfl_uColorOffset");
	}
	,__class__: openfl__$internal_renderer_opengl_shaders2_PrimitiveShader
});
var openfl__$internal_renderer_opengl_utils_BlendModeManager = function(gl) {
	this.gl = gl;
	this.currentBlendMode = null;
};
$hxClasses["openfl._internal.renderer.opengl.utils.BlendModeManager"] = openfl__$internal_renderer_opengl_utils_BlendModeManager;
openfl__$internal_renderer_opengl_utils_BlendModeManager.__name__ = ["openfl","_internal","renderer","opengl","utils","BlendModeManager"];
openfl__$internal_renderer_opengl_utils_BlendModeManager.prototype = {
	destroy: function() {
		this.gl = null;
	}
	,setBlendMode: function(blendMode,force) {
		if(force == null) {
			force = false;
		}
		if(blendMode == null) {
			blendMode = 10;
			force = true;
		}
		if(!force && this.currentBlendMode == blendMode) {
			return false;
		}
		this.currentBlendMode = blendMode;
		switch(blendMode) {
		case 0:
			this.gl.blendEquation(32774);
			this.gl.blendFunc(1,1);
			break;
		case 9:
			this.gl.blendEquation(32774);
			this.gl.blendFunc(774,771);
			break;
		case 12:
			this.gl.blendEquation(32774);
			this.gl.blendFunc(1,769);
			break;
		case 14:
			this.gl.blendEquation(32779);
			this.gl.blendFunc(1,1);
			break;
		default:
			this.gl.blendEquation(32774);
			this.gl.blendFunc(1,771);
		}
		return true;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_BlendModeManager
};
var openfl__$internal_renderer_opengl_utils_DrawPath = function(makeArray) {
	if(makeArray == null) {
		makeArray = true;
	}
	this.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
	this.points = null;
	this.winding = 0;
	this.isRemovable = true;
	this.fillIndex = 0;
	this.line = new openfl__$internal_renderer_opengl_utils_LineStyle();
	this.fill = openfl__$internal_renderer_opengl_utils_FillType.None;
	if(makeArray) {
		this.points = [];
	}
};
$hxClasses["openfl._internal.renderer.opengl.utils.DrawPath"] = openfl__$internal_renderer_opengl_utils_DrawPath;
openfl__$internal_renderer_opengl_utils_DrawPath.__name__ = ["openfl","_internal","renderer","opengl","utils","DrawPath"];
openfl__$internal_renderer_opengl_utils_DrawPath.getStack = function(graphics,gl) {
	return openfl__$internal_renderer_opengl_utils_PathBuiler.build(graphics,gl);
};
openfl__$internal_renderer_opengl_utils_DrawPath.prototype = {
	update: function(line,fill,fillIndex,winding) {
		this.updateLine(line);
		this.fill = fill;
		this.fillIndex = fillIndex;
		this.winding = winding;
	}
	,updateLine: function(line) {
		this.line.width = line.width;
		this.line.color = line.color;
		this.line.alpha = line.alpha == null ? 1 : line.alpha;
		this.line.scaleMode = line.scaleMode == null ? 2 : line.scaleMode;
		this.line.caps = line.caps == null ? 1 : line.caps;
		this.line.joints = line.joints == null ? 2 : line.joints;
		this.line.miterLimit = line.miterLimit;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_DrawPath
};
var openfl__$internal_renderer_opengl_utils_PathBuiler = function() { };
$hxClasses["openfl._internal.renderer.opengl.utils.PathBuiler"] = openfl__$internal_renderer_opengl_utils_PathBuiler;
openfl__$internal_renderer_opengl_utils_PathBuiler.__name__ = ["openfl","_internal","renderer","opengl","utils","PathBuiler"];
openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = null;
openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths = null;
openfl__$internal_renderer_opengl_utils_PathBuiler.__line = null;
openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = null;
openfl__$internal_renderer_opengl_utils_PathBuiler.closePath = function() {
	var l = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null ? 0 : openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length;
	if(l <= 0) {
		return;
	}
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type == openfl__$internal_renderer_opengl_utils_GraphicType.Polygon && openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.fill != openfl__$internal_renderer_opengl_utils_FillType.None) {
		var sx = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points[0];
		var sy = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points[1];
		if(!(sx == openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points[l - 2] && sy == openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points[l - 1])) {
			var points = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
			var push_point = true;
			if(points.length > 1) {
				if(points[points.length - 2] == sx && points[points.length - 1] == sy) {
					push_point = false;
				}
			}
			if(push_point == true) {
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(sx);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(sy);
			}
		}
	}
};
openfl__$internal_renderer_opengl_utils_PathBuiler.endFill = function() {
	openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = openfl__$internal_renderer_opengl_utils_FillType.None;
	openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex++;
};
openfl__$internal_renderer_opengl_utils_PathBuiler.moveTo = function(x,y) {
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
		openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
	} else {
		openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
	}
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(x);
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(y);
	openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
};
openfl__$internal_renderer_opengl_utils_PathBuiler.lineTo = function(x,y) {
	var points = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
	var push_point = true;
	if(points.length > 1) {
		if(points[points.length - 2] == x && points[points.length - 1] == y) {
			push_point = false;
		}
	}
	if(push_point == true) {
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(x);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(y);
	}
};
openfl__$internal_renderer_opengl_utils_PathBuiler.curveTo = function(cx,cy,x,y) {
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
		if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
			openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
		} else {
			openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
		}
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
	}
	openfl__$internal_renderer_GraphicsPaths.curveTo(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points,cx,cy,x,y);
};
openfl__$internal_renderer_opengl_utils_PathBuiler.cubicCurveTo = function(cx,cy,cx2,cy2,x,y) {
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
		if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
			openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
		} else {
			openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
		}
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
		openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
	}
	var points = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
	var dt = 0;
	var dt2 = 0;
	var dt3 = 0;
	var t2 = 0;
	var t3 = 0;
	var fromX = points[points.length - 2];
	var fromY = points[points.length - 1];
	var px = 0;
	var py = 0;
	var tmp = 0;
	var _g1 = 1;
	while(_g1 < 21) {
		tmp = _g1++ / 20;
		dt = 1 - tmp;
		dt2 = dt * dt;
		dt3 = dt2 * dt;
		t2 = tmp * tmp;
		t3 = t2 * tmp;
		px = dt3 * fromX + 3 * dt2 * tmp * cx + 3 * dt * t2 * cx2 + t3 * x;
		py = dt3 * fromY + 3 * dt2 * tmp * cy + 3 * dt * t2 * cy2 + t3 * y;
		points.push(px);
		points.push(py);
	}
};
openfl__$internal_renderer_opengl_utils_PathBuiler.graphicDataPop = function() {
	if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
		openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
	} else {
		openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
	}
};
openfl__$internal_renderer_opengl_utils_PathBuiler.build = function(graphics,gl) {
	var glStack = null;
	var bounds = graphics.__bounds;
	openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths = [];
	openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
	openfl__$internal_renderer_opengl_utils_PathBuiler.__line = new openfl__$internal_renderer_opengl_utils_LineStyle();
	openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = openfl__$internal_renderer_opengl_utils_FillType.None;
	openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex = 0;
	glStack = graphics.__glStack[openfl__$internal_renderer_opengl_GLRenderer.glContextId];
	if(glStack == null) {
		glStack = graphics.__glStack[openfl__$internal_renderer_opengl_GLRenderer.glContextId] = new openfl__$internal_renderer_opengl_utils_GLStack(gl);
	}
	if(!(!graphics.__visible || graphics.__commands.get_length() == 0 || bounds == null || bounds.width == 0 || bounds.height == 0)) {
		var data = new openfl__$internal_renderer_DrawCommandReader(graphics.__commands);
		var _g = 0;
		var _g1 = graphics.__commands.types;
		while(_g < _g1.length) {
			var type = _g1[_g];
			++_g;
			switch(type[1]) {
			case 0:
				var c = data.readBeginBitmapFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.endFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c) != null ? openfl__$internal_renderer_opengl_utils_FillType.Texture(openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_bitmap(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_matrix(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_repeat(c),openfl__$internal_renderer__$DrawCommandReader_BeginBitmapFillView_$Impl_$.get_smooth(c)) : openfl__$internal_renderer_opengl_utils_FillType.None;
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
					if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
					} else {
						openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
					}
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [];
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				}
				break;
			case 1:
				var c1 = data.readBeginFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.endFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__fill = openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1) > 0 ? openfl__$internal_renderer_opengl_utils_FillType.Color(openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_color(c1) & 16777215,openfl__$internal_renderer__$DrawCommandReader_BeginFillView_$Impl_$.get_alpha(c1)) : openfl__$internal_renderer_opengl_utils_FillType.None;
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
					if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
					} else {
						openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
					}
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [];
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				}
				break;
			case 3:
				var c2 = data.readCubicCurveTo();
				var cx = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX1(c2);
				var cy = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY1(c2);
				var cx2 = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlX2(c2);
				var cy2 = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_controlY2(c2);
				var x = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorX(c2);
				var y = openfl__$internal_renderer__$DrawCommandReader_CubicCurveToView_$Impl_$.get_anchorY(c2);
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
					if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
					} else {
						openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
					}
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				}
				var points = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
				var n = 20;
				var dt = 0;
				var dt2 = 0;
				var dt3 = 0;
				var t2 = 0;
				var t3 = 0;
				var fromX = points[points.length - 2];
				var fromY = points[points.length - 1];
				var px = 0;
				var py = 0;
				var tmp = 0;
				var _g11 = 1;
				var _g2 = n + 1;
				while(_g11 < _g2) {
					tmp = _g11++ / n;
					dt = 1 - tmp;
					dt2 = dt * dt;
					dt3 = dt2 * dt;
					t2 = tmp * tmp;
					t3 = t2 * tmp;
					px = dt3 * fromX + 3 * dt2 * tmp * cx + 3 * dt * t2 * cx2 + t3 * x;
					py = dt3 * fromY + 3 * dt2 * tmp * cy + 3 * dt * t2 * cy2 + t3 * y;
					points.push(px);
					points.push(py);
				}
				break;
			case 4:
				var c3 = data.readCurveTo();
				var cx1 = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlX(c3);
				var cy1 = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_controlY(c3);
				var x1 = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorX(c3);
				var y1 = openfl__$internal_renderer__$DrawCommandReader_CurveToView_$Impl_$.get_anchorY(c3);
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
					if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
					} else {
						openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
					}
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				}
				openfl__$internal_renderer_GraphicsPaths.curveTo(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points,cx1,cy1,x1,y1);
				break;
			case 5:
				var c4 = data.readDrawCircle();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Circle;
				var tmp1 = openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_x(c4);
				var tmp2 = openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_y(c4);
				var tmp3 = openfl__$internal_renderer__$DrawCommandReader_DrawCircleView_$Impl_$.get_radius(c4);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [tmp1,tmp2,tmp3];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 6:
				var c5 = data.readDrawEllipse();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse;
				var tmp4 = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_x(c5);
				var tmp5 = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_y(c5);
				var tmp6 = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_width(c5);
				var tmp7 = openfl__$internal_renderer__$DrawCommandReader_DrawEllipseView_$Impl_$.get_height(c5);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [tmp4,tmp5,tmp6,tmp7];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 7:
				var c6 = data.readDrawPath();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				switch(openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_winding(c6)) {
				case "evenOdd":
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 0;
					break;
				case "nonZero":
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 1;
					break;
				default:
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 0;
				}
				var command;
				var cx3;
				var cy3;
				var cx21;
				var cy21;
				var ax;
				var ay;
				var idx = 0;
				var _g4 = 0;
				var _g3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_commands(c6).length;
				while(_g4 < _g3) {
					command = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_commands(c6).data[_g4++];
					switch(command) {
					case 1:
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 1];
						idx += 2;
						if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
							openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
						} else {
							openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
						}
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ax);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ay);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
						break;
					case 2:
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 1];
						idx += 2;
						var points1 = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
						var push_point = true;
						if(points1.length > 1) {
							if(points1[points1.length - 2] == ax && points1[points1.length - 1] == ay) {
								push_point = false;
							}
						}
						if(push_point == true) {
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ax);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ay);
						}
						break;
					case 3:
						cx3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx];
						cy3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 1];
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 2];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 3];
						idx += 4;
						if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
							if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
								openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
							} else {
								openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
							}
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
						}
						openfl__$internal_renderer_GraphicsPaths.curveTo(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points,cx3,cy3,ax,ay);
						break;
					case 4:
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 2];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 3];
						idx += 4;
						if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
							openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
						} else {
							openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
						}
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ax);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ay);
						openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
						break;
					case 5:
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 2];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 3];
						idx += 4;
						var points2 = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
						var push_point1 = true;
						if(points2.length > 1) {
							if(points2[points2.length - 2] == ax && points2[points2.length - 1] == ay) {
								push_point1 = false;
							}
						}
						if(push_point1 == true) {
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ax);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(ay);
						}
						break;
					case 6:
						cx3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx];
						cy3 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 1];
						cx21 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 2];
						cy21 = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 3];
						ax = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 4];
						ay = openfl__$internal_renderer__$DrawCommandReader_DrawPathView_$Impl_$.get_data(c6).data[idx + 5];
						idx += 6;
						if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0) {
							if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
								openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
							} else {
								openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
							}
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(0);
							openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
						}
						var points3 = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
						var n1 = 20;
						var dt1 = 0;
						var dt21 = 0;
						var dt31 = 0;
						var t21 = 0;
						var t31 = 0;
						var fromX1 = points3[points3.length - 2];
						var fromY1 = points3[points3.length - 1];
						var px1 = 0;
						var py1 = 0;
						var tmp8 = 0;
						var _g12 = 1;
						var _g5 = n1 + 1;
						while(_g12 < _g5) {
							tmp8 = _g12++ / n1;
							dt1 = 1 - tmp8;
							dt21 = dt1 * dt1;
							dt31 = dt21 * dt1;
							t21 = tmp8 * tmp8;
							t31 = t21 * tmp8;
							px1 = dt31 * fromX1 + 3 * dt21 * tmp8 * cx3 + 3 * dt1 * t21 * cx21 + t31 * ax;
							py1 = dt31 * fromY1 + 3 * dt21 * tmp8 * cy3 + 3 * dt1 * t21 * cy21 + t31 * ay;
							points3.push(px1);
							points3.push(py1);
						}
						break;
					default:
					}
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 0;
				break;
			case 8:
				var c7 = data.readDrawRect();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Rectangle(false);
				var tmp9 = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_x(c7);
				var tmp10 = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_y(c7);
				var tmp11 = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_width(c7);
				var tmp12 = openfl__$internal_renderer__$DrawCommandReader_DrawRectView_$Impl_$.get_height(c7);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [tmp9,tmp10,tmp11,tmp12];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 9:
				var c8 = data.readDrawRoundRect();
				var x2 = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_x(c8);
				var y2 = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_y(c8);
				var width = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_width(c8);
				var height = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_height(c8);
				var rx = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseWidth(c8);
				var ry = openfl__$internal_renderer__$DrawCommandReader_DrawRoundRectView_$Impl_$.get_ellipseHeight(c8);
				if(ry == null) {
					ry = rx;
				}
				rx *= 0.5;
				ry *= 0.5;
				if(rx > width / 2) {
					rx = width / 2;
				}
				if(ry > height / 2) {
					ry = height / 2;
				}
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Rectangle(true);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [x2,y2,width,height,rx,ry];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 10:
				var c9 = data.readDrawTiles();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex++;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath(false);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				var tmp13 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_sheet(c9);
				var tmp14 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_tileData(c9);
				var tmp15 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_smooth(c9);
				var tmp16 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_flags(c9);
				var tmp17 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_shader(c9);
				var tmp18 = openfl__$internal_renderer__$DrawCommandReader_DrawTilesView_$Impl_$.get_count(c9);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.DrawTiles(tmp13,tmp14,tmp15,tmp16,tmp17,tmp18);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable = false;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 11:
				var c10 = data.readDrawTriangles();
				var uvtData = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_uvtData(c10);
				var vertices = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_vertices(c10);
				var indices = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_indices(c10);
				var culling = openfl__$internal_renderer__$DrawCommandReader_DrawTrianglesView_$Impl_$.get_culling(c10);
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__fill[1] == 1 && uvtData != null) {
					continue;
				}
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				if(uvtData == null) {
					var this1 = new openfl_VectorData();
					this1.data = new Array(0);
					this1.length = 0;
					this1.fixed = false;
					uvtData = this1;
					var _g31 = openfl__$internal_renderer_opengl_utils_PathBuiler.__fill;
					if(_g31[1] == 2) {
						var b = _g31[2];
						var _g41 = 0;
						var _g32 = vertices.length / 2 | 0;
						while(_g41 < _g32) {
							var i = _g41++;
							var x3 = vertices.data[i * 2] / b.width;
							if(!uvtData.fixed) {
								uvtData.length++;
								if(uvtData.data.length < uvtData.length) {
									var length = uvtData.data.length + 10;
									var data1 = new Array(length);
									haxe_ds__$Vector_Vector_$Impl_$.blit(uvtData.data,0,data1,0,uvtData.data.length);
									uvtData.data = data1;
								}
								uvtData.data[uvtData.length - 1] = x3;
							}
							var x4 = vertices.data[i * 2 + 1] / b.height;
							if(!uvtData.fixed) {
								uvtData.length++;
								if(uvtData.data.length < uvtData.length) {
									var length1 = uvtData.data.length + 10;
									var data2 = new Array(length1);
									haxe_ds__$Vector_Vector_$Impl_$.blit(uvtData.data,0,data2,0,uvtData.data.length);
									uvtData.data = data2;
								}
								uvtData.data[uvtData.length - 1] = x4;
							}
						}
					}
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.DrawTriangles(vertices,indices,uvtData,culling,null,0);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable = false;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 12:
				data.readEndFill();
				openfl__$internal_renderer_opengl_utils_PathBuiler.endFill();
				break;
			case 15:
				var c11 = data.readLineStyle();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line = new openfl__$internal_renderer_opengl_utils_LineStyle();
				if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11) == null || isNaN(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11)) || openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11) < 0) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__line.width = 0;
				} else if(openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11) == 0) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__line.width = 1;
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__line.width = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_thickness(c11);
				}
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.color = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_color(c11);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.alpha = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_alpha(c11);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.scaleMode = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_scaleMode(c11);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.caps = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_caps(c11);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.joints = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_joints(c11);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__line.miterLimit = openfl__$internal_renderer__$DrawCommandReader_LineStyleView_$Impl_$.get_miterLimit(c11);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points = [];
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 16:
				var c12 = data.readLineTo();
				var x5 = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_x(c12);
				var y3 = openfl__$internal_renderer__$DrawCommandReader_LineToView_$Impl_$.get_y(c12);
				var points4 = openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points;
				var push_point2 = true;
				if(points4.length > 1) {
					if(points4[points4.length - 2] == x5 && points4[points4.length - 1] == y3) {
						push_point2 = false;
					}
				}
				if(push_point2 == true) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(x5);
					openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(y3);
				}
				break;
			case 17:
				var c13 = data.readMoveTo();
				var x6 = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_x(c13);
				var y4 = openfl__$internal_renderer__$DrawCommandReader_MoveToView_$Impl_$.get_y(c13);
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(x6);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.push(y4);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			case 18:
				var c14 = data.readOverrideMatrix();
				if(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable && (openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points == null || openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.points.length == 0)) {
					openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.pop();
				} else {
					openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
				}
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath = new openfl__$internal_renderer_opengl_utils_DrawPath();
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.update(openfl__$internal_renderer_opengl_utils_PathBuiler.__line,openfl__$internal_renderer_opengl_utils_PathBuiler.__fill,openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex,openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding);
				var tmp19 = openfl__$internal_renderer__$DrawCommandReader_OverrideMatrixView_$Impl_$.get_matrix(c14);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.type = openfl__$internal_renderer_opengl_utils_GraphicType.OverrideMatrix(tmp19);
				openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath.isRemovable = false;
				openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths.push(openfl__$internal_renderer_opengl_utils_PathBuiler.__currentPath);
				break;
			default:
				data.skip(type);
			}
		}
		openfl__$internal_renderer_opengl_utils_PathBuiler.closePath();
		data.destroy();
	}
	graphics.__drawPaths = openfl__$internal_renderer_opengl_utils_PathBuiler.__drawPaths;
	return glStack;
};
var openfl__$internal_renderer_opengl_utils_LineStyle = function() {
	this.width = 0;
	this.color = 0;
	this.alpha = 1;
	this.scaleMode = 2;
	this.caps = 1;
	this.joints = 2;
	this.miterLimit = 3;
};
$hxClasses["openfl._internal.renderer.opengl.utils.LineStyle"] = openfl__$internal_renderer_opengl_utils_LineStyle;
openfl__$internal_renderer_opengl_utils_LineStyle.__name__ = ["openfl","_internal","renderer","opengl","utils","LineStyle"];
openfl__$internal_renderer_opengl_utils_LineStyle.prototype = {
	__class__: openfl__$internal_renderer_opengl_utils_LineStyle
};
var openfl__$internal_renderer_opengl_utils_FillType = $hxClasses["openfl._internal.renderer.opengl.utils.FillType"] = { __ename__ : ["openfl","_internal","renderer","opengl","utils","FillType"], __constructs__ : ["None","Color","Texture","Gradient"] };
openfl__$internal_renderer_opengl_utils_FillType.None = ["None",0];
openfl__$internal_renderer_opengl_utils_FillType.None.toString = $estr;
openfl__$internal_renderer_opengl_utils_FillType.None.__enum__ = openfl__$internal_renderer_opengl_utils_FillType;
openfl__$internal_renderer_opengl_utils_FillType.Color = function(color,alpha) { var $x = ["Color",1,color,alpha]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_FillType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_FillType.Texture = function(bitmap,matrix,repeat,smooth) { var $x = ["Texture",2,bitmap,matrix,repeat,smooth]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_FillType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_FillType.Gradient = ["Gradient",3];
openfl__$internal_renderer_opengl_utils_FillType.Gradient.toString = $estr;
openfl__$internal_renderer_opengl_utils_FillType.Gradient.__enum__ = openfl__$internal_renderer_opengl_utils_FillType;
var openfl__$internal_renderer_opengl_utils_FilterManager = function(gl,transparent) {
	this.transparent = transparent;
	this.filterStack = [];
	this.offsetX = 0;
	this.offsetY = 0;
	this.setContext(gl);
};
$hxClasses["openfl._internal.renderer.opengl.utils.FilterManager"] = openfl__$internal_renderer_opengl_utils_FilterManager;
openfl__$internal_renderer_opengl_utils_FilterManager.__name__ = ["openfl","_internal","renderer","opengl","utils","FilterManager"];
openfl__$internal_renderer_opengl_utils_FilterManager.prototype = {
	applyFilterPass: function(filter,filterArea,width,height) {
	}
	,begin: function(renderSession,buffer) {
		this.renderSession = renderSession;
		this.defaultShader = renderSession.shaderManager.defaultShader;
		this.width = 0;
		this.height = 0;
		this.buffer = buffer;
	}
	,destroy: function() {
		var gl = this.gl;
		this.filterStack = null;
		this.offsetX = 0;
		this.offsetY = 0;
		var _g = 0;
		var _g1 = this.texturePool;
		while(_g < _g1.length) {
			var texture = _g1[_g];
			++_g;
			texture.destroy();
		}
		this.texturePool = null;
		gl.deleteBuffer(this.vertexBuffer);
		gl.deleteBuffer(this.uvBuffer);
		gl.deleteBuffer(this.colorBuffer);
		gl.deleteBuffer(this.indexBuffer);
	}
	,initShaderBuffers: function() {
		var gl = this.gl;
		this.vertexBuffer = gl.createBuffer();
		this.uvBuffer = gl.createBuffer();
		this.colorBuffer = gl.createBuffer();
		this.indexBuffer = gl.createBuffer();
		var array = [0.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0];
		var this1;
		if(array != null) {
			this1 = new Float32Array(array);
		} else {
			this1 = null;
		}
		this.vertexArray = this1;
		gl.bindBuffer(gl.ARRAY_BUFFER,this.vertexBuffer);
		gl.bufferData(gl.ARRAY_BUFFER,this.vertexArray,gl.STATIC_DRAW);
		var array1 = [0.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0];
		var this2;
		if(array1 != null) {
			this2 = new Float32Array(array1);
		} else {
			this2 = null;
		}
		this.uvArray = this2;
		gl.bindBuffer(gl.ARRAY_BUFFER,this.uvBuffer);
		gl.bufferData(gl.ARRAY_BUFFER,this.uvArray,gl.STATIC_DRAW);
		var array2 = [1.0,16777215,1.0,16777215,1.0,16777215,1.0,16777215];
		var this3;
		if(array2 != null) {
			this3 = new Float32Array(array2);
		} else {
			this3 = null;
		}
		this.colorArray = this3;
		gl.bindBuffer(gl.ARRAY_BUFFER,this.colorBuffer);
		gl.bufferData(gl.ARRAY_BUFFER,this.colorArray,gl.STATIC_DRAW);
		gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
		var gl1 = gl.ELEMENT_ARRAY_BUFFER;
		var array3 = [0,1,2,1,3,2];
		var this4;
		if(array3 != null) {
			this4 = new Uint16Array(array3);
		} else {
			this4 = null;
		}
		gl.bufferData(gl1,this4,gl.STATIC_DRAW);
	}
	,popFilter: function() {
	}
	,pushFilter: function(filterBlock) {
	}
	,setContext: function(gl) {
		this.gl = gl;
		this.texturePool = [];
		this.initShaderBuffers();
	}
	,__class__: openfl__$internal_renderer_opengl_utils_FilterManager
};
var openfl__$internal_renderer_opengl_utils_GLMaskManager = function(renderSession) {
	openfl__$internal_renderer_AbstractMaskManager.call(this,renderSession);
	this.setContext(renderSession.gl);
	this.clips = [];
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLMaskManager"] = openfl__$internal_renderer_opengl_utils_GLMaskManager;
openfl__$internal_renderer_opengl_utils_GLMaskManager.__name__ = ["openfl","_internal","renderer","opengl","utils","GLMaskManager"];
openfl__$internal_renderer_opengl_utils_GLMaskManager.__super__ = openfl__$internal_renderer_AbstractMaskManager;
openfl__$internal_renderer_opengl_utils_GLMaskManager.prototype = $extend(openfl__$internal_renderer_AbstractMaskManager.prototype,{
	destroy: function() {
		this.gl = null;
	}
	,pushRect: function(rect,transform) {
		if(rect == null) {
			return;
		}
		var m = transform.clone();
		var height = this.renderSession.renderer.viewport.height;
		var tx = m.tx;
		var ty = m.ty;
		m.tx = 0;
		m.ty = 0;
		m.scale(1,-1);
		m.translate(0,height);
		m.tx += tx;
		m.ty -= ty;
		var clip = rect.clone();
		clip.__transform(clip,m);
		if(this.currentClip != null) {
			clip = this.currentClip.intersection(clip);
		}
		var restartBatch = this.currentClip == null || clip.isEmpty() || this.currentClip.containsRect(clip);
		this.clips.push(clip);
		this.currentClip = clip;
		if(restartBatch) {
			this.renderSession.spriteBatch.stop();
			this.renderSession.spriteBatch.start(this.currentClip);
		}
	}
	,pushMask: function(mask) {
		this.renderSession.spriteBatch.stop();
		this.renderSession.stencilManager.pushMask(mask,this.renderSession);
		this.renderSession.spriteBatch.start(this.currentClip);
	}
	,popMask: function() {
		this.renderSession.spriteBatch.stop();
		this.renderSession.stencilManager.popMask(null,this.renderSession);
		this.renderSession.spriteBatch.start(this.currentClip);
	}
	,popRect: function() {
		this.renderSession.spriteBatch.stop();
		this.clips.pop();
		this.currentClip = this.clips[this.clips.length - 1];
		this.renderSession.spriteBatch.start(this.currentClip);
	}
	,saveState: function() {
		this.savedClip = this.currentClip;
		this.currentClip = null;
	}
	,restoreState: function() {
		this.currentClip = this.savedClip;
		this.savedClip = null;
	}
	,setContext: function(gl) {
		if(this.renderSession != null) {
			this.renderSession.gl = gl;
		}
		this.gl = gl;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLMaskManager
});
var openfl__$internal_renderer_opengl_utils_VertexAttribute = function(components,type,normalized,name,defaultValue) {
	if(normalized == null) {
		normalized = false;
	}
	this.enabled = true;
	this.normalized = false;
	this.components = components;
	this.type = type;
	this.normalized = normalized;
	this.name = name;
	if(defaultValue == null) {
		var this1;
		if(components != null) {
			this1 = new Float32Array(components);
		} else {
			this1 = null;
		}
		this.defaultValue = this1;
	} else {
		this.defaultValue = defaultValue;
	}
};
$hxClasses["openfl._internal.renderer.opengl.utils.VertexAttribute"] = openfl__$internal_renderer_opengl_utils_VertexAttribute;
openfl__$internal_renderer_opengl_utils_VertexAttribute.__name__ = ["openfl","_internal","renderer","opengl","utils","VertexAttribute"];
openfl__$internal_renderer_opengl_utils_VertexAttribute.prototype = {
	copy: function() {
		return new openfl__$internal_renderer_opengl_utils_VertexAttribute(this.components,this.type,this.normalized,this.name,this.defaultValue);
	}
	,getElementsBytes: function() {
		switch(this.type) {
		case 5120:case 5121:
			return 1;
		case 5122:case 5123:
			return 2;
		default:
			return 4;
		}
	}
	,get_elements: function() {
		var tmp;
		switch(this.type) {
		case 5120:case 5121:
			tmp = 1;
			break;
		case 5122:case 5123:
			tmp = 2;
			break;
		default:
			tmp = 4;
		}
		return Math.floor(this.components * tmp / 4);
	}
	,__class__: openfl__$internal_renderer_opengl_utils_VertexAttribute
	,__properties__: {get_elements:"get_elements"}
};
var openfl__$internal_renderer_opengl_utils_GraphicsRenderer = function() { };
$hxClasses["openfl._internal.renderer.opengl.utils.GraphicsRenderer"] = openfl__$internal_renderer_opengl_utils_GraphicsRenderer;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.__name__ = ["openfl","_internal","renderer","opengl","utils","GraphicsRenderer"];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastVertsBuffer = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastBucketMode = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastTexture = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastTextureRepeat = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.lastTextureSmooth = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.overrideMatrix = null;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildCircle = function(path,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var rectData = path.points;
	var x = rectData[0];
	var y = rectData[1];
	var rx = rectData[2];
	var ry = rectData.length == 3 ? rx : rectData[3];
	if(path.type == openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse) {
		rx /= 2;
		ry /= 2;
		x += rx;
		y += ry;
	}
	if(localCoords) {
		x -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
		y -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
	}
	var seg = Math.PI * 2 / 40;
	var bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
	var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	if(fill != null) {
		var verts = fill.verts;
		var indices = fill.indices;
		var vertPos = verts.length / 2 | 0;
		indices.push(vertPos);
		var _g1 = 0;
		while(_g1 < 41) {
			var i = _g1++;
			verts.push(x);
			verts.push(y);
			verts.push(x + Math.sin(seg * i) * rx);
			verts.push(y + Math.cos(seg * i) * ry);
			indices.push(vertPos++);
			indices.push(vertPos++);
		}
		indices.push(vertPos - 1);
	}
	if(path.line.width > 0) {
		var tempPoints = path.points;
		path.points = [];
		var points = path.points;
		var seg1 = Math.PI * 2 / 40;
		var _g11 = 0;
		while(_g11 < 41) {
			var i1 = _g11++;
			points.push(x + Math.sin(seg1 * i1) * rx);
			points.push(y + Math.cos(seg1 * i1) * ry);
		}
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket);
		path.points = tempPoints;
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildComplexPoly = function(path,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var bucket = null;
	if(path.points.length >= 6) {
		var points = path.points.slice();
		if(localCoords) {
			var _g1 = 0;
			var _g = points.length / 2 | 0;
			while(_g1 < _g) {
				var i = _g1++;
				points[i * 2] -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
				points[i * 2 + 1] -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
			}
		}
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
		var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
		fill.drawMode = glStack.gl.TRIANGLE_FAN;
		fill.verts = points;
		var indices = fill.indices;
		var length = points.length / 2 | 0;
		var _g11 = 0;
		while(_g11 < length) indices.push(_g11++);
	}
	if(path.line.width > 0) {
		if(bucket == null) {
			bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
		}
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket,localCoords);
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine = function(path,bucket,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var points = path.points;
	if(points.length == 0) {
		return;
	}
	var line = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Line);
	if(localCoords) {
		var _g1 = 0;
		var _g = points.length / 2 | 0;
		while(_g1 < _g) {
			var i = _g1++;
			points[i * 2] -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
			points[i * 2 + 1] -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
		}
	}
	var firstPoint = new openfl_geom_Point(points[0],points[1]);
	var lastPoint = new openfl_geom_Point(points[points.length - 2 | 0],points[points.length - 1 | 0]);
	if(firstPoint.x == lastPoint.x && firstPoint.y == lastPoint.y) {
		points = points.slice();
		points.pop();
		points.pop();
		lastPoint = new openfl_geom_Point(points[points.length - 2 | 0],points[points.length - 1 | 0]);
		var midPointX = lastPoint.x + (firstPoint.x - lastPoint.x) * 0.5;
		var midPointY = lastPoint.y + (firstPoint.y - lastPoint.y) * 0.5;
		points.unshift(midPointY);
		points.unshift(midPointX);
		points.push(midPointX);
		points.push(midPointY);
	}
	var verts = line.verts;
	var indices = line.indices;
	var length = points.length / 2 | 0;
	var indexCount = points.length;
	var indexStart = verts.length / 6 | 0;
	var width = path.line.width / 2;
	var hex = path.line.color;
	var color = hex == null ? [1,1,1] : [(hex >> 16 & 255) / 255,(hex >> 8 & 255) / 255,(hex & 255) / 255];
	var alpha = path.line.alpha;
	var r = color[0];
	var g = color[1];
	var b = color[2];
	var px;
	var py;
	var p1x;
	var p1y;
	var p2x;
	var p2y;
	var p3x;
	var p3y;
	var perpx;
	var perpy;
	var perp2x;
	var perp2y;
	var perp3x;
	var perp3y;
	var a1;
	var b1;
	var c1;
	var a2;
	var b2;
	var c2;
	var denom;
	var pdist;
	var dist;
	p1x = points[0];
	p1y = points[1];
	p2x = points[2];
	p2y = points[3];
	perpx = -(p1y - p2y);
	perpy = p1x - p2x;
	dist = Math.sqrt(Math.abs(perpx * perpx + perpy * perpy));
	perpx /= dist;
	perpy /= dist;
	perpx *= width;
	perpy *= width;
	verts.push(p1x - perpx);
	verts.push(p1y - perpy);
	verts.push(r);
	verts.push(g);
	verts.push(b);
	verts.push(alpha);
	verts.push(p1x + perpx);
	verts.push(p1y + perpy);
	verts.push(r);
	verts.push(g);
	verts.push(b);
	verts.push(alpha);
	var _g11 = 1;
	var _g2 = length - 1;
	while(_g11 < _g2) {
		var i1 = _g11++;
		p1x = points[(i1 - 1) * 2];
		p1y = points[(i1 - 1) * 2 + 1];
		p2x = points[i1 * 2];
		p2y = points[i1 * 2 + 1];
		p3x = points[(i1 + 1) * 2];
		p3y = points[(i1 + 1) * 2 + 1];
		perpx = -(p1y - p2y);
		perpy = p1x - p2x;
		dist = Math.sqrt(Math.abs(perpx * perpx + perpy * perpy));
		perpx /= dist;
		perpy /= dist;
		perpx *= width;
		perpy *= width;
		perp2x = -(p2y - p3y);
		perp2y = p2x - p3x;
		dist = Math.sqrt(Math.abs(perp2x * perp2x + perp2y * perp2y));
		perp2x /= dist;
		perp2y /= dist;
		perp2x *= width;
		perp2y *= width;
		a1 = -perpy + p1y - (-perpy + p2y);
		b1 = -perpx + p2x - (-perpx + p1x);
		c1 = (-perpx + p1x) * (-perpy + p2y) - (-perpx + p2x) * (-perpy + p1y);
		a2 = -perp2y + p3y - (-perp2y + p2y);
		b2 = -perp2x + p2x - (-perp2x + p3x);
		c2 = (-perp2x + p3x) * (-perp2y + p2y) - (-perp2x + p2x) * (-perp2y + p3y);
		denom = a1 * b2 - a2 * b1;
		if(Math.abs(denom) < 0.1) {
			denom += 10.1;
			verts.push(p2x - perpx);
			verts.push(p2y - perpy);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			verts.push(p2x + perpx);
			verts.push(p2y + perpy);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			continue;
		}
		px = (b1 * c2 - b2 * c1) / denom;
		py = (a2 * c1 - a1 * c2) / denom;
		pdist = (px - p2x) * (px - p2x) + (py - p2y) + (py - p2y);
		if(pdist > 19600) {
			perp3x = perpx - perp2x;
			perp3y = perpy - perp2y;
			dist = Math.sqrt(Math.abs(perp3x * perp3x + perp3y * perp3y));
			perp3x /= dist;
			perp3y /= dist;
			perp3x *= width;
			perp3y *= width;
			verts.push(p2x - perp3x);
			verts.push(p2y - perp3y);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			verts.push(p2x + perp3x);
			verts.push(p2y + perp3y);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			verts.push(p2x - perp3x);
			verts.push(p2y - perp3y);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			++indexCount;
		} else {
			verts.push(px);
			verts.push(py);
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
			verts.push(p2x - (px - p2x));
			verts.push(p2y - (py - p2y));
			verts.push(r);
			verts.push(g);
			verts.push(b);
			verts.push(alpha);
		}
	}
	p1x = points[(length - 2) * 2];
	p1y = points[(length - 2) * 2 + 1];
	p2x = points[(length - 1) * 2];
	p2y = points[(length - 1) * 2 + 1];
	perpx = -(p1y - p2y);
	perpy = p1x - p2x;
	dist = Math.sqrt(Math.abs(perpx * perpx + perpy * perpy));
	if(!isFinite(dist)) {
		haxe_Log.trace(perpx * perpx + perpy * perpy,{ fileName : "GraphicsRenderer.hx", lineNumber : 407, className : "openfl._internal.renderer.opengl.utils.GraphicsRenderer", methodName : "buildLine"});
	}
	perpx /= dist;
	perpy /= dist;
	perpx *= width;
	perpy *= width;
	verts.push(p2x - perpx);
	verts.push(p2y - perpy);
	verts.push(r);
	verts.push(g);
	verts.push(b);
	verts.push(alpha);
	verts.push(p2x + perpx);
	verts.push(p2y + perpy);
	verts.push(r);
	verts.push(g);
	verts.push(b);
	verts.push(alpha);
	indices.push(indexStart);
	var _g12 = 0;
	var _g3 = indexCount;
	while(_g12 < _g3) {
		++_g12;
		indices.push(indexStart++);
	}
	indices.push(indexStart - 1);
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildPoly = function(path,glStack) {
	if(path.points.length < 6) {
		return;
	}
	var points = path.points;
	var l = points.length;
	var sx = points[0];
	var sy = points[1];
	if(sx != points[l - 2] || sy != points[l - 1]) {
		points.push(sx);
		points.push(sy);
	}
	var length = points.length / 2 | 0;
	var bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
	var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	var verts = fill.verts;
	var indices = fill.indices;
	if(fill != null) {
		var triangles = [];
		openfl__$internal_renderer_PolyK.triangulate(triangles,points);
		var vertPos = verts.length / 2;
		var i = 0;
		while(i < triangles.length) {
			indices.push(triangles[i] + vertPos | 0);
			indices.push(triangles[i] + vertPos | 0);
			indices.push(triangles[i + 1] + vertPos | 0);
			indices.push(triangles[i + 2] + vertPos | 0);
			indices.push(triangles[i + 2] + vertPos | 0);
			i += 3;
		}
		var _g1 = 0;
		while(_g1 < length) {
			var i1 = _g1++;
			verts.push(points[i1 * 2]);
			verts.push(points[i1 * 2 + 1]);
		}
	}
	if(path.line.width > 0) {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket);
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildRectangle = function(path,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var rectData = path.points;
	var x = rectData[0];
	var y = rectData[1];
	var width = rectData[2];
	var height = rectData[3];
	if(localCoords) {
		x -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
		y -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
	}
	var bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
	var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	if(fill != null) {
		var verts = fill.verts;
		var indices = fill.indices;
		var vertPos = verts.length / 2 | 0;
		verts.push(x);
		verts.push(y);
		verts.push(x + width);
		verts.push(y);
		verts.push(x);
		verts.push(y + height);
		verts.push(x + width);
		verts.push(y + height);
		indices.push(vertPos);
		indices.push(vertPos);
		indices.push(vertPos + 1);
		indices.push(vertPos + 2);
		indices.push(vertPos + 3);
		indices.push(vertPos + 3);
	}
	if(path.line.width > 0) {
		var tempPoints = path.points;
		path.points = [x,y,x + width,y,x + width,y + height,x,y + height,x,y];
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket);
		path.points = tempPoints;
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildRoundedRectangle = function(path,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var points = path.points.slice();
	var x = points[0];
	var y = points[1];
	if(localCoords) {
		x -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
		y -= openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
	}
	var recPoints = [];
	openfl__$internal_renderer_GraphicsPaths.roundRectangle(recPoints,x,y,points[2],points[3],points[4],points[5]);
	var bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
	var fill = bucket.getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	if(fill != null) {
		var verts = fill.verts;
		var indices = fill.indices;
		var vecPos = verts.length / 2;
		var triangles = [];
		openfl__$internal_renderer_PolyK.triangulate(triangles,recPoints);
		var i = 0;
		while(i < triangles.length) {
			indices.push(triangles[i] + vecPos | 0);
			indices.push(triangles[i] + vecPos | 0);
			indices.push(triangles[i + 1] + vecPos | 0);
			indices.push(triangles[i + 2] + vecPos | 0);
			indices.push(triangles[i + 2] + vecPos | 0);
			i += 3;
		}
		i = 0;
		while(i < recPoints.length) {
			verts.push(recPoints[i]);
			verts.push(recPoints[++i]);
			++i;
		}
	}
	if(path.line.width > 0) {
		var tempPoints = path.points;
		path.points = recPoints;
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildLine(path,bucket);
		path.points = tempPoints;
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildDrawTriangles = function(path,object,glStack,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var args = path.type.slice(2);
	var vertices = args[0];
	var indices = args[1];
	var uvtData = args[2];
	var culling = args[3];
	var colors = args[4];
	var a;
	var b;
	var c;
	var d;
	var tx;
	var ty;
	if(localCoords) {
		a = 1.0;
		b = 0.0;
		c = 0.0;
		d = 1.0;
		tx = 0.0;
		ty = 0.0;
	} else {
		a = object.__worldTransform.a;
		b = object.__worldTransform.b;
		c = object.__worldTransform.c;
		d = object.__worldTransform.d;
		tx = object.__worldTransform.tx;
		ty = object.__worldTransform.ty;
	}
	var hasColors = colors != null && colors.length > 0;
	var fill = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack).getData(openfl__$internal_renderer_opengl_utils_BucketDataType.Fill);
	var colorAttrib = fill.vertexArray.attributes[2];
	colorAttrib.enabled = hasColors;
	var array = [1,1,1,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	colorAttrib.defaultValue = this1;
	fill.rawVerts = true;
	fill.glLength = indices.length;
	fill.stride = fill.vertexArray.get_stride() / 4 | 0;
	var vertsLength = fill.glLength * fill.stride;
	var verts;
	if(fill.glVerts == null || fill.glVerts.length < vertsLength) {
		var this2;
		if(vertsLength != null) {
			this2 = new Float32Array(vertsLength);
		} else {
			this2 = null;
		}
		verts = this2;
		fill.glVerts = verts;
	} else {
		verts = fill.glVerts;
	}
	var buffer = verts.buffer;
	var this3;
	if(buffer != null) {
		this3 = new Uint32Array(buffer,0);
	} else {
		this3 = null;
	}
	var glColors = this3;
	var v0 = 0;
	var v1 = 0;
	var v2 = 0;
	var x0 = 0.0;
	var y0 = 0.0;
	var x1 = 0.0;
	var y1 = 0.0;
	var x2 = 0.0;
	var y2 = 0.0;
	var idx = 0;
	var _g1 = 0;
	var _g = indices.length / 3 | 0;
	while(_g1 < _g) {
		var i = _g1++;
		var i0 = indices.data[i * 3];
		var i1 = indices.data[i * 3 + 1];
		var i2 = indices.data[i * 3 + 2];
		v0 = i0 * 2;
		v1 = i1 * 2;
		v2 = i2 * 2;
		var x01 = vertices.data[v0];
		x0 = x01;
		var y01 = vertices.data[v0 + 1];
		y0 = y01;
		var x11 = vertices.data[v1];
		x1 = x11;
		var y11 = vertices.data[v1 + 1];
		y1 = y11;
		var x21 = vertices.data[v2];
		x2 = x21;
		var y21 = vertices.data[v2 + 1];
		y2 = y21;
		if(localCoords) {
			x0 = x01 - openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
			y0 = y01 - openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
			x1 = x11 - openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
			y1 = y11 - openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
			x2 = x21 - openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.x;
			y2 = y21 - openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.y;
		}
		switch(culling) {
		case 0:
			if((x1 - x0) * (y2 - y0) - (y1 - y0) * (x2 - x0) < 0) {
				continue;
			}
			break;
		case 2:
			if(!((x1 - x0) * (y2 - y0) - (y1 - y0) * (x2 - x0) < 0)) {
				continue;
			}
			break;
		default:
		}
		verts[idx++] = a * x0 + c * y0 + tx;
		verts[idx++] = b * x0 + d * y0 + ty;
		verts[idx++] = uvtData.data[v0];
		verts[idx++] = uvtData.data[v0 + 1];
		if(hasColors) {
			glColors[idx++] = colors.data[i0];
		}
		verts[idx++] = a * x1 + c * y1 + tx;
		verts[idx++] = b * x1 + d * y1 + ty;
		verts[idx++] = uvtData.data[v1];
		verts[idx++] = uvtData.data[v1 + 1];
		if(hasColors) {
			glColors[idx++] = colors.data[i1];
		}
		verts[idx++] = a * x2 + c * y2 + tx;
		verts[idx++] = b * x2 + d * y2 + ty;
		verts[idx++] = uvtData.data[v2];
		verts[idx++] = uvtData.data[v2 + 1];
		if(hasColors) {
			glColors[idx++] = colors.data[i2];
		}
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildDrawTiles = function(path,glStack) {
	openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.quadraticBezierCurve = function(fromX,fromY,cpX,cpY,toX,toY) {
	var xa;
	var ya;
	var xb;
	var yb;
	var x;
	var y;
	var points = [];
	var getPt = function(n1,n2,perc) {
		return n1 + (n2 - n1) * perc;
	};
	var j = 0.0;
	var _g1 = 0;
	while(_g1 < 21) {
		j = _g1++ / 20;
		xa = getPt(fromX,cpX,j);
		ya = getPt(fromY,cpY,j);
		xb = getPt(cpX,toX,j);
		yb = getPt(cpY,toY,j);
		x = getPt(xa,xb,j);
		y = getPt(ya,yb,j);
		points.push(x);
		points.push(y);
	}
	return points;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.render = function(object,renderSession) {
	var graphics = object.__graphics;
	var bounds = graphics.__bounds;
	var dirty = graphics.__dirty;
	if(!graphics.__visible || graphics.__commands.get_length() == 0 || bounds == null || bounds.width == 0 || bounds.height == 0) {
		graphics.__glStack.splice(0,graphics.__glStack.length);
		return;
	}
	if(dirty) {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.updateGraphics(object,object.__graphics,renderSession.gl,object.get_cacheAsBitmap());
	}
	openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderGraphics(object,renderSession,false);
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderGraphics = function(object,renderSession,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	var gl = renderSession.gl;
	var glStack = object.__graphics.__glStack[openfl__$internal_renderer_opengl_GLRenderer.glContextId];
	if(glStack == null) {
		return;
	}
	var bucket;
	var translationMatrix;
	if(localCoords) {
		translationMatrix = openfl_geom_Matrix.__identity;
	} else {
		translationMatrix = object.__worldTransform;
	}
	var clipRect = renderSession.spriteBatch.clipRect;
	var batchDrawing = renderSession.spriteBatch.drawing;
	batchDrawing = renderSession.spriteBatch.drawing;
	var _g1 = 0;
	var _g = glStack.buckets.length;
	while(_g1 < _g) {
		var i = _g1++;
		batchDrawing = renderSession.spriteBatch.drawing;
		if(batchDrawing && !localCoords) {
			renderSession.spriteBatch.finish();
		}
		renderSession.blendModeManager.setBlendMode(object.__blendMode);
		if(clipRect != null) {
			gl.enable(gl.SCISSOR_TEST);
			gl.scissor(Math.floor(clipRect.x),Math.floor(clipRect.y),Math.floor(clipRect.width),Math.floor(clipRect.height));
		}
		bucket = glStack.buckets[i];
		switch(bucket.mode[1]) {
		case 1:case 2:
			renderSession.stencilManager.pushBucket(bucket,renderSession,translationMatrix.toArray(true));
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderFill(bucket,openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareShader(bucket,renderSession,object,translationMatrix.toArray(true)),renderSession);
			renderSession.stencilManager.popBucket(object,bucket,renderSession);
			break;
		case 5:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderDrawTriangles(bucket,openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareShader(bucket,renderSession,object,null),renderSession);
			break;
		case 6:
			if(!batchDrawing) {
				renderSession.spriteBatch.begin(renderSession,clipRect);
			}
			var args = bucket.graphicType.slice(2);
			renderSession.spriteBatch.renderTiles(object,args[0],args[1],args[2],args[3],args[4],args[5]);
			renderSession.spriteBatch.finish();
			break;
		default:
		}
		var ct = object.__worldColorTransform;
		var _g3 = 0;
		var _g4 = bucket.lines;
		while(_g3 < _g4.length) {
			var line = _g4[_g3];
			++_g3;
			if(line != null && line.verts.length > 0) {
				var shader = renderSession.shaderManager.primitiveShader;
				renderSession.shaderManager.setShader(shader);
				gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix.toArray(true));
				gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uProjectionMatrix"),false,renderSession.projectionMatrix.toArray(true));
				gl.uniform1f(shader.getUniformLocation("openfl_uAlpha"),1);
				gl.uniform4f(shader.getUniformLocation("openfl_uColorMultiplier"),ct.redMultiplier,ct.greenMultiplier,ct.blueMultiplier,ct.alphaMultiplier);
				gl.uniform4f(shader.getUniformLocation("openfl_uColorOffset"),ct.redOffset / 255,ct.greenOffset / 255,ct.blueOffset / 255,ct.alphaOffset / 255);
				var _this = line.vertexArray;
				_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
				shader.bindVertexArray(line.vertexArray);
				gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,line.indexBuffer);
				gl.drawElements(gl.TRIANGLE_STRIP,line.indices.length,gl.UNSIGNED_SHORT,0);
			}
		}
		if(clipRect != null) {
			gl.disable(gl.SCISSOR_TEST);
		}
		batchDrawing = renderSession.spriteBatch.drawing;
		if(!batchDrawing && !localCoords) {
			renderSession.spriteBatch.begin(renderSession,clipRect);
		}
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.updateGraphics = function(object,graphics,gl,localCoords) {
	if(localCoords == null) {
		localCoords = false;
	}
	openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectPosition.setTo(object.get_x(),object.get_y());
	if(graphics.__bounds == null) {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds = new openfl_geom_Rectangle();
	} else {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.copyFrom(graphics.__bounds);
	}
	var glStack = null;
	if(graphics.__dirty) {
		glStack = openfl__$internal_renderer_opengl_utils_DrawPath.getStack(graphics,gl);
	}
	graphics.set___dirty(false);
	var _g = 0;
	var _g1 = glStack.buckets;
	while(_g < _g1.length) {
		var data = _g1[_g];
		++_g;
		data.reset();
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bucketPool.push(data);
	}
	glStack.reset();
	var _g11 = glStack.lastIndex;
	var _g2 = graphics.__drawPaths.length;
	while(_g11 < _g2) {
		var path = graphics.__drawPaths[_g11++];
		var _g21 = path.type;
		switch(_g21[1]) {
		case 0:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildComplexPoly(path,glStack,localCoords);
			break;
		case 1:
			if(_g21[2]) {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildRoundedRectangle(path,glStack,localCoords);
			} else {
				openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildRectangle(path,glStack,localCoords);
			}
			break;
		case 2:case 3:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildCircle(path,glStack,localCoords);
			break;
		case 4:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.buildDrawTriangles(path,object,glStack,localCoords);
			break;
		case 5:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket(path,glStack);
			break;
		case 6:
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.overrideMatrix = _g21[2];
			break;
		}
		glStack.lastIndex++;
	}
	var _g3 = 0;
	var _g12 = glStack.buckets;
	while(_g3 < _g12.length) {
		var bucket = _g12[_g3];
		++_g3;
		if(bucket.uploadTileBuffer) {
			bucket.uploadTile(Math.ceil(openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.get_left()),Math.ceil(openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.get_top()),Math.floor(openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.get_right()),Math.floor(openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds.get_bottom()));
		}
		bucket.optimize();
	}
	glStack.upload();
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareBucket = function(path,glStack) {
	var bucket = null;
	var _g = path.fill;
	switch(_g[1]) {
	case 1:
		var c = _g[2];
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.switchBucket(path.fillIndex,glStack,openfl__$internal_renderer_opengl_utils_BucketMode.Fill);
		bucket.color = c == null ? [1,1,1] : [(c >> 16 & 255) / 255,(c >> 8 & 255) / 255,(c & 255) / 255];
		bucket.color[3] = _g[3];
		bucket.uploadTileBuffer = true;
		break;
	case 2:
		var m = _g[3];
		var b = _g[2];
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.switchBucket(path.fillIndex,glStack,openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill);
		bucket.bitmap = b;
		bucket.textureRepeat = _g[4];
		bucket.textureSmooth = _g[5];
		bucket.texture = b.getTexture(glStack.gl);
		bucket.uploadTileBuffer = true;
		var pMatrix;
		if(m == null) {
			pMatrix = new openfl_geom_Matrix();
		} else {
			pMatrix = m.clone();
		}
		pMatrix.invert();
		pMatrix.scale(1 / b.width,1 / b.height);
		var tx = pMatrix.tx;
		var ty = pMatrix.ty;
		pMatrix.tx = 0;
		pMatrix.ty = 0;
		bucket.textureTL.x = tx;
		bucket.textureTL.y = ty;
		bucket.textureBR.x = tx + 1;
		bucket.textureBR.y = ty + 1;
		bucket.textureMatrix = pMatrix;
		break;
	default:
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.switchBucket(path.fillIndex,glStack,openfl__$internal_renderer_opengl_utils_BucketMode.Line);
		bucket.uploadTileBuffer = false;
	}
	switch(path.type[1]) {
	case 4:
		bucket.mode = openfl__$internal_renderer_opengl_utils_BucketMode.DrawTriangles;
		bucket.uploadTileBuffer = false;
		break;
	case 5:
		bucket.mode = openfl__$internal_renderer_opengl_utils_BucketMode.DrawTiles;
		bucket.uploadTileBuffer = false;
		break;
	default:
	}
	bucket.graphicType = path.type;
	bucket.overrideMatrix = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.overrideMatrix;
	return bucket;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.getBucket = function(glStack,mode) {
	var b = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bucketPool.pop();
	if(b == null) {
		b = new openfl__$internal_renderer_opengl_utils_GLBucket(glStack.gl);
	}
	b.mode = mode;
	glStack.buckets.push(b);
	return b;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.switchBucket = function(fillIndex,glStack,mode) {
	var bucket = null;
	var _g = 0;
	var _g1 = glStack.buckets;
	while(_g < _g1.length) {
		var b = _g1[_g];
		++_g;
		if(b.fillIndex == fillIndex) {
			bucket = b;
			break;
		}
	}
	if(bucket == null) {
		bucket = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.getBucket(glStack,mode);
	}
	bucket.dirty = true;
	bucket.fillIndex = fillIndex;
	return bucket;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.prepareShader = function(bucket,renderSession,object,translationMatrix) {
	var gl = renderSession.gl;
	var shader = null;
	switch(bucket.mode[1]) {
	case 1:
		shader = renderSession.shaderManager.fillShader;
		break;
	case 2:
		shader = renderSession.shaderManager.patternFillShader;
		break;
	case 5:
		shader = renderSession.shaderManager.drawTrianglesShader;
		break;
	default:
		shader = null;
	}
	if(shader == null) {
		return null;
	}
	renderSession.shaderManager.setShader(shader);
	gl.uniform1f(shader.getUniformLocation("openfl_uAlpha"),object.__worldAlpha);
	gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uProjectionMatrix"),false,renderSession.projectionMatrix.toArray(true));
	var ct = object.__worldColorTransform;
	gl.uniform4f(shader.getUniformLocation("openfl_uColorMultiplier"),ct.redMultiplier,ct.greenMultiplier,ct.blueMultiplier,ct.alphaMultiplier);
	gl.uniform4f(shader.getUniformLocation("openfl_uColorOffset"),ct.redOffset / 255,ct.greenOffset / 255,ct.blueOffset / 255,ct.alphaOffset / 255);
	switch(bucket.mode[1]) {
	case 1:
		gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix);
		var tmp = shader.getUniformLocation("openfl_uColor");
		var array = bucket.color;
		var this1;
		if(array != null) {
			this1 = new Float32Array(array);
		} else {
			this1 = null;
		}
		gl.uniform4fv(tmp,this1);
		break;
	case 2:
		gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix);
		gl.uniform2f(shader.getUniformLocation("openfl_uPatternTL"),bucket.textureTL.x,bucket.textureTL.y);
		gl.uniform2f(shader.getUniformLocation("openfl_uPatternBR"),bucket.textureBR.x,bucket.textureBR.y);
		gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uPatternMatrix"),false,bucket.textureMatrix.toArray(true));
		break;
	case 5:
		if(bucket.texture != null) {
			gl.uniform1i(shader.getUniformLocation("openfl_uUseTexture"),1);
		} else {
			gl.uniform1i(shader.getUniformLocation("openfl_uUseTexture"),0);
			var tmp1 = shader.getUniformLocation("openfl_uColor");
			var array1 = bucket.color;
			var this2;
			if(array1 != null) {
				this2 = new Float32Array(array1);
			} else {
				this2 = null;
			}
			gl.uniform4fv(tmp1,this2);
		}
		break;
	default:
	}
	return shader;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderFill = function(bucket,shader,renderSession) {
	var gl = renderSession.gl;
	if(bucket.mode == openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill && bucket.texture != null) {
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bindTexture(gl,bucket);
	}
	gl.bindBuffer(gl.ARRAY_BUFFER,bucket.tileBuffer);
	gl.vertexAttribPointer(shader.getAttribLocation("openfl_aPosition"),4,gl.SHORT,false,0,0);
	gl.drawArrays(gl.TRIANGLE_STRIP,0,4);
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.renderDrawTriangles = function(bucket,shader,renderSession) {
	var gl = renderSession.gl;
	var _g = 0;
	var _g1 = bucket.fills;
	while(_g < _g1.length) {
		var fill = _g1[_g];
		++_g;
		if(fill.available) {
			continue;
		}
		openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bindTexture(gl,bucket);
		var _this = fill.vertexArray;
		_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
		shader.bindVertexArray(fill.vertexArray);
		gl.drawArrays(gl.TRIANGLES,fill.glStart,fill.glLength);
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bindTexture = function(gl,bucket) {
	gl.bindTexture(gl.TEXTURE_2D,bucket.texture);
	if(bucket.textureRepeat && bucket.bitmap.image.get_powerOfTwo()) {
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.REPEAT);
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.REPEAT);
	} else {
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);
	}
	if(bucket.textureSmooth) {
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.LINEAR);
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.LINEAR);
	} else {
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST);
		gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST);
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.isCCW = function(x1,y1,x2,y2,x3,y3) {
	return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1) < 0;
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.hex2rgb = function(hex) {
	if(hex == null) {
		return [1,1,1];
	} else {
		return [(hex >> 16 & 255) / 255,(hex >> 8 & 255) / 255,(hex & 255) / 255];
	}
};
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.hex2rgba = function(hex) {
	if(hex == null) {
		return [1,1,1,1];
	} else {
		return [(hex >> 16 & 255) / 255,(hex >> 8 & 255) / 255,(hex & 255) / 255,(hex >> 24 & 255) / 255];
	}
};
var openfl__$internal_renderer_opengl_utils_GLStack = function(gl) {
	this.lastIndex = 0;
	this.gl = gl;
	this.buckets = [];
	this.lastIndex = 0;
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLStack"] = openfl__$internal_renderer_opengl_utils_GLStack;
openfl__$internal_renderer_opengl_utils_GLStack.__name__ = ["openfl","_internal","renderer","opengl","utils","GLStack"];
openfl__$internal_renderer_opengl_utils_GLStack.prototype = {
	reset: function() {
		this.buckets = [];
		this.lastIndex = 0;
	}
	,upload: function() {
		var _g = 0;
		var _g1 = this.buckets;
		while(_g < _g1.length) {
			var bucket = _g1[_g];
			++_g;
			if(bucket.dirty) {
				bucket.upload();
			}
		}
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLStack
};
var openfl__$internal_renderer_opengl_utils_GLBucket = function(gl) {
	this.uploadTileBuffer = true;
	this.textureSmooth = true;
	this.textureRepeat = false;
	this.lines = [];
	this.fills = [];
	this.fillIndex = -1;
	this.gl = gl;
	this.color = [0,0,0];
	this.lastIndex = 0;
	this.alpha = 1;
	this.dirty = true;
	this.mode = openfl__$internal_renderer_opengl_utils_BucketMode.Fill;
	this.textureMatrix = new openfl_geom_Matrix();
	this.textureTL = new openfl_geom_Point();
	this.textureBR = new openfl_geom_Point(1,1);
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLBucket"] = openfl__$internal_renderer_opengl_utils_GLBucket;
openfl__$internal_renderer_opengl_utils_GLBucket.__name__ = ["openfl","_internal","renderer","opengl","utils","GLBucket"];
openfl__$internal_renderer_opengl_utils_GLBucket.prototype = {
	getData: function(type) {
		var data = type[1] == 1 ? this.fills : this.lines;
		var result = null;
		var remove = false;
		var _g = 0;
		while(_g < data.length) {
			var d = data[_g];
			++_g;
			if(d.available) {
				result = d;
				remove = true;
				break;
			}
		}
		if(result == null) {
			result = new openfl__$internal_renderer_opengl_utils_GLBucketData(this.gl);
		}
		result.available = false;
		result.parent = this;
		result.type = type;
		if(remove) {
			HxOverrides.remove(data,result);
		}
		data.push(result);
		switch(type[1]) {
		case 0:
			result.vertexArray.attributes = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.primitiveVertexAttributes;
			break;
		case 1:
			switch(this.mode[1]) {
			case 1:case 2:
				result.vertexArray.attributes = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.fillVertexAttributes;
				break;
			case 5:
				var tmp = openfl__$internal_renderer_opengl_utils_GraphicsRenderer.drawTrianglesVertexAttributes.slice();
				result.vertexArray.attributes = tmp;
				result.vertexArray.attributes[2] = result.vertexArray.attributes[2].copy();
				break;
			default:
			}
			break;
		}
		return result;
	}
	,optimize: function() {
		var _gthis = this;
		var data = this.lines;
		if(data.length > 1) {
			var result = [];
			var tmp = null;
			var last = null;
			var idx = 0;
			var vi = 0;
			var ii = 0;
			var _g = 0;
			while(_g < data.length) {
				var d = data[_g];
				++_g;
				if(d.available || d.rawVerts || d.rawIndices) {
					if(tmp != null) {
						result.push(tmp);
						tmp = null;
					}
					result.push(d);
					last = d;
					continue;
				}
				if(last == null || last.drawMode == d.drawMode) {
					if(tmp == null) {
						tmp = d;
					} else {
						vi = tmp.verts.length;
						ii = tmp.indices.length;
						var _g2 = 0;
						var _g1 = d.verts.length;
						while(_g2 < _g1) {
							var j = _g2++;
							tmp.verts[j + vi] = d.verts[j];
						}
						var _g21 = 0;
						var _g11 = d.indices.length;
						while(_g21 < _g11) {
							var j1 = _g21++;
							tmp.indices[j1 + ii] = d.indices[j1] + idx;
						}
					}
					idx = tmp.indices[tmp.indices.length - 1] + 1;
					last = d;
				} else {
					if(tmp != null) {
						result.push(tmp);
						tmp = null;
					}
					result.push(d);
					last = d;
					continue;
				}
			}
			if(result.length == 0 && tmp != null) {
				result.push(tmp);
			}
			if(result.length > 0) {
				_gthis.lines = result;
			}
		}
	}
	,reset: function() {
		var _g = 0;
		var _g1 = this.fills;
		while(_g < _g1.length) {
			var fill = _g1[_g];
			++_g;
			fill.reset();
		}
		var _g2 = 0;
		var _g11 = this.lines;
		while(_g2 < _g11.length) {
			var line = _g11[_g2];
			++_g2;
			line.reset();
		}
		this.fillIndex = -1;
		this.uploadTileBuffer = true;
		this.graphicType = openfl__$internal_renderer_opengl_utils_GraphicType.Polygon;
	}
	,uploadTile: function(x,y,w,h) {
		if(this.tileBuffer == null) {
			this.tileBuffer = this.gl.createBuffer();
		}
		this.tile = [x,y,0,0,w,y,1,0,x,h,0,1,w,h,1,1];
		var array = this.tile;
		var this1;
		if(array != null) {
			this1 = new Int16Array(array);
		} else {
			this1 = null;
		}
		this.glTile = this1;
		this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.tileBuffer);
		this.gl.bufferData(this.gl.ARRAY_BUFFER,this.glTile,this.gl.STATIC_DRAW);
	}
	,upload: function() {
		if(this.mode != openfl__$internal_renderer_opengl_utils_BucketMode.Line) {
			var _g = 0;
			var _g1 = this.fills;
			while(_g < _g1.length) {
				var fill = _g1[_g];
				++_g;
				if(!fill.available) {
					fill.upload();
				}
			}
		}
		var _g2 = 0;
		var _g11 = this.lines;
		while(_g2 < _g11.length) {
			var line = _g11[_g2];
			++_g2;
			if(!line.available) {
				line.upload();
			}
		}
		this.dirty = false;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLBucket
};
var openfl__$internal_renderer_opengl_utils_GLBucketData = function(gl) {
	this.available = false;
	this.rawIndices = false;
	this.stride = 0;
	this.rawVerts = false;
	this.lastVertsSize = 0;
	this.glStart = 0;
	this.glLength = 0;
	this.gl = gl;
	this.drawMode = gl.TRIANGLE_STRIP;
	this.verts = [];
	this.indices = [];
	this.vertexArray = new openfl__$internal_renderer_opengl_utils_VertexArray([]);
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLBucketData"] = openfl__$internal_renderer_opengl_utils_GLBucketData;
openfl__$internal_renderer_opengl_utils_GLBucketData.__name__ = ["openfl","_internal","renderer","opengl","utils","GLBucketData"];
openfl__$internal_renderer_opengl_utils_GLBucketData.prototype = {
	reset: function() {
		this.available = true;
		this.verts = [];
		this.indices = [];
		this.glLength = 0;
		this.glStart = 0;
		this.stride = 0;
		this.rawVerts = false;
		this.rawIndices = false;
		this.drawMode = this.gl.TRIANGLE_STRIP;
	}
	,upload: function() {
		if(this.rawVerts && this.glVerts != null && this.glVerts.length > 0 || this.verts.length > 0) {
			if(!this.rawVerts) {
				var array = this.verts;
				var this1;
				if(array != null) {
					this1 = new Float32Array(array);
				} else {
					this1 = null;
				}
				this.glVerts = this1;
			}
			this.vertexArray.buffer = this.glVerts.buffer;
			if(this.glVerts.length <= this.lastVertsSize) {
				var _this = this.vertexArray;
				_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
				var end = this.glLength * this.stride;
				if(this.glLength > 0 && this.lastVertsSize > end) {
					var view = this.glVerts.subarray(0,end);
					this.vertexArray.upload(view);
				} else {
					this.vertexArray.upload(this.glVerts);
				}
			} else {
				this.vertexArray.setContext(this.gl,this.glVerts);
				this.lastVertsSize = this.glVerts.length;
			}
		}
		if(this.glLength == 0 && (this.rawIndices && this.glIndices != null && this.glIndices.length > 0 || this.indices.length > 0)) {
			if(this.indexBuffer == null) {
				this.indexBuffer = this.gl.createBuffer();
			}
			if(!this.rawIndices) {
				var array1 = this.indices;
				var this2;
				if(array1 != null) {
					this2 = new Uint16Array(array1);
				} else {
					this2 = null;
				}
				this.glIndices = this2;
			}
			this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
			this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.glIndices,this.gl.STREAM_DRAW);
		}
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLBucketData
};
var openfl__$internal_renderer_opengl_utils_BucketMode = $hxClasses["openfl._internal.renderer.opengl.utils.BucketMode"] = { __ename__ : ["openfl","_internal","renderer","opengl","utils","BucketMode"], __constructs__ : ["None","Fill","PatternFill","Line","PatternLine","DrawTriangles","DrawTiles"] };
openfl__$internal_renderer_opengl_utils_BucketMode.None = ["None",0];
openfl__$internal_renderer_opengl_utils_BucketMode.None.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.None.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.Fill = ["Fill",1];
openfl__$internal_renderer_opengl_utils_BucketMode.Fill.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.Fill.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill = ["PatternFill",2];
openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.PatternFill.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.Line = ["Line",3];
openfl__$internal_renderer_opengl_utils_BucketMode.Line.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.Line.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.PatternLine = ["PatternLine",4];
openfl__$internal_renderer_opengl_utils_BucketMode.PatternLine.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.PatternLine.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTriangles = ["DrawTriangles",5];
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTriangles.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTriangles.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTiles = ["DrawTiles",6];
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTiles.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketMode.DrawTiles.__enum__ = openfl__$internal_renderer_opengl_utils_BucketMode;
var openfl__$internal_renderer_opengl_utils_BucketDataType = $hxClasses["openfl._internal.renderer.opengl.utils.BucketDataType"] = { __ename__ : ["openfl","_internal","renderer","opengl","utils","BucketDataType"], __constructs__ : ["Line","Fill"] };
openfl__$internal_renderer_opengl_utils_BucketDataType.Line = ["Line",0];
openfl__$internal_renderer_opengl_utils_BucketDataType.Line.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketDataType.Line.__enum__ = openfl__$internal_renderer_opengl_utils_BucketDataType;
openfl__$internal_renderer_opengl_utils_BucketDataType.Fill = ["Fill",1];
openfl__$internal_renderer_opengl_utils_BucketDataType.Fill.toString = $estr;
openfl__$internal_renderer_opengl_utils_BucketDataType.Fill.__enum__ = openfl__$internal_renderer_opengl_utils_BucketDataType;
var openfl__$internal_renderer_opengl_utils_GLGraphicsData = function(gl) {
	this.indices = [];
	this.data = [];
	this.lastIndex = 0;
	this.mode = 0;
	this.dirty = true;
	this.alpha = 1.0;
	this.tint = [1.0,1.0,1.0];
	this.gl = gl;
	this.dataBuffer = gl.createBuffer();
	this.indexBuffer = gl.createBuffer();
};
$hxClasses["openfl._internal.renderer.opengl.utils.GLGraphicsData"] = openfl__$internal_renderer_opengl_utils_GLGraphicsData;
openfl__$internal_renderer_opengl_utils_GLGraphicsData.__name__ = ["openfl","_internal","renderer","opengl","utils","GLGraphicsData"];
openfl__$internal_renderer_opengl_utils_GLGraphicsData.prototype = {
	reset: function() {
		this.data = [];
		this.indices = [];
		this.lastIndex = 0;
	}
	,upload: function() {
		var elements = this.data;
		var this1;
		if(elements != null) {
			this1 = new Float32Array(elements);
		} else {
			this1 = null;
		}
		this.glData = this1;
		this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.dataBuffer);
		this.gl.bufferData(this.gl.ARRAY_BUFFER,this.glData,this.gl.STATIC_DRAW);
		var elements1 = this.indices;
		var this2;
		if(elements1 != null) {
			this2 = new Uint16Array(elements1);
		} else {
			this2 = null;
		}
		this.glIndices = this2;
		this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
		this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.glIndices,this.gl.STATIC_DRAW);
		this.dirty = false;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_GLGraphicsData
};
var openfl__$internal_renderer_opengl_utils_GraphicType = $hxClasses["openfl._internal.renderer.opengl.utils.GraphicType"] = { __ename__ : ["openfl","_internal","renderer","opengl","utils","GraphicType"], __constructs__ : ["Polygon","Rectangle","Circle","Ellipse","DrawTriangles","DrawTiles","OverrideMatrix"] };
openfl__$internal_renderer_opengl_utils_GraphicType.Polygon = ["Polygon",0];
openfl__$internal_renderer_opengl_utils_GraphicType.Polygon.toString = $estr;
openfl__$internal_renderer_opengl_utils_GraphicType.Polygon.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType;
openfl__$internal_renderer_opengl_utils_GraphicType.Rectangle = function(rounded) { var $x = ["Rectangle",1,rounded]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_GraphicType.Circle = ["Circle",2];
openfl__$internal_renderer_opengl_utils_GraphicType.Circle.toString = $estr;
openfl__$internal_renderer_opengl_utils_GraphicType.Circle.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType;
openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse = ["Ellipse",3];
openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse.toString = $estr;
openfl__$internal_renderer_opengl_utils_GraphicType.Ellipse.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType;
openfl__$internal_renderer_opengl_utils_GraphicType.DrawTriangles = function(vertices,indices,uvtData,culling,colors,blendMode) { var $x = ["DrawTriangles",4,vertices,indices,uvtData,culling,colors,blendMode]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_GraphicType.DrawTiles = function(sheet,tileData,smooth,flags,shader,count) { var $x = ["DrawTiles",5,sheet,tileData,smooth,flags,shader,count]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType; $x.toString = $estr; return $x; };
openfl__$internal_renderer_opengl_utils_GraphicType.OverrideMatrix = function(matrix) { var $x = ["OverrideMatrix",6,matrix]; $x.__enum__ = openfl__$internal_renderer_opengl_utils_GraphicType; $x.toString = $estr; return $x; };
var openfl__$internal_renderer_opengl_utils_PingPongTexture = function(gl,width,height,smoothing,powerOfTwo) {
	if(powerOfTwo == null) {
		powerOfTwo = true;
	}
	if(smoothing == null) {
		smoothing = true;
	}
	this.__swapped = false;
	this.powerOfTwo = true;
	this.useOldTexture = false;
	this.gl = gl;
	this.width = width;
	this.height = height;
	this.smoothing = smoothing;
	this.powerOfTwo = powerOfTwo;
	var v = new openfl__$internal_renderer_opengl_utils_RenderTexture(gl,width,height,smoothing,powerOfTwo);
	if(this.__swapped) {
		this.__texture1 = v;
	} else {
		this.__texture0 = v;
	}
};
$hxClasses["openfl._internal.renderer.opengl.utils.PingPongTexture"] = openfl__$internal_renderer_opengl_utils_PingPongTexture;
openfl__$internal_renderer_opengl_utils_PingPongTexture.__name__ = ["openfl","_internal","renderer","opengl","utils","PingPongTexture"];
openfl__$internal_renderer_opengl_utils_PingPongTexture.prototype = {
	swap: function() {
		this.__swapped = !this.__swapped;
		if((this.__swapped ? this.__texture1 : this.__texture0) == null) {
			var v = new openfl__$internal_renderer_opengl_utils_RenderTexture(this.gl,this.width,this.height,this.smoothing,this.powerOfTwo);
			if(this.__swapped) {
				this.__texture1 = v;
			} else {
				this.__texture0 = v;
			}
		}
	}
	,clear: function(r,g,b,a,mask) {
		if(a == null) {
			a = 0;
		}
		if(b == null) {
			b = 0;
		}
		if(g == null) {
			g = 0;
		}
		if(r == null) {
			r = 0;
		}
		(this.__swapped ? this.__texture1 : this.__texture0).clear(r,g,b,a,mask);
	}
	,resize: function(width,height) {
		this.width = width;
		this.height = height;
		(this.__swapped ? this.__texture1 : this.__texture0).resize(width,height);
	}
	,destroy: function() {
		if(this.__texture0 != null) {
			this.__texture0.destroy();
			this.__texture0 = null;
		}
		if(this.__texture1 != null) {
			this.__texture1.destroy();
			this.__texture1 = null;
		}
		this.__swapped = false;
	}
	,get_renderTexture: function() {
		if(this.__swapped) {
			return this.__texture1;
		} else {
			return this.__texture0;
		}
	}
	,set_renderTexture: function(v) {
		if(this.__swapped) {
			return this.__texture1 = v;
		} else {
			return this.__texture0 = v;
		}
	}
	,get_oldRenderTexture: function() {
		if(this.__swapped) {
			return this.__texture0;
		} else {
			return this.__texture1;
		}
	}
	,set_oldRenderTexture: function(v) {
		if(this.__swapped) {
			return this.__texture0 = v;
		} else {
			return this.__texture1 = v;
		}
	}
	,get_framebuffer: function() {
		return (this.__swapped ? this.__texture1 : this.__texture0).frameBuffer;
	}
	,get_texture: function() {
		if(this.useOldTexture) {
			return (this.__swapped ? this.__texture0 : this.__texture1).texture;
		} else {
			return (this.__swapped ? this.__texture1 : this.__texture0).texture;
		}
	}
	,get___otherTexture: function() {
		if(this.__swapped) {
			return this.__texture0;
		} else {
			return this.__texture1;
		}
	}
	,__class__: openfl__$internal_renderer_opengl_utils_PingPongTexture
	,__properties__: {get___otherTexture:"get___otherTexture",get_texture:"get_texture",get_framebuffer:"get_framebuffer",set_oldRenderTexture:"set_oldRenderTexture",get_oldRenderTexture:"get_oldRenderTexture",set_renderTexture:"set_renderTexture",get_renderTexture:"get_renderTexture"}
};
var openfl__$internal_renderer_opengl_utils_RenderTexture = function(gl,width,height,smoothing,powerOfTwo) {
	if(powerOfTwo == null) {
		powerOfTwo = true;
	}
	if(smoothing == null) {
		smoothing = true;
	}
	this.powerOfTwo = true;
	this.gl = gl;
	this.powerOfTwo = powerOfTwo;
	this.frameBuffer = gl.createFramebuffer();
	this.texture = gl.createTexture();
	gl.bindTexture(gl.TEXTURE_2D,this.texture);
	gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,smoothing ? gl.LINEAR : gl.NEAREST);
	gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,smoothing ? gl.LINEAR : gl.NEAREST);
	gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);
	gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);
	gl.bindFramebuffer(gl.FRAMEBUFFER,this.frameBuffer);
	gl.framebufferTexture2D(gl.FRAMEBUFFER,gl.COLOR_ATTACHMENT0,gl.TEXTURE_2D,this.texture,0);
	this.renderBuffer = gl.createRenderbuffer();
	gl.bindRenderbuffer(gl.RENDERBUFFER,this.renderBuffer);
	gl.framebufferRenderbuffer(gl.FRAMEBUFFER,gl.DEPTH_STENCIL_ATTACHMENT,gl.RENDERBUFFER,this.renderBuffer);
	this.resize(width,height);
};
$hxClasses["openfl._internal.renderer.opengl.utils.RenderTexture"] = openfl__$internal_renderer_opengl_utils_RenderTexture;
openfl__$internal_renderer_opengl_utils_RenderTexture.__name__ = ["openfl","_internal","renderer","opengl","utils","RenderTexture"];
openfl__$internal_renderer_opengl_utils_RenderTexture.prototype = {
	clear: function(r,g,b,a,mask) {
		if(a == null) {
			a = 0;
		}
		if(b == null) {
			b = 0;
		}
		if(g == null) {
			g = 0;
		}
		if(r == null) {
			r = 0;
		}
		this.gl.clearColor(r,g,b,a);
		this.gl.clear(mask == null ? this.gl.COLOR_BUFFER_BIT : mask);
	}
	,destroy: function() {
		if(this.frameBuffer != null) {
			this.gl.deleteFramebuffer(this.frameBuffer);
		}
		if(this.texture != null) {
			this.gl.deleteTexture(this.texture);
		}
		this.frameBuffer = null;
		this.texture = null;
	}
	,resize: function(width,height) {
		if(this.width == width && this.height == height) {
			return;
		}
		this.width = width;
		this.height = height;
		var pow2W = width;
		var pow2H = height;
		if(this.powerOfTwo) {
			var n = 1;
			while(n < width) n <<= 1;
			pow2W = n;
			var n1 = 1;
			while(n1 < height) n1 <<= 1;
			pow2H = n1;
		}
		var lastW = this.__width;
		var lastH = this.__height;
		this.__width = pow2W;
		this.__height = pow2H;
		this.createUVs();
		if(lastW == pow2W && lastH == pow2H) {
			return;
		}
		this.gl.bindTexture(this.gl.TEXTURE_2D,this.texture);
		this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.__width,this.__height,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null);
		this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this.renderBuffer);
		this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_STENCIL,this.__width,this.__height);
	}
	,createUVs: function() {
		if(this.__uvData == null) {
			this.__uvData = new openfl_display_TextureUvs();
		}
		var w = this.width / this.__width;
		var h = this.height / this.__height;
		this.__uvData.x0 = 0;
		this.__uvData.y0 = 0;
		this.__uvData.x1 = w;
		this.__uvData.y1 = 0;
		this.__uvData.x2 = w;
		this.__uvData.y2 = h;
		this.__uvData.x3 = 0;
		this.__uvData.y3 = h;
	}
	,powOfTwo: function(value) {
		var n = 1;
		while(n < value) n <<= 1;
		return n;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_RenderTexture
};
var openfl__$internal_renderer_opengl_utils_ShaderManager = function(gl) {
	this.setContext(gl);
};
$hxClasses["openfl._internal.renderer.opengl.utils.ShaderManager"] = openfl__$internal_renderer_opengl_utils_ShaderManager;
openfl__$internal_renderer_opengl_utils_ShaderManager.__name__ = ["openfl","_internal","renderer","opengl","utils","ShaderManager"];
openfl__$internal_renderer_opengl_utils_ShaderManager.prototype = {
	setContext: function(gl) {
		this.gl = gl;
		this.defaultShader = new openfl__$internal_renderer_opengl_shaders2_DefaultShader(gl);
		this.fillShader = new openfl__$internal_renderer_opengl_shaders2_FillShader(gl);
		this.patternFillShader = new openfl__$internal_renderer_opengl_shaders2_PatternFillShader(gl);
		this.drawTrianglesShader = new openfl__$internal_renderer_opengl_shaders2_DrawTrianglesShader(gl);
		this.primitiveShader = new openfl__$internal_renderer_opengl_shaders2_PrimitiveShader(gl);
		this.setShader(this.defaultShader,true);
	}
	,destroy: function() {
		this.defaultShader.destroy();
		this.fillShader.destroy();
		this.patternFillShader.destroy();
		this.drawTrianglesShader.destroy();
		this.primitiveShader.destroy();
		this.gl = null;
	}
	,setShader: function(shader,force) {
		if(force == null) {
			force = false;
		}
		if(shader == null) {
			this.currentShader = null;
			this.gl.useProgram(null);
			return true;
		}
		if(this.currentShader != null && !force && this.currentShader.ID == shader.ID) {
			return false;
		}
		this.currentShader = shader;
		this.gl.useProgram(shader.program);
		return true;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_ShaderManager
};
var openfl__$internal_renderer_opengl_utils_SpriteBatch = function(gl,maxSprites) {
	if(maxSprites == null) {
		maxSprites = 2000;
	}
	this.colorTransform = new openfl_geom_ColorTransform();
	this.uvs = new openfl_display_TextureUvs();
	this.matrix = new openfl_geom_Matrix();
	this.lastEnableColor = true;
	this.enableColor = true;
	this.attributes = [];
	this.writtenVertexBytes = 0;
	this.drawing = false;
	this.dirty = true;
	this.states = [];
	this.maxSprites = maxSprites;
	this.attributes.push(new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aPosition"));
	this.attributes.push(new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aTexCoord0"));
	this.attributes.push(new openfl__$internal_renderer_opengl_utils_VertexAttribute(4,5121,true,"openfl_aColor"));
	var array = [1,1,1,1];
	var this1;
	if(array != null) {
		this1 = new Float32Array(array);
	} else {
		this1 = null;
	}
	this.attributes[2].defaultValue = this1;
	this.maxElementsPerVertex = 0;
	var _g = 0;
	var _g1 = this.attributes;
	while(_g < _g1.length) {
		var a = _g1[_g];
		++_g;
		var tmp = this;
		var tmp1 = tmp.maxElementsPerVertex;
		var tmp2;
		switch(a.type) {
		case 5120:case 5121:
			tmp2 = 1;
			break;
		case 5122:case 5123:
			tmp2 = 2;
			break;
		default:
			tmp2 = 4;
		}
		tmp.maxElementsPerVertex = tmp1 + Math.floor(a.components * tmp2 / 4);
	}
	this.vertexArraySize = maxSprites * this.maxElementsPerVertex * 4 * 4;
	this.indexArraySize = maxSprites * 6;
	this.vertexArray = new openfl__$internal_renderer_opengl_utils_VertexArray(this.attributes,this.vertexArraySize,false);
	var buffer = this.vertexArray.buffer;
	var this2;
	if(buffer != null) {
		this2 = new Float32Array(buffer,0);
	} else {
		this2 = null;
	}
	this.positions = this2;
	var buffer1 = this.vertexArray.buffer;
	var this3;
	if(buffer1 != null) {
		this3 = new Uint32Array(buffer1,0);
	} else {
		this3 = null;
	}
	this.colors = this3;
	var elements = this.indexArraySize;
	var this4;
	if(elements != null) {
		this4 = new Uint16Array(elements);
	} else {
		this4 = null;
	}
	this.indices = this4;
	var i = 0;
	var j = 0;
	while(i < this.indexArraySize) {
		this.indices[i] = j;
		this.indices[i + 1] = j + 1;
		this.indices[i + 2] = j + 2;
		this.indices[i + 3] = j;
		this.indices[i + 4] = j + 2;
		this.indices[i + 5] = j + 3;
		i += 6;
		j += 4;
	}
	this.currentState = new openfl__$internal_renderer_opengl_utils__$SpriteBatch_State();
	this.dirty = true;
	this.drawing = false;
	this.batchedSprites = 0;
	this.setContext(gl);
};
$hxClasses["openfl._internal.renderer.opengl.utils.SpriteBatch"] = openfl__$internal_renderer_opengl_utils_SpriteBatch;
openfl__$internal_renderer_opengl_utils_SpriteBatch.__name__ = ["openfl","_internal","renderer","opengl","utils","SpriteBatch"];
openfl__$internal_renderer_opengl_utils_SpriteBatch.prototype = {
	destroy: function() {
		this.vertexArray.destroy();
		this.vertexArray = null;
		this.indices = null;
		this.gl.deleteBuffer(this.indexBuffer);
		this.currentState.destroy();
		var _g = 0;
		var _g1 = this.states;
		while(_g < _g1.length) {
			var state = _g1[_g];
			++_g;
			state.destroy();
		}
		this.colorTransform = null;
		this.gl = null;
	}
	,begin: function(renderSession,clipRect) {
		this.renderSession = renderSession;
		this.shader = renderSession.shaderManager.defaultShader;
		this.drawing = true;
		this.start(clipRect);
	}
	,finish: function() {
		this.stop();
		this.clipRect = null;
		this.drawing = false;
	}
	,start: function(clipRect) {
		if(!this.drawing) {
			this.stop();
		}
		this.dirty = true;
		this.clipRect = clipRect;
	}
	,stop: function() {
		this.flush();
	}
	,renderBitmapData: function(bitmapData,smoothing,matrix,ct,alpha,blendMode,flashShader,pixelSnapping,bgra) {
		if(bgra == null) {
			bgra = false;
		}
		if(alpha == null) {
			alpha = 1;
		}
		if(bitmapData == null) {
			return;
		}
		var texture = bitmapData.getTexture(this.gl);
		if(this.batchedSprites >= this.maxSprites) {
			this.flush();
		}
		var uvs = bitmapData.__uvData;
		if(uvs == null) {
			return;
		}
		if(flashShader != null) {
			flashShader.__init(this.gl);
			flashShader.__shader.wrapS = flashShader.repeatX;
			flashShader.__shader.wrapT = flashShader.repeatY;
			flashShader.__shader.smooth = flashShader.smooth;
			flashShader.__shader.blendMode = flashShader.blendMode;
			var objSize = flashShader.data.get(openfl_display_Shader.uObjectSize);
			var texSize = flashShader.data.get(openfl_display_Shader.uTextureSize);
			if(bitmapData != null) {
				objSize.value[0] = bitmapData.width;
				objSize.value[1] = bitmapData.height;
				if(bitmapData.__pingPongTexture != null) {
					var _this = bitmapData.__pingPongTexture;
					texSize.value[0] = (_this.__swapped ? _this.__texture1 : _this.__texture0).__width;
					var _this1 = bitmapData.__pingPongTexture;
					texSize.value[1] = (_this1.__swapped ? _this1.__texture1 : _this1.__texture0).__height;
				} else {
					texSize.value[0] = bitmapData.width;
					texSize.value[1] = bitmapData.height;
				}
			} else {
				objSize.value[0] = 0;
				objSize.value[1] = 0;
				texSize.value[0] = 0;
				texSize.value[1] = 0;
			}
		}
		var color = ((alpha * 255 | 0) & 255) << 24 | 16777215;
		this.enableColor = true;
		if(this.enableColor != this.lastEnableColor) {
			this.flush();
			this.lastEnableColor = this.enableColor;
		}
		this.attributes[2].enabled = this.lastEnableColor;
		var r = 0;
		var _g = 0;
		var _g1 = this.attributes;
		while(_g < _g1.length) {
			var a = _g1[_g];
			++_g;
			if(a.enabled) {
				var r1;
				switch(a.type) {
				case 5120:case 5121:
					r1 = 1;
					break;
				case 5122:case 5123:
					r1 = 2;
					break;
				default:
					r1 = 4;
				}
				r += Math.floor(a.components * r1 / 4);
			}
		}
		this.elementsPerVertex = r;
		var index = this.batchedSprites * 4 * this.elementsPerVertex;
		var width = bitmapData.width;
		var height = bitmapData.height;
		var a1 = matrix.a;
		var b = matrix.b;
		var c = matrix.c;
		var d = matrix.d;
		var tx = matrix.tx;
		var ty = matrix.ty;
		if(pixelSnapping == null || pixelSnapping == 2) {
			this.positions[index] = tx;
			this.positions[index + 1] = ty;
			this.positions[index + 5] = a1 * width + tx;
			this.positions[index + 6] = b * width + ty;
			this.positions[index + 10] = a1 * width + c * height + tx;
			this.positions[index + 11] = d * height + b * width + ty;
			this.positions[index + 15] = c * height + tx;
			this.positions[index + 16] = d * height + ty;
		} else {
			this.positions[index] = Math.round(tx);
			this.positions[index + 1] = Math.round(ty);
			this.positions[index + 5] = Math.round(a1 * width + tx);
			this.positions[index + 6] = Math.round(b * width + ty);
			this.positions[index + 10] = Math.round(a1 * width + c * height + tx);
			this.positions[index + 11] = Math.round(d * height + b * width + ty);
			this.positions[index + 15] = Math.round(c * height + tx);
			this.positions[index + 16] = Math.round(d * height + ty);
		}
		if(this.enableColor) {
			var val = this.colors[index + 19] = color;
			var val1 = this.colors[index + 14] = val;
			var val2 = this.colors[index + 9] = val1;
			this.colors[index + 4] = val2;
		}
		this.positions[index + 2] = uvs.x0;
		this.positions[index + 3] = uvs.y0;
		this.positions[index + 7] = uvs.x1;
		this.positions[index + 8] = uvs.y1;
		this.positions[index + 12] = uvs.x2;
		this.positions[index + 13] = uvs.y2;
		this.positions[index + 17] = uvs.x3;
		this.positions[index + 18] = uvs.y3;
		this.writtenVertexBytes = index + 20;
		var index1 = this.batchedSprites;
		var state = this.states[index1];
		if(state == null) {
			state = this.states[index1] = new openfl__$internal_renderer_opengl_utils__$SpriteBatch_State();
		}
		state.texture = texture;
		state.textureSmooth = smoothing;
		state.blendMode = blendMode;
		state.skipColorTransform = ct != null && ct.__isDefault();
		if(!state.skipColorTransform) {
			state.colorTransform.redMultiplier = ct.redMultiplier;
			state.colorTransform.greenMultiplier = ct.greenMultiplier;
			state.colorTransform.blueMultiplier = ct.blueMultiplier;
			state.colorTransform.alphaMultiplier = ct.alphaMultiplier;
			state.colorTransform.redOffset = ct.redOffset;
			state.colorTransform.greenOffset = ct.greenOffset;
			state.colorTransform.blueOffset = ct.blueOffset;
			state.colorTransform.alphaOffset = ct.alphaOffset;
		}
		state.skipColorTransformAlpha = true;
		if(flashShader == null) {
			state.shader = null;
			state.shaderData = null;
		} else {
			state.shader = flashShader.__shader;
			state.shaderData = flashShader.data;
		}
		this.batchedSprites++;
	}
	,renderTiles: function(object,sheet,tileData,smooth,flags,flashShader,count) {
		if(count == null) {
			count = -1;
		}
		if(flags == null) {
			flags = 0;
		}
		if(smooth == null) {
			smooth = false;
		}
		var texture = sheet.__bitmap.getTexture(this.gl);
		if(texture == null) {
			return;
		}
		var useScale = (flags & 1) > 0;
		var useRotation = (flags & 2) > 0;
		var useTransform = (flags & 16) > 0;
		var useRGB = (flags & 4) > 0;
		var useAlpha = (flags & 8) > 0;
		var useRect = (flags & 32) > 0;
		var useOrigin = (flags & 64) > 0;
		var useRGBOffset = (flags & 128) > 0;
		var blendMode;
		switch(flags & 983040) {
		case 65536:
			blendMode = 0;
			break;
		case 131072:
			blendMode = 9;
			break;
		case 262144:
			blendMode = 12;
			break;
		case 524288:
			blendMode = 14;
			break;
		default:
			switch(flags & 15728640) {
			case 1048576:
				blendMode = 2;
				break;
			case 2097152:
				blendMode = 8;
				break;
			case 4194304:
				blendMode = 11;
				break;
			case 8388608:
				blendMode = 5;
				break;
			default:
				switch(flags & 251658240) {
				case 16777216:
					blendMode = 3;
					break;
				case 33554432:
					blendMode = 6;
					break;
				default:
					blendMode = 10;
				}
			}
		}
		if(useTransform) {
			useScale = false;
			useRotation = false;
		}
		var scaleIndex = 0;
		var rotationIndex = 0;
		var rgbIndex = 0;
		var rgbOffsetIndex = 0;
		var alphaIndex = 0;
		var transformIndex = 0;
		var numValues = 3;
		if(useRect) {
			if(useOrigin) {
				numValues = 8;
			} else {
				numValues = 6;
			}
		}
		if(useScale) {
			scaleIndex = numValues;
			++numValues;
		}
		if(useRotation) {
			rotationIndex = numValues;
			++numValues;
		}
		if(useTransform) {
			transformIndex = numValues;
			numValues += 4;
		}
		if(useRGB) {
			rgbIndex = numValues;
			numValues += 3;
		}
		if(useAlpha) {
			alphaIndex = numValues;
			++numValues;
		}
		if(useRGBOffset) {
			rgbOffsetIndex = numValues;
			numValues += 4;
		}
		var totalCount = tileData.length;
		if(count >= 0 && totalCount > count) {
			totalCount = count;
		}
		var iIndex = 0;
		var tileID = -1;
		var rect = sheet.__rectTile;
		var tileUV = sheet.__rectUV;
		var center = sheet.__point;
		var x = 0.0;
		var y = 0.0;
		var alpha = 1.0;
		var tint = 16777215;
		var scale = 1.0;
		var rotation = 0.0;
		var cosTheta = 1.0;
		var sinTheta = 0.0;
		var a = 0.0;
		var b = 0.0;
		var c = 0.0;
		var d = 0.0;
		var tx = 0.0;
		var ty = 0.0;
		var ox = 0.0;
		var oy = 0.0;
		var oMatrix = object.__worldTransform;
		var bIndex = 0;
		var tMa = 1.0;
		var tMb = 0.0;
		var tMc = 0.0;
		var tMd = 1.0;
		var tMtx = 0.0;
		var tMty = 0.0;
		var oMa = oMatrix.a;
		var oMb = oMatrix.b;
		var oMc = oMatrix.c;
		var oMd = oMatrix.d;
		var oMtx = oMatrix.tx;
		var oMty = oMatrix.ty;
		var rw = 0.0;
		var rh = 0.0;
		var tuvx = 0.0;
		var tuvy = 0.0;
		var tuvw = 0.0;
		var tuvh = 0.0;
		this.enableColor = true;
		if(this.enableColor != this.lastEnableColor) {
			this.flush();
			this.lastEnableColor = this.enableColor;
		}
		this.attributes[2].enabled = this.lastEnableColor;
		var r = 0;
		var _g = 0;
		var _g1 = this.attributes;
		while(_g < _g1.length) {
			var a1 = _g1[_g];
			++_g;
			if(a1.enabled) {
				var r1;
				switch(a1.type) {
				case 5120:case 5121:
					r1 = 1;
					break;
				case 5122:case 5123:
					r1 = 2;
					break;
				default:
					r1 = 4;
				}
				r += Math.floor(a1.components * r1 / 4);
			}
		}
		this.elementsPerVertex = r;
		if(flashShader != null) {
			flashShader.__init(this.gl);
			flashShader.__shader.wrapS = flashShader.repeatX;
			flashShader.__shader.wrapT = flashShader.repeatY;
			flashShader.__shader.smooth = flashShader.smooth;
			flashShader.__shader.blendMode = flashShader.blendMode;
			var objSize = flashShader.data.get(openfl_display_Shader.uObjectSize);
			var texSize = flashShader.data.get(openfl_display_Shader.uTextureSize);
			objSize.value[0] = 0;
			objSize.value[1] = 0;
			texSize.value[0] = 0;
			texSize.value[1] = 0;
		}
		while(iIndex < totalCount) {
			if(this.batchedSprites >= this.maxSprites) {
				this.flush();
			}
			x = tileData[iIndex];
			y = tileData[iIndex + 1];
			if(useRect) {
				tileID = -1;
				rect.x = tileData[iIndex + 2];
				rect.y = tileData[iIndex + 3];
				rect.width = tileData[iIndex + 4];
				rect.height = tileData[iIndex + 5];
				if(useOrigin) {
					center.x = tileData[iIndex + 6];
					center.y = tileData[iIndex + 7];
				} else {
					center.setTo(0,0);
				}
				rw = rect.width;
				rh = rect.height;
				tuvx = rect.get_left() / sheet.__bitmap.width;
				tuvy = rect.get_top() / sheet.__bitmap.height;
				tuvw = rect.get_right() / sheet.__bitmap.width;
				tuvh = rect.get_bottom() / sheet.__bitmap.height;
			} else {
				tileID = (tileData[iIndex + 2] == null ? 0 : tileData[iIndex + 2]) | 0;
				rect = sheet.__tileRects[tileID];
				center = sheet.__centerPoints[tileID];
				tileUV = sheet.__tileUVs[tileID];
				if(rect != null) {
					rw = rect.width;
					rh = rect.height;
					tuvx = tileUV.x;
					tuvy = tileUV.y;
					tuvw = tileUV.width;
					tuvh = tileUV.height;
				}
			}
			if(rect != null && rect.width > 0 && rect.height > 0 && center != null) {
				alpha = 1;
				tint = 16777215;
				scale = 1.0;
				rotation = 0.0;
				cosTheta = 1.0;
				sinTheta = 0.0;
				if(useAlpha) {
					alpha = tileData[iIndex + alphaIndex] * object.__worldAlpha;
				} else {
					alpha = object.__worldAlpha;
				}
				if(useRGB) {
					tint = (tileData[iIndex + rgbIndex] * 255 | 0) << 16 | (tileData[iIndex + rgbIndex + 1] * 255 | 0) << 8 | (tileData[iIndex + rgbIndex + 2] * 255 | 0);
				}
				var wct = object.__worldColorTransform;
				this.colorTransform.redMultiplier = wct.redMultiplier;
				this.colorTransform.greenMultiplier = wct.greenMultiplier;
				this.colorTransform.blueMultiplier = wct.blueMultiplier;
				this.colorTransform.alphaMultiplier = wct.alphaMultiplier;
				this.colorTransform.redOffset = wct.redOffset;
				this.colorTransform.greenOffset = wct.greenOffset;
				this.colorTransform.blueOffset = wct.blueOffset;
				this.colorTransform.alphaOffset = wct.alphaOffset;
				if(useRGBOffset) {
					this.colorTransform.redOffset += tileData[iIndex + rgbOffsetIndex];
					this.colorTransform.greenOffset += tileData[iIndex + rgbOffsetIndex + 1];
					this.colorTransform.blueOffset += tileData[iIndex + rgbOffsetIndex + 2];
					this.colorTransform.alphaOffset += tileData[iIndex + rgbOffsetIndex + 3];
				}
				if(useScale) {
					scale = tileData[iIndex + scaleIndex];
				}
				if(useRotation) {
					rotation = tileData[iIndex + rotationIndex];
					cosTheta = Math.cos(rotation);
					sinTheta = Math.sin(rotation);
				}
				if(useTransform) {
					a = tileData[iIndex + transformIndex];
					b = tileData[iIndex + transformIndex + 1];
					c = tileData[iIndex + transformIndex + 2];
					d = tileData[iIndex + transformIndex + 3];
				} else {
					a = scale * cosTheta;
					b = scale * sinTheta;
					c = -b;
					d = a;
				}
				ox = center.x * a + center.y * c;
				oy = center.x * b + center.y * d;
				tx = x - ox;
				ty = y - oy;
				tMa = (a * oMa + b * oMc) * rw;
				tMb = (a * oMb + b * oMd) * rw;
				tMc = (c * oMa + d * oMc) * rh;
				tMd = (c * oMb + d * oMd) * rh;
				tMtx = tx * oMa + ty * oMc + oMtx;
				tMty = tx * oMb + ty * oMd + oMty;
				bIndex = this.batchedSprites * 4 * this.elementsPerVertex;
				this.positions[bIndex] = tMtx;
				this.positions[bIndex + 1] = tMty;
				this.positions[bIndex + 5] = tMa + tMtx;
				this.positions[bIndex + 6] = tMb + tMty;
				this.positions[bIndex + 10] = tMa + tMc + tMtx;
				this.positions[bIndex + 11] = tMd + tMb + tMty;
				this.positions[bIndex + 15] = tMc + tMtx;
				this.positions[bIndex + 16] = tMd + tMty;
				var val = this.colors[bIndex + 19] = ((alpha * 255 | 0) & 255) << 24 | tint;
				var val1 = this.colors[bIndex + 14] = val;
				var val2 = this.colors[bIndex + 9] = val1;
				this.colors[bIndex + 4] = val2;
				this.positions[bIndex + 2] = tuvx;
				this.positions[bIndex + 3] = tuvy;
				this.positions[bIndex + 7] = tuvw;
				this.positions[bIndex + 8] = tuvy;
				this.positions[bIndex + 12] = tuvw;
				this.positions[bIndex + 13] = tuvh;
				this.positions[bIndex + 17] = tuvx;
				this.positions[bIndex + 18] = tuvh;
				this.writtenVertexBytes = bIndex + 20;
				var index = this.batchedSprites;
				var colorTransform = this.colorTransform;
				var state = this.states[index];
				if(state == null) {
					state = this.states[index] = new openfl__$internal_renderer_opengl_utils__$SpriteBatch_State();
				}
				state.texture = texture;
				state.textureSmooth = smooth;
				state.blendMode = blendMode;
				state.skipColorTransform = colorTransform != null && colorTransform.__isDefault();
				if(!state.skipColorTransform) {
					state.colorTransform.redMultiplier = colorTransform.redMultiplier;
					state.colorTransform.greenMultiplier = colorTransform.greenMultiplier;
					state.colorTransform.blueMultiplier = colorTransform.blueMultiplier;
					state.colorTransform.alphaMultiplier = colorTransform.alphaMultiplier;
					state.colorTransform.redOffset = colorTransform.redOffset;
					state.colorTransform.greenOffset = colorTransform.greenOffset;
					state.colorTransform.blueOffset = colorTransform.blueOffset;
					state.colorTransform.alphaOffset = colorTransform.alphaOffset;
				}
				state.skipColorTransformAlpha = false;
				if(flashShader == null) {
					state.shader = null;
					state.shaderData = null;
				} else {
					state.shader = flashShader.__shader;
					state.shaderData = flashShader.data;
				}
				this.batchedSprites++;
			}
			iIndex += numValues;
		}
	}
	,fillVertices: function(index,width,height,matrix,uvs,color,pixelSnapping) {
		if(color == null) {
			color = -1;
		}
		var a = matrix.a;
		var b = matrix.b;
		var c = matrix.c;
		var d = matrix.d;
		var tx = matrix.tx;
		var ty = matrix.ty;
		if(pixelSnapping == null || pixelSnapping == 2) {
			this.positions[index] = tx;
			this.positions[index + 1] = ty;
			this.positions[index + 5] = a * width + tx;
			this.positions[index + 6] = b * width + ty;
			this.positions[index + 10] = a * width + c * height + tx;
			this.positions[index + 11] = d * height + b * width + ty;
			this.positions[index + 15] = c * height + tx;
			this.positions[index + 16] = d * height + ty;
		} else {
			this.positions[index] = Math.round(tx);
			this.positions[index + 1] = Math.round(ty);
			this.positions[index + 5] = Math.round(a * width + tx);
			this.positions[index + 6] = Math.round(b * width + ty);
			this.positions[index + 10] = Math.round(a * width + c * height + tx);
			this.positions[index + 11] = Math.round(d * height + b * width + ty);
			this.positions[index + 15] = Math.round(c * height + tx);
			this.positions[index + 16] = Math.round(d * height + ty);
		}
		if(this.enableColor) {
			var val = this.colors[index + 19] = color;
			var val1 = this.colors[index + 14] = val;
			var val2 = this.colors[index + 9] = val1;
			this.colors[index + 4] = val2;
		}
		this.positions[index + 2] = uvs.x0;
		this.positions[index + 3] = uvs.y0;
		this.positions[index + 7] = uvs.x1;
		this.positions[index + 8] = uvs.y1;
		this.positions[index + 12] = uvs.x2;
		this.positions[index + 13] = uvs.y2;
		this.positions[index + 17] = uvs.x3;
		this.positions[index + 18] = uvs.y3;
		this.writtenVertexBytes = index + 20;
	}
	,enableAttributes: function(color) {
		if(color == null) {
			color = -1;
		}
		this.enableColor = color != -1;
		if(this.enableColor != this.lastEnableColor) {
			this.flush();
			this.lastEnableColor = this.enableColor;
		}
		this.attributes[2].enabled = this.lastEnableColor;
		var r = 0;
		var _g = 0;
		var _g1 = this.attributes;
		while(_g < _g1.length) {
			var a = _g1[_g];
			++_g;
			if(a.enabled) {
				var r1;
				switch(a.type) {
				case 5120:case 5121:
					r1 = 1;
					break;
				case 5122:case 5123:
					r1 = 2;
					break;
				default:
					r1 = 4;
				}
				r += Math.floor(a.components * r1 / 4);
			}
		}
		this.elementsPerVertex = r;
	}
	,flush: function() {
		if(this.batchedSprites == 0) {
			return;
		}
		if(this.clipRect != null) {
			this.gl.enable(this.gl.SCISSOR_TEST);
			this.gl.scissor(Math.floor(this.clipRect.x),Math.floor(this.clipRect.y),Math.ceil(this.clipRect.width),Math.ceil(this.clipRect.height));
		}
		if(this.dirty) {
			this.dirty = false;
			this.renderSession.activeTextures = 1;
			var _this = this.vertexArray;
			_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
			this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
		}
		if(this.writtenVertexBytes > this.vertexArraySize * 0.5) {
			this.vertexArray.upload(this.positions);
		} else {
			var view = this.positions.subarray(0,this.writtenVertexBytes);
			this.vertexArray.upload(view);
		}
		var nextState;
		var batchSize = 0;
		var start = 0;
		this.currentState.shader = null;
		this.currentState.shaderData = null;
		this.currentState.texture = null;
		this.currentState.textureSmooth = false;
		this.currentState.blendMode = this.renderSession.blendModeManager.currentBlendMode;
		this.currentState.colorTransform = null;
		this.currentState.skipColorTransformAlpha = false;
		var _g1 = 0;
		var _g = this.batchedSprites;
		while(_g1 < _g) {
			var i = _g1++;
			nextState = this.states[i];
			this.currentState.skipColorTransformAlpha = nextState.skipColorTransformAlpha;
			var other = this.currentState;
			if(!((nextState.shader == null && other.shader == null || nextState.shader != null && other.shader != null && nextState.shader.ID == other.shader.ID) && nextState.texture == other.texture && nextState.textureSmooth == other.textureSmooth && nextState.blendMode == other.blendMode && (nextState.skipColorTransform && other.skipColorTransform || !nextState.skipColorTransform && !other.skipColorTransform && nextState.colorTransform.__equals(other.colorTransform,nextState.skipColorTransformAlpha)))) {
				this.renderBatch(this.currentState,batchSize,start);
				start = i;
				batchSize = 0;
				this.currentState.shader = nextState.shader;
				this.currentState.shaderData = nextState.shaderData;
				this.currentState.texture = nextState.texture;
				this.currentState.textureSmooth = nextState.textureSmooth;
				this.currentState.blendMode = nextState.blendMode;
				this.currentState.skipColorTransform = nextState.skipColorTransform;
				this.currentState.colorTransform = this.currentState.skipColorTransform ? null : nextState.colorTransform;
			}
			++batchSize;
		}
		this.renderBatch(this.currentState,batchSize,start);
		this.batchedSprites = 0;
		this.writtenVertexBytes = 0;
		if(this.clipRect != null) {
			this.gl.disable(this.gl.SCISSOR_TEST);
		}
	}
	,renderBatch: function(state,size,start) {
		if(size == 0 || state.texture == null) {
			return;
		}
		var shader = state.shader == null ? this.renderSession.shaderManager.defaultShader : state.shader;
		this.renderSession.shaderManager.setShader(shader);
		shader.bindVertexArray(this.vertexArray);
		this.renderSession.blendModeManager.setBlendMode(shader.blendMode != null ? shader.blendMode : state.blendMode);
		this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uProjectionMatrix"),false,this.renderSession.projectionMatrix.toArray(true));
		if(state.colorTransform != null) {
			this.gl.uniform1i(shader.getUniformLocation("openfl_uUseColorTransform"),1);
			var ct = state.colorTransform;
			this.gl.uniform4f(shader.getUniformLocation("openfl_uColorMultiplier"),ct.redMultiplier,ct.greenMultiplier,ct.blueMultiplier,state.skipColorTransformAlpha ? 1 : ct.alphaMultiplier);
			this.gl.uniform4f(shader.getUniformLocation("openfl_uColorOffset"),ct.redOffset / 255.,ct.greenOffset / 255.,ct.blueOffset / 255.,ct.alphaOffset / 255.);
		} else {
			this.gl.uniform1i(shader.getUniformLocation("openfl_uUseColorTransform"),0);
			this.gl.uniform4f(shader.getUniformLocation("openfl_uColorMultiplier"),1,1,1,1);
			this.gl.uniform4f(shader.getUniformLocation("openfl_uColorOffset"),0,0,0,0);
		}
		this.gl.activeTexture(this.gl.TEXTURE0);
		this.gl.bindTexture(this.gl.TEXTURE_2D,state.texture);
		this.gl.uniform1i(shader.getUniformLocation("openfl_uSampler0"),0);
		if(shader.smooth != null && shader.smooth || state.textureSmooth) {
			this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR);
			this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR);
		} else {
			this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST);
			this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST);
		}
		this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,shader.wrapS);
		this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,shader.wrapT);
		shader.applyData(state.shaderData,this.renderSession);
		this.gl.drawElements(this.gl.TRIANGLES,size * 6,this.gl.UNSIGNED_SHORT,start * 6 * 2);
		this.renderSession.drawCount++;
	}
	,setState: function(index,texture,smooth,blendMode,colorTransform,shader,skipAlpha) {
		if(skipAlpha == null) {
			skipAlpha = false;
		}
		if(smooth == null) {
			smooth = false;
		}
		var state = this.states[index];
		if(state == null) {
			state = this.states[index] = new openfl__$internal_renderer_opengl_utils__$SpriteBatch_State();
		}
		state.texture = texture;
		state.textureSmooth = smooth;
		state.blendMode = blendMode;
		state.skipColorTransform = colorTransform != null && colorTransform.__isDefault();
		if(!state.skipColorTransform) {
			state.colorTransform.redMultiplier = colorTransform.redMultiplier;
			state.colorTransform.greenMultiplier = colorTransform.greenMultiplier;
			state.colorTransform.blueMultiplier = colorTransform.blueMultiplier;
			state.colorTransform.alphaMultiplier = colorTransform.alphaMultiplier;
			state.colorTransform.redOffset = colorTransform.redOffset;
			state.colorTransform.greenOffset = colorTransform.greenOffset;
			state.colorTransform.blueOffset = colorTransform.blueOffset;
			state.colorTransform.alphaOffset = colorTransform.alphaOffset;
		}
		state.skipColorTransformAlpha = skipAlpha;
		if(shader == null) {
			state.shader = null;
			state.shaderData = null;
		} else {
			state.shader = shader.__shader;
			state.shaderData = shader.data;
		}
	}
	,setContext: function(gl) {
		this.gl = gl;
		this.vertexArray.setContext(gl,this.positions);
		this.indexBuffer = gl.createBuffer();
		gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer);
		gl.bufferData(gl.ELEMENT_ARRAY_BUFFER,this.indices,gl.STATIC_DRAW);
	}
	,prepareShader: function(flashShader,bd) {
		if(flashShader != null) {
			flashShader.__init(this.gl);
			flashShader.__shader.wrapS = flashShader.repeatX;
			flashShader.__shader.wrapT = flashShader.repeatY;
			flashShader.__shader.smooth = flashShader.smooth;
			flashShader.__shader.blendMode = flashShader.blendMode;
			var key = openfl_display_Shader.uObjectSize;
			var _this = flashShader.data;
			var objSize = __map_reserved[key] != null ? _this.getReserved(key) : _this.h[key];
			var key1 = openfl_display_Shader.uTextureSize;
			var _this1 = flashShader.data;
			var texSize = __map_reserved[key1] != null ? _this1.getReserved(key1) : _this1.h[key1];
			if(bd != null) {
				objSize.value[0] = bd.width;
				objSize.value[1] = bd.height;
				if(bd.__pingPongTexture != null) {
					var _this2 = bd.__pingPongTexture;
					texSize.value[0] = (_this2.__swapped ? _this2.__texture1 : _this2.__texture0).__width;
					var _this3 = bd.__pingPongTexture;
					texSize.value[1] = (_this3.__swapped ? _this3.__texture1 : _this3.__texture0).__height;
				} else {
					texSize.value[0] = bd.width;
					texSize.value[1] = bd.height;
				}
			} else {
				objSize.value[0] = 0;
				objSize.value[1] = 0;
				texSize.value[0] = 0;
				texSize.value[1] = 0;
			}
		}
	}
	,getElementsPerVertex: function() {
		var r = 0;
		var _g = 0;
		var _g1 = this.attributes;
		while(_g < _g1.length) {
			var a = _g1[_g];
			++_g;
			if(a.enabled) {
				var r1;
				switch(a.type) {
				case 5120:case 5121:
					r1 = 1;
					break;
				case 5122:case 5123:
					r1 = 2;
					break;
				default:
					r1 = 4;
				}
				r += Math.floor(a.components * r1 / 4);
			}
		}
		return r;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_SpriteBatch
};
var openfl__$internal_renderer_opengl_utils__$SpriteBatch_State = function() {
	this.skipColorTransformAlpha = false;
	this.skipColorTransform = false;
	this.colorTransform = new openfl_geom_ColorTransform();
	this.textureSmooth = true;
};
$hxClasses["openfl._internal.renderer.opengl.utils._SpriteBatch.State"] = openfl__$internal_renderer_opengl_utils__$SpriteBatch_State;
openfl__$internal_renderer_opengl_utils__$SpriteBatch_State.__name__ = ["openfl","_internal","renderer","opengl","utils","_SpriteBatch","State"];
openfl__$internal_renderer_opengl_utils__$SpriteBatch_State.prototype = {
	equals: function(other) {
		if((this.shader == null && other.shader == null || this.shader != null && other.shader != null && this.shader.ID == other.shader.ID) && this.texture == other.texture && this.textureSmooth == other.textureSmooth && this.blendMode == other.blendMode) {
			if(!(this.skipColorTransform && other.skipColorTransform)) {
				if(!this.skipColorTransform && !other.skipColorTransform) {
					return this.colorTransform.__equals(other.colorTransform,this.skipColorTransformAlpha);
				} else {
					return false;
				}
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,destroy: function() {
		this.texture = null;
		this.colorTransform = null;
	}
	,__class__: openfl__$internal_renderer_opengl_utils__$SpriteBatch_State
};
var openfl__$internal_renderer_opengl_utils_StencilManager = function(gl) {
	this.stencilMask = 0;
	this.stencilStack = [];
	this.setContext(gl);
	this.reverse = true;
	this.count = 0;
};
$hxClasses["openfl._internal.renderer.opengl.utils.StencilManager"] = openfl__$internal_renderer_opengl_utils_StencilManager;
openfl__$internal_renderer_opengl_utils_StencilManager.__name__ = ["openfl","_internal","renderer","opengl","utils","StencilManager"];
openfl__$internal_renderer_opengl_utils_StencilManager.prototype = {
	prepareGraphics: function(fill,renderSession,translationMatrix) {
		var shader = renderSession.shaderManager.fillShader;
		renderSession.shaderManager.setShader(shader);
		this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix);
		this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uProjectionMatrix"),false,renderSession.projectionMatrix.toArray(true));
		var _this = fill.vertexArray;
		_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
		shader.bindVertexArray(fill.vertexArray);
		this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,fill.indexBuffer);
	}
	,pushBucket: function(bucket,renderSession,translationMatrix,isMask) {
		if(isMask == null) {
			isMask = false;
		}
		if(!isMask) {
			this.gl.enable(this.gl.STENCIL_TEST);
			this.gl.clear(this.gl.STENCIL_BUFFER_BIT);
			this.gl.stencilMask(255);
			this.gl.colorMask(false,false,false,false);
			this.gl.stencilFunc(this.gl.NEVER,1,255);
			this.gl.stencilOp(this.gl.INVERT,this.gl.KEEP,this.gl.KEEP);
			this.gl.clear(this.gl.STENCIL_BUFFER_BIT);
		}
		var _g = 0;
		var _g1 = bucket.fills;
		while(_g < _g1.length) {
			var fill = _g1[_g];
			++_g;
			if(fill.available) {
				continue;
			}
			var shader = renderSession.shaderManager.fillShader;
			renderSession.shaderManager.setShader(shader);
			this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uTranslationMatrix"),false,translationMatrix);
			this.gl.uniformMatrix3fv(shader.getUniformLocation("openfl_uProjectionMatrix"),false,renderSession.projectionMatrix.toArray(true));
			var _this = fill.vertexArray;
			_this.gl.bindBuffer(_this.gl.ARRAY_BUFFER,_this.glBuffer);
			shader.bindVertexArray(fill.vertexArray);
			this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,fill.indexBuffer);
			this.gl.drawElements(fill.drawMode,fill.glIndices.length,this.gl.UNSIGNED_SHORT,0);
		}
		if(!isMask) {
			this.gl.colorMask(true,true,true,renderSession.renderer.transparent);
			this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);
			this.gl.stencilFunc(this.gl.EQUAL,255,255);
		}
	}
	,popBucket: function(object,bucket,renderSession) {
		this.gl.disable(this.gl.STENCIL_TEST);
	}
	,pushMask: function(object,renderSession) {
		var maskGraphics = object.__maskGraphics;
		if(maskGraphics == null || maskGraphics.__commands.get_length() <= 0) {
			return;
		}
		if(this.stencilMask == 0) {
			this.gl.enable(this.gl.STENCIL_TEST);
			this.gl.clear(this.gl.STENCIL_BUFFER_BIT);
		}
		this.stencilMask++;
		if(maskGraphics.__dirty) {
			openfl__$internal_renderer_opengl_utils_GraphicsRenderer.updateGraphics(object,maskGraphics,renderSession.gl);
		}
		var func = this.stencilMask == 1 ? this.gl.NEVER : this.gl.EQUAL;
		var ref = this.stencilMask;
		var mask = 255 - this.stencilMask;
		this.gl.stencilMask(255);
		this.gl.colorMask(false,false,false,false);
		this.gl.stencilFunc(func,ref,mask);
		this.gl.stencilOp(this.gl.REPLACE,this.gl.KEEP,this.gl.KEEP);
		var glStack = maskGraphics.__glStack[openfl__$internal_renderer_opengl_GLRenderer.glContextId];
		var bucket;
		var translationMatrix = object.__worldTransform;
		var _g1 = 0;
		var _g = glStack.buckets.length;
		while(_g1 < _g) {
			bucket = glStack.buckets[_g1++];
			if(bucket.overrideMatrix != null) {
				translationMatrix = bucket.overrideMatrix;
			} else {
				translationMatrix = object.__worldTransform;
			}
			switch(bucket.mode[1]) {
			case 1:case 2:
				this.pushBucket(bucket,renderSession,translationMatrix.toArray(true),true);
				break;
			default:
			}
		}
		this.gl.colorMask(true,true,true,renderSession.renderer.transparent);
		this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);
		this.gl.stencilFunc(this.gl.EQUAL,this.stencilMask,255);
	}
	,popMask: function(object,renderSession) {
		this.stencilMask--;
		if(this.stencilMask <= 0) {
			this.gl.disable(this.gl.STENCIL_TEST);
			this.stencilMask = 0;
		}
	}
	,bindGraphics: function(object,glData,renderSession) {
	}
	,destroy: function() {
		this.stencilStack = null;
		this.gl = null;
	}
	,popStencil: function(object,glData,renderSession) {
		this.stencilStack.pop();
		this.count--;
		if(this.stencilStack.length == 0) {
			this.gl.disable(this.gl.STENCIL_TEST);
		} else {
			var level = this.count;
			this.gl.colorMask(false,false,false,false);
			if(glData.mode == 1) {
				this.reverse = !this.reverse;
				if(this.reverse) {
					this.gl.stencilFunc(this.gl.EQUAL,255 - (level + 1),255);
					this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR);
				} else {
					this.gl.stencilFunc(this.gl.EQUAL,level + 1,255);
					this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR);
				}
				this.gl.drawElements(this.gl.TRIANGLE_FAN,4,this.gl.UNSIGNED_SHORT,(glData.indices.length - 4) * 2);
				this.gl.stencilFunc(this.gl.ALWAYS,0,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INVERT);
				this.gl.drawElements(this.gl.TRIANGLE_FAN,glData.indices.length - 4,this.gl.UNSIGNED_SHORT,0);
				if(!this.reverse) {
					this.gl.stencilFunc(this.gl.EQUAL,255 - level,255);
				} else {
					this.gl.stencilFunc(this.gl.EQUAL,level,255);
				}
			} else {
				if(!this.reverse) {
					this.gl.stencilFunc(this.gl.EQUAL,255 - (level + 1),255);
					this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR);
				} else {
					this.gl.stencilFunc(this.gl.EQUAL,level + 1,255);
					this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR);
				}
				this.gl.drawElements(this.gl.TRIANGLE_STRIP,glData.indices.length,this.gl.UNSIGNED_SHORT,0);
				if(!this.reverse) {
					this.gl.stencilFunc(this.gl.EQUAL,255 - level,255);
				} else {
					this.gl.stencilFunc(this.gl.EQUAL,level,255);
				}
			}
			this.gl.colorMask(true,true,true,true);
			this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);
		}
	}
	,pushStencil: function(object,glData,renderSession) {
		if(this.stencilStack.length == 0) {
			this.gl.enable(this.gl.STENCIL_TEST);
			this.gl.clear(this.gl.STENCIL_BUFFER_BIT);
			this.reverse = true;
			this.count = 0;
		}
		this.stencilStack.push(glData);
		var level = this.count;
		this.gl.colorMask(false,false,false,false);
		this.gl.stencilFunc(this.gl.ALWAYS,0,255);
		this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INVERT);
		if(glData.mode == 1) {
			this.gl.drawElements(this.gl.TRIANGLE_FAN,glData.indices.length - 4,this.gl.UNSIGNED_SHORT,0);
			if(this.reverse) {
				this.gl.stencilFunc(this.gl.EQUAL,255 - level,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR);
			} else {
				this.gl.stencilFunc(this.gl.EQUAL,level,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR);
			}
			this.gl.drawElements(this.gl.TRIANGLE_FAN,4,this.gl.UNSIGNED_SHORT,(glData.indices.length - 4) * 2);
			if(this.reverse) {
				this.gl.stencilFunc(this.gl.EQUAL,255 - (level + 1),255);
			} else {
				this.gl.stencilFunc(this.gl.EQUAL,level + 1,255);
			}
			this.reverse = !this.reverse;
		} else {
			if(!this.reverse) {
				this.gl.stencilFunc(this.gl.EQUAL,255 - level,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR);
			} else {
				this.gl.stencilFunc(this.gl.EQUAL,level,255);
				this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR);
			}
			this.gl.drawElements(this.gl.TRIANGLE_STRIP,glData.indices.length,this.gl.UNSIGNED_SHORT,0);
			if(!this.reverse) {
				this.gl.stencilFunc(this.gl.EQUAL,255 - (level + 1),255);
			} else {
				this.gl.stencilFunc(this.gl.EQUAL,level + 1,255);
			}
		}
		this.gl.colorMask(true,true,true,true);
		this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);
		this.count++;
	}
	,setContext: function(gl) {
		this.gl = gl;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_StencilManager
};
var openfl__$internal_renderer_opengl_utils_VertexArray = function(attributes,size,isStatic) {
	if(isStatic == null) {
		isStatic = false;
	}
	if(size == null) {
		size = 0;
	}
	this.isStatic = false;
	this.size = 0;
	this.attributes = [];
	this.size = size;
	this.attributes = attributes;
	if(size > 0) {
		this.buffer = new ArrayBuffer(size);
	}
	this.isStatic = isStatic;
};
$hxClasses["openfl._internal.renderer.opengl.utils.VertexArray"] = openfl__$internal_renderer_opengl_utils_VertexArray;
openfl__$internal_renderer_opengl_utils_VertexArray.__name__ = ["openfl","_internal","renderer","opengl","utils","VertexArray"];
openfl__$internal_renderer_opengl_utils_VertexArray.prototype = {
	bind: function() {
		this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.glBuffer);
	}
	,unbind: function() {
		this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null);
	}
	,upload: function(view) {
		this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,view);
	}
	,destroy: function() {
		this.gl.deleteBuffer(this.glBuffer);
		this.buffer = null;
	}
	,setContext: function(gl,view) {
		this.gl = gl;
		this.glBuffer = gl.createBuffer();
		gl.bindBuffer(gl.ARRAY_BUFFER,this.glBuffer);
		gl.bufferData(gl.ARRAY_BUFFER,view,this.isStatic ? gl.STATIC_DRAW : gl.DYNAMIC_DRAW);
	}
	,get_stride: function() {
		var s = 0;
		var _g = 0;
		var _g1 = this.attributes;
		while(_g < _g1.length) {
			var a = _g1[_g];
			++_g;
			if(a.enabled) {
				var s1;
				switch(a.type) {
				case 5120:case 5121:
					s1 = 1;
					break;
				case 5122:case 5123:
					s1 = 2;
					break;
				default:
					s1 = 4;
				}
				s += Math.floor(a.components * s1 / 4) * 4;
			}
		}
		return s;
	}
	,__class__: openfl__$internal_renderer_opengl_utils_VertexArray
	,__properties__: {get_stride:"get_stride"}
};
var openfl__$internal_text_TextEngine = function(textField) {
	this.textField = textField;
	this.width = 100;
	this.height = 100;
	this.text = "";
	this.bounds = new openfl_geom_Rectangle(0,0,0,0);
	this.type = 0;
	this.autoSize = 2;
	this.displayAsPassword = false;
	this.embedFonts = false;
	this.selectable = true;
	this.borderColor = 0;
	this.border = false;
	this.backgroundColor = 16777215;
	this.background = false;
	this.gridFitType = 1;
	this.maxChars = 0;
	this.multiline = false;
	this.sharpness = 0;
	this.scrollH = 0;
	this.scrollV = 1;
	this.wordWrap = false;
	this.lineAscents = [];
	this.lineBreaks = [];
	this.lineDescents = [];
	this.lineLeadings = [];
	this.lineHeights = [];
	this.lineWidths = [];
	this.layoutGroups = [];
	this.textFormatRanges = [];
	openfl__$internal_text_TextEngine.__canvas = window.document.createElement("canvas");
	openfl__$internal_text_TextEngine.__context = openfl__$internal_text_TextEngine.__canvas.getContext("2d");
};
$hxClasses["openfl._internal.text.TextEngine"] = openfl__$internal_text_TextEngine;
openfl__$internal_text_TextEngine.__name__ = ["openfl","_internal","text","TextEngine"];
openfl__$internal_text_TextEngine.__canvas = null;
openfl__$internal_text_TextEngine.__context = null;
openfl__$internal_text_TextEngine.findFont = function(name) {
	return null;
};
openfl__$internal_text_TextEngine.getFont = function(format) {
	var font = format.italic ? "italic " : "normal ";
	font += "normal ";
	font += format.bold ? "bold " : "normal ";
	font += format.size + "px";
	font += "/" + (format.size + format.leading + 6) + "px ";
	var font1;
	switch(format.font) {
	case "_sans":
		font1 = "sans-serif";
		break;
	case "_serif":
		font1 = "serif";
		break;
	case "_typewriter":
		font1 = "monospace";
		break;
	default:
		font1 = "'" + format.font + "'";
	}
	font += "" + font1;
	return font;
};
openfl__$internal_text_TextEngine.getFontInstance = function(format) {
	return null;
};
openfl__$internal_text_TextEngine.prototype = {
	getBounds: function() {
		var padding = this.border ? 1 : 0;
		this.bounds.width = this.width + padding;
		this.bounds.height = this.height + padding;
	}
	,getLine: function(index) {
		if(index < 0 || index > this.lineBreaks.length + 1) {
			return null;
		}
		if(this.lineBreaks.length == 0) {
			return this.text;
		} else {
			return this.text.substring(index > 0 ? this.lineBreaks[index - 1] : 0,this.lineBreaks[index]);
		}
	}
	,getLineMeasurements: function() {
		this.lineAscents.splice(0,this.lineAscents.length);
		this.lineDescents.splice(0,this.lineDescents.length);
		this.lineLeadings.splice(0,this.lineLeadings.length);
		this.lineHeights.splice(0,this.lineHeights.length);
		this.lineWidths.splice(0,this.lineWidths.length);
		var currentLineAscent = 0.0;
		var currentLineDescent = 0.0;
		var currentLineLeading = null;
		var currentLineHeight = 0.0;
		var currentLineWidth = 0.0;
		this.textWidth = 0;
		this.textHeight = 0;
		this.numLines = 1;
		this.bottomScrollV = 0;
		this.maxScrollH = 0;
		var _g = 0;
		var _g1 = this.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			while(group.lineIndex > this.numLines - 1) {
				this.lineAscents.push(currentLineAscent);
				this.lineDescents.push(currentLineDescent);
				this.lineLeadings.push(currentLineLeading != null ? currentLineLeading : 0);
				this.lineHeights.push(currentLineHeight);
				this.lineWidths.push(currentLineWidth);
				currentLineAscent = 0;
				currentLineDescent = 0;
				currentLineLeading = null;
				currentLineHeight = 0;
				currentLineWidth = 0;
				this.numLines++;
				if(this.textHeight <= this.height - 2) {
					this.bottomScrollV++;
				}
			}
			currentLineAscent = Math.max(currentLineAscent,group.ascent);
			currentLineDescent = Math.max(currentLineDescent,group.descent);
			if(currentLineLeading == null) {
				currentLineLeading = group.leading;
			} else {
				currentLineLeading = Math.max(currentLineLeading,group.leading) | 0;
			}
			currentLineHeight = Math.max(currentLineHeight,group.height);
			currentLineWidth = group.offsetX - 2 + group.width;
			if(currentLineWidth > this.textWidth) {
				this.textWidth = currentLineWidth;
			}
			this.textHeight = group.offsetY - 2 + group.ascent + group.descent;
		}
		this.lineAscents.push(currentLineAscent);
		this.lineDescents.push(currentLineDescent);
		this.lineLeadings.push(currentLineLeading != null ? currentLineLeading : 0);
		this.lineHeights.push(currentLineHeight);
		this.lineWidths.push(currentLineWidth);
		if(this.numLines == 1) {
			this.bottomScrollV = 1;
			if(currentLineLeading > 0) {
				this.textHeight += currentLineLeading;
			}
		} else if(this.textHeight <= this.height - 2) {
			this.bottomScrollV++;
		}
		if(this.textWidth > this.width - 4) {
			this.maxScrollH = this.textWidth - this.width + 4 | 0;
		} else {
			this.maxScrollH = 0;
		}
		this.maxScrollV = this.numLines - this.bottomScrollV + 1;
	}
	,getLayoutGroups: function() {
		var _gthis = this;
		this.layoutGroups.splice(0,this.layoutGroups.length);
		var rangeIndex = -1;
		var formatRange = null;
		var currentFormat = openfl_text_TextField.__defaultTextFormat.clone();
		var leading = 0;
		var ascent = 0.0;
		var descent = 0.0;
		var layoutGroup;
		var widthValue;
		var heightValue = 0.0;
		var spaceWidth = 0.0;
		var previousSpaceIndex = 0;
		var spaceIndex = this.text.indexOf(" ");
		var breakIndex = this.text.indexOf("\n");
		var marginRight = 0.0;
		var offsetX = 2.0;
		var offsetY = 2.0;
		var textIndex = 0;
		var lineIndex = 0;
		var lineFormat = null;
		if(-1 < _gthis.textFormatRanges.length - 1) {
			rangeIndex = 0;
			formatRange = _gthis.textFormatRanges[0];
			currentFormat.__merge(formatRange.format);
			openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
			ascent = currentFormat.size;
			descent = currentFormat.size * 0.185;
			leading = currentFormat.leading;
			heightValue = ascent + descent + leading;
			if(spaceIndex > -1) {
				spaceWidth = openfl__$internal_text_TextEngine.__context.measureText(" ").width;
			}
		}
		lineFormat = formatRange.format;
		var wrap;
		while(textIndex < this.text.length) if(breakIndex > -1 && (spaceIndex == -1 || breakIndex < spaceIndex) && formatRange.end >= breakIndex) {
			layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,breakIndex);
			var text = this.text;
			var advances = [];
			var _g1 = textIndex;
			var _g = breakIndex;
			while(_g1 < _g) advances.push(openfl__$internal_text_TextEngine.__context.measureText(text.charAt(_g1++)).width);
			layoutGroup.advances = advances;
			layoutGroup.offsetX = offsetX;
			layoutGroup.ascent = ascent;
			layoutGroup.descent = descent;
			layoutGroup.leading = leading;
			layoutGroup.lineIndex = lineIndex;
			layoutGroup.offsetY = offsetY;
			var advances1 = layoutGroup.advances;
			var width = 0.0;
			var _g2 = 0;
			while(_g2 < advances1.length) {
				var advance = advances1[_g2];
				++_g2;
				width += advance;
			}
			layoutGroup.width = width;
			layoutGroup.height = heightValue;
			this.layoutGroups.push(layoutGroup);
			offsetY += heightValue;
			offsetX = 2;
			if(this.wordWrap && layoutGroup.offsetX + layoutGroup.width > this.width - 2) {
				layoutGroup.offsetY = offsetY;
				layoutGroup.offsetX = offsetX;
				offsetY += heightValue;
				++lineIndex;
			}
			textIndex = breakIndex + 1;
			breakIndex = this.text.indexOf("\n",textIndex);
			++lineIndex;
			if(formatRange.end == breakIndex) {
				if(rangeIndex < _gthis.textFormatRanges.length - 1) {
					++rangeIndex;
					formatRange = _gthis.textFormatRanges[rangeIndex];
					currentFormat.__merge(formatRange.format);
					openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
					ascent = currentFormat.size;
					descent = currentFormat.size * 0.185;
					leading = currentFormat.leading;
					heightValue = ascent + descent + leading;
					if(spaceIndex > -1) {
						spaceWidth = openfl__$internal_text_TextEngine.__context.measureText(" ").width;
					}
				}
				lineFormat = formatRange.format;
			}
		} else if(formatRange.end >= spaceIndex && spaceIndex > -1) {
			layoutGroup = null;
			wrap = false;
			while(true) {
				if(spaceIndex == -1) {
					spaceIndex = formatRange.end;
				}
				var text1 = this.text;
				var advances2 = [];
				var _g11 = textIndex;
				var _g3 = spaceIndex;
				while(_g11 < _g3) advances2.push(openfl__$internal_text_TextEngine.__context.measureText(text1.charAt(_g11++)).width);
				var width1 = 0.0;
				var _g4 = 0;
				while(_g4 < advances2.length) {
					var advance1 = advances2[_g4];
					++_g4;
					width1 += advance1;
				}
				widthValue = width1;
				if(this.wordWrap) {
					if(offsetX + widthValue > this.width - 2) {
						wrap = true;
					}
				}
				if(wrap) {
					offsetY += heightValue;
					var i = this.layoutGroups.length - 1;
					var offsetCount = 0;
					while(true) {
						layoutGroup = this.layoutGroups[i];
						if(i > 0 && layoutGroup.startIndex > previousSpaceIndex) {
							++offsetCount;
						} else {
							break;
						}
						--i;
					}
					++lineIndex;
					offsetX = 2;
					if(offsetCount > 0) {
						var bumpX = this.layoutGroups[this.layoutGroups.length - offsetCount].offsetX;
						var _g12 = this.layoutGroups.length - offsetCount;
						var _g5 = this.layoutGroups.length;
						while(_g12 < _g5) {
							layoutGroup = this.layoutGroups[_g12++];
							layoutGroup.offsetX -= bumpX;
							layoutGroup.offsetY = offsetY;
							layoutGroup.lineIndex = lineIndex;
							offsetX += layoutGroup.width;
						}
					}
					layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,spaceIndex);
					layoutGroup.advances = advances2;
					layoutGroup.offsetX = offsetX;
					layoutGroup.ascent = ascent;
					layoutGroup.descent = descent;
					layoutGroup.leading = leading;
					layoutGroup.lineIndex = lineIndex;
					layoutGroup.offsetY = offsetY;
					layoutGroup.width = widthValue;
					layoutGroup.height = heightValue;
					this.layoutGroups.push(layoutGroup);
					offsetX = widthValue + spaceWidth;
					marginRight = spaceWidth;
					wrap = false;
				} else {
					if(layoutGroup != null && textIndex == spaceIndex) {
						if(formatRange.format.align != 2) {
							layoutGroup.endIndex = spaceIndex;
						}
						layoutGroup.advances.push(spaceWidth);
						marginRight += spaceWidth;
					} else if(layoutGroup == null || lineFormat.align == 2) {
						layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,spaceIndex);
						layoutGroup.advances = advances2;
						layoutGroup.offsetX = offsetX;
						layoutGroup.ascent = ascent;
						layoutGroup.descent = descent;
						layoutGroup.leading = leading;
						layoutGroup.lineIndex = lineIndex;
						layoutGroup.offsetY = offsetY;
						layoutGroup.width = widthValue;
						layoutGroup.height = heightValue;
						this.layoutGroups.push(layoutGroup);
						layoutGroup.advances.push(spaceWidth);
						marginRight = spaceWidth;
					} else {
						layoutGroup.endIndex = spaceIndex;
						layoutGroup.advances = layoutGroup.advances.concat(advances2);
						layoutGroup.width += marginRight + widthValue;
						layoutGroup.advances.push(spaceWidth);
						marginRight = spaceWidth;
					}
					offsetX += widthValue + spaceWidth;
				}
				textIndex = spaceIndex + 1;
				previousSpaceIndex = spaceIndex;
				spaceIndex = this.text.indexOf(" ",previousSpaceIndex + 1);
				if(formatRange.end <= previousSpaceIndex) {
					layoutGroup = null;
					if(rangeIndex < _gthis.textFormatRanges.length - 1) {
						++rangeIndex;
						formatRange = _gthis.textFormatRanges[rangeIndex];
						currentFormat.__merge(formatRange.format);
						openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
						ascent = currentFormat.size;
						descent = currentFormat.size * 0.185;
						leading = currentFormat.leading;
						heightValue = ascent + descent + leading;
						if(spaceIndex > -1) {
							spaceWidth = openfl__$internal_text_TextEngine.__context.measureText(" ").width;
						}
					}
				}
				if(spaceIndex > breakIndex && breakIndex > -1 || textIndex > this.text.length || spaceIndex > formatRange.end || spaceIndex == -1 && breakIndex > -1) {
					break;
				}
			}
		} else {
			if(textIndex >= formatRange.end) {
				break;
			}
			layoutGroup = new openfl__$internal_text_TextLayoutGroup(formatRange.format,textIndex,formatRange.end);
			var text2 = this.text;
			var endIndex = formatRange.end;
			var advances3 = [];
			var _g13 = textIndex;
			while(_g13 < endIndex) advances3.push(openfl__$internal_text_TextEngine.__context.measureText(text2.charAt(_g13++)).width);
			layoutGroup.advances = advances3;
			layoutGroup.offsetX = offsetX;
			layoutGroup.ascent = ascent;
			layoutGroup.descent = descent;
			layoutGroup.leading = leading;
			layoutGroup.lineIndex = lineIndex;
			layoutGroup.offsetY = offsetY;
			var advances4 = layoutGroup.advances;
			var width2 = 0.0;
			var _g6 = 0;
			while(_g6 < advances4.length) {
				var advance2 = advances4[_g6];
				++_g6;
				width2 += advance2;
			}
			layoutGroup.width = width2;
			layoutGroup.height = heightValue;
			this.layoutGroups.push(layoutGroup);
			offsetX += layoutGroup.width;
			textIndex = formatRange.end;
			if(rangeIndex < _gthis.textFormatRanges.length - 1) {
				++rangeIndex;
				formatRange = _gthis.textFormatRanges[rangeIndex];
				currentFormat.__merge(formatRange.format);
				openfl__$internal_text_TextEngine.__context.font = openfl__$internal_text_TextEngine.getFont(currentFormat);
				ascent = currentFormat.size;
				descent = currentFormat.size * 0.185;
				leading = currentFormat.leading;
				heightValue = ascent + descent + leading;
				if(spaceIndex > -1) {
					spaceWidth = openfl__$internal_text_TextEngine.__context.measureText(" ").width;
				}
			}
		}
	}
	,setTextAlignment: function() {
		var lineIndex = -1;
		var offsetX = 0.0;
		var group;
		var lineLength;
		var _g1 = 0;
		var _g = this.layoutGroups.length;
		while(_g1 < _g) {
			var i = _g1++;
			group = this.layoutGroups[i];
			if(group.lineIndex != lineIndex) {
				lineIndex = group.lineIndex;
				switch(group.format.align) {
				case 0:
					if(this.lineWidths[lineIndex] < this.width - 4) {
						offsetX = Math.round((this.width - 4 - this.lineWidths[lineIndex]) / 2);
					} else {
						offsetX = 0;
					}
					break;
				case 2:
					if(this.lineWidths[lineIndex] < this.width - 4) {
						lineLength = 1;
						var _g3 = i + 1;
						var _g2 = this.layoutGroups.length;
						while(_g3 < _g2) if(this.layoutGroups[_g3++].lineIndex == lineIndex) {
							++lineLength;
						} else {
							break;
						}
						if(lineLength > 1) {
							group = this.layoutGroups[i + lineLength - 1];
							if(group.endIndex < this.text.length && this.text.charAt(group.endIndex) != "\n") {
								offsetX = (this.width - 4 - this.lineWidths[lineIndex]) / (lineLength - 1);
								var _g31 = 1;
								var _g21 = lineLength;
								while(_g31 < _g21) {
									var j = _g31++;
									this.layoutGroups[i + j].offsetX += offsetX * j;
								}
							}
						}
					}
					offsetX = 0;
					break;
				case 4:
					if(this.lineWidths[lineIndex] < this.width - 4) {
						offsetX = Math.round(this.width - 4 - this.lineWidths[lineIndex]);
					} else {
						offsetX = 0;
					}
					break;
				default:
					offsetX = 0;
				}
			}
			if(offsetX > 0) {
				group.offsetX += offsetX;
			}
		}
	}
	,update: function() {
		if(this.text == null || StringTools.trim(this.text) == "" || this.textFormatRanges.length == 0) {
			this.lineAscents.splice(0,this.lineAscents.length);
			this.lineBreaks.splice(0,this.lineBreaks.length);
			this.lineDescents.splice(0,this.lineDescents.length);
			this.lineLeadings.splice(0,this.lineLeadings.length);
			this.lineHeights.splice(0,this.lineHeights.length);
			this.lineWidths.splice(0,this.lineWidths.length);
			this.layoutGroups.splice(0,this.layoutGroups.length);
			this.textWidth = 0;
			this.textHeight = 0;
			this.numLines = 1;
			this.maxScrollH = 0;
			this.maxScrollV = 1;
			this.bottomScrollV = 1;
		} else {
			this.getLayoutGroups();
			this.getLineMeasurements();
			this.setTextAlignment();
		}
		this.getBounds();
	}
	,__class__: openfl__$internal_text_TextEngine
};
var openfl__$internal_text_TextFormatRange = function(format,start,end) {
	this.format = format;
	this.start = start;
	this.end = end;
};
$hxClasses["openfl._internal.text.TextFormatRange"] = openfl__$internal_text_TextFormatRange;
openfl__$internal_text_TextFormatRange.__name__ = ["openfl","_internal","text","TextFormatRange"];
openfl__$internal_text_TextFormatRange.prototype = {
	__class__: openfl__$internal_text_TextFormatRange
};
var openfl__$internal_text_TextLayoutGroup = function(format,startIndex,endIndex) {
	this.format = format;
	this.startIndex = startIndex;
	this.endIndex = endIndex;
};
$hxClasses["openfl._internal.text.TextLayoutGroup"] = openfl__$internal_text_TextLayoutGroup;
openfl__$internal_text_TextLayoutGroup.__name__ = ["openfl","_internal","text","TextLayoutGroup"];
openfl__$internal_text_TextLayoutGroup.prototype = {
	__class__: openfl__$internal_text_TextLayoutGroup
};
var openfl_display_Application = function() {
	lime_app_Application.call(this);
	if(openfl_Lib.application == null) {
		openfl_Lib.application = this;
	}
};
$hxClasses["openfl.display.Application"] = openfl_display_Application;
openfl_display_Application.__name__ = ["openfl","display","Application"];
openfl_display_Application.__super__ = lime_app_Application;
openfl_display_Application.prototype = $extend(lime_app_Application.prototype,{
	create: function(config) {
		this.config = config;
		if(config != null) {
			if(Object.prototype.hasOwnProperty.call(config,"fps")) {
				this.backend.setFrameRate(config.fps);
			}
			if(Object.prototype.hasOwnProperty.call(config,"windows")) {
				var _g1 = config.windows;
				while(0 < _g1.length) {
					this.createWindow(new openfl_display_Window(_g1[0]));
					break;
				}
			}
			if(this.preloader == null || this.preloader.complete) {
				this.onPreloadComplete();
			}
		}
	}
	,__class__: openfl_display_Application
});
var openfl_display_Bitmap = function(bitmapData,pixelSnapping,smoothing) {
	if(smoothing == null) {
		smoothing = false;
	}
	openfl_display_DisplayObject.call(this);
	this.bitmapData = bitmapData;
	this.pixelSnapping = pixelSnapping;
	this.smoothing = smoothing;
	if(pixelSnapping == null) {
		this.pixelSnapping = 1;
	}
};
$hxClasses["openfl.display.Bitmap"] = openfl_display_Bitmap;
openfl_display_Bitmap.__name__ = ["openfl","display","Bitmap"];
openfl_display_Bitmap.__super__ = openfl_display_DisplayObject;
openfl_display_Bitmap.prototype = $extend(openfl_display_DisplayObject.prototype,{
	__getBounds: function(rect,matrix) {
		if(this.bitmapData != null) {
			var bounds = openfl_geom_Rectangle.__temp;
			bounds.setTo(0,0,this.bitmapData.width,this.bitmapData.height);
			bounds.__transform(bounds,matrix);
			rect.__expand(bounds.x,bounds.y,bounds.width,bounds.height);
		}
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(!hitObject.get_visible() || this.__isMask || this.bitmapData == null) {
			return false;
		}
		if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
			return false;
		}
		this.__getWorldTransform();
		var _this = this.__worldTransform;
		var norm = _this.a * _this.d - _this.b * _this.c;
		var px = norm == 0 ? -_this.tx : 1.0 / norm * (_this.c * (_this.ty - y) + _this.d * (x - _this.tx));
		var _this1 = this.__worldTransform;
		var norm1 = _this1.a * _this1.d - _this1.b * _this1.c;
		var py = norm1 == 0 ? -_this1.ty : 1.0 / norm1 * (_this1.a * (y - _this1.ty) + _this1.b * (_this1.tx - x));
		if(px > 0 && py > 0 && px <= this.bitmapData.width && py <= this.bitmapData.height) {
			if(stack != null && !interactiveOnly) {
				stack.push(hitObject);
			}
			return true;
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		if(this.bitmapData == null) {
			return false;
		}
		this.__getWorldTransform();
		var _this = this.__worldTransform;
		var norm = _this.a * _this.d - _this.b * _this.c;
		var px = norm == 0 ? -_this.tx : 1.0 / norm * (_this.c * (_this.ty - y) + _this.d * (x - _this.tx));
		var _this1 = this.__worldTransform;
		var norm1 = _this1.a * _this1.d - _this1.b * _this1.c;
		var py = norm1 == 0 ? -_this1.ty : 1.0 / norm1 * (_this1.a * (y - _this1.ty) + _this1.b * (_this1.tx - x));
		if(px > 0 && py > 0 && px <= this.bitmapData.width && py <= this.bitmapData.height) {
			return true;
		}
		return false;
	}
	,__renderCairo: function(renderSession) {
		if(!(!this.__renderable || this.__worldAlpha <= 0)) {
			if(this.bitmapData != null && this.bitmapData.__isValid) {
				if(this.__mask != null) {
					renderSession.maskManager.pushMask(this.__mask);
				}
				var transform = this.__renderTransform;
				this.get_scrollRect();
				if(renderSession.roundPixels) {
					var matrix = transform.__toMatrix3();
					matrix.tx = Math.round(matrix.tx);
					matrix.ty = Math.round(matrix.ty);
				}
				if(this.bitmapData.getSurface() != null) {
					if(this.smoothing) {
						1;
					} else {
						3;
					}
				}
				if(this.__mask != null) {
					renderSession.maskManager.popMask();
				}
			}
		}
	}
	,__renderCairoMask: function(renderSession) {
		this.get_width();
		this.get_height();
	}
	,__renderCanvas: function(renderSession) {
		if(!(!this.__renderable || this.__worldAlpha <= 0)) {
			var context = renderSession.context;
			if(this.bitmapData != null && this.bitmapData.__isValid) {
				if(this.__mask != null) {
					renderSession.maskManager.pushMask(this.__mask);
				}
				this.bitmapData.__sync();
				context.globalAlpha = this.__worldAlpha;
				var transform = this.__renderTransform;
				var scrollRect = this.get_scrollRect();
				if(renderSession.roundPixels) {
					context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx | 0,transform.ty | 0);
				} else {
					context.setTransform(transform.a,transform.b,transform.c,transform.d,transform.tx,transform.ty);
				}
				if(!this.smoothing) {
					context.mozImageSmoothingEnabled = false;
					context.msImageSmoothingEnabled = false;
					context.imageSmoothingEnabled = false;
				}
				if(scrollRect == null) {
					context.drawImage(this.bitmapData.image.get_src(),0,0);
				} else {
					context.drawImage(this.bitmapData.image.get_src(),scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height,scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height);
				}
				if(!this.smoothing) {
					context.mozImageSmoothingEnabled = true;
					context.msImageSmoothingEnabled = true;
					context.imageSmoothingEnabled = true;
				}
				if(this.__mask != null) {
					renderSession.maskManager.popMask();
				}
			}
		}
	}
	,__renderCanvasMask: function(renderSession) {
		renderSession.context.rect(0,0,this.get_width(),this.get_height());
	}
	,__renderDOM: function(renderSession) {
		if(this.stage != null && this.__worldVisible && this.__renderable && this.bitmapData != null && this.bitmapData.__isValid) {
			if(this.bitmapData.image.buffer.__srcImage != null) {
				openfl__$internal_renderer_dom_DOMBitmap.renderImage(this,renderSession);
			} else {
				openfl__$internal_renderer_dom_DOMBitmap.renderCanvas(this,renderSession);
			}
		} else {
			if(this.__image != null) {
				renderSession.element.removeChild(this.__image);
				this.__image = null;
				this.__style = null;
			}
			if(this.__canvas != null) {
				renderSession.element.removeChild(this.__canvas);
				this.__canvas = null;
				this.__style = null;
			}
		}
	}
	,__renderGL: function(renderSession) {
		if(this.__cacheAsBitmap) {
			var x = this.__cachedBitmapBounds.x;
			var y = this.__cachedBitmapBounds.y;
			var w = this.__cachedBitmapBounds.width;
			var h = this.__cachedBitmapBounds.height;
			if(this.__cacheGLMatrix == null) {
				this.__cacheGLMatrix = new openfl_geom_Matrix();
			}
			if(this.__cacheAsBitmapMatrix != null) {
				var bmpBounds = openfl_geom_Rectangle.__temp;
				this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
				x = bmpBounds.x;
				y = bmpBounds.y;
				w = bmpBounds.width;
				h = bmpBounds.height;
				this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
			} else {
				this.__cacheGLMatrix.identity();
			}
			if(!(w <= 0 && h <= 0)) {
				if(this.__updateCachedBitmap || this.__updateFilters) {
					if(this.__cachedFilterBounds != null) {
						w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
						h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
					}
					if(this.__cachedBitmap == null) {
						this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
					}
					this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
					var m = this.__cacheGLMatrix.clone();
					m.translate(-x,-y);
					var shader = this.__shader;
					this.__shader = null;
					this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
					this.__shader = shader;
					this.__updateCachedBitmap = false;
				}
				if(this.__updateFilters) {
					openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
					this.__updateFilters = false;
				}
				this.__cacheGLMatrix.invert();
				var _this = this.__cacheGLMatrix;
				_this.tx = x * _this.a + y * _this.c + _this.tx;
				_this.ty = x * _this.b + y * _this.d + _this.ty;
				this.__cacheGLMatrix.concat(this.__renderTransform);
				this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
				renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
			}
			return;
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
		if(!(!this.__renderable || this.__worldAlpha <= 0 || this.bitmapData == null || !this.bitmapData.__isValid)) {
			renderSession.spriteBatch.renderBitmapData(this.bitmapData,this.smoothing,this.__renderTransform,this.__worldColorTransform,this.__worldAlpha,this.__blendMode,this.__shader,this.pixelSnapping);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__updateMask: function(maskGraphics) {
		if(this.bitmapData == null) {
			return;
		}
		maskGraphics.__commands.overrideMatrix(this.__worldTransform);
		maskGraphics.beginFill(0);
		maskGraphics.drawRect(0,0,this.bitmapData.width,this.bitmapData.height);
		if(maskGraphics.__bounds == null) {
			maskGraphics.__bounds = new openfl_geom_Rectangle();
		}
		this.__getBounds(maskGraphics.__bounds,openfl_geom_Matrix.__identity);
		openfl_display_DisplayObject.prototype.__updateMask.call(this,maskGraphics);
	}
	,get_height: function() {
		if(this.bitmapData != null) {
			return this.bitmapData.height * this.get_scaleY();
		}
		return 0;
	}
	,set_height: function(value) {
		if(this.bitmapData != null) {
			if(value != this.bitmapData.height) {
				this.set_scaleY(value / this.bitmapData.height);
			}
			return value;
		}
		return 0;
	}
	,get_width: function() {
		if(this.bitmapData != null) {
			return this.bitmapData.width * this.get_scaleX();
		}
		return 0;
	}
	,set_width: function(value) {
		if(this.bitmapData != null) {
			if(value != this.bitmapData.width) {
				this.set_scaleX(value / this.bitmapData.width);
			}
			return value;
		}
		return 0;
	}
	,__class__: openfl_display_Bitmap
});
var openfl_display_TextureUvs = function() {
	this.y3 = 0;
	this.y2 = 0;
	this.y1 = 0;
	this.y0 = 0;
	this.x3 = 0;
	this.x2 = 0;
	this.x1 = 0;
	this.x0 = 0;
};
$hxClasses["openfl.display.TextureUvs"] = openfl_display_TextureUvs;
openfl_display_TextureUvs.__name__ = ["openfl","display","TextureUvs"];
openfl_display_TextureUvs.prototype = {
	reset: function() {
		this.x0 = this.x1 = this.x2 = this.x3 = this.y0 = this.y1 = this.y2 = this.y3 = 0;
	}
	,__class__: openfl_display_TextureUvs
};
var openfl_display__$BlendMode_BlendMode_$Impl_$ = {};
$hxClasses["openfl.display._BlendMode.BlendMode_Impl_"] = openfl_display__$BlendMode_BlendMode_$Impl_$;
openfl_display__$BlendMode_BlendMode_$Impl_$.__name__ = ["openfl","display","_BlendMode","BlendMode_Impl_"];
openfl_display__$BlendMode_BlendMode_$Impl_$.fromString = function(value) {
	switch(value) {
	case "add":
		return 0;
	case "alpha":
		return 1;
	case "darken":
		return 2;
	case "difference":
		return 3;
	case "erase":
		return 4;
	case "hardlight":
		return 5;
	case "invert":
		return 6;
	case "layer":
		return 7;
	case "lighten":
		return 8;
	case "multiply":
		return 9;
	case "normal":
		return 10;
	case "overlay":
		return 11;
	case "screen":
		return 12;
	case "shader":
		return 13;
	case "subtract":
		return 14;
	default:
		return null;
	}
};
openfl_display__$BlendMode_BlendMode_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "add";
	case 1:
		return "alpha";
	case 2:
		return "darken";
	case 3:
		return "difference";
	case 4:
		return "erase";
	case 5:
		return "hardlight";
	case 6:
		return "invert";
	case 7:
		return "layer";
	case 8:
		return "lighten";
	case 9:
		return "multiply";
	case 10:
		return "normal";
	case 11:
		return "overlay";
	case 12:
		return "screen";
	case 13:
		return "shader";
	case 14:
		return "subtract";
	default:
		return null;
	}
};
var openfl_display__$CapsStyle_CapsStyle_$Impl_$ = {};
$hxClasses["openfl.display._CapsStyle.CapsStyle_Impl_"] = openfl_display__$CapsStyle_CapsStyle_$Impl_$;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.__name__ = ["openfl","display","_CapsStyle","CapsStyle_Impl_"];
openfl_display__$CapsStyle_CapsStyle_$Impl_$.fromString = function(value) {
	switch(value) {
	case "none":
		return 0;
	case "round":
		return 1;
	case "square":
		return 2;
	default:
		return null;
	}
};
openfl_display__$CapsStyle_CapsStyle_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "none";
	case 1:
		return "round";
	case 2:
		return "square";
	default:
		return null;
	}
};
var openfl_display_DirectRenderer = function(type) {
	if(type == null) {
		type = "DirectRenderer";
	}
	openfl_display_DisplayObject.call(this);
};
$hxClasses["openfl.display.DirectRenderer"] = openfl_display_DirectRenderer;
openfl_display_DirectRenderer.__name__ = ["openfl","display","DirectRenderer"];
openfl_display_DirectRenderer.__super__ = openfl_display_DisplayObject;
openfl_display_DirectRenderer.prototype = $extend(openfl_display_DisplayObject.prototype,{
	get_render: function() {
		return this.__render;
	}
	,set_render: function(value) {
		return this.__render = value;
	}
	,__class__: openfl_display_DirectRenderer
	,__properties__: $extend(openfl_display_DisplayObject.prototype.__properties__,{set_render:"set_render",get_render:"get_render"})
});
var openfl_display_FrameLabel = function(name,frame) {
	openfl_events_EventDispatcher.call(this);
	this.__name = name;
	this.__frame = frame;
};
$hxClasses["openfl.display.FrameLabel"] = openfl_display_FrameLabel;
openfl_display_FrameLabel.__name__ = ["openfl","display","FrameLabel"];
openfl_display_FrameLabel.__super__ = openfl_events_EventDispatcher;
openfl_display_FrameLabel.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	get_frame: function() {
		return this.__frame;
	}
	,get_name: function() {
		return this.__name;
	}
	,__class__: openfl_display_FrameLabel
	,__properties__: {get_name:"get_name",get_frame:"get_frame"}
});
var openfl_display__$GradientType_GradientType_$Impl_$ = {};
$hxClasses["openfl.display._GradientType.GradientType_Impl_"] = openfl_display__$GradientType_GradientType_$Impl_$;
openfl_display__$GradientType_GradientType_$Impl_$.__name__ = ["openfl","display","_GradientType","GradientType_Impl_"];
openfl_display__$GradientType_GradientType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "linear":
		return 0;
	case "radial":
		return 1;
	default:
		return null;
	}
};
openfl_display__$GradientType_GradientType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "linear";
	case 1:
		return "radial";
	default:
		return null;
	}
};
var openfl_display_Graphics = function() {
	this.__glStack = [];
	this.__dirty = true;
	this.__commands = new openfl__$internal_renderer_DrawCommandBuffer();
	this.__strokePadding = 0;
	this.__positionX = 0;
	this.__positionY = 0;
	this.__hardware = true;
	this.moveTo(0,0);
};
$hxClasses["openfl.display.Graphics"] = openfl_display_Graphics;
openfl_display_Graphics.__name__ = ["openfl","display","Graphics"];
openfl_display_Graphics.prototype = {
	beginBitmapFill: function(bitmap,matrix,repeat,smooth) {
		if(smooth == null) {
			smooth = false;
		}
		if(repeat == null) {
			repeat = true;
		}
		this.__commands.beginBitmapFill(bitmap,matrix != null ? matrix.clone() : null,repeat,smooth);
		this.__visible = true;
	}
	,beginFill: function(color,alpha) {
		if(alpha == null) {
			alpha = 1;
		}
		if(color == null) {
			color = 0;
		}
		this.__commands.beginFill(color & 16777215,alpha);
		if(alpha > 0) {
			this.__visible = true;
		}
	}
	,beginGradientFill: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
		if(focalPointRatio == null) {
			focalPointRatio = 0;
		}
		if(interpolationMethod == null) {
			interpolationMethod = 1;
		}
		if(spreadMethod == null) {
			spreadMethod = 0;
		}
		this.__commands.beginGradientFill(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio);
		this.__hardware = false;
		var _g = 0;
		while(_g < alphas.length) {
			var alpha = alphas[_g];
			++_g;
			if(alpha > 0) {
				this.__visible = true;
				break;
			}
		}
	}
	,clear: function() {
		this.__commands.clear();
		this.__strokePadding = 0;
		if(this.__bounds != null) {
			this.set___dirty(true);
			this.__transformDirty = true;
			this.__bounds = null;
		}
		this.__visible = false;
		this.__hardware = true;
		this.moveTo(0,0);
	}
	,copyFrom: function(sourceGraphics) {
		this.__bounds = sourceGraphics.__bounds != null ? sourceGraphics.__bounds.clone() : null;
		this.__commands = sourceGraphics.__commands.copy();
		this.set___dirty(true);
		this.__strokePadding = sourceGraphics.__strokePadding;
		this.__positionX = sourceGraphics.__positionX;
		this.__positionY = sourceGraphics.__positionY;
		this.__transformDirty = true;
		this.__visible = sourceGraphics.__visible;
	}
	,cubicCurveTo: function(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY) {
		this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
		this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
		var ix1;
		var iy1;
		var ix2;
		var iy2;
		ix1 = anchorX;
		ix2 = anchorX;
		if(!((controlX1 < anchorX && controlX1 > this.__positionX || controlX1 > anchorX && controlX1 < this.__positionX) && (controlX2 < anchorX && controlX2 > this.__positionX || controlX2 > anchorX && controlX2 < this.__positionX))) {
			var u = 2 * this.__positionX - 4 * controlX1 + 2 * controlX2;
			var v = controlX1 - this.__positionX;
			var w = -this.__positionX + 3 * controlX1 + anchorX - 3 * controlX2;
			var t1 = (-u + Math.sqrt(u * u - 4 * v * w)) / (2 * w);
			var t2 = (-u - Math.sqrt(u * u - 4 * v * w)) / (2 * w);
			if(t1 > 0 && t1 < 1) {
				ix1 = this.__calculateBezierCubicPoint(t1,this.__positionX,controlX1,controlX2,anchorX);
			}
			if(t2 > 0 && t2 < 1) {
				ix2 = this.__calculateBezierCubicPoint(t2,this.__positionX,controlX1,controlX2,anchorX);
			}
		}
		iy1 = anchorY;
		iy2 = anchorY;
		if(!((controlY1 < anchorY && controlY1 > this.__positionX || controlY1 > anchorY && controlY1 < this.__positionX) && (controlY2 < anchorY && controlY2 > this.__positionX || controlY2 > anchorY && controlY2 < this.__positionX))) {
			var u1 = 2 * this.__positionX - 4 * controlY1 + 2 * controlY2;
			var v1 = controlY1 - this.__positionX;
			var w1 = -this.__positionX + 3 * controlY1 + anchorY - 3 * controlY2;
			var t11 = (-u1 + Math.sqrt(u1 * u1 - 4 * v1 * w1)) / (2 * w1);
			var t21 = (-u1 - Math.sqrt(u1 * u1 - 4 * v1 * w1)) / (2 * w1);
			if(t11 > 0 && t11 < 1) {
				iy1 = this.__calculateBezierCubicPoint(t11,this.__positionX,controlY1,controlY2,anchorY);
			}
			if(t21 > 0 && t21 < 1) {
				iy2 = this.__calculateBezierCubicPoint(t21,this.__positionX,controlY1,controlY2,anchorY);
			}
		}
		this.__inflateBounds(ix1 - this.__strokePadding,iy1 - this.__strokePadding);
		this.__inflateBounds(ix1 + this.__strokePadding,iy1 + this.__strokePadding);
		this.__inflateBounds(ix2 - this.__strokePadding,iy2 - this.__strokePadding);
		this.__inflateBounds(ix2 + this.__strokePadding,iy2 + this.__strokePadding);
		this.__positionX = anchorX;
		this.__positionY = anchorY;
		this.__commands.cubicCurveTo(controlX1,controlY1,controlX2,controlY2,anchorX,anchorY);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,curveTo: function(controlX,controlY,anchorX,anchorY) {
		this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
		this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
		var ix;
		var iy;
		if(controlX < anchorX && controlX > this.__positionX || controlX > anchorX && controlX < this.__positionX) {
			ix = anchorX;
		} else {
			ix = this.__calculateBezierQuadPoint((this.__positionX - controlX) / (this.__positionX - 2 * controlX + anchorX),this.__positionX,controlX,anchorX);
		}
		if(controlY < anchorY && controlY > this.__positionY || controlY > anchorY && controlY < this.__positionY) {
			iy = anchorY;
		} else {
			iy = this.__calculateBezierQuadPoint((this.__positionY - controlY) / (this.__positionY - 2 * controlY + anchorY),this.__positionY,controlY,anchorY);
		}
		this.__inflateBounds(ix - this.__strokePadding,iy - this.__strokePadding);
		this.__inflateBounds(ix + this.__strokePadding,iy + this.__strokePadding);
		this.__positionX = anchorX;
		this.__positionY = anchorY;
		this.__commands.curveTo(controlX,controlY,anchorX,anchorY);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,drawCircle: function(x,y,radius) {
		if(radius <= 0) {
			return;
		}
		this.__inflateBounds(x - radius - this.__strokePadding,y - radius - this.__strokePadding);
		this.__inflateBounds(x + radius + this.__strokePadding,y + radius + this.__strokePadding);
		this.__commands.drawCircle(x,y,radius);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,drawEllipse: function(x,y,width,height) {
		if(width <= 0 || height <= 0) {
			return;
		}
		this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
		this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
		this.__commands.drawEllipse(x,y,width,height);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,drawGraphicsData: function(graphicsData) {
		var fill;
		var bitmapFill;
		var gradientFill;
		var stroke;
		var path;
		var _g = 0;
		while(_g < graphicsData.length) {
			var graphics = graphicsData.data[_g];
			++_g;
			if(js_Boot.__instanceof(graphics,openfl_display_GraphicsSolidFill)) {
				fill = graphics;
				this.beginFill(fill.color,fill.alpha);
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsBitmapFill)) {
				bitmapFill = graphics;
				this.beginBitmapFill(bitmapFill.bitmapData,bitmapFill.matrix,bitmapFill.repeat,bitmapFill.smooth);
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsGradientFill)) {
				gradientFill = graphics;
				this.beginGradientFill(gradientFill.type,gradientFill.colors,gradientFill.alphas,gradientFill.ratios,gradientFill.matrix,gradientFill.spreadMethod,gradientFill.interpolationMethod,gradientFill.focalPointRatio);
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsStroke)) {
				stroke = graphics;
				if(js_Boot.__instanceof(stroke.fill,openfl_display_GraphicsSolidFill)) {
					fill = stroke.fill;
					this.lineStyle(stroke.thickness,fill.color,fill.alpha,stroke.pixelHinting,stroke.scaleMode,stroke.caps,stroke.joints,stroke.miterLimit);
				} else {
					this.lineStyle(stroke.thickness,0,1,stroke.pixelHinting,stroke.scaleMode,stroke.caps,stroke.joints,stroke.miterLimit);
					if(js_Boot.__instanceof(stroke.fill,openfl_display_GraphicsBitmapFill)) {
						bitmapFill = stroke.fill;
						this.lineBitmapStyle(bitmapFill.bitmapData,bitmapFill.matrix,bitmapFill.repeat,bitmapFill.smooth);
					} else if(js_Boot.__instanceof(stroke.fill,openfl_display_GraphicsGradientFill)) {
						gradientFill = stroke.fill;
						this.lineGradientStyle(gradientFill.type,gradientFill.colors,gradientFill.alphas,gradientFill.ratios,gradientFill.matrix,gradientFill.spreadMethod,gradientFill.interpolationMethod,gradientFill.focalPointRatio);
					}
				}
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsPath)) {
				path = graphics;
				this.drawPath(path.commands,path.data,path.winding);
			} else if(js_Boot.__instanceof(graphics,openfl_display_GraphicsEndFill)) {
				this.endFill();
			}
		}
	}
	,drawPath: function(commands,data,winding) {
		if(winding == null) {
			winding = "evenOdd";
		}
		var dataIndex = 0;
		var _g = 0;
		try {
			while(_g < commands.length) {
				var command = commands.data[_g];
				++_g;
				if(command != null) {
					switch(command) {
					case 1:
						this.moveTo(data.data[dataIndex],data.data[dataIndex + 1]);
						dataIndex += 2;
						break;
					case 2:
						this.lineTo(data.data[dataIndex],data.data[dataIndex + 1]);
						dataIndex += 2;
						break;
					case 3:
						this.curveTo(data.data[dataIndex],data.data[dataIndex + 1],data.data[dataIndex + 2],data.data[dataIndex + 3]);
						dataIndex += 4;
						break;
					case 4:
						this.moveTo(data.data[dataIndex + 2],data.data[dataIndex + 3]);
						throw "__break__";
						break;
					case 5:
						this.lineTo(data.data[dataIndex + 2],data.data[dataIndex + 3]);
						throw "__break__";
						break;
					case 6:
						this.cubicCurveTo(data.data[dataIndex],data.data[dataIndex + 1],data.data[dataIndex + 2],data.data[dataIndex + 3],data.data[dataIndex + 4],data.data[dataIndex + 5]);
						dataIndex += 6;
						break;
					default:
					}
				}
			}
		} catch( e ) { if( e != "__break__" ) throw e; }
	}
	,drawRect: function(x,y,width,height) {
		if(width <= 0 || height <= 0) {
			return;
		}
		this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
		this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
		this.__commands.drawRect(x,y,width,height);
		this.set___dirty(true);
	}
	,drawRoundRect: function(x,y,width,height,ellipseWidth,ellipseHeight) {
		if(width <= 0 || height <= 0) {
			return;
		}
		this.__inflateBounds(x - this.__strokePadding,y - this.__strokePadding);
		this.__inflateBounds(x + width + this.__strokePadding,y + height + this.__strokePadding);
		this.__commands.drawRoundRect(x,y,width,height,ellipseWidth,ellipseHeight);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,drawRoundRectComplex: function(x,y,width,height,topLeftRadius,topRightRadius,bottomLeftRadius,bottomRightRadius) {
		openfl_Lib.notImplemented("Graphics.drawRoundRectComplex");
	}
	,drawTiles: function(sheet,tileData,smooth,flags,shader,count) {
		if(count == null) {
			count = -1;
		}
		if(flags == null) {
			flags = 0;
		}
		if(smooth == null) {
			smooth = false;
		}
		var useScale = (flags & 1) > 0;
		var useRotation = (flags & 2) > 0;
		var useRGB = (flags & 4) > 0;
		var useAlpha = (flags & 8) > 0;
		var useTransform = (flags & 16) > 0;
		var useColorTransform = (flags & 128) > 0;
		var useRect = (flags & 32) > 0;
		var useOrigin = (flags & 64) > 0;
		var rect = openfl_geom_Rectangle.__temp;
		var matrix = openfl_geom_Matrix.__temp;
		var numValues = 3;
		var totalCount = count;
		if(count < 0) {
			totalCount = tileData.length;
		}
		if(useTransform || useScale || useRotation || useRGB || useAlpha || useColorTransform) {
			var scaleIndex = 0;
			var rotationIndex = 0;
			var transformIndex = 0;
			if(useRect) {
				if(useOrigin) {
					numValues = 8;
				} else {
					numValues = 6;
				}
			}
			if(useScale) {
				scaleIndex = numValues;
				++numValues;
			}
			if(useRotation) {
				rotationIndex = numValues;
				++numValues;
			}
			if(useTransform) {
				transformIndex = numValues;
				numValues += 4;
			}
			if(useRGB) {
				numValues += 3;
			}
			if(useAlpha) {
				++numValues;
			}
			if(useColorTransform) {
				numValues += 4;
			}
			var index = 0;
			var cacheID = -1;
			var x;
			var y;
			var id;
			var scale;
			var rotation;
			var tileWidth;
			var tileHeight;
			var originX;
			var originY;
			var tile = null;
			var tilePoint = null;
			while(index < totalCount) {
				x = tileData[index];
				y = tileData[index + 1];
				if(!useRect) {
					id = tileData[index + 2] | 0;
				} else {
					id = -1;
				}
				scale = 1.0;
				rotation = 0.0;
				if(useScale) {
					scale = tileData[index + scaleIndex];
				}
				if(useRotation) {
					rotation = tileData[index + rotationIndex];
				}
				if(id < 0) {
					tile = null;
				} else if(!useRect && cacheID != id) {
					cacheID = id;
					tile = sheet.__tileRects[id];
					tilePoint = sheet.__centerPoints[id];
				} else if(useRect) {
					tile = sheet.__rectTile;
					tile.setTo(tileData[index + 2],tileData[index + 3],tileData[index + 4],tileData[index + 5]);
					tilePoint = sheet.__point;
					if(useOrigin) {
						tilePoint.setTo(tileData[index + 6] / tile.width,tileData[index + 7] / tile.height);
					} else {
						tilePoint.setTo(0,0);
					}
				}
				if(tile != null) {
					if(useTransform) {
						rect.setTo(0,0,tile.width,tile.height);
						matrix.setTo(tileData[index + transformIndex],tileData[index + transformIndex + 1],tileData[index + transformIndex + 2],tileData[index + transformIndex + 3],0,0);
						originX = tilePoint.x * scale;
						originY = tilePoint.y * scale;
						matrix.translate(x - (originX * matrix.a + originY * matrix.c + matrix.tx),y - (originX * matrix.b + originY * matrix.d + matrix.ty));
						rect.__transform(rect,matrix);
						this.__inflateBounds(rect.x,rect.y);
						this.__inflateBounds(rect.get_right(),rect.get_bottom());
					} else {
						tileWidth = tile.width * scale;
						tileHeight = tile.height * scale;
						x -= tilePoint.x * tileWidth;
						y -= tilePoint.y * tileHeight;
						if(rotation != 0) {
							rect.setTo(0,0,tileWidth,tileHeight);
							matrix.identity();
							matrix.rotate(rotation);
							matrix.translate(x,y);
							rect.__transform(rect,matrix);
							this.__inflateBounds(rect.x,rect.y);
							this.__inflateBounds(rect.get_right(),rect.get_bottom());
						} else {
							this.__inflateBounds(x,y);
							this.__inflateBounds(x + tileWidth,y + tileHeight);
						}
					}
				}
				index += numValues;
			}
		} else {
			var x1;
			var y1;
			var id1;
			var tile1;
			var centerPoint;
			var originX1;
			var originY1;
			var rect1 = openfl_geom_Rectangle.__temp;
			var index1 = 0;
			while(index1 < totalCount) {
				x1 = tileData[index1++];
				y1 = tileData[index1++];
				if(!useRect) {
					id1 = tileData[index1++] | 0;
				} else {
					id1 = -1;
				}
				originX1 = 0.0;
				originY1 = 0.0;
				if(useRect) {
					rect1.setTo(tileData[index1++],tileData[index1++],tileData[index1++],tileData[index1++]);
					if(useOrigin) {
						originX1 = tileData[index1++];
						originY1 = tileData[index1++];
					}
					this.__inflateBounds(x1 - originX1,y1 - originY1);
					this.__inflateBounds(x1 - originX1 + rect1.width,y1 - originY1 + rect1.height);
				} else {
					tile1 = sheet.__tileRects[id1];
					if(tile1 != null) {
						centerPoint = sheet.__centerPoints[id1];
						originX1 = centerPoint.x * tile1.width;
						originY1 = centerPoint.y * tile1.height;
						this.__inflateBounds(x1 - originX1,y1 - originY1);
						this.__inflateBounds(x1 - originX1 + tile1.width,y1 - originY1 + tile1.height);
					}
				}
			}
		}
		this.__commands.drawTiles(sheet,tileData,smooth,flags,shader,count);
		this.set___dirty(true);
		this.__visible = true;
	}
	,drawTriangles: function(vertices,indices,uvtData,culling) {
		if(culling == null) {
			culling = 1;
		}
		var vlen = vertices.length / 2 | 0;
		if(culling == null) {
			culling = 1;
		}
		if(indices == null) {
			if(vlen % 3 != 0) {
				throw new js__$Boot_HaxeError(new openfl_errors_ArgumentError("Not enough vertices to close a triangle."));
			}
			var this1 = new openfl_VectorData();
			this1.data = new Array(0);
			this1.length = 0;
			this1.fixed = false;
			indices = this1;
			var _g1 = 0;
			var _g = vlen;
			while(_g1 < _g) {
				var i = _g1++;
				if(!indices.fixed) {
					indices.length++;
					if(indices.data.length < indices.length) {
						var length = indices.data.length + 10;
						var data = new Array(length);
						haxe_ds__$Vector_Vector_$Impl_$.blit(indices.data,0,data,0,indices.data.length);
						indices.data = data;
					}
					indices.data[indices.length - 1] = i;
				}
			}
		}
		this.__inflateBounds(0,0);
		var tmpx = -Infinity;
		var tmpy = -Infinity;
		var maxX = -Infinity;
		var maxY = -Infinity;
		var _g11 = 0;
		var _g2 = vlen;
		while(_g11 < _g2) {
			var i1 = _g11++;
			tmpx = vertices.data[i1 * 2];
			tmpy = vertices.data[i1 * 2 + 1];
			if(maxX < tmpx) {
				maxX = tmpx;
			}
			if(maxY < tmpy) {
				maxY = tmpy;
			}
		}
		this.__inflateBounds(maxX,maxY);
		this.__commands.drawTriangles(vertices,indices,uvtData,culling);
		this.set___dirty(true);
		this.__visible = true;
	}
	,endFill: function() {
		this.__commands.endFill();
	}
	,lineBitmapStyle: function(bitmap,matrix,repeat,smooth) {
		if(smooth == null) {
			smooth = false;
		}
		if(repeat == null) {
			repeat = true;
		}
		this.__commands.lineBitmapStyle(bitmap,matrix != null ? matrix.clone() : null,repeat,smooth);
	}
	,lineGradientStyle: function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
		if(focalPointRatio == null) {
			focalPointRatio = 0;
		}
		if(interpolationMethod == null) {
			interpolationMethod = 1;
		}
		if(spreadMethod == null) {
			spreadMethod = 0;
		}
		this.__commands.lineGradientStyle(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio);
	}
	,lineStyle: function(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit) {
		if(miterLimit == null) {
			miterLimit = 3;
		}
		if(scaleMode == null) {
			scaleMode = 2;
		}
		if(pixelHinting == null) {
			pixelHinting = false;
		}
		if(alpha == null) {
			alpha = 1;
		}
		if(color == null) {
			color = 0;
		}
		if(thickness != null) {
			if(joints == 1) {
				if(thickness > this.__strokePadding) {
					this.__strokePadding = thickness;
				}
			} else if(thickness / 2 > this.__strokePadding) {
				this.__strokePadding = thickness / 2;
			}
		}
		this.__commands.lineStyle(thickness,color,alpha,pixelHinting,scaleMode,caps,joints,miterLimit);
		if(thickness != null) {
			this.__visible = true;
		}
	}
	,lineTo: function(x,y) {
		this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
		this.__inflateBounds(this.__positionX + this.__strokePadding,this.__positionY + this.__strokePadding);
		this.__positionX = x;
		this.__positionY = y;
		this.__inflateBounds(this.__positionX - this.__strokePadding,this.__positionY - this.__strokePadding);
		this.__inflateBounds(this.__positionX + this.__strokePadding * 2,this.__positionY + this.__strokePadding);
		this.__commands.lineTo(x,y);
		this.__hardware = false;
		this.set___dirty(true);
	}
	,moveTo: function(x,y) {
		this.__positionX = x;
		this.__positionY = y;
		this.__commands.moveTo(x,y);
	}
	,__calculateBezierCubicPoint: function(t,p1,p2,p3,p4) {
		var iT = 1 - t;
		return p1 * (iT * iT * iT) + 3 * p2 * t * (iT * iT) + 3 * p3 * iT * (t * t) + p4 * (t * t * t);
	}
	,__calculateBezierQuadPoint: function(t,p1,p2,p3) {
		var iT = 1 - t;
		return iT * iT * p1 + 2 * iT * t * p2 + t * t * p3;
	}
	,__getBounds: function(rect,matrix) {
		if(this.__bounds == null) {
			return;
		}
		var bounds = openfl_geom_Rectangle.__temp;
		this.__bounds.__transform(bounds,matrix);
		rect.__expand(bounds.x,bounds.y,bounds.width,bounds.height);
	}
	,__hitTest: function(x,y,shapeFlag,matrix) {
		if(this.__bounds == null) {
			return false;
		}
		var norm = matrix.a * matrix.d - matrix.b * matrix.c;
		var px = norm == 0 ? -matrix.tx : 1.0 / norm * (matrix.c * (matrix.ty - y) + matrix.d * (x - matrix.tx));
		var norm1 = matrix.a * matrix.d - matrix.b * matrix.c;
		var py = norm1 == 0 ? -matrix.ty : 1.0 / norm1 * (matrix.a * (y - matrix.ty) + matrix.b * (matrix.tx - x));
		if(px > this.__bounds.x && py > this.__bounds.y && this.__bounds.contains(px,py)) {
			if(shapeFlag) {
				return openfl__$internal_renderer_canvas_CanvasGraphics.hitTest(this,px,py);
			}
			return true;
		}
		return false;
	}
	,__inflateBounds: function(x,y) {
		if(this.__bounds == null) {
			this.__bounds = new openfl_geom_Rectangle(x,y,0,0);
			this.__transformDirty = true;
			return;
		}
		if(x < this.__bounds.x) {
			this.__bounds.width += this.__bounds.x - x;
			this.__bounds.x = x;
			this.__transformDirty = true;
		}
		if(y < this.__bounds.y) {
			this.__bounds.height += this.__bounds.y - y;
			this.__bounds.y = y;
			this.__transformDirty = true;
		}
		if(x > this.__bounds.x + this.__bounds.width) {
			this.__bounds.width = x - this.__bounds.x;
		}
		if(y > this.__bounds.y + this.__bounds.height) {
			this.__bounds.height = y - this.__bounds.y;
		}
	}
	,set___dirty: function(value) {
		if(value && this.__owner != null) {
			var _this = this.__owner;
			if(!_this.__renderDirty) {
				_this.__updateCachedBitmap = true;
				_this.__updateFilters = _this.get_filters() != null && _this.get_filters().length > 0;
				_this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return this.__dirty = value;
	}
	,__class__: openfl_display_Graphics
	,__properties__: {set___dirty:"set___dirty"}
};
var openfl_display_IGraphicsFill = function() { };
$hxClasses["openfl.display.IGraphicsFill"] = openfl_display_IGraphicsFill;
openfl_display_IGraphicsFill.__name__ = ["openfl","display","IGraphicsFill"];
openfl_display_IGraphicsFill.prototype = {
	__class__: openfl_display_IGraphicsFill
};
var openfl_display_IGraphicsData = function() { };
$hxClasses["openfl.display.IGraphicsData"] = openfl_display_IGraphicsData;
openfl_display_IGraphicsData.__name__ = ["openfl","display","IGraphicsData"];
openfl_display_IGraphicsData.prototype = {
	__class__: openfl_display_IGraphicsData
};
var openfl_display_GraphicsBitmapFill = function(bitmapData,matrix,repeat,smooth) {
	if(smooth == null) {
		smooth = false;
	}
	if(repeat == null) {
		repeat = true;
	}
	this.bitmapData = bitmapData;
	this.matrix = matrix;
	this.repeat = repeat;
	this.smooth = smooth;
	this.__graphicsDataType = openfl_display_GraphicsDataType.BITMAP;
	this.__graphicsFillType = openfl_display_GraphicsFillType.BITMAP_FILL;
};
$hxClasses["openfl.display.GraphicsBitmapFill"] = openfl_display_GraphicsBitmapFill;
openfl_display_GraphicsBitmapFill.__name__ = ["openfl","display","GraphicsBitmapFill"];
openfl_display_GraphicsBitmapFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsBitmapFill.prototype = {
	__class__: openfl_display_GraphicsBitmapFill
};
var openfl_display_GraphicsEndFill = function() {
	this.__graphicsDataType = openfl_display_GraphicsDataType.END;
	this.__graphicsFillType = openfl_display_GraphicsFillType.END_FILL;
};
$hxClasses["openfl.display.GraphicsEndFill"] = openfl_display_GraphicsEndFill;
openfl_display_GraphicsEndFill.__name__ = ["openfl","display","GraphicsEndFill"];
openfl_display_GraphicsEndFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsEndFill.prototype = {
	__class__: openfl_display_GraphicsEndFill
};
var openfl_display_GraphicsGradientFill = function(type,colors,alphas,ratios,matrix,spreadMethod,interpolationMethod,focalPointRatio) {
	if(focalPointRatio == null) {
		focalPointRatio = 0;
	}
	if(type == null) {
		type = 0;
	}
	if(spreadMethod == null) {
		spreadMethod = 0;
	}
	if(interpolationMethod == null) {
		interpolationMethod = 1;
	}
	this.type = type;
	this.colors = colors;
	this.alphas = alphas;
	this.ratios = ratios;
	this.matrix = matrix;
	this.spreadMethod = spreadMethod;
	this.interpolationMethod = interpolationMethod;
	this.focalPointRatio = focalPointRatio;
	this.__graphicsDataType = openfl_display_GraphicsDataType.GRADIENT;
	this.__graphicsFillType = openfl_display_GraphicsFillType.GRADIENT_FILL;
};
$hxClasses["openfl.display.GraphicsGradientFill"] = openfl_display_GraphicsGradientFill;
openfl_display_GraphicsGradientFill.__name__ = ["openfl","display","GraphicsGradientFill"];
openfl_display_GraphicsGradientFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsGradientFill.prototype = {
	__class__: openfl_display_GraphicsGradientFill
};
var openfl_display_IGraphicsPath = function() { };
$hxClasses["openfl.display.IGraphicsPath"] = openfl_display_IGraphicsPath;
openfl_display_IGraphicsPath.__name__ = ["openfl","display","IGraphicsPath"];
var openfl_display_GraphicsPath = function(commands,data,winding) {
	if(winding == null) {
		winding = "evenOdd";
	}
	this.commands = commands;
	this.data = data;
	this.winding = winding;
	this.__graphicsDataType = openfl_display_GraphicsDataType.PATH;
};
$hxClasses["openfl.display.GraphicsPath"] = openfl_display_GraphicsPath;
openfl_display_GraphicsPath.__name__ = ["openfl","display","GraphicsPath"];
openfl_display_GraphicsPath.__interfaces__ = [openfl_display_IGraphicsPath,openfl_display_IGraphicsData];
openfl_display_GraphicsPath.prototype = {
	curveTo: function(controlX,controlY,anchorX,anchorY) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 3;
			}
			var this2 = this.data;
			if(!this2.fixed) {
				this2.length++;
				if(this2.data.length < this2.length) {
					var length1 = this2.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
					this2.data = data1;
				}
				this2.data[this2.length - 1] = anchorX;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length2 = this3.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
					this3.data = data2;
				}
				this3.data[this3.length - 1] = anchorY;
			}
			var this4 = this.data;
			if(!this4.fixed) {
				this4.length++;
				if(this4.data.length < this4.length) {
					var length3 = this4.data.length + 10;
					var data3 = new Array(length3);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data3,0,this4.data.length);
					this4.data = data3;
				}
				this4.data[this4.length - 1] = controlX;
			}
			var this5 = this.data;
			if(!this5.fixed) {
				this5.length++;
				if(this5.data.length < this5.length) {
					var length4 = this5.data.length + 10;
					var data4 = new Array(length4);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data4,0,this5.data.length);
					this5.data = data4;
				}
				this5.data[this5.length - 1] = controlY;
			}
		}
	}
	,lineTo: function(x,y) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 2;
			}
			var this2 = this.data;
			if(!this2.fixed) {
				this2.length++;
				if(this2.data.length < this2.length) {
					var length1 = this2.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
					this2.data = data1;
				}
				this2.data[this2.length - 1] = x;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length2 = this3.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
					this3.data = data2;
				}
				this3.data[this3.length - 1] = y;
			}
		}
	}
	,moveTo: function(x,y) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 1;
			}
			var this2 = this.data;
			if(!this2.fixed) {
				this2.length++;
				if(this2.data.length < this2.length) {
					var length1 = this2.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
					this2.data = data1;
				}
				this2.data[this2.length - 1] = x;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length2 = this3.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
					this3.data = data2;
				}
				this3.data[this3.length - 1] = y;
			}
		}
	}
	,wideLineTo: function(x,y) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 2;
			}
			var this2 = this.data;
			if(!this2.fixed) {
				this2.length++;
				if(this2.data.length < this2.length) {
					var length1 = this2.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
					this2.data = data1;
				}
				this2.data[this2.length - 1] = x;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length2 = this3.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
					this3.data = data2;
				}
				this3.data[this3.length - 1] = y;
			}
		}
	}
	,wideMoveTo: function(x,y) {
		if(this.commands != null && this.data != null) {
			var this1 = this.commands;
			if(!this1.fixed) {
				this1.length++;
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
				this1.data[this1.length - 1] = 1;
			}
			var this2 = this.data;
			if(!this2.fixed) {
				this2.length++;
				if(this2.data.length < this2.length) {
					var length1 = this2.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
					this2.data = data1;
				}
				this2.data[this2.length - 1] = x;
			}
			var this3 = this.data;
			if(!this3.fixed) {
				this3.length++;
				if(this3.data.length < this3.length) {
					var length2 = this3.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
					this3.data = data2;
				}
				this3.data[this3.length - 1] = y;
			}
		}
	}
	,__class__: openfl_display_GraphicsPath
};
var openfl_display_GraphicsSolidFill = function(color,alpha) {
	if(alpha == null) {
		alpha = 1;
	}
	if(color == null) {
		color = 0;
	}
	this.alpha = alpha;
	this.color = color;
	this.__graphicsDataType = openfl_display_GraphicsDataType.SOLID;
	this.__graphicsFillType = openfl_display_GraphicsFillType.SOLID_FILL;
};
$hxClasses["openfl.display.GraphicsSolidFill"] = openfl_display_GraphicsSolidFill;
openfl_display_GraphicsSolidFill.__name__ = ["openfl","display","GraphicsSolidFill"];
openfl_display_GraphicsSolidFill.__interfaces__ = [openfl_display_IGraphicsFill,openfl_display_IGraphicsData];
openfl_display_GraphicsSolidFill.prototype = {
	__class__: openfl_display_GraphicsSolidFill
};
var openfl_display_IGraphicsStroke = function() { };
$hxClasses["openfl.display.IGraphicsStroke"] = openfl_display_IGraphicsStroke;
openfl_display_IGraphicsStroke.__name__ = ["openfl","display","IGraphicsStroke"];
var openfl_display_GraphicsStroke = function(thickness,pixelHinting,scaleMode,caps,joints,miterLimit,fill) {
	if(miterLimit == null) {
		miterLimit = 3;
	}
	if(pixelHinting == null) {
		pixelHinting = false;
	}
	if(thickness == null) {
		thickness = 0.0;
	}
	this.caps = caps != null ? caps : 0;
	this.fill = fill;
	this.joints = joints != null ? joints : 2;
	this.miterLimit = miterLimit;
	this.pixelHinting = pixelHinting;
	this.scaleMode = scaleMode != null ? scaleMode : 2;
	this.thickness = thickness;
	this.__graphicsDataType = openfl_display_GraphicsDataType.STROKE;
};
$hxClasses["openfl.display.GraphicsStroke"] = openfl_display_GraphicsStroke;
openfl_display_GraphicsStroke.__name__ = ["openfl","display","GraphicsStroke"];
openfl_display_GraphicsStroke.__interfaces__ = [openfl_display_IGraphicsStroke,openfl_display_IGraphicsData];
openfl_display_GraphicsStroke.prototype = {
	__class__: openfl_display_GraphicsStroke
};
var openfl_display_GraphicsDataType = $hxClasses["openfl.display.GraphicsDataType"] = { __ename__ : ["openfl","display","GraphicsDataType"], __constructs__ : ["STROKE","SOLID","GRADIENT","PATH","BITMAP","END"] };
openfl_display_GraphicsDataType.STROKE = ["STROKE",0];
openfl_display_GraphicsDataType.STROKE.toString = $estr;
openfl_display_GraphicsDataType.STROKE.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.SOLID = ["SOLID",1];
openfl_display_GraphicsDataType.SOLID.toString = $estr;
openfl_display_GraphicsDataType.SOLID.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.GRADIENT = ["GRADIENT",2];
openfl_display_GraphicsDataType.GRADIENT.toString = $estr;
openfl_display_GraphicsDataType.GRADIENT.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.PATH = ["PATH",3];
openfl_display_GraphicsDataType.PATH.toString = $estr;
openfl_display_GraphicsDataType.PATH.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.BITMAP = ["BITMAP",4];
openfl_display_GraphicsDataType.BITMAP.toString = $estr;
openfl_display_GraphicsDataType.BITMAP.__enum__ = openfl_display_GraphicsDataType;
openfl_display_GraphicsDataType.END = ["END",5];
openfl_display_GraphicsDataType.END.toString = $estr;
openfl_display_GraphicsDataType.END.__enum__ = openfl_display_GraphicsDataType;
var openfl_display_GraphicsFillType = $hxClasses["openfl.display.GraphicsFillType"] = { __ename__ : ["openfl","display","GraphicsFillType"], __constructs__ : ["SOLID_FILL","GRADIENT_FILL","BITMAP_FILL","END_FILL"] };
openfl_display_GraphicsFillType.SOLID_FILL = ["SOLID_FILL",0];
openfl_display_GraphicsFillType.SOLID_FILL.toString = $estr;
openfl_display_GraphicsFillType.SOLID_FILL.__enum__ = openfl_display_GraphicsFillType;
openfl_display_GraphicsFillType.GRADIENT_FILL = ["GRADIENT_FILL",1];
openfl_display_GraphicsFillType.GRADIENT_FILL.toString = $estr;
openfl_display_GraphicsFillType.GRADIENT_FILL.__enum__ = openfl_display_GraphicsFillType;
openfl_display_GraphicsFillType.BITMAP_FILL = ["BITMAP_FILL",2];
openfl_display_GraphicsFillType.BITMAP_FILL.toString = $estr;
openfl_display_GraphicsFillType.BITMAP_FILL.__enum__ = openfl_display_GraphicsFillType;
openfl_display_GraphicsFillType.END_FILL = ["END_FILL",3];
openfl_display_GraphicsFillType.END_FILL.toString = $estr;
openfl_display_GraphicsFillType.END_FILL.__enum__ = openfl_display_GraphicsFillType;
var openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$ = {};
$hxClasses["openfl.display._InterpolationMethod.InterpolationMethod_Impl_"] = openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$;
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.__name__ = ["openfl","display","_InterpolationMethod","InterpolationMethod_Impl_"];
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.fromString = function(value) {
	switch(value) {
	case "linearRGB":
		return 0;
	case "rgb":
		return 1;
	default:
		return null;
	}
};
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "linearRGB";
	case 1:
		return "rgb";
	default:
		return null;
	}
};
var openfl_display_JPEGEncoderOptions = function(quality) {
	if(quality == null) {
		quality = 80;
	}
	this.quality = quality;
};
$hxClasses["openfl.display.JPEGEncoderOptions"] = openfl_display_JPEGEncoderOptions;
openfl_display_JPEGEncoderOptions.__name__ = ["openfl","display","JPEGEncoderOptions"];
openfl_display_JPEGEncoderOptions.prototype = {
	__class__: openfl_display_JPEGEncoderOptions
};
var openfl_display__$JointStyle_JointStyle_$Impl_$ = {};
$hxClasses["openfl.display._JointStyle.JointStyle_Impl_"] = openfl_display__$JointStyle_JointStyle_$Impl_$;
openfl_display__$JointStyle_JointStyle_$Impl_$.__name__ = ["openfl","display","_JointStyle","JointStyle_Impl_"];
openfl_display__$JointStyle_JointStyle_$Impl_$.fromString = function(value) {
	switch(value) {
	case "bevel":
		return 0;
	case "miter":
		return 1;
	case "round":
		return 2;
	default:
		return null;
	}
};
openfl_display__$JointStyle_JointStyle_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "bevel";
	case 1:
		return "miter";
	case 2:
		return "round";
	default:
		return null;
	}
};
var openfl_display__$LineScaleMode_LineScaleMode_$Impl_$ = {};
$hxClasses["openfl.display._LineScaleMode.LineScaleMode_Impl_"] = openfl_display__$LineScaleMode_LineScaleMode_$Impl_$;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.__name__ = ["openfl","display","_LineScaleMode","LineScaleMode_Impl_"];
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.fromString = function(value) {
	switch(value) {
	case "horizontal":
		return 0;
	case "none":
		return 1;
	case "normal":
		return 2;
	case "vertical":
		return 3;
	default:
		return null;
	}
};
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "horizontal";
	case 1:
		return "none";
	case 2:
		return "normal";
	case 3:
		return "vertical";
	default:
		return null;
	}
};
var openfl_display_Loader = function() {
	openfl_display_DisplayObjectContainer.call(this);
	this.contentLoaderInfo = openfl_display_LoaderInfo.create(this);
};
$hxClasses["openfl.display.Loader"] = openfl_display_Loader;
openfl_display_Loader.__name__ = ["openfl","display","Loader"];
openfl_display_Loader.__super__ = openfl_display_DisplayObjectContainer;
openfl_display_Loader.prototype = $extend(openfl_display_DisplayObjectContainer.prototype,{
	close: function() {
		openfl_Lib.notImplemented("Loader.close");
	}
	,load: function(request,context) {
		var extension = "";
		var parts = request.url.split(".");
		if(parts.length > 0) {
			extension = parts[parts.length - 1].toLowerCase();
		}
		if(extension.indexOf("?") != -1) {
			extension = extension.split("?")[0];
		}
		this.contentLoaderInfo.url = request.url;
		if(request.contentType == null || request.contentType == "") {
			var tmp;
			switch(extension) {
			case "gif":
				tmp = "image/gif";
				break;
			case "jpeg":case "jpg":
				tmp = "image/jpeg";
				break;
			case "png":
				tmp = "image/png";
				break;
			case "swf":
				tmp = "application/x-shockwave-flash";
				break;
			default:
				tmp = "application/x-www-form-urlencoded";
			}
			this.contentLoaderInfo.contentType = tmp;
		} else {
			this.contentLoaderInfo.contentType = request.contentType;
		}
		var worker = new lime_system_BackgroundWorker();
		worker.doWork.add(function(_) {
			openfl_display_BitmapData.fromFile(request.url,function(bitmapData) {
				worker.sendComplete(bitmapData);
			},function() {
				worker.sendError("ioError");
			});
		});
		worker.onError.add($bind(this,this.BitmapData_onError));
		worker.onComplete.add($bind(this,this.BitmapData_onLoad));
		worker.run();
	}
	,loadBytes: function(buffer,context) {
		var worker = new lime_system_BackgroundWorker();
		worker.doWork.add(function(_) {
			openfl_display_BitmapData.fromBytes(buffer,null,function(bitmapData) {
				worker.sendComplete(bitmapData);
			});
		});
		worker.onComplete.add($bind(this,this.BitmapData_onLoad));
		worker.run();
	}
	,unload: function() {
		if(this.get_numChildren() > 0) {
			while(this.get_numChildren() > 0) this.removeChildAt(0);
			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;
			var event = new openfl_events_Event("unload");
			event.currentTarget = this;
			this.__dispatchEvent(event);
		}
	}
	,unloadAndStop: function(gc) {
		if(gc == null) {
			gc = true;
		}
		openfl_Lib.notImplemented("Loader.unloadAndStop");
	}
	,BitmapData_onLoad: function(bitmapData) {
		this.contentLoaderInfo.content = new openfl_display_Bitmap(bitmapData);
		this.content = this.contentLoaderInfo.content;
		this.addChild(this.contentLoaderInfo.content);
		var event = new openfl_events_Event("complete");
		event.target = this.contentLoaderInfo;
		event.currentTarget = this.contentLoaderInfo;
		this.contentLoaderInfo.dispatchEvent(event);
	}
	,BitmapData_onError: function(_) {
		var event = new openfl_events_IOErrorEvent("ioError");
		event.target = this.contentLoaderInfo;
		event.currentTarget = this.contentLoaderInfo;
		this.contentLoaderInfo.dispatchEvent(event);
	}
	,__class__: openfl_display_Loader
});
var openfl_display_OpenGLView = function() {
	openfl_display_DirectRenderer.call(this,"OpenGLView");
	if(!this.__added) {
		this.__added = true;
		haxe_Log.trace("Warning: OpenGLView is not available in HTML5 canvas rendering mode",{ fileName : "OpenGLView.hx", lineNumber : 76, className : "openfl.display.OpenGLView", methodName : "new"});
		haxe_Log.trace("Please compile your project using -Ddom or -Dwebgl (beta) to enable",{ fileName : "OpenGLView.hx", lineNumber : 77, className : "openfl.display.OpenGLView", methodName : "new"});
	}
};
$hxClasses["openfl.display.OpenGLView"] = openfl_display_OpenGLView;
openfl_display_OpenGLView.__name__ = ["openfl","display","OpenGLView"];
openfl_display_OpenGLView.__properties__ = {get_isSupported:"get_isSupported"}
openfl_display_OpenGLView.isSupported = null;
openfl_display_OpenGLView.get_isSupported = function() {
	return false;
};
openfl_display_OpenGLView.__super__ = openfl_display_DirectRenderer;
openfl_display_OpenGLView.prototype = $extend(openfl_display_DirectRenderer.prototype,{
	__renderCanvas: function(renderSession) {
	}
	,__renderDOM: function(renderSession) {
		if(this.stage != null && this.__worldVisible && this.__renderable) {
			if(!this.__added) {
				renderSession.element.appendChild(this.__canvas);
				this.__added = true;
				openfl__$internal_renderer_dom_DOMRenderer.initializeElement(this,this.__canvas,renderSession);
			}
			if(this.__context != null) {
				var rect = null;
				if(this.get_scrollRect() == null) {
					rect = new openfl_geom_Rectangle(0,0,this.stage.stageWidth,this.stage.stageHeight);
				} else {
					rect = new openfl_geom_Rectangle(this.get_x() + this.get_scrollRect().x,this.get_y() + this.get_scrollRect().y,this.get_scrollRect().width,this.get_scrollRect().height);
				}
				if(this.__render != null) {
					this.__render(rect);
				}
			}
		} else if(this.__added) {
			renderSession.element.removeChild(this.__canvas);
			this.__added = false;
		}
	}
	,__renderGL: function(renderSession) {
		if(this.stage != null && this.__renderable) {
			var rect = null;
			if(this.get_scrollRect() == null) {
				rect = new openfl_geom_Rectangle(0,0,this.stage.stageWidth,this.stage.stageHeight);
			} else {
				rect = new openfl_geom_Rectangle(this.get_x() + this.get_scrollRect().x,this.get_y() + this.get_scrollRect().y,this.get_scrollRect().width,this.get_scrollRect().height);
			}
			if(this.__render != null) {
				this.__render(rect);
			}
			renderSession.shaderManager.setShader(null);
			renderSession.blendModeManager.setBlendMode(null);
		}
	}
	,__class__: openfl_display_OpenGLView
});
var openfl_display_PNGEncoderOptions = function(fastCompression) {
	if(fastCompression == null) {
		fastCompression = false;
	}
	this.fastCompression = fastCompression;
};
$hxClasses["openfl.display.PNGEncoderOptions"] = openfl_display_PNGEncoderOptions;
openfl_display_PNGEncoderOptions.__name__ = ["openfl","display","PNGEncoderOptions"];
openfl_display_PNGEncoderOptions.prototype = {
	__class__: openfl_display_PNGEncoderOptions
};
var openfl_display__$PixelSnapping_PixelSnapping_$Impl_$ = {};
$hxClasses["openfl.display._PixelSnapping.PixelSnapping_Impl_"] = openfl_display__$PixelSnapping_PixelSnapping_$Impl_$;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.__name__ = ["openfl","display","_PixelSnapping","PixelSnapping_Impl_"];
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.fromString = function(value) {
	switch(value) {
	case "always":
		return 0;
	case "auto":
		return 1;
	case "never":
		return 2;
	default:
		return null;
	}
};
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "always";
	case 1:
		return "auto";
	case 2:
		return "never";
	default:
		return null;
	}
};
var openfl_display_Preloader = function(display) {
	lime_app_Preloader.call(this);
	if(display != null) {
		this.display = display;
		openfl_Lib.current.addChild(display);
		if(js_Boot.__instanceof(display,NMEPreloader)) {
			(js_Boot.__cast(display , NMEPreloader)).onInit();
		}
	}
};
$hxClasses["openfl.display.Preloader"] = openfl_display_Preloader;
openfl_display_Preloader.__name__ = ["openfl","display","Preloader"];
openfl_display_Preloader.__super__ = lime_app_Preloader;
openfl_display_Preloader.prototype = $extend(lime_app_Preloader.prototype,{
	load: function(urls,types) {
		var sounds = [];
		var url = null;
		var _g1 = 0;
		var _g = urls.length;
		while(_g1 < _g) {
			var i = _g1++;
			url = urls[i];
			switch(types[i]) {
			case "MUSIC":case "SOUND":
				var sound = haxe_io_Path.withoutExtension(url);
				if(!HxOverrides.remove(sounds,sound)) {
					this.total++;
				}
				sounds.push(sound);
				break;
			default:
			}
		}
		var _g2 = 0;
		while(_g2 < sounds.length) {
			var soundName = sounds[_g2];
			++_g2;
			var sound1 = new openfl_media_Sound();
			sound1.addEventListener("complete",$bind(this,this.sound_onComplete));
			sound1.addEventListener("ioError",$bind(this,this.sound_onIOError));
			sound1.load(new openfl_net_URLRequest(soundName + ".ogg"));
		}
		lime_app_Preloader.prototype.load.call(this,urls,types);
	}
	,start: function() {
		if(this.display != null && js_Boot.__instanceof(this.display,NMEPreloader)) {
			this.display.addEventListener("complete",$bind(this,this.display_onComplete));
			(js_Boot.__cast(this.display , NMEPreloader)).onLoaded();
		} else {
			lime_app_Preloader.prototype.start.call(this);
		}
	}
	,update: function(loaded,total) {
		if(this.display != null && js_Boot.__instanceof(this.display,NMEPreloader)) {
			(js_Boot.__cast(this.display , NMEPreloader)).onUpdate(loaded,total);
		}
	}
	,display_onComplete: function(event) {
		this.display.removeEventListener("complete",$bind(this,this.display_onComplete));
		openfl_Lib.current.removeChild(this.display);
		openfl_Lib.current.stage.set_focus(null);
		this.display = null;
		lime_app_Preloader.prototype.start.call(this);
	}
	,sound_onComplete: function(event) {
		this.loaded++;
		this.onProgress.dispatch(this.loaded,this.total);
		if(this.loaded == this.total) {
			this.start();
		}
	}
	,sound_onIOError: function(event) {
		this.loaded++;
		this.onProgress.dispatch(this.loaded,this.total);
		if(this.loaded == this.total) {
			this.start();
		}
	}
	,__class__: openfl_display_Preloader
});
var openfl_display_Shader = function(precision) {
	if(precision == null) {
		precision = 1;
	}
	this.__dirty = true;
	this.repeatY = 33071;
	this.repeatX = 33071;
	this.precision = 1;
	this.precision = precision;
	this.data = new haxe_ds_StringMap();
	var this1 = this.data;
	var key = openfl_display_Shader.uObjectSize;
	var value = new openfl_display_GLShaderParameter("vec2");
	var _this = this1;
	if(__map_reserved[key] != null) {
		_this.setReserved(key,value);
	} else {
		_this.h[key] = value;
	}
	var this2 = this.data;
	var key1 = openfl_display_Shader.uTextureSize;
	var value1 = new openfl_display_GLShaderParameter("vec2");
	var _this1 = this2;
	if(__map_reserved[key1] != null) {
		_this1.setReserved(key1,value1);
	} else {
		_this1.h[key1] = value1;
	}
};
$hxClasses["openfl.display.Shader"] = openfl_display_Shader;
openfl_display_Shader.__name__ = ["openfl","display","Shader"];
openfl_display_Shader.prototype = {
	__init: function(gl) {
		var dirty = this.__dirty;
		if(dirty) {
			if(this.__shader != null) {
				this.__shader.destroy();
			}
			this.__shader = new openfl__$internal_renderer_opengl_shaders2_Shader(gl);
			var tmp = this.__vertexCode != null ? this.__vertexCode : openfl__$internal_renderer_opengl_shaders2_DefaultShader.VERTEX_SRC.join("\n");
			this.__shader.vertexString = tmp;
			this.__shader.fragmentString = this.__fragmentCode;
			this.__dirty = false;
		}
		this.__shader.init(dirty);
	}
	,__buildFragmentCode: function(code) {
		var output = [];
		output.push("#ifdef GL_ES");
		var tmp;
		switch(this.precision) {
		case 1:
			tmp = "precision mediump float;";
			break;
		case 2:
			tmp = "precision highp float;";
			break;
		default:
			tmp = "precision lowp float;";
		}
		output.push(tmp);
		output.push("#endif");
		output = output.concat(openfl_display_Shader.fragmentHeader);
		output.push(code);
		this.__fragmentCode = output.join("\n");
	}
	,__buildVertexCode: function(code) {
		var output = [];
		output.push("#ifdef GL_ES");
		var tmp;
		switch(this.precision) {
		case 1:
			tmp = "precision mediump float;";
			break;
		case 2:
			tmp = "precision highp float;";
			break;
		default:
			tmp = "precision lowp float;";
		}
		output.push(tmp);
		output.push("#endif");
		output = output.concat(openfl_display_Shader.vertexHeader);
		output.push(code);
		this.__vertexCode = output.join("\n");
	}
	,__class__: openfl_display_Shader
};
var openfl_display_GLShaderParameter = function(type,arraySize) {
	this.internalType = 0;
	this.transpose = false;
	this.repeatY = 33071;
	this.repeatX = 33071;
	this.smooth = false;
	this.arraySize = 0;
	this.size = 0;
	this.type = type;
	this.arraySize = arraySize == null ? 0 : arraySize;
	this.__init();
};
$hxClasses["openfl.display.GLShaderParameter"] = openfl_display_GLShaderParameter;
openfl_display_GLShaderParameter.__name__ = ["openfl","display","GLShaderParameter"];
openfl_display_GLShaderParameter.prototype = {
	__init: function() {
		var _g = this.type;
		switch(_g) {
		case "bool":
			this.internalType = 1;
			this.size = 1;
			if(this.internalType == 4) {
				throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
			}
			this.value = [0.0];
			break;
		case "float":
			this.internalType = 2;
			this.size = 1;
			if(this.internalType == 4) {
				throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
			}
			this.value = [0.0];
			break;
		case "int":
			this.internalType = 1;
			this.size = 1;
			if(this.internalType == 4) {
				throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
			}
			this.value = [0.0];
			break;
		case "sampler2D":case "samplerCube":
			if(_g.indexOf("vec") > -1) {
				if(StringTools.startsWith(this.type,"b") || StringTools.startsWith(this.type,"i")) {
					this.internalType = 1;
				} else {
					this.internalType = 2;
				}
				this.size = Std.parseInt(this.type.charAt(this.type.length - 1));
				var _g1 = [];
				var _g2 = 0;
				var _g11 = this.size;
				while(_g2 < _g11) {
					++_g2;
					_g1.push(0.0);
				}
				if(this.internalType == 4) {
					throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
				}
				this.value = _g1;
			} else if(_g.indexOf("mat") > -1) {
				this.internalType = 3;
				this.size = Std.parseInt(this.type.charAt(this.type.length - 1));
				var v;
				switch(this.size) {
				case 2:
					v = [1,0,1,0];
					break;
				case 3:
					v = [1,0,0,0,1,0,0,0,1];
					break;
				case 4:
					v = [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];
					break;
				default:
					v = [0];
				}
				if(this.internalType == 4) {
					throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
				}
				this.value = v;
			} else {
				this.internalType = 4;
				this.size = 0;
			}
			break;
		default:
			if(_g.indexOf("vec") > -1) {
				if(StringTools.startsWith(this.type,"b") || StringTools.startsWith(this.type,"i")) {
					this.internalType = 1;
				} else {
					this.internalType = 2;
				}
				this.size = Std.parseInt(this.type.charAt(this.type.length - 1));
				var _g3 = [];
				var _g21 = 0;
				var _g12 = this.size;
				while(_g21 < _g12) {
					++_g21;
					_g3.push(0.0);
				}
				if(this.internalType == 4) {
					throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
				}
				this.value = _g3;
			} else if(_g.indexOf("mat") > -1) {
				this.internalType = 3;
				this.size = Std.parseInt(this.type.charAt(this.type.length - 1));
				var v1;
				switch(this.size) {
				case 2:
					v1 = [1,0,1,0];
					break;
				case 3:
					v1 = [1,0,0,0,1,0,0,0,1];
					break;
				case 4:
					v1 = [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];
					break;
				default:
					v1 = [0];
				}
				if(this.internalType == 4) {
					throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
				}
				this.value = v1;
			} else {
				this.internalType = 0;
				haxe_Log.trace("Can't initialize value for type " + this.type,{ fileName : "Shader.hx", lineNumber : 307, className : "openfl.display.GLShaderParameter", methodName : "__init"});
			}
		}
	}
	,set_value: function(v) {
		if(this.internalType == 4) {
			throw new js__$Boot_HaxeError("This parameter doesn't accept a value, use bitmap instead");
		}
		return this.value = v;
	}
	,set_bitmap: function(v) {
		if(this.internalType != 4) {
			throw new js__$Boot_HaxeError("This parameter doesn't accept a bitmap, use value instead");
		}
		return this.bitmap = v;
	}
	,__class__: openfl_display_GLShaderParameter
	,__properties__: {set_bitmap:"set_bitmap",set_value:"set_value"}
};
var openfl_display_Shape = function() {
	openfl_display_DisplayObject.call(this);
};
$hxClasses["openfl.display.Shape"] = openfl_display_Shape;
openfl_display_Shape.__name__ = ["openfl","display","Shape"];
openfl_display_Shape.__super__ = openfl_display_DisplayObject;
openfl_display_Shape.prototype = $extend(openfl_display_DisplayObject.prototype,{
	get_graphics: function() {
		if(this.__graphics == null) {
			this.__graphics = new openfl_display_Graphics();
			this.__graphics.__owner = this;
		}
		return this.__graphics;
	}
	,__class__: openfl_display_Shape
	,__properties__: $extend(openfl_display_DisplayObject.prototype.__properties__,{get_graphics:"get_graphics"})
});
var openfl_display__$SpreadMethod_SpreadMethod_$Impl_$ = {};
$hxClasses["openfl.display._SpreadMethod.SpreadMethod_Impl_"] = openfl_display__$SpreadMethod_SpreadMethod_$Impl_$;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.__name__ = ["openfl","display","_SpreadMethod","SpreadMethod_Impl_"];
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.fromString = function(value) {
	switch(value) {
	case "pad":
		return 0;
	case "reflect":
		return 1;
	case "repeat":
		return 2;
	default:
		return null;
	}
};
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "pad";
	case 1:
		return "reflect";
	case 2:
		return "repeat";
	default:
		return null;
	}
};
var openfl_display_Stage = function(window,color) {
	openfl_display_DisplayObjectContainer.call(this);
	this.application = window.application;
	this.window = window;
	if(color == null) {
		this.__transparent = true;
		this.set_color(0);
	} else {
		this.set_color(color);
	}
	this.set_name(null);
	this.__deltaTime = 0;
	this.__displayState = 2;
	this.__mouseX = 0;
	this.__mouseY = 0;
	this.__lastClickTime = 0;
	this.stageWidth = window.__width * window.__scale | 0;
	this.stageHeight = window.__height * window.__scale | 0;
	this.stage = this;
	this.align = 6;
	this.allowsFullScreen = false;
	this.allowsFullScreenInteractive = false;
	this.quality = 1;
	this.scaleMode = 2;
	this.stageFocusRect = true;
	this.__macKeyboard = /AppleWebKit/.test (navigator.userAgent) && /Mobile\/\w+/.test (navigator.userAgent) || /Mac/.test (navigator.platform);
	this.__clearBeforeRender = true;
	this.__stack = [];
	this.__mouseOutStack = [];
	var this1 = new openfl_VectorData();
	var this2 = new Array(0);
	this1.data = this2;
	this1.length = 0;
	this1.fixed = false;
	this.stage3Ds = this1;
	var this3 = this.stage3Ds;
	var x = new openfl_display_Stage3D();
	if(!this3.fixed) {
		this3.length++;
		if(this3.data.length < this3.length) {
			var length = this3.data.length + 10;
			var this4 = new Array(length);
			var data = this4;
			haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data,0,this3.data.length);
			this3.data = data;
		}
		this3.data[this3.length - 1] = x;
	}
	if(openfl_Lib.current.stage == null) {
		this.stage.addChild(openfl_Lib.current);
	}
};
$hxClasses["openfl.display.Stage"] = openfl_display_Stage;
openfl_display_Stage.__name__ = ["openfl","display","Stage"];
openfl_display_Stage.__interfaces__ = [lime_app_IModule];
openfl_display_Stage.__super__ = openfl_display_DisplayObjectContainer;
openfl_display_Stage.prototype = $extend(openfl_display_DisplayObjectContainer.prototype,{
	globalToLocal: function(pos) {
		return pos.clone();
	}
	,invalidate: function() {
		this.__invalidated = true;
	}
	,localToGlobal: function(pos) {
		return pos.clone();
	}
	,onGamepadAxisMove: function(gamepad,axis,value) {
		openfl_ui_GameInput.__onGamepadAxisMove(gamepad,axis,value);
	}
	,onGamepadButtonDown: function(gamepad,button) {
		openfl_ui_GameInput.__onGamepadButtonDown(gamepad,button);
	}
	,onGamepadButtonUp: function(gamepad,button) {
		openfl_ui_GameInput.__onGamepadButtonUp(gamepad,button);
	}
	,onGamepadConnect: function(gamepad) {
		openfl_ui_GameInput.__onGamepadConnect(gamepad);
	}
	,onGamepadDisconnect: function(gamepad) {
		openfl_ui_GameInput.__onGamepadDisconnect(gamepad);
	}
	,onJoystickAxisMove: function(joystick,axis,value) {
	}
	,onJoystickButtonDown: function(joystick,button) {
	}
	,onJoystickButtonUp: function(joystick,button) {
	}
	,onJoystickConnect: function(joystick) {
	}
	,onJoystickDisconnect: function(joystick) {
	}
	,onJoystickHatMove: function(joystick,hat,position) {
	}
	,onJoystickTrackballMove: function(joystick,trackball,value) {
	}
	,onKeyDown: function(window,keyCode,modifier) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__onKey("keyDown",keyCode,modifier);
	}
	,onKeyUp: function(window,keyCode,modifier) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__onKey("keyUp",keyCode,modifier);
	}
	,onModuleExit: function(code) {
		if(this.window != null) {
			this.__broadcast(new openfl_events_Event("deactivate"),true);
		}
	}
	,onMouseDown: function(window,x,y,button) {
		if(this.window == null || this.window != window) {
			return;
		}
		var type;
		switch(button) {
		case 1:
			type = "middleMouseDown";
			break;
		case 2:
			type = "rightMouseDown";
			break;
		default:
			type = "mouseDown";
		}
		this.__onMouse(type,x * window.__scale | 0,y * window.__scale | 0,button);
	}
	,onMouseMove: function(window,x,y) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__onMouse("mouseMove",x * window.__scale | 0,y * window.__scale | 0,0);
	}
	,onMouseMoveRelative: function(window,x,y) {
	}
	,onMouseUp: function(window,x,y,button) {
		if(this.window == null || this.window != window) {
			return;
		}
		var type;
		switch(button) {
		case 1:
			type = "middleMouseUp";
			break;
		case 2:
			type = "rightMouseUp";
			break;
		default:
			type = "mouseUp";
		}
		this.__onMouse(type,x * window.__scale | 0,y * window.__scale | 0,button);
	}
	,onMouseWheel: function(window,deltaX,deltaY) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__onMouseWheel(deltaX * window.__scale | 0,deltaY * window.__scale | 0);
	}
	,onPreloadComplete: function() {
	}
	,onPreloadProgress: function(loaded,total) {
	}
	,onRenderContextLost: function(renderer) {
	}
	,onRenderContextRestored: function(renderer,context) {
	}
	,onTextEdit: function(window,text,start,length) {
	}
	,onTextInput: function(window,text) {
		if(this.window == null || this.window != window) {
			return;
		}
		var stack = [];
		if(this.__focus == null) {
			this.__getInteractive(stack);
		} else {
			this.__focus.__getInteractive(stack);
		}
		var event = new openfl_events_TextEvent("textInput",true,false,text);
		if(stack.length > 0) {
			stack.reverse();
			this.__fireEvent(event,stack);
		} else {
			this.__broadcast(event,true);
		}
	}
	,onTouchMove: function(touch) {
		this.__onTouch("touchMove",touch);
	}
	,onTouchEnd: function(touch) {
		this.__onTouch("touchEnd",touch);
	}
	,onTouchStart: function(touch) {
		this.__onTouch("touchBegin",touch);
	}
	,onWindowActivate: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__broadcast(new openfl_events_Event("activate"),true);
	}
	,onWindowClose: function(window) {
		if(this.window == window) {
			this.window = null;
		}
	}
	,onWindowCreate: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		if(window.renderer != null) {
			var _g = window.renderer.context;
			switch(_g[1]) {
			case 0:
				break;
			case 1:
				this.__renderer = new openfl__$internal_renderer_canvas_CanvasRenderer(this.stageWidth,this.stageHeight,_g[2]);
				break;
			case 2:
				break;
			case 4:
				break;
			case 5:
				break;
			default:
			}
		}
	}
	,onWindowDeactivate: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__broadcast(new openfl_events_Event("deactivate"),true);
	}
	,onWindowDropFile: function(window,file) {
	}
	,onWindowEnter: function(window) {
	}
	,onWindowFocusIn: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__broadcast(new openfl_events_FocusEvent("focusIn",true,false,null,false,0),true);
	}
	,onWindowFocusOut: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__broadcast(new openfl_events_FocusEvent("focusOut",true,false,null,false,0),true);
	}
	,onWindowFullscreen: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		if(this.__displayState == 2) {
			this.__displayState = 1;
		}
	}
	,onWindowLeave: function(window) {
		if(this.window == null || this.window != window) {
			return;
		}
		this.__dispatchEvent(new openfl_events_Event("mouseLeave"));
	}
	,onWindowMinimize: function(window) {
	}
	,onWindowMove: function(window,x,y) {
	}
	,onWindowResize: function(window,width,height) {
		if(this.window == null || this.window != window) {
			return;
		}
		if(this.__displayState != 2 && !window.__fullscreen) {
			this.__displayState = 2;
		}
		this.stageWidth = width * window.__scale | 0;
		this.stageHeight = height * window.__scale | 0;
		if(this.__renderer != null) {
			this.__renderer.resize(this.stageWidth,this.stageHeight);
		}
		this.__broadcast(new openfl_events_Event("resize"),false);
	}
	,onWindowRestore: function(window) {
	}
	,render: function(renderer) {
		if(renderer.window == null || renderer.window != this.window) {
			return;
		}
		if(this.application != null && this.application.windows.length > 0) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			if(!this.__renderDirty) {
				this.__updateCachedBitmap = true;
				this.__updateFilters = this.get_filters() != null && this.get_filters().length > 0;
				this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		if(this.__rendering) {
			return;
		}
		this.__rendering = true;
		this.__broadcast(new openfl_events_Event("enterFrame"),true);
		if(this.__invalidated) {
			this.__invalidated = false;
			this.__broadcast(new openfl_events_Event("render"),true);
		}
		this.__renderable = true;
		this.__enterFrame(this.__deltaTime);
		this.__deltaTime = 0;
		this.__update(false,true);
		if(this.__renderer != null) {
			var _g = renderer.context;
			if(_g[1] == 4) {
				var cairo = _g[2];
				(js_Boot.__cast(this.__renderer , openfl__$internal_renderer_cairo_CairoRenderer)).cairo = cairo;
				this.__renderer.renderSession.cairo = cairo;
			}
			this.__renderer.render(this);
		}
		this.__rendering = false;
	}
	,update: function(deltaTime) {
		this.__deltaTime = deltaTime;
	}
	,__drag: function(mouse) {
		var parent = this.__dragObject.parent;
		if(parent != null) {
			mouse = parent.globalToLocal(mouse);
		}
		var x = mouse.x + this.__dragOffsetX;
		var y = mouse.y + this.__dragOffsetY;
		if(this.__dragBounds != null) {
			if(x < this.__dragBounds.x) {
				x = this.__dragBounds.x;
			} else if(x > this.__dragBounds.get_right()) {
				x = this.__dragBounds.get_right();
			}
			if(y < this.__dragBounds.y) {
				y = this.__dragBounds.y;
			} else if(y > this.__dragBounds.get_bottom()) {
				y = this.__dragBounds.get_bottom();
			}
		}
		this.__dragObject.set_x(x);
		this.__dragObject.set_y(y);
	}
	,__fireEvent: function(event,stack) {
		var length = stack.length;
		if(length == 0) {
			event.eventPhase = 2;
			event.target.__broadcast(event,false);
		} else {
			event.eventPhase = 1;
			event.target = stack[stack.length - 1];
			var _g1 = 0;
			var _g = length - 1;
			while(_g1 < _g) {
				stack[_g1++].__broadcast(event,false);
				if(event.__isCanceled) {
					return;
				}
			}
			event.eventPhase = 2;
			event.target.__broadcast(event,false);
			if(event.__isCanceled) {
				return;
			}
			if(event.bubbles) {
				event.eventPhase = 3;
				var i = length - 2;
				while(i >= 0) {
					stack[i].__broadcast(event,false);
					if(event.__isCanceled) {
						return;
					}
					--i;
				}
			}
		}
	}
	,__getInteractive: function(stack) {
		if(stack != null) {
			stack.push(this);
		}
		return true;
	}
	,__onKey: function(type,keyCode,modifier) {
		openfl_events_MouseEvent.__altKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(modifier);
		openfl_events_MouseEvent.__commandKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(modifier);
		openfl_events_MouseEvent.__ctrlKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier);
		openfl_events_MouseEvent.__shiftKey = lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier);
		var stack = [];
		if(this.__focus == null) {
			this.__getInteractive(stack);
		} else {
			this.__focus.__getInteractive(stack);
		}
		if(stack.length > 0) {
			var keyLocation;
			switch(keyCode) {
			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:
				keyLocation = 3;
				break;
			case 1073742048:case 1073742049:case 1073742050:case 1073742051:
				keyLocation = 1;
				break;
			case 1073742052:case 1073742053:case 1073742054:case 1073742055:
				keyLocation = 2;
				break;
			default:
				keyLocation = 0;
			}
			var keyCode1;
			switch(keyCode) {
			case 8:
				keyCode1 = 8;
				break;
			case 9:
				keyCode1 = 9;
				break;
			case 13:
				keyCode1 = 13;
				break;
			case 27:
				keyCode1 = 27;
				break;
			case 32:
				keyCode1 = 32;
				break;
			case 33:
				keyCode1 = 49;
				break;
			case 34:
				keyCode1 = 222;
				break;
			case 35:
				keyCode1 = 51;
				break;
			case 36:
				keyCode1 = 52;
				break;
			case 37:
				keyCode1 = 53;
				break;
			case 38:
				keyCode1 = 55;
				break;
			case 39:
				keyCode1 = 222;
				break;
			case 40:
				keyCode1 = 57;
				break;
			case 41:
				keyCode1 = 48;
				break;
			case 42:
				keyCode1 = 56;
				break;
			case 44:
				keyCode1 = 188;
				break;
			case 45:
				keyCode1 = 189;
				break;
			case 46:
				keyCode1 = 190;
				break;
			case 47:
				keyCode1 = 191;
				break;
			case 48:
				keyCode1 = 48;
				break;
			case 49:
				keyCode1 = 49;
				break;
			case 50:
				keyCode1 = 50;
				break;
			case 51:
				keyCode1 = 51;
				break;
			case 52:
				keyCode1 = 52;
				break;
			case 53:
				keyCode1 = 53;
				break;
			case 54:
				keyCode1 = 54;
				break;
			case 55:
				keyCode1 = 55;
				break;
			case 56:
				keyCode1 = 56;
				break;
			case 57:
				keyCode1 = 57;
				break;
			case 58:
				keyCode1 = 186;
				break;
			case 59:
				keyCode1 = 186;
				break;
			case 60:
				keyCode1 = 60;
				break;
			case 61:
				keyCode1 = 187;
				break;
			case 62:
				keyCode1 = 190;
				break;
			case 63:
				keyCode1 = 191;
				break;
			case 64:
				keyCode1 = 50;
				break;
			case 91:
				keyCode1 = 219;
				break;
			case 92:
				keyCode1 = 220;
				break;
			case 93:
				keyCode1 = 221;
				break;
			case 94:
				keyCode1 = 54;
				break;
			case 95:
				keyCode1 = 189;
				break;
			case 96:
				keyCode1 = 192;
				break;
			case 97:
				keyCode1 = 65;
				break;
			case 98:
				keyCode1 = 66;
				break;
			case 99:
				keyCode1 = 67;
				break;
			case 100:
				keyCode1 = 68;
				break;
			case 101:
				keyCode1 = 69;
				break;
			case 102:
				keyCode1 = 70;
				break;
			case 103:
				keyCode1 = 71;
				break;
			case 104:
				keyCode1 = 72;
				break;
			case 105:
				keyCode1 = 73;
				break;
			case 106:
				keyCode1 = 74;
				break;
			case 107:
				keyCode1 = 75;
				break;
			case 108:
				keyCode1 = 76;
				break;
			case 109:
				keyCode1 = 77;
				break;
			case 110:
				keyCode1 = 78;
				break;
			case 111:
				keyCode1 = 79;
				break;
			case 112:
				keyCode1 = 80;
				break;
			case 113:
				keyCode1 = 81;
				break;
			case 114:
				keyCode1 = 82;
				break;
			case 115:
				keyCode1 = 83;
				break;
			case 116:
				keyCode1 = 84;
				break;
			case 117:
				keyCode1 = 85;
				break;
			case 118:
				keyCode1 = 86;
				break;
			case 119:
				keyCode1 = 87;
				break;
			case 120:
				keyCode1 = 88;
				break;
			case 121:
				keyCode1 = 89;
				break;
			case 122:
				keyCode1 = 90;
				break;
			case 127:
				keyCode1 = 46;
				break;
			case 1073741881:
				keyCode1 = 20;
				break;
			case 1073741882:
				keyCode1 = 112;
				break;
			case 1073741883:
				keyCode1 = 113;
				break;
			case 1073741884:
				keyCode1 = 114;
				break;
			case 1073741885:
				keyCode1 = 115;
				break;
			case 1073741886:
				keyCode1 = 116;
				break;
			case 1073741887:
				keyCode1 = 117;
				break;
			case 1073741888:
				keyCode1 = 118;
				break;
			case 1073741889:
				keyCode1 = 119;
				break;
			case 1073741890:
				keyCode1 = 120;
				break;
			case 1073741891:
				keyCode1 = 121;
				break;
			case 1073741892:
				keyCode1 = 122;
				break;
			case 1073741893:
				keyCode1 = 123;
				break;
			case 1073741894:
				keyCode1 = 301;
				break;
			case 1073741895:
				keyCode1 = 145;
				break;
			case 1073741896:
				keyCode1 = 19;
				break;
			case 1073741897:
				keyCode1 = 45;
				break;
			case 1073741898:
				keyCode1 = 36;
				break;
			case 1073741899:
				keyCode1 = 33;
				break;
			case 1073741901:
				keyCode1 = 35;
				break;
			case 1073741902:
				keyCode1 = 34;
				break;
			case 1073741903:
				keyCode1 = 39;
				break;
			case 1073741904:
				keyCode1 = 37;
				break;
			case 1073741905:
				keyCode1 = 40;
				break;
			case 1073741906:
				keyCode1 = 38;
				break;
			case 1073741907:
				keyCode1 = 144;
				break;
			case 1073741908:
				keyCode1 = 111;
				break;
			case 1073741909:
				keyCode1 = 106;
				break;
			case 1073741910:
				keyCode1 = 109;
				break;
			case 1073741911:
				keyCode1 = 107;
				break;
			case 1073741912:
				keyCode1 = 108;
				break;
			case 1073741913:
				keyCode1 = 97;
				break;
			case 1073741914:
				keyCode1 = 98;
				break;
			case 1073741915:
				keyCode1 = 99;
				break;
			case 1073741916:
				keyCode1 = 100;
				break;
			case 1073741917:
				keyCode1 = 101;
				break;
			case 1073741918:
				keyCode1 = 102;
				break;
			case 1073741919:
				keyCode1 = 103;
				break;
			case 1073741920:
				keyCode1 = 104;
				break;
			case 1073741921:
				keyCode1 = 105;
				break;
			case 1073741922:
				keyCode1 = 96;
				break;
			case 1073741923:
				keyCode1 = 110;
				break;
			case 1073741925:
				keyCode1 = 302;
				break;
			case 1073741928:
				keyCode1 = 124;
				break;
			case 1073741929:
				keyCode1 = 125;
				break;
			case 1073741930:
				keyCode1 = 126;
				break;
			case 1073741982:
				keyCode1 = 13;
				break;
			case 1073742044:
				keyCode1 = 110;
				break;
			case 1073742048:
				keyCode1 = 17;
				break;
			case 1073742049:
				keyCode1 = 16;
				break;
			case 1073742050:
				keyCode1 = 18;
				break;
			case 1073742051:
				keyCode1 = 15;
				break;
			case 1073742052:
				keyCode1 = 17;
				break;
			case 1073742053:
				keyCode1 = 16;
				break;
			case 1073742054:
				keyCode1 = 18;
				break;
			case 1073742055:
				keyCode1 = 15;
				break;
			default:
				keyCode1 = keyCode;
			}
			var event = new openfl_events_KeyboardEvent(type,true,false,openfl_ui_Keyboard.__getCharCode(keyCode1,lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier)),keyCode1,keyLocation,this.__macKeyboard ? lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier) || lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(modifier) : lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_altKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_ctrlKey(modifier),lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_metaKey(modifier));
			stack.reverse();
			this.__fireEvent(event,stack);
			if(event.__isCanceled) {
				if(type == "keyDown") {
					this.window.onKeyDown.cancel();
				} else {
					this.window.onKeyUp.cancel();
				}
			}
		}
	}
	,__onMouse: function(type,x,y,button) {
		if(button > 2) {
			return;
		}
		this.__mouseX = x;
		this.__mouseY = y;
		var stack = [];
		var target = null;
		var targetPoint = new openfl_geom_Point(x,y);
		if(this.__hitTest(x,y,true,stack,true,this)) {
			target = stack[stack.length - 1];
		} else {
			target = this;
			stack = [this];
		}
		if(target == null) {
			target = this;
		}
		var clickType = null;
		switch(type) {
		case "middleMouseDown":
			this.__mouseDownMiddle = target;
			break;
		case "middleMouseUp":
			if(this.__mouseDownMiddle == target) {
				clickType = "middleClick";
			}
			this.__mouseDownMiddle = null;
			break;
		case "mouseDown":
			if(target.get_tabEnabled()) {
				this.set_focus(target);
			} else {
				this.set_focus(null);
			}
			this.__mouseDownLeft = target;
			break;
		case "mouseUp":
			if(this.__mouseDownLeft == target) {
				clickType = "click";
			}
			this.__mouseDownLeft = null;
			break;
		case "rightMouseDown":
			this.__mouseDownRight = target;
			break;
		case "rightMouseUp":
			if(this.__mouseDownRight == target) {
				clickType = "rightClick";
			}
			this.__mouseDownRight = null;
			break;
		default:
		}
		this.__fireEvent(openfl_events_MouseEvent.__create(type,button,this.__mouseX,this.__mouseY,target == this ? targetPoint : target.globalToLocal(targetPoint),target),stack);
		if(clickType != null) {
			this.__fireEvent(openfl_events_MouseEvent.__create(clickType,button,this.__mouseX,this.__mouseY,target == this ? targetPoint : target.globalToLocal(targetPoint),target),stack);
			if(type == "mouseUp" && (js_Boot.__cast(target , openfl_display_InteractiveObject)).doubleClickEnabled) {
				var currentTime = openfl_Lib.getTimer();
				if(currentTime - this.__lastClickTime < 500) {
					this.__fireEvent(openfl_events_MouseEvent.__create("doubleClick",button,this.__mouseX,this.__mouseY,target == this ? targetPoint : target.globalToLocal(targetPoint),target),stack);
					this.__lastClickTime = 0;
				} else {
					this.__lastClickTime = currentTime;
				}
			}
		}
		var cursor = null;
		var _g = 0;
		while(_g < stack.length) {
			var target1 = stack[_g];
			++_g;
			cursor = target1.__getCursor();
			if(cursor != null) {
				lime_ui_Mouse.set_cursor(cursor);
				break;
			}
		}
		if(cursor == null) {
			lime_ui_Mouse.set_cursor(lime_ui_MouseCursor.ARROW);
		}
		var event;
		var localPoint;
		var _g1 = 0;
		var _g11 = this.__mouseOutStack;
		while(_g1 < _g11.length) {
			var target2 = _g11[_g1];
			++_g1;
			if(stack.indexOf(target2) == -1) {
				HxOverrides.remove(this.__mouseOutStack,target2);
				localPoint = target2.globalToLocal(targetPoint);
				event = openfl_events_MouseEvent.__create("mouseOut",button,this.__mouseX,this.__mouseY,localPoint,target2);
				event.bubbles = false;
				target2.__dispatchEvent(event);
			}
		}
		var _g2 = 0;
		while(_g2 < stack.length) {
			var target3 = stack[_g2];
			++_g2;
			if(this.__mouseOutStack.indexOf(target3) == -1) {
				if(target3.hasEventListener("mouseOver")) {
					localPoint = target3.globalToLocal(targetPoint);
					event = openfl_events_MouseEvent.__create("mouseOver",button,this.__mouseX,this.__mouseY,localPoint,target3);
					event.bubbles = false;
					target3.__dispatchEvent(event);
				}
				if(target3.hasEventListener("mouseOut")) {
					this.__mouseOutStack.push(target3);
				}
			}
		}
		if(this.__dragObject != null) {
			this.__drag(targetPoint);
		}
	}
	,__onMouseWheel: function(deltaX,deltaY) {
		var x = this.__mouseX;
		var y = this.__mouseY;
		var stack = [];
		if(!this.__hitTest(x,y,false,stack,true,this)) {
			stack = [this];
		}
		var target = stack[stack.length - 1];
		var targetPoint = new openfl_geom_Point(x,y);
		this.__fireEvent(openfl_events_MouseEvent.__create("mouseWheel",0,this.__mouseX,this.__mouseY,target == this ? targetPoint : target.globalToLocal(targetPoint),target,deltaY | 0),stack);
	}
	,__onTouch: function(type,touch) {
		var point = new openfl_geom_Point(touch.x * this.stageWidth,touch.y * this.stageHeight);
		this.__mouseX = point.x;
		this.__mouseY = point.y;
		var __stack = [];
		if(this.__hitTest(this.__mouseX,this.__mouseY,false,__stack,true,this)) {
			var target = __stack[__stack.length - 1];
			if(target == null) {
				target = this;
			}
			var localPoint = target.globalToLocal(point);
			var touchEvent = openfl_events_TouchEvent.__create(type,null,this.__mouseX,this.__mouseY,localPoint,target);
			touchEvent.touchPointID = touch.id;
			touchEvent.isPrimaryTouchPoint = true;
			this.__fireEvent(touchEvent,__stack);
		} else {
			var touchEvent1 = openfl_events_TouchEvent.__create(type,null,this.__mouseX,this.__mouseY,point,this);
			touchEvent1.touchPointID = touch.id;
			touchEvent1.isPrimaryTouchPoint = true;
			this.__fireEvent(touchEvent1,[this.stage]);
		}
	}
	,__resize: function() {
	}
	,__startDrag: function(sprite,lockCenter,bounds) {
		this.__dragBounds = bounds == null ? null : bounds.clone();
		this.__dragObject = sprite;
		if(this.__dragObject != null) {
			if(lockCenter) {
				this.__dragOffsetX = -this.__dragObject.get_width() / 2;
				this.__dragOffsetY = -this.__dragObject.get_height() / 2;
			} else {
				var mouse = new openfl_geom_Point(this.get_mouseX(),this.get_mouseY());
				var parent = this.__dragObject.parent;
				if(parent != null) {
					mouse = parent.globalToLocal(mouse);
				}
				this.__dragOffsetX = this.__dragObject.get_x() - mouse.x;
				this.__dragOffsetY = this.__dragObject.get_y() - mouse.y;
			}
		}
	}
	,__stopDrag: function(sprite) {
		this.__dragBounds = null;
		this.__dragObject = null;
	}
	,__update: function(transformOnly,updateChildren,maskGrahpics) {
		if(transformOnly) {
			if(openfl_display_DisplayObject.__worldTransformDirty > 0) {
				openfl_display_DisplayObjectContainer.prototype.__update.call(this,true,updateChildren,maskGrahpics);
				if(updateChildren) {
					openfl_display_DisplayObject.__worldTransformDirty = 0;
					this.__dirty = true;
				}
			}
		} else if(openfl_display_DisplayObject.__worldTransformDirty > 0 || this.__dirty || openfl_display_DisplayObject.__worldRenderDirty > 0) {
			openfl_display_DisplayObjectContainer.prototype.__update.call(this,false,updateChildren,maskGrahpics);
			if(updateChildren) {
				openfl_display_DisplayObject.__worldTransformDirty = 0;
				openfl_display_DisplayObject.__worldRenderDirty = 0;
				this.__dirty = false;
			}
		}
	}
	,get_mouseX: function() {
		return this.__mouseX;
	}
	,get_mouseY: function() {
		return this.__mouseY;
	}
	,canvas_onContextLost: function(event) {
	}
	,canvas_onContextRestored: function(event) {
	}
	,get_color: function() {
		return this.__color;
	}
	,set_color: function(value) {
		this.__colorSplit = [((value & 16711680) >>> 16) / 255,((value & 65280) >>> 8) / 255,(value & 255) / 255];
		this.__colorString = "#" + StringTools.hex(value,6);
		return this.__color = value;
	}
	,get_displayState: function() {
		return this.__displayState;
	}
	,set_displayState: function(value) {
		if(this.window != null) {
			if(value == 2) {
				if(this.window.__fullscreen) {
					this.window.set_fullscreen(false);
					this.stageWidth = this.window.__width * this.window.__scale | 0;
					this.stageHeight = this.window.__height * this.window.__scale | 0;
					this.dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,false,true));
				}
			} else if(!this.window.__fullscreen) {
				this.window.set_fullscreen(true);
				this.stageWidth = this.window.__width * this.window.__scale | 0;
				this.stageHeight = this.window.__height * this.window.__scale | 0;
				this.dispatchEvent(new openfl_events_FullScreenEvent("fullScreen",false,false,true,true));
			}
		}
		return this.__displayState = value;
	}
	,get_focus: function() {
		return this.__focus;
	}
	,set_focus: function(value) {
		if(value != this.__focus) {
			var oldFocus = this.__focus;
			this.__focus = value;
			if(oldFocus != null) {
				var event = new openfl_events_FocusEvent("focusOut",true,false,this.__focus,false,0);
				this.__stack = [];
				oldFocus.__getInteractive(this.__stack);
				this.__stack.reverse();
				this.__fireEvent(event,this.__stack);
			}
			if(this.__focus != null) {
				var event1 = new openfl_events_FocusEvent("focusIn",true,false,oldFocus,false,0);
				this.__stack = [];
				value.__getInteractive(this.__stack);
				this.__stack.reverse();
				this.__fireEvent(event1,this.__stack);
			}
		}
		return this.__focus;
	}
	,get_frameRate: function() {
		if(this.application != null) {
			return this.application.backend.getFrameRate();
		}
		return 0;
	}
	,set_frameRate: function(value) {
		if(this.application != null) {
			return this.application.backend.setFrameRate(value);
		}
		return value;
	}
	,__class__: openfl_display_Stage
	,__properties__: $extend(openfl_display_DisplayObjectContainer.prototype.__properties__,{set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",set_color:"set_color",get_color:"get_color"})
});
var openfl_display_Stage3D = function() {
	openfl_events_EventDispatcher.call(this);
};
$hxClasses["openfl.display.Stage3D"] = openfl_display_Stage3D;
openfl_display_Stage3D.__name__ = ["openfl","display","Stage3D"];
openfl_display_Stage3D.__super__ = openfl_events_EventDispatcher;
openfl_display_Stage3D.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	requestContext3D: function(context3DRenderMode) {
		if(context3DRenderMode == null) {
			context3DRenderMode = "";
		}
		var _gthis = this;
		if(openfl_display_OpenGLView.get_isSupported()) {
			haxe_Timer.delay(function() {
				_gthis.context3D = new openfl_display3D_Context3D();
				_gthis.dispatchEvent(new openfl_events_Event("context3DCreate"));
			},1);
		} else {
			haxe_Timer.delay(function() {
				_gthis.dispatchEvent(new openfl_events_ErrorEvent("error"));
			},1);
		}
	}
	,__class__: openfl_display_Stage3D
});
var openfl_display__$StageAlign_StageAlign_$Impl_$ = {};
$hxClasses["openfl.display._StageAlign.StageAlign_Impl_"] = openfl_display__$StageAlign_StageAlign_$Impl_$;
openfl_display__$StageAlign_StageAlign_$Impl_$.__name__ = ["openfl","display","_StageAlign","StageAlign_Impl_"];
openfl_display__$StageAlign_StageAlign_$Impl_$.fromString = function(value) {
	switch(value) {
	case "bottom":
		return 0;
	case "bottomLeft":
		return 1;
	case "bottomRight":
		return 2;
	case "left":
		return 3;
	case "right":
		return 4;
	case "top":
		return 5;
	case "topLeft":
		return 6;
	case "topRight":
		return 7;
	default:
		return null;
	}
};
openfl_display__$StageAlign_StageAlign_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "bottom";
	case 1:
		return "bottomLeft";
	case 2:
		return "bottomRight";
	case 3:
		return "left";
	case 4:
		return "right";
	case 5:
		return "top";
	case 6:
		return "topLeft";
	case 7:
		return "topRight";
	default:
		return null;
	}
};
var openfl_display__$StageDisplayState_StageDisplayState_$Impl_$ = {};
$hxClasses["openfl.display._StageDisplayState.StageDisplayState_Impl_"] = openfl_display__$StageDisplayState_StageDisplayState_$Impl_$;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.__name__ = ["openfl","display","_StageDisplayState","StageDisplayState_Impl_"];
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.fromString = function(value) {
	switch(value) {
	case "fullScreen":
		return 0;
	case "fullScreenInteractive":
		return 1;
	case "normal":
		return 2;
	default:
		return null;
	}
};
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "fullScreen";
	case 1:
		return "fullScreenInteractive";
	case 2:
		return "normal";
	default:
		return null;
	}
};
var openfl_display__$StageQuality_StageQuality_$Impl_$ = {};
$hxClasses["openfl.display._StageQuality.StageQuality_Impl_"] = openfl_display__$StageQuality_StageQuality_$Impl_$;
openfl_display__$StageQuality_StageQuality_$Impl_$.__name__ = ["openfl","display","_StageQuality","StageQuality_Impl_"];
openfl_display__$StageQuality_StageQuality_$Impl_$.fromString = function(value) {
	switch(value) {
	case "best":
		return 0;
	case "high":
		return 1;
	case "low":
		return 2;
	case "medium":
		return 3;
	default:
		return null;
	}
};
openfl_display__$StageQuality_StageQuality_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "best";
	case 1:
		return "high";
	case 2:
		return "low";
	case 3:
		return "medium";
	default:
		return null;
	}
};
var openfl_display__$StageScaleMode_StageScaleMode_$Impl_$ = {};
$hxClasses["openfl.display._StageScaleMode.StageScaleMode_Impl_"] = openfl_display__$StageScaleMode_StageScaleMode_$Impl_$;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.__name__ = ["openfl","display","_StageScaleMode","StageScaleMode_Impl_"];
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.fromString = function(value) {
	switch(value) {
	case "exactFit":
		return 0;
	case "noBorder":
		return 1;
	case "noScale":
		return 2;
	case "showAll":
		return 3;
	default:
		return null;
	}
};
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "exactFit";
	case 1:
		return "noBorder";
	case 2:
		return "noScale";
	case 3:
		return "showAll";
	default:
		return null;
	}
};
var openfl_display__$TriangleCulling_TriangleCulling_$Impl_$ = {};
$hxClasses["openfl.display._TriangleCulling.TriangleCulling_Impl_"] = openfl_display__$TriangleCulling_TriangleCulling_$Impl_$;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.__name__ = ["openfl","display","_TriangleCulling","TriangleCulling_Impl_"];
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.fromString = function(value) {
	switch(value) {
	case "negative":
		return 0;
	case "none":
		return 1;
	case "positive":
		return 2;
	default:
		return null;
	}
};
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "negative";
	case 1:
		return "none";
	case 2:
		return "positive";
	default:
		return null;
	}
};
var openfl_display_Window = function(config) {
	lime_ui_Window.call(this,config);
};
$hxClasses["openfl.display.Window"] = openfl_display_Window;
openfl_display_Window.__name__ = ["openfl","display","Window"];
openfl_display_Window.__super__ = lime_ui_Window;
openfl_display_Window.prototype = $extend(lime_ui_Window.prototype,{
	create: function(application) {
		lime_ui_Window.prototype.create.call(this,application);
		this.stage = new openfl_display_Stage(this,Object.prototype.hasOwnProperty.call(this.config,"background") ? this.config.background : 16777215);
		application.addModule(this.stage);
	}
	,__class__: openfl_display_Window
});
var openfl_display3D_Context3D = function() {
	this.disposed = false;
	this.stencilCompareMode = 519;
	this.stencilRef = 0;
	this.stencilReadMask = 255;
	this._yFlip = 1;
	this.vertexBuffersCreated = [];
	this.indexBuffersCreated = [];
	this.programsCreated = [];
	this.texturesCreated = [];
	this.samplerParameters = [];
	var _g1 = 0;
	var _g = openfl_display3D_Context3D.MAX_SAMPLERS;
	while(_g1 < _g) {
		var i = _g1++;
		this.samplerParameters[i] = new openfl_display3D__$Context3D_SamplerState();
		this.samplerParameters[i].wrap = openfl_display3D_Context3DWrapMode.CLAMP;
		this.samplerParameters[i].filter = openfl_display3D_Context3DTextureFilter.LINEAR;
		this.samplerParameters[i].mipfilter = openfl_display3D_Context3DMipFilter.MIPNONE;
	}
	var stage = openfl_Lib.current.stage;
	this.ogl = new openfl_display_OpenGLView();
	this.ogl.set_scrollRect(new openfl_geom_Rectangle(0,0,stage.stageWidth,stage.stageHeight));
	this.scrollRect = this.ogl.get_scrollRect().clone();
	this.ogl.set_width(stage.stageWidth);
	this.ogl.set_height(stage.stageHeight);
	stage.addChildAt(this.ogl,0);
	lime_graphics_opengl_GL.context.pixelStorei(37440,1);
	lime_graphics_opengl_GL.context.pixelStorei(37441,1);
};
$hxClasses["openfl.display3D.Context3D"] = openfl_display3D_Context3D;
openfl_display3D_Context3D.__name__ = ["openfl","display3D","Context3D"];
openfl_display3D_Context3D.prototype = {
	clear: function(red,green,blue,alpha,depth,stencil,mask) {
		if(mask == null) {
			mask = 17664;
		}
		if(stencil == null) {
			stencil = 0;
		}
		if(depth == null) {
			depth = 1;
		}
		if(alpha == null) {
			alpha = 1;
		}
		if(blue == null) {
			blue = 0;
		}
		if(green == null) {
			green = 0;
		}
		if(red == null) {
			red = 0;
		}
		if(!this.drawing) {
			this.__updateBlendStatus();
			this.drawing = true;
		}
		if(this.scissorRectangle != null) {
			lime_graphics_opengl_GL.context.disable(3089);
		}
		lime_graphics_opengl_GL.context.clearColor(red,green,blue,alpha);
		lime_graphics_opengl_GL.context.clearDepth(depth);
		lime_graphics_opengl_GL.context.clearStencil(stencil);
		lime_graphics_opengl_GL.context.clear(mask);
		if(this.scissorRectangle != null) {
			lime_graphics_opengl_GL.context.enable(3089);
		}
	}
	,configureBackBuffer: function(width,height,antiAlias,enableDepthAndStencil) {
		if(enableDepthAndStencil == null) {
			enableDepthAndStencil = true;
		}
		this.backBufferDepthAndStencil = enableDepthAndStencil;
		this.updateDepthAndStencilState();
		this.setBackBufferViewPort(null,null,width,height);
		this.updateScissorRectangle();
	}
	,setBackBufferViewPort: function(x,y,width,height) {
		if(x == null) {
			x = this.scrollRect.x | 0;
		}
		if(y == null) {
			y = this.scrollRect.y | 0;
		}
		if(width == null) {
			width = this.scrollRect.width | 0;
		}
		if(height == null) {
			height = this.scrollRect.height | 0;
		}
		this.scrollRect.x = x;
		this.scrollRect.y = y;
		this.scrollRect.width = width;
		this.scrollRect.height = height;
		this.ogl.set_width(x + width);
		this.ogl.set_height(y + height);
		this.updateBackBufferViewPort();
	}
	,updateBackBufferViewPort: function() {
		if(!this.renderToTexture) {
			lime_graphics_opengl_GL.context.viewport(this.scrollRect.x | 0,this.scrollRect.y | 0,this.scrollRect.width | 0,this.scrollRect.height | 0);
		}
	}
	,updateDepthAndStencilState: function() {
		if(this.renderToTexture ? this.rttDepthAndStencil : this.backBufferDepthAndStencil) {
			if(lime_app_Application.current.windows[0].config.depthBuffer) {
				lime_graphics_opengl_GL.context.enable(2929);
			}
			if(lime_app_Application.current.windows[0].config.stencilBuffer) {
				lime_graphics_opengl_GL.context.enable(2960);
			}
		} else {
			lime_graphics_opengl_GL.context.disable(2929);
			lime_graphics_opengl_GL.context.disable(2960);
		}
	}
	,createCubeTexture: function(size,format,optimizeForRenderToTexture,streamingLevels) {
		if(streamingLevels == null) {
			streamingLevels = 0;
		}
		var texture = new openfl_display3D_textures_CubeTexture(this,lime_graphics_opengl_GL.context.createTexture(),size);
		this.texturesCreated.push(texture);
		return texture;
	}
	,createIndexBuffer: function(numIndices,bufferUsage) {
		if(bufferUsage == null) {
			bufferUsage = openfl_display3D_Context3DBufferUsage.STATIC_DRAW;
		}
		var indexBuffer = new openfl_display3D_IndexBuffer3D(this,lime_graphics_opengl_GL.context.createBuffer(),numIndices,bufferUsage == openfl_display3D_Context3DBufferUsage.STATIC_DRAW ? 35044 : 35048);
		this.indexBuffersCreated.push(indexBuffer);
		return indexBuffer;
	}
	,createProgram: function() {
		var program = new openfl_display3D_Program3D(this,lime_graphics_opengl_GL.context.createProgram());
		this.programsCreated.push(program);
		return program;
	}
	,createRectangleTexture: function(width,height,format,optimizeForRenderToTexture) {
		var texture = new openfl_display3D_textures_RectangleTexture(this,lime_graphics_opengl_GL.context.createTexture(),optimizeForRenderToTexture,width,height);
		this.texturesCreated.push(texture);
		return texture;
	}
	,createTexture: function(width,height,format,optimizeForRenderToTexture,streamingLevels) {
		if(streamingLevels == null) {
			streamingLevels = 0;
		}
		var texture = new openfl_display3D_textures_Texture(this,lime_graphics_opengl_GL.context.createTexture(),optimizeForRenderToTexture,width,height);
		this.texturesCreated.push(texture);
		return texture;
	}
	,createVertexBuffer: function(numVertices,data32PerVertex,bufferUsage) {
		if(bufferUsage == null) {
			bufferUsage = openfl_display3D_Context3DBufferUsage.STATIC_DRAW;
		}
		var vertexBuffer = new openfl_display3D_VertexBuffer3D(this,lime_graphics_opengl_GL.context.createBuffer(),numVertices,data32PerVertex,bufferUsage == openfl_display3D_Context3DBufferUsage.STATIC_DRAW ? 35044 : 35048);
		this.vertexBuffersCreated.push(vertexBuffer);
		return vertexBuffer;
	}
	,__deleteTexture: function(texture) {
		if(texture.glTexture == null) {
			return;
		}
		HxOverrides.remove(this.texturesCreated,texture);
		lime_graphics_opengl_GL.context.deleteTexture(texture.glTexture);
		texture.glTexture = null;
	}
	,__deleteVertexBuffer: function(buffer) {
		if(buffer.glBuffer == null) {
			return;
		}
		HxOverrides.remove(this.vertexBuffersCreated,buffer);
		lime_graphics_opengl_GL.context.deleteBuffer(buffer.glBuffer);
		buffer.glBuffer = null;
	}
	,__deleteIndexBuffer: function(buffer) {
		if(buffer.glBuffer == null) {
			return;
		}
		HxOverrides.remove(this.indexBuffersCreated,buffer);
		lime_graphics_opengl_GL.context.deleteBuffer(buffer.glBuffer);
		buffer.glBuffer = null;
	}
	,__deleteProgram: function(program) {
		if(program.glProgram == null) {
			return;
		}
		HxOverrides.remove(this.programsCreated,program);
		lime_graphics_opengl_GL.context.deleteProgram(program.glProgram);
		program.glProgram = null;
	}
	,dispose: function() {
		var _g = 0;
		var _g1 = this.vertexBuffersCreated;
		while(_g < _g1.length) {
			var vertexBuffer = _g1[_g];
			++_g;
			vertexBuffer.dispose();
		}
		this.vertexBuffersCreated = null;
		var _g2 = 0;
		var _g11 = this.indexBuffersCreated;
		while(_g2 < _g11.length) {
			var indexBuffer = _g11[_g2];
			++_g2;
			indexBuffer.dispose();
		}
		this.indexBuffersCreated = null;
		var _g3 = 0;
		var _g12 = this.programsCreated;
		while(_g3 < _g12.length) {
			var program = _g12[_g3];
			++_g3;
			program.dispose();
		}
		this.programsCreated = null;
		this.samplerParameters = null;
		var _g4 = 0;
		var _g13 = this.texturesCreated;
		while(_g4 < _g13.length) {
			var texture = _g13[_g4];
			++_g4;
			texture.dispose();
		}
		this.texturesCreated = null;
		if(this.framebuffer != null) {
			lime_graphics_opengl_GL.context.deleteFramebuffer(this.framebuffer);
			this.framebuffer = null;
		}
		if(this.renderbuffer != null) {
			lime_graphics_opengl_GL.context.deleteRenderbuffer(this.renderbuffer);
			this.renderbuffer = null;
		}
		this.disposed = true;
	}
	,drawToBitmapData: function(destination) {
	}
	,drawTriangles: function(indexBuffer,firstIndex,numTriangles) {
		if(numTriangles == null) {
			numTriangles = -1;
		}
		if(firstIndex == null) {
			firstIndex = 0;
		}
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,"yflip");
		lime_graphics_opengl_GL.context.uniform1f(location,this._yFlip);
		if(!this.drawing) {
			throw new js__$Boot_HaxeError(new openfl_errors_Error("Need to clear before drawing if the buffer has not been cleared since the last present() call."));
		}
		var numIndices;
		if(numTriangles == -1) {
			numIndices = indexBuffer.numIndices;
		} else {
			numIndices = numTriangles * 3;
		}
		lime_graphics_opengl_GL.context.bindBuffer(34963,indexBuffer.glBuffer);
		lime_graphics_opengl_GL.context.drawElements(4,numIndices,5123,firstIndex * 2);
	}
	,present: function() {
		this.drawing = false;
		lime_graphics_opengl_GL.context.useProgram(null);
		lime_graphics_opengl_GL.context.bindBuffer(34962,null);
		lime_graphics_opengl_GL.context.disable(2884);
		if(this.framebuffer != null) {
			lime_graphics_opengl_GL.context.bindFramebuffer(36160,null);
		}
		if(this.renderbuffer != null) {
			lime_graphics_opengl_GL.context.bindRenderbuffer(36161,null);
		}
	}
	,removeRenderMethod: function(func) {
		this.ogl.set_render(null);
	}
	,setBlendFactors: function(sourceFactor,destinationFactor) {
		this.blendEnabled = true;
		this.blendSourceFactor = sourceFactor;
		this.blendDestinationFactor = destinationFactor;
		this.__updateBlendStatus();
	}
	,setColorMask: function(red,green,blue,alpha) {
		lime_graphics_opengl_GL.context.colorMask(red,green,blue,alpha);
	}
	,setCulling: function(triangleFaceToCull) {
		if(triangleFaceToCull == 0) {
			lime_graphics_opengl_GL.context.disable(2884);
		} else {
			lime_graphics_opengl_GL.context.enable(2884);
			switch(triangleFaceToCull) {
			case 1028:
				lime_graphics_opengl_GL.context.cullFace(1028);
				break;
			case 1029:
				lime_graphics_opengl_GL.context.cullFace(1029);
				break;
			case 1032:
				lime_graphics_opengl_GL.context.cullFace(1032);
				break;
			default:
				throw new js__$Boot_HaxeError("Unknown Context3DTriangleFace type.");
			}
		}
		switch(triangleFaceToCull) {
		case 0:
			this._yFlip = 1;
			break;
		case 1028:
			this._yFlip = 1;
			break;
		case 1029:
			this._yFlip = -1;
			break;
		case 1032:
			this._yFlip = 1;
			break;
		default:
			throw new js__$Boot_HaxeError("Unknown culling mode " + triangleFaceToCull + ".");
		}
	}
	,setDepthTest: function(depthMask,passCompareMode) {
		lime_graphics_opengl_GL.context.depthFunc(passCompareMode);
		lime_graphics_opengl_GL.context.depthMask(depthMask);
	}
	,setGLSLProgramConstantsFromByteArray: function(locationName,data,byteArrayOffset) {
		if(byteArrayOffset == null) {
			byteArrayOffset = 0;
		}
		data.position = byteArrayOffset;
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,locationName);
		var x = data.readFloat();
		var y = data.readFloat();
		var z = data.readFloat();
		var w = data.readFloat();
		lime_graphics_opengl_GL.context.uniform4f(location,x,y,z,w);
	}
	,setGLSLProgramConstantsFromMatrix: function(locationName,matrix,transposedMatrix) {
		if(transposedMatrix == null) {
			transposedMatrix = false;
		}
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,locationName);
		var this1 = matrix.rawData;
		var value = [];
		var _g1 = 0;
		var _g = this1.data.length;
		while(_g1 < _g) value.push(this1.data[_g1++]);
		var array = value;
		var this2;
		if(array != null) {
			this2 = new Float32Array(array);
		} else {
			this2 = null;
		}
		lime_graphics_opengl_GL.context.uniformMatrix4fv(location,!transposedMatrix,this2);
	}
	,setGLSLProgramConstantsFromVector4: function(locationName,data,startIndex) {
		if(startIndex == null) {
			startIndex = 0;
		}
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,locationName);
		lime_graphics_opengl_GL.context.uniform4f(location,data[startIndex],data[startIndex + 1],data[startIndex + 2],data[startIndex + 3]);
	}
	,setGLSLTextureAt: function(locationName,texture,textureIndex) {
		switch(textureIndex) {
		case 0:
			lime_graphics_opengl_GL.context.activeTexture(33984);
			break;
		case 1:
			lime_graphics_opengl_GL.context.activeTexture(33985);
			break;
		case 2:
			lime_graphics_opengl_GL.context.activeTexture(33986);
			break;
		case 3:
			lime_graphics_opengl_GL.context.activeTexture(33987);
			break;
		case 4:
			lime_graphics_opengl_GL.context.activeTexture(33988);
			break;
		case 5:
			lime_graphics_opengl_GL.context.activeTexture(33989);
			break;
		case 6:
			lime_graphics_opengl_GL.context.activeTexture(33990);
			break;
		case 7:
			lime_graphics_opengl_GL.context.activeTexture(33991);
			break;
		default:
			throw new js__$Boot_HaxeError("Does not support texture8 or more");
		}
		if(texture == null) {
			lime_graphics_opengl_GL.context.bindTexture(3553,null);
			lime_graphics_opengl_GL.context.bindTexture(34067,null);
			return;
		}
		var location = lime_graphics_opengl_GL.context.getUniformLocation(this.currentProgram.glProgram,locationName);
		if(js_Boot.__instanceof(texture,openfl_display3D_textures_Texture)) {
			lime_graphics_opengl_GL.context.bindTexture(3553,(js_Boot.__cast(texture , openfl_display3D_textures_Texture)).glTexture);
			lime_graphics_opengl_GL.context.uniform1i(location,textureIndex);
		} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_RectangleTexture)) {
			lime_graphics_opengl_GL.context.bindTexture(3553,(js_Boot.__cast(texture , openfl_display3D_textures_RectangleTexture)).glTexture);
			lime_graphics_opengl_GL.context.uniform1i(location,textureIndex);
		} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_CubeTexture)) {
			lime_graphics_opengl_GL.context.bindTexture(34067,(js_Boot.__cast(texture , openfl_display3D_textures_CubeTexture)).glTexture);
			lime_graphics_opengl_GL.context.uniform1i(location,textureIndex);
		} else {
			throw new js__$Boot_HaxeError("Texture of type " + Type.getClassName(texture == null ? null : js_Boot.getClass(texture)) + " not supported yet");
		}
		var parameters = this.samplerParameters[textureIndex];
		if(parameters != null) {
			this.setTextureParameters(texture,parameters.wrap,parameters.filter,parameters.mipfilter);
		} else {
			this.setTextureParameters(texture,openfl_display3D_Context3DWrapMode.CLAMP,openfl_display3D_Context3DTextureFilter.NEAREST,openfl_display3D_Context3DMipFilter.MIPNONE);
		}
	}
	,setGLSLVertexBufferAt: function(locationName,buffer,bufferOffset,format) {
		if(bufferOffset == null) {
			bufferOffset = 0;
		}
		var location = this.currentProgram != null && this.currentProgram.glProgram != null ? lime_graphics_opengl_GL.context.getAttribLocation(this.currentProgram.glProgram,locationName) : -1;
		if(location == -1) {
			return;
		}
		if(buffer == null) {
			if(location > -1) {
				lime_graphics_opengl_GL.context.disableVertexAttribArray(location);
			}
			return;
		}
		lime_graphics_opengl_GL.context.bindBuffer(34962,buffer.glBuffer);
		var dimension = 4;
		if(format == openfl_display3D_Context3DVertexBufferFormat.BYTES_4) {
			dimension = 4;
		} else if(format == openfl_display3D_Context3DVertexBufferFormat.FLOAT_1) {
			dimension = 1;
		} else if(format == openfl_display3D_Context3DVertexBufferFormat.FLOAT_2) {
			dimension = 2;
		} else if(format == openfl_display3D_Context3DVertexBufferFormat.FLOAT_3) {
			dimension = 3;
		} else if(format == openfl_display3D_Context3DVertexBufferFormat.FLOAT_4) {
			dimension = 4;
		} else {
			throw new js__$Boot_HaxeError("Buffer format " + Std.string(format) + " is not supported");
		}
		lime_graphics_opengl_GL.context.enableVertexAttribArray(location);
		lime_graphics_opengl_GL.context.vertexAttribPointer(location,dimension,5126,false,buffer.data32PerVertex * 4,bufferOffset * 4);
	}
	,setProgram: function(program3D) {
		var glProgram = null;
		if(program3D != null) {
			glProgram = program3D.glProgram;
		}
		lime_graphics_opengl_GL.context.useProgram(glProgram);
		this.currentProgram = program3D;
	}
	,setProgramConstantsFromByteArray: function(programType,firstRegister,numRegisters,data,byteArrayOffset) {
		data.position = byteArrayOffset;
		var _g1 = 0;
		while(_g1 < numRegisters) this.setGLSLProgramConstantsFromByteArray(this.__getUniformLocationNameFromAgalRegisterIndex(programType,firstRegister + _g1++),data);
	}
	,setProgramConstantsFromMatrix: function(programType,firstRegister,matrix,transposedMatrix) {
		if(transposedMatrix == null) {
			transposedMatrix = false;
		}
		var d = matrix.rawData;
		if(transposedMatrix) {
			this.setProgramConstantsFromVector(programType,firstRegister,[d.data[0],d.data[4],d.data[8],d.data[12]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 1,[d.data[1],d.data[5],d.data[9],d.data[13]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 2,[d.data[2],d.data[6],d.data[10],d.data[14]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 3,[d.data[3],d.data[7],d.data[11],d.data[15]],1);
		} else {
			this.setProgramConstantsFromVector(programType,firstRegister,[d.data[0],d.data[1],d.data[2],d.data[3]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 1,[d.data[4],d.data[5],d.data[6],d.data[7]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 2,[d.data[8],d.data[9],d.data[10],d.data[11]],1);
			this.setProgramConstantsFromVector(programType,firstRegister + 3,[d.data[12],d.data[13],d.data[14],d.data[15]],1);
		}
	}
	,setProgramConstantsFromVector: function(programType,firstRegister,data,numRegisters) {
		if(numRegisters == null) {
			numRegisters = 1;
		}
		var _g1 = 0;
		while(_g1 < numRegisters) {
			var i = _g1++;
			this.setGLSLProgramConstantsFromVector4(this.__getUniformLocationNameFromAgalRegisterIndex(programType,firstRegister + i),data,i * 4);
		}
	}
	,setRenderMethod: function(func) {
		this.ogl.set_render(function(rect) {
			func(null);
		});
	}
	,setRenderToBackBuffer: function() {
		lime_graphics_opengl_GL.context.disable(2929);
		lime_graphics_opengl_GL.context.disable(2960);
		lime_graphics_opengl_GL.context.disable(3089);
		lime_graphics_opengl_GL.context.bindFramebuffer(36160,null);
		if(this.framebuffer != null) {
			lime_graphics_opengl_GL.context.bindFramebuffer(36160,null);
		}
		if(this.renderbuffer != null) {
			lime_graphics_opengl_GL.context.bindRenderbuffer(36161,null);
		}
		this.renderToTexture = false;
		this.updateBackBufferViewPort();
		this.updateScissorRectangle();
		this.updateDepthAndStencilState();
	}
	,setRenderToTexture: function(texture,enableDepthAndStencil,antiAlias,surfaceSelector) {
		if(surfaceSelector == null) {
			surfaceSelector = 0;
		}
		if(antiAlias == null) {
			antiAlias = 0;
		}
		if(enableDepthAndStencil == null) {
			enableDepthAndStencil = false;
		}
		if(this.framebuffer == null) {
			this.framebuffer = lime_graphics_opengl_GL.context.createFramebuffer();
		}
		lime_graphics_opengl_GL.context.bindFramebuffer(36160,this.framebuffer);
		if(this.renderbuffer == null) {
			this.renderbuffer = lime_graphics_opengl_GL.context.createRenderbuffer();
		}
		lime_graphics_opengl_GL.context.bindRenderbuffer(36161,this.renderbuffer);
		if(enableDepthAndStencil) {
			lime_graphics_opengl_GL.context.renderbufferStorage(36161,34041,texture.width,texture.height);
		}
		lime_graphics_opengl_GL.context.framebufferTexture2D(36160,36064,3553,texture.glTexture,0);
		lime_graphics_opengl_GL.context.renderbufferStorage(36161,34041,texture.width,texture.height);
		lime_graphics_opengl_GL.context.framebufferRenderbuffer(36160,33306,36161,this.renderbuffer);
		if(enableDepthAndStencil) {
			lime_graphics_opengl_GL.context.enable(2929);
			lime_graphics_opengl_GL.context.enable(2960);
		}
		lime_graphics_opengl_GL.context.bindTexture(3553,texture.glTexture);
		lime_graphics_opengl_GL.context.texImage2D(3553,0,6408,texture.width,texture.height,0,6408,5121,null);
		lime_graphics_opengl_GL.context.texParameteri(3553,10240,9729);
		lime_graphics_opengl_GL.context.texParameteri(3553,10241,9985);
		lime_graphics_opengl_GL.context.viewport(0,0,texture.width,texture.height);
		this.renderToTexture = true;
		this.rttDepthAndStencil = enableDepthAndStencil;
		this.rttWidth = texture.width;
		this.rttHeight = texture.height;
		this.updateScissorRectangle();
		this.updateDepthAndStencilState();
	}
	,setSamplerStateAt: function(sampler,wrap,filter,mipfilter) {
		if(0 <= sampler && sampler < openfl_display3D_Context3D.MAX_SAMPLERS) {
			this.samplerParameters[sampler].wrap = wrap;
			this.samplerParameters[sampler].filter = filter;
			this.samplerParameters[sampler].mipfilter = mipfilter;
		} else {
			throw new js__$Boot_HaxeError("Sampler is out of bounds.");
		}
	}
	,setScissorRectangle: function(rectangle) {
		this.scissorRectangle = rectangle;
		if(rectangle == null) {
			lime_graphics_opengl_GL.context.disable(3089);
			return;
		}
		lime_graphics_opengl_GL.context.enable(3089);
		this.updateScissorRectangle();
	}
	,updateScissorRectangle: function() {
		if(this.scissorRectangle == null) {
			return;
		}
		lime_graphics_opengl_GL.context.scissor(this.scissorRectangle.x | 0,(this.renderToTexture ? this.rttHeight : this.scrollRect.height | 0) - (this.scissorRectangle.y | 0) - (this.scissorRectangle.height | 0) | 0,this.scissorRectangle.width | 0,this.scissorRectangle.height | 0);
	}
	,setStencilActions: function(triangleFace,compareMode,actionOnBothPass,actionOnDepthFail,actionOnDepthPassStencilFail) {
		this.stencilCompareMode = compareMode;
		lime_graphics_opengl_GL.context.stencilOp(actionOnBothPass,actionOnDepthFail,actionOnDepthPassStencilFail);
		lime_graphics_opengl_GL.context.stencilFunc(this.stencilCompareMode,this.stencilRef,this.stencilReadMask);
	}
	,setStencilReferenceValue: function(referenceValue,readMask,writeMask) {
		if(writeMask == null) {
			writeMask = 255;
		}
		if(readMask == null) {
			readMask = 255;
		}
		this.stencilReadMask = readMask;
		this.stencilRef = referenceValue;
		lime_graphics_opengl_GL.context.stencilFunc(this.stencilCompareMode,this.stencilRef,this.stencilReadMask);
		lime_graphics_opengl_GL.context.stencilMask(writeMask);
	}
	,setTextureAt: function(sampler,texture) {
		this.setGLSLTextureAt("fs" + sampler,texture,sampler);
	}
	,setTextureParameters: function(texture,wrap,filter,mipfilter) {
		if(!openfl_display3D_Context3D.anisotropySupportTested) {
			var ext = lime_graphics_opengl_GL.context.getExtension("EXT_texture_filter_anisotropic");
			if(ext == null || Reflect.field(ext,"MAX_TEXTURE_MAX_ANISOTROPY_EXT") == null) {
				ext = lime_graphics_opengl_GL.context.getExtension("MOZ_EXT_texture_filter_anisotropic");
			}
			if(ext == null || Reflect.field(ext,"MAX_TEXTURE_MAX_ANISOTROPY_EXT") == null) {
				ext = lime_graphics_opengl_GL.context.getExtension("WEBKIT_EXT_texture_filter_anisotropic");
			}
			openfl_display3D_Context3D.supportsAnisotropy = ext != null;
			if(openfl_display3D_Context3D.supportsAnisotropy) {
				openfl_display3D_Context3D.maxSupportedAnisotropy = lime_graphics_opengl_GL.context.getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
				lime_graphics_opengl_GL.context.texParameteri(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,openfl_display3D_Context3D.maxSupportedAnisotropy);
			}
			openfl_display3D_Context3D.anisotropySupportTested = true;
		}
		if(js_Boot.__instanceof(texture,openfl_display3D_textures_Texture)) {
			switch(wrap[1]) {
			case 0:
				lime_graphics_opengl_GL.context.texParameteri(3553,10242,33071);
				lime_graphics_opengl_GL.context.texParameteri(3553,10243,33071);
				break;
			case 1:
				lime_graphics_opengl_GL.context.texParameteri(3553,10242,10497);
				lime_graphics_opengl_GL.context.texParameteri(3553,10243,10497);
				break;
			}
			switch(filter[1]) {
			case 0:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(2,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 2);
				}
				break;
			case 1:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(4,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 4);
				}
				break;
			case 2:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(8,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 8);
				}
				break;
			case 3:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(16,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 16);
				}
				break;
			case 4:
				lime_graphics_opengl_GL.context.texParameteri(3553,10240,9729);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			case 5:
				lime_graphics_opengl_GL.context.texParameteri(3553,10240,9728);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			}
			switch(mipfilter[1]) {
			case 0:
				lime_graphics_opengl_GL.context.texParameteri(3553,10241,9987);
				break;
			case 1:
				lime_graphics_opengl_GL.context.texParameteri(3553,10241,9984);
				break;
			case 2:
				lime_graphics_opengl_GL.context.texParameteri(3553,10241,filter == openfl_display3D_Context3DTextureFilter.NEAREST ? 9728 : 9729);
				break;
			}
			var tex = texture;
			if(mipfilter != openfl_display3D_Context3DMipFilter.MIPNONE && !tex.mipmapsGenerated) {
				lime_graphics_opengl_GL.context.generateMipmap(3553);
				tex.mipmapsGenerated = true;
			}
		} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_RectangleTexture)) {
			lime_graphics_opengl_GL.context.texParameteri(3553,10242,33071);
			lime_graphics_opengl_GL.context.texParameteri(3553,10243,33071);
			switch(filter[1]) {
			case 0:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(2,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 2);
				}
				break;
			case 1:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(4,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 4);
				}
				break;
			case 2:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(8,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 8);
				}
				break;
			case 3:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(16,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 16);
				}
				break;
			case 4:
				lime_graphics_opengl_GL.context.texParameteri(3553,10240,9729);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			case 5:
				lime_graphics_opengl_GL.context.texParameteri(3553,10240,9728);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(3553,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			}
			lime_graphics_opengl_GL.context.texParameteri(3553,10241,filter == openfl_display3D_Context3DTextureFilter.NEAREST ? 9728 : 9729);
		} else if(js_Boot.__instanceof(texture,openfl_display3D_textures_CubeTexture)) {
			switch(wrap[1]) {
			case 0:
				lime_graphics_opengl_GL.context.texParameteri(34067,10242,33071);
				lime_graphics_opengl_GL.context.texParameteri(34067,10243,33071);
				break;
			case 1:
				lime_graphics_opengl_GL.context.texParameteri(34067,10242,10497);
				lime_graphics_opengl_GL.context.texParameteri(34067,10243,10497);
				break;
			}
			switch(filter[1]) {
			case 0:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(34067,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(2,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 2);
				}
				break;
			case 1:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(34067,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(4,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 4);
				}
				break;
			case 2:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(34067,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(8,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 8);
				}
				break;
			case 3:
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(34067,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,_$UInt_UInt_$Impl_$.gt(16,openfl_display3D_Context3D.maxSupportedAnisotropy) ? _$UInt_UInt_$Impl_$.toFloat(openfl_display3D_Context3D.maxSupportedAnisotropy) : 16);
				}
				break;
			case 4:
				lime_graphics_opengl_GL.context.texParameteri(34067,10240,9729);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(34067,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			case 5:
				lime_graphics_opengl_GL.context.texParameteri(34067,10240,9728);
				if(openfl_display3D_Context3D.supportsAnisotropy) {
					lime_graphics_opengl_GL.context.texParameterf(34067,openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT,1);
				}
				break;
			}
			switch(mipfilter[1]) {
			case 0:
				lime_graphics_opengl_GL.context.texParameteri(34067,10241,9987);
				break;
			case 1:
				lime_graphics_opengl_GL.context.texParameteri(34067,10241,9984);
				break;
			case 2:
				lime_graphics_opengl_GL.context.texParameteri(34067,10241,filter == openfl_display3D_Context3DTextureFilter.NEAREST ? 9728 : 9729);
				break;
			}
			var cubetex = texture;
			if(mipfilter != openfl_display3D_Context3DMipFilter.MIPNONE && !cubetex.mipmapsGenerated) {
				lime_graphics_opengl_GL.context.generateMipmap(34067);
				cubetex.mipmapsGenerated = true;
			}
		} else {
			throw new js__$Boot_HaxeError("Texture of type " + Type.getClassName(texture == null ? null : js_Boot.getClass(texture)) + " not supported yet");
		}
	}
	,setVertexBufferAt: function(index,buffer,bufferOffset,format) {
		if(bufferOffset == null) {
			bufferOffset = 0;
		}
		this.setGLSLVertexBufferAt("va" + index,buffer,bufferOffset,format);
	}
	,__getUniformLocationNameFromAgalRegisterIndex: function(programType,firstRegister) {
		if(programType == openfl_display3D_Context3DProgramType.VERTEX) {
			return "vc" + firstRegister;
		} else if(programType == openfl_display3D_Context3DProgramType.FRAGMENT) {
			return "fc" + firstRegister;
		}
		throw new js__$Boot_HaxeError("Program Type " + Std.string(programType) + " not supported");
	}
	,__updateBlendStatus: function() {
		if(this.blendEnabled) {
			lime_graphics_opengl_GL.context.enable(3042);
			lime_graphics_opengl_GL.context.blendEquation(32774);
			lime_graphics_opengl_GL.context.blendFunc(this.blendSourceFactor,this.blendDestinationFactor);
		} else {
			lime_graphics_opengl_GL.context.disable(3042);
		}
	}
	,__class__: openfl_display3D_Context3D
};
var openfl_display3D__$Context3D_SamplerState = function() {
};
$hxClasses["openfl.display3D._Context3D.SamplerState"] = openfl_display3D__$Context3D_SamplerState;
openfl_display3D__$Context3D_SamplerState.__name__ = ["openfl","display3D","_Context3D","SamplerState"];
openfl_display3D__$Context3D_SamplerState.prototype = {
	__class__: openfl_display3D__$Context3D_SamplerState
};
var openfl_display3D_Context3DBufferUsage = $hxClasses["openfl.display3D.Context3DBufferUsage"] = { __ename__ : ["openfl","display3D","Context3DBufferUsage"], __constructs__ : ["STATIC_DRAW","DYNAMIC_DRAW"] };
openfl_display3D_Context3DBufferUsage.STATIC_DRAW = ["STATIC_DRAW",0];
openfl_display3D_Context3DBufferUsage.STATIC_DRAW.toString = $estr;
openfl_display3D_Context3DBufferUsage.STATIC_DRAW.__enum__ = openfl_display3D_Context3DBufferUsage;
openfl_display3D_Context3DBufferUsage.DYNAMIC_DRAW = ["DYNAMIC_DRAW",1];
openfl_display3D_Context3DBufferUsage.DYNAMIC_DRAW.toString = $estr;
openfl_display3D_Context3DBufferUsage.DYNAMIC_DRAW.__enum__ = openfl_display3D_Context3DBufferUsage;
var openfl_display3D_Context3DClearMask = function() { };
$hxClasses["openfl.display3D.Context3DClearMask"] = openfl_display3D_Context3DClearMask;
openfl_display3D_Context3DClearMask.__name__ = ["openfl","display3D","Context3DClearMask"];
var openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DCompareMode.Context3DCompareMode_Impl_"] = openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.__name__ = ["openfl","display3D","_Context3DCompareMode","Context3DCompareMode_Impl_"];
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$._new = function(a) {
	return a;
};
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.fromInt = function(s) {
	return s;
};
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.toInt = function(this1) {
	return this1;
};
var openfl_display3D_Context3DMipFilter = $hxClasses["openfl.display3D.Context3DMipFilter"] = { __ename__ : ["openfl","display3D","Context3DMipFilter"], __constructs__ : ["MIPLINEAR","MIPNEAREST","MIPNONE"] };
openfl_display3D_Context3DMipFilter.MIPLINEAR = ["MIPLINEAR",0];
openfl_display3D_Context3DMipFilter.MIPLINEAR.toString = $estr;
openfl_display3D_Context3DMipFilter.MIPLINEAR.__enum__ = openfl_display3D_Context3DMipFilter;
openfl_display3D_Context3DMipFilter.MIPNEAREST = ["MIPNEAREST",1];
openfl_display3D_Context3DMipFilter.MIPNEAREST.toString = $estr;
openfl_display3D_Context3DMipFilter.MIPNEAREST.__enum__ = openfl_display3D_Context3DMipFilter;
openfl_display3D_Context3DMipFilter.MIPNONE = ["MIPNONE",2];
openfl_display3D_Context3DMipFilter.MIPNONE.toString = $estr;
openfl_display3D_Context3DMipFilter.MIPNONE.__enum__ = openfl_display3D_Context3DMipFilter;
var openfl_display3D_Context3DProgramType = $hxClasses["openfl.display3D.Context3DProgramType"] = { __ename__ : ["openfl","display3D","Context3DProgramType"], __constructs__ : ["VERTEX","FRAGMENT"] };
openfl_display3D_Context3DProgramType.VERTEX = ["VERTEX",0];
openfl_display3D_Context3DProgramType.VERTEX.toString = $estr;
openfl_display3D_Context3DProgramType.VERTEX.__enum__ = openfl_display3D_Context3DProgramType;
openfl_display3D_Context3DProgramType.FRAGMENT = ["FRAGMENT",1];
openfl_display3D_Context3DProgramType.FRAGMENT.toString = $estr;
openfl_display3D_Context3DProgramType.FRAGMENT.__enum__ = openfl_display3D_Context3DProgramType;
var openfl_display3D_Context3DTextureFilter = $hxClasses["openfl.display3D.Context3DTextureFilter"] = { __ename__ : ["openfl","display3D","Context3DTextureFilter"], __constructs__ : ["ANISOTROPIC2X","ANISOTROPIC4X","ANISOTROPIC8X","ANISOTROPIC16X","LINEAR","NEAREST"] };
openfl_display3D_Context3DTextureFilter.ANISOTROPIC2X = ["ANISOTROPIC2X",0];
openfl_display3D_Context3DTextureFilter.ANISOTROPIC2X.toString = $estr;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC2X.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC4X = ["ANISOTROPIC4X",1];
openfl_display3D_Context3DTextureFilter.ANISOTROPIC4X.toString = $estr;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC4X.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC8X = ["ANISOTROPIC8X",2];
openfl_display3D_Context3DTextureFilter.ANISOTROPIC8X.toString = $estr;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC8X.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC16X = ["ANISOTROPIC16X",3];
openfl_display3D_Context3DTextureFilter.ANISOTROPIC16X.toString = $estr;
openfl_display3D_Context3DTextureFilter.ANISOTROPIC16X.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.LINEAR = ["LINEAR",4];
openfl_display3D_Context3DTextureFilter.LINEAR.toString = $estr;
openfl_display3D_Context3DTextureFilter.LINEAR.__enum__ = openfl_display3D_Context3DTextureFilter;
openfl_display3D_Context3DTextureFilter.NEAREST = ["NEAREST",5];
openfl_display3D_Context3DTextureFilter.NEAREST.toString = $estr;
openfl_display3D_Context3DTextureFilter.NEAREST.__enum__ = openfl_display3D_Context3DTextureFilter;
var openfl_display3D_Context3DTextureFormat = $hxClasses["openfl.display3D.Context3DTextureFormat"] = { __ename__ : ["openfl","display3D","Context3DTextureFormat"], __constructs__ : ["BGRA","COMPRESSED","COMPRESSED_ALPHA"] };
openfl_display3D_Context3DTextureFormat.BGRA = ["BGRA",0];
openfl_display3D_Context3DTextureFormat.BGRA.toString = $estr;
openfl_display3D_Context3DTextureFormat.BGRA.__enum__ = openfl_display3D_Context3DTextureFormat;
openfl_display3D_Context3DTextureFormat.COMPRESSED = ["COMPRESSED",1];
openfl_display3D_Context3DTextureFormat.COMPRESSED.toString = $estr;
openfl_display3D_Context3DTextureFormat.COMPRESSED.__enum__ = openfl_display3D_Context3DTextureFormat;
openfl_display3D_Context3DTextureFormat.COMPRESSED_ALPHA = ["COMPRESSED_ALPHA",2];
openfl_display3D_Context3DTextureFormat.COMPRESSED_ALPHA.toString = $estr;
openfl_display3D_Context3DTextureFormat.COMPRESSED_ALPHA.__enum__ = openfl_display3D_Context3DTextureFormat;
var openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$ = {};
$hxClasses["openfl.display3D._Context3DTriangleFace.Context3DTriangleFace_Impl_"] = openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.__name__ = ["openfl","display3D","_Context3DTriangleFace","Context3DTriangleFace_Impl_"];
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$._new = function(a) {
	return a;
};
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.fromInt = function(s) {
	return s;
};
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.toInt = function(this1) {
	return this1;
};
var openfl_display3D_Context3DVertexBufferFormat = $hxClasses["openfl.display3D.Context3DVertexBufferFormat"] = { __ename__ : ["openfl","display3D","Context3DVertexBufferFormat"], __constructs__ : ["BYTES_4","FLOAT_1","FLOAT_2","FLOAT_3","FLOAT_4"] };
openfl_display3D_Context3DVertexBufferFormat.BYTES_4 = ["BYTES_4",0];
openfl_display3D_Context3DVertexBufferFormat.BYTES_4.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.BYTES_4.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_1 = ["FLOAT_1",1];
openfl_display3D_Context3DVertexBufferFormat.FLOAT_1.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_1.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_2 = ["FLOAT_2",2];
openfl_display3D_Context3DVertexBufferFormat.FLOAT_2.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_2.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_3 = ["FLOAT_3",3];
openfl_display3D_Context3DVertexBufferFormat.FLOAT_3.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_3.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_4 = ["FLOAT_4",4];
openfl_display3D_Context3DVertexBufferFormat.FLOAT_4.toString = $estr;
openfl_display3D_Context3DVertexBufferFormat.FLOAT_4.__enum__ = openfl_display3D_Context3DVertexBufferFormat;
var openfl_display3D_Context3DWrapMode = $hxClasses["openfl.display3D.Context3DWrapMode"] = { __ename__ : ["openfl","display3D","Context3DWrapMode"], __constructs__ : ["CLAMP","REPEAT"] };
openfl_display3D_Context3DWrapMode.CLAMP = ["CLAMP",0];
openfl_display3D_Context3DWrapMode.CLAMP.toString = $estr;
openfl_display3D_Context3DWrapMode.CLAMP.__enum__ = openfl_display3D_Context3DWrapMode;
openfl_display3D_Context3DWrapMode.REPEAT = ["REPEAT",1];
openfl_display3D_Context3DWrapMode.REPEAT.toString = $estr;
openfl_display3D_Context3DWrapMode.REPEAT.__enum__ = openfl_display3D_Context3DWrapMode;
var openfl_display3D_IndexBuffer3D = function(context,glBuffer,numIndices,bufferUsage) {
	this.context = context;
	this.glBuffer = glBuffer;
	this.numIndices = numIndices;
	this.bufferUsage = bufferUsage;
};
$hxClasses["openfl.display3D.IndexBuffer3D"] = openfl_display3D_IndexBuffer3D;
openfl_display3D_IndexBuffer3D.__name__ = ["openfl","display3D","IndexBuffer3D"];
openfl_display3D_IndexBuffer3D.prototype = {
	dispose: function() {
		this.context.__deleteIndexBuffer(this);
	}
	,uploadFromByteArray: function(byteArray,byteArrayOffset,startOffset,count) {
		lime_graphics_opengl_GL.context.bindBuffer(34963,this.glBuffer);
		var length = count * 2;
		var offset = byteArrayOffset + startOffset * 2;
		var indices;
		var this1;
		if(length != null) {
			this1 = new Int16Array(length);
		} else {
			this1 = null;
		}
		indices = this1;
		byteArray.position = offset;
		var i = 0;
		while(byteArray.position < length + offset) {
			indices[i] = byteArray.readUnsignedByte();
			++i;
		}
		lime_graphics_opengl_GL.context.bufferData(34963,indices,this.bufferUsage);
	}
	,uploadFromVector: function(data,startOffset,count) {
		lime_graphics_opengl_GL.context.bindBuffer(34963,this.glBuffer);
		var indices;
		var this1;
		if(count != null) {
			this1 = new Int16Array(count);
		} else {
			this1 = null;
		}
		indices = this1;
		var _g1 = startOffset;
		var _g = startOffset + count;
		while(_g1 < _g) {
			var i = _g1++;
			indices[i] = data.data[i];
		}
		lime_graphics_opengl_GL.context.bufferData(34963,indices,this.bufferUsage);
	}
	,uploadFromInt16Array: function(data) {
		lime_graphics_opengl_GL.context.bindBuffer(34963,this.glBuffer);
		lime_graphics_opengl_GL.context.bufferData(34963,data,this.bufferUsage);
	}
	,__class__: openfl_display3D_IndexBuffer3D
};
var openfl_display3D_Program3D = function(context,program) {
	this.context = context;
	this.glProgram = program;
};
$hxClasses["openfl.display3D.Program3D"] = openfl_display3D_Program3D;
openfl_display3D_Program3D.__name__ = ["openfl","display3D","Program3D"];
openfl_display3D_Program3D.prototype = {
	dispose: function() {
		this.context.__deleteProgram(this);
	}
	,upload: function(vertexShader,fragmentShader) {
		lime_graphics_opengl_GL.context.attachShader(this.glProgram,vertexShader);
		lime_graphics_opengl_GL.context.attachShader(this.glProgram,fragmentShader);
		lime_graphics_opengl_GL.context.linkProgram(this.glProgram);
		if(lime_graphics_opengl_GL.context.getProgramParameter(this.glProgram,35714) == 0) {
			var result = lime_graphics_opengl_GL.context.getProgramInfoLog(this.glProgram);
			if(result != "") {
				throw new js__$Boot_HaxeError(result);
			}
		}
	}
	,__class__: openfl_display3D_Program3D
};
var openfl_display3D_VertexBuffer3D = function(context,glBuffer,numVertices,data32PerVertex,bufferUsage) {
	this.context = context;
	this.glBuffer = glBuffer;
	this.numVertices = numVertices;
	this.data32PerVertex = data32PerVertex;
	this.bufferUsage = bufferUsage;
};
$hxClasses["openfl.display3D.VertexBuffer3D"] = openfl_display3D_VertexBuffer3D;
openfl_display3D_VertexBuffer3D.__name__ = ["openfl","display3D","VertexBuffer3D"];
openfl_display3D_VertexBuffer3D.prototype = {
	dispose: function() {
		this.context.__deleteVertexBuffer(this);
	}
	,uploadFromByteArray: function(byteArray,byteArrayOffset,startOffset,count) {
		var bytesPerVertex = this.data32PerVertex * 4;
		lime_graphics_opengl_GL.context.bindBuffer(34962,this.glBuffer);
		var length = count * bytesPerVertex;
		var offset = byteArrayOffset + startOffset * bytesPerVertex;
		var float32Array;
		var this1;
		if(length != null) {
			this1 = new Float32Array(length);
		} else {
			this1 = null;
		}
		float32Array = this1;
		byteArray.position = offset;
		var i = 0;
		while(byteArray.position < length + offset) {
			float32Array[i] = byteArray.readUnsignedByte();
			++i;
		}
		lime_graphics_opengl_GL.context.bufferData(34962,float32Array,this.bufferUsage);
	}
	,uploadFromFloat32Array: function(data) {
		lime_graphics_opengl_GL.context.bindBuffer(34962,this.glBuffer);
		lime_graphics_opengl_GL.context.bufferData(34962,data,this.bufferUsage);
	}
	,uploadFromVector: function(data,startVertex,numVertices) {
		lime_graphics_opengl_GL.context.bindBuffer(34962,this.glBuffer);
		var length = numVertices * this.data32PerVertex;
		var float32Array;
		var this1;
		if(length != null) {
			this1 = new Float32Array(length);
		} else {
			this1 = null;
		}
		float32Array = this1;
		var _g1 = startVertex;
		var _g = startVertex + length;
		while(_g1 < _g) {
			var i = _g1++;
			float32Array[i] = data.data[i];
		}
		lime_graphics_opengl_GL.context.bufferData(34962,float32Array,this.bufferUsage);
	}
	,__class__: openfl_display3D_VertexBuffer3D
};
var openfl_display3D_textures_TextureBase = function(context,glTexture,width,height) {
	if(height == null) {
		height = 0;
	}
	if(width == null) {
		width = 0;
	}
	openfl_events_EventDispatcher.call(this);
	this.context = context;
	this.width = width;
	this.height = height;
	this.glTexture = glTexture;
};
$hxClasses["openfl.display3D.textures.TextureBase"] = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_TextureBase.__name__ = ["openfl","display3D","textures","TextureBase"];
openfl_display3D_textures_TextureBase.__super__ = openfl_events_EventDispatcher;
openfl_display3D_textures_TextureBase.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	dispose: function() {
		this.context.__deleteTexture(this);
	}
	,__class__: openfl_display3D_textures_TextureBase
});
var openfl_display3D_textures_CubeTexture = function(context,glTexture,size) {
	openfl_display3D_textures_TextureBase.call(this,context,glTexture,size,size);
	this.size = size;
	this.mipmapsGenerated = false;
	this._textures = [];
	var _g = 0;
	while(_g < 6) this._textures[_g++] = lime_graphics_opengl_GL.context.createTexture();
};
$hxClasses["openfl.display3D.textures.CubeTexture"] = openfl_display3D_textures_CubeTexture;
openfl_display3D_textures_CubeTexture.__name__ = ["openfl","display3D","textures","CubeTexture"];
openfl_display3D_textures_CubeTexture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_CubeTexture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
	glTextureAt: function(index) {
		return this._textures[index];
	}
	,uploadCompressedTextureFromByteArray: function(data,byteArrayOffset,async) {
		if(async == null) {
			async = false;
		}
	}
	,uploadFromBitmapData: function(bitmapData,side,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		var source = bitmapData.image.get_data();
		lime_graphics_opengl_GL.context.bindTexture(34067,this.glTexture);
		switch(side) {
		case 0:
			lime_graphics_opengl_GL.context.texImage2D(34069,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 1:
			lime_graphics_opengl_GL.context.texImage2D(34070,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 2:
			lime_graphics_opengl_GL.context.texImage2D(34071,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 3:
			lime_graphics_opengl_GL.context.texImage2D(34072,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 4:
			lime_graphics_opengl_GL.context.texImage2D(34073,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		case 5:
			lime_graphics_opengl_GL.context.texImage2D(34074,miplevel,6408,bitmapData.width,bitmapData.height,0,6408,5121,source);
			break;
		default:
			throw new js__$Boot_HaxeError("unknown side type");
		}
		lime_graphics_opengl_GL.context.bindTexture(34067,null);
	}
	,uploadFromByteArray: function(data,byteArrayOffset,side,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
	}
	,__class__: openfl_display3D_textures_CubeTexture
});
var openfl_display3D_textures_RectangleTexture = function(context,glTexture,optimize,width,height) {
	this.optimizeForRenderToTexture = optimize;
	if(this.optimizeForRenderToTexture == null) {
		this.optimizeForRenderToTexture = false;
	}
	openfl_display3D_textures_TextureBase.call(this,context,glTexture,width,height);
};
$hxClasses["openfl.display3D.textures.RectangleTexture"] = openfl_display3D_textures_RectangleTexture;
openfl_display3D_textures_RectangleTexture.__name__ = ["openfl","display3D","textures","RectangleTexture"];
openfl_display3D_textures_RectangleTexture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_RectangleTexture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
	uploadFromBitmapData: function(bitmapData,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		var p = openfl_utils__$ByteArray_ByteArray_$Impl_$.fromArrayBuffer(bitmapData.image.get_data().buffer);
		this.width = bitmapData.width;
		this.height = bitmapData.height;
		this.uploadFromByteArray(p,0);
	}
	,uploadFromByteArray: function(data,byteArrayOffset) {
		lime_graphics_opengl_GL.context.bindTexture(3553,this.glTexture);
		if(this.optimizeForRenderToTexture) {
			lime_graphics_opengl_GL.context.pixelStorei(37440,1);
		}
		lime_graphics_opengl_GL.context.texParameteri(3553,10240,9728);
		lime_graphics_opengl_GL.context.texParameteri(3553,10241,9728);
		lime_graphics_opengl_GL.context.texParameteri(3553,10242,33071);
		lime_graphics_opengl_GL.context.texParameteri(3553,10243,33071);
		var elements = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data);
		var this1;
		if(elements != null) {
			this1 = new Uint8Array(elements);
		} else {
			this1 = null;
		}
		var source = this1;
		data.position = byteArrayOffset;
		var i = 0;
		while(data.position < openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data)) {
			source[i] = data.readUnsignedByte();
			++i;
		}
		lime_graphics_opengl_GL.context.texImage2D(3553,0,6408,this.width,this.height,0,6408,5121,source);
		lime_graphics_opengl_GL.context.bindTexture(3553,null);
	}
	,__class__: openfl_display3D_textures_RectangleTexture
});
var openfl_display3D_textures_Texture = function(context,glTexture,optimize,width,height) {
	this.optimizeForRenderToTexture = optimize;
	this.mipmapsGenerated = false;
	if(openfl_display3D_textures_Texture.internalFormat == -1) {
		openfl_display3D_textures_Texture.internalFormat = 6408;
	}
	if(this.optimizeForRenderToTexture == null) {
		this.optimizeForRenderToTexture = false;
	}
	openfl_display3D_textures_TextureBase.call(this,context,glTexture,width,height);
};
$hxClasses["openfl.display3D.textures.Texture"] = openfl_display3D_textures_Texture;
openfl_display3D_textures_Texture.__name__ = ["openfl","display3D","textures","Texture"];
openfl_display3D_textures_Texture.__super__ = openfl_display3D_textures_TextureBase;
openfl_display3D_textures_Texture.prototype = $extend(openfl_display3D_textures_TextureBase.prototype,{
	uploadCompressedTextureFromByteArray: function(data,byteArrayOffset,async) {
		if(async == null) {
			async = false;
		}
	}
	,uploadFromBitmapData: function(bitmapData,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		var image = bitmapData.image;
		if(!image.get_premultiplied() && image.get_transparent()) {
			image = image.clone();
			image.set_premultiplied(true);
		}
		this.width = image.width;
		this.height = image.height;
		this.uploadFromUInt8Array(image.get_data(),miplevel);
	}
	,uploadFromByteArray: function(data,byteArrayOffset,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		var elements = openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data);
		var this1;
		if(elements != null) {
			this1 = new Uint8Array(elements);
		} else {
			this1 = null;
		}
		var source = this1;
		data.position = byteArrayOffset;
		var i = 0;
		while(data.position < openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(data)) {
			source[i] = data.readUnsignedByte();
			++i;
		}
		this.uploadFromUInt8Array(source,miplevel);
	}
	,uploadFromUInt8Array: function(data,miplevel) {
		if(miplevel == null) {
			miplevel = 0;
		}
		lime_graphics_opengl_GL.context.bindTexture(3553,this.glTexture);
		if(this.optimizeForRenderToTexture) {
			lime_graphics_opengl_GL.context.pixelStorei(37440,1);
			lime_graphics_opengl_GL.context.texParameteri(3553,10240,9728);
			lime_graphics_opengl_GL.context.texParameteri(3553,10241,9728);
			lime_graphics_opengl_GL.context.texParameteri(3553,10242,33071);
			lime_graphics_opengl_GL.context.texParameteri(3553,10243,33071);
		}
		lime_graphics_opengl_GL.context.texImage2D(3553,miplevel,openfl_display3D_textures_Texture.internalFormat,this.width,this.height,0,openfl_display3D_textures_Texture.internalFormat,5121,data);
		lime_graphics_opengl_GL.context.bindTexture(3553,null);
	}
	,__class__: openfl_display3D_textures_Texture
});
var openfl_errors_Error = function(message,id) {
	if(id == null) {
		id = 0;
	}
	if(message == null) {
		message = "";
	}
	this.message = message;
	this.errorID = id;
	this.name = "Error";
};
$hxClasses["openfl.errors.Error"] = openfl_errors_Error;
openfl_errors_Error.__name__ = ["openfl","errors","Error"];
openfl_errors_Error.prototype = {
	getStackTrace: function() {
		return haxe_CallStack.toString(haxe_CallStack.exceptionStack());
	}
	,toString: function() {
		if(this.message != null) {
			return this.message;
		} else {
			return "Error";
		}
	}
	,__class__: openfl_errors_Error
};
var openfl_errors_ArgumentError = function(message) {
	if(message == null) {
		message = "";
	}
	openfl_errors_Error.call(this,message);
	this.name = "ArgumentError";
};
$hxClasses["openfl.errors.ArgumentError"] = openfl_errors_ArgumentError;
openfl_errors_ArgumentError.__name__ = ["openfl","errors","ArgumentError"];
openfl_errors_ArgumentError.__super__ = openfl_errors_Error;
openfl_errors_ArgumentError.prototype = $extend(openfl_errors_Error.prototype,{
	__class__: openfl_errors_ArgumentError
});
var openfl_errors_IOError = function(message) {
	if(message == null) {
		message = "";
	}
	openfl_errors_Error.call(this,message);
	this.name = "IOError";
};
$hxClasses["openfl.errors.IOError"] = openfl_errors_IOError;
openfl_errors_IOError.__name__ = ["openfl","errors","IOError"];
openfl_errors_IOError.__super__ = openfl_errors_Error;
openfl_errors_IOError.prototype = $extend(openfl_errors_Error.prototype,{
	__class__: openfl_errors_IOError
});
var openfl_errors_EOFError = function() {
	openfl_errors_IOError.call(this,"End of file was encountered");
	this.name = "EOFError";
	this.errorID = 2030;
};
$hxClasses["openfl.errors.EOFError"] = openfl_errors_EOFError;
openfl_errors_EOFError.__name__ = ["openfl","errors","EOFError"];
openfl_errors_EOFError.__super__ = openfl_errors_IOError;
openfl_errors_EOFError.prototype = $extend(openfl_errors_IOError.prototype,{
	__class__: openfl_errors_EOFError
});
var openfl_errors_RangeError = function(message) {
	if(message == null) {
		message = "";
	}
	openfl_errors_Error.call(this,message,0);
	this.name = "RangeError";
};
$hxClasses["openfl.errors.RangeError"] = openfl_errors_RangeError;
openfl_errors_RangeError.__name__ = ["openfl","errors","RangeError"];
openfl_errors_RangeError.__super__ = openfl_errors_Error;
openfl_errors_RangeError.prototype = $extend(openfl_errors_Error.prototype,{
	__class__: openfl_errors_RangeError
});
var openfl_errors_TypeError = function(message) {
	if(message == null) {
		message = "";
	}
	openfl_errors_Error.call(this,message,0);
	this.name = "TypeError";
};
$hxClasses["openfl.errors.TypeError"] = openfl_errors_TypeError;
openfl_errors_TypeError.__name__ = ["openfl","errors","TypeError"];
openfl_errors_TypeError.__super__ = openfl_errors_Error;
openfl_errors_TypeError.prototype = $extend(openfl_errors_Error.prototype,{
	__class__: openfl_errors_TypeError
});
var openfl_events_Event = function(type,bubbles,cancelable) {
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	this.type = type;
	this.bubbles = bubbles;
	this.cancelable = cancelable;
	this.eventPhase = 2;
};
$hxClasses["openfl.events.Event"] = openfl_events_Event;
openfl_events_Event.__name__ = ["openfl","events","Event"];
openfl_events_Event.prototype = {
	clone: function() {
		var event = new openfl_events_Event(this.type,this.bubbles,this.cancelable);
		event.eventPhase = this.eventPhase;
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		return event;
	}
	,formatToString: function(className,p1,p2,p3,p4,p5) {
		var parameters = [];
		if(p1 != null) {
			parameters.push(p1);
		}
		if(p2 != null) {
			parameters.push(p2);
		}
		if(p3 != null) {
			parameters.push(p3);
		}
		if(p4 != null) {
			parameters.push(p4);
		}
		if(p5 != null) {
			parameters.push(p5);
		}
		return $bind(this,this.__formatToString).apply(this,[className,parameters]);
	}
	,isDefaultPrevented: function() {
		return this.__preventDefault;
	}
	,preventDefault: function() {
		if(this.cancelable) {
			this.__preventDefault = true;
		}
	}
	,stopImmediatePropagation: function() {
		this.__isCanceled = true;
		this.__isCanceledNow = true;
	}
	,stopPropagation: function() {
		this.__isCanceled = true;
	}
	,toString: function() {
		return this.__formatToString("Event",["type","bubbles","cancelable"]);
	}
	,__formatToString: function(className,parameters) {
		var output = "[" + className;
		var arg = null;
		var _g = 0;
		while(_g < parameters.length) {
			var param = parameters[_g];
			++_g;
			arg = Reflect.field(this,param);
			if(typeof(arg) == "string") {
				output += " " + param + "=\"" + Std.string(arg) + "\"";
			} else {
				output += " " + param + "=" + Std.string(arg);
			}
		}
		output += "]";
		return output;
	}
	,__class__: openfl_events_Event
};
var openfl_events_ActivityEvent = function(type,bubbles,cancelable,activating) {
	if(activating == null) {
		activating = false;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.activating = activating;
};
$hxClasses["openfl.events.ActivityEvent"] = openfl_events_ActivityEvent;
openfl_events_ActivityEvent.__name__ = ["openfl","events","ActivityEvent"];
openfl_events_ActivityEvent.__super__ = openfl_events_Event;
openfl_events_ActivityEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_ActivityEvent(this.type,this.bubbles,this.cancelable,this.activating);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("ActivityEvent",["type","bubbles","cancelable","activating"]);
	}
	,__class__: openfl_events_ActivityEvent
});
var openfl_events_TextEvent = function(type,bubbles,cancelable,text) {
	if(text == null) {
		text = "";
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.text = text;
};
$hxClasses["openfl.events.TextEvent"] = openfl_events_TextEvent;
openfl_events_TextEvent.__name__ = ["openfl","events","TextEvent"];
openfl_events_TextEvent.__super__ = openfl_events_Event;
openfl_events_TextEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_TextEvent(this.type,this.bubbles,this.cancelable,this.text);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("TextEvent",["type","bubbles","cancelable","text"]);
	}
	,__class__: openfl_events_TextEvent
});
var openfl_events_ErrorEvent = function(type,bubbles,cancelable,text,id) {
	if(id == null) {
		id = 0;
	}
	if(text == null) {
		text = "";
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_TextEvent.call(this,type,bubbles,cancelable,text);
	this.errorID = id;
};
$hxClasses["openfl.events.ErrorEvent"] = openfl_events_ErrorEvent;
openfl_events_ErrorEvent.__name__ = ["openfl","events","ErrorEvent"];
openfl_events_ErrorEvent.__super__ = openfl_events_TextEvent;
openfl_events_ErrorEvent.prototype = $extend(openfl_events_TextEvent.prototype,{
	clone: function() {
		var event = new openfl_events_ErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("ErrorEvent",["type","bubbles","cancelable","text","errorID"]);
	}
	,__class__: openfl_events_ErrorEvent
});
var openfl_events__$EventDispatcher_Listener = function(callback,useCapture,priority) {
	this.callback = callback;
	this.useCapture = useCapture;
	this.priority = priority;
};
$hxClasses["openfl.events._EventDispatcher.Listener"] = openfl_events__$EventDispatcher_Listener;
openfl_events__$EventDispatcher_Listener.__name__ = ["openfl","events","_EventDispatcher","Listener"];
openfl_events__$EventDispatcher_Listener.prototype = {
	match: function(callback,useCapture) {
		if(Reflect.compareMethods(this.callback,callback)) {
			return this.useCapture == useCapture;
		} else {
			return false;
		}
	}
	,__class__: openfl_events__$EventDispatcher_Listener
};
var openfl_events_FocusEvent = function(type,bubbles,cancelable,relatedObject,shiftKey,keyCode) {
	if(keyCode == null) {
		keyCode = 0;
	}
	if(shiftKey == null) {
		shiftKey = false;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.keyCode = keyCode;
	this.shiftKey = shiftKey;
	this.relatedObject = relatedObject;
};
$hxClasses["openfl.events.FocusEvent"] = openfl_events_FocusEvent;
openfl_events_FocusEvent.__name__ = ["openfl","events","FocusEvent"];
openfl_events_FocusEvent.__super__ = openfl_events_Event;
openfl_events_FocusEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_FocusEvent(this.type,this.bubbles,this.cancelable,this.relatedObject,this.shiftKey,this.keyCode);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("FocusEvent",["type","bubbles","cancelable","relatedObject","shiftKey","keyCode"]);
	}
	,__class__: openfl_events_FocusEvent
});
var openfl_events_FullScreenEvent = function(type,bubbles,cancelable,fullScreen,interactive) {
	if(interactive == null) {
		interactive = false;
	}
	if(fullScreen == null) {
		fullScreen = false;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_ActivityEvent.call(this,type,bubbles,cancelable);
	this.fullScreen = fullScreen;
	this.interactive = interactive;
};
$hxClasses["openfl.events.FullScreenEvent"] = openfl_events_FullScreenEvent;
openfl_events_FullScreenEvent.__name__ = ["openfl","events","FullScreenEvent"];
openfl_events_FullScreenEvent.__super__ = openfl_events_ActivityEvent;
openfl_events_FullScreenEvent.prototype = $extend(openfl_events_ActivityEvent.prototype,{
	clone: function() {
		var event = new openfl_events_FullScreenEvent(this.type,this.bubbles,this.cancelable,this.fullScreen,this.interactive);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("FullscreenEvent",["type","bubbles","cancelable","fullscreen","interactive"]);
	}
	,__class__: openfl_events_FullScreenEvent
});
var openfl_events_GameInputEvent = function(type,bubbles,cancelable,device) {
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = true;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.device = device;
};
$hxClasses["openfl.events.GameInputEvent"] = openfl_events_GameInputEvent;
openfl_events_GameInputEvent.__name__ = ["openfl","events","GameInputEvent"];
openfl_events_GameInputEvent.__super__ = openfl_events_Event;
openfl_events_GameInputEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_GameInputEvent(this.type,this.bubbles,this.cancelable,this.device);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("GameInputEvent",["type","bubbles","cancelable","device"]);
	}
	,__class__: openfl_events_GameInputEvent
});
var openfl_events_HTTPStatusEvent = function(type,bubbles,cancelable,status,redirected) {
	if(redirected == null) {
		redirected = false;
	}
	if(status == null) {
		status = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	this.status = status;
	this.redirected = redirected;
	openfl_events_Event.call(this,type,bubbles,cancelable);
};
$hxClasses["openfl.events.HTTPStatusEvent"] = openfl_events_HTTPStatusEvent;
openfl_events_HTTPStatusEvent.__name__ = ["openfl","events","HTTPStatusEvent"];
openfl_events_HTTPStatusEvent.__super__ = openfl_events_Event;
openfl_events_HTTPStatusEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_HTTPStatusEvent(this.type,this.bubbles,null,this.status,this.redirected);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("HTTPStatusEvent",["type","bubbles","cancelable","status","redirected"]);
	}
	,__class__: openfl_events_HTTPStatusEvent
});
var openfl_events_IOErrorEvent = function(type,bubbles,cancelable,text,id) {
	if(id == null) {
		id = 0;
	}
	if(text == null) {
		text = "";
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = true;
	}
	openfl_events_ErrorEvent.call(this,type,bubbles,cancelable,text,id);
};
$hxClasses["openfl.events.IOErrorEvent"] = openfl_events_IOErrorEvent;
openfl_events_IOErrorEvent.__name__ = ["openfl","events","IOErrorEvent"];
openfl_events_IOErrorEvent.__super__ = openfl_events_ErrorEvent;
openfl_events_IOErrorEvent.prototype = $extend(openfl_events_ErrorEvent.prototype,{
	clone: function() {
		var event = new openfl_events_IOErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("IOErrorEvent",["type","bubbles","cancelable","text","errorID"]);
	}
	,__class__: openfl_events_IOErrorEvent
});
var openfl_events_KeyboardEvent = function(type,bubbles,cancelable,charCodeValue,keyCodeValue,keyLocationValue,ctrlKeyValue,altKeyValue,shiftKeyValue,controlKeyValue,commandKeyValue) {
	if(commandKeyValue == null) {
		commandKeyValue = false;
	}
	if(controlKeyValue == null) {
		controlKeyValue = false;
	}
	if(shiftKeyValue == null) {
		shiftKeyValue = false;
	}
	if(altKeyValue == null) {
		altKeyValue = false;
	}
	if(ctrlKeyValue == null) {
		ctrlKeyValue = false;
	}
	if(keyCodeValue == null) {
		keyCodeValue = 0;
	}
	if(charCodeValue == null) {
		charCodeValue = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.charCode = charCodeValue;
	this.keyCode = keyCodeValue;
	this.keyLocation = keyLocationValue != null ? keyLocationValue : 0;
	this.ctrlKey = ctrlKeyValue;
	this.altKey = altKeyValue;
	this.shiftKey = shiftKeyValue;
	this.controlKey = controlKeyValue;
	this.commandKey = commandKeyValue;
};
$hxClasses["openfl.events.KeyboardEvent"] = openfl_events_KeyboardEvent;
openfl_events_KeyboardEvent.__name__ = ["openfl","events","KeyboardEvent"];
openfl_events_KeyboardEvent.__super__ = openfl_events_Event;
openfl_events_KeyboardEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_KeyboardEvent(this.type,this.bubbles,this.cancelable,this.charCode,this.keyCode,this.keyLocation,this.ctrlKey,this.altKey,this.shiftKey,this.controlKey,this.commandKey);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("KeyboardEvent",["type","bubbles","cancelable","charCode","keyCode","keyLocation","ctrlKey","altKey","shiftKey"]);
	}
	,__class__: openfl_events_KeyboardEvent
});
var openfl_events_MouseEvent = function(type,bubbles,cancelable,localX,localY,relatedObject,ctrlKey,altKey,shiftKey,buttonDown,delta,commandKey,clickCount) {
	if(clickCount == null) {
		clickCount = 0;
	}
	if(commandKey == null) {
		commandKey = false;
	}
	if(delta == null) {
		delta = 0;
	}
	if(buttonDown == null) {
		buttonDown = false;
	}
	if(shiftKey == null) {
		shiftKey = false;
	}
	if(altKey == null) {
		altKey = false;
	}
	if(ctrlKey == null) {
		ctrlKey = false;
	}
	if(localY == null) {
		localY = 0;
	}
	if(localX == null) {
		localX = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = true;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.shiftKey = shiftKey;
	this.altKey = altKey;
	this.ctrlKey = ctrlKey;
	this.bubbles = bubbles;
	this.relatedObject = relatedObject;
	this.delta = delta;
	this.localX = localX;
	this.localY = localY;
	this.buttonDown = buttonDown;
	this.commandKey = commandKey;
	this.clickCount = clickCount;
};
$hxClasses["openfl.events.MouseEvent"] = openfl_events_MouseEvent;
openfl_events_MouseEvent.__name__ = ["openfl","events","MouseEvent"];
openfl_events_MouseEvent.__altKey = null;
openfl_events_MouseEvent.__buttonDown = null;
openfl_events_MouseEvent.__commandKey = null;
openfl_events_MouseEvent.__ctrlKey = null;
openfl_events_MouseEvent.__shiftKey = null;
openfl_events_MouseEvent.__create = function(type,button,stageX,stageY,local,target,delta) {
	if(delta == null) {
		delta = 0;
	}
	switch(type) {
	case "mouseDown":
		openfl_events_MouseEvent.__buttonDown = true;
		break;
	case "mouseUp":
		openfl_events_MouseEvent.__buttonDown = false;
		break;
	default:
	}
	var event = new openfl_events_MouseEvent(type,true,false,local.x,local.y,null,openfl_events_MouseEvent.__ctrlKey,openfl_events_MouseEvent.__altKey,openfl_events_MouseEvent.__shiftKey,openfl_events_MouseEvent.__buttonDown,delta,openfl_events_MouseEvent.__commandKey);
	event.stageX = stageX;
	event.stageY = stageY;
	event.target = target;
	return event;
};
openfl_events_MouseEvent.__super__ = openfl_events_Event;
openfl_events_MouseEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_MouseEvent(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.clickCount);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("MouseEvent",["type","bubbles","cancelable","localX","localY","relatedObject","ctrlKey","altKey","shiftKey","buttonDown","delta"]);
	}
	,updateAfterEvent: function() {
	}
	,__class__: openfl_events_MouseEvent
});
var openfl_events_NetStatusEvent = function(type,bubbles,cancelable,info) {
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	this.info = info;
	openfl_events_Event.call(this,type,bubbles,cancelable);
};
$hxClasses["openfl.events.NetStatusEvent"] = openfl_events_NetStatusEvent;
openfl_events_NetStatusEvent.__name__ = ["openfl","events","NetStatusEvent"];
openfl_events_NetStatusEvent.__super__ = openfl_events_Event;
openfl_events_NetStatusEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_NetStatusEvent(this.type,this.bubbles,this.cancelable,this.info);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("NetStatusEvent",["type","bubbles","cancelable","info"]);
	}
	,__class__: openfl_events_NetStatusEvent
});
var openfl_events_ProgressEvent = function(type,bubbles,cancelable,bytesLoaded,bytesTotal) {
	if(bytesTotal == null) {
		bytesTotal = 0;
	}
	if(bytesLoaded == null) {
		bytesLoaded = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.bytesLoaded = bytesLoaded;
	this.bytesTotal = bytesTotal;
};
$hxClasses["openfl.events.ProgressEvent"] = openfl_events_ProgressEvent;
openfl_events_ProgressEvent.__name__ = ["openfl","events","ProgressEvent"];
openfl_events_ProgressEvent.__super__ = openfl_events_Event;
openfl_events_ProgressEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_ProgressEvent(this.type,this.bubbles,this.cancelable,this.bytesLoaded,this.bytesTotal);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("ProgressEvent",["type","bubbles","cancelable","bytesLoaded","bytesTotal"]);
	}
	,__class__: openfl_events_ProgressEvent
});
var openfl_events_SecurityErrorEvent = function(type,bubbles,cancelable,text,id) {
	if(id == null) {
		id = 0;
	}
	if(text == null) {
		text = "";
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = false;
	}
	openfl_events_ErrorEvent.call(this,type,bubbles,cancelable,text,id);
};
$hxClasses["openfl.events.SecurityErrorEvent"] = openfl_events_SecurityErrorEvent;
openfl_events_SecurityErrorEvent.__name__ = ["openfl","events","SecurityErrorEvent"];
openfl_events_SecurityErrorEvent.__super__ = openfl_events_ErrorEvent;
openfl_events_SecurityErrorEvent.prototype = $extend(openfl_events_ErrorEvent.prototype,{
	clone: function() {
		var event = new openfl_events_SecurityErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("SecurityErrorEvent",["type","bubbles","cancelable","text","errorID"]);
	}
	,__class__: openfl_events_SecurityErrorEvent
});
var openfl_events_TouchEvent = function(type,bubbles,cancelable,touchPointID,isPrimaryTouchPoint,localX,localY,sizeX,sizeY,pressure,relatedObject,ctrlKey,altKey,shiftKey,commandKey,controlKey,timestamp,touchIntent,samples,isTouchPointCanceled) {
	if(isTouchPointCanceled == null) {
		isTouchPointCanceled = false;
	}
	if(timestamp == null) {
		timestamp = 0;
	}
	if(controlKey == null) {
		controlKey = false;
	}
	if(commandKey == null) {
		commandKey = false;
	}
	if(shiftKey == null) {
		shiftKey = false;
	}
	if(altKey == null) {
		altKey = false;
	}
	if(ctrlKey == null) {
		ctrlKey = false;
	}
	if(pressure == null) {
		pressure = 0;
	}
	if(sizeY == null) {
		sizeY = 0;
	}
	if(sizeX == null) {
		sizeX = 0;
	}
	if(localY == null) {
		localY = 0;
	}
	if(localX == null) {
		localX = 0;
	}
	if(isPrimaryTouchPoint == null) {
		isPrimaryTouchPoint = false;
	}
	if(touchPointID == null) {
		touchPointID = 0;
	}
	if(cancelable == null) {
		cancelable = false;
	}
	if(bubbles == null) {
		bubbles = true;
	}
	openfl_events_Event.call(this,type,bubbles,cancelable);
	this.touchPointID = touchPointID;
	this.isPrimaryTouchPoint = isPrimaryTouchPoint;
	this.localX = localX;
	this.localY = localY;
	this.sizeX = sizeX;
	this.sizeY = sizeY;
	this.pressure = pressure;
	this.relatedObject = relatedObject;
	this.ctrlKey = ctrlKey;
	this.altKey = altKey;
	this.shiftKey = shiftKey;
	this.commandKey = commandKey;
	this.controlKey = controlKey;
};
$hxClasses["openfl.events.TouchEvent"] = openfl_events_TouchEvent;
openfl_events_TouchEvent.__name__ = ["openfl","events","TouchEvent"];
openfl_events_TouchEvent.__create = function(type,touch,stageX,stageY,local,target) {
	var evt = new openfl_events_TouchEvent(type,true,false,0,true,local.x,local.y,1,1,1);
	evt.stageX = stageX;
	evt.stageY = stageY;
	evt.target = target;
	return evt;
};
openfl_events_TouchEvent.__super__ = openfl_events_Event;
openfl_events_TouchEvent.prototype = $extend(openfl_events_Event.prototype,{
	clone: function() {
		var event = new openfl_events_TouchEvent(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);
		event.target = this.target;
		event.currentTarget = this.currentTarget;
		event.eventPhase = this.eventPhase;
		return event;
	}
	,toString: function() {
		return this.__formatToString("TouchEvent",["type","bubbles","cancelable","touchPointID","isPrimaryTouchPoint","localX","localY","sizeX","sizeY","pressure","relatedObject","ctrlKey","altKey","shiftKey","commandKey","controlKey"]);
	}
	,updateAfterEvent: function() {
	}
	,__class__: openfl_events_TouchEvent
});
var openfl_filters_BitmapFilter = function() {
	this.__saveLastFilter = false;
	this.__passes = 0;
	this.__dirty = true;
};
$hxClasses["openfl.filters.BitmapFilter"] = openfl_filters_BitmapFilter;
openfl_filters_BitmapFilter.__name__ = ["openfl","filters","BitmapFilter"];
openfl_filters_BitmapFilter.__tmpRenderTexture = null;
openfl_filters_BitmapFilter.__applyFilters = function(filters,renderSession,source,target,sourceRect,destPoint) {
	var same = target == source && target.__usingPingPongTexture;
	if(same) {
		target.__pingPongTexture.useOldTexture = true;
	}
	if(sourceRect == null) {
		sourceRect = source.rect;
	}
	var lastFilterOutput = null;
	var useLastFilter = false;
	var srcShader = source.__shader;
	var _g = 0;
	while(_g < filters.length) {
		var filter = filters[_g];
		++_g;
		useLastFilter = false;
		if(filter.__saveLastFilter) {
			target.__pingPongTexture.swap();
			target.__drawGL(renderSession,source,null,null,null,sourceRect,true,!target.__usingPingPongTexture,true);
			var _this = target.__pingPongTexture;
			if(_this.__swapped) {
				lastFilterOutput = _this.__texture0;
			} else {
				lastFilterOutput = _this.__texture1;
			}
			var _this1 = target.__pingPongTexture;
			var v = openfl_filters_BitmapFilter.__tmpRenderTexture;
			if(_this1.__swapped) {
				_this1.__texture0 = v;
			} else {
				_this1.__texture1 = v;
			}
		}
		var _g2 = 0;
		var _g1 = filter.__passes;
		while(_g2 < _g1) {
			var pass = _g2++;
			if(filter.__saveLastFilter) {
				useLastFilter = filter.__useLastFilter(pass);
			} else {
				useLastFilter = false;
			}
			if(same && !useLastFilter) {
				target.__pingPongTexture.swap();
			}
			if(useLastFilter) {
				var _this2 = target.__pingPongTexture;
				openfl_filters_BitmapFilter.__tmpRenderTexture = _this2.__swapped ? _this2.__texture0 : _this2.__texture1;
				var _this3 = target.__pingPongTexture;
				if(_this3.__swapped) {
					_this3.__texture0 = lastFilterOutput;
				} else {
					_this3.__texture1 = lastFilterOutput;
				}
			}
			source.__shader = filter.__preparePass(pass);
			target.__drawGL(renderSession,source,null,null,null,sourceRect,true,!target.__usingPingPongTexture,!useLastFilter);
		}
	}
	source.__shader = srcShader;
	if(same) {
		target.__pingPongTexture.useOldTexture = false;
	}
};
openfl_filters_BitmapFilter.__expandBounds = function(filters,rect,matrix) {
	var r = openfl_geom_Rectangle.__temp;
	r.setEmpty();
	var _g = 0;
	while(_g < filters.length) ++_g;
	r.__transform(r,matrix);
	rect.__expand(r.x,r.y,r.width,r.height);
};
openfl_filters_BitmapFilter.prototype = {
	clone: function() {
		return new openfl_filters_BitmapFilter();
	}
	,__applyFilter: function(sourceData,targetData,sourceRect,destPoint) {
	}
	,__growBounds: function(rect) {
	}
	,__preparePass: function(pass) {
		return null;
	}
	,__useLastFilter: function(pass) {
		return false;
	}
	,__class__: openfl_filters_BitmapFilter
};
var openfl_geom_Matrix3D = function(v) {
	if(v != null && v.length == 16) {
		this.rawData = v;
	} else {
		var value = [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0];
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		this.rawData = vectorData;
	}
};
$hxClasses["openfl.geom.Matrix3D"] = openfl_geom_Matrix3D;
openfl_geom_Matrix3D.__name__ = ["openfl","geom","Matrix3D"];
openfl_geom_Matrix3D.create2D = function(x,y,scale,rotation) {
	if(rotation == null) {
		rotation = 0;
	}
	if(scale == null) {
		scale = 1;
	}
	var theta = rotation * Math.PI / 180.0;
	var c = Math.cos(theta);
	var s = Math.sin(theta);
	var value = [c * scale,-s * scale,0,0,s * scale,c * scale,0,0,0,0,1,0,x,y,0,1];
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value.slice(0);
	return new openfl_geom_Matrix3D(vectorData);
};
openfl_geom_Matrix3D.createABCD = function(a,b,c,d,tx,ty) {
	var value = [a,b,0,0,c,d,0,0,0,0,1,0,tx,ty,0,1];
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value.slice(0);
	return new openfl_geom_Matrix3D(vectorData);
};
openfl_geom_Matrix3D.createOrtho = function(x0,x1,y0,y1,zNear,zFar) {
	var sx = 1.0 / (x1 - x0);
	var sy = 1.0 / (y1 - y0);
	var sz = 1.0 / (zFar - zNear);
	var value = [2.0 * sx,0,0,0,0,2.0 * sy,0,0,0,0,-2.0 * sz,0,-(x0 + x1) * sx,-(y0 + y1) * sy,-(zNear + zFar) * sz,1];
	var vectorData = new openfl_VectorData();
	vectorData.length = value.length;
	vectorData.fixed = true;
	vectorData.data = value.slice(0);
	return new openfl_geom_Matrix3D(vectorData);
};
openfl_geom_Matrix3D.interpolate = function(thisMat,toMat,percent) {
	var m = new openfl_geom_Matrix3D();
	var _g = 0;
	while(_g < 16) {
		var i = _g++;
		var this1 = m.rawData;
		var value = thisMat.rawData.data[i] + (toMat.rawData.data[i] - thisMat.rawData.data[i]) * percent;
		if(!this1.fixed) {
			if(i >= this1.length) {
				this1.length = i + 1;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var data = new Array(length);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[i] = value;
	}
	return m;
};
openfl_geom_Matrix3D.__getAxisRotation = function(x,y,z,degrees) {
	var m = new openfl_geom_Matrix3D();
	var a1 = new openfl_geom_Vector3D(x,y,z);
	var rad = -degrees * (Math.PI / 180);
	var c = Math.cos(rad);
	var s = Math.sin(rad);
	var t = 1.0 - c;
	var this1 = m.rawData;
	var value = c + a1.x * a1.x * t;
	if(!this1.fixed) {
		if(0 >= this1.length) {
			this1.length = 1;
		}
		if(this1.data.length < this1.length) {
			var length = this1.data.length + 10;
			var data = new Array(length);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
			this1.data = data;
		}
	}
	this1.data[0] = value;
	var this2 = m.rawData;
	var value1 = c + a1.y * a1.y * t;
	if(!this2.fixed) {
		if(5 >= this2.length) {
			this2.length = 6;
		}
		if(this2.data.length < this2.length) {
			var length1 = this2.data.length + 10;
			var data1 = new Array(length1);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
			this2.data = data1;
		}
	}
	this2.data[5] = value1;
	var this3 = m.rawData;
	var value2 = c + a1.z * a1.z * t;
	if(!this3.fixed) {
		if(10 >= this3.length) {
			this3.length = 11;
		}
		if(this3.data.length < this3.length) {
			var length2 = this3.data.length + 10;
			var data2 = new Array(length2);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
			this3.data = data2;
		}
	}
	this3.data[10] = value2;
	var tmp1 = a1.x * a1.y * t;
	var tmp2 = a1.z * s;
	var this4 = m.rawData;
	if(!this4.fixed) {
		if(4 >= this4.length) {
			this4.length = 5;
		}
		if(this4.data.length < this4.length) {
			var length3 = this4.data.length + 10;
			var data3 = new Array(length3);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data3,0,this4.data.length);
			this4.data = data3;
		}
	}
	this4.data[4] = tmp1 + tmp2;
	var this5 = m.rawData;
	if(!this5.fixed) {
		if(1 >= this5.length) {
			this5.length = 2;
		}
		if(this5.data.length < this5.length) {
			var length4 = this5.data.length + 10;
			var data4 = new Array(length4);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data4,0,this5.data.length);
			this5.data = data4;
		}
	}
	this5.data[1] = tmp1 - tmp2;
	tmp1 = a1.x * a1.z * t;
	tmp2 = a1.y * s;
	var this6 = m.rawData;
	if(!this6.fixed) {
		if(8 >= this6.length) {
			this6.length = 9;
		}
		if(this6.data.length < this6.length) {
			var length5 = this6.data.length + 10;
			var data5 = new Array(length5);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this6.data,0,data5,0,this6.data.length);
			this6.data = data5;
		}
	}
	this6.data[8] = tmp1 - tmp2;
	var this7 = m.rawData;
	if(!this7.fixed) {
		if(2 >= this7.length) {
			this7.length = 3;
		}
		if(this7.data.length < this7.length) {
			var length6 = this7.data.length + 10;
			var data6 = new Array(length6);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data6,0,this7.data.length);
			this7.data = data6;
		}
	}
	this7.data[2] = tmp1 + tmp2;
	tmp1 = a1.y * a1.z * t;
	tmp2 = a1.x * s;
	var this8 = m.rawData;
	if(!this8.fixed) {
		if(9 >= this8.length) {
			this8.length = 10;
		}
		if(this8.data.length < this8.length) {
			var length7 = this8.data.length + 10;
			var data7 = new Array(length7);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this8.data,0,data7,0,this8.data.length);
			this8.data = data7;
		}
	}
	this8.data[9] = tmp1 + tmp2;
	var this9 = m.rawData;
	if(!this9.fixed) {
		if(6 >= this9.length) {
			this9.length = 7;
		}
		if(this9.data.length < this9.length) {
			var length8 = this9.data.length + 10;
			var data8 = new Array(length8);
			haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data8,0,this9.data.length);
			this9.data = data8;
		}
	}
	this9.data[6] = tmp1 - tmp2;
	return m;
};
openfl_geom_Matrix3D.prototype = {
	append: function(lhs) {
		var m111 = this.rawData.data[0];
		var m121 = this.rawData.data[4];
		var m131 = this.rawData.data[8];
		var m141 = this.rawData.data[12];
		var m112 = this.rawData.data[1];
		var m122 = this.rawData.data[5];
		var m132 = this.rawData.data[9];
		var m142 = this.rawData.data[13];
		var m113 = this.rawData.data[2];
		var m123 = this.rawData.data[6];
		var m133 = this.rawData.data[10];
		var m143 = this.rawData.data[14];
		var m114 = this.rawData.data[3];
		var m124 = this.rawData.data[7];
		var m134 = this.rawData.data[11];
		var m144 = this.rawData.data[15];
		var m211 = lhs.rawData.data[0];
		var m221 = lhs.rawData.data[4];
		var m231 = lhs.rawData.data[8];
		var m241 = lhs.rawData.data[12];
		var m212 = lhs.rawData.data[1];
		var m222 = lhs.rawData.data[5];
		var m232 = lhs.rawData.data[9];
		var m242 = lhs.rawData.data[13];
		var m213 = lhs.rawData.data[2];
		var m223 = lhs.rawData.data[6];
		var m233 = lhs.rawData.data[10];
		var m243 = lhs.rawData.data[14];
		var m214 = lhs.rawData.data[3];
		var m224 = lhs.rawData.data[7];
		var m234 = lhs.rawData.data[11];
		var m244 = lhs.rawData.data[15];
		var this1 = this.rawData;
		if(!this1.fixed) {
			if(0 >= this1.length) {
				this1.length = 1;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var data = new Array(length);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
		var this2 = this.rawData;
		if(!this2.fixed) {
			if(1 >= this2.length) {
				this2.length = 2;
			}
			if(this2.data.length < this2.length) {
				var length1 = this2.data.length + 10;
				var data1 = new Array(length1);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
				this2.data = data1;
			}
		}
		this2.data[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
		var this3 = this.rawData;
		if(!this3.fixed) {
			if(2 >= this3.length) {
				this3.length = 3;
			}
			if(this3.data.length < this3.length) {
				var length2 = this3.data.length + 10;
				var data2 = new Array(length2);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
				this3.data = data2;
			}
		}
		this3.data[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
		var this4 = this.rawData;
		if(!this4.fixed) {
			if(3 >= this4.length) {
				this4.length = 4;
			}
			if(this4.data.length < this4.length) {
				var length3 = this4.data.length + 10;
				var data3 = new Array(length3);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data3,0,this4.data.length);
				this4.data = data3;
			}
		}
		this4.data[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
		var this5 = this.rawData;
		if(!this5.fixed) {
			if(4 >= this5.length) {
				this5.length = 5;
			}
			if(this5.data.length < this5.length) {
				var length4 = this5.data.length + 10;
				var data4 = new Array(length4);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data4,0,this5.data.length);
				this5.data = data4;
			}
		}
		this5.data[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
		var this6 = this.rawData;
		if(!this6.fixed) {
			if(5 >= this6.length) {
				this6.length = 6;
			}
			if(this6.data.length < this6.length) {
				var length5 = this6.data.length + 10;
				var data5 = new Array(length5);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this6.data,0,data5,0,this6.data.length);
				this6.data = data5;
			}
		}
		this6.data[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
		var this7 = this.rawData;
		if(!this7.fixed) {
			if(6 >= this7.length) {
				this7.length = 7;
			}
			if(this7.data.length < this7.length) {
				var length6 = this7.data.length + 10;
				var data6 = new Array(length6);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data6,0,this7.data.length);
				this7.data = data6;
			}
		}
		this7.data[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
		var this8 = this.rawData;
		if(!this8.fixed) {
			if(7 >= this8.length) {
				this8.length = 8;
			}
			if(this8.data.length < this8.length) {
				var length7 = this8.data.length + 10;
				var data7 = new Array(length7);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this8.data,0,data7,0,this8.data.length);
				this8.data = data7;
			}
		}
		this8.data[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
		var this9 = this.rawData;
		if(!this9.fixed) {
			if(8 >= this9.length) {
				this9.length = 9;
			}
			if(this9.data.length < this9.length) {
				var length8 = this9.data.length + 10;
				var data8 = new Array(length8);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data8,0,this9.data.length);
				this9.data = data8;
			}
		}
		this9.data[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
		var this10 = this.rawData;
		if(!this10.fixed) {
			if(9 >= this10.length) {
				this10.length = 10;
			}
			if(this10.data.length < this10.length) {
				var length9 = this10.data.length + 10;
				var data9 = new Array(length9);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this10.data,0,data9,0,this10.data.length);
				this10.data = data9;
			}
		}
		this10.data[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
		var this11 = this.rawData;
		if(!this11.fixed) {
			if(10 >= this11.length) {
				this11.length = 11;
			}
			if(this11.data.length < this11.length) {
				var length10 = this11.data.length + 10;
				var data10 = new Array(length10);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data10,0,this11.data.length);
				this11.data = data10;
			}
		}
		this11.data[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
		var this12 = this.rawData;
		if(!this12.fixed) {
			if(11 >= this12.length) {
				this12.length = 12;
			}
			if(this12.data.length < this12.length) {
				var length11 = this12.data.length + 10;
				var data11 = new Array(length11);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this12.data,0,data11,0,this12.data.length);
				this12.data = data11;
			}
		}
		this12.data[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
		var this13 = this.rawData;
		if(!this13.fixed) {
			if(12 >= this13.length) {
				this13.length = 13;
			}
			if(this13.data.length < this13.length) {
				var length12 = this13.data.length + 10;
				var data12 = new Array(length12);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data12,0,this13.data.length);
				this13.data = data12;
			}
		}
		this13.data[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
		var this14 = this.rawData;
		if(!this14.fixed) {
			if(13 >= this14.length) {
				this14.length = 14;
			}
			if(this14.data.length < this14.length) {
				var length13 = this14.data.length + 10;
				var data13 = new Array(length13);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this14.data,0,data13,0,this14.data.length);
				this14.data = data13;
			}
		}
		this14.data[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
		var this15 = this.rawData;
		if(!this15.fixed) {
			if(14 >= this15.length) {
				this15.length = 15;
			}
			if(this15.data.length < this15.length) {
				var length14 = this15.data.length + 10;
				var data14 = new Array(length14);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data14,0,this15.data.length);
				this15.data = data14;
			}
		}
		this15.data[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
		var this16 = this.rawData;
		if(!this16.fixed) {
			if(15 >= this16.length) {
				this16.length = 16;
			}
			if(this16.data.length < this16.length) {
				var length15 = this16.data.length + 10;
				var data15 = new Array(length15);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this16.data,0,data15,0,this16.data.length);
				this16.data = data15;
			}
		}
		this16.data[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
	}
	,appendRotation: function(degrees,axis,pivotPoint) {
		var m = openfl_geom_Matrix3D.__getAxisRotation(axis.x,axis.y,axis.z,degrees);
		if(pivotPoint != null) {
			m.appendTranslation(pivotPoint.x,pivotPoint.y,pivotPoint.z);
		}
		this.append(m);
	}
	,appendScale: function(xScale,yScale,zScale) {
		var value = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		this.append(new openfl_geom_Matrix3D(vectorData));
	}
	,appendTranslation: function(x,y,z) {
		var this1 = this.rawData;
		var value = this.rawData.data[12] + x;
		if(!this1.fixed) {
			if(12 >= this1.length) {
				this1.length = 13;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var data = new Array(length);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[12] = value;
		var this2 = this.rawData;
		var value1 = this.rawData.data[13] + y;
		if(!this2.fixed) {
			if(13 >= this2.length) {
				this2.length = 14;
			}
			if(this2.data.length < this2.length) {
				var length1 = this2.data.length + 10;
				var data1 = new Array(length1);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
				this2.data = data1;
			}
		}
		this2.data[13] = value1;
		var this3 = this.rawData;
		var value2 = this.rawData.data[14] + z;
		if(!this3.fixed) {
			if(14 >= this3.length) {
				this3.length = 15;
			}
			if(this3.data.length < this3.length) {
				var length2 = this3.data.length + 10;
				var data2 = new Array(length2);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
				this3.data = data2;
			}
		}
		this3.data[14] = value2;
	}
	,clone: function() {
		var this1 = this.rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this1.length;
		vectorData.fixed = this1.fixed;
		var length = this1.length;
		vectorData.data = new Array(length);
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
		return new openfl_geom_Matrix3D(vectorData);
	}
	,copyColumnFrom: function(column,vector3D) {
		switch(column) {
		case 0:
			var this1 = this.rawData;
			var value = vector3D.x;
			if(!this1.fixed) {
				if(0 >= this1.length) {
					this1.length = 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[0] = value;
			var this2 = this.rawData;
			var value1 = vector3D.y;
			if(!this2.fixed) {
				if(1 >= this2.length) {
					this2.length = 2;
				}
				if(this2.data.length < this2.length) {
					var length1 = this2.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
					this2.data = data1;
				}
			}
			this2.data[1] = value1;
			var this3 = this.rawData;
			var value2 = vector3D.z;
			if(!this3.fixed) {
				if(2 >= this3.length) {
					this3.length = 3;
				}
				if(this3.data.length < this3.length) {
					var length2 = this3.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
					this3.data = data2;
				}
			}
			this3.data[2] = value2;
			var this4 = this.rawData;
			var value3 = vector3D.w;
			if(!this4.fixed) {
				if(3 >= this4.length) {
					this4.length = 4;
				}
				if(this4.data.length < this4.length) {
					var length3 = this4.data.length + 10;
					var data3 = new Array(length3);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data3,0,this4.data.length);
					this4.data = data3;
				}
			}
			this4.data[3] = value3;
			break;
		case 1:
			var this5 = this.rawData;
			var value4 = vector3D.x;
			if(!this5.fixed) {
				if(4 >= this5.length) {
					this5.length = 5;
				}
				if(this5.data.length < this5.length) {
					var length4 = this5.data.length + 10;
					var data4 = new Array(length4);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data4,0,this5.data.length);
					this5.data = data4;
				}
			}
			this5.data[4] = value4;
			var this6 = this.rawData;
			var value5 = vector3D.y;
			if(!this6.fixed) {
				if(5 >= this6.length) {
					this6.length = 6;
				}
				if(this6.data.length < this6.length) {
					var length5 = this6.data.length + 10;
					var data5 = new Array(length5);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this6.data,0,data5,0,this6.data.length);
					this6.data = data5;
				}
			}
			this6.data[5] = value5;
			var this7 = this.rawData;
			var value6 = vector3D.z;
			if(!this7.fixed) {
				if(6 >= this7.length) {
					this7.length = 7;
				}
				if(this7.data.length < this7.length) {
					var length6 = this7.data.length + 10;
					var data6 = new Array(length6);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data6,0,this7.data.length);
					this7.data = data6;
				}
			}
			this7.data[6] = value6;
			var this8 = this.rawData;
			var value7 = vector3D.w;
			if(!this8.fixed) {
				if(7 >= this8.length) {
					this8.length = 8;
				}
				if(this8.data.length < this8.length) {
					var length7 = this8.data.length + 10;
					var data7 = new Array(length7);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this8.data,0,data7,0,this8.data.length);
					this8.data = data7;
				}
			}
			this8.data[7] = value7;
			break;
		case 2:
			var this9 = this.rawData;
			var value8 = vector3D.x;
			if(!this9.fixed) {
				if(8 >= this9.length) {
					this9.length = 9;
				}
				if(this9.data.length < this9.length) {
					var length8 = this9.data.length + 10;
					var data8 = new Array(length8);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data8,0,this9.data.length);
					this9.data = data8;
				}
			}
			this9.data[8] = value8;
			var this10 = this.rawData;
			var value9 = vector3D.y;
			if(!this10.fixed) {
				if(9 >= this10.length) {
					this10.length = 10;
				}
				if(this10.data.length < this10.length) {
					var length9 = this10.data.length + 10;
					var data9 = new Array(length9);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this10.data,0,data9,0,this10.data.length);
					this10.data = data9;
				}
			}
			this10.data[9] = value9;
			var this11 = this.rawData;
			var value10 = vector3D.z;
			if(!this11.fixed) {
				if(10 >= this11.length) {
					this11.length = 11;
				}
				if(this11.data.length < this11.length) {
					var length10 = this11.data.length + 10;
					var data10 = new Array(length10);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data10,0,this11.data.length);
					this11.data = data10;
				}
			}
			this11.data[10] = value10;
			var this12 = this.rawData;
			var value11 = vector3D.w;
			if(!this12.fixed) {
				if(11 >= this12.length) {
					this12.length = 12;
				}
				if(this12.data.length < this12.length) {
					var length11 = this12.data.length + 10;
					var data11 = new Array(length11);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this12.data,0,data11,0,this12.data.length);
					this12.data = data11;
				}
			}
			this12.data[11] = value11;
			break;
		case 3:
			var this13 = this.rawData;
			var value12 = vector3D.x;
			if(!this13.fixed) {
				if(12 >= this13.length) {
					this13.length = 13;
				}
				if(this13.data.length < this13.length) {
					var length12 = this13.data.length + 10;
					var data12 = new Array(length12);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data12,0,this13.data.length);
					this13.data = data12;
				}
			}
			this13.data[12] = value12;
			var this14 = this.rawData;
			var value13 = vector3D.y;
			if(!this14.fixed) {
				if(13 >= this14.length) {
					this14.length = 14;
				}
				if(this14.data.length < this14.length) {
					var length13 = this14.data.length + 10;
					var data13 = new Array(length13);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this14.data,0,data13,0,this14.data.length);
					this14.data = data13;
				}
			}
			this14.data[13] = value13;
			var this15 = this.rawData;
			var value14 = vector3D.z;
			if(!this15.fixed) {
				if(14 >= this15.length) {
					this15.length = 15;
				}
				if(this15.data.length < this15.length) {
					var length14 = this15.data.length + 10;
					var data14 = new Array(length14);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data14,0,this15.data.length);
					this15.data = data14;
				}
			}
			this15.data[14] = value14;
			var this16 = this.rawData;
			var value15 = vector3D.w;
			if(!this16.fixed) {
				if(15 >= this16.length) {
					this16.length = 16;
				}
				if(this16.data.length < this16.length) {
					var length15 = this16.data.length + 10;
					var data15 = new Array(length15);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this16.data,0,data15,0,this16.data.length);
					this16.data = data15;
				}
			}
			this16.data[15] = value15;
			break;
		default:
		}
	}
	,copyColumnTo: function(column,vector3D) {
		switch(column) {
		case 0:
			vector3D.x = this.rawData.data[0];
			vector3D.y = this.rawData.data[1];
			vector3D.z = this.rawData.data[2];
			vector3D.w = this.rawData.data[3];
			break;
		case 1:
			vector3D.x = this.rawData.data[4];
			vector3D.y = this.rawData.data[5];
			vector3D.z = this.rawData.data[6];
			vector3D.w = this.rawData.data[7];
			break;
		case 2:
			vector3D.x = this.rawData.data[8];
			vector3D.y = this.rawData.data[9];
			vector3D.z = this.rawData.data[10];
			vector3D.w = this.rawData.data[11];
			break;
		case 3:
			vector3D.x = this.rawData.data[12];
			vector3D.y = this.rawData.data[13];
			vector3D.z = this.rawData.data[14];
			vector3D.w = this.rawData.data[15];
			break;
		default:
		}
	}
	,copyFrom: function(other) {
		var this1 = other.rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this1.length;
		vectorData.fixed = this1.fixed;
		var length = this1.length;
		vectorData.data = new Array(length);
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
		this.rawData = vectorData;
	}
	,copyRawDataFrom: function(vector,index,transpose) {
		if(transpose == null) {
			transpose = false;
		}
		if(index == null) {
			index = 0;
		}
		if(transpose) {
			this.transpose();
		}
		var _g1 = 0;
		var _g = vector.length - index;
		while(_g1 < _g) {
			var i = _g1++;
			var this1 = this.rawData;
			var value = vector.data[i + index];
			if(!this1.fixed) {
				if(i >= this1.length) {
					this1.length = i + 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[i] = value;
		}
		if(transpose) {
			this.transpose();
		}
	}
	,copyRawDataTo: function(vector,index,transpose) {
		if(transpose == null) {
			transpose = false;
		}
		if(index == null) {
			index = 0;
		}
		if(transpose) {
			this.transpose();
		}
		var _g1 = 0;
		var _g = this.rawData.length;
		while(_g1 < _g) {
			var i = _g1++;
			var key = i + index;
			var value = this.rawData.data[i];
			if(!vector.fixed) {
				if(key >= vector.length) {
					vector.length = key + 1;
				}
				if(vector.data.length < vector.length) {
					var length = vector.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(vector.data,0,data,0,vector.data.length);
					vector.data = data;
				}
			}
			vector.data[key] = value;
		}
		if(transpose) {
			this.transpose();
		}
	}
	,copyRowFrom: function(row,vector3D) {
		switch(row) {
		case 0:
			var this1 = this.rawData;
			var value = vector3D.x;
			if(!this1.fixed) {
				if(0 >= this1.length) {
					this1.length = 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[0] = value;
			var this2 = this.rawData;
			var value1 = vector3D.y;
			if(!this2.fixed) {
				if(4 >= this2.length) {
					this2.length = 5;
				}
				if(this2.data.length < this2.length) {
					var length1 = this2.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
					this2.data = data1;
				}
			}
			this2.data[4] = value1;
			var this3 = this.rawData;
			var value2 = vector3D.z;
			if(!this3.fixed) {
				if(8 >= this3.length) {
					this3.length = 9;
				}
				if(this3.data.length < this3.length) {
					var length2 = this3.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
					this3.data = data2;
				}
			}
			this3.data[8] = value2;
			var this4 = this.rawData;
			var value3 = vector3D.w;
			if(!this4.fixed) {
				if(12 >= this4.length) {
					this4.length = 13;
				}
				if(this4.data.length < this4.length) {
					var length3 = this4.data.length + 10;
					var data3 = new Array(length3);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data3,0,this4.data.length);
					this4.data = data3;
				}
			}
			this4.data[12] = value3;
			break;
		case 1:
			var this5 = this.rawData;
			var value4 = vector3D.x;
			if(!this5.fixed) {
				if(1 >= this5.length) {
					this5.length = 2;
				}
				if(this5.data.length < this5.length) {
					var length4 = this5.data.length + 10;
					var data4 = new Array(length4);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data4,0,this5.data.length);
					this5.data = data4;
				}
			}
			this5.data[1] = value4;
			var this6 = this.rawData;
			var value5 = vector3D.y;
			if(!this6.fixed) {
				if(5 >= this6.length) {
					this6.length = 6;
				}
				if(this6.data.length < this6.length) {
					var length5 = this6.data.length + 10;
					var data5 = new Array(length5);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this6.data,0,data5,0,this6.data.length);
					this6.data = data5;
				}
			}
			this6.data[5] = value5;
			var this7 = this.rawData;
			var value6 = vector3D.z;
			if(!this7.fixed) {
				if(9 >= this7.length) {
					this7.length = 10;
				}
				if(this7.data.length < this7.length) {
					var length6 = this7.data.length + 10;
					var data6 = new Array(length6);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data6,0,this7.data.length);
					this7.data = data6;
				}
			}
			this7.data[9] = value6;
			var this8 = this.rawData;
			var value7 = vector3D.w;
			if(!this8.fixed) {
				if(13 >= this8.length) {
					this8.length = 14;
				}
				if(this8.data.length < this8.length) {
					var length7 = this8.data.length + 10;
					var data7 = new Array(length7);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this8.data,0,data7,0,this8.data.length);
					this8.data = data7;
				}
			}
			this8.data[13] = value7;
			break;
		case 2:
			var this9 = this.rawData;
			var value8 = vector3D.x;
			if(!this9.fixed) {
				if(2 >= this9.length) {
					this9.length = 3;
				}
				if(this9.data.length < this9.length) {
					var length8 = this9.data.length + 10;
					var data8 = new Array(length8);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data8,0,this9.data.length);
					this9.data = data8;
				}
			}
			this9.data[2] = value8;
			var this10 = this.rawData;
			var value9 = vector3D.y;
			if(!this10.fixed) {
				if(6 >= this10.length) {
					this10.length = 7;
				}
				if(this10.data.length < this10.length) {
					var length9 = this10.data.length + 10;
					var data9 = new Array(length9);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this10.data,0,data9,0,this10.data.length);
					this10.data = data9;
				}
			}
			this10.data[6] = value9;
			var this11 = this.rawData;
			var value10 = vector3D.z;
			if(!this11.fixed) {
				if(10 >= this11.length) {
					this11.length = 11;
				}
				if(this11.data.length < this11.length) {
					var length10 = this11.data.length + 10;
					var data10 = new Array(length10);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data10,0,this11.data.length);
					this11.data = data10;
				}
			}
			this11.data[10] = value10;
			var this12 = this.rawData;
			var value11 = vector3D.w;
			if(!this12.fixed) {
				if(14 >= this12.length) {
					this12.length = 15;
				}
				if(this12.data.length < this12.length) {
					var length11 = this12.data.length + 10;
					var data11 = new Array(length11);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this12.data,0,data11,0,this12.data.length);
					this12.data = data11;
				}
			}
			this12.data[14] = value11;
			break;
		case 3:
			var this13 = this.rawData;
			var value12 = vector3D.x;
			if(!this13.fixed) {
				if(3 >= this13.length) {
					this13.length = 4;
				}
				if(this13.data.length < this13.length) {
					var length12 = this13.data.length + 10;
					var data12 = new Array(length12);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data12,0,this13.data.length);
					this13.data = data12;
				}
			}
			this13.data[3] = value12;
			var this14 = this.rawData;
			var value13 = vector3D.y;
			if(!this14.fixed) {
				if(7 >= this14.length) {
					this14.length = 8;
				}
				if(this14.data.length < this14.length) {
					var length13 = this14.data.length + 10;
					var data13 = new Array(length13);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this14.data,0,data13,0,this14.data.length);
					this14.data = data13;
				}
			}
			this14.data[7] = value13;
			var this15 = this.rawData;
			var value14 = vector3D.z;
			if(!this15.fixed) {
				if(11 >= this15.length) {
					this15.length = 12;
				}
				if(this15.data.length < this15.length) {
					var length14 = this15.data.length + 10;
					var data14 = new Array(length14);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data14,0,this15.data.length);
					this15.data = data14;
				}
			}
			this15.data[11] = value14;
			var this16 = this.rawData;
			var value15 = vector3D.w;
			if(!this16.fixed) {
				if(15 >= this16.length) {
					this16.length = 16;
				}
				if(this16.data.length < this16.length) {
					var length15 = this16.data.length + 10;
					var data15 = new Array(length15);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this16.data,0,data15,0,this16.data.length);
					this16.data = data15;
				}
			}
			this16.data[15] = value15;
			break;
		default:
		}
	}
	,copyRowTo: function(row,vector3D) {
		switch(row) {
		case 0:
			vector3D.x = this.rawData.data[0];
			vector3D.y = this.rawData.data[4];
			vector3D.z = this.rawData.data[8];
			vector3D.w = this.rawData.data[12];
			break;
		case 1:
			vector3D.x = this.rawData.data[1];
			vector3D.y = this.rawData.data[5];
			vector3D.z = this.rawData.data[9];
			vector3D.w = this.rawData.data[13];
			break;
		case 2:
			vector3D.x = this.rawData.data[2];
			vector3D.y = this.rawData.data[6];
			vector3D.z = this.rawData.data[10];
			vector3D.w = this.rawData.data[14];
			break;
		case 3:
			vector3D.x = this.rawData.data[3];
			vector3D.y = this.rawData.data[7];
			vector3D.z = this.rawData.data[11];
			vector3D.w = this.rawData.data[15];
			break;
		default:
		}
	}
	,copyToMatrix3D: function(other) {
		var this1 = this.rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this1.length;
		vectorData.fixed = this1.fixed;
		var length = this1.length;
		vectorData.data = new Array(length);
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
		other.rawData = vectorData;
	}
	,decompose: function(orientationStyle) {
		if(orientationStyle == null) {
			orientationStyle = 1;
		}
		var this1 = new openfl_VectorData();
		this1.data = new Array(0);
		this1.length = 0;
		this1.fixed = false;
		var vec = this1;
		var this2 = this.clone().rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this2.length;
		vectorData.fixed = this2.fixed;
		var length = this2.length;
		vectorData.data = new Array(length);
		haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,vectorData.data,0,this2.length);
		var mr = vectorData;
		var pos = new openfl_geom_Vector3D(mr.data[12],mr.data[13],mr.data[14]);
		if(!mr.fixed) {
			if(12 >= mr.length) {
				mr.length = 13;
			}
			if(mr.data.length < mr.length) {
				var length1 = mr.data.length + 10;
				var data = new Array(length1);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data,0,mr.data.length);
				mr.data = data;
			}
		}
		mr.data[12] = 0;
		if(!mr.fixed) {
			if(13 >= mr.length) {
				mr.length = 14;
			}
			if(mr.data.length < mr.length) {
				var length2 = mr.data.length + 10;
				var data1 = new Array(length2);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data1,0,mr.data.length);
				mr.data = data1;
			}
		}
		mr.data[13] = 0;
		if(!mr.fixed) {
			if(14 >= mr.length) {
				mr.length = 15;
			}
			if(mr.data.length < mr.length) {
				var length3 = mr.data.length + 10;
				var data2 = new Array(length3);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data2,0,mr.data.length);
				mr.data = data2;
			}
		}
		mr.data[14] = 0;
		var scale = new openfl_geom_Vector3D();
		scale.x = Math.sqrt(mr.data[0] * mr.data[0] + mr.data[1] * mr.data[1] + mr.data[2] * mr.data[2]);
		scale.y = Math.sqrt(mr.data[4] * mr.data[4] + mr.data[5] * mr.data[5] + mr.data[6] * mr.data[6]);
		scale.z = Math.sqrt(mr.data[8] * mr.data[8] + mr.data[9] * mr.data[9] + mr.data[10] * mr.data[10]);
		if(mr.data[0] * (mr.data[5] * mr.data[10] - mr.data[6] * mr.data[9]) - mr.data[1] * (mr.data[4] * mr.data[10] - mr.data[6] * mr.data[8]) + mr.data[2] * (mr.data[4] * mr.data[9] - mr.data[5] * mr.data[8]) < 0) {
			scale.z = -scale.z;
		}
		var value = mr.data[0] / scale.x;
		if(!mr.fixed) {
			if(0 >= mr.length) {
				mr.length = 1;
			}
			if(mr.data.length < mr.length) {
				var length4 = mr.data.length + 10;
				var data3 = new Array(length4);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data3,0,mr.data.length);
				mr.data = data3;
			}
		}
		mr.data[0] = value;
		var value1 = mr.data[1] / scale.x;
		if(!mr.fixed) {
			if(1 >= mr.length) {
				mr.length = 2;
			}
			if(mr.data.length < mr.length) {
				var length5 = mr.data.length + 10;
				var data4 = new Array(length5);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data4,0,mr.data.length);
				mr.data = data4;
			}
		}
		mr.data[1] = value1;
		var value2 = mr.data[2] / scale.x;
		if(!mr.fixed) {
			if(2 >= mr.length) {
				mr.length = 3;
			}
			if(mr.data.length < mr.length) {
				var length6 = mr.data.length + 10;
				var data5 = new Array(length6);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data5,0,mr.data.length);
				mr.data = data5;
			}
		}
		mr.data[2] = value2;
		var value3 = mr.data[4] / scale.y;
		if(!mr.fixed) {
			if(4 >= mr.length) {
				mr.length = 5;
			}
			if(mr.data.length < mr.length) {
				var length7 = mr.data.length + 10;
				var data6 = new Array(length7);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data6,0,mr.data.length);
				mr.data = data6;
			}
		}
		mr.data[4] = value3;
		var value4 = mr.data[5] / scale.y;
		if(!mr.fixed) {
			if(5 >= mr.length) {
				mr.length = 6;
			}
			if(mr.data.length < mr.length) {
				var length8 = mr.data.length + 10;
				var data7 = new Array(length8);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data7,0,mr.data.length);
				mr.data = data7;
			}
		}
		mr.data[5] = value4;
		var value5 = mr.data[6] / scale.y;
		if(!mr.fixed) {
			if(6 >= mr.length) {
				mr.length = 7;
			}
			if(mr.data.length < mr.length) {
				var length9 = mr.data.length + 10;
				var data8 = new Array(length9);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data8,0,mr.data.length);
				mr.data = data8;
			}
		}
		mr.data[6] = value5;
		var value6 = mr.data[8] / scale.z;
		if(!mr.fixed) {
			if(8 >= mr.length) {
				mr.length = 9;
			}
			if(mr.data.length < mr.length) {
				var length10 = mr.data.length + 10;
				var data9 = new Array(length10);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data9,0,mr.data.length);
				mr.data = data9;
			}
		}
		mr.data[8] = value6;
		var value7 = mr.data[9] / scale.z;
		if(!mr.fixed) {
			if(9 >= mr.length) {
				mr.length = 10;
			}
			if(mr.data.length < mr.length) {
				var length11 = mr.data.length + 10;
				var data10 = new Array(length11);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data10,0,mr.data.length);
				mr.data = data10;
			}
		}
		mr.data[9] = value7;
		var value8 = mr.data[10] / scale.z;
		if(!mr.fixed) {
			if(10 >= mr.length) {
				mr.length = 11;
			}
			if(mr.data.length < mr.length) {
				var length12 = mr.data.length + 10;
				var data11 = new Array(length12);
				haxe_ds__$Vector_Vector_$Impl_$.blit(mr.data,0,data11,0,mr.data.length);
				mr.data = data11;
			}
		}
		mr.data[10] = value8;
		var rot = new openfl_geom_Vector3D();
		switch(orientationStyle) {
		case 0:
			rot.w = Math.acos((mr.data[0] + mr.data[5] + mr.data[10] - 1) / 2);
			var len = Math.sqrt((mr.data[6] - mr.data[9]) * (mr.data[6] - mr.data[9]) + (mr.data[8] - mr.data[2]) * (mr.data[8] - mr.data[2]) + (mr.data[1] - mr.data[4]) * (mr.data[1] - mr.data[4]));
			if(len != 0) {
				rot.x = (mr.data[6] - mr.data[9]) / len;
				rot.y = (mr.data[8] - mr.data[2]) / len;
				rot.z = (mr.data[1] - mr.data[4]) / len;
			} else {
				rot.x = rot.y = rot.z = 0;
			}
			break;
		case 1:
			rot.y = Math.asin(-mr.data[2]);
			if(mr.data[2] != 1 && mr.data[2] != -1) {
				rot.x = Math.atan2(mr.data[6],mr.data[10]);
				rot.z = Math.atan2(mr.data[1],mr.data[0]);
			} else {
				rot.z = 0;
				rot.x = Math.atan2(mr.data[4],mr.data[5]);
			}
			break;
		case 2:
			var tr = mr.data[0] + mr.data[5] + mr.data[10];
			if(tr > 0) {
				rot.w = Math.sqrt(1 + tr) / 2;
				rot.x = (mr.data[6] - mr.data[9]) / (4 * rot.w);
				rot.y = (mr.data[8] - mr.data[2]) / (4 * rot.w);
				rot.z = (mr.data[1] - mr.data[4]) / (4 * rot.w);
			} else if(mr.data[0] > mr.data[5] && mr.data[0] > mr.data[10]) {
				rot.x = Math.sqrt(1 + mr.data[0] - mr.data[5] - mr.data[10]) / 2;
				rot.w = (mr.data[6] - mr.data[9]) / (4 * rot.x);
				rot.y = (mr.data[1] + mr.data[4]) / (4 * rot.x);
				rot.z = (mr.data[8] + mr.data[2]) / (4 * rot.x);
			} else if(mr.data[5] > mr.data[10]) {
				rot.y = Math.sqrt(1 + mr.data[5] - mr.data[0] - mr.data[10]) / 2;
				rot.x = (mr.data[1] + mr.data[4]) / (4 * rot.y);
				rot.w = (mr.data[8] - mr.data[2]) / (4 * rot.y);
				rot.z = (mr.data[6] + mr.data[9]) / (4 * rot.y);
			} else {
				rot.z = Math.sqrt(1 + mr.data[10] - mr.data[0] - mr.data[5]) / 2;
				rot.x = (mr.data[8] + mr.data[2]) / (4 * rot.z);
				rot.y = (mr.data[6] + mr.data[9]) / (4 * rot.z);
				rot.w = (mr.data[1] - mr.data[4]) / (4 * rot.z);
			}
			break;
		}
		if(!vec.fixed) {
			vec.length++;
			if(vec.data.length < vec.length) {
				var length13 = vec.data.length + 10;
				var data12 = new Array(length13);
				haxe_ds__$Vector_Vector_$Impl_$.blit(vec.data,0,data12,0,vec.data.length);
				vec.data = data12;
			}
			vec.data[vec.length - 1] = pos;
		}
		if(!vec.fixed) {
			vec.length++;
			if(vec.data.length < vec.length) {
				var length14 = vec.data.length + 10;
				var data13 = new Array(length14);
				haxe_ds__$Vector_Vector_$Impl_$.blit(vec.data,0,data13,0,vec.data.length);
				vec.data = data13;
			}
			vec.data[vec.length - 1] = rot;
		}
		if(!vec.fixed) {
			vec.length++;
			if(vec.data.length < vec.length) {
				var length15 = vec.data.length + 10;
				var data14 = new Array(length15);
				haxe_ds__$Vector_Vector_$Impl_$.blit(vec.data,0,data14,0,vec.data.length);
				vec.data = data14;
			}
			vec.data[vec.length - 1] = scale;
		}
		return vec;
	}
	,deltaTransformVector: function(v) {
		var x = v.x;
		var y = v.y;
		var z = v.z;
		return new openfl_geom_Vector3D(x * this.rawData.data[0] + y * this.rawData.data[4] + z * this.rawData.data[8] + this.rawData.data[3],x * this.rawData.data[1] + y * this.rawData.data[5] + z * this.rawData.data[9] + this.rawData.data[7],x * this.rawData.data[2] + y * this.rawData.data[6] + z * this.rawData.data[10] + this.rawData.data[11],0);
	}
	,identity: function() {
		var value = [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0];
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		this.rawData = vectorData;
	}
	,interpolateTo: function(toMat,percent) {
		var _g = 0;
		while(_g < 16) {
			var i = _g++;
			var this1 = this.rawData;
			var value = this.rawData.data[i] + (toMat.rawData.data[i] - this.rawData.data[i]) * percent;
			if(!this1.fixed) {
				if(i >= this1.length) {
					this1.length = i + 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[i] = value;
		}
	}
	,invert: function() {
		var d = this.get_determinant();
		var invertable = Math.abs(d) > 0.00000000001;
		if(invertable) {
			d = 1 / d;
			var m11 = this.rawData.data[0];
			var m21 = this.rawData.data[4];
			var m31 = this.rawData.data[8];
			var m41 = this.rawData.data[12];
			var m12 = this.rawData.data[1];
			var m22 = this.rawData.data[5];
			var m32 = this.rawData.data[9];
			var m42 = this.rawData.data[13];
			var m13 = this.rawData.data[2];
			var m23 = this.rawData.data[6];
			var m33 = this.rawData.data[10];
			var m43 = this.rawData.data[14];
			var m14 = this.rawData.data[3];
			var m24 = this.rawData.data[7];
			var m34 = this.rawData.data[11];
			var m44 = this.rawData.data[15];
			var this1 = this.rawData;
			if(!this1.fixed) {
				if(0 >= this1.length) {
					this1.length = 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[0] = d * (m22 * (m33 * m44 - m43 * m34) - m32 * (m23 * m44 - m43 * m24) + m42 * (m23 * m34 - m33 * m24));
			var this2 = this.rawData;
			if(!this2.fixed) {
				if(1 >= this2.length) {
					this2.length = 2;
				}
				if(this2.data.length < this2.length) {
					var length1 = this2.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
					this2.data = data1;
				}
			}
			this2.data[1] = -d * (m12 * (m33 * m44 - m43 * m34) - m32 * (m13 * m44 - m43 * m14) + m42 * (m13 * m34 - m33 * m14));
			var this3 = this.rawData;
			if(!this3.fixed) {
				if(2 >= this3.length) {
					this3.length = 3;
				}
				if(this3.data.length < this3.length) {
					var length2 = this3.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
					this3.data = data2;
				}
			}
			this3.data[2] = d * (m12 * (m23 * m44 - m43 * m24) - m22 * (m13 * m44 - m43 * m14) + m42 * (m13 * m24 - m23 * m14));
			var this4 = this.rawData;
			if(!this4.fixed) {
				if(3 >= this4.length) {
					this4.length = 4;
				}
				if(this4.data.length < this4.length) {
					var length3 = this4.data.length + 10;
					var data3 = new Array(length3);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data3,0,this4.data.length);
					this4.data = data3;
				}
			}
			this4.data[3] = -d * (m12 * (m23 * m34 - m33 * m24) - m22 * (m13 * m34 - m33 * m14) + m32 * (m13 * m24 - m23 * m14));
			var this5 = this.rawData;
			if(!this5.fixed) {
				if(4 >= this5.length) {
					this5.length = 5;
				}
				if(this5.data.length < this5.length) {
					var length4 = this5.data.length + 10;
					var data4 = new Array(length4);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data4,0,this5.data.length);
					this5.data = data4;
				}
			}
			this5.data[4] = -d * (m21 * (m33 * m44 - m43 * m34) - m31 * (m23 * m44 - m43 * m24) + m41 * (m23 * m34 - m33 * m24));
			var this6 = this.rawData;
			if(!this6.fixed) {
				if(5 >= this6.length) {
					this6.length = 6;
				}
				if(this6.data.length < this6.length) {
					var length5 = this6.data.length + 10;
					var data5 = new Array(length5);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this6.data,0,data5,0,this6.data.length);
					this6.data = data5;
				}
			}
			this6.data[5] = d * (m11 * (m33 * m44 - m43 * m34) - m31 * (m13 * m44 - m43 * m14) + m41 * (m13 * m34 - m33 * m14));
			var this7 = this.rawData;
			if(!this7.fixed) {
				if(6 >= this7.length) {
					this7.length = 7;
				}
				if(this7.data.length < this7.length) {
					var length6 = this7.data.length + 10;
					var data6 = new Array(length6);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data6,0,this7.data.length);
					this7.data = data6;
				}
			}
			this7.data[6] = -d * (m11 * (m23 * m44 - m43 * m24) - m21 * (m13 * m44 - m43 * m14) + m41 * (m13 * m24 - m23 * m14));
			var this8 = this.rawData;
			if(!this8.fixed) {
				if(7 >= this8.length) {
					this8.length = 8;
				}
				if(this8.data.length < this8.length) {
					var length7 = this8.data.length + 10;
					var data7 = new Array(length7);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this8.data,0,data7,0,this8.data.length);
					this8.data = data7;
				}
			}
			this8.data[7] = d * (m11 * (m23 * m34 - m33 * m24) - m21 * (m13 * m34 - m33 * m14) + m31 * (m13 * m24 - m23 * m14));
			var this9 = this.rawData;
			if(!this9.fixed) {
				if(8 >= this9.length) {
					this9.length = 9;
				}
				if(this9.data.length < this9.length) {
					var length8 = this9.data.length + 10;
					var data8 = new Array(length8);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data8,0,this9.data.length);
					this9.data = data8;
				}
			}
			this9.data[8] = d * (m21 * (m32 * m44 - m42 * m34) - m31 * (m22 * m44 - m42 * m24) + m41 * (m22 * m34 - m32 * m24));
			var this10 = this.rawData;
			if(!this10.fixed) {
				if(9 >= this10.length) {
					this10.length = 10;
				}
				if(this10.data.length < this10.length) {
					var length9 = this10.data.length + 10;
					var data9 = new Array(length9);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this10.data,0,data9,0,this10.data.length);
					this10.data = data9;
				}
			}
			this10.data[9] = -d * (m11 * (m32 * m44 - m42 * m34) - m31 * (m12 * m44 - m42 * m14) + m41 * (m12 * m34 - m32 * m14));
			var this11 = this.rawData;
			if(!this11.fixed) {
				if(10 >= this11.length) {
					this11.length = 11;
				}
				if(this11.data.length < this11.length) {
					var length10 = this11.data.length + 10;
					var data10 = new Array(length10);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data10,0,this11.data.length);
					this11.data = data10;
				}
			}
			this11.data[10] = d * (m11 * (m22 * m44 - m42 * m24) - m21 * (m12 * m44 - m42 * m14) + m41 * (m12 * m24 - m22 * m14));
			var this12 = this.rawData;
			if(!this12.fixed) {
				if(11 >= this12.length) {
					this12.length = 12;
				}
				if(this12.data.length < this12.length) {
					var length11 = this12.data.length + 10;
					var data11 = new Array(length11);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this12.data,0,data11,0,this12.data.length);
					this12.data = data11;
				}
			}
			this12.data[11] = -d * (m11 * (m22 * m34 - m32 * m24) - m21 * (m12 * m34 - m32 * m14) + m31 * (m12 * m24 - m22 * m14));
			var this13 = this.rawData;
			if(!this13.fixed) {
				if(12 >= this13.length) {
					this13.length = 13;
				}
				if(this13.data.length < this13.length) {
					var length12 = this13.data.length + 10;
					var data12 = new Array(length12);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data12,0,this13.data.length);
					this13.data = data12;
				}
			}
			this13.data[12] = -d * (m21 * (m32 * m43 - m42 * m33) - m31 * (m22 * m43 - m42 * m23) + m41 * (m22 * m33 - m32 * m23));
			var this14 = this.rawData;
			if(!this14.fixed) {
				if(13 >= this14.length) {
					this14.length = 14;
				}
				if(this14.data.length < this14.length) {
					var length13 = this14.data.length + 10;
					var data13 = new Array(length13);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this14.data,0,data13,0,this14.data.length);
					this14.data = data13;
				}
			}
			this14.data[13] = d * (m11 * (m32 * m43 - m42 * m33) - m31 * (m12 * m43 - m42 * m13) + m41 * (m12 * m33 - m32 * m13));
			var this15 = this.rawData;
			if(!this15.fixed) {
				if(14 >= this15.length) {
					this15.length = 15;
				}
				if(this15.data.length < this15.length) {
					var length14 = this15.data.length + 10;
					var data14 = new Array(length14);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data14,0,this15.data.length);
					this15.data = data14;
				}
			}
			this15.data[14] = -d * (m11 * (m22 * m43 - m42 * m23) - m21 * (m12 * m43 - m42 * m13) + m41 * (m12 * m23 - m22 * m13));
			var this16 = this.rawData;
			if(!this16.fixed) {
				if(15 >= this16.length) {
					this16.length = 16;
				}
				if(this16.data.length < this16.length) {
					var length15 = this16.data.length + 10;
					var data15 = new Array(length15);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this16.data,0,data15,0,this16.data.length);
					this16.data = data15;
				}
			}
			this16.data[15] = d * (m11 * (m22 * m33 - m32 * m23) - m21 * (m12 * m33 - m32 * m13) + m31 * (m12 * m23 - m22 * m13));
		}
		return invertable;
	}
	,pointAt: function(pos,at,up) {
		if(at == null) {
			at = new openfl_geom_Vector3D(0,0,-1);
		}
		if(up == null) {
			up = new openfl_geom_Vector3D(0,-1,0);
		}
		var dir = at.subtract(pos);
		var vup = up.clone();
		var right;
		dir.normalize();
		vup.normalize();
		var dir2 = dir.clone();
		dir2.scaleBy(vup.dotProduct(dir));
		vup = vup.subtract(dir2);
		if(vup.get_length() > 0) {
			vup.normalize();
		} else if(dir.x != 0) {
			vup = new openfl_geom_Vector3D(-dir.y,dir.x,0);
		} else {
			vup = new openfl_geom_Vector3D(1,0,0);
		}
		right = vup.crossProduct(dir);
		right.normalize();
		var this1 = this.rawData;
		var value = right.x;
		if(!this1.fixed) {
			if(0 >= this1.length) {
				this1.length = 1;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var data = new Array(length);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[0] = value;
		var this2 = this.rawData;
		var value1 = right.y;
		if(!this2.fixed) {
			if(4 >= this2.length) {
				this2.length = 5;
			}
			if(this2.data.length < this2.length) {
				var length1 = this2.data.length + 10;
				var data1 = new Array(length1);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
				this2.data = data1;
			}
		}
		this2.data[4] = value1;
		var this3 = this.rawData;
		var value2 = right.z;
		if(!this3.fixed) {
			if(8 >= this3.length) {
				this3.length = 9;
			}
			if(this3.data.length < this3.length) {
				var length2 = this3.data.length + 10;
				var data2 = new Array(length2);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
				this3.data = data2;
			}
		}
		this3.data[8] = value2;
		var this4 = this.rawData;
		if(!this4.fixed) {
			if(12 >= this4.length) {
				this4.length = 13;
			}
			if(this4.data.length < this4.length) {
				var length3 = this4.data.length + 10;
				var data3 = new Array(length3);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data3,0,this4.data.length);
				this4.data = data3;
			}
		}
		this4.data[12] = 0.0;
		var this5 = this.rawData;
		var value3 = vup.x;
		if(!this5.fixed) {
			if(1 >= this5.length) {
				this5.length = 2;
			}
			if(this5.data.length < this5.length) {
				var length4 = this5.data.length + 10;
				var data4 = new Array(length4);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data4,0,this5.data.length);
				this5.data = data4;
			}
		}
		this5.data[1] = value3;
		var this6 = this.rawData;
		var value4 = vup.y;
		if(!this6.fixed) {
			if(5 >= this6.length) {
				this6.length = 6;
			}
			if(this6.data.length < this6.length) {
				var length5 = this6.data.length + 10;
				var data5 = new Array(length5);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this6.data,0,data5,0,this6.data.length);
				this6.data = data5;
			}
		}
		this6.data[5] = value4;
		var this7 = this.rawData;
		var value5 = vup.z;
		if(!this7.fixed) {
			if(9 >= this7.length) {
				this7.length = 10;
			}
			if(this7.data.length < this7.length) {
				var length6 = this7.data.length + 10;
				var data6 = new Array(length6);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data6,0,this7.data.length);
				this7.data = data6;
			}
		}
		this7.data[9] = value5;
		var this8 = this.rawData;
		if(!this8.fixed) {
			if(13 >= this8.length) {
				this8.length = 14;
			}
			if(this8.data.length < this8.length) {
				var length7 = this8.data.length + 10;
				var data7 = new Array(length7);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this8.data,0,data7,0,this8.data.length);
				this8.data = data7;
			}
		}
		this8.data[13] = 0.0;
		var this9 = this.rawData;
		var value6 = dir.x;
		if(!this9.fixed) {
			if(2 >= this9.length) {
				this9.length = 3;
			}
			if(this9.data.length < this9.length) {
				var length8 = this9.data.length + 10;
				var data8 = new Array(length8);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data8,0,this9.data.length);
				this9.data = data8;
			}
		}
		this9.data[2] = value6;
		var this10 = this.rawData;
		var value7 = dir.y;
		if(!this10.fixed) {
			if(6 >= this10.length) {
				this10.length = 7;
			}
			if(this10.data.length < this10.length) {
				var length9 = this10.data.length + 10;
				var data9 = new Array(length9);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this10.data,0,data9,0,this10.data.length);
				this10.data = data9;
			}
		}
		this10.data[6] = value7;
		var this11 = this.rawData;
		var value8 = dir.z;
		if(!this11.fixed) {
			if(10 >= this11.length) {
				this11.length = 11;
			}
			if(this11.data.length < this11.length) {
				var length10 = this11.data.length + 10;
				var data10 = new Array(length10);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data10,0,this11.data.length);
				this11.data = data10;
			}
		}
		this11.data[10] = value8;
		var this12 = this.rawData;
		if(!this12.fixed) {
			if(14 >= this12.length) {
				this12.length = 15;
			}
			if(this12.data.length < this12.length) {
				var length11 = this12.data.length + 10;
				var data11 = new Array(length11);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this12.data,0,data11,0,this12.data.length);
				this12.data = data11;
			}
		}
		this12.data[14] = 0.0;
		var this13 = this.rawData;
		var value9 = pos.x;
		if(!this13.fixed) {
			if(3 >= this13.length) {
				this13.length = 4;
			}
			if(this13.data.length < this13.length) {
				var length12 = this13.data.length + 10;
				var data12 = new Array(length12);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data12,0,this13.data.length);
				this13.data = data12;
			}
		}
		this13.data[3] = value9;
		var this14 = this.rawData;
		var value10 = pos.y;
		if(!this14.fixed) {
			if(7 >= this14.length) {
				this14.length = 8;
			}
			if(this14.data.length < this14.length) {
				var length13 = this14.data.length + 10;
				var data13 = new Array(length13);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this14.data,0,data13,0,this14.data.length);
				this14.data = data13;
			}
		}
		this14.data[7] = value10;
		var this15 = this.rawData;
		var value11 = pos.z;
		if(!this15.fixed) {
			if(11 >= this15.length) {
				this15.length = 12;
			}
			if(this15.data.length < this15.length) {
				var length14 = this15.data.length + 10;
				var data14 = new Array(length14);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data14,0,this15.data.length);
				this15.data = data14;
			}
		}
		this15.data[11] = value11;
		var this16 = this.rawData;
		if(!this16.fixed) {
			if(15 >= this16.length) {
				this16.length = 16;
			}
			if(this16.data.length < this16.length) {
				var length15 = this16.data.length + 10;
				var data15 = new Array(length15);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this16.data,0,data15,0,this16.data.length);
				this16.data = data15;
			}
		}
		this16.data[15] = 1.0;
	}
	,prepend: function(rhs) {
		var m111 = rhs.rawData.data[0];
		var m121 = rhs.rawData.data[4];
		var m131 = rhs.rawData.data[8];
		var m141 = rhs.rawData.data[12];
		var m112 = rhs.rawData.data[1];
		var m122 = rhs.rawData.data[5];
		var m132 = rhs.rawData.data[9];
		var m142 = rhs.rawData.data[13];
		var m113 = rhs.rawData.data[2];
		var m123 = rhs.rawData.data[6];
		var m133 = rhs.rawData.data[10];
		var m143 = rhs.rawData.data[14];
		var m114 = rhs.rawData.data[3];
		var m124 = rhs.rawData.data[7];
		var m134 = rhs.rawData.data[11];
		var m144 = rhs.rawData.data[15];
		var m211 = this.rawData.data[0];
		var m221 = this.rawData.data[4];
		var m231 = this.rawData.data[8];
		var m241 = this.rawData.data[12];
		var m212 = this.rawData.data[1];
		var m222 = this.rawData.data[5];
		var m232 = this.rawData.data[9];
		var m242 = this.rawData.data[13];
		var m213 = this.rawData.data[2];
		var m223 = this.rawData.data[6];
		var m233 = this.rawData.data[10];
		var m243 = this.rawData.data[14];
		var m214 = this.rawData.data[3];
		var m224 = this.rawData.data[7];
		var m234 = this.rawData.data[11];
		var m244 = this.rawData.data[15];
		var this1 = this.rawData;
		if(!this1.fixed) {
			if(0 >= this1.length) {
				this1.length = 1;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var data = new Array(length);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[0] = m111 * m211 + m112 * m221 + m113 * m231 + m114 * m241;
		var this2 = this.rawData;
		if(!this2.fixed) {
			if(1 >= this2.length) {
				this2.length = 2;
			}
			if(this2.data.length < this2.length) {
				var length1 = this2.data.length + 10;
				var data1 = new Array(length1);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
				this2.data = data1;
			}
		}
		this2.data[1] = m111 * m212 + m112 * m222 + m113 * m232 + m114 * m242;
		var this3 = this.rawData;
		if(!this3.fixed) {
			if(2 >= this3.length) {
				this3.length = 3;
			}
			if(this3.data.length < this3.length) {
				var length2 = this3.data.length + 10;
				var data2 = new Array(length2);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
				this3.data = data2;
			}
		}
		this3.data[2] = m111 * m213 + m112 * m223 + m113 * m233 + m114 * m243;
		var this4 = this.rawData;
		if(!this4.fixed) {
			if(3 >= this4.length) {
				this4.length = 4;
			}
			if(this4.data.length < this4.length) {
				var length3 = this4.data.length + 10;
				var data3 = new Array(length3);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data3,0,this4.data.length);
				this4.data = data3;
			}
		}
		this4.data[3] = m111 * m214 + m112 * m224 + m113 * m234 + m114 * m244;
		var this5 = this.rawData;
		if(!this5.fixed) {
			if(4 >= this5.length) {
				this5.length = 5;
			}
			if(this5.data.length < this5.length) {
				var length4 = this5.data.length + 10;
				var data4 = new Array(length4);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data4,0,this5.data.length);
				this5.data = data4;
			}
		}
		this5.data[4] = m121 * m211 + m122 * m221 + m123 * m231 + m124 * m241;
		var this6 = this.rawData;
		if(!this6.fixed) {
			if(5 >= this6.length) {
				this6.length = 6;
			}
			if(this6.data.length < this6.length) {
				var length5 = this6.data.length + 10;
				var data5 = new Array(length5);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this6.data,0,data5,0,this6.data.length);
				this6.data = data5;
			}
		}
		this6.data[5] = m121 * m212 + m122 * m222 + m123 * m232 + m124 * m242;
		var this7 = this.rawData;
		if(!this7.fixed) {
			if(6 >= this7.length) {
				this7.length = 7;
			}
			if(this7.data.length < this7.length) {
				var length6 = this7.data.length + 10;
				var data6 = new Array(length6);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data6,0,this7.data.length);
				this7.data = data6;
			}
		}
		this7.data[6] = m121 * m213 + m122 * m223 + m123 * m233 + m124 * m243;
		var this8 = this.rawData;
		if(!this8.fixed) {
			if(7 >= this8.length) {
				this8.length = 8;
			}
			if(this8.data.length < this8.length) {
				var length7 = this8.data.length + 10;
				var data7 = new Array(length7);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this8.data,0,data7,0,this8.data.length);
				this8.data = data7;
			}
		}
		this8.data[7] = m121 * m214 + m122 * m224 + m123 * m234 + m124 * m244;
		var this9 = this.rawData;
		if(!this9.fixed) {
			if(8 >= this9.length) {
				this9.length = 9;
			}
			if(this9.data.length < this9.length) {
				var length8 = this9.data.length + 10;
				var data8 = new Array(length8);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data8,0,this9.data.length);
				this9.data = data8;
			}
		}
		this9.data[8] = m131 * m211 + m132 * m221 + m133 * m231 + m134 * m241;
		var this10 = this.rawData;
		if(!this10.fixed) {
			if(9 >= this10.length) {
				this10.length = 10;
			}
			if(this10.data.length < this10.length) {
				var length9 = this10.data.length + 10;
				var data9 = new Array(length9);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this10.data,0,data9,0,this10.data.length);
				this10.data = data9;
			}
		}
		this10.data[9] = m131 * m212 + m132 * m222 + m133 * m232 + m134 * m242;
		var this11 = this.rawData;
		if(!this11.fixed) {
			if(10 >= this11.length) {
				this11.length = 11;
			}
			if(this11.data.length < this11.length) {
				var length10 = this11.data.length + 10;
				var data10 = new Array(length10);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data10,0,this11.data.length);
				this11.data = data10;
			}
		}
		this11.data[10] = m131 * m213 + m132 * m223 + m133 * m233 + m134 * m243;
		var this12 = this.rawData;
		if(!this12.fixed) {
			if(11 >= this12.length) {
				this12.length = 12;
			}
			if(this12.data.length < this12.length) {
				var length11 = this12.data.length + 10;
				var data11 = new Array(length11);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this12.data,0,data11,0,this12.data.length);
				this12.data = data11;
			}
		}
		this12.data[11] = m131 * m214 + m132 * m224 + m133 * m234 + m134 * m244;
		var this13 = this.rawData;
		if(!this13.fixed) {
			if(12 >= this13.length) {
				this13.length = 13;
			}
			if(this13.data.length < this13.length) {
				var length12 = this13.data.length + 10;
				var data12 = new Array(length12);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data12,0,this13.data.length);
				this13.data = data12;
			}
		}
		this13.data[12] = m141 * m211 + m142 * m221 + m143 * m231 + m144 * m241;
		var this14 = this.rawData;
		if(!this14.fixed) {
			if(13 >= this14.length) {
				this14.length = 14;
			}
			if(this14.data.length < this14.length) {
				var length13 = this14.data.length + 10;
				var data13 = new Array(length13);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this14.data,0,data13,0,this14.data.length);
				this14.data = data13;
			}
		}
		this14.data[13] = m141 * m212 + m142 * m222 + m143 * m232 + m144 * m242;
		var this15 = this.rawData;
		if(!this15.fixed) {
			if(14 >= this15.length) {
				this15.length = 15;
			}
			if(this15.data.length < this15.length) {
				var length14 = this15.data.length + 10;
				var data14 = new Array(length14);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data14,0,this15.data.length);
				this15.data = data14;
			}
		}
		this15.data[14] = m141 * m213 + m142 * m223 + m143 * m233 + m144 * m243;
		var this16 = this.rawData;
		if(!this16.fixed) {
			if(15 >= this16.length) {
				this16.length = 16;
			}
			if(this16.data.length < this16.length) {
				var length15 = this16.data.length + 10;
				var data15 = new Array(length15);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this16.data,0,data15,0,this16.data.length);
				this16.data = data15;
			}
		}
		this16.data[15] = m141 * m214 + m142 * m224 + m143 * m234 + m144 * m244;
	}
	,prependRotation: function(degrees,axis,pivotPoint) {
		var m = openfl_geom_Matrix3D.__getAxisRotation(axis.x,axis.y,axis.z,degrees);
		if(pivotPoint != null) {
			m.appendTranslation(pivotPoint.x,pivotPoint.y,pivotPoint.z);
		}
		this.prepend(m);
	}
	,prependScale: function(xScale,yScale,zScale) {
		var value = [xScale,0.0,0.0,0.0,0.0,yScale,0.0,0.0,0.0,0.0,zScale,0.0,0.0,0.0,0.0,1.0];
		var vectorData = new openfl_VectorData();
		vectorData.length = value.length;
		vectorData.fixed = true;
		vectorData.data = value.slice(0);
		this.prepend(new openfl_geom_Matrix3D(vectorData));
	}
	,prependTranslation: function(x,y,z) {
		var m = new openfl_geom_Matrix3D();
		m.set_position(new openfl_geom_Vector3D(x,y,z));
		this.prepend(m);
	}
	,recompose: function(components,orientationStyle) {
		if(components.length < 3 || components.data[2].x == 0 || components.data[2].y == 0 || components.data[2].z == 0) {
			return false;
		}
		if(orientationStyle == null) {
			orientationStyle = 1;
		}
		this.identity();
		var scale = [];
		scale[0] = scale[1] = scale[2] = components.data[2].x;
		scale[4] = scale[5] = scale[6] = components.data[2].y;
		scale[8] = scale[9] = scale[10] = components.data[2].z;
		if(orientationStyle == null) {
			var x = components.data[1].x;
			var y = components.data[1].y;
			var z = components.data[1].z;
			var w = components.data[1].w;
			if(Type.enumEq(orientationStyle,0)) {
				x *= Math.sin(w / 2);
				y *= Math.sin(w / 2);
				z *= Math.sin(w / 2);
				w = Math.cos(w / 2);
			}
			var this1 = this.rawData;
			if(!this1.fixed) {
				if(0 >= this1.length) {
					this1.length = 1;
				}
				if(this1.data.length < this1.length) {
					var length = this1.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
					this1.data = data;
				}
			}
			this1.data[0] = (1 - 2 * y * y - 2 * z * z) * scale[0];
			var this2 = this.rawData;
			if(!this2.fixed) {
				if(1 >= this2.length) {
					this2.length = 2;
				}
				if(this2.data.length < this2.length) {
					var length1 = this2.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
					this2.data = data1;
				}
			}
			this2.data[1] = (2 * x * y + 2 * w * z) * scale[1];
			var this3 = this.rawData;
			if(!this3.fixed) {
				if(2 >= this3.length) {
					this3.length = 3;
				}
				if(this3.data.length < this3.length) {
					var length2 = this3.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
					this3.data = data2;
				}
			}
			this3.data[2] = (2 * x * z - 2 * w * y) * scale[2];
			var this4 = this.rawData;
			if(!this4.fixed) {
				if(3 >= this4.length) {
					this4.length = 4;
				}
				if(this4.data.length < this4.length) {
					var length3 = this4.data.length + 10;
					var data3 = new Array(length3);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data3,0,this4.data.length);
					this4.data = data3;
				}
			}
			this4.data[3] = 0;
			var this5 = this.rawData;
			if(!this5.fixed) {
				if(4 >= this5.length) {
					this5.length = 5;
				}
				if(this5.data.length < this5.length) {
					var length4 = this5.data.length + 10;
					var data4 = new Array(length4);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data4,0,this5.data.length);
					this5.data = data4;
				}
			}
			this5.data[4] = (2 * x * y - 2 * w * z) * scale[4];
			var this6 = this.rawData;
			if(!this6.fixed) {
				if(5 >= this6.length) {
					this6.length = 6;
				}
				if(this6.data.length < this6.length) {
					var length5 = this6.data.length + 10;
					var data5 = new Array(length5);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this6.data,0,data5,0,this6.data.length);
					this6.data = data5;
				}
			}
			this6.data[5] = (1 - 2 * x * x - 2 * z * z) * scale[5];
			var this7 = this.rawData;
			if(!this7.fixed) {
				if(6 >= this7.length) {
					this7.length = 7;
				}
				if(this7.data.length < this7.length) {
					var length6 = this7.data.length + 10;
					var data6 = new Array(length6);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data6,0,this7.data.length);
					this7.data = data6;
				}
			}
			this7.data[6] = (2 * y * z + 2 * w * x) * scale[6];
			var this8 = this.rawData;
			if(!this8.fixed) {
				if(7 >= this8.length) {
					this8.length = 8;
				}
				if(this8.data.length < this8.length) {
					var length7 = this8.data.length + 10;
					var data7 = new Array(length7);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this8.data,0,data7,0,this8.data.length);
					this8.data = data7;
				}
			}
			this8.data[7] = 0;
			var this9 = this.rawData;
			if(!this9.fixed) {
				if(8 >= this9.length) {
					this9.length = 9;
				}
				if(this9.data.length < this9.length) {
					var length8 = this9.data.length + 10;
					var data8 = new Array(length8);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data8,0,this9.data.length);
					this9.data = data8;
				}
			}
			this9.data[8] = (2 * x * z + 2 * w * y) * scale[8];
			var this10 = this.rawData;
			if(!this10.fixed) {
				if(9 >= this10.length) {
					this10.length = 10;
				}
				if(this10.data.length < this10.length) {
					var length9 = this10.data.length + 10;
					var data9 = new Array(length9);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this10.data,0,data9,0,this10.data.length);
					this10.data = data9;
				}
			}
			this10.data[9] = (2 * y * z - 2 * w * x) * scale[9];
			var this11 = this.rawData;
			if(!this11.fixed) {
				if(10 >= this11.length) {
					this11.length = 11;
				}
				if(this11.data.length < this11.length) {
					var length10 = this11.data.length + 10;
					var data10 = new Array(length10);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data10,0,this11.data.length);
					this11.data = data10;
				}
			}
			this11.data[10] = (1 - 2 * x * x - 2 * y * y) * scale[10];
			var this12 = this.rawData;
			if(!this12.fixed) {
				if(11 >= this12.length) {
					this12.length = 12;
				}
				if(this12.data.length < this12.length) {
					var length11 = this12.data.length + 10;
					var data11 = new Array(length11);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this12.data,0,data11,0,this12.data.length);
					this12.data = data11;
				}
			}
			this12.data[11] = 0;
			var this13 = this.rawData;
			var value = components.data[0].x;
			if(!this13.fixed) {
				if(12 >= this13.length) {
					this13.length = 13;
				}
				if(this13.data.length < this13.length) {
					var length12 = this13.data.length + 10;
					var data12 = new Array(length12);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data12,0,this13.data.length);
					this13.data = data12;
				}
			}
			this13.data[12] = value;
			var this14 = this.rawData;
			var value1 = components.data[0].y;
			if(!this14.fixed) {
				if(13 >= this14.length) {
					this14.length = 14;
				}
				if(this14.data.length < this14.length) {
					var length13 = this14.data.length + 10;
					var data13 = new Array(length13);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this14.data,0,data13,0,this14.data.length);
					this14.data = data13;
				}
			}
			this14.data[13] = value1;
			var this15 = this.rawData;
			var value2 = components.data[0].z;
			if(!this15.fixed) {
				if(14 >= this15.length) {
					this15.length = 15;
				}
				if(this15.data.length < this15.length) {
					var length14 = this15.data.length + 10;
					var data14 = new Array(length14);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this15.data,0,data14,0,this15.data.length);
					this15.data = data14;
				}
			}
			this15.data[14] = value2;
			var this16 = this.rawData;
			if(!this16.fixed) {
				if(15 >= this16.length) {
					this16.length = 16;
				}
				if(this16.data.length < this16.length) {
					var length15 = this16.data.length + 10;
					var data15 = new Array(length15);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this16.data,0,data15,0,this16.data.length);
					this16.data = data15;
				}
			}
			this16.data[15] = 1;
		} else if(orientationStyle == 1) {
			var cx = Math.cos(components.data[1].x);
			var cy = Math.cos(components.data[1].y);
			var cz = Math.cos(components.data[1].z);
			var sx = Math.sin(components.data[1].x);
			var sy = Math.sin(components.data[1].y);
			var sz = Math.sin(components.data[1].z);
			var this17 = this.rawData;
			if(!this17.fixed) {
				if(0 >= this17.length) {
					this17.length = 1;
				}
				if(this17.data.length < this17.length) {
					var length16 = this17.data.length + 10;
					var data16 = new Array(length16);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this17.data,0,data16,0,this17.data.length);
					this17.data = data16;
				}
			}
			this17.data[0] = cy * cz * scale[0];
			var this18 = this.rawData;
			if(!this18.fixed) {
				if(1 >= this18.length) {
					this18.length = 2;
				}
				if(this18.data.length < this18.length) {
					var length17 = this18.data.length + 10;
					var data17 = new Array(length17);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this18.data,0,data17,0,this18.data.length);
					this18.data = data17;
				}
			}
			this18.data[1] = cy * sz * scale[1];
			var this19 = this.rawData;
			if(!this19.fixed) {
				if(2 >= this19.length) {
					this19.length = 3;
				}
				if(this19.data.length < this19.length) {
					var length18 = this19.data.length + 10;
					var data18 = new Array(length18);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this19.data,0,data18,0,this19.data.length);
					this19.data = data18;
				}
			}
			this19.data[2] = -sy * scale[2];
			var this20 = this.rawData;
			if(!this20.fixed) {
				if(3 >= this20.length) {
					this20.length = 4;
				}
				if(this20.data.length < this20.length) {
					var length19 = this20.data.length + 10;
					var data19 = new Array(length19);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this20.data,0,data19,0,this20.data.length);
					this20.data = data19;
				}
			}
			this20.data[3] = 0;
			var this21 = this.rawData;
			if(!this21.fixed) {
				if(4 >= this21.length) {
					this21.length = 5;
				}
				if(this21.data.length < this21.length) {
					var length20 = this21.data.length + 10;
					var data20 = new Array(length20);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this21.data,0,data20,0,this21.data.length);
					this21.data = data20;
				}
			}
			this21.data[4] = (sx * sy * cz - cx * sz) * scale[4];
			var this22 = this.rawData;
			if(!this22.fixed) {
				if(5 >= this22.length) {
					this22.length = 6;
				}
				if(this22.data.length < this22.length) {
					var length21 = this22.data.length + 10;
					var data21 = new Array(length21);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this22.data,0,data21,0,this22.data.length);
					this22.data = data21;
				}
			}
			this22.data[5] = (sx * sy * sz + cx * cz) * scale[5];
			var this23 = this.rawData;
			if(!this23.fixed) {
				if(6 >= this23.length) {
					this23.length = 7;
				}
				if(this23.data.length < this23.length) {
					var length22 = this23.data.length + 10;
					var data22 = new Array(length22);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this23.data,0,data22,0,this23.data.length);
					this23.data = data22;
				}
			}
			this23.data[6] = sx * cy * scale[6];
			var this24 = this.rawData;
			if(!this24.fixed) {
				if(7 >= this24.length) {
					this24.length = 8;
				}
				if(this24.data.length < this24.length) {
					var length23 = this24.data.length + 10;
					var data23 = new Array(length23);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this24.data,0,data23,0,this24.data.length);
					this24.data = data23;
				}
			}
			this24.data[7] = 0;
			var this25 = this.rawData;
			if(!this25.fixed) {
				if(8 >= this25.length) {
					this25.length = 9;
				}
				if(this25.data.length < this25.length) {
					var length24 = this25.data.length + 10;
					var data24 = new Array(length24);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this25.data,0,data24,0,this25.data.length);
					this25.data = data24;
				}
			}
			this25.data[8] = (cx * sy * cz + sx * sz) * scale[8];
			var this26 = this.rawData;
			if(!this26.fixed) {
				if(9 >= this26.length) {
					this26.length = 10;
				}
				if(this26.data.length < this26.length) {
					var length25 = this26.data.length + 10;
					var data25 = new Array(length25);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this26.data,0,data25,0,this26.data.length);
					this26.data = data25;
				}
			}
			this26.data[9] = (cx * sy * sz - sx * cz) * scale[9];
			var this27 = this.rawData;
			if(!this27.fixed) {
				if(10 >= this27.length) {
					this27.length = 11;
				}
				if(this27.data.length < this27.length) {
					var length26 = this27.data.length + 10;
					var data26 = new Array(length26);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this27.data,0,data26,0,this27.data.length);
					this27.data = data26;
				}
			}
			this27.data[10] = cx * cy * scale[10];
			var this28 = this.rawData;
			if(!this28.fixed) {
				if(11 >= this28.length) {
					this28.length = 12;
				}
				if(this28.data.length < this28.length) {
					var length27 = this28.data.length + 10;
					var data27 = new Array(length27);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this28.data,0,data27,0,this28.data.length);
					this28.data = data27;
				}
			}
			this28.data[11] = 0;
			var this29 = this.rawData;
			var value3 = components.data[0].x;
			if(!this29.fixed) {
				if(12 >= this29.length) {
					this29.length = 13;
				}
				if(this29.data.length < this29.length) {
					var length28 = this29.data.length + 10;
					var data28 = new Array(length28);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this29.data,0,data28,0,this29.data.length);
					this29.data = data28;
				}
			}
			this29.data[12] = value3;
			var this30 = this.rawData;
			var value4 = components.data[0].y;
			if(!this30.fixed) {
				if(13 >= this30.length) {
					this30.length = 14;
				}
				if(this30.data.length < this30.length) {
					var length29 = this30.data.length + 10;
					var data29 = new Array(length29);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this30.data,0,data29,0,this30.data.length);
					this30.data = data29;
				}
			}
			this30.data[13] = value4;
			var this31 = this.rawData;
			var value5 = components.data[0].z;
			if(!this31.fixed) {
				if(14 >= this31.length) {
					this31.length = 15;
				}
				if(this31.data.length < this31.length) {
					var length30 = this31.data.length + 10;
					var data30 = new Array(length30);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this31.data,0,data30,0,this31.data.length);
					this31.data = data30;
				}
			}
			this31.data[14] = value5;
			var this32 = this.rawData;
			if(!this32.fixed) {
				if(15 >= this32.length) {
					this32.length = 16;
				}
				if(this32.data.length < this32.length) {
					var length31 = this32.data.length + 10;
					var data31 = new Array(length31);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this32.data,0,data31,0,this32.data.length);
					this32.data = data31;
				}
			}
			this32.data[15] = 1;
		} else {
			var x1 = components.data[1].x;
			var y1 = components.data[1].y;
			var z1 = components.data[1].z;
			var w1 = components.data[1].w;
			if(Type.enumEq(orientationStyle,0)) {
				x1 *= Math.sin(w1 / 2);
				y1 *= Math.sin(w1 / 2);
				z1 *= Math.sin(w1 / 2);
				w1 = Math.cos(w1 / 2);
			}
			var this33 = this.rawData;
			if(!this33.fixed) {
				if(0 >= this33.length) {
					this33.length = 1;
				}
				if(this33.data.length < this33.length) {
					var length32 = this33.data.length + 10;
					var data32 = new Array(length32);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this33.data,0,data32,0,this33.data.length);
					this33.data = data32;
				}
			}
			this33.data[0] = (1 - 2 * y1 * y1 - 2 * z1 * z1) * scale[0];
			var this34 = this.rawData;
			if(!this34.fixed) {
				if(1 >= this34.length) {
					this34.length = 2;
				}
				if(this34.data.length < this34.length) {
					var length33 = this34.data.length + 10;
					var data33 = new Array(length33);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this34.data,0,data33,0,this34.data.length);
					this34.data = data33;
				}
			}
			this34.data[1] = (2 * x1 * y1 + 2 * w1 * z1) * scale[1];
			var this35 = this.rawData;
			if(!this35.fixed) {
				if(2 >= this35.length) {
					this35.length = 3;
				}
				if(this35.data.length < this35.length) {
					var length34 = this35.data.length + 10;
					var data34 = new Array(length34);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this35.data,0,data34,0,this35.data.length);
					this35.data = data34;
				}
			}
			this35.data[2] = (2 * x1 * z1 - 2 * w1 * y1) * scale[2];
			var this36 = this.rawData;
			if(!this36.fixed) {
				if(3 >= this36.length) {
					this36.length = 4;
				}
				if(this36.data.length < this36.length) {
					var length35 = this36.data.length + 10;
					var data35 = new Array(length35);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this36.data,0,data35,0,this36.data.length);
					this36.data = data35;
				}
			}
			this36.data[3] = 0;
			var this37 = this.rawData;
			if(!this37.fixed) {
				if(4 >= this37.length) {
					this37.length = 5;
				}
				if(this37.data.length < this37.length) {
					var length36 = this37.data.length + 10;
					var data36 = new Array(length36);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this37.data,0,data36,0,this37.data.length);
					this37.data = data36;
				}
			}
			this37.data[4] = (2 * x1 * y1 - 2 * w1 * z1) * scale[4];
			var this38 = this.rawData;
			if(!this38.fixed) {
				if(5 >= this38.length) {
					this38.length = 6;
				}
				if(this38.data.length < this38.length) {
					var length37 = this38.data.length + 10;
					var data37 = new Array(length37);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this38.data,0,data37,0,this38.data.length);
					this38.data = data37;
				}
			}
			this38.data[5] = (1 - 2 * x1 * x1 - 2 * z1 * z1) * scale[5];
			var this39 = this.rawData;
			if(!this39.fixed) {
				if(6 >= this39.length) {
					this39.length = 7;
				}
				if(this39.data.length < this39.length) {
					var length38 = this39.data.length + 10;
					var data38 = new Array(length38);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this39.data,0,data38,0,this39.data.length);
					this39.data = data38;
				}
			}
			this39.data[6] = (2 * y1 * z1 + 2 * w1 * x1) * scale[6];
			var this40 = this.rawData;
			if(!this40.fixed) {
				if(7 >= this40.length) {
					this40.length = 8;
				}
				if(this40.data.length < this40.length) {
					var length39 = this40.data.length + 10;
					var data39 = new Array(length39);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this40.data,0,data39,0,this40.data.length);
					this40.data = data39;
				}
			}
			this40.data[7] = 0;
			var this41 = this.rawData;
			if(!this41.fixed) {
				if(8 >= this41.length) {
					this41.length = 9;
				}
				if(this41.data.length < this41.length) {
					var length40 = this41.data.length + 10;
					var data40 = new Array(length40);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this41.data,0,data40,0,this41.data.length);
					this41.data = data40;
				}
			}
			this41.data[8] = (2 * x1 * z1 + 2 * w1 * y1) * scale[8];
			var this42 = this.rawData;
			if(!this42.fixed) {
				if(9 >= this42.length) {
					this42.length = 10;
				}
				if(this42.data.length < this42.length) {
					var length41 = this42.data.length + 10;
					var data41 = new Array(length41);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this42.data,0,data41,0,this42.data.length);
					this42.data = data41;
				}
			}
			this42.data[9] = (2 * y1 * z1 - 2 * w1 * x1) * scale[9];
			var this43 = this.rawData;
			if(!this43.fixed) {
				if(10 >= this43.length) {
					this43.length = 11;
				}
				if(this43.data.length < this43.length) {
					var length42 = this43.data.length + 10;
					var data42 = new Array(length42);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this43.data,0,data42,0,this43.data.length);
					this43.data = data42;
				}
			}
			this43.data[10] = (1 - 2 * x1 * x1 - 2 * y1 * y1) * scale[10];
			var this44 = this.rawData;
			if(!this44.fixed) {
				if(11 >= this44.length) {
					this44.length = 12;
				}
				if(this44.data.length < this44.length) {
					var length43 = this44.data.length + 10;
					var data43 = new Array(length43);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this44.data,0,data43,0,this44.data.length);
					this44.data = data43;
				}
			}
			this44.data[11] = 0;
			var this45 = this.rawData;
			var value6 = components.data[0].x;
			if(!this45.fixed) {
				if(12 >= this45.length) {
					this45.length = 13;
				}
				if(this45.data.length < this45.length) {
					var length44 = this45.data.length + 10;
					var data44 = new Array(length44);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this45.data,0,data44,0,this45.data.length);
					this45.data = data44;
				}
			}
			this45.data[12] = value6;
			var this46 = this.rawData;
			var value7 = components.data[0].y;
			if(!this46.fixed) {
				if(13 >= this46.length) {
					this46.length = 14;
				}
				if(this46.data.length < this46.length) {
					var length45 = this46.data.length + 10;
					var data45 = new Array(length45);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this46.data,0,data45,0,this46.data.length);
					this46.data = data45;
				}
			}
			this46.data[13] = value7;
			var this47 = this.rawData;
			var value8 = components.data[0].z;
			if(!this47.fixed) {
				if(14 >= this47.length) {
					this47.length = 15;
				}
				if(this47.data.length < this47.length) {
					var length46 = this47.data.length + 10;
					var data46 = new Array(length46);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this47.data,0,data46,0,this47.data.length);
					this47.data = data46;
				}
			}
			this47.data[14] = value8;
			var this48 = this.rawData;
			if(!this48.fixed) {
				if(15 >= this48.length) {
					this48.length = 16;
				}
				if(this48.data.length < this48.length) {
					var length47 = this48.data.length + 10;
					var data47 = new Array(length47);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this48.data,0,data47,0,this48.data.length);
					this48.data = data47;
				}
			}
			this48.data[15] = 1;
		}
		if(components.data[2].x == 0) {
			var this49 = this.rawData;
			if(!this49.fixed) {
				if(0 >= this49.length) {
					this49.length = 1;
				}
				if(this49.data.length < this49.length) {
					var length48 = this49.data.length + 10;
					var data48 = new Array(length48);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this49.data,0,data48,0,this49.data.length);
					this49.data = data48;
				}
			}
			this49.data[0] = 1e-15;
		}
		if(components.data[2].y == 0) {
			var this50 = this.rawData;
			if(!this50.fixed) {
				if(5 >= this50.length) {
					this50.length = 6;
				}
				if(this50.data.length < this50.length) {
					var length49 = this50.data.length + 10;
					var data49 = new Array(length49);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this50.data,0,data49,0,this50.data.length);
					this50.data = data49;
				}
			}
			this50.data[5] = 1e-15;
		}
		if(components.data[2].z == 0) {
			var this51 = this.rawData;
			if(!this51.fixed) {
				if(10 >= this51.length) {
					this51.length = 11;
				}
				if(this51.data.length < this51.length) {
					var length50 = this51.data.length + 10;
					var data50 = new Array(length50);
					haxe_ds__$Vector_Vector_$Impl_$.blit(this51.data,0,data50,0,this51.data.length);
					this51.data = data50;
				}
			}
			this51.data[10] = 1e-15;
		}
		return !(components.data[2].x == 0 || components.data[2].y == 0 || components.data[2].y == 0);
	}
	,transformVector: function(v) {
		var x = v.x;
		var y = v.y;
		var z = v.z;
		return new openfl_geom_Vector3D(x * this.rawData.data[0] + y * this.rawData.data[4] + z * this.rawData.data[8] + this.rawData.data[12],x * this.rawData.data[1] + y * this.rawData.data[5] + z * this.rawData.data[9] + this.rawData.data[13],x * this.rawData.data[2] + y * this.rawData.data[6] + z * this.rawData.data[10] + this.rawData.data[14],x * this.rawData.data[3] + y * this.rawData.data[7] + z * this.rawData.data[11] + this.rawData.data[15]);
	}
	,transformVectors: function(vin,vout) {
		var i = 0;
		var x;
		var y;
		var z;
		while(i + 3 <= vin.length) {
			x = vin.data[i];
			y = vin.data[i + 1];
			z = vin.data[i + 2];
			var value = x * this.rawData.data[0] + y * this.rawData.data[4] + z * this.rawData.data[8] + this.rawData.data[12];
			if(!vout.fixed) {
				if(i >= vout.length) {
					vout.length = i + 1;
				}
				if(vout.data.length < vout.length) {
					var length = vout.data.length + 10;
					var data = new Array(length);
					haxe_ds__$Vector_Vector_$Impl_$.blit(vout.data,0,data,0,vout.data.length);
					vout.data = data;
				}
			}
			vout.data[i] = value;
			var key = i + 1;
			var value1 = x * this.rawData.data[1] + y * this.rawData.data[5] + z * this.rawData.data[9] + this.rawData.data[13];
			if(!vout.fixed) {
				if(key >= vout.length) {
					vout.length = key + 1;
				}
				if(vout.data.length < vout.length) {
					var length1 = vout.data.length + 10;
					var data1 = new Array(length1);
					haxe_ds__$Vector_Vector_$Impl_$.blit(vout.data,0,data1,0,vout.data.length);
					vout.data = data1;
				}
			}
			vout.data[key] = value1;
			var key1 = i + 2;
			var value2 = x * this.rawData.data[2] + y * this.rawData.data[6] + z * this.rawData.data[10] + this.rawData.data[14];
			if(!vout.fixed) {
				if(key1 >= vout.length) {
					vout.length = key1 + 1;
				}
				if(vout.data.length < vout.length) {
					var length2 = vout.data.length + 10;
					var data2 = new Array(length2);
					haxe_ds__$Vector_Vector_$Impl_$.blit(vout.data,0,data2,0,vout.data.length);
					vout.data = data2;
				}
			}
			vout.data[key1] = value2;
			i += 3;
		}
	}
	,transpose: function() {
		var this1 = this.rawData;
		var vectorData = new openfl_VectorData();
		vectorData.length = this1.length;
		vectorData.fixed = this1.fixed;
		var length = this1.length;
		vectorData.data = new Array(length);
		haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,vectorData.data,0,this1.length);
		var oRawData = vectorData;
		var this2 = this.rawData;
		var value = oRawData.data[4];
		if(!this2.fixed) {
			if(1 >= this2.length) {
				this2.length = 2;
			}
			if(this2.data.length < this2.length) {
				var length1 = this2.data.length + 10;
				var data = new Array(length1);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data,0,this2.data.length);
				this2.data = data;
			}
		}
		this2.data[1] = value;
		var this3 = this.rawData;
		var value1 = oRawData.data[8];
		if(!this3.fixed) {
			if(2 >= this3.length) {
				this3.length = 3;
			}
			if(this3.data.length < this3.length) {
				var length2 = this3.data.length + 10;
				var data1 = new Array(length2);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data1,0,this3.data.length);
				this3.data = data1;
			}
		}
		this3.data[2] = value1;
		var this4 = this.rawData;
		var value2 = oRawData.data[12];
		if(!this4.fixed) {
			if(3 >= this4.length) {
				this4.length = 4;
			}
			if(this4.data.length < this4.length) {
				var length3 = this4.data.length + 10;
				var data2 = new Array(length3);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this4.data,0,data2,0,this4.data.length);
				this4.data = data2;
			}
		}
		this4.data[3] = value2;
		var this5 = this.rawData;
		var value3 = oRawData.data[1];
		if(!this5.fixed) {
			if(4 >= this5.length) {
				this5.length = 5;
			}
			if(this5.data.length < this5.length) {
				var length4 = this5.data.length + 10;
				var data3 = new Array(length4);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this5.data,0,data3,0,this5.data.length);
				this5.data = data3;
			}
		}
		this5.data[4] = value3;
		var this6 = this.rawData;
		var value4 = oRawData.data[9];
		if(!this6.fixed) {
			if(6 >= this6.length) {
				this6.length = 7;
			}
			if(this6.data.length < this6.length) {
				var length5 = this6.data.length + 10;
				var data4 = new Array(length5);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this6.data,0,data4,0,this6.data.length);
				this6.data = data4;
			}
		}
		this6.data[6] = value4;
		var this7 = this.rawData;
		var value5 = oRawData.data[13];
		if(!this7.fixed) {
			if(7 >= this7.length) {
				this7.length = 8;
			}
			if(this7.data.length < this7.length) {
				var length6 = this7.data.length + 10;
				var data5 = new Array(length6);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this7.data,0,data5,0,this7.data.length);
				this7.data = data5;
			}
		}
		this7.data[7] = value5;
		var this8 = this.rawData;
		var value6 = oRawData.data[2];
		if(!this8.fixed) {
			if(8 >= this8.length) {
				this8.length = 9;
			}
			if(this8.data.length < this8.length) {
				var length7 = this8.data.length + 10;
				var data6 = new Array(length7);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this8.data,0,data6,0,this8.data.length);
				this8.data = data6;
			}
		}
		this8.data[8] = value6;
		var this9 = this.rawData;
		var value7 = oRawData.data[6];
		if(!this9.fixed) {
			if(9 >= this9.length) {
				this9.length = 10;
			}
			if(this9.data.length < this9.length) {
				var length8 = this9.data.length + 10;
				var data7 = new Array(length8);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this9.data,0,data7,0,this9.data.length);
				this9.data = data7;
			}
		}
		this9.data[9] = value7;
		var this10 = this.rawData;
		var value8 = oRawData.data[14];
		if(!this10.fixed) {
			if(11 >= this10.length) {
				this10.length = 12;
			}
			if(this10.data.length < this10.length) {
				var length9 = this10.data.length + 10;
				var data8 = new Array(length9);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this10.data,0,data8,0,this10.data.length);
				this10.data = data8;
			}
		}
		this10.data[11] = value8;
		var this11 = this.rawData;
		var value9 = oRawData.data[3];
		if(!this11.fixed) {
			if(12 >= this11.length) {
				this11.length = 13;
			}
			if(this11.data.length < this11.length) {
				var length10 = this11.data.length + 10;
				var data9 = new Array(length10);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this11.data,0,data9,0,this11.data.length);
				this11.data = data9;
			}
		}
		this11.data[12] = value9;
		var this12 = this.rawData;
		var value10 = oRawData.data[7];
		if(!this12.fixed) {
			if(13 >= this12.length) {
				this12.length = 14;
			}
			if(this12.data.length < this12.length) {
				var length11 = this12.data.length + 10;
				var data10 = new Array(length11);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this12.data,0,data10,0,this12.data.length);
				this12.data = data10;
			}
		}
		this12.data[13] = value10;
		var this13 = this.rawData;
		var value11 = oRawData.data[11];
		if(!this13.fixed) {
			if(14 >= this13.length) {
				this13.length = 15;
			}
			if(this13.data.length < this13.length) {
				var length12 = this13.data.length + 10;
				var data11 = new Array(length12);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this13.data,0,data11,0,this13.data.length);
				this13.data = data11;
			}
		}
		this13.data[14] = value11;
	}
	,get_determinant: function() {
		return (this.rawData.data[0] * this.rawData.data[5] - this.rawData.data[4] * this.rawData.data[1]) * (this.rawData.data[10] * this.rawData.data[15] - this.rawData.data[14] * this.rawData.data[11]) - (this.rawData.data[0] * this.rawData.data[9] - this.rawData.data[8] * this.rawData.data[1]) * (this.rawData.data[6] * this.rawData.data[15] - this.rawData.data[14] * this.rawData.data[7]) + (this.rawData.data[0] * this.rawData.data[13] - this.rawData.data[12] * this.rawData.data[1]) * (this.rawData.data[6] * this.rawData.data[11] - this.rawData.data[10] * this.rawData.data[7]) + (this.rawData.data[4] * this.rawData.data[9] - this.rawData.data[8] * this.rawData.data[5]) * (this.rawData.data[2] * this.rawData.data[15] - this.rawData.data[14] * this.rawData.data[3]) - (this.rawData.data[4] * this.rawData.data[13] - this.rawData.data[12] * this.rawData.data[5]) * (this.rawData.data[2] * this.rawData.data[11] - this.rawData.data[10] * this.rawData.data[3]) + (this.rawData.data[8] * this.rawData.data[13] - this.rawData.data[12] * this.rawData.data[9]) * (this.rawData.data[2] * this.rawData.data[7] - this.rawData.data[6] * this.rawData.data[3]);
	}
	,get_position: function() {
		return new openfl_geom_Vector3D(this.rawData.data[12],this.rawData.data[13],this.rawData.data[14]);
	}
	,set_position: function(val) {
		var this1 = this.rawData;
		var value = val.x;
		if(!this1.fixed) {
			if(12 >= this1.length) {
				this1.length = 13;
			}
			if(this1.data.length < this1.length) {
				var length = this1.data.length + 10;
				var data = new Array(length);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this1.data,0,data,0,this1.data.length);
				this1.data = data;
			}
		}
		this1.data[12] = value;
		var this2 = this.rawData;
		var value1 = val.y;
		if(!this2.fixed) {
			if(13 >= this2.length) {
				this2.length = 14;
			}
			if(this2.data.length < this2.length) {
				var length1 = this2.data.length + 10;
				var data1 = new Array(length1);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this2.data,0,data1,0,this2.data.length);
				this2.data = data1;
			}
		}
		this2.data[13] = value1;
		var this3 = this.rawData;
		var value2 = val.z;
		if(!this3.fixed) {
			if(14 >= this3.length) {
				this3.length = 15;
			}
			if(this3.data.length < this3.length) {
				var length2 = this3.data.length + 10;
				var data2 = new Array(length2);
				haxe_ds__$Vector_Vector_$Impl_$.blit(this3.data,0,data2,0,this3.data.length);
				this3.data = data2;
			}
		}
		this3.data[14] = value2;
		return val;
	}
	,__class__: openfl_geom_Matrix3D
	,__properties__: {set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}
};
var openfl_geom__$Orientation3D_Orientation3D_$Impl_$ = {};
$hxClasses["openfl.geom._Orientation3D.Orientation3D_Impl_"] = openfl_geom__$Orientation3D_Orientation3D_$Impl_$;
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.__name__ = ["openfl","geom","_Orientation3D","Orientation3D_Impl_"];
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.fromString = function(value) {
	switch(value) {
	case "axisAngle":
		return 0;
	case "eulerAngles":
		return 1;
	case "quaternion":
		return 2;
	default:
		return null;
	}
};
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "axisAngle";
	case 1:
		return "eulerAngles";
	case 2:
		return "quaternion";
	default:
		return null;
	}
};
var openfl_geom_Transform = function(displayObject) {
	this.__colorTransform = new openfl_geom_ColorTransform();
	this.concatenatedColorTransform = new openfl_geom_ColorTransform();
	this.pixelBounds = new openfl_geom_Rectangle();
	this.__displayObject = displayObject;
	this.__hasMatrix = true;
};
$hxClasses["openfl.geom.Transform"] = openfl_geom_Transform;
openfl_geom_Transform.__name__ = ["openfl","geom","Transform"];
openfl_geom_Transform.prototype = {
	get_colorTransform: function() {
		return this.__colorTransform;
	}
	,set_colorTransform: function(value) {
		if(!this.__colorTransform.__equals(value)) {
			this.__colorTransform = value;
			if(value != null) {
				this.__displayObject.set_alpha(value.alphaMultiplier);
			}
			var _this = this.__displayObject;
			if(!_this.__renderDirty) {
				_this.__updateCachedBitmap = true;
				_this.__updateFilters = _this.get_filters() != null && _this.get_filters().length > 0;
				_this.__renderDirty = true;
				openfl_display_DisplayObject.__worldRenderDirty++;
			}
		}
		return this.__colorTransform;
	}
	,get_matrix: function() {
		if(this.__hasMatrix) {
			return this.__displayObject.__transform.clone();
		}
		return null;
	}
	,get_concatenatedMatrix: function() {
		if(this.__hasMatrix) {
			return this.__displayObject.__getWorldTransform().clone();
		}
		return null;
	}
	,set_matrix: function(value) {
		if(value == null) {
			this.__hasMatrix = false;
			return null;
		}
		this.__hasMatrix = true;
		this.__hasMatrix3D = false;
		if(this.__displayObject != null) {
			var rotation = 180 / Math.PI * Math.atan2(value.d,value.c) - 90;
			if(rotation != this.__displayObject.__rotation) {
				this.__displayObject.__rotation = rotation;
				var radians = rotation * (Math.PI / 180);
				this.__displayObject.__rotationSine = Math.sin(radians);
				this.__displayObject.__rotationCosine = Math.cos(radians);
			}
			this.__displayObject.__transform.copyFrom(value);
			var _this = this.__displayObject;
			if(!_this.__transformDirty) {
				_this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return value;
	}
	,get_matrix3D: function() {
		if(this.__hasMatrix3D) {
			var matrix = this.__displayObject.__transform;
			var value = [matrix.a,matrix.b,0.0,0.0,matrix.c,matrix.d,0.0,0.0,0.0,0.0,1.0,0.0,matrix.tx,matrix.ty,0.0,1.0];
			var vectorData = new openfl_VectorData();
			vectorData.length = value.length;
			vectorData.fixed = true;
			vectorData.data = value.slice(0);
			return new openfl_geom_Matrix3D(vectorData);
		}
		return null;
	}
	,set_matrix3D: function(value) {
		if(value == null) {
			this.__hasMatrix3D = false;
			return null;
		}
		this.__hasMatrix = false;
		this.__hasMatrix3D = true;
		if(this.__displayObject != null) {
			var rotation = 180 / Math.PI * Math.atan2(value.rawData.data[5],value.rawData.data[4]) - 90;
			if(rotation != this.__displayObject.__rotation) {
				this.__displayObject.__rotation = rotation;
				var radians = rotation * (Math.PI / 180);
				this.__displayObject.__rotationSine = Math.sin(radians);
				this.__displayObject.__rotationCosine = Math.cos(radians);
			}
			this.__displayObject.__transform.a = value.rawData.data[0];
			this.__displayObject.__transform.b = value.rawData.data[1];
			this.__displayObject.__transform.c = value.rawData.data[5];
			this.__displayObject.__transform.d = value.rawData.data[6];
			this.__displayObject.__transform.tx = value.rawData.data[12];
			this.__displayObject.__transform.ty = value.rawData.data[13];
			var _this = this.__displayObject;
			if(!_this.__transformDirty) {
				_this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
		}
		return value;
	}
	,__class__: openfl_geom_Transform
	,__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 openfl_geom_Vector3D = function(x,y,z,w) {
	if(w == null) {
		w = 0;
	}
	if(z == null) {
		z = 0;
	}
	if(y == null) {
		y = 0;
	}
	if(x == null) {
		x = 0;
	}
	this.w = w;
	this.x = x;
	this.y = y;
	this.z = z;
};
$hxClasses["openfl.geom.Vector3D"] = openfl_geom_Vector3D;
openfl_geom_Vector3D.__name__ = ["openfl","geom","Vector3D"];
openfl_geom_Vector3D.__properties__ = {get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"}
openfl_geom_Vector3D.X_AXIS = null;
openfl_geom_Vector3D.Y_AXIS = null;
openfl_geom_Vector3D.Z_AXIS = null;
openfl_geom_Vector3D.angleBetween = function(a,b) {
	var la = a.get_length();
	var lb = b.get_length();
	var dot = a.dotProduct(b);
	if(la != 0) {
		dot /= la;
	}
	if(lb != 0) {
		dot /= lb;
	}
	return Math.acos(dot);
};
openfl_geom_Vector3D.distance = function(pt1,pt2) {
	var x = pt2.x - pt1.x;
	var y = pt2.y - pt1.y;
	var z = pt2.z - pt1.z;
	return Math.sqrt(x * x + y * y + z * z);
};
openfl_geom_Vector3D.get_X_AXIS = function() {
	return new openfl_geom_Vector3D(1,0,0);
};
openfl_geom_Vector3D.get_Y_AXIS = function() {
	return new openfl_geom_Vector3D(0,1,0);
};
openfl_geom_Vector3D.get_Z_AXIS = function() {
	return new openfl_geom_Vector3D(0,0,1);
};
openfl_geom_Vector3D.prototype = {
	add: function(a) {
		return new openfl_geom_Vector3D(this.x + a.x,this.y + a.y,this.z + a.z);
	}
	,clone: function() {
		return new openfl_geom_Vector3D(this.x,this.y,this.z,this.w);
	}
	,copyFrom: function(sourceVector3D) {
		this.x = sourceVector3D.x;
		this.y = sourceVector3D.y;
		this.z = sourceVector3D.z;
	}
	,crossProduct: function(a) {
		return new openfl_geom_Vector3D(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(toCompare,allFour) {
		if(allFour == null) {
			allFour = false;
		}
		if(this.x == toCompare.x && this.y == toCompare.y && this.z == toCompare.z) {
			if(!(!allFour)) {
				return this.w == toCompare.w;
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,incrementBy: function(a) {
		this.x += a.x;
		this.y += a.y;
		this.z += a.z;
	}
	,nearEquals: function(toCompare,tolerance,allFour) {
		if(allFour == null) {
			allFour = false;
		}
		if(Math.abs(this.x - toCompare.x) < tolerance && Math.abs(this.y - toCompare.y) < tolerance && Math.abs(this.z - toCompare.z) < tolerance) {
			if(!(!allFour)) {
				return Math.abs(this.w - toCompare.w) < tolerance;
			} else {
				return true;
			}
		} else {
			return false;
		}
	}
	,negate: function() {
		this.x *= -1;
		this.y *= -1;
		this.z *= -1;
	}
	,normalize: function() {
		var l = this.get_length();
		if(l != 0) {
			this.x /= l;
			this.y /= l;
			this.z /= l;
		}
		return l;
	}
	,project: function() {
		this.x /= this.w;
		this.y /= this.w;
		this.z /= this.w;
	}
	,scaleBy: function(s) {
		this.x *= s;
		this.y *= s;
		this.z *= s;
	}
	,setTo: function(xa,ya,za) {
		this.x = xa;
		this.y = ya;
		this.z = za;
	}
	,subtract: function(a) {
		return new openfl_geom_Vector3D(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__: openfl_geom_Vector3D
	,__properties__: {get_lengthSquared:"get_lengthSquared",get_length:"get_length"}
};
var openfl_media_ID3Info = function() {
};
$hxClasses["openfl.media.ID3Info"] = openfl_media_ID3Info;
openfl_media_ID3Info.__name__ = ["openfl","media","ID3Info"];
openfl_media_ID3Info.prototype = {
	__class__: openfl_media_ID3Info
};
var openfl_media_Sound = function(stream,context) {
	openfl_events_EventDispatcher.call(this,this);
	this.bytesLoaded = 0;
	this.bytesTotal = 0;
	this.id3 = null;
	this.isBuffering = false;
	this.url = null;
	if(stream != null) {
		this.load(stream,context);
	}
};
$hxClasses["openfl.media.Sound"] = openfl_media_Sound;
openfl_media_Sound.__name__ = ["openfl","media","Sound"];
openfl_media_Sound.fromAudioBuffer = function(buffer) {
	var sound = new openfl_media_Sound();
	sound.__buffer = buffer;
	return sound;
};
openfl_media_Sound.fromFile = function(path) {
	return openfl_media_Sound.fromAudioBuffer(lime_audio_AudioBuffer.fromFile(path));
};
openfl_media_Sound.__super__ = openfl_events_EventDispatcher;
openfl_media_Sound.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	close: function() {
		var key = this.__soundID;
		var _this = openfl_media_Sound.__registeredSounds;
		if(__map_reserved[key] != null ? _this.existsReserved(key) : _this.h.hasOwnProperty(key)) {
			createjs.Sound.removeSound(this.__soundID);
		}
	}
	,load: function(stream,context) {
		this.url = stream.url;
		this.__soundID = haxe_io_Path.withoutExtension(stream.url);
		var key = this.__soundID;
		var _this = openfl_media_Sound.__registeredSounds;
		if(!(__map_reserved[key] != null ? _this.existsReserved(key) : _this.h.hasOwnProperty(key))) {
			var key1 = this.__soundID;
			var _this1 = openfl_media_Sound.__registeredSounds;
			if(__map_reserved[key1] != null) {
				_this1.setReserved(key1,true);
			} else {
				_this1.h[key1] = true;
			}
			createjs.Sound.addEventListener("fileload",$bind(this,this.SoundJS_onFileLoad));
			createjs.Sound.addEventListener("fileerror",$bind(this,this.SoundJS_onFileError));
			createjs.Sound.registerSound(this.url,this.__soundID);
		} else {
			this.dispatchEvent(new openfl_events_Event("complete"));
		}
	}
	,loadCompressedDataFromByteArray: function(bytes,bytesLength,forcePlayAsMusic) {
		if(forcePlayAsMusic == null) {
			forcePlayAsMusic = false;
		}
		openfl_Lib.notImplemented("Sound.loadCompressedDataFromByteArray");
	}
	,loadPCMFromByteArray: function(bytes,samples,format,stereo,sampleRate) {
		if(sampleRate == null) {
			sampleRate = 44100;
		}
		if(stereo == null) {
			stereo = true;
		}
		openfl_Lib.notImplemented("Sound.loadPCMFromByteArray");
	}
	,play: function(startTime,loops,sndTransform) {
		if(loops == null) {
			loops = 0;
		}
		if(startTime == null) {
			startTime = 0.0;
		}
		if(sndTransform == null) {
			sndTransform = new openfl_media_SoundTransform(1,0);
		}
		var pan = sndTransform.pan;
		if(pan == 0) {
			pan = -0.0000001;
		}
		return new openfl_media_SoundChannel(loops > 1 ? createjs.Sound.play(this.__soundID,"any",0,startTime | 0,loops - 1,sndTransform.volume,pan) : createjs.Sound.play(this.__soundID,"any",0,startTime | 0,0,sndTransform.volume,pan));
	}
	,get_id3: function() {
		return new openfl_media_ID3Info();
	}
	,get_length: function() {
		return 0;
	}
	,AudioBuffer_onURLLoad: function(buffer) {
		if(buffer == null) {
			this.dispatchEvent(new openfl_events_IOErrorEvent("ioError"));
		} else {
			this.__buffer = buffer;
			this.dispatchEvent(new openfl_events_Event("complete"));
		}
	}
	,SoundJS_onFileLoad: function(event) {
		if(event.id == this.__soundID) {
			createjs.Sound.removeEventListener("fileload",$bind(this,this.SoundJS_onFileLoad));
			createjs.Sound.removeEventListener("fileerror",$bind(this,this.SoundJS_onFileError));
			this.dispatchEvent(new openfl_events_Event("complete"));
		}
	}
	,SoundJS_onFileError: function(event) {
		if(event.id == this.__soundID) {
			createjs.Sound.removeEventListener("fileload",$bind(this,this.SoundJS_onFileLoad));
			createjs.Sound.removeEventListener("fileerror",$bind(this,this.SoundJS_onFileError));
			this.dispatchEvent(new openfl_events_IOErrorEvent("ioError"));
		}
	}
	,__class__: openfl_media_Sound
	,__properties__: {get_length:"get_length",get_id3:"get_id3"}
});
var openfl_media_SoundChannel = function(soundInstance) {
	openfl_events_EventDispatcher.call(this,this);
	this.leftPeak = 1;
	this.rightPeak = 1;
	if(soundInstance != null) {
		this.__soundInstance = soundInstance;
		this.__soundInstance.addEventListener("complete",$bind(this,this.source_onComplete));
		this.__isValid = true;
	}
};
$hxClasses["openfl.media.SoundChannel"] = openfl_media_SoundChannel;
openfl_media_SoundChannel.__name__ = ["openfl","media","SoundChannel"];
openfl_media_SoundChannel.__super__ = openfl_events_EventDispatcher;
openfl_media_SoundChannel.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	stop: function() {
		if(!this.__isValid) {
			return;
		}
		this.__soundInstance.stop();
	}
	,__dispose: function() {
		if(!this.__isValid) {
			return;
		}
		this.__soundInstance.stop();
		this.__soundInstance = null;
		this.__isValid = false;
	}
	,get_position: function() {
		if(!this.__isValid) {
			return 0;
		}
		return this.__soundInstance.getPosition();
	}
	,set_position: function(value) {
		if(!this.__isValid) {
			return 0;
		}
		this.__soundInstance.setPosition(value | 0);
		return this.__soundInstance.getPosition();
	}
	,get_soundTransform: function() {
		if(!this.__isValid) {
			return new openfl_media_SoundTransform();
		}
		return new openfl_media_SoundTransform(this.__soundInstance.getVolume(),this.__soundInstance.getPan());
	}
	,set_soundTransform: function(value) {
		if(!this.__isValid) {
			return value;
		}
		this.__soundInstance.setVolume(value.volume);
		this.__soundInstance.setPan(value.pan);
		return value;
	}
	,soundInstance_onComplete: function(_) {
		this.dispatchEvent(new openfl_events_Event("soundComplete"));
	}
	,source_onComplete: function() {
		this.__dispose();
		this.dispatchEvent(new openfl_events_Event("soundComplete"));
	}
	,__class__: openfl_media_SoundChannel
	,__properties__: {set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}
});
var openfl_media_SoundLoaderContext = function(bufferTime,checkPolicyFile) {
	if(checkPolicyFile == null) {
		checkPolicyFile = false;
	}
	if(bufferTime == null) {
		bufferTime = 1000;
	}
	this.bufferTime = bufferTime;
	this.checkPolicyFile = checkPolicyFile;
};
$hxClasses["openfl.media.SoundLoaderContext"] = openfl_media_SoundLoaderContext;
openfl_media_SoundLoaderContext.__name__ = ["openfl","media","SoundLoaderContext"];
openfl_media_SoundLoaderContext.prototype = {
	__class__: openfl_media_SoundLoaderContext
};
var openfl_media_SoundTransform = function(vol,panning) {
	if(panning == null) {
		panning = 0;
	}
	if(vol == null) {
		vol = 1;
	}
	this.volume = vol;
	this.pan = panning;
	this.leftToLeft = 0;
	this.leftToRight = 0;
	this.rightToLeft = 0;
	this.rightToRight = 0;
};
$hxClasses["openfl.media.SoundTransform"] = openfl_media_SoundTransform;
openfl_media_SoundTransform.__name__ = ["openfl","media","SoundTransform"];
openfl_media_SoundTransform.prototype = {
	clone: function() {
		return new openfl_media_SoundTransform(this.volume,this.pan);
	}
	,__class__: openfl_media_SoundTransform
};
var openfl_net_NetConnection = function() {
	openfl_events_EventDispatcher.call(this);
};
$hxClasses["openfl.net.NetConnection"] = openfl_net_NetConnection;
openfl_net_NetConnection.__name__ = ["openfl","net","NetConnection"];
openfl_net_NetConnection.__super__ = openfl_events_EventDispatcher;
openfl_net_NetConnection.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	connect: function(command,_,_1,_2,_3,_4) {
		if(command != null) {
			throw new js__$Boot_HaxeError("Error: Can only connect in \"HTTP streaming\" mode");
		}
		this.dispatchEvent(new openfl_events_NetStatusEvent("netStatus",false,true,{ code : "connectSuccess"}));
	}
	,__class__: openfl_net_NetConnection
});
var openfl_net_SharedObject = function() {
	openfl_events_EventDispatcher.call(this);
	this.client = this;
	this.objectEncoding = 3;
};
$hxClasses["openfl.net.SharedObject"] = openfl_net_SharedObject;
openfl_net_SharedObject.__name__ = ["openfl","net","SharedObject"];
openfl_net_SharedObject.__sharedObjects = null;
openfl_net_SharedObject.getLocal = function(name,localPath,secure) {
	if(secure == null) {
		secure = false;
	}
	if(localPath == null) {
		localPath = window.location.href;
	}
	if(openfl_net_SharedObject.__sharedObjects == null) {
		openfl_net_SharedObject.__sharedObjects = new haxe_ds_StringMap();
		openfl_Lib.application.onExit.add(openfl_net_SharedObject.application_onExit);
	}
	var id = localPath + "/" + name;
	var _this = openfl_net_SharedObject.__sharedObjects;
	if(!(__map_reserved[id] != null ? _this.existsReserved(id) : _this.h.hasOwnProperty(id))) {
		var sharedObject = new openfl_net_SharedObject();
		sharedObject.data = { };
		sharedObject.__localPath = localPath;
		sharedObject.__name = name;
		var encodedData = null;
		try {
			var storage = js_Browser.getLocalStorage();
			if(storage != null) {
				encodedData = storage.getItem(localPath + ":" + name);
			}
		} catch( e ) {
			haxe_CallStack.lastException = e;
		}
		if(encodedData != null && encodedData != "") {
			try {
				var unserializer = new haxe_Unserializer(encodedData);
				unserializer.setResolver({ resolveEnum : Type.resolveEnum, resolveClass : openfl_net_SharedObject.__resolveClass});
				sharedObject.data = unserializer.unserialize();
			} catch( e1 ) {
				haxe_CallStack.lastException = e1;
			}
		}
		var _this1 = openfl_net_SharedObject.__sharedObjects;
		if(__map_reserved[id] != null) {
			_this1.setReserved(id,sharedObject);
		} else {
			_this1.h[id] = sharedObject;
		}
	}
	var _this2 = openfl_net_SharedObject.__sharedObjects;
	if(__map_reserved[id] != null) {
		return _this2.getReserved(id);
	} else {
		return _this2.h[id];
	}
};
openfl_net_SharedObject.getRemote = function(name,remotePath,persistence,secure) {
	if(secure == null) {
		secure = false;
	}
	if(persistence == null) {
		persistence = false;
	}
	openfl_Lib.notImplemented("SharedObject.getRemote");
	return null;
};
openfl_net_SharedObject.__mkdir = function(directory) {
};
openfl_net_SharedObject.__resolveClass = function(name) {
	if(name != null) {
		if(StringTools.startsWith(name,"neash.")) {
			name = StringTools.replace(name,"neash.","openfl.");
		}
		if(StringTools.startsWith(name,"native.")) {
			name = StringTools.replace(name,"native.","openfl.");
		}
		if(StringTools.startsWith(name,"flash.")) {
			name = StringTools.replace(name,"flash.","openfl.");
		}
		if(StringTools.startsWith(name,"openfl._v2.")) {
			name = StringTools.replace(name,"openfl._v2.","openfl.");
		}
		if(StringTools.startsWith(name,"openfl._legacy.")) {
			name = StringTools.replace(name,"openfl._legacy.","openfl.");
		}
		return Type.resolveClass(name);
	}
	return null;
};
openfl_net_SharedObject.application_onExit = function(_) {
	var _this = openfl_net_SharedObject.__sharedObjects;
	var sharedObject = new haxe_ds__$StringMap_StringMapIterator(_this,_this.arrayKeys());
	while(sharedObject.hasNext()) sharedObject.next().flush();
};
openfl_net_SharedObject.__super__ = openfl_events_EventDispatcher;
openfl_net_SharedObject.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	clear: function() {
		this.data = { };
		try {
			var storage = js_Browser.getLocalStorage();
			if(storage != null) {
				storage.removeItem(this.__localPath + ":" + this.__name);
			}
		} catch( e ) {
			haxe_CallStack.lastException = e;
		}
	}
	,close: function() {
	}
	,connect: function(myConnection,params) {
		openfl_Lib.notImplemented("SharedObject.connect");
	}
	,flush: function(minDiskSpace) {
		if(minDiskSpace == null) {
			minDiskSpace = 0;
		}
		if(Reflect.fields(this.data).length == 0) {
			return 0;
		}
		var encodedData = haxe_Serializer.run(this.data);
		try {
			var storage = js_Browser.getLocalStorage();
			if(storage != null) {
				storage.removeItem(this.__localPath + ":" + this.__name);
				storage.setItem(this.__localPath + ":" + this.__name,encodedData);
			}
		} catch( e ) {
			haxe_CallStack.lastException = e;
			return 1;
		}
		return 0;
	}
	,send: function($arguments) {
		openfl_Lib.notImplemented("SharedObject.send");
	}
	,setDirty: function(propertyName) {
	}
	,setProperty: function(propertyName,value) {
		if(this.data != null) {
			this.data[propertyName] = value;
		}
	}
	,get_size: function() {
		try {
			return haxe_io_Bytes.ofString(haxe_Serializer.run(this.data)).length;
		} catch( e ) {
			haxe_CallStack.lastException = e;
			return 0;
		}
	}
	,__class__: openfl_net_SharedObject
	,__properties__: {get_size:"get_size"}
});
var openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$ = {};
$hxClasses["openfl.net._SharedObjectFlushStatus.SharedObjectFlushStatus_Impl_"] = openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$;
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.__name__ = ["openfl","net","_SharedObjectFlushStatus","SharedObjectFlushStatus_Impl_"];
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.fromString = function(value) {
	switch(value) {
	case "flushed":
		return 0;
	case "pending":
		return 1;
	default:
		return null;
	}
};
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "flushed";
	case 1:
		return "pending";
	default:
		return null;
	}
};
var openfl_net_URLLoader = function(request) {
	openfl_events_EventDispatcher.call(this);
	this.bytesLoaded = 0;
	this.bytesTotal = 0;
	this.set_dataFormat(1);
	if(request != null) {
		this.load(request);
	}
};
$hxClasses["openfl.net.URLLoader"] = openfl_net_URLLoader;
openfl_net_URLLoader.__name__ = ["openfl","net","URLLoader"];
openfl_net_URLLoader.__super__ = openfl_events_EventDispatcher;
openfl_net_URLLoader.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	close: function() {
	}
	,getData: function() {
		return null;
	}
	,load: function(request) {
		this.requestUrl(request.url,request.method,request.data,request.formatRequestHeaders());
	}
	,registerEvents: function(subject) {
		var self = this;
		if(typeof XMLHttpRequestProgressEvent != "undefined") {
			subject.addEventListener("progress",$bind(this,this.onProgress),false);
		}
		subject.onreadystatechange = function() {
			if(subject.readyState != 4) {
				return;
			}
			var s;
			try {
				s = subject.status;
			} catch( e ) {
				haxe_CallStack.lastException = e;
				s = null;
			}
			if(s == undefined) {
				s = null;
			}
			if(s != null) {
				self.onStatus(s);
			}
			if(s != null && s >= 200 && s < 400) {
				self.onData(subject.response);
			} else if(s == null) {
				self.onError("Failed to connect or resolve host");
			} else if(s == 12029) {
				self.onError("Failed to connect to host");
			} else if(s == 12007) {
				self.onError("Unknown host");
			} else if(s == 0) {
				self.onError("Unable to make request (may be blocked due to cross-domain permissions)");
				self.onSecurityError("Unable to make request (may be blocked due to cross-domain permissions)");
			} else {
				self.onError("Http Error #" + subject.status);
			}
		};
	}
	,requestUrl: function(url,method,data,requestHeaders) {
		var xmlHttpRequest = new XMLHttpRequest();
		this.registerEvents(xmlHttpRequest);
		var uri = "";
		if(js_Boot.__instanceof(data,openfl_utils_ByteArrayData)) {
			var data1 = data;
			var _g = this.dataFormat;
			if(_g == 0) {
				uri = js_Boot.__cast(data1 , ArrayBuffer);
			} else {
				uri = data1.readUTFBytes(data1.length);
			}
		} else if(js_Boot.__instanceof(data,openfl_net_URLVariables)) {
			var data2 = data;
			var _g1 = 0;
			var _g11 = Reflect.fields(data2);
			while(_g1 < _g11.length) {
				var p = _g11[_g1];
				++_g1;
				if(uri.length != 0) {
					uri += "&";
				}
				var uri1 = encodeURIComponent(p) + "=";
				var s = Reflect.field(data2,p);
				uri += uri1 + encodeURIComponent(s);
			}
		} else if(data != null) {
			uri = data.toString();
		}
		try {
			if(method == "GET" && uri != null && uri != "") {
				var question = url.split("?").length <= 1;
				xmlHttpRequest.open(method,url + (question ? "?" : "&") + Std.string(uri),true);
				uri = "";
			} else {
				xmlHttpRequest.open(method,url,true);
			}
		} catch( e ) {
			haxe_CallStack.lastException = e;
			if (e instanceof js__$Boot_HaxeError) e = e.val;
			this.onError(e.toString());
			return;
		}
		var _g2 = this.dataFormat;
		if(_g2 == 0) {
			xmlHttpRequest.responseType = "arraybuffer";
		}
		var _g12 = 0;
		while(_g12 < requestHeaders.length) {
			var header = requestHeaders[_g12];
			++_g12;
			xmlHttpRequest.setRequestHeader(header.name,header.value);
		}
		xmlHttpRequest.send(uri);
		this.onOpen();
		this.getData = function() {
			if(xmlHttpRequest.response != null) {
				return xmlHttpRequest.response;
			} else {
				return xmlHttpRequest.responseText;
			}
		};
	}
	,onData: function(_) {
		var content = this.getData();
		if(this.dataFormat == 0) {
			this.data = openfl_utils__$ByteArray_ByteArray_$Impl_$.fromArrayBuffer(content);
		} else {
			this.data = Std.string(content);
		}
		var evt = new openfl_events_Event("complete");
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,onError: function(msg) {
		var evt = new openfl_events_IOErrorEvent("ioError");
		evt.text = msg;
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,onOpen: function() {
		var evt = new openfl_events_Event("open");
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,onProgress: function(event) {
		var evt = new openfl_events_ProgressEvent("progress");
		evt.currentTarget = this;
		evt.bytesLoaded = event.loaded;
		evt.bytesTotal = event.total;
		this.dispatchEvent(evt);
	}
	,onSecurityError: function(msg) {
		var evt = new openfl_events_SecurityErrorEvent("securityError");
		evt.text = msg;
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,onStatus: function(status) {
		var evt = new openfl_events_HTTPStatusEvent("httpStatus",false,false,status);
		evt.currentTarget = this;
		this.dispatchEvent(evt);
	}
	,set_dataFormat: function(inputVal) {
		if(inputVal == 0 && !Object.prototype.hasOwnProperty.call(window,"ArrayBuffer")) {
			this.dataFormat = 1;
		} else {
			this.dataFormat = inputVal;
		}
		return this.dataFormat;
	}
	,__class__: openfl_net_URLLoader
	,__properties__: {set_dataFormat:"set_dataFormat"}
});
var openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$ = {};
$hxClasses["openfl.net._URLLoaderDataFormat.URLLoaderDataFormat_Impl_"] = openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.__name__ = ["openfl","net","_URLLoaderDataFormat","URLLoaderDataFormat_Impl_"];
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.fromString = function(value) {
	switch(value) {
	case "binary":
		return 0;
	case "text":
		return 1;
	case "variables":
		return 2;
	default:
		return null;
	}
};
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "binary";
	case 1:
		return "text";
	case 2:
		return "variables";
	default:
		return null;
	}
};
var openfl_net_URLRequest = function(inURL) {
	if(inURL != null) {
		this.url = inURL;
	}
	this.requestHeaders = [];
	this.method = openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.toString(1);
	this.contentType = null;
};
$hxClasses["openfl.net.URLRequest"] = openfl_net_URLRequest;
openfl_net_URLRequest.__name__ = ["openfl","net","URLRequest"];
openfl_net_URLRequest.prototype = {
	formatRequestHeaders: function() {
		var res = this.requestHeaders;
		if(res == null) {
			res = [];
		}
		if(openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.fromString(this.method) == 1 || this.data == null) {
			return res;
		}
		if(typeof(this.data) == "string" || js_Boot.__instanceof(this.data,openfl_utils_ByteArrayData)) {
			res = res.slice();
			res.push(new openfl_net_URLRequestHeader("Content-Type",this.contentType != null ? this.contentType : "application/x-www-form-urlencoded"));
		}
		return res;
	}
	,__class__: openfl_net_URLRequest
};
var openfl_net_URLRequestHeader = function(name,value) {
	if(value == null) {
		value = "";
	}
	if(name == null) {
		name = "";
	}
	this.name = name;
	this.value = value;
};
$hxClasses["openfl.net.URLRequestHeader"] = openfl_net_URLRequestHeader;
openfl_net_URLRequestHeader.__name__ = ["openfl","net","URLRequestHeader"];
openfl_net_URLRequestHeader.prototype = {
	__class__: openfl_net_URLRequestHeader
};
var openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$ = {};
$hxClasses["openfl.net._URLRequestMethod.URLRequestMethod_Impl_"] = openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.__name__ = ["openfl","net","_URLRequestMethod","URLRequestMethod_Impl_"];
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.fromString = function(value) {
	switch(value) {
	case "DELETE":
		return 0;
	case "GET":
		return 1;
	case "HEAD":
		return 2;
	case "OPTIONS":
		return 3;
	case "POST":
		return 4;
	case "PUT":
		return 5;
	default:
		return null;
	}
};
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "DELETE";
	case 1:
		return "GET";
	case 2:
		return "HEAD";
	case 3:
		return "OPTIONS";
	case 4:
		return "POST";
	case 5:
		return "PUT";
	default:
		return null;
	}
};
var openfl_net_URLVariables = function(source) {
	if(source != null) {
		this.decode(source);
	}
};
$hxClasses["openfl.net.URLVariables"] = openfl_net_URLVariables;
openfl_net_URLVariables.__name__ = ["openfl","net","URLVariables"];
openfl_net_URLVariables.prototype = {
	decode: function(source) {
		var fields = Reflect.fields(this);
		var _g = 0;
		while(_g < fields.length) {
			var f = fields[_g];
			++_g;
			Reflect.deleteField(this,f);
		}
		var fields1 = source.split(";").join("&").split("&");
		var _g1 = 0;
		while(_g1 < fields1.length) {
			var f1 = fields1[_g1];
			++_g1;
			var eq = f1.indexOf("=");
			if(eq > 0) {
				var s = HxOverrides.substr(f1,0,eq);
				var field = decodeURIComponent(s.split("+").join(" "));
				var s1 = HxOverrides.substr(f1,eq + 1,null);
				this[field] = decodeURIComponent(s1.split("+").join(" "));
			} else if(eq != 0) {
				this[decodeURIComponent(f1.split("+").join(" "))] = "";
			}
		}
	}
	,toString: function() {
		var result = [];
		var fields = Reflect.fields(this);
		var _g = 0;
		while(_g < fields.length) {
			var f = fields[_g];
			++_g;
			var tmp = encodeURIComponent(f) + "=";
			var s = Reflect.field(this,f);
			result.push(tmp + encodeURIComponent(s));
		}
		return result.join("&");
	}
	,__class__: openfl_net_URLVariables
};
var openfl_system_LoaderContext = function(checkPolicyFile,applicationDomain,securityDomain) {
	if(checkPolicyFile == null) {
		checkPolicyFile = false;
	}
	this.checkPolicyFile = checkPolicyFile;
	this.securityDomain = securityDomain;
	this.applicationDomain = applicationDomain;
	this.allowCodeImport = true;
	this.allowLoadBytesCodeExecution = true;
};
$hxClasses["openfl.system.LoaderContext"] = openfl_system_LoaderContext;
openfl_system_LoaderContext.__name__ = ["openfl","system","LoaderContext"];
openfl_system_LoaderContext.prototype = {
	__class__: openfl_system_LoaderContext
};
var openfl_system_SecurityDomain = function() {
};
$hxClasses["openfl.system.SecurityDomain"] = openfl_system_SecurityDomain;
openfl_system_SecurityDomain.__name__ = ["openfl","system","SecurityDomain"];
openfl_system_SecurityDomain.prototype = {
	__class__: openfl_system_SecurityDomain
};
var openfl_system_System = function() { };
$hxClasses["openfl.system.System"] = openfl_system_System;
openfl_system_System.__name__ = ["openfl","system","System"];
openfl_system_System.__properties__ = {get_vmVersion:"get_vmVersion",get_totalMemory:"get_totalMemory"}
openfl_system_System.totalMemory = null;
openfl_system_System.vmVersion = null;
openfl_system_System.exit = function(code) {
};
openfl_system_System.gc = function() {
};
openfl_system_System.pause = function() {
	openfl_Lib.notImplemented("System.pause");
};
openfl_system_System.resume = function() {
	openfl_Lib.notImplemented("System.resume");
};
openfl_system_System.setClipboard = function(string) {
};
openfl_system_System.get_totalMemory = function() {
	return (window.performance && window.performance.memory) ? window.performance.memory.usedJSHeapSize : 0;
};
openfl_system_System.get_vmVersion = function() {
	return "1.0.0";
};
var openfl_text__$AntiAliasType_AntiAliasType_$Impl_$ = {};
$hxClasses["openfl.text._AntiAliasType.AntiAliasType_Impl_"] = openfl_text__$AntiAliasType_AntiAliasType_$Impl_$;
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.__name__ = ["openfl","text","_AntiAliasType","AntiAliasType_Impl_"];
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "advanced":
		return 0;
	case "normal":
		return 1;
	default:
		return null;
	}
};
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "advanced";
	case 1:
		return "normal";
	default:
		return null;
	}
};
var openfl_text__$FontStyle_FontStyle_$Impl_$ = {};
$hxClasses["openfl.text._FontStyle.FontStyle_Impl_"] = openfl_text__$FontStyle_FontStyle_$Impl_$;
openfl_text__$FontStyle_FontStyle_$Impl_$.__name__ = ["openfl","text","_FontStyle","FontStyle_Impl_"];
openfl_text__$FontStyle_FontStyle_$Impl_$.fromString = function(value) {
	switch(value) {
	case "bold":
		return 0;
	case "boldItalic":
		return 1;
	case "italic":
		return 2;
	case "regular":
		return 3;
	default:
		return null;
	}
};
openfl_text__$FontStyle_FontStyle_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "bold";
	case 1:
		return "boldItalic";
	case 2:
		return "italic";
	case 3:
		return "regular";
	default:
		return null;
	}
};
var openfl_text__$FontType_FontType_$Impl_$ = {};
$hxClasses["openfl.text._FontType.FontType_Impl_"] = openfl_text__$FontType_FontType_$Impl_$;
openfl_text__$FontType_FontType_$Impl_$.__name__ = ["openfl","text","_FontType","FontType_Impl_"];
openfl_text__$FontType_FontType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "device":
		return 0;
	case "embedded":
		return 1;
	case "embeddedCFF":
		return 2;
	default:
		return null;
	}
};
openfl_text__$FontType_FontType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "device";
	case 1:
		return "embedded";
	case 2:
		return "embeddedCFF";
	default:
		return null;
	}
};
var openfl_text__$GridFitType_GridFitType_$Impl_$ = {};
$hxClasses["openfl.text._GridFitType.GridFitType_Impl_"] = openfl_text__$GridFitType_GridFitType_$Impl_$;
openfl_text__$GridFitType_GridFitType_$Impl_$.__name__ = ["openfl","text","_GridFitType","GridFitType_Impl_"];
openfl_text__$GridFitType_GridFitType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "none":
		return 0;
	case "pixel":
		return 1;
	case "subpixel":
		return 2;
	default:
		return null;
	}
};
openfl_text__$GridFitType_GridFitType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "none";
	case 1:
		return "pixel";
	case 2:
		return "subpixel";
	default:
		return null;
	}
};
var openfl_text_TextField = function() {
	openfl_display_InteractiveObject.call(this);
	this.__caretIndex = -1;
	this.__graphics = new openfl_display_Graphics();
	this.__textEngine = new openfl__$internal_text_TextEngine(this);
	this.__layoutDirty = true;
	this.__tabEnabled = true;
	if(openfl_text_TextField.__defaultTextFormat == null) {
		openfl_text_TextField.__defaultTextFormat = new openfl_text_TextFormat("Times New Roman",12,0,false,false,false,"","",3,0,0,0,0);
		openfl_text_TextField.__defaultTextFormat.blockIndent = 0;
		openfl_text_TextField.__defaultTextFormat.bullet = false;
		openfl_text_TextField.__defaultTextFormat.letterSpacing = 0;
		openfl_text_TextField.__defaultTextFormat.kerning = false;
	}
	this.__textFormat = openfl_text_TextField.__defaultTextFormat.clone();
	this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(this.__textFormat,0,0));
	this.addEventListener("mouseDown",$bind(this,this.this_onMouseDown));
};
$hxClasses["openfl.text.TextField"] = openfl_text_TextField;
openfl_text_TextField.__name__ = ["openfl","text","TextField"];
openfl_text_TextField.__defaultTextFormat = null;
openfl_text_TextField.__super__ = openfl_display_InteractiveObject;
openfl_text_TextField.prototype = $extend(openfl_display_InteractiveObject.prototype,{
	appendText: function(text) {
		this.__textEngine.text += text;
		this.__textEngine.textFormatRanges[this.__textEngine.textFormatRanges.length - 1].end = this.__textEngine.text.length;
		this.__dirty = true;
		this.__layoutDirty = true;
	}
	,getCharBoundaries: function(charIndex) {
		if(charIndex < 0 || charIndex > this.__textEngine.text.length - 1) {
			return null;
		}
		this.__updateLayout();
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(charIndex >= group.startIndex && charIndex <= group.endIndex) {
				var x = group.offsetX;
				var _g3 = 0;
				var _g2 = charIndex - group.startIndex;
				while(_g3 < _g2) x += group.advances[_g3++];
				return new openfl_geom_Rectangle(x,group.offsetY,group.advances[charIndex - group.startIndex],group.ascent + group.descent);
			}
		}
		return null;
	}
	,getCharIndexAtPoint: function(x,y) {
		if(x <= 2 || x > this.get_width() + 4 || y <= 0 || y > this.get_height() + 4) {
			return -1;
		}
		this.__updateLayout();
		x += this.get_scrollH();
		var _g1 = 0;
		var _g = this.get_scrollV() - 1;
		while(_g1 < _g) y += this.__textEngine.lineHeights[_g1++];
		var _g2 = 0;
		var _g11 = this.__textEngine.layoutGroups;
		while(_g2 < _g11.length) {
			var group = _g11[_g2];
			++_g2;
			if(y >= group.offsetY && y <= group.offsetY + group.height) {
				if(x >= group.offsetX && x <= group.offsetX + group.width) {
					var advance = 0.0;
					var _g3 = 0;
					var _g21 = group.advances.length;
					while(_g3 < _g21) {
						var i = _g3++;
						advance += group.advances[i];
						if(x <= group.offsetX + advance) {
							return group.startIndex + i;
						}
					}
					return group.endIndex;
				}
			}
		}
		return -1;
	}
	,getFirstCharInParagraph: function(charIndex) {
		if(charIndex < 0 || charIndex > this.__textEngine.text.length - 1) {
			return 0;
		}
		var index = this.__textEngine.text.indexOf("\n");
		var startIndex = 0;
		while(index > -1) {
			if(index <= charIndex) {
				startIndex = index + 1;
			} else if(index > charIndex) {
				break;
			}
			index = this.__textEngine.text.indexOf("\n",index + 1);
		}
		return startIndex;
	}
	,getLineIndexAtPoint: function(x,y) {
		this.__updateLayout();
		if(x <= 2 || x > this.get_width() + 4 || y <= 0 || y > this.get_height() + 4) {
			return -1;
		}
		var _g1 = 0;
		var _g = this.get_scrollV() - 1;
		while(_g1 < _g) y += this.__textEngine.lineHeights[_g1++];
		var _g2 = 0;
		var _g11 = this.__textEngine.layoutGroups;
		while(_g2 < _g11.length) {
			var group = _g11[_g2];
			++_g2;
			if(y >= group.offsetY && y <= group.offsetY + group.height) {
				return group.lineIndex;
			}
		}
		return -1;
	}
	,getLineIndexOfChar: function(charIndex) {
		if(charIndex < 0 || charIndex > this.__textEngine.text.length - 1) {
			return -1;
		}
		this.__updateLayout();
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.startIndex <= charIndex && group.endIndex >= charIndex) {
				return group.lineIndex;
			}
		}
		return -1;
	}
	,getLineLength: function(lineIndex) {
		this.__updateLayout();
		if(lineIndex < 0 || lineIndex > this.__textEngine.numLines - 1) {
			return 0;
		}
		var startIndex = -1;
		var endIndex = -1;
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.lineIndex == lineIndex) {
				if(startIndex == -1) {
					startIndex = group.startIndex;
				}
			} else if(group.lineIndex == lineIndex + 1) {
				endIndex = group.startIndex;
				break;
			}
		}
		if(endIndex == -1) {
			endIndex = this.__textEngine.text.length;
		}
		return endIndex - startIndex;
	}
	,getLineMetrics: function(lineIndex) {
		this.__updateLayout();
		var ascender = this.__textEngine.lineAscents[lineIndex];
		var descender = this.__textEngine.lineDescents[lineIndex];
		var leading = this.__textEngine.lineLeadings[lineIndex];
		var lineHeight = this.__textEngine.lineHeights[lineIndex];
		var lineWidth = this.__textEngine.lineWidths[lineIndex];
		var margin;
		switch(this.__textFormat.align) {
		case 0:
			margin = (this.__textEngine.width - lineWidth) / 2;
			break;
		case 1:case 4:
			margin = this.__textEngine.width - lineWidth - 2;
			break;
		case 2:case 3:case 5:
			margin = 2;
			break;
		}
		return new openfl_text_TextLineMetrics(margin,lineWidth,lineHeight,ascender,descender,leading);
	}
	,getLineOffset: function(lineIndex) {
		this.__updateLayout();
		if(lineIndex < 0 || lineIndex > this.__textEngine.numLines - 1) {
			return -1;
		}
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.lineIndex == lineIndex) {
				return group.startIndex;
			}
		}
		return 0;
	}
	,getLineText: function(lineIndex) {
		this.__updateLayout();
		if(lineIndex < 0 || lineIndex > this.__textEngine.numLines - 1) {
			return null;
		}
		var startIndex = -1;
		var endIndex = -1;
		var _g = 0;
		var _g1 = this.__textEngine.layoutGroups;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.lineIndex == lineIndex) {
				if(startIndex == -1) {
					startIndex = group.startIndex;
				}
			} else if(group.lineIndex == lineIndex + 1) {
				endIndex = group.startIndex;
				break;
			}
		}
		if(endIndex == -1) {
			endIndex = this.__textEngine.text.length;
		}
		return this.__textEngine.text.substring(startIndex,endIndex);
	}
	,getParagraphLength: function(charIndex) {
		if(charIndex < 0 || charIndex > this.__textEngine.text.length - 1) {
			return 0;
		}
		var startIndex = this.getFirstCharInParagraph(charIndex);
		var endIndex = this.__textEngine.text.indexOf("\n",charIndex) + 1;
		if(endIndex == 0) {
			endIndex = this.__textEngine.text.length;
		}
		return endIndex - startIndex;
	}
	,getTextFormat: function(beginIndex,endIndex) {
		if(endIndex == null) {
			endIndex = 0;
		}
		if(beginIndex == null) {
			beginIndex = 0;
		}
		var format = null;
		var _g = 0;
		var _g1 = this.__textEngine.textFormatRanges;
		while(_g < _g1.length) {
			var group = _g1[_g];
			++_g;
			if(group.start <= beginIndex && group.end >= beginIndex || group.start <= endIndex && group.end >= endIndex) {
				if(format == null) {
					format = group.format.clone();
				} else {
					if(group.format.font != format.font) {
						format.font = null;
					}
					if(group.format.size != format.size) {
						format.size = null;
					}
					if(group.format.color != format.color) {
						format.color = null;
					}
					if(group.format.bold != format.bold) {
						format.bold = null;
					}
					if(group.format.italic != format.italic) {
						format.italic = null;
					}
					if(group.format.underline != format.underline) {
						format.underline = null;
					}
					if(group.format.url != format.url) {
						format.url = null;
					}
					if(group.format.target != format.target) {
						format.target = null;
					}
					if(group.format.align != format.align) {
						format.align = null;
					}
					if(group.format.leftMargin != format.leftMargin) {
						format.leftMargin = null;
					}
					if(group.format.rightMargin != format.rightMargin) {
						format.rightMargin = null;
					}
					if(group.format.indent != format.indent) {
						format.indent = null;
					}
					if(group.format.leading != format.leading) {
						format.leading = null;
					}
					if(group.format.blockIndent != format.blockIndent) {
						format.blockIndent = null;
					}
					if(group.format.bullet != format.bullet) {
						format.bullet = null;
					}
					if(group.format.kerning != format.kerning) {
						format.kerning = null;
					}
					if(group.format.letterSpacing != format.letterSpacing) {
						format.letterSpacing = null;
					}
					if(group.format.tabStops != format.tabStops) {
						format.tabStops = null;
					}
				}
			}
		}
		return format;
	}
	,replaceSelectedText: function(value) {
		if(value == "" && this.__selectionIndex == this.__caretIndex) {
			return;
		}
		var startIndex = this.__caretIndex < this.__selectionIndex ? this.__caretIndex : this.__selectionIndex;
		this.replaceText(startIndex,this.__caretIndex > this.__selectionIndex ? this.__caretIndex : this.__selectionIndex,value);
		this.__caretIndex = startIndex + value.length;
		this.__selectionIndex = this.__caretIndex;
	}
	,replaceText: function(beginIndex,endIndex,newText) {
		if(endIndex < beginIndex || beginIndex < 0 || endIndex > this.__textEngine.text.length || newText == null) {
			return;
		}
		var tmp = this.__textEngine.text.substring(0,beginIndex) + newText;
		var tmp1 = this.__textEngine.text.substring(endIndex);
		this.__textEngine.text = tmp + tmp1;
		var offset = newText.length - (endIndex - beginIndex);
		var i = 0;
		var range;
		while(i < this.__textEngine.textFormatRanges.length) {
			range = this.__textEngine.textFormatRanges[i];
			if(range.start <= beginIndex && range.end >= endIndex) {
				range.end += offset;
				++i;
			} else if(range.start >= beginIndex && range.end <= endIndex) {
				this.__textEngine.textFormatRanges.splice(i,1);
				offset -= range.end - range.start;
			} else if(range.start > beginIndex && range.start <= endIndex) {
				range.start += offset;
				++i;
			} else {
				++i;
			}
		}
		this.__dirty = true;
		this.__layoutDirty = true;
	}
	,setSelection: function(beginIndex,endIndex) {
		this.__selectionIndex = beginIndex;
		this.__caretIndex = endIndex;
	}
	,setTextFormat: function(format,beginIndex,endIndex) {
		if(endIndex == null) {
			endIndex = 0;
		}
		if(beginIndex == null) {
			beginIndex = 0;
		}
		if(format.font != null) {
			this.__textFormat.font = format.font;
		}
		if(format.size != null) {
			this.__textFormat.size = format.size;
		}
		if(format.color != null) {
			this.__textFormat.color = format.color;
		}
		if(format.bold != null) {
			this.__textFormat.bold = format.bold;
		}
		if(format.italic != null) {
			this.__textFormat.italic = format.italic;
		}
		if(format.underline != null) {
			this.__textFormat.underline = format.underline;
		}
		if(format.url != null) {
			this.__textFormat.url = format.url;
		}
		if(format.target != null) {
			this.__textFormat.target = format.target;
		}
		if(format.align != null) {
			this.__textFormat.align = format.align;
		}
		if(format.leftMargin != null) {
			this.__textFormat.leftMargin = format.leftMargin;
		}
		if(format.rightMargin != null) {
			this.__textFormat.rightMargin = format.rightMargin;
		}
		if(format.indent != null) {
			this.__textFormat.indent = format.indent;
		}
		if(format.leading != null) {
			this.__textFormat.leading = format.leading;
		}
		if(format.blockIndent != null) {
			this.__textFormat.blockIndent = format.blockIndent;
		}
		if(format.bullet != null) {
			this.__textFormat.bullet = format.bullet;
		}
		if(format.kerning != null) {
			this.__textFormat.kerning = format.kerning;
		}
		if(format.letterSpacing != null) {
			this.__textFormat.letterSpacing = format.letterSpacing;
		}
		if(format.tabStops != null) {
			this.__textFormat.tabStops = format.tabStops;
		}
		this.__dirty = true;
		this.__layoutDirty = true;
	}
	,__getBounds: function(rect,matrix) {
		this.__updateLayout();
		var bounds = openfl_geom_Rectangle.__temp;
		this.__textEngine.bounds.__transform(bounds,matrix);
		rect.__expand(bounds.x,bounds.y,bounds.width,bounds.height);
	}
	,__getCursor: function() {
		if(this.__textEngine.selectable) {
			return lime_ui_MouseCursor.TEXT;
		} else {
			return null;
		}
	}
	,__getPosition: function(x,y) {
		this.__updateLayout();
		x += this.get_scrollH();
		var _g1 = 0;
		var _g = this.get_scrollV() - 1;
		while(_g1 < _g) y += this.__textEngine.lineHeights[_g1++];
		if(y > this.__textEngine.textHeight) {
			y = this.__textEngine.textHeight;
		}
		var firstGroup = true;
		var group;
		var nextGroup;
		var _g11 = 0;
		var _g2 = this.__textEngine.layoutGroups.length;
		while(_g11 < _g2) {
			var i = _g11++;
			group = this.__textEngine.layoutGroups[i];
			if(i < this.__textEngine.layoutGroups.length - 1) {
				nextGroup = this.__textEngine.layoutGroups[i + 1];
			} else {
				nextGroup = null;
			}
			if(firstGroup) {
				if(y < group.offsetY) {
					y = group.offsetY;
				}
				if(x < group.offsetX) {
					x = group.offsetX;
				}
				firstGroup = false;
			}
			if(y >= group.offsetY && y <= group.offsetY + group.height || nextGroup == null) {
				if(x >= group.offsetX && x <= group.offsetX + group.width || (nextGroup == null || nextGroup.lineIndex != group.lineIndex)) {
					var advance = 0.0;
					var _g3 = 0;
					var _g21 = group.advances.length;
					while(_g3 < _g21) {
						var i1 = _g3++;
						advance += group.advances[i1];
						if(x <= group.offsetX + advance) {
							if(x <= group.offsetX + (advance - group.advances[i1]) + group.advances[i1] / 2) {
								return group.startIndex + i1;
							} else if(group.startIndex + i1 < group.endIndex) {
								return group.startIndex + i1 + 1;
							} else {
								return group.endIndex;
							}
						}
					}
					return group.endIndex;
				}
			}
		}
		return this.__textEngine.text.length;
	}
	,__hitTest: function(x,y,shapeFlag,stack,interactiveOnly,hitObject) {
		if(!hitObject.get_visible() || this.__isMask || interactiveOnly && !this.mouseEnabled) {
			return false;
		}
		if(this.get_mask() != null && !this.get_mask().__hitTestMask(x,y)) {
			return false;
		}
		this.__getWorldTransform();
		this.__updateLayout();
		var _this = this.__worldTransform;
		var norm = _this.a * _this.d - _this.b * _this.c;
		var _this1 = this.__worldTransform;
		var norm1 = _this1.a * _this1.d - _this1.b * _this1.c;
		if(this.__textEngine.bounds.contains(norm == 0 ? -_this.tx : 1.0 / norm * (_this.c * (_this.ty - y) + _this.d * (x - _this.tx)),norm1 == 0 ? -_this1.ty : 1.0 / norm1 * (_this1.a * (y - _this1.ty) + _this1.b * (_this1.tx - x)))) {
			if(stack != null) {
				stack.push(hitObject);
			}
			return true;
		}
		return false;
	}
	,__hitTestMask: function(x,y) {
		this.__getWorldTransform();
		this.__updateLayout();
		var _this = this.__worldTransform;
		var norm = _this.a * _this.d - _this.b * _this.c;
		var _this1 = this.__worldTransform;
		var norm1 = _this1.a * _this1.d - _this1.b * _this1.c;
		if(this.__textEngine.bounds.contains(norm == 0 ? -_this.tx : 1.0 / norm * (_this.c * (_this.ty - y) + _this.d * (x - _this.tx)),norm1 == 0 ? -_this1.ty : 1.0 / norm1 * (_this1.a * (y - _this1.ty) + _this1.b * (_this1.tx - x)))) {
			return true;
		}
		return false;
	}
	,__renderCairo: function(renderSession) {
		openfl_display_InteractiveObject.prototype.__renderCairo.call(this,renderSession);
	}
	,__renderCanvas: function(renderSession) {
		if(this.__dirty) {
			var textEngine = this.__textEngine;
			this.__updateLayout();
			if((textEngine.text == null || textEngine.text == "") && !textEngine.background && !textEngine.border && !textEngine.__hasFocus || (textEngine.width <= 0 || textEngine.height <= 0) && textEngine.autoSize != 2) {
				this.__graphics.__canvas = null;
				this.__graphics.__context = null;
				this.__graphics.set___dirty(false);
				this.__dirty = false;
			} else {
				var bounds = textEngine.bounds;
				if(this.__graphics == null || this.__graphics.__canvas == null) {
					if(this.__graphics == null) {
						this.__graphics = new openfl_display_Graphics();
					}
					this.__graphics.__canvas = window.document.createElement("canvas");
					this.__graphics.__context = this.__graphics.__canvas.getContext("2d");
					this.__graphics.__bounds = new openfl_geom_Rectangle(0,0,bounds.width,bounds.height);
				}
				var graphics = this.__graphics;
				openfl__$internal_renderer_canvas_CanvasTextField.context = graphics.__context;
				if(textEngine.text != null && textEngine.text != "" || textEngine.__hasFocus) {
					var text = textEngine.text;
					if(textEngine.displayAsPassword) {
						var length = text.length;
						var mask = "";
						var _g1 = 0;
						var _g = length;
						while(_g1 < _g) {
							var i = _g1++;
							mask += "*";
						}
						text = mask;
					}
					graphics.__canvas.width = Math.ceil(bounds.width);
					graphics.__canvas.height = Math.ceil(bounds.height);
					if(textEngine.antiAliasType != 0 || textEngine.gridFitType != 1) {
						graphics.__context.mozImageSmoothingEnabled = true;
						graphics.__context.msImageSmoothingEnabled = true;
						graphics.__context.imageSmoothingEnabled = true;
					} else {
						graphics.__context.mozImageSmoothingEnabled = false;
						graphics.__context.msImageSmoothingEnabled = false;
						graphics.__context.imageSmoothingEnabled = false;
					}
					if(textEngine.border || textEngine.background) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
						if(textEngine.background) {
							var tmp = StringTools.hex(textEngine.backgroundColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp;
							openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
						}
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
							var tmp1 = StringTools.hex(textEngine.borderColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp1;
							openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
						}
					}
					openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline = "top";
					openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign = "start";
					var scrollX = -this.get_scrollH();
					var scrollY = 0.0;
					var _g11 = 0;
					var _g2 = this.get_scrollV() - 1;
					while(_g11 < _g2) {
						var i1 = _g11++;
						scrollY -= textEngine.lineHeights[i1];
					}
					var advance;
					var offsetY = 0.0;
					var applyHack = new EReg("(iPad|iPhone|iPod|Firefox)","g").match(window.navigator.userAgent);
					var _g3 = 0;
					var _g12 = textEngine.layoutGroups;
					while(_g3 < _g12.length) {
						var group = _g12[_g3];
						++_g3;
						if(group.lineIndex < this.get_scrollV() - 1) {
							continue;
						}
						if(group.lineIndex > this.get_scrollV() + textEngine.bottomScrollV - 2) {
							break;
						}
						openfl__$internal_renderer_canvas_CanvasTextField.context.font = openfl__$internal_text_TextEngine.getFont(group.format);
						var tmp2 = StringTools.hex(group.format.color,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp2;
						if(applyHack) {
							offsetY = group.format.size * 0.185;
						}
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
						if(this.__caretIndex > -1 && textEngine.selectable) {
							if(this.__selectionIndex == this.__caretIndex) {
								if(this.__showCursor && group.startIndex <= this.__caretIndex && group.endIndex >= this.__caretIndex) {
									advance = 0.0;
									var _g31 = 0;
									var _g21 = this.__caretIndex - group.startIndex;
									while(_g31 < _g21) {
										var i2 = _g31++;
										if(group.advances.length <= i2) {
											break;
										}
										advance += group.advances[i2];
									}
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(group.offsetX + advance,group.offsetY,1,group.height);
								}
							} else if(group.startIndex <= this.__caretIndex && group.endIndex >= this.__caretIndex || group.startIndex <= this.__selectionIndex && group.endIndex >= this.__selectionIndex) {
								var selectionStart = Math.min(this.__selectionIndex,this.__caretIndex) | 0;
								var selectionEnd = Math.max(this.__selectionIndex,this.__caretIndex) | 0;
								if(group.startIndex > selectionStart) {
									selectionStart = group.startIndex;
								}
								if(group.endIndex < selectionEnd) {
									selectionEnd = group.endIndex;
								}
								var start;
								var end;
								start = this.getCharBoundaries(selectionStart);
								if(selectionEnd >= textEngine.text.length) {
									end = this.getCharBoundaries(textEngine.text.length - 1);
									end.x += end.width + 2;
								} else {
									end = this.getCharBoundaries(selectionEnd);
								}
								if(start != null && end != null) {
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#000000";
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(start.x,start.y,end.x - start.x,group.height);
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#FFFFFF";
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(selectionStart,selectionEnd),scrollX + start.x,group.offsetY + offsetY + scrollY);
								}
							}
						}
					}
				} else {
					graphics.__canvas.width = Math.ceil(bounds.width);
					graphics.__canvas.height = Math.ceil(bounds.height);
					if(textEngine.border || textEngine.background) {
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
						} else {
							openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,bounds.width,bounds.height);
						}
						if(textEngine.background) {
							var tmp3 = StringTools.hex(textEngine.backgroundColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp3;
							openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
						}
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap = "square";
							var tmp4 = StringTools.hex(textEngine.borderColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp4;
							openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
						}
					}
				}
				graphics.__bitmap = openfl_display_BitmapData.fromCanvas(this.__graphics.__canvas);
				this.__dirty = false;
				graphics.set___dirty(false);
			}
		}
		if(this.__textEngine.antiAliasType == 0 && this.__textEngine.gridFitType == 1) {
			var smoothingEnabled = renderSession.context.imageSmoothingEnabled;
			if(smoothingEnabled) {
				renderSession.context.mozImageSmoothingEnabled = false;
				renderSession.context.msImageSmoothingEnabled = false;
				renderSession.context.imageSmoothingEnabled = false;
			}
			openfl_display_InteractiveObject.prototype.__renderCanvas.call(this,renderSession);
			if(smoothingEnabled) {
				renderSession.context.mozImageSmoothingEnabled = true;
				renderSession.context.msImageSmoothingEnabled = true;
				renderSession.context.imageSmoothingEnabled = true;
			}
		} else {
			openfl_display_InteractiveObject.prototype.__renderCanvas.call(this,renderSession);
		}
	}
	,__renderDOM: function(renderSession) {
		var textField = this;
		var textEngine = textField.__textEngine;
		if(textField.stage != null && textField.__worldVisible && textField.__renderable) {
			if(textField.__dirty || textField.__div == null) {
				if(textEngine.text != "" || textEngine.background || textEngine.border || textEngine.type == 1) {
					if(textField.__div == null) {
						textField.__div = window.document.createElement("div");
						openfl__$internal_renderer_dom_DOMRenderer.initializeElement(textField,textField.__div,renderSession);
						textField.__style.setProperty("outline","none",null);
						textField.__div.addEventListener("input",function(event) {
							event.preventDefault();
							if(textField.get_htmlText() != textField.__div.innerHTML) {
								textField.set_htmlText(textField.__div.innerHTML);
								textField.__dirty = false;
							}
						},true);
					}
					if(textEngine.selectable) {
						textField.__style.setProperty("cursor","text",null);
					} else {
						textField.__style.setProperty("cursor","inherit",null);
					}
					textField.__div.contentEditable = textEngine.type == 1;
					var style = textField.__style;
					textField.__div.innerHTML = textEngine.text;
					if(textEngine.background) {
						style.setProperty("background-color","#" + StringTools.hex(textEngine.backgroundColor,6),null);
					} else {
						style.removeProperty("background-color");
					}
					if(textEngine.border) {
						style.setProperty("border","solid 1px #" + StringTools.hex(textEngine.borderColor,6),null);
					} else {
						style.removeProperty("border");
					}
					style.setProperty("font",openfl__$internal_text_TextEngine.getFont(textField.__textFormat),null);
					style.setProperty("color","#" + StringTools.hex(textField.__textFormat.color,6),null);
					if(textEngine.autoSize != 2) {
						style.setProperty("width","auto",null);
					} else {
						style.setProperty("width",textEngine.width + "px",null);
					}
					style.setProperty("height",textEngine.height + "px",null);
					switch(textField.__textFormat.align) {
					case 0:
						style.setProperty("text-align","center",null);
						break;
					case 4:
						style.setProperty("text-align","right",null);
						break;
					default:
						style.setProperty("text-align","left",null);
					}
					textField.__dirty = false;
				} else if(textField.__div != null) {
					renderSession.element.removeChild(textField.__div);
					textField.__div = null;
				}
			}
			if(textField.__div != null) {
				openfl__$internal_renderer_dom_DOMRenderer.applyStyle(textField,renderSession,true,true,false);
			}
		} else if(textField.__div != null) {
			renderSession.element.removeChild(textField.__div);
			textField.__div = null;
			textField.__style = null;
		}
	}
	,__renderGL: function(renderSession) {
		if(this.__cacheAsBitmap) {
			var x = this.__cachedBitmapBounds.x;
			var y = this.__cachedBitmapBounds.y;
			var w = this.__cachedBitmapBounds.width;
			var h = this.__cachedBitmapBounds.height;
			if(this.__cacheGLMatrix == null) {
				this.__cacheGLMatrix = new openfl_geom_Matrix();
			}
			if(this.__cacheAsBitmapMatrix != null) {
				var bmpBounds = openfl_geom_Rectangle.__temp;
				this.__cachedBitmapBounds.__transform(bmpBounds,this.__cacheAsBitmapMatrix);
				x = bmpBounds.x;
				y = bmpBounds.y;
				w = bmpBounds.width;
				h = bmpBounds.height;
				this.__cacheGLMatrix = this.__cacheAsBitmapMatrix.clone();
			} else {
				this.__cacheGLMatrix.identity();
			}
			if(!(w <= 0 && h <= 0)) {
				if(this.__updateCachedBitmap || this.__updateFilters) {
					if(this.__cachedFilterBounds != null) {
						w += Math.abs(this.__cachedFilterBounds.x) + Math.abs(this.__cachedFilterBounds.width);
						h += Math.abs(this.__cachedFilterBounds.y) + Math.abs(this.__cachedFilterBounds.height);
					}
					if(this.__cachedBitmap == null) {
						this.__cachedBitmap = openfl_display_BitmapData.__asRenderTexture();
					}
					this.__cachedBitmap.__resize(Math.ceil(w),Math.ceil(h));
					var m = this.__cacheGLMatrix.clone();
					m.translate(-x,-y);
					var shader = this.__shader;
					this.__shader = null;
					this.__cachedBitmap.__drawGL(renderSession,this,m,null,null,null,true,false,true);
					this.__shader = shader;
					this.__updateCachedBitmap = false;
				}
				if(this.__updateFilters) {
					openfl_filters_BitmapFilter.__applyFilters(this.__filters,renderSession,this.__cachedBitmap,this.__cachedBitmap,null,null);
					this.__updateFilters = false;
				}
				this.__cacheGLMatrix.invert();
				var _this = this.__cacheGLMatrix;
				_this.tx = x * _this.a + y * _this.c + _this.tx;
				_this.ty = x * _this.b + y * _this.d + _this.ty;
				this.__cacheGLMatrix.concat(this.__renderTransform);
				this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);
				renderSession.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,0);
			}
			return;
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.pushRect(this.__scrollRect,this.__renderTransform);
		}
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.pushMask(this);
		}
		if(this.__dirty) {
			var textEngine = this.__textEngine;
			this.__updateLayout();
			if((textEngine.text == null || textEngine.text == "") && !textEngine.background && !textEngine.border && !textEngine.__hasFocus || (textEngine.width <= 0 || textEngine.height <= 0) && textEngine.autoSize != 2) {
				this.__graphics.__canvas = null;
				this.__graphics.__context = null;
				this.__graphics.set___dirty(false);
				this.__dirty = false;
			} else {
				var bounds = textEngine.bounds;
				if(this.__graphics == null || this.__graphics.__canvas == null) {
					if(this.__graphics == null) {
						this.__graphics = new openfl_display_Graphics();
					}
					this.__graphics.__canvas = window.document.createElement("canvas");
					this.__graphics.__context = this.__graphics.__canvas.getContext("2d");
					this.__graphics.__bounds = new openfl_geom_Rectangle(0,0,bounds.width,bounds.height);
				}
				var graphics = this.__graphics;
				openfl__$internal_renderer_canvas_CanvasTextField.context = graphics.__context;
				if(textEngine.text != null && textEngine.text != "" || textEngine.__hasFocus) {
					var text = textEngine.text;
					if(textEngine.displayAsPassword) {
						var mask = "";
						var _g1 = 0;
						var _g = text.length;
						while(_g1 < _g) {
							_g1++;
							mask += "*";
						}
						text = mask;
					}
					graphics.__canvas.width = Math.ceil(bounds.width);
					graphics.__canvas.height = Math.ceil(bounds.height);
					if(textEngine.antiAliasType != 0 || textEngine.gridFitType != 1) {
						graphics.__context.mozImageSmoothingEnabled = true;
						graphics.__context.msImageSmoothingEnabled = true;
						graphics.__context.imageSmoothingEnabled = true;
					} else {
						graphics.__context.mozImageSmoothingEnabled = false;
						graphics.__context.msImageSmoothingEnabled = false;
						graphics.__context.imageSmoothingEnabled = false;
					}
					if(textEngine.border || textEngine.background) {
						openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
						if(textEngine.background) {
							var tmp = StringTools.hex(textEngine.backgroundColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp;
							openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
						}
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
							var tmp1 = StringTools.hex(textEngine.borderColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp1;
							openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
						}
					}
					openfl__$internal_renderer_canvas_CanvasTextField.context.textBaseline = "top";
					openfl__$internal_renderer_canvas_CanvasTextField.context.textAlign = "start";
					var scrollX = -this.get_scrollH();
					var scrollY = 0.0;
					var _g11 = 0;
					var _g2 = this.get_scrollV() - 1;
					while(_g11 < _g2) scrollY -= textEngine.lineHeights[_g11++];
					var advance;
					var offsetY = 0.0;
					var applyHack = new EReg("(iPad|iPhone|iPod|Firefox)","g").match(window.navigator.userAgent);
					var _g3 = 0;
					var _g12 = textEngine.layoutGroups;
					while(_g3 < _g12.length) {
						var group = _g12[_g3];
						++_g3;
						if(group.lineIndex < this.get_scrollV() - 1) {
							continue;
						}
						if(group.lineIndex > this.get_scrollV() + textEngine.bottomScrollV - 2) {
							break;
						}
						openfl__$internal_renderer_canvas_CanvasTextField.context.font = openfl__$internal_text_TextEngine.getFont(group.format);
						var tmp2 = StringTools.hex(group.format.color,6);
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp2;
						if(applyHack) {
							offsetY = group.format.size * 0.185;
						}
						openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(group.startIndex,group.endIndex),group.offsetX + scrollX,group.offsetY + offsetY + scrollY);
						if(this.__caretIndex > -1 && textEngine.selectable) {
							if(this.__selectionIndex == this.__caretIndex) {
								if(this.__showCursor && group.startIndex <= this.__caretIndex && group.endIndex >= this.__caretIndex) {
									advance = 0.0;
									var _g31 = 0;
									var _g21 = this.__caretIndex - group.startIndex;
									while(_g31 < _g21) {
										var i = _g31++;
										if(group.advances.length <= i) {
											break;
										}
										advance += group.advances[i];
									}
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(group.offsetX + advance,group.offsetY,1,group.height);
								}
							} else if(group.startIndex <= this.__caretIndex && group.endIndex >= this.__caretIndex || group.startIndex <= this.__selectionIndex && group.endIndex >= this.__selectionIndex) {
								var selectionStart = Math.min(this.__selectionIndex,this.__caretIndex) | 0;
								var selectionEnd = Math.max(this.__selectionIndex,this.__caretIndex) | 0;
								if(group.startIndex > selectionStart) {
									selectionStart = group.startIndex;
								}
								if(group.endIndex < selectionEnd) {
									selectionEnd = group.endIndex;
								}
								var start;
								var end;
								start = this.getCharBoundaries(selectionStart);
								if(selectionEnd >= textEngine.text.length) {
									end = this.getCharBoundaries(textEngine.text.length - 1);
									end.x += end.width + 2;
								} else {
									end = this.getCharBoundaries(selectionEnd);
								}
								if(start != null && end != null) {
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#000000";
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillRect(start.x,start.y,end.x - start.x,group.height);
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#FFFFFF";
									openfl__$internal_renderer_canvas_CanvasTextField.context.fillText(text.substring(selectionStart,selectionEnd),scrollX + start.x,group.offsetY + offsetY + scrollY);
								}
							}
						}
					}
				} else {
					graphics.__canvas.width = Math.ceil(bounds.width);
					graphics.__canvas.height = Math.ceil(bounds.height);
					if(textEngine.border || textEngine.background) {
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0.5,0.5,bounds.width - 1,bounds.height - 1);
						} else {
							openfl__$internal_renderer_canvas_CanvasTextField.context.rect(0,0,bounds.width,bounds.height);
						}
						if(textEngine.background) {
							var tmp3 = StringTools.hex(textEngine.backgroundColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.fillStyle = "#" + tmp3;
							openfl__$internal_renderer_canvas_CanvasTextField.context.fill();
						}
						if(textEngine.border) {
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineWidth = 1;
							openfl__$internal_renderer_canvas_CanvasTextField.context.lineCap = "square";
							var tmp4 = StringTools.hex(textEngine.borderColor,6);
							openfl__$internal_renderer_canvas_CanvasTextField.context.strokeStyle = "#" + tmp4;
							openfl__$internal_renderer_canvas_CanvasTextField.context.stroke();
						}
					}
				}
				graphics.__bitmap = openfl_display_BitmapData.fromCanvas(this.__graphics.__canvas);
				this.__dirty = false;
				graphics.set___dirty(false);
			}
		}
		openfl__$internal_renderer_opengl_GLRenderer.renderBitmap(this,renderSession,this.__textEngine.antiAliasType != 0 || this.__textEngine.gridFitType != 1);
		if(this.__mask != null && this.__maskGraphics != null && this.__maskGraphics.__commands.get_length() > 0) {
			renderSession.maskManager.popMask();
		}
		if(this.__scrollRect != null) {
			renderSession.maskManager.popRect();
		}
	}
	,__startCursorTimer: function() {
		this.__cursorTimer = haxe_Timer.delay($bind(this,this.__startCursorTimer),600);
		this.__showCursor = !this.__showCursor;
		this.__dirty = true;
	}
	,__startTextInput: function() {
		if(this.__caretIndex < 0) {
			this.__caretIndex = this.__textEngine.text.length;
			this.__selectionIndex = this.__caretIndex;
		}
		if(this.stage != null) {
			this.stage.window.backend.setEnableTextEvents(true);
			if(!this.__inputEnabled) {
				this.stage.window.backend.setEnableTextEvents(true);
				if(!this.stage.window.onTextInput.has($bind(this,this.window_onTextInput))) {
					this.stage.window.onTextInput.add($bind(this,this.window_onTextInput));
					this.stage.window.onKeyDown.add($bind(this,this.window_onKeyDown));
				}
				this.__inputEnabled = true;
				this.__startCursorTimer();
			}
		}
	}
	,__stopCursorTimer: function() {
		if(this.__cursorTimer != null) {
			this.__cursorTimer.stop();
			this.__cursorTimer = null;
		}
		if(this.__showCursor) {
			this.__showCursor = false;
			this.__dirty = true;
		}
	}
	,__stopTextInput: function() {
		if(this.__inputEnabled && this.stage != null) {
			this.stage.window.backend.setEnableTextEvents(false);
			this.stage.window.onTextInput.remove($bind(this,this.window_onTextInput));
			this.stage.window.onKeyDown.remove($bind(this,this.window_onKeyDown));
			this.__inputEnabled = false;
			this.__stopCursorTimer();
		}
	}
	,__updateLayout: function() {
		if(this.__layoutDirty) {
			this.__textEngine.update();
			if(this.__textEngine.autoSize != 2) {
				var cacheWidth = this.__textEngine.width;
				switch(this.__textEngine.autoSize) {
				case 0:case 1:case 3:
					if(!this.__textEngine.wordWrap) {
						this.__textEngine.width = this.__textEngine.textWidth + 4;
					}
					this.__textEngine.height = this.__textEngine.textHeight + 4;
					break;
				default:
				}
				if(this.__textEngine.width != cacheWidth) {
					switch(this.__textEngine.autoSize) {
					case 0:
						var _g1 = this;
						_g1.set_x(_g1.get_x() + (cacheWidth - this.__textEngine.width) / 2);
						break;
					case 3:
						var _g11 = this;
						_g11.set_x(_g11.get_x() + (cacheWidth - this.__textEngine.width));
						break;
					default:
					}
				}
				this.__textEngine.getBounds();
			}
			this.__layoutDirty = false;
		}
	}
	,get_antiAliasType: function() {
		return this.__textEngine.antiAliasType;
	}
	,set_antiAliasType: function(value) {
		return this.__textEngine.antiAliasType = value;
	}
	,get_autoSize: function() {
		return this.__textEngine.autoSize;
	}
	,set_autoSize: function(value) {
		if(value != this.__textEngine.autoSize) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.autoSize = value;
	}
	,get_background: function() {
		return this.__textEngine.background;
	}
	,set_background: function(value) {
		if(value != this.__textEngine.background) {
			this.__dirty = true;
		}
		return this.__textEngine.background = value;
	}
	,get_backgroundColor: function() {
		return this.__textEngine.backgroundColor;
	}
	,set_backgroundColor: function(value) {
		if(value != this.__textEngine.backgroundColor) {
			this.__dirty = true;
		}
		return this.__textEngine.backgroundColor = value;
	}
	,get_border: function() {
		return this.__textEngine.border;
	}
	,set_border: function(value) {
		if(value != this.__textEngine.border) {
			this.__dirty = true;
		}
		return this.__textEngine.border = value;
	}
	,get_borderColor: function() {
		return this.__textEngine.borderColor;
	}
	,set_borderColor: function(value) {
		if(value != this.__textEngine.borderColor) {
			this.__dirty = true;
		}
		return this.__textEngine.borderColor = value;
	}
	,get_bottomScrollV: function() {
		this.__updateLayout();
		return this.__textEngine.bottomScrollV;
	}
	,get_caretIndex: function() {
		return this.__caretIndex;
	}
	,get_defaultTextFormat: function() {
		return this.__textFormat.clone();
	}
	,set_defaultTextFormat: function(value) {
		this.__textFormat.__merge(value);
		this.__layoutDirty = true;
		this.__dirty = true;
		return value;
	}
	,get_displayAsPassword: function() {
		return this.__textEngine.displayAsPassword;
	}
	,set_displayAsPassword: function(value) {
		if(value != this.__textEngine.displayAsPassword) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.displayAsPassword = value;
	}
	,get_embedFonts: function() {
		return this.__textEngine.embedFonts;
	}
	,set_embedFonts: function(value) {
		return this.__textEngine.embedFonts = value;
	}
	,get_gridFitType: function() {
		return this.__textEngine.gridFitType;
	}
	,set_gridFitType: function(value) {
		return this.__textEngine.gridFitType = value;
	}
	,get_height: function() {
		this.__updateLayout();
		return this.__textEngine.height;
	}
	,set_height: function(value) {
		if(this.get_scaleY() != 1 || value != this.__textEngine.height) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		this.set_scaleY(1);
		return this.__textEngine.height = value;
	}
	,get_htmlText: function() {
		return this.__textEngine.text;
	}
	,set_htmlText: function(value) {
		if(!this.__isHTML || this.__textEngine.text != value) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		this.__isHTML = true;
		if(this.__div == null) {
			var _this_r = new RegExp("<br>","g".split("u").join(""));
			value = value.replace(_this_r,"\n");
			var _this_r1 = new RegExp("<br/>","g".split("u").join(""));
			value = value.replace(_this_r1,"\n");
			var segments = value.split("<font");
			if(segments.length == 1) {
				var _this_r2 = new RegExp("<.*?>","g".split("u").join(""));
				value = value.replace(_this_r2,"");
				if(this.__textEngine.textFormatRanges.length > 1) {
					this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.length - 1);
				}
				var range = this.__textEngine.textFormatRanges[0];
				range.format = this.__textFormat;
				range.start = 0;
				range.end = value.length;
				return this.__textEngine.text = value;
			} else {
				this.__textEngine.textFormatRanges.splice(0,this.__textEngine.textFormatRanges.length);
				value = "";
				var _g = 0;
				while(_g < segments.length) {
					var segment = segments[_g];
					++_g;
					if(segment == "") {
						continue;
					}
					var closeFontIndex = segment.indexOf("</font>");
					if(closeFontIndex > -1) {
						var start = segment.indexOf(">") + 1;
						var format = this.__textFormat.clone();
						var faceIndex = segment.indexOf("face=");
						var colorIndex = segment.indexOf("color=");
						var sizeIndex = segment.indexOf("size=");
						if(faceIndex > -1 && faceIndex < start) {
							format.font = HxOverrides.substr(segment,faceIndex + 6,segment.indexOf("\"",faceIndex));
						}
						if(colorIndex > -1 && colorIndex < start) {
							format.color = Std.parseInt("0x" + HxOverrides.substr(segment,colorIndex + 8,6));
						}
						if(sizeIndex > -1 && sizeIndex < start) {
							format.size = Std.parseInt(HxOverrides.substr(segment,sizeIndex + 6,segment.indexOf("\"",sizeIndex)));
						}
						var sub = segment.substring(start,closeFontIndex);
						var _this_r3 = new RegExp("<.*?>","g".split("u").join(""));
						sub = sub.replace(_this_r3,"");
						this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(format,value.length,value.length + sub.length));
						value += sub;
						if(closeFontIndex + 7 < segment.length) {
							sub = HxOverrides.substr(segment,closeFontIndex + 7,null);
							this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(this.__textFormat,value.length,value.length + sub.length));
							value += sub;
						}
					} else {
						this.__textEngine.textFormatRanges.push(new openfl__$internal_text_TextFormatRange(this.__textFormat,value.length,value.length + segment.length));
						value += segment;
					}
				}
			}
		}
		return this.__textEngine.text = value;
	}
	,get_length: function() {
		if(this.__textEngine.text != null) {
			return this.__textEngine.text.length;
		}
		return 0;
	}
	,get_maxChars: function() {
		return this.__textEngine.maxChars;
	}
	,set_maxChars: function(value) {
		if(value != this.__textEngine.maxChars) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.maxChars = value;
	}
	,get_maxScrollH: function() {
		this.__updateLayout();
		return this.__textEngine.maxScrollH;
	}
	,get_maxScrollV: function() {
		this.__updateLayout();
		return this.__textEngine.maxScrollV;
	}
	,get_multiline: function() {
		return this.__textEngine.multiline;
	}
	,set_multiline: function(value) {
		if(value != this.__textEngine.multiline) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.multiline = value;
	}
	,get_numLines: function() {
		this.__updateLayout();
		return this.__textEngine.numLines;
	}
	,get_restrict: function() {
		return this.__textEngine.restrict;
	}
	,set_restrict: function(value) {
		return this.__textEngine.restrict = value;
	}
	,get_scrollH: function() {
		return this.__textEngine.scrollH;
	}
	,set_scrollH: function(value) {
		if(value > this.__textEngine.maxScrollH) {
			value = this.__textEngine.maxScrollH;
		}
		if(value < 0) {
			value = 0;
		}
		if(value != this.__textEngine.scrollH) {
			this.__dirty = true;
		}
		return this.__textEngine.scrollH = value;
	}
	,get_scrollV: function() {
		return this.__textEngine.scrollV;
	}
	,set_scrollV: function(value) {
		if(value > this.__textEngine.maxScrollV) {
			value = this.__textEngine.maxScrollV;
		}
		if(value < 1) {
			value = 1;
		}
		if(value != this.__textEngine.scrollV) {
			this.__dirty = true;
		}
		return this.__textEngine.scrollV = value;
	}
	,get_selectable: function() {
		return this.__textEngine.selectable;
	}
	,set_selectable: function(value) {
		if(value != this.__textEngine.selectable && this.get_type() == 1) {
			if(this.stage != null && this.stage.get_focus() == this) {
				this.__startTextInput();
			} else if(!value) {
				this.__stopTextInput();
			}
		}
		return this.__textEngine.selectable = value;
	}
	,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(value) {
		if(value != this.__textEngine.sharpness) {
			this.__dirty = true;
		}
		return this.__textEngine.sharpness = value;
	}
	,get_text: function() {
		return this.__textEngine.text;
	}
	,set_text: function(value) {
		if(this.__isHTML || this.__textEngine.text != value) {
			this.__dirty = true;
			this.__layoutDirty = true;
		} else {
			return value;
		}
		if(this.__textEngine.textFormatRanges.length > 1) {
			this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.length - 1);
		}
		var range = this.__textEngine.textFormatRanges[0];
		range.format = this.__textFormat;
		range.start = 0;
		range.end = value.length;
		this.__isHTML = false;
		return this.__textEngine.text = value;
	}
	,get_textColor: function() {
		return this.__textFormat.color;
	}
	,set_textColor: function(value) {
		if(value != this.__textFormat.color) {
			this.__dirty = true;
		}
		var _g = 0;
		var _g1 = this.__textEngine.textFormatRanges;
		while(_g < _g1.length) {
			var range = _g1[_g];
			++_g;
			range.format.color = value;
		}
		return this.__textFormat.color = value;
	}
	,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(value) {
		if(value != this.__textEngine.type) {
			if(value == 1) {
				this.addEventListener("focusIn",$bind(this,this.this_onFocusIn));
				this.addEventListener("focusOut",$bind(this,this.this_onFocusOut));
				this.addEventListener("addedToStage",$bind(this,this.this_onAddedToStage));
				this.this_onFocusIn(null);
			} else {
				this.removeEventListener("focusIn",$bind(this,this.this_onFocusIn));
				this.removeEventListener("focusOut",$bind(this,this.this_onFocusOut));
				this.removeEventListener("addedToStage",$bind(this,this.this_onAddedToStage));
				this.__stopTextInput();
			}
			this.__dirty = true;
		}
		return this.__textEngine.type = value;
	}
	,get_width: function() {
		this.__updateLayout();
		return this.__textEngine.width;
	}
	,set_width: function(value) {
		if(this.get_scaleX() != 1 || this.__textEngine.width != value) {
			if(!this.__transformDirty) {
				this.__transformDirty = true;
				openfl_display_DisplayObject.__worldTransformDirty++;
			}
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		this.set_scaleX(1);
		return this.__textEngine.width = value;
	}
	,get_wordWrap: function() {
		return this.__textEngine.wordWrap;
	}
	,set_wordWrap: function(value) {
		if(value != this.__textEngine.wordWrap) {
			this.__dirty = true;
			this.__layoutDirty = true;
		}
		return this.__textEngine.wordWrap = value;
	}
	,stage_onMouseMove: function(event) {
		if(this.stage == null) {
			return;
		}
		if(this.__textEngine.selectable && this.__selectionIndex >= 0) {
			this.__updateLayout();
			var position = this.__getPosition(this.get_mouseX(),this.get_mouseY());
			if(position != this.__caretIndex) {
				this.__caretIndex = position;
				this.__dirty = true;
			}
		}
	}
	,stage_onMouseUp: function(event) {
		if(this.stage == null) {
			return;
		}
		this.stage.removeEventListener("mouseMove",$bind(this,this.stage_onMouseMove));
		this.stage.removeEventListener("mouseUp",$bind(this,this.stage_onMouseUp));
		if(this.stage.get_focus() == this) {
			this.__getWorldTransform();
			this.__updateLayout();
			var upPos = this.__getPosition(this.get_mouseX(),this.get_mouseY());
			var leftPos;
			var rightPos;
			leftPos = Math.min(this.__selectionIndex,upPos) | 0;
			rightPos = Math.max(this.__selectionIndex,upPos) | 0;
			this.__selectionIndex = leftPos;
			this.__caretIndex = rightPos;
			if(this.__inputEnabled) {
				this.this_onFocusIn(null);
				this.__stopCursorTimer();
				this.__startCursorTimer();
			}
		}
	}
	,this_onAddedToStage: function(event) {
		this.this_onFocusIn(null);
	}
	,this_onFocusIn: function(event) {
		if(this.get_selectable() && this.get_type() == 1 && this.stage != null && this.stage.get_focus() == this) {
			this.__startTextInput();
		}
	}
	,this_onFocusOut: function(event) {
		this.__stopTextInput();
	}
	,this_onMouseDown: function(event) {
		if(!this.get_selectable()) {
			return;
		}
		this.__updateLayout();
		this.__caretIndex = this.__getPosition(this.get_mouseX(),this.get_mouseY());
		this.__selectionIndex = this.__caretIndex;
		this.__dirty = true;
		this.stage.addEventListener("mouseMove",$bind(this,this.stage_onMouseMove));
		this.stage.addEventListener("mouseUp",$bind(this,this.stage_onMouseUp));
	}
	,window_onKeyDown: function(key,modifier) {
		switch(key) {
		case 8:
			if(this.__selectionIndex == this.__caretIndex && this.__caretIndex > 0) {
				this.__selectionIndex = this.__caretIndex - 1;
			}
			if(this.__selectionIndex != this.__caretIndex) {
				this.replaceSelectedText("");
				this.__selectionIndex = this.__caretIndex;
				this.dispatchEvent(new openfl_events_Event("change",true));
			}
			break;
		case 99:
			if(modifier == 64 || modifier == 128) {
				this.__textEngine.text.substring(this.__caretIndex,this.__selectionIndex);
			}
			break;
		case 118:
			if(modifier == 64 || modifier == 128) {
				var text = lime_system_Clipboard.get_text();
				if(text != null) {
					this.replaceSelectedText(text);
				} else {
					this.replaceSelectedText("");
				}
				this.dispatchEvent(new openfl_events_Event("change",true));
			} else {
				this.__textEngine.textFormatRanges[this.__textEngine.textFormatRanges.length - 1].end = this.__textEngine.text.length;
			}
			break;
		case 120:
			if(modifier == 64 || modifier == 128) {
				this.__textEngine.text.substring(this.__caretIndex,this.__selectionIndex);
				if(this.__caretIndex != this.__selectionIndex) {
					this.replaceSelectedText("");
					this.dispatchEvent(new openfl_events_Event("change",true));
				}
			}
			break;
		case 127:
			if(this.__selectionIndex == this.__caretIndex && this.__caretIndex < this.__textEngine.text.length) {
				this.__selectionIndex = this.__caretIndex + 1;
			}
			if(this.__selectionIndex != this.__caretIndex) {
				this.replaceSelectedText("");
				this.__selectionIndex = this.__caretIndex;
				this.dispatchEvent(new openfl_events_Event("change",true));
			}
			break;
		case 1073741903:
			if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier)) {
				if(this.__caretIndex < this.__textEngine.text.length) {
					this.__caretIndex++;
				}
			} else {
				if(this.__selectionIndex == this.__caretIndex) {
					if(this.__caretIndex < this.__textEngine.text.length) {
						this.__caretIndex++;
					}
				} else {
					this.__caretIndex = Math.max(this.__caretIndex,this.__selectionIndex) | 0;
				}
				this.__selectionIndex = this.__caretIndex;
			}
			this.__stopCursorTimer();
			this.__startCursorTimer();
			break;
		case 1073741904:
			if(lime_ui__$KeyModifier_KeyModifier_$Impl_$.get_shiftKey(modifier)) {
				if(this.__caretIndex > 0) {
					this.__caretIndex--;
				}
			} else {
				if(this.__selectionIndex == this.__caretIndex) {
					if(this.__caretIndex > 0) {
						this.__caretIndex--;
					}
				} else {
					this.__caretIndex = Math.min(this.__caretIndex,this.__selectionIndex) | 0;
				}
				this.__selectionIndex = this.__caretIndex;
			}
			this.__stopCursorTimer();
			this.__startCursorTimer();
			break;
		default:
		}
	}
	,window_onTextInput: function(value) {
		this.replaceSelectedText(value);
		this.dispatchEvent(new openfl_events_Event("change",true));
	}
	,__class__: openfl_text_TextField
	,__properties__: $extend(openfl_display_InteractiveObject.prototype.__properties__,{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_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",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 openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$ = {};
$hxClasses["openfl.text._TextFieldAutoSize.TextFieldAutoSize_Impl_"] = openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.__name__ = ["openfl","text","_TextFieldAutoSize","TextFieldAutoSize_Impl_"];
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.fromString = function(value) {
	switch(value) {
	case "center":
		return 0;
	case "left":
		return 1;
	case "none":
		return 2;
	case "right":
		return 3;
	default:
		return null;
	}
};
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "center";
	case 1:
		return "left";
	case 2:
		return "none";
	case 3:
		return "right";
	default:
		return null;
	}
};
var openfl_text__$TextFieldType_TextFieldType_$Impl_$ = {};
$hxClasses["openfl.text._TextFieldType.TextFieldType_Impl_"] = openfl_text__$TextFieldType_TextFieldType_$Impl_$;
openfl_text__$TextFieldType_TextFieldType_$Impl_$.__name__ = ["openfl","text","_TextFieldType","TextFieldType_Impl_"];
openfl_text__$TextFieldType_TextFieldType_$Impl_$.fromString = function(value) {
	switch(value) {
	case "dynamic":
		return 0;
	case "input":
		return 1;
	default:
		return null;
	}
};
openfl_text__$TextFieldType_TextFieldType_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "dynamic";
	case 1:
		return "input";
	default:
		return null;
	}
};
var openfl_text_TextFormat = function(font,size,color,bold,italic,underline,url,target,align,leftMargin,rightMargin,indent,leading) {
	this.font = font;
	this.size = size;
	this.color = color;
	this.bold = bold;
	this.italic = italic;
	this.underline = underline;
	this.url = url;
	this.target = target;
	this.align = align;
	this.leftMargin = leftMargin;
	this.rightMargin = rightMargin;
	this.indent = indent;
	this.leading = leading;
};
$hxClasses["openfl.text.TextFormat"] = openfl_text_TextFormat;
openfl_text_TextFormat.__name__ = ["openfl","text","TextFormat"];
openfl_text_TextFormat.prototype = {
	clone: function() {
		var newFormat = new openfl_text_TextFormat(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.url,this.target);
		newFormat.align = this.align;
		newFormat.leftMargin = this.leftMargin;
		newFormat.rightMargin = this.rightMargin;
		newFormat.indent = this.indent;
		newFormat.leading = this.leading;
		newFormat.blockIndent = this.blockIndent;
		newFormat.bullet = this.bullet;
		newFormat.kerning = this.kerning;
		newFormat.letterSpacing = this.letterSpacing;
		newFormat.tabStops = this.tabStops;
		return newFormat;
	}
	,__merge: function(format) {
		if(format.font != null) {
			this.font = format.font;
		}
		if(format.size != null) {
			this.size = format.size;
		}
		if(format.color != null) {
			this.color = format.color;
		}
		if(format.bold != null) {
			this.bold = format.bold;
		}
		if(format.italic != null) {
			this.italic = format.italic;
		}
		if(format.underline != null) {
			this.underline = format.underline;
		}
		if(format.url != null) {
			this.url = format.url;
		}
		if(format.target != null) {
			this.target = format.target;
		}
		if(format.align != null) {
			this.align = format.align;
		}
		if(format.leftMargin != null) {
			this.leftMargin = format.leftMargin;
		}
		if(format.rightMargin != null) {
			this.rightMargin = format.rightMargin;
		}
		if(format.indent != null) {
			this.indent = format.indent;
		}
		if(format.leading != null) {
			this.leading = format.leading;
		}
		if(format.blockIndent != null) {
			this.blockIndent = format.blockIndent;
		}
		if(format.bullet != null) {
			this.bullet = format.bullet;
		}
		if(format.kerning != null) {
			this.kerning = format.kerning;
		}
		if(format.letterSpacing != null) {
			this.letterSpacing = format.letterSpacing;
		}
		if(format.tabStops != null) {
			this.tabStops = format.tabStops;
		}
	}
	,__class__: openfl_text_TextFormat
};
var openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$ = {};
$hxClasses["openfl.text._TextFormatAlign.TextFormatAlign_Impl_"] = openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.__name__ = ["openfl","text","_TextFormatAlign","TextFormatAlign_Impl_"];
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.fromString = function(value) {
	switch(value) {
	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;
	}
};
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.toString = function(value) {
	switch(value) {
	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;
	}
};
var openfl_text_TextLineMetrics = function(x,width,height,ascent,descent,leading) {
	this.x = x;
	this.width = width;
	this.height = height;
	this.ascent = ascent;
	this.descent = descent;
	this.leading = leading;
};
$hxClasses["openfl.text.TextLineMetrics"] = openfl_text_TextLineMetrics;
openfl_text_TextLineMetrics.__name__ = ["openfl","text","TextLineMetrics"];
openfl_text_TextLineMetrics.prototype = {
	__class__: openfl_text_TextLineMetrics
};
var openfl_ui_GameInputControl = function(device,id,minValue,maxValue,value) {
	if(value == null) {
		value = 0;
	}
	openfl_events_EventDispatcher.call(this);
	this.device = device;
	this.id = id;
	this.minValue = minValue;
	this.maxValue = maxValue;
	this.value = value;
};
$hxClasses["openfl.ui.GameInputControl"] = openfl_ui_GameInputControl;
openfl_ui_GameInputControl.__name__ = ["openfl","ui","GameInputControl"];
openfl_ui_GameInputControl.__super__ = openfl_events_EventDispatcher;
openfl_ui_GameInputControl.prototype = $extend(openfl_events_EventDispatcher.prototype,{
	__class__: openfl_ui_GameInputControl
});
var openfl_ui_GameInputDevice = function(id,name) {
	this.__controls = [];
	this.__button = new haxe_ds_IntMap();
	this.__axis = new haxe_ds_IntMap();
	this.id = id;
	this.name = name;
	var control;
	var _g = 0;
	while(_g < 6) {
		var i = _g++;
		control = new openfl_ui_GameInputControl(this,"AXIS_" + i,-1,1);
		this.__axis.h[i] = control;
		this.__controls.push(control);
	}
	var _g1 = 0;
	while(_g1 < 15) {
		var i1 = _g1++;
		control = new openfl_ui_GameInputControl(this,"BUTTON_" + i1,0,1);
		this.__button.h[i1] = control;
		this.__controls.push(control);
	}
};
$hxClasses["openfl.ui.GameInputDevice"] = openfl_ui_GameInputDevice;
openfl_ui_GameInputDevice.__name__ = ["openfl","ui","GameInputDevice"];
openfl_ui_GameInputDevice.prototype = {
	getCachedSamples: function(data,append) {
		if(append == null) {
			append = false;
		}
		return 0;
	}
	,getControlAt: function(i) {
		if(i >= 0 && i < this.__controls.length) {
			return this.__controls[i];
		}
		return null;
	}
	,startCachingSamples: function(numSamples,controls) {
	}
	,stopCachingSamples: function() {
	}
	,get_numControls: function() {
		return this.__controls.length;
	}
	,__class__: openfl_ui_GameInputDevice
	,__properties__: {get_numControls:"get_numControls"}
};
var openfl_ui_Keyboard = function() { };
$hxClasses["openfl.ui.Keyboard"] = openfl_ui_Keyboard;
openfl_ui_Keyboard.__name__ = ["openfl","ui","Keyboard"];
openfl_ui_Keyboard.capsLock = null;
openfl_ui_Keyboard.numLock = null;
openfl_ui_Keyboard.isAccessible = function() {
	return false;
};
openfl_ui_Keyboard.__convertKeyCode = function(key) {
	switch(key) {
	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 108;
	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 key;
	}
};
openfl_ui_Keyboard.__getCharCode = function(key,shift) {
	if(shift == null) {
		shift = false;
	}
	if(!shift) {
		switch(key) {
		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(key >= 48 && key <= 57) {
			return key - 48 + 48;
		}
		if(key >= 65 && key <= 90) {
			return key - 65 + 97;
		}
	} else {
		switch(key) {
		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(key >= 65 && key <= 90) {
			return key - 65 + 65;
		}
	}
	if(key >= 96 && key <= 105) {
		return key - 96 + 48;
	}
	switch(key) {
	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;
};
openfl_ui_Keyboard.__getKeyLocation = function(key) {
	switch(key) {
	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 openfl_ui_Mouse = function() { };
$hxClasses["openfl.ui.Mouse"] = openfl_ui_Mouse;
openfl_ui_Mouse.__name__ = ["openfl","ui","Mouse"];
openfl_ui_Mouse.hide = function() {
	lime_ui_Mouse.hide();
};
openfl_ui_Mouse.show = function() {
	lime_ui_Mouse.show();
};
var openfl_ui_Multitouch = function() { };
$hxClasses["openfl.ui.Multitouch"] = openfl_ui_Multitouch;
openfl_ui_Multitouch.__name__ = ["openfl","ui","Multitouch"];
openfl_ui_Multitouch.__properties__ = {get_supportsTouchEvents:"get_supportsTouchEvents",set_inputMode:"set_inputMode",get_inputMode:"get_inputMode"}
openfl_ui_Multitouch.maxTouchPoints = null;
openfl_ui_Multitouch.supportedGestures = null;
openfl_ui_Multitouch.supportsGestureEvents = null;
openfl_ui_Multitouch.supportsTouchEvents = null;
openfl_ui_Multitouch.get_inputMode = function() {
	return 2;
};
openfl_ui_Multitouch.set_inputMode = function(inMode) {
	if(inMode == 0) {
		return openfl_ui_Multitouch.get_inputMode();
	}
	return inMode;
};
openfl_ui_Multitouch.get_supportsTouchEvents = function() {
	if(('ontouchstart' in document.documentElement) || (window.DocumentTouch && document instanceof DocumentTouch)) {
		return true;
	}
	return false;
};
var openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$ = {};
$hxClasses["openfl.ui._MultitouchInputMode.MultitouchInputMode_Impl_"] = openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$;
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.__name__ = ["openfl","ui","_MultitouchInputMode","MultitouchInputMode_Impl_"];
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.fromString = function(value) {
	switch(value) {
	case "gesture":
		return 0;
	case "none":
		return 1;
	case "touchPoint":
		return 2;
	default:
		return null;
	}
};
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "gesture";
	case 1:
		return "none";
	case 2:
		return "touchPoint";
	default:
		return null;
	}
};
var openfl_utils__$ByteArray_ByteArray_$Impl_$ = {};
$hxClasses["openfl.utils._ByteArray.ByteArray_Impl_"] = openfl_utils__$ByteArray_ByteArray_$Impl_$;
openfl_utils__$ByteArray_ByteArray_$Impl_$.__name__ = ["openfl","utils","_ByteArray","ByteArray_Impl_"];
openfl_utils__$ByteArray_ByteArray_$Impl_$.__properties__ = {set_length:"set_length",get_length:"get_length"}
openfl_utils__$ByteArray_ByteArray_$Impl_$.defaultObjectEncoding = null;
openfl_utils__$ByteArray_ByteArray_$Impl_$._new = function(length) {
	if(length == null) {
		length = 0;
	}
	return new openfl_utils_ByteArrayData(length);
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.get = function(this1,index) {
	return this1.b[index];
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.set = function(this1,index,value) {
	this1.b[index] = value & 255;
	return value;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromArrayBuffer = function(buffer) {
	return openfl_utils_ByteArrayData.fromBytes(haxe_io_Bytes.ofData(buffer));
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytes = function(bytes) {
	if(js_Boot.__instanceof(bytes,openfl_utils_ByteArrayData)) {
		return bytes;
	} else {
		return openfl_utils_ByteArrayData.fromBytes(bytes);
	}
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.fromBytesData = function(bytesData) {
	return openfl_utils_ByteArrayData.fromBytes(haxe_io_Bytes.ofData(bytesData));
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toArrayBuffer = function(byteArray) {
	return byteArray.b.bufferValue;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytes = function(byteArray) {
	return byteArray;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toBytesData = function(byteArray) {
	return byteArray.b.bufferValue;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.toLimeBytes = function(byteArray) {
	return new lime_utils_Bytes(openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length(byteArray),byteArray.b.bufferValue);
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.get_length = function(this1) {
	return this1.__length;
};
openfl_utils__$ByteArray_ByteArray_$Impl_$.set_length = function(this1,value) {
	if(value > 0) {
		this1.__resize(value);
	}
	this1.__length = value;
	return value;
};
var openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$ = {};
$hxClasses["openfl.utils._CompressionAlgorithm.CompressionAlgorithm_Impl_"] = openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.__name__ = ["openfl","utils","_CompressionAlgorithm","CompressionAlgorithm_Impl_"];
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.fromString = function(value) {
	switch(value) {
	case "deflate":
		return 0;
	case "lzma":
		return 1;
	case "zlib":
		return 2;
	default:
		return null;
	}
};
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "deflate";
	case 1:
		return "lzma";
	case 2:
		return "zlib";
	default:
		return null;
	}
};
var openfl_utils__$Endian_Endian_$Impl_$ = {};
$hxClasses["openfl.utils._Endian.Endian_Impl_"] = openfl_utils__$Endian_Endian_$Impl_$;
openfl_utils__$Endian_Endian_$Impl_$.__name__ = ["openfl","utils","_Endian","Endian_Impl_"];
openfl_utils__$Endian_Endian_$Impl_$.fromString = function(value) {
	switch(value) {
	case "bigEndian":
		return 0;
	case "littleEndian":
		return 1;
	default:
		return null;
	}
};
openfl_utils__$Endian_Endian_$Impl_$.toString = function(value) {
	switch(value) {
	case 0:
		return "bigEndian";
	case 1:
		return "littleEndian";
	default:
		return null;
	}
};
var openfl_utils__$Object_Object_$Impl_$ = {};
$hxClasses["openfl.utils._Object.Object_Impl_"] = openfl_utils__$Object_Object_$Impl_$;
openfl_utils__$Object_Object_$Impl_$.__name__ = ["openfl","utils","_Object","Object_Impl_"];
openfl_utils__$Object_Object_$Impl_$._new = function() {
	return { };
};
openfl_utils__$Object_Object_$Impl_$.hasOwnProperty = function(this1,name) {
	if(this1 != null) {
		return Object.prototype.hasOwnProperty.call(this1,name);
	} else {
		return false;
	}
};
openfl_utils__$Object_Object_$Impl_$.isPrototypeOf = function(this1,theClass) {
	var c = this1 == null ? null : js_Boot.getClass(this1);
	while(c != null) {
		if(c == theClass) {
			return true;
		}
		c = Type.getSuperClass(c);
	}
	return false;
};
openfl_utils__$Object_Object_$Impl_$.iterator = function(this1) {
	var fields = Reflect.fields(this1);
	if(fields == null) {
		fields = [];
	}
	return HxOverrides.iter(fields);
};
openfl_utils__$Object_Object_$Impl_$.propertyIsEnumerable = function(this1,name) {
	if(this1 != null && Object.prototype.hasOwnProperty.call(this1,name)) {
		return js_Boot.__instanceof(Reflect.field(this1,name),haxe_lang_Iterable);
	} else {
		return false;
	}
};
openfl_utils__$Object_Object_$Impl_$.toLocaleString = function(this1) {
	return Std.string(this1);
};
openfl_utils__$Object_Object_$Impl_$.toString = function(this1) {
	return Std.string(this1);
};
openfl_utils__$Object_Object_$Impl_$.valueOf = function(this1) {
	return this1;
};
openfl_utils__$Object_Object_$Impl_$.__get = function(this1,key) {
	return Reflect.field(this1,key);
};
openfl_utils__$Object_Object_$Impl_$.__set = function(this1,key,value) {
	this1[key] = value;
	return value;
};
var haxe_lang_Iterator = function() { };
$hxClasses["haxe.lang.Iterator"] = haxe_lang_Iterator;
haxe_lang_Iterator.__name__ = ["haxe","lang","Iterator"];
haxe_lang_Iterator.prototype = {
	__class__: haxe_lang_Iterator
};
var haxe_lang_Iterable = function() { };
$hxClasses["haxe.lang.Iterable"] = haxe_lang_Iterable;
haxe_lang_Iterable.__name__ = ["haxe","lang","Iterable"];
haxe_lang_Iterable.prototype = {
	__class__: haxe_lang_Iterable
};
function $iterator(o) { if( o instanceof Array ) return function() { return HxOverrides.iter(o); }; return typeof(o.iterator) == 'function' ? $bind(o,o.iterator) : o.iterator; }
var $_, $fid = 0;
function $bind(o,m) { if( m == null ) return null; if( m.__id__ == null ) m.__id__ = $fid++; var f; if( o.hx__closures__ == null ) o.hx__closures__ = {}; else f = o.hx__closures__[m.__id__]; if( f == null ) { f = function(){ return f.method.apply(f.scope, arguments); }; f.scope = o; f.method = m; o.hx__closures__[m.__id__] = f; } return f; }
$hxClasses["Math"] = Math;
String.prototype.__class__ = $hxClasses["String"] = String;
String.__name__ = ["String"];
$hxClasses["Array"] = Array;
Array.__name__ = ["Array"];
Date.prototype.__class__ = $hxClasses["Date"] = Date;
Date.__name__ = ["Date"];
var Int = $hxClasses["Int"] = { __name__ : ["Int"]};
var Dynamic = $hxClasses["Dynamic"] = { __name__ : ["Dynamic"]};
var Float = $hxClasses["Float"] = Number;
Float.__name__ = ["Float"];
var Bool = $hxClasses["Bool"] = Boolean;
Bool.__ename__ = ["Bool"];
var Class = $hxClasses["Class"] = { __name__ : ["Class"]};
var Enum = { };
haxe_Resource.content = [{ name : "__ASSET__:bitmap_flixel_system_debug_stats__Stats_GraphicMaximizeButton", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFvQUFBQUtDQVlBQUFDTk1zKzlBQUFBQm1KTFIwUUEvd0QvQVArZ3ZhZVRBQUFBQ1hCSVdYTUFBQUIyQUFBQWRnRk9leVlJQUFBQUIzUkpUVVVIM2dNSkNSOFVCaGtEeVFBQUFFOUpSRUZVR05PdGtFRVN3REFJQW92Ly8vUDJvb2FhOUJaUFpvQXdxd0NlTlpMVUQ5ZkNIVzc2VFkyZmR3MklVOVVwZUhlVU5kMVlBRm5kTUFGUW1ndTV0eGFWM202VDV5bW9EL0gwT3ZrTFNBOUI4bis0Y2pvQUFBQUFTVVZPUks1Q1lJST0"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicArrowRight", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQUQ1SlJFRlVlTnBpK1AvLy96SWdqZ1JpQmtJWVJNQUFRVTNJaWdscXdxWVlweVo4aWpFME1mNEhheUVLTENmSlpJcmRURlJvRUJYT1JNY2dRSUFCQU1xdGZ6aUhGZ2JoQUFBQUFFbEZUa1N1UW1DQw"},{ name : "__ASSET__:bitmap_flixel_system_GraphicLogo", data : " "},{ name : "__ASSET__:bitmap_flixel_addons_transition_GraphicTransTileDiamond", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQWlBQUFBQWdDQVlBQUFBckZzTTFBQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQXlKcFZGaDBXRTFNT21OdmJTNWhaRzlpWlM1NGJYQUFBQUFBQUR3L2VIQmhZMnRsZENCaVpXZHBiajBpNzd1L0lpQnBaRDBpVnpWTk1FMXdRMlZvYVVoNmNtVlRlazVVWTNwcll6bGtJajgrSUR4NE9uaHRjRzFsZEdFZ2VHMXNibk02ZUQwaVlXUnZZbVU2Ym5NNmJXVjBZUzhpSUhnNmVHMXdkR3M5SWtGa2IySmxJRmhOVUNCRGIzSmxJRFV1TXkxak1ERXhJRFkyTGpFME5UWTJNU3dnTWpBeE1pOHdNaTh3TmkweE5EbzFOam95TnlBZ0lDQWdJQ0FnSWo0Z1BISmtaanBTUkVZZ2VHMXNibk02Y21SbVBTSm9kSFJ3T2k4dmQzZDNMbmN6TG05eVp5OHhPVGs1THpBeUx6SXlMWEprWmkxemVXNTBZWGd0Ym5NaklqNGdQSEprWmpwRVpYTmpjbWx3ZEdsdmJpQnlaR1k2WVdKdmRYUTlJaUlnZUcxc2JuTTZlRzF3UFNKb2RIUndPaTh2Ym5NdVlXUnZZbVV1WTI5dEwzaGhjQzh4TGpBdklpQjRiV3h1Y3pwNGJYQk5UVDBpYUhSMGNEb3ZMMjV6TG1Ga2IySmxMbU52YlM5NFlYQXZNUzR3TDIxdEx5SWdlRzFzYm5NNmMzUlNaV1k5SW1oMGRIQTZMeTl1Y3k1aFpHOWlaUzVqYjIwdmVHRndMekV1TUM5elZIbHdaUzlTWlhOdmRYSmpaVkpsWmlNaUlIaHRjRHBEY21WaGRHOXlWRzl2YkQwaVFXUnZZbVVnVUdodmRHOXphRzl3SUVOVE5pQW9WMmx1Wkc5M2N5a2lJSGh0Y0UxTk9rbHVjM1JoYm1ObFNVUTlJbmh0Y0M1cGFXUTZNek5HUmtFd05FSXhPRVV3TVRGRk5EazVRVGRDUlVVME56Z3lPVFkyT0RjaUlIaHRjRTFOT2tSdlkzVnRaVzUwU1VROUluaHRjQzVrYVdRNk16TkdSa0V3TkVNeE9FVXdNVEZGTkRrNVFUZENSVVUwTnpneU9UWTJPRGNpUGlBOGVHMXdUVTA2UkdWeWFYWmxaRVp5YjIwZ2MzUlNaV1k2YVc1emRHRnVZMlZKUkQwaWVHMXdMbWxwWkRvek0wWkdRVEEwT1RFNFJUQXhNVVUwT1RsQk4wSkZSVFEzT0RJNU5qWTROeUlnYzNSU1pXWTZaRzlqZFcxbGJuUkpSRDBpZUcxd0xtUnBaRG96TTBaR1FUQTBRVEU0UlRBeE1VVTBPVGxCTjBKRlJUUTNPREk1TmpZNE55SXZQaUE4TDNKa1pqcEVaWE5qY21sd2RHbHZiajRnUEM5eVpHWTZVa1JHUGlBOEwzZzZlRzF3YldWMFlUNGdQRDk0Y0dGamEyVjBJR1Z1WkQwaWNpSS9QckhzdVhJQUFBTHRTVVJCVkhqYTdOakJidVVnRUVUUk1QLy96NDRpelNhenlpakdYTGZPbGJLSnpLTUZEVlRWdXE3ckF3QmV4cjhYMXpvMDc4ZERkZnp2UmIwT3pYdFhIWGMvVE92UXZEK3Q0K21IZUIyYTl4dC8zR01BZnZGSVhJZm1QWEdCWHpkOTg4UmpmQjJhdDFKN1plOHF2VnVZa3dBQmNQc0ZkaDJhOThsTDlkcjA3YzdmT2pXMnNuYVYzcW1jblp3SUlVQ0FkNHNBQ1VURFBWZlNnMHJ0bGIycjlHN3U4UzlBZ0FEdkZSK24zVnZGdlZiY2UyVnNaZTBxdlZNNU8wUUlBUUxjZW9GSUlCcnV1WkllVkdxdjdGMmxkejMrQkFnd1NueWNkbThWOTFweDc1V3hsYldyOUU3bDdCQWhCQWh3NndVaWdXaTQ1MHA2VUttOXNuZVYzdlg0Z3dEQktQRngycjFWM0d2RnZWZkdWdGF1MGp1VnMwT0VnQURCclJlSUJLTGhuaXZwUWFYMnl0NVZldGZqRHdJRW84VEhhZmRXY2E4VjkxNFpXMW03U3U5VXpnNFJBZ0lFdDE0Z0VvaUdlNjZrQjVYYUszdFg2VjJQUDBDQWpCSWZwOTFieGIxVzNIdGxiR1h0S3IxVE9UdEVDRUNBM0hxQlNDQWE3cm1TSGxScXIreGRwWGM5L2dBQk1rcDhuSFp2RmZkYWNlK1ZzWlcxcS9STzVld1FJUUFCY3VzRklvRm91T2RLZWxDcHZiSjNsZDcxK0FNWUpVQUFBQUFCOGpqcjc5K0plWC95dnlmbWZhS085ZENZeW0rc1FYdFg2ZDNDbkFBSWtCR3NRNWZwT25TcHIwM2Y3dnl0VTJNcmExZnBuY3JaSVlJQUFtU1VDSkhBTk5LREhYVklZT2IwTHZFQkVDQjR1WXVVd1BUSFZ0YXUwanVWczBNRUFRVElLQkVpZ1dta0J6dnFrTURNNlYzaUF5QkE4SElYS1lIcGo2MnNYYVYzS21lSENBSUJnbEVpUkFMVFNBOTIxQ0dCbWRPN3hBY0lFT0RsTGxJQzB4OWJXYnRLNzFUT0RoRUVBZ1NqUklnRXBwRWU3S2hEQWpPbmQ0a1BFQ0RBeTEya0JLWS90ckoybGQ2cG5CMGlpQUFCUm9rUUNVd2pQZGhSaHdSbVR1OFNId1FJZ0plN1NBbE1mMnhsN1NxOVV6azdSQkFCQW93U0lSS1lSbnF3b3c0SnpKemVKVDRJRUFBdmQ1RVNtUDdZeXRwVmVxZHlkbklpaUFBQjhKc0xUQUxUU0E5MjFDR0JtZE83T2ZIeHhhY0FBd0RrMWZzODNpRUEyd0FBQUFCSlJVNUVya0pnZ2c9PQ"},{ name : "__ASSET__:bitmap_flixel_tile_GraphicAutoAlt", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicWatch", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUlHTklVazBBQUhvbEFBQ0Fnd0FBK2Y4QUFJRHBBQUIxTUFBQTZtQUFBRHFZQUFBWGI1SmZ4VVlBQUFEY1NVUkJWSGphakpBaFM4TmhHTVIvZTFGWkdNSmd3U2FyVnNPS1dSSGJtcGo4Qkg0Q205L0JabDJ3R3NSZ0U5Um1GbHcwQ0NKWUxIZG44UDF2KzZ1SUIwOTU3cmk3NStrazRiOG9BTmdGZXhmN0d2c0ZlNHA5Z2oxb3FaTVFhVDlTSXQxSE9vNTBGdWs5MG1Xa2ZoS1N6TVRUU0xlUnVnMFI2VENTSXgwMHUxSUQxb0VIU3ZsWUNMMEJYb0ZodS9NWHNZYzlxamVzQWtkQXQzS3R6cHVSSGlPOVJicUtkRmR2T0krMDFOVG96RjVuYndEakd0c0hkb0JuWUp0U251Yk9peU90Uk9wRk9xM3VGeitkdjhOZUF5YkFNcVZzQVgrSWY4SG5BTlI0d3BRazlwRnhBQUFBQUVsRlRrU3VRbUND"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicInteractive", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQkhOQ1NWUUlDQWdJZkFoa2lBQUFBQWx3U0ZsekFBQUxFZ0FBQ3hJQjB0MSsvQUFBQUJ4MFJWaDBVMjltZEhkaGNtVUFRV1J2WW1VZ1JtbHlaWGR2Y210eklFTlROdWk4c293QUFBQndTVVJCVkJpVmpaR3hEWUF3REFSZnpNSTYyU0JTT3RaZ0tBWmdBYW9NUVU5SmRSUUprUXVjOE5MTHNuVitGeGFnanFQdEovbUtrdVphaXpxSkFiaXJvNWNjSlYyU1ZqTXJGNXpFQXpockRXL3liOURDeXdpMDhFNlJDelk0NTR4WitBUWJuRkxDTEN6ZWt3UnNneTgyUDZENlFrZUFUREtHQUFBQUFFbEZUa1N1UW1DQw"},{ name : "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicMoverTool", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicCursorCross", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQkhOQ1NWUUlDQWdJZkFoa2lBQUFBQWx3U0ZsekFBQUxFZ0FBQ3hJQjB0MSsvQUFBQUJaMFJWaDBRM0psWVhScGIyNGdWR2x0WlFBd05TOHlPUzh4TnJ0VlFGa0FBQUFjZEVWWWRGTnZablIzWVhKbEFFRmtiMkpsSUVacGNtVjNiM0pyY3lCRFV6Ym92TEtNQUFBQUxrbEVRVlFZbFdQOC8vOC9BeGJ3bjRHQmdSRmRrQW1iU2x4Z2tDaG1ZWUI0Qmh2QUVHZGh3T0pyaG1FVUdnQjN1Z2NXZXB2bWtRQUFBQUJKUlU1RXJrSmdnZz09"},{ name : "__ASSET__:file_flixel_system_VirtualInputData", data : "YmFzZSA9IDI2NiA0NiA4NCA4NA0KdGh1bWIgPSAyNjYgMTMxIDUyIDUyDQphID0gMCAwIDEzMiA0NQ0KYiA9IDAgNDYgMTMyIDQ1DQpjID0gMCA5MiAxMzIgNDUNCmRvd24gPSAwIDEzOCAxMzIgNDUNCmxlZnQgPSAxMzMgMCAxMzIgNDUNCnJpZ2h0ID0gMTMzIDQ2IDEzMiA0NQ0KdXAgPSAxMzMgOTIgMTMyIDQ1DQp4ID0gMjY2IDAgMTMyIDQ1DQp5ID0gMTMzIDEzOCAxMzIgNDUNCg"},{ name : "__ASSET__:bitmap_flixel_system_GraphicVirtualInput", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicArrowLeft", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQm1KTFIwUUFBQUFBQUFENVE3dC9BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUIzUkpUVVVIM2dRWkVqQTAzU0hjY2dBQUFFQkpSRUZVR05Oai9QLy9Qd01SSUpLQmdjR1g0Zi8vLy9odzVQLy8vNWY5aHdLaUZPRlNqRlVSdW1LOGlwQVZFMVJFdHNra3U1bXMwTUNyaVpHVUdBUUFzOU5wbXo4SWloRUFBQUFBU1VWT1JLNUNZSUk9"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicCloseButton", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFnQUFBQUlDQVlBQUFERUQ3NkxBQUFBQkhOQ1NWUUlDQWdJZkFoa2lBQUFBQWx3U0ZsekFBQUFkZ0FBQUhZQlRuc21DQUFBQUJsMFJWaDBVMjltZEhkaGNtVUFkM2QzTG1sdWEzTmpZWEJsTG05eVo1dnVQQm9BQUFCL1NVUkJWQmlWVFkweENzSlFFQVhIYnlTZXdNdWxUV2R2YTZPbGxXSnBDQ0syaWsxT1krY3RRc1lpcS9rREM4dnM3bHZVU3UzVXBVcFdPN1ZDM1RqU3FXVU1EK0dldisxdGlKZDZ5dm95ajl3NzhWQVhLb21SR2JCaW9nY0dBTlNrTm5GNVY0L1IzOVNFMm9hNHF2TjRkdzUzS1lBMzBBRDFQeGJXUUFGOHZwYVlyTldBYU5WMEFBQUFBRWxGVGtTdVFtQ0M"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicBitmapLog", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQm1KTFIwUUFBQUFBQUFENVE3dC9BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUIzUkpUVVVIM2dRWkV4c2Fka1ZHNHdBQUFFRkpSRUZVR05PVnpjc0pBREFJQk5FdDFUSnl0UFBKS2VSbnhBd3NlSGlnOUJOUW1mRURBU3REUUdXWTRRdStjQWhQN013cytqaU94cDR5dk9ZWkxrRkFIVzZYWUMwODhkcWRBQUFBQUVsRlRrU3VRbUND"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicStats", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUlHTklVazBBQUhvbEFBQ0Fnd0FBK2Y4QUFJRHBBQUIxTUFBQTZtQUFBRHFZQUFBWGI1SmZ4VVlBQUFBeFNVUkJWSGphWXZ6Ly96OERzWUNKZ1FSQWpPTC9VRXdkaytHbTBkVE5XQlZqdFpvK3ptQWtKUVlCQUFBQS8vOERBTDhIREFscWRHWVJBQUFBQUVsRlRrU3VRbUND"},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicLog", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUlHTklVazBBQUhvbEFBQ0Fnd0FBK2Y4QUFJRHBBQUIxTUFBQTZtQUFBRHFZQUFBWGI1SmZ4VVlBQUFBa1NVUkJWSGphWXZ6Ly96OERzWUFGaVkxUEZ5TzZZc1pSa3dlSHlRQUFBQUQvL3dNQStmWUlMQWhqbnhZQUFBQUFTVVZPUks1Q1lJST0"},{ name : "__ASSET__:bitmap_flixel_system_debug__Window_GraphicWindowHandle", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFvQUFBQUtDQVlBQUFDTk1zKzlBQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQUZCSlJFRlVlTnFNandFS0FDQUlBeFgyeWg3b055MmpRa3lwUWJUMGRFU3FTblllRXZoWE5zRE1ZblhlelZHNHdBME5OVlJaSGpLUEgyaDYvNWwxVzBPaXgzTlRFbDFDSjdxS0MvNExraTdBQUQ1WWZydllMZlJQQUFBQUFFbEZUa1N1UW1DQw"},{ name : "__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoCorners", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUVBQUFBQkFDQVlBQUFDcWFYSGVBQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQlkxSlJFRlVlTnJrV3d1eW16Z1FsR1Q4d1g1Sk52ZS9UUTYwdFhrdi9tRkFDNjRaMG01TEFwejFPaENxcHJEQnh1NmVuaGtKUnRZWTg2MnhkV1A3eG40MDloM3NIem4yMGRpeHNaTlkwZGlsc2JLeENxd0c4MkQ4M3NDZVg3ZWJoWDFyRHZacVdXTUwyUzhiV3dtT1RXTnZZbDhhKzlyWVg3TC9MTWZiejJ3Yk8yZHljQ2tBQ3JtZ0FTQkZ3QzZ5Ui9BZVNJZ0Jad0lZT0pPQVJDandSZUQ2K1BrTS9sc054OVlDZWlmN055VmdMeGQ5QjYrMzlyZnN2NHNLV2dXY3lmczFlVDRGT3VUOVBnSVFXRWdKQzFCQklZNjhpT20xVVNVWlhIZWhCSnprd0VHQUtoSHZRc0M3a0hRU0FpNEF1b29BcjhuTEtlQkRWR0FEUkRnaTRnSktacy9uNHZWYzNxL1VrVXFBRjVBZllrakNoNUNqM2k4SFNOMzBBQjlDZ0Uwb0FVbXdRa0JKdVVpUHJ5RG1jM205RkNJNkFpcngvZzhnUU1Hci9BdncvcEQ0N2dPYzh2eFFFcFNJQ3ZhbFhKc1Y4Q2J4bndNcFZTYmVMWUVBQkw2WDh5ZUsrMGRCRHdYK0tCRTFPQWdKVUd4YklzQm5VTmEwREI3azlSRkszeGtraGpFK3hMc2h3SDRrZUQrQUNFM0VXc1cwVkI0QW0xWUFMWmMyZzlwK0lQQUhxdmxWSk5iTlNFOC9vZ0QrYm93SXZMWVR4eDBCMTE0STJJZ3RNZ0NxSHp4Q3lWUFpsMVRxbmdteTcxcVdsR1poYjZqOEZZUnRUOGt3eXdUb2lZQVhFZkQxTDRKOGxCZzdrSFF2d0d2NDc1Y0F4b09RMEJHQTRNODB6T1doN2JNOVBsUUZzWE0xNUlRU0JrWWhFbFlaZ01haGJxeld2d0o4MzIvYWdBbzhPSzZDb1R1VFVDTUJPTkJoNzc4YThKakU2R2wwV29FS0NzQjYwaktJRTV3TGxic3hZL2ZmZ1FoV0ErYXVNa0NDeVFMU0x3Zkd2Zm5OeVdBVmxLU0VRc2NCUlVUNmZpS2VUeW1ocGx6QUpGd0pLQlAxZnFvSzRMQ3RZYUtFSkRoSDRLc1pTRDgwTnFnREpGd3R3emNrbWFtSGdROGt3NHBJV0RqeS90UVZFQ01pUmtMbElqYzFwK2oxUGdKOElDRldMbkZuMTgvTSsxWGdIdWFOQXVvQk56dW1Gdis5WWVBQ1NXL29sSGVxT2VER2hpcGc2dU9BS0JFdVVmYm1zREVKRlpQZ1RQcWh4bHhJQ0QybTZ3Z1krOGhxVHZuQXU1bDZQVFl6dkZPRCt3T2tINW9YZE9kY1l2dzg1ZEdnSHhvT3pveDdiaitYSE5BZGMyYittMDlNazQyYmFlSWJzbGtsd1A0cFlFUHZYZVFEcVMvUGFsTUZoR3lPS3Jqck8zSXpCODBLdm51czdoTGVueklwc2NmbmQ2cDNpVENZaStkakpEZ2t3TTI4SW9SYTdib2NNR2NWaE1CamE1M3JYZ1NJbUVNSkRMWGNJdVlGZGxzdUlpVE1EZnhObDZrTGdIZG1Yb21RUTBCYlp6c0N0SWRXRDA1OVlHUURCSEJ2c2JiUVpZN0FZM3hNT1JuYW52aS9VVUJHS3BoVFNXVHBZM2Q1aTNuWm5sanBtNTU4WUNlWStFS0xMQlRyQ2dsWXc0bU13c0JNWkdnY0d2bTVsUGVOdE1sZDI4YUZpQlVSNEdES1hKdGhEWXV2bnV2SEZJREFPd1VnQVdzS0IrNFB0aWJjbWhxN0RXVk11TkY1N08yc01mY2wrbGFWNE5xaXE3VUhOd0owQXlmTzhnVnNqMC9kWDdPSlAydi9ZKzhPbWVveStDVTRkdzFxdjRaQUxuOCtGK05HNlJBQi9oYzkrOHg1UG51ZFBhOXJCWElOQVNWZ0srQnpjN3MyQ0lIR1dtZTVXenNXTGo0U0Zxd2VQd0kwMzlwRHI3UGtOMkJyVkVDN3RZc0plRjBncnI3Z0xqSm53azlmWGxYdWVLaTdCTkNxN3EzNTJTNi9WUVZzNVlzS0h0dmxhMkFZMXduZVBXSXkvOCtUSkp1WTZOaEF0a2ZRT3lLZ2E1ZlBoVFgwUGk0OHhEc29xV2JLWnl1aER6eU84VlgyQ253WEljRXBBVXZ5UEpaQWpDdGRXZnFLbmlMYjQza3VkUnNCck10b1B4RUpMVzZMWlhCbjd0Y0xlQ0lnSXhYRXdpRkZRbXdNMFZmelkwdHBPZXVyOTNQQjlFbE1sYUR5YnovVExTc3pKdDR5YitCSGxrUlFUQWtwRXZ6STBoa2I0ckxzMmZ0YklPQU5iQXRWNExwZVlHZCtManIwZ2RLSGlhVnZQZEV6OGtIb2xyYUwxSHYydmtxL1hVWGVyaUQvVEdxb2NQSDB5ZHl2dXViWXFzejlpbTFWZ251Z01neXArVFl5ekkxTmNIQm1pM01aWFIxL3hLVCtyd0FEQUFKQmFpQW1tNXh3QUFBQUFFbEZUa1N1UW1DQw"},{ name : "__ASSET__:bitmap_flixel_addons_transition_GraphicTransTileCircle", data : " "},{ name : "__ASSET__:bitmap_flixel_addons_transition_GraphicTransTileSquare", data : " "},{ name : "__ASSET__:bitmap_flixel_input_mouse__FlxMouse_GraphicCursor", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUJnQUFBQWdDQVlBQUFBSVhyZzRBQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQW1SSlJFRlVlTnEwbHM5ckUwRVV4Nzg3MllTZ0psVFNTaVdwVnZyRElxaEZVSUtnK0NlSUlncWVGRS9pVFJDOHBMUVhqeUwwNGc5Q29tWFRKSVcwT1ZVRU1UZEJSSWs1VzZXdGtLSlNiR25EcHNuNlprMlczVFFicytua3dkdVpuVm0rbjMwenczc2pCVUxCQ0lBcGRNbGMrL3orZDlScTVMbHVBT1JhTzhrZkR5ZW5XMGJ5YU9LZVl3RGpEMDNUZEFnSlJFUkhJTkVlYUpWS0ZZeEprQ1NKajAzWVJYTC85bVZib2Q2QmtIMEV1bWxTdlNjMEVnTnc1ZXAxakE2UENJY1lnQU0rUDU0OG5zYXh3VUdoRUdaKzJTaFZNSjlLNCtqQUVXRVFDMkM3cEVKakhpeWswd2dGZzBJZ3JIRmdhYm1vaTJkbWt6amMzNzlueUM3QW44MHQvRjdmMFBlQ1F3NzE5UmtRT29xUlBRTzRmVjBwNnUzdzBCQXl5U1FDZ1VESGtLYUE0czkxYkc2VjlQN3hrVkU5a29NOVBSMUJtTjNFVWkwS2JpZkd4akNuS1BEN2ZJNGh0b0RWNGkrbzVSM2ovZlRKVXdSSk9JYllBbmgrK3I2NlpoazdNejRPSlI2SDErdHRHOEphVFg3N3NZWkt0V29aQzU4OWg5U3JtYlloTFFHcXVxTXZWYU9kRDRjeEU0M0M0M2JEVkU4aWpnR05tMjIyU3hjdUl2Nzh4WDhoY2l2eFdTV0dmUDRUYmV4K0VtcitLVjhxdFZ3MlEyQ3U4YmFBVk9JbEZ1YlQvejZTWFdBdTF1N1J0MENhQXJJa25Na2t3UXVjTE11UW1PUTBReGlRWFlEWGkxa2thR2tZWTVEZExqNzBsdnhCaDhuVVl3SGtjbThRaXo0MUw4a2lMM1pVbzdjN3Jja0c0T09IOXlnVThuQVRzMWI4cytUWFNGd1ZVbkMrRkQ3VFh4czNpemtSNGtZRUx1c0o0ZUkzbTRuYkxZT1RWS0dRM3hEeDU1YUxWNjBmSTcvRDg1ekltMTA5Z21ma3QwU0wxMi9YdmRUZTdkYjEvYThBQXdDWlVNUU16UW9keXdBQUFBQkpSVTVFcmtKZ2dnPT0"},{ name : "__ASSET__:bitmap_flixel_system_debug_stats__Stats_GraphicMinimizeButton", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFvQUFBQUtDQVlBQUFDTk1zKzlBQUFBQm1KTFIwUUEvd0QvQVArZ3ZhZVRBQUFBQ1hCSVdYTUFBQUIyQUFBQWRnRk9leVlJQUFBQUIzUkpUVVVIM2dNSkNSMDFlRVp4RlFBQUFEOUpSRUZVR05OaitQLy8vMzhHQWdDdUJzWkExb1JOREM2QnJoQ1p6L1QvLzM4bWZOWVQ0elR5QUNPNjhZeU1qRmpGbUpBbHNacUVMRWRVOEJBYjRBQzRjRkxGc3d1SW53QUFBQUJKUlU1RXJrSmdnZz09"},{ name : "__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoLight", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUVBQUFBQkFDQVlBQUFDcWFYSGVBQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQnE1SlJFRlVlTnJVVzR0dTR6WVE1TktVYzNmcHQvYWYrcE01MjVLNFJRQ3gySnZiRi8xSTJ3Q0VaRWQyTk1QWnQwTGx6Ny9LQzMvb1NkL0RyN3JCOXNXZzZVN0E5Q295MmhjQXB3ZStpNFB2NC84Q0FSUzhSM2VBbE5ld3VBNC9RNCtTMEw0SU9EMWdDcFM0RC81cUFpeEFsSHd2SW9PVHBQQ0VtcDVHQUUwQ0orTzZqQk5rQjlSVFRLSTlDTndDR0wwWDdUd0xnS3lBWlllSUtUVTg2Z1ExSXNaN1ZRRS9TNEE4NzQ0S1h1b0RNdktPVm5XVWdJQ3NSUWNKRkpBeFJVeDdFSHlGY3dSY0EySTg4QU5rRjY5SlVRWTdEalEwaDVZQWI1RkFEdUFxRnNGNWhvQU93UHZ4K1E0cTZBYjR0Qis0eHdscTREWGdKK1cxWmc3c0VERFdMc0NpQ1hqK0ljd1ZXbkwzU1pFK0FwWkFjVlZGRmFSNGRqN0FzZ0MrSDUvWndROGcwRzRvd1EyUjdRNnZYNVhkSHlBYkFHOEtHZmdkMnU0UDRKczR4OWZqZm5ieG5YMDJTclNKM2RkMi9pU09UUnkxZFlMcjBRZDBBRDhBeTRYa2FVUjRvZkkzTWxvaXhkWGlPMG9ld1M2d21xSUdWSUFrUUlKZWp6WCszbVlrUldnS2x2Ui9lZDBtS2poTi9pY0Q5RmtjeitMMzQ5b0t6cENGbzBQZ0RmeUk1ZUZaMmUzeWlBL3draHEwOHdVQXY4SDVJb2lRU2tCUExuZitKcFpHZ0JWQ2krSVV6YWpRa3BWZURhUXZ3WDg3UUkvMVRmeE9tb1NtQUFSL0ZZUlI0RGhMMER0SU9VRnliSitVVUllN1AwQi9QNERMOVNaSWtHYkFRSUFFdjRqZEw0cGlNR21xQWp3Wi9RVFZDVklpSDdETW9BRUJBL0FuQ1QrTzQzZEJ6aG5zZWhBZzdmNFQvRThnQ3NIdlNzSlVJVzBtbzcvSVVSZ2tKd3lpL1dzRWZBSitQd2dZUzVyRzRoRHdDZjRDU2lsR2xyZ2JaS0FTckVZclo0b2hMZDNGMEhkV0NQaHhrUEN1S0dFUkpFb0h1QjdnaDBwSUFhOGxSaWVSTVZZbFd6VHJnMHd4cEJFaGZjRWlTSkFFSUFudmdvQXpSQUpwLzJkbDUyVitzRUtJYk1mN0o1RU00YkljSWJWRTFXZWx2bG9PZ0k0UUNaQ21nQXBZaGRldjRzWXQ4R05wOVlaSHdpOUtpRExCNGhSQUo4TVJuc0VSRG4vd0J4Q3dnTk5hUWZvTXdHVmtXSlQwR2plcVo3ckhUUWtSTldoalJabmdHWlNBSmpITW9JRUNic0lrQnZnQi9BMXlDU3Uxcm80RDU0d1BvQ0FaaWtwZ0xTcThLZUZ4Z0tuQ0I4aW9JTUZmSUwxdWlWTGJhNzJGWVRBVEZTaHdqTTFSeGpDUlJlejRKbXI5TTZUTkMrUU5sdXk5QnF4cEJqTzFnQlVleVZBRGtxRVJVK0hHUmlSb3prNlRrNm5TN0N5eUpZWVRzeDNpQW0xeEN0cG94ZWtZUlUzVnUwQVh1TW1aMlI4N0ZSZzcvVDJyMVYyVWZvRDNXYTk5bmhtcjNhMEE3WTk3N1d4TVQzZFk2MEV3SmtJYnRMMnNuUDllOEdZWUpLZU5aTzF3VDdTeE1HbTVpci9KSWd6dVVQL2Z4R2MyY2R3VVFsQTkzc3pBRElQUkdKcVYzbDBQMmxpeXJKV2xMWW5QVk1nRHJzcTZBUUdhU3Rnd3lSSjFoVnBDTWw3ZkhuY2VnVjlFL0Vid0MrUUJzZ3orT0k2WFl3MHlWa1VORmhIZUlOWE5BNnkrR2twdGQzYitDbVZ0aGZSMmhZS25ReW44QVNSY3dUUlFBWmFQaUtLYW1ncVQ0Z09zY1pVbCtjWG81bGdWWDRmTTd3T1dSOFNtQUk4YzVUOEthY2FPRjRNRWRxUXZuVnd6cXJvVkNDQWdZQld5bCtDUmdCV1VnSW9vR1FjWW1ZQVg0anFFdEhiY21CeVdrTkx4dllGUGtBckFqdEJGVVlFa3dsSUFubk1tQ2hSbnlvbzl0azNKNkc3S0VGVHVyblJ5NkJUeEd1bEFmOExTRklBT2taMlErRnRWT0JNR05UVnNrUGRYQXp6dVBqWkZPNWpCVGV5MGpBWVhKVS9ZamR6QWNvUnVGR0NuZHU0d2t4dm5ZMngxVlZTek83dGZ3UVIyVUFIbUJSZHh0SnhnRDU0eWNVM0E2NkdqS2V4S3I2REF6ck1DQ25jZkJ5TmFQbkZUdlArcWhNTTlDSU4zT1VFckJTYVIxR3lKTWZkTk5FS3QyV0EzU0pESHEyUDdtZDNIOUQ1VkRHbFBjZlNnNVl4Z21taDV6VXlIVjZXbXNNQjNweVpJSzhDZHBSdkFOeU5ibEFTY2xLNU9FVTdRZXo1Z0Qyb0JiL2VuTTBFdkg3Q2V5Y0dFYVFCcHg4MWxtcGRlaldFOUtUSlRLdk1qaVZCSlBKT3p3WmdMbldBTituajRqSkJHUkUvbS96elRGR21KM2ZjYURkM0lGYW80N2tyTHF6Z0U0UENUamVaSWxQV0Z1NS90Q211NUFRNGdHRVpaVlF3cHZhZkROQ2ZibmVKTEE1d3BnKzl1aVZId1hsZUlRSDlnTlRpTEUyVllxZTZpZmlGUE5IZW5HaUxraEVRQ1U4RHFyMExPRUQwMm55R2lPS0dPWnh1aldSTW9Tbmkwd2lRcFQyaVEwNGttQnp3N3RRZ0hOcDhpWW1ZeTVEMTBxRDJwVGNiTWdCTmtsNENFakpON3lmOExjS0tEck8yOE5ZTG53QXk4bHJ5MzAwODFnZG5Ka1VXSU5YVGxoQkl5NzAwUFJlNGx3RXFPTEFkcDNTQWxBSEJ5V0hNWCtHY29nQnhpSWpJeWl1STdydmt5QWlJMXpONGtUeWpqS2VDZlFVQlcyc1dwS1NJbitCTGd6eVlnVXNXak4vNi8rdS94NkticDN3QnEvZnd0d0FDRGVkRE1KazlyRWdBQUFBQkpSVTVFcmtKZ2dnPT0"},{ name : "__ASSET__:bitmap_flixel_addons_transition__TransitionFade_GraphicDiagonalGradient", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug__FlxDebugger_GraphicFlixel", data : " "},{ name : "__ASSET__:bitmap_flixel_tile_GraphicAuto", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug_GraphicConsole", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBQ1hCSVdYTUFBQXNUQUFBTEV3RUFtcHdZQUFBQUlHTklVazBBQUhvbEFBQ0Fnd0FBK2Y4QUFJRHBBQUIxTUFBQTZtQUFBRHFZQUFBWGI1SmZ4VVlBQUFCVVNVUkJWSGphdEpIUkNVQWhEQVBqRzhVVjNNbmhuTVZaWE9IOFVTaFBoSW9ZeUUrNXRJRUdRRjU5T3BDRm82UXFLVzFwd0RvRERTaS91WUFGbmk0amxEM3d2SUlOWEcxMmQ0NUFCZEt1V25qMmxENEFLVWJYUXNkOGx3a0FBQUFBU1VWT1JLNUNZSUk9"},{ name : "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicEraserTool", data : " "},{ name : "__ASSET__:bitmap_flixel_system_debug__FlxDebugger_GraphicDrawDebug", data : "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFzQUFBQUxDQVlBQUFDcHJIY21BQUFBR1hSRldIUlRiMlowZDJGeVpRQkJaRzlpWlNCSmJXRm5aVkpsWVdSNWNjbGxQQUFBQUU5SlJFRlVlTnEwa01zTkFDQUlRNnRic3FCcjF2Z25haFFQTnVrRlhna3BTS0phZUZhWVFWSGg1WWdWbEFiZjFJN1E1UVRnc0pmZTBlTkJYMkFwajR4V2RxWnV4QUwzUnRJZ0dLdERGR0FBNGg0Vk01NWl5QnNBQUFBQVNVVk9SSzVDWUlJPQ"}];
var __map_reserved = {}
var ArrayBuffer = $global.ArrayBuffer || js_html_compat_ArrayBuffer;
if(ArrayBuffer.prototype.slice == null) {
	ArrayBuffer.prototype.slice = js_html_compat_ArrayBuffer.sliceImpl;
}
var DataView = $global.DataView || js_html_compat_DataView;
var Float32Array = $global.Float32Array || js_html_compat_Float32Array._new;
var Uint8Array = $global.Uint8Array || js_html_compat_Uint8Array._new;
var this1 = new Uint32Array(256);
lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16 = this1;
var _g = 0;
while(_g < 256) {
	var i = _g++;
	lime_math_color__$RGBA_RGBA_$Impl_$.__alpha16[i] = Math.ceil(i * 257.003921568627447);
}
var this2 = new Uint8Array(510);
lime_math_color__$RGBA_RGBA_$Impl_$.__clamp = this2;
var _g1 = 0;
while(_g1 < 255) {
	var i1 = _g1++;
	lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[i1] = i1;
}
var _g11 = 255;
var _g2 = 511;
while(_g11 < _g2) {
	var i2 = _g11++;
	lime_math_color__$RGBA_RGBA_$Impl_$.__clamp[i2] = 255;
}
lime_system_CFFI.available = false;
lime_system_CFFI.enabled = false;
if(window.createjs != null) {
	createjs.Sound.alternateExtensions = ["ogg","mp3","wav"];
}
openfl_ui_Multitouch.maxTouchPoints = 2;
openfl_ui_Multitouch.supportedGestures = null;
openfl_ui_Multitouch.supportsGestureEvents = false;
flixel_math_FlxRect._pool = new flixel_util_FlxPool_$flixel_$math_$FlxRect(flixel_math_FlxRect);
flixel_FlxObject.defaultPixelPerfectPosition = false;
flixel_FlxObject.SEPARATE_BIAS = 4;
flixel_FlxObject.LEFT = 1;
flixel_FlxObject.RIGHT = 16;
flixel_FlxObject.UP = 256;
flixel_FlxObject.DOWN = 4096;
flixel_FlxObject.NONE = 0;
flixel_FlxObject.CEILING = 256;
flixel_FlxObject.FLOOR = 4096;
flixel_FlxObject.WALL = 17;
flixel_FlxObject.ANY = 4369;
flixel_FlxObject._firstSeparateFlxRect = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	$r = _this;
	return $r;
}(this));
flixel_FlxObject._secondSeparateFlxRect = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	$r = _this;
	return $r;
}(this));
openfl_display_DisplayObject.__instanceCount = 0;
openfl_display_DisplayObject.__worldRenderDirty = 0;
openfl_display_DisplayObject.__worldTransformDirty = 0;
openfl_display_DisplayObject.__cacheAsBitmapMode = false;
AssetPaths.t1__tmx = "assets/levels/t1.tmx";
AssetPaths.baseTiles__tsx = "assets/levels/baseTiles.tsx";
AssetPaths.tf__tmx = "assets/levels/tf.tmx";
AssetPaths.t2__tmx = "assets/levels/t2.tmx";
AssetPaths.base__tmx = "assets/levels/base.tmx";
AssetPaths.tf2__tmx = "assets/levels/tf2.tmx";
AssetPaths.health__png = "assets/images/health.png";
AssetPaths.health__json = "assets/images/health.json";
AssetPaths.player__png = "assets/images/player.png";
AssetPaths.tiles__png = "assets/images/tiles.png";
AssetPaths.player__json = "assets/images/player.json";
AssetPaths.arrows__png = "assets/images/arrows.png";
AssetPaths.waves2__ogg = "assets/sounds/waves2.ogg";
AssetPaths.waves3__ogg = "assets/sounds/waves3.ogg";
AssetPaths.sound_1_3_0__ogg = "assets/sounds/m/sound_1_3_0.ogg";
AssetPaths.sound_2_3_1__ogg = "assets/sounds/m/sound_2_3_1.ogg";
AssetPaths.sound_1_0_1__ogg = "assets/sounds/m/sound_1_0_1.ogg";
AssetPaths.sound_3_2_0__ogg = "assets/sounds/m/sound_3_2_0.ogg";
AssetPaths.sound_2_0_0__ogg = "assets/sounds/m/sound_2_0_0.ogg";
AssetPaths.sound_1_1_1__ogg = "assets/sounds/m/sound_1_1_1.ogg";
AssetPaths.sound_1_4_3__ogg = "assets/sounds/m/sound_1_4_3.ogg";
AssetPaths.sound_1_1_2__ogg = "assets/sounds/m/sound_1_1_2.ogg";
AssetPaths.sound_3_0_0__ogg = "assets/sounds/m/sound_3_0_0.ogg";
AssetPaths.sound_0_1_3__ogg = "assets/sounds/m/sound_0_1_3.ogg";
AssetPaths.sound_1_0_2__ogg = "assets/sounds/m/sound_1_0_2.ogg";
AssetPaths.sound_0_3_2__ogg = "assets/sounds/m/sound_0_3_2.ogg";
AssetPaths.sound_1_0_0__ogg = "assets/sounds/m/sound_1_0_0.ogg";
AssetPaths.sound_0_2_3__ogg = "assets/sounds/m/sound_0_2_3.ogg";
AssetPaths.sound_3_2_2__ogg = "assets/sounds/m/sound_3_2_2.ogg";
AssetPaths.sound_2_3_2__ogg = "assets/sounds/m/sound_2_3_2.ogg";
AssetPaths.sound_0_0_1__ogg = "assets/sounds/m/sound_0_0_1.ogg";
AssetPaths.sound_1_3_3__ogg = "assets/sounds/m/sound_1_3_3.ogg";
AssetPaths.sound_3_1_2__ogg = "assets/sounds/m/sound_3_1_2.ogg";
AssetPaths.sound_3_1_0__ogg = "assets/sounds/m/sound_3_1_0.ogg";
AssetPaths.sound_2_0_1__ogg = "assets/sounds/m/sound_2_0_1.ogg";
AssetPaths.sound_3_3_0__ogg = "assets/sounds/m/sound_3_3_0.ogg";
AssetPaths.sound_1_3_1__ogg = "assets/sounds/m/sound_1_3_1.ogg";
AssetPaths.sound_2_2_0__ogg = "assets/sounds/m/sound_2_2_0.ogg";
AssetPaths.sound_2_2_1__ogg = "assets/sounds/m/sound_2_2_1.ogg";
AssetPaths.sound_1_2_2__ogg = "assets/sounds/m/sound_1_2_2.ogg";
AssetPaths.sound_0_0_3__ogg = "assets/sounds/m/sound_0_0_3.ogg";
AssetPaths.sound_1_2_0__ogg = "assets/sounds/m/sound_1_2_0.ogg";
AssetPaths.sound_3_4_3__ogg = "assets/sounds/m/sound_3_4_3.ogg";
AssetPaths.sound_0_4_0__ogg = "assets/sounds/m/sound_0_4_0.ogg";
AssetPaths.sound_2_4_0__ogg = "assets/sounds/m/sound_2_4_0.ogg";
AssetPaths.sound_1_2_1__ogg = "assets/sounds/m/sound_1_2_1.ogg";
AssetPaths.sound_0_2_1__ogg = "assets/sounds/m/sound_0_2_1.ogg";
AssetPaths.sound_1_4_2__ogg = "assets/sounds/m/sound_1_4_2.ogg";
AssetPaths.sound_0_2_2__ogg = "assets/sounds/m/sound_0_2_2.ogg";
AssetPaths.sound_3_4_0__ogg = "assets/sounds/m/sound_3_4_0.ogg";
AssetPaths.sound_2_2_3__ogg = "assets/sounds/m/sound_2_2_3.ogg";
AssetPaths.sound_3_0_3__ogg = "assets/sounds/m/sound_3_0_3.ogg";
AssetPaths.sound_2_4_2__ogg = "assets/sounds/m/sound_2_4_2.ogg";
AssetPaths.sound_2_2_2__ogg = "assets/sounds/m/sound_2_2_2.ogg";
AssetPaths.sound_2_3_3__ogg = "assets/sounds/m/sound_2_3_3.ogg";
AssetPaths.sound_0_1_0__ogg = "assets/sounds/m/sound_0_1_0.ogg";
AssetPaths.sound_3_1_1__ogg = "assets/sounds/m/sound_3_1_1.ogg";
AssetPaths.sound_1_2_3__ogg = "assets/sounds/m/sound_1_2_3.ogg";
AssetPaths.sound_3_0_1__ogg = "assets/sounds/m/sound_3_0_1.ogg";
AssetPaths.sound_2_0_3__ogg = "assets/sounds/m/sound_2_0_3.ogg";
AssetPaths.sound_3_2_3__ogg = "assets/sounds/m/sound_3_2_3.ogg";
AssetPaths.sound_3_4_1__ogg = "assets/sounds/m/sound_3_4_1.ogg";
AssetPaths.sound_3_4_2__ogg = "assets/sounds/m/sound_3_4_2.ogg";
AssetPaths.sound_0_3_0__ogg = "assets/sounds/m/sound_0_3_0.ogg";
AssetPaths.sound_2_4_3__ogg = "assets/sounds/m/sound_2_4_3.ogg";
AssetPaths.sound_1_3_2__ogg = "assets/sounds/m/sound_1_3_2.ogg";
AssetPaths.sound_3_3_3__ogg = "assets/sounds/m/sound_3_3_3.ogg";
AssetPaths.sound_0_0_0__ogg = "assets/sounds/m/sound_0_0_0.ogg";
AssetPaths.sound_0_2_0__ogg = "assets/sounds/m/sound_0_2_0.ogg";
AssetPaths.sound_0_0_2__ogg = "assets/sounds/m/sound_0_0_2.ogg";
AssetPaths.sound_2_1_3__ogg = "assets/sounds/m/sound_2_1_3.ogg";
AssetPaths.sound_1_4_1__ogg = "assets/sounds/m/sound_1_4_1.ogg";
AssetPaths.sound_3_0_2__ogg = "assets/sounds/m/sound_3_0_2.ogg";
AssetPaths.sound_2_1_2__ogg = "assets/sounds/m/sound_2_1_2.ogg";
AssetPaths.sound_1_1_0__ogg = "assets/sounds/m/sound_1_1_0.ogg";
AssetPaths.sound_0_1_1__ogg = "assets/sounds/m/sound_0_1_1.ogg";
AssetPaths.sound_3_1_3__ogg = "assets/sounds/m/sound_3_1_3.ogg";
AssetPaths.sound_1_1_3__ogg = "assets/sounds/m/sound_1_1_3.ogg";
AssetPaths.sound_2_0_2__ogg = "assets/sounds/m/sound_2_0_2.ogg";
AssetPaths.sound_3_3_2__ogg = "assets/sounds/m/sound_3_3_2.ogg";
AssetPaths.sound_2_4_1__ogg = "assets/sounds/m/sound_2_4_1.ogg";
AssetPaths.sound_0_3_3__ogg = "assets/sounds/m/sound_0_3_3.ogg";
AssetPaths.sound_3_2_1__ogg = "assets/sounds/m/sound_3_2_1.ogg";
AssetPaths.sound_0_1_2__ogg = "assets/sounds/m/sound_0_1_2.ogg";
AssetPaths.sound_2_1_0__ogg = "assets/sounds/m/sound_2_1_0.ogg";
AssetPaths.sound_0_4_3__ogg = "assets/sounds/m/sound_0_4_3.ogg";
AssetPaths.sound_2_3_0__ogg = "assets/sounds/m/sound_2_3_0.ogg";
AssetPaths.sound_1_4_0__ogg = "assets/sounds/m/sound_1_4_0.ogg";
AssetPaths.sound_1_0_3__ogg = "assets/sounds/m/sound_1_0_3.ogg";
AssetPaths.sound_2_1_1__ogg = "assets/sounds/m/sound_2_1_1.ogg";
AssetPaths.sound_0_3_1__ogg = "assets/sounds/m/sound_0_3_1.ogg";
AssetPaths.sound_3_3_1__ogg = "assets/sounds/m/sound_3_3_1.ogg";
AssetPaths.sound_0_4_1__ogg = "assets/sounds/m/sound_0_4_1.ogg";
AssetPaths.sound_0_4_2__ogg = "assets/sounds/m/sound_0_4_2.ogg";
AssetPaths.die__ogg = "assets/sounds/die.ogg";
AssetPaths.water__ogg = "assets/sounds/water.ogg";
AssetPaths.step__ogg = "assets/sounds/step.ogg";
AssetPaths.victory__ogg = "assets/sounds/victory.ogg";
AssetPaths.waves1__ogg = "assets/sounds/waves1.ogg";
Character.ANIMATION_STEP = 5;
openfl_text_Font.__registeredFonts = [];
GameRules.QUEUE_SIZE = 128;
GameRules.DEFAULT_TIME_STEP = 0.5;
GameRules.DEFAULT_RULES = new GameRules(2,0.5);
LevelInfo.levels = ["t1.tmx","t2.tmx","tf.tmx","tf2.tmx"];
LevelSelector.SAVE_NAME = "DS_S_1";
LevelSelector.LEVEL_PREFIX = "assets/levels/";
Player.MAX_SOUND_BONUS = 5;
Player.MAX_HEALTH = 5;
QueueIndicator.MAX_ARROWS = 20;
TiledLevel.c_PATH_LEVEL_TILESHEETS = "assets/images/";
Xml.Element = 0;
Xml.PCData = 1;
Xml.CData = 2;
Xml.Comment = 3;
Xml.DocType = 4;
Xml.ProcessingInstruction = 5;
Xml.Document = 6;
flixel_math_FlxPoint._pool = new flixel_util_FlxPool_$flixel_$math_$FlxPoint(flixel_math_FlxPoint);
openfl_display_LoaderInfo.__rootURL = window.document.URL;
openfl_system_ApplicationDomain.currentDomain = new openfl_system_ApplicationDomain(null);
openfl_geom_Matrix.__identity = new openfl_geom_Matrix();
openfl_geom_Matrix.__temp = new openfl_geom_Matrix();
flixel_FlxCamera.drawVertices = (function($this) {
	var $r;
	var this1 = new openfl_VectorData();
	this1.data = new Array(0);
	this1.length = 0;
	this1.fixed = false;
	$r = this1;
	return $r;
}(this));
flixel_FlxCamera.trianglesSprite = new openfl_display_Sprite();
flixel_FlxCamera.renderPoint = (function($this) {
	var $r;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	$r = point;
	return $r;
}(this));
flixel_FlxCamera.renderRect = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	$r = _this;
	return $r;
}(this));
flixel_system_FlxVersion.sha = "";
js_Boot.__toStr = ({ }).toString;
flixel_math_FlxRandom._arrayFloatHelper = null;
flixel_math_FlxRandom.MULTIPLIER = 48271.0;
flixel_math_FlxRandom.MODULUS = 2147483647;
flixel_FlxG.autoPause = true;
flixel_FlxG.fixedTimestep = true;
flixel_FlxG.timeScale = 1;
flixel_FlxG.worldDivisions = 6;
flixel_FlxG.VERSION = new flixel_system_FlxVersion(4,2,0);
flixel_FlxG.elapsed = 0;
flixel_FlxG.maxElapsed = 0.1;
flixel_FlxG.scaleMode = new flixel_system_scaleModes_RatioScaleMode();
flixel_FlxG.worldBounds = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	$r = _this;
	return $r;
}(this));
flixel_FlxG.save = new flixel_util_FlxSave();
flixel_FlxG.random = new flixel_math_FlxRandom();
flixel_FlxG.swipes = [];
flixel_FlxG.html5 = new flixel_system_frontEnds_HTML5FrontEnd();
flixel_FlxG.inputs = new flixel_system_frontEnds_InputFrontEnd();
flixel_FlxG.console = new flixel_system_frontEnds_ConsoleFrontEnd();
flixel_FlxG.log = new flixel_system_frontEnds_LogFrontEnd();
flixel_FlxG.bitmapLog = new flixel_system_frontEnds_BitmapLogFrontEnd();
flixel_FlxG.watch = new flixel_system_frontEnds_WatchFrontEnd();
flixel_FlxG["debugger"] = new flixel_system_frontEnds_DebuggerFrontEnd();
flixel_FlxG.bitmap = new flixel_system_frontEnds_BitmapFrontEnd();
flixel_FlxG.cameras = new flixel_system_frontEnds_CameraFrontEnd();
flixel_FlxG.initialWidth = 0;
flixel_FlxG.initialHeight = 0;
flixel_FlxG.initialZoom = 0;
flixel_FlxG.signals = new flixel_system_frontEnds_SignalFrontEnd();
flixel_addons_editors_tiled_TiledObject.FLIPPED_VERTICALLY_FLAG = 1073741824;
flixel_addons_editors_tiled_TiledObject.FLIPPED_HORIZONTALLY_FLAG = -2147483648;
flixel_addons_editors_tiled_TiledObject.RECTANGLE = 0;
flixel_addons_editors_tiled_TiledObject.ELLIPSE = 1;
flixel_addons_editors_tiled_TiledObject.POLYGON = 2;
flixel_addons_editors_tiled_TiledObject.POLYLINE = 3;
flixel_addons_editors_tiled_TiledObject.TILE = 4;
flixel_addons_editors_tiled_TiledTile.FLIPPED_HORIZONTAL = -2147483648;
flixel_addons_editors_tiled_TiledTile.FLIPPED_VERTICAL = 1073741824;
flixel_addons_editors_tiled_TiledTile.FLIPPED_DIAGONAL = 536870912;
flixel_addons_editors_tiled_TiledTile.ROTATE_0 = 0;
flixel_addons_editors_tiled_TiledTile.ROTATE_90 = 1;
flixel_addons_editors_tiled_TiledTile.ROTATE_270 = 2;
flixel_addons_editors_tiled_TiledTileLayer.BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
flixel_addons_tile_FlxTileSpecial.ROTATE_0 = 0;
flixel_addons_tile_FlxTileSpecial.ROTATE_90 = 1;
flixel_addons_tile_FlxTileSpecial.ROTATE_270 = 2;
flixel_tile_FlxTilemap._helperBuffer = Type.createEmptyInstance(flixel_tile_FlxTilemapBuffer);
openfl_display_BitmapData.__isGLES = null;
flixel_addons_transition_GraphicTransTileCircle.resourceType = "image/png";
flixel_addons_transition_GraphicTransTileCircle.resourceName = "__ASSET__:bitmap_flixel_addons_transition_GraphicTransTileCircle";
flixel_addons_transition_GraphicTransTileDiamond.resourceType = "image/png";
flixel_addons_transition_GraphicTransTileDiamond.resourceName = "__ASSET__:bitmap_flixel_addons_transition_GraphicTransTileDiamond";
flixel_addons_transition_GraphicTransTileSquare.resourceType = "image/png";
flixel_addons_transition_GraphicTransTileSquare.resourceName = "__ASSET__:bitmap_flixel_addons_transition_GraphicTransTileSquare";
flixel_addons_transition_FlxTransitionableState.defaultTransIn = null;
flixel_addons_transition_FlxTransitionableState.defaultTransOut = null;
flixel_addons_transition_FlxTransitionableState.skipNextTransIn = false;
flixel_addons_transition_FlxTransitionableState.skipNextTransOut = false;
flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.resourceType = "image/png";
flixel_addons_transition__$TransitionFade_GraphicDiagonalGradient.resourceName = "__ASSET__:bitmap_flixel_addons_transition__TransitionFade_GraphicDiagonalGradient";
flixel_addons_ui_Anchor.LEFT = "left";
flixel_addons_ui_Anchor.RIGHT = "right";
flixel_addons_ui_Anchor.TOP = "top";
flixel_addons_ui_Anchor.BOTTOM = "bottom";
flixel_addons_ui_Anchor.CENTER = "center";
flixel_addons_ui_Anchor.UNKNOWN = "unknown";
flixel_text_FlxText.VERTICAL_GUTTER = 4;
flixel_addons_ui_FlxInputText.NO_FILTER = 0;
flixel_addons_ui_FlxInputText.ONLY_ALPHA = 1;
flixel_addons_ui_FlxInputText.ONLY_NUMERIC = 2;
flixel_addons_ui_FlxInputText.ONLY_ALPHANUMERIC = 3;
flixel_addons_ui_FlxInputText.CUSTOM_FILTER = 4;
flixel_addons_ui_FlxInputText.ALL_CASES = 0;
flixel_addons_ui_FlxInputText.UPPER_CASE = 1;
flixel_addons_ui_FlxInputText.LOWER_CASE = 2;
flixel_addons_ui_FlxInputText.BACKSPACE_ACTION = "backspace";
flixel_addons_ui_FlxInputText.DELETE_ACTION = "delete";
flixel_addons_ui_FlxInputText.ENTER_ACTION = "enter";
flixel_addons_ui_FlxInputText.INPUT_ACTION = "input";
flixel_addons_ui_FlxUISprite.RESIZE_RATIO_X = 0;
flixel_addons_ui_FlxUISprite.RESIZE_RATIO_Y = 1;
flixel_addons_ui_FlxUISprite.RESIZE_RATIO_UNKNOWN = -1;
openfl_geom_Rectangle.__temp = new openfl_geom_Rectangle();
flixel_addons_ui_FlxUI9SliceSprite.bitmapsCreated = 0;
flixel_addons_ui_FlxUI9SliceSprite.useSectionCache = true;
flixel_addons_ui_FlxUI9SliceSprite._staticPoint = new openfl_geom_Point();
flixel_addons_ui_FlxUI9SliceSprite._staticRect = new openfl_geom_Rectangle();
flixel_addons_ui_FlxUI9SliceSprite._staticRect2 = new openfl_geom_Rectangle();
flixel_addons_ui_FlxUI9SliceSprite._staticPointZero = new openfl_geom_Point(0,0);
flixel_addons_ui_FlxUI9SliceSprite._staticMatrix = new openfl_geom_Matrix();
flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	$r = _this;
	return $r;
}(this));
flixel_addons_ui_FlxUI9SliceSprite._staticFlxRect2 = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	$r = _this;
	return $r;
}(this));
flixel_addons_ui_FlxUI9SliceSprite.TILE_NONE = 0;
flixel_addons_ui_FlxUI9SliceSprite.TILE_BOTH = 17;
flixel_addons_ui_FlxUI9SliceSprite.TILE_H = 16;
flixel_addons_ui_FlxUI9SliceSprite.TILE_V = 1;
flixel_addons_ui_FlxUIAssets.IMG_BUTTON = "flixel/flixel-ui/img/button.png";
flixel_addons_ui_FlxUIAssets.IMG_BUTTON_ARROW_DOWN = "flixel/flixel-ui/img/button_arrow_down.png";
flixel_addons_ui_FlxUIAssets.IMG_BUTTON_ARROW_LEFT = "flixel/flixel-ui/img/button_arrow_left.png";
flixel_addons_ui_FlxUIAssets.IMG_BUTTON_ARROW_RIGHT = "flixel/flixel-ui/img/button_arrow_right.png";
flixel_addons_ui_FlxUIAssets.IMG_BUTTON_ARROW_UP = "flixel/flixel-ui/img/button_arrow_up.png";
flixel_addons_ui_FlxUIAssets.IMG_BUTTON_THIN = "flixel/flixel-ui/img/button_thin.png";
flixel_addons_ui_FlxUIAssets.IMG_BUTTON_TOGGLE = "flixel/flixel-ui/img/button_toggle.png";
flixel_addons_ui_FlxUIAssets.IMG_BUTTON_SIZE = 18;
flixel_addons_ui_FlxUIAssets.IMG_CHECK_MARK = "flixel/flixel-ui/img/check_mark.png";
flixel_addons_ui_FlxUIAssets.IMG_CHECK_BOX = "flixel/flixel-ui/img/check_box.png";
flixel_addons_ui_FlxUIAssets.IMG_CHROME = "flixel/flixel-ui/img/chrome.png";
flixel_addons_ui_FlxUIAssets.IMG_CHROME_LIGHT = "flixel/flixel-ui/img/chrome_light.png";
flixel_addons_ui_FlxUIAssets.IMG_CHROME_FLAT = "flixel/flixel-ui/img/chrome_flat.png";
flixel_addons_ui_FlxUIAssets.IMG_CHROME_INSET = "flixel/flixel-ui/img/chrome_inset.png";
flixel_addons_ui_FlxUIAssets.IMG_RADIO = "flixel/flixel-ui/img/radio.png";
flixel_addons_ui_FlxUIAssets.IMG_RADIO_DOT = "flixel/flixel-ui/img/radio_dot.png";
flixel_addons_ui_FlxUIAssets.IMG_TAB = "flixel/flixel-ui/img/tab.png";
flixel_addons_ui_FlxUIAssets.IMG_TAB_BACK = "flixel/flixel-ui/img/tab_back.png";
flixel_addons_ui_FlxUIAssets.IMG_BOX = "flixel/flixel-ui/img/box.png";
flixel_addons_ui_FlxUIAssets.IMG_DROPDOWN = "flixel/flixel-ui/img/dropdown_mark.png";
flixel_addons_ui_FlxUIAssets.IMG_PLUS = "flixel/flixel-ui/img/plus_mark.png";
flixel_addons_ui_FlxUIAssets.IMG_MINUS = "flixel/flixel-ui/img/minus_mark.png";
flixel_addons_ui_FlxUIAssets.IMG_HILIGHT = "flixel/flixel-ui/img/hilight.png";
flixel_addons_ui_FlxUIAssets.IMG_INVIS = "flixel/flixel-ui/img/invis.png";
flixel_addons_ui_FlxUIAssets.IMG_SWATCH = "flixel/flixel-ui/img/swatch.png";
flixel_addons_ui_FlxUIAssets.IMG_TOOLTIP_ARROW = "flixel/flixel-ui/img/tooltip_arrow.png";
flixel_addons_ui_FlxUIAssets.IMG_FINGER_SMALL = "flixel/flixel-ui/img/finger_small.png";
flixel_addons_ui_FlxUIAssets.IMG_FINGER_BIG = "flixel/flixel-ui/img/finger_big.png";
flixel_addons_ui_FlxUIAssets.SLICE9_BUTTON = "6,6,11,11";
flixel_addons_ui_FlxUIAssets.SLICE9_BUTTON_THIN = "2,2,15,15";
flixel_addons_ui_FlxUIAssets.SLICE9_BUTTON_TOGGLE = "6,6,11,11";
flixel_addons_ui_FlxUIAssets.SLICE9_TAB = "6,6,11,11";
flixel_addons_ui_FlxUIAssets.XML_DEFAULTS_ID = "flixel/flixel-ui/xml/defaults";
flixel_addons_ui_FlxUIAssets.XML_DEFAULT_POPUP_ID = "flixel/flixel-ui/xml/default_popup";
flixel_addons_ui_FlxUIAssets.XML_DEFAULT_LOADING_SCREEN_ID = "flixel/flixel-ui/xml/default_loading_screen";
flixel_addons_ui_FlxUIAssets.index_size = null;
flixel_addons_ui_FlxUITypedButton.CLICK_EVENT = "click_button";
flixel_addons_ui_FlxUITypedButton.OVER_EVENT = "over_button";
flixel_addons_ui_FlxUITypedButton.DOWN_EVENT = "down_button";
flixel_addons_ui_FlxUITypedButton.OUT_EVENT = "out_button";
flixel_addons_ui_FlxUICheckBox.CLICK_EVENT = "click_check_box";
flixel_addons_ui_FlxUICursor.KEYS_TAB = 1;
flixel_addons_ui_FlxUICursor.KEYS_WASD = 16;
flixel_addons_ui_FlxUICursor.KEYS_ARROWS = 256;
flixel_addons_ui_FlxUICursor.KEYS_NUMPAD = 4096;
flixel_addons_ui_FlxUICursor.GAMEPAD_DPAD = 65536;
flixel_addons_ui_FlxUICursor.GAMEPAD_LEFT_STICK = 1048576;
flixel_addons_ui_FlxUICursor.GAMEPAD_RIGHT_STICK = 16777216;
flixel_addons_ui_FlxUICursor.GAMEPAD_SHOULDER_BUTTONS = 268435456;
flixel_addons_ui_FlxUICursor.INPUT_NONE = 0;
flixel_addons_ui_FlxUICursor.INPUT_KEYS = 1;
flixel_addons_ui_FlxUICursor.INPUT_GAMEPAD = 16;
flixel_addons_ui_FlxUIDropDownMenu.CLICK_EVENT = "click_dropdown";
flixel_addons_ui_FlxUIInputText.CHANGE_EVENT = "change_input_text";
flixel_addons_ui_FlxUIInputText.ENTER_EVENT = "enter_input_text";
flixel_addons_ui_FlxUIInputText.DELETE_EVENT = "delete_input_text";
flixel_addons_ui_FlxUIInputText.INPUT_EVENT = "input_input_text";
flixel_addons_ui_FlxUIList.STACK_HORIZONTAL = 0;
flixel_addons_ui_FlxUIList.STACK_VERTICAL = 1;
flixel_input_FlxPointer._cachedPoint = new flixel_math_FlxPoint();
flixel_addons_ui_FlxUINumericStepper.STACK_VERTICAL = 0;
flixel_addons_ui_FlxUINumericStepper.STACK_HORIZONTAL = 1;
flixel_addons_ui_FlxUINumericStepper.CLICK_EVENT = "click_numeric_stepper";
flixel_addons_ui_FlxUINumericStepper.EDIT_EVENT = "edit_numeric_stepper";
flixel_addons_ui_FlxUINumericStepper.CHANGE_EVENT = "change_numeric_stepper";
flixel_addons_ui_FlxUIRadioGroup.CLICK_EVENT = "click_radio_group";
flixel_addons_ui_FlxUIState.static_tongue = null;
flixel_addons_ui_FlxUITabMenu.CLICK_EVENT = "tab_menu_click";
flixel_addons_ui_FlxUITabMenu.STACK_FRONT = "front";
flixel_addons_ui_FlxUITabMenu.STACK_BACK = "back";
flixel_addons_ui_FontDef.EXTENSIONS = [".ttf",".otf"];
flixel_addons_ui_U._matrix = null;
flixel_animation_FlxPrerotatedAnimation.PREROTATED = "prerotated_animation";
flixel_effects_FlxFlicker._pool = new flixel_util_FlxPool_$flixel_$effects_$FlxFlicker(flixel_effects_FlxFlicker);
flixel_effects_FlxFlicker._boundObjects = new haxe_ds_ObjectMap();
flixel_graphics_FlxGraphic.defaultPersist = false;
flixel_graphics_atlas_FlxAtlas.point = new openfl_geom_Point();
flixel_graphics_atlas_FlxAtlas.matrix = new openfl_geom_Matrix();
flixel_graphics_atlas_FlxAtlas.defaultMinSize = new flixel_math_FlxPoint(128,128);
flixel_graphics_atlas_FlxAtlas.defaultMaxSize = new flixel_math_FlxPoint(1024,1024);
flixel_graphics_tile_FlxDrawTrianglesItem.point = (function($this) {
	var $r;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	$r = point;
	return $r;
}(this));
flixel_graphics_tile_FlxDrawTrianglesItem.rect = (function($this) {
	var $r;
	var _this = flixel_math_FlxRect._pool.get();
	_this.x = 0;
	_this.y = 0;
	_this.width = 0;
	_this.height = 0;
	_this._inPool = false;
	$r = _this;
	return $r;
}(this));
openfl_display_Tilesheet.TILE_SCALE = 1;
openfl_display_Tilesheet.TILE_ROTATION = 2;
openfl_display_Tilesheet.TILE_RGB = 4;
openfl_display_Tilesheet.TILE_ALPHA = 8;
openfl_display_Tilesheet.TILE_TRANS_2x2 = 16;
openfl_display_Tilesheet.TILE_RECT = 32;
openfl_display_Tilesheet.TILE_ORIGIN = 64;
openfl_display_Tilesheet.TILE_TRANS_COLOR = 128;
openfl_display_Tilesheet.TILE_BLEND_NORMAL = 0;
openfl_display_Tilesheet.TILE_BLEND_ADD = 65536;
openfl_display_Tilesheet.TILE_BLEND_MULTIPLY = 131072;
openfl_display_Tilesheet.TILE_BLEND_SCREEN = 262144;
openfl_display_Tilesheet.TILE_BLEND_SUBTRACT = 524288;
openfl_display_Tilesheet.TILE_BLEND_DARKEN = 1048576;
openfl_display_Tilesheet.TILE_BLEND_LIGHTEN = 2097152;
openfl_display_Tilesheet.TILE_BLEND_OVERLAY = 4194304;
openfl_display_Tilesheet.TILE_BLEND_HARDLIGHT = 8388608;
openfl_display_Tilesheet.TILE_BLEND_DIFFERENCE = 16777216;
openfl_display_Tilesheet.TILE_BLEND_INVERT = 33554432;
openfl_display_Tilesheet.__defaultPoint = new openfl_geom_Point(0,0);
flixel_graphics_tile_FlxTilesheet._DRAWCALLS = 0;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.fromStringMap = (function($this) {
	var $r;
	var _g = new haxe_ds_StringMap();
	if(__map_reserved["ANY"] != null) {
		_g.setReserved("ANY",-2);
	} else {
		_g.h["ANY"] = -2;
	}
	if(__map_reserved["A"] != null) {
		_g.setReserved("A",0);
	} else {
		_g.h["A"] = 0;
	}
	if(__map_reserved["B"] != null) {
		_g.setReserved("B",1);
	} else {
		_g.h["B"] = 1;
	}
	if(__map_reserved["X"] != null) {
		_g.setReserved("X",2);
	} else {
		_g.h["X"] = 2;
	}
	if(__map_reserved["Y"] != null) {
		_g.setReserved("Y",3);
	} else {
		_g.h["Y"] = 3;
	}
	if(__map_reserved["LEFT_SHOULDER"] != null) {
		_g.setReserved("LEFT_SHOULDER",4);
	} else {
		_g.h["LEFT_SHOULDER"] = 4;
	}
	if(__map_reserved["RIGHT_SHOULDER"] != null) {
		_g.setReserved("RIGHT_SHOULDER",5);
	} else {
		_g.h["RIGHT_SHOULDER"] = 5;
	}
	if(__map_reserved["BACK"] != null) {
		_g.setReserved("BACK",6);
	} else {
		_g.h["BACK"] = 6;
	}
	if(__map_reserved["START"] != null) {
		_g.setReserved("START",7);
	} else {
		_g.h["START"] = 7;
	}
	if(__map_reserved["LEFT_STICK_CLICK"] != null) {
		_g.setReserved("LEFT_STICK_CLICK",8);
	} else {
		_g.h["LEFT_STICK_CLICK"] = 8;
	}
	if(__map_reserved["RIGHT_STICK_CLICK"] != null) {
		_g.setReserved("RIGHT_STICK_CLICK",9);
	} else {
		_g.h["RIGHT_STICK_CLICK"] = 9;
	}
	if(__map_reserved["GUIDE"] != null) {
		_g.setReserved("GUIDE",10);
	} else {
		_g.h["GUIDE"] = 10;
	}
	if(__map_reserved["DPAD_UP"] != null) {
		_g.setReserved("DPAD_UP",11);
	} else {
		_g.h["DPAD_UP"] = 11;
	}
	if(__map_reserved["DPAD_DOWN"] != null) {
		_g.setReserved("DPAD_DOWN",12);
	} else {
		_g.h["DPAD_DOWN"] = 12;
	}
	if(__map_reserved["DPAD_LEFT"] != null) {
		_g.setReserved("DPAD_LEFT",13);
	} else {
		_g.h["DPAD_LEFT"] = 13;
	}
	if(__map_reserved["DPAD_RIGHT"] != null) {
		_g.setReserved("DPAD_RIGHT",14);
	} else {
		_g.h["DPAD_RIGHT"] = 14;
	}
	if(__map_reserved["LEFT_TRIGGER_BUTTON"] != null) {
		_g.setReserved("LEFT_TRIGGER_BUTTON",15);
	} else {
		_g.h["LEFT_TRIGGER_BUTTON"] = 15;
	}
	if(__map_reserved["RIGHT_TRIGGER_BUTTON"] != null) {
		_g.setReserved("RIGHT_TRIGGER_BUTTON",16);
	} else {
		_g.h["RIGHT_TRIGGER_BUTTON"] = 16;
	}
	if(__map_reserved["LEFT_TRIGGER"] != null) {
		_g.setReserved("LEFT_TRIGGER",17);
	} else {
		_g.h["LEFT_TRIGGER"] = 17;
	}
	if(__map_reserved["RIGHT_TRIGGER"] != null) {
		_g.setReserved("RIGHT_TRIGGER",18);
	} else {
		_g.h["RIGHT_TRIGGER"] = 18;
	}
	if(__map_reserved["LEFT_ANALOG_STICK"] != null) {
		_g.setReserved("LEFT_ANALOG_STICK",19);
	} else {
		_g.h["LEFT_ANALOG_STICK"] = 19;
	}
	if(__map_reserved["RIGHT_ANALOG_STICK"] != null) {
		_g.setReserved("RIGHT_ANALOG_STICK",20);
	} else {
		_g.h["RIGHT_ANALOG_STICK"] = 20;
	}
	if(__map_reserved["DPAD"] != null) {
		_g.setReserved("DPAD",21);
	} else {
		_g.h["DPAD"] = 21;
	}
	if(__map_reserved["TILT_PITCH"] != null) {
		_g.setReserved("TILT_PITCH",26);
	} else {
		_g.h["TILT_PITCH"] = 26;
	}
	if(__map_reserved["TILT_ROLL"] != null) {
		_g.setReserved("TILT_ROLL",27);
	} else {
		_g.h["TILT_ROLL"] = 27;
	}
	if(__map_reserved["POINTER_X"] != null) {
		_g.setReserved("POINTER_X",28);
	} else {
		_g.h["POINTER_X"] = 28;
	}
	if(__map_reserved["POINTER_Y"] != null) {
		_g.setReserved("POINTER_Y",29);
	} else {
		_g.h["POINTER_Y"] = 29;
	}
	if(__map_reserved["EXTRA_0"] != null) {
		_g.setReserved("EXTRA_0",30);
	} else {
		_g.h["EXTRA_0"] = 30;
	}
	if(__map_reserved["EXTRA_1"] != null) {
		_g.setReserved("EXTRA_1",31);
	} else {
		_g.h["EXTRA_1"] = 31;
	}
	if(__map_reserved["EXTRA_2"] != null) {
		_g.setReserved("EXTRA_2",32);
	} else {
		_g.h["EXTRA_2"] = 32;
	}
	if(__map_reserved["EXTRA_3"] != null) {
		_g.setReserved("EXTRA_3",33);
	} else {
		_g.h["EXTRA_3"] = 33;
	}
	if(__map_reserved["LEFT_STICK_DIGITAL_UP"] != null) {
		_g.setReserved("LEFT_STICK_DIGITAL_UP",34);
	} else {
		_g.h["LEFT_STICK_DIGITAL_UP"] = 34;
	}
	if(__map_reserved["LEFT_STICK_DIGITAL_RIGHT"] != null) {
		_g.setReserved("LEFT_STICK_DIGITAL_RIGHT",35);
	} else {
		_g.h["LEFT_STICK_DIGITAL_RIGHT"] = 35;
	}
	if(__map_reserved["LEFT_STICK_DIGITAL_DOWN"] != null) {
		_g.setReserved("LEFT_STICK_DIGITAL_DOWN",36);
	} else {
		_g.h["LEFT_STICK_DIGITAL_DOWN"] = 36;
	}
	if(__map_reserved["LEFT_STICK_DIGITAL_LEFT"] != null) {
		_g.setReserved("LEFT_STICK_DIGITAL_LEFT",37);
	} else {
		_g.h["LEFT_STICK_DIGITAL_LEFT"] = 37;
	}
	if(__map_reserved["RIGHT_STICK_DIGITAL_UP"] != null) {
		_g.setReserved("RIGHT_STICK_DIGITAL_UP",38);
	} else {
		_g.h["RIGHT_STICK_DIGITAL_UP"] = 38;
	}
	if(__map_reserved["RIGHT_STICK_DIGITAL_RIGHT"] != null) {
		_g.setReserved("RIGHT_STICK_DIGITAL_RIGHT",39);
	} else {
		_g.h["RIGHT_STICK_DIGITAL_RIGHT"] = 39;
	}
	if(__map_reserved["RIGHT_STICK_DIGITAL_DOWN"] != null) {
		_g.setReserved("RIGHT_STICK_DIGITAL_DOWN",40);
	} else {
		_g.h["RIGHT_STICK_DIGITAL_DOWN"] = 40;
	}
	if(__map_reserved["RIGHT_STICK_DIGITAL_LEFT"] != null) {
		_g.setReserved("RIGHT_STICK_DIGITAL_LEFT",41);
	} else {
		_g.h["RIGHT_STICK_DIGITAL_LEFT"] = 41;
	}
	$r = _g;
	return $r;
}(this));
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.toStringMap = (function($this) {
	var $r;
	var _g = new haxe_ds_IntMap();
	_g.h[-2] = "ANY";
	_g.h[0] = "A";
	_g.h[1] = "B";
	_g.h[2] = "X";
	_g.h[3] = "Y";
	_g.h[4] = "LEFT_SHOULDER";
	_g.h[5] = "RIGHT_SHOULDER";
	_g.h[6] = "BACK";
	_g.h[7] = "START";
	_g.h[8] = "LEFT_STICK_CLICK";
	_g.h[9] = "RIGHT_STICK_CLICK";
	_g.h[10] = "GUIDE";
	_g.h[11] = "DPAD_UP";
	_g.h[12] = "DPAD_DOWN";
	_g.h[13] = "DPAD_LEFT";
	_g.h[14] = "DPAD_RIGHT";
	_g.h[15] = "LEFT_TRIGGER_BUTTON";
	_g.h[16] = "RIGHT_TRIGGER_BUTTON";
	_g.h[17] = "LEFT_TRIGGER";
	_g.h[18] = "RIGHT_TRIGGER";
	_g.h[19] = "LEFT_ANALOG_STICK";
	_g.h[20] = "RIGHT_ANALOG_STICK";
	_g.h[21] = "DPAD";
	_g.h[26] = "TILT_PITCH";
	_g.h[27] = "TILT_ROLL";
	_g.h[28] = "POINTER_X";
	_g.h[29] = "POINTER_Y";
	_g.h[30] = "EXTRA_0";
	_g.h[31] = "EXTRA_1";
	_g.h[32] = "EXTRA_2";
	_g.h[33] = "EXTRA_3";
	_g.h[34] = "LEFT_STICK_DIGITAL_UP";
	_g.h[35] = "LEFT_STICK_DIGITAL_RIGHT";
	_g.h[36] = "LEFT_STICK_DIGITAL_DOWN";
	_g.h[37] = "LEFT_STICK_DIGITAL_LEFT";
	_g.h[38] = "RIGHT_STICK_DIGITAL_UP";
	_g.h[39] = "RIGHT_STICK_DIGITAL_RIGHT";
	_g.h[40] = "RIGHT_STICK_DIGITAL_DOWN";
	_g.h[41] = "RIGHT_STICK_DIGITAL_LEFT";
	$r = _g;
	return $r;
}(this));
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.ANY = -2;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.NONE = -1;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.A = 0;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.B = 1;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.X = 2;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.Y = 3;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_SHOULDER = 4;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_SHOULDER = 5;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.BACK = 6;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.START = 7;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_CLICK = 8;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_CLICK = 9;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.GUIDE = 10;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD_UP = 11;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD_DOWN = 12;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD_LEFT = 13;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD_RIGHT = 14;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_TRIGGER_BUTTON = 15;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_TRIGGER_BUTTON = 16;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_TRIGGER = 17;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_TRIGGER = 18;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_ANALOG_STICK = 19;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_ANALOG_STICK = 20;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.DPAD = 21;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.TILT_PITCH = 26;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.TILT_ROLL = 27;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.POINTER_X = 28;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.POINTER_Y = 29;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.EXTRA_0 = 30;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.EXTRA_1 = 31;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.EXTRA_2 = 32;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.EXTRA_3 = 33;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_DIGITAL_UP = 34;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_DIGITAL_RIGHT = 35;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_DIGITAL_DOWN = 36;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.LEFT_STICK_DIGITAL_LEFT = 37;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_DIGITAL_UP = 38;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_DIGITAL_RIGHT = 39;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_DIGITAL_DOWN = 40;
flixel_input_gamepad__$FlxGamepadInputID_FlxGamepadInputID_$Impl_$.RIGHT_STICK_DIGITAL_LEFT = 41;
openfl_ui_GameInput.isSupported = true;
openfl_ui_GameInput.numDevices = 0;
openfl_ui_GameInput.__deviceList = [];
openfl_ui_GameInput.__devices = new haxe_ds_ObjectMap();
openfl_ui_GameInput.__instances = [];
flixel_input_gamepad_FlxGamepadManager._gameInput = new openfl_ui_GameInput();
flixel_input_gamepad_id_LogitechID.ONE = 0;
flixel_input_gamepad_id_LogitechID.TWO = 1;
flixel_input_gamepad_id_LogitechID.THREE = 2;
flixel_input_gamepad_id_LogitechID.FOUR = 3;
flixel_input_gamepad_id_LogitechID.FIVE = 4;
flixel_input_gamepad_id_LogitechID.SIX = 5;
flixel_input_gamepad_id_LogitechID.SEVEN = 6;
flixel_input_gamepad_id_LogitechID.EIGHT = 7;
flixel_input_gamepad_id_LogitechID.NINE = 8;
flixel_input_gamepad_id_LogitechID.TEN = 9;
flixel_input_gamepad_id_LogitechID.LEFT_STICK_CLICK = 10;
flixel_input_gamepad_id_LogitechID.RIGHT_STICK_CLICK = 11;
flixel_input_gamepad_id_LogitechID.DPAD_UP = 16;
flixel_input_gamepad_id_LogitechID.DPAD_DOWN = 17;
flixel_input_gamepad_id_LogitechID.DPAD_LEFT = 18;
flixel_input_gamepad_id_LogitechID.DPAD_RIGHT = 19;
flixel_input_gamepad_id_LogitechID.LOGITECH = -5;
flixel_input_gamepad_id_LogitechID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 24, down : 25, left : 26, right : 27});
flixel_input_gamepad_id_LogitechID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 28, down : 29, left : 30, right : 31});
flixel_input_gamepad_id_MFiID.A = 6;
flixel_input_gamepad_id_MFiID.B = 7;
flixel_input_gamepad_id_MFiID.X = 8;
flixel_input_gamepad_id_MFiID.Y = 9;
flixel_input_gamepad_id_MFiID.LB = 15;
flixel_input_gamepad_id_MFiID.RB = 16;
flixel_input_gamepad_id_MFiID.BACK = 10;
flixel_input_gamepad_id_MFiID.START = 12;
flixel_input_gamepad_id_MFiID.LEFT_STICK_CLICK = 13;
flixel_input_gamepad_id_MFiID.RIGHT_STICK_CLICK = 14;
flixel_input_gamepad_id_MFiID.GUIDE = 11;
flixel_input_gamepad_id_MFiID.DPAD_UP = 17;
flixel_input_gamepad_id_MFiID.DPAD_DOWN = 18;
flixel_input_gamepad_id_MFiID.DPAD_LEFT = 19;
flixel_input_gamepad_id_MFiID.DPAD_RIGHT = 20;
flixel_input_gamepad_id_MFiID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 21, down : 22, left : 23, right : 24});
flixel_input_gamepad_id_MFiID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 25, down : 26, left : 27, right : 28});
flixel_input_gamepad_id_MFiID.LEFT_TRIGGER = 4;
flixel_input_gamepad_id_MFiID.RIGHT_TRIGGER = 5;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_ONE = 8;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_TWO = 9;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_A = 10;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_B = 11;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_MINUS = 12;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_PLUS = 13;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_HOME = 19;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_Z = 14;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_C = 15;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_DPAD_UP = 4;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_DPAD_DOWN = 5;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_DPAD_LEFT = 6;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_DPAD_RIGHT = 7;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_MINUS = 12;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_PLUS = 13;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_HOME = 19;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_A = 10;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_B = 11;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_ONE = 8;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_TWO = 9;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_Y = 8;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_X = 9;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_B = 10;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_A = 11;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_L = 12;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_R = 13;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_ZL = 14;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_ZR = 15;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_SELECT = 16;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_START = 17;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_HOME = 19;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_ONE = -1;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_TWO = -1;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_DPAD_UP = 4;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_DPAD_DOWN = 5;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_DPAD_LEFT = 6;
flixel_input_gamepad_id_MayflashWiiRemoteID.CLASSIC_DPAD_RIGHT = 7;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_POINTER_X = 2;
flixel_input_gamepad_id_MayflashWiiRemoteID.NUNCHUK_POINTER_Y = 3;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 22, down : 23, left : 24, right : 25, threshold : 0.5, mode : flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL});
flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 26, down : 27, left : 28, right : 29});
flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 26, down : 27, left : 28, right : 29});
flixel_input_gamepad_id_MayflashWiiRemoteID.LEFT_TRIGGER_FAKE = 4;
flixel_input_gamepad_id_MayflashWiiRemoteID.RIGHT_TRIGGER_FAKE = 5;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD_UP = 22;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD_DOWN = 23;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD_LEFT = 24;
flixel_input_gamepad_id_MayflashWiiRemoteID.REMOTE_DPAD_RIGHT = 25;
flixel_input_gamepad_id_OUYAID.O = 0;
flixel_input_gamepad_id_OUYAID.U = 3;
flixel_input_gamepad_id_OUYAID.Y = 4;
flixel_input_gamepad_id_OUYAID.A = 1;
flixel_input_gamepad_id_OUYAID.LB = 6;
flixel_input_gamepad_id_OUYAID.RB = 7;
flixel_input_gamepad_id_OUYAID.LEFT_STICK_CLICK = 10;
flixel_input_gamepad_id_OUYAID.RIGHT_STICK_CLICK = 11;
flixel_input_gamepad_id_OUYAID.HOME = 2;
flixel_input_gamepad_id_OUYAID.LEFT_TRIGGER = 8;
flixel_input_gamepad_id_OUYAID.RIGHT_TRIGGER = 9;
flixel_input_gamepad_id_OUYAID.DPAD_LEFT = 13;
flixel_input_gamepad_id_OUYAID.DPAD_RIGHT = 14;
flixel_input_gamepad_id_OUYAID.DPAD_DOWN = 15;
flixel_input_gamepad_id_OUYAID.DPAD_UP = 16;
flixel_input_gamepad_id_OUYAID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 23, down : 24, left : 25, right : 26});
flixel_input_gamepad_id_OUYAID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(11,14,{ up : 27, down : 28, left : 29, right : 30});
flixel_input_gamepad_id_OUYAID.LEFT_TRIGGER_ANALOG = 17;
flixel_input_gamepad_id_OUYAID.RIGHT_TRIGGER_ANALOG = 18;
flixel_input_gamepad_id_PS4ID.X = 6;
flixel_input_gamepad_id_PS4ID.CIRCLE = 7;
flixel_input_gamepad_id_PS4ID.SQUARE = 8;
flixel_input_gamepad_id_PS4ID.TRIANGLE = 9;
flixel_input_gamepad_id_PS4ID.SHARE = 10;
flixel_input_gamepad_id_PS4ID.PS = 11;
flixel_input_gamepad_id_PS4ID.OPTIONS = 12;
flixel_input_gamepad_id_PS4ID.LEFT_STICK_CLICK = 13;
flixel_input_gamepad_id_PS4ID.RIGHT_STICK_CLICK = 14;
flixel_input_gamepad_id_PS4ID.L1 = 15;
flixel_input_gamepad_id_PS4ID.R1 = 16;
flixel_input_gamepad_id_PS4ID.TOUCHPAD_CLICK = 21;
flixel_input_gamepad_id_PS4ID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 22, down : 23, left : 24, right : 25});
flixel_input_gamepad_id_PS4ID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 26, down : 27, left : 28, right : 29});
flixel_input_gamepad_id_PS4ID.L2 = 4;
flixel_input_gamepad_id_PS4ID.R2 = 5;
flixel_input_gamepad_id_PS4ID.DPAD_UP = 17;
flixel_input_gamepad_id_PS4ID.DPAD_DOWN = 18;
flixel_input_gamepad_id_PS4ID.DPAD_LEFT = 19;
flixel_input_gamepad_id_PS4ID.DPAD_RIGHT = 20;
flixel_input_gamepad_id_PSVitaID.X = 6;
flixel_input_gamepad_id_PSVitaID.CIRCLE = 7;
flixel_input_gamepad_id_PSVitaID.SQUARE = 8;
flixel_input_gamepad_id_PSVitaID.TRIANGLE = 9;
flixel_input_gamepad_id_PSVitaID.SELECT = 10;
flixel_input_gamepad_id_PSVitaID.START = 12;
flixel_input_gamepad_id_PSVitaID.L = 15;
flixel_input_gamepad_id_PSVitaID.R = 16;
flixel_input_gamepad_id_PSVitaID.DPAD_UP = 17;
flixel_input_gamepad_id_PSVitaID.DPAD_DOWN = 18;
flixel_input_gamepad_id_PSVitaID.DPAD_LEFT = 19;
flixel_input_gamepad_id_PSVitaID.DPAD_RIGHT = 20;
flixel_input_gamepad_id_PSVitaID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 21, down : 22, left : 23, right : 24});
flixel_input_gamepad_id_PSVitaID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 21, down : 22, left : 23, right : 24});
flixel_input_gamepad_id_WiiRemoteID.REMOTE_ONE = 9;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_TWO = 10;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_A = 11;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_B = 12;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_PLUS = 13;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_MINUS = 14;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_HOME = 15;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_A = 9;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_B = 10;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_C = 11;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_Z = 12;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_ONE = 13;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_TWO = 14;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_PLUS = 15;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_MINUS = 16;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_HOME = 17;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_DPAD_UP = 5;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_DPAD_DOWN = 6;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_DPAD_LEFT = 7;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_DPAD_RIGHT = 8;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_A = 9;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_B = 10;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_Y = 11;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_X = 12;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_L = 13;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_R = 14;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_ZL = 15;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_ZR = 16;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_START = 17;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_SELECT = 18;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_HOME = 19;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_ONE = 20;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_TWO = 21;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_DPAD_UP = 5;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_DPAD_DOWN = 6;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_DPAD_LEFT = 7;
flixel_input_gamepad_id_WiiRemoteID.CLASSIC_DPAD_RIGHT = 8;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_TILT_PITCH = 2;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_TILT_ROLL = 3;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_TILT_PITCH = 3;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_TILT_ROLL = 2;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_NULL_AXIS = 4;
flixel_input_gamepad_id_WiiRemoteID.NUNCHUK_NULL_AXIS = 4;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 22, down : 23, left : 24, right : 25, threshold : 0.5, mode : flixel_input_gamepad_FlxAnalogToDigitalMode.ONLY_DIGITAL});
flixel_input_gamepad_id_WiiRemoteID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 28, down : 29, left : 30, right : 31});
flixel_input_gamepad_id_WiiRemoteID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 32, down : 33, left : 34, right : 35});
flixel_input_gamepad_id_WiiRemoteID.LEFT_TRIGGER_FAKE = 4;
flixel_input_gamepad_id_WiiRemoteID.RIGHT_TRIGGER_FAKE = 5;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_UP = 22;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_DOWN = 23;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_LEFT = 24;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_RIGHT = 25;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_X = 26;
flixel_input_gamepad_id_WiiRemoteID.REMOTE_DPAD_Y = 27;
flixel_input_gamepad_id_XInputID.A = 6;
flixel_input_gamepad_id_XInputID.B = 7;
flixel_input_gamepad_id_XInputID.X = 8;
flixel_input_gamepad_id_XInputID.Y = 9;
flixel_input_gamepad_id_XInputID.BACK = 10;
flixel_input_gamepad_id_XInputID.GUIDE = -1;
flixel_input_gamepad_id_XInputID.START = 12;
flixel_input_gamepad_id_XInputID.LEFT_STICK_CLICK = 13;
flixel_input_gamepad_id_XInputID.RIGHT_STICK_CLICK = 14;
flixel_input_gamepad_id_XInputID.LB = 15;
flixel_input_gamepad_id_XInputID.RB = 16;
flixel_input_gamepad_id_XInputID.DPAD_UP = 17;
flixel_input_gamepad_id_XInputID.DPAD_DOWN = 18;
flixel_input_gamepad_id_XInputID.DPAD_LEFT = 19;
flixel_input_gamepad_id_XInputID.DPAD_RIGHT = 20;
flixel_input_gamepad_id_XInputID.LEFT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(0,1,{ up : 21, down : 22, left : 23, right : 24});
flixel_input_gamepad_id_XInputID.RIGHT_ANALOG_STICK = new flixel_input_gamepad_FlxGamepadAnalogStick(2,3,{ up : 25, down : 26, left : 27, right : 28});
flixel_input_gamepad_id_XInputID.LEFT_TRIGGER = 4;
flixel_input_gamepad_id_XInputID.RIGHT_TRIGGER = 5;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.fromStringMap = (function($this) {
	var $r;
	var _g = new haxe_ds_StringMap();
	if(__map_reserved["ANY"] != null) {
		_g.setReserved("ANY",-2);
	} else {
		_g.h["ANY"] = -2;
	}
	if(__map_reserved["A"] != null) {
		_g.setReserved("A",65);
	} else {
		_g.h["A"] = 65;
	}
	if(__map_reserved["B"] != null) {
		_g.setReserved("B",66);
	} else {
		_g.h["B"] = 66;
	}
	if(__map_reserved["C"] != null) {
		_g.setReserved("C",67);
	} else {
		_g.h["C"] = 67;
	}
	if(__map_reserved["D"] != null) {
		_g.setReserved("D",68);
	} else {
		_g.h["D"] = 68;
	}
	if(__map_reserved["E"] != null) {
		_g.setReserved("E",69);
	} else {
		_g.h["E"] = 69;
	}
	if(__map_reserved["F"] != null) {
		_g.setReserved("F",70);
	} else {
		_g.h["F"] = 70;
	}
	if(__map_reserved["G"] != null) {
		_g.setReserved("G",71);
	} else {
		_g.h["G"] = 71;
	}
	if(__map_reserved["H"] != null) {
		_g.setReserved("H",72);
	} else {
		_g.h["H"] = 72;
	}
	if(__map_reserved["I"] != null) {
		_g.setReserved("I",73);
	} else {
		_g.h["I"] = 73;
	}
	if(__map_reserved["J"] != null) {
		_g.setReserved("J",74);
	} else {
		_g.h["J"] = 74;
	}
	if(__map_reserved["K"] != null) {
		_g.setReserved("K",75);
	} else {
		_g.h["K"] = 75;
	}
	if(__map_reserved["L"] != null) {
		_g.setReserved("L",76);
	} else {
		_g.h["L"] = 76;
	}
	if(__map_reserved["M"] != null) {
		_g.setReserved("M",77);
	} else {
		_g.h["M"] = 77;
	}
	if(__map_reserved["N"] != null) {
		_g.setReserved("N",78);
	} else {
		_g.h["N"] = 78;
	}
	if(__map_reserved["O"] != null) {
		_g.setReserved("O",79);
	} else {
		_g.h["O"] = 79;
	}
	if(__map_reserved["P"] != null) {
		_g.setReserved("P",80);
	} else {
		_g.h["P"] = 80;
	}
	if(__map_reserved["Q"] != null) {
		_g.setReserved("Q",81);
	} else {
		_g.h["Q"] = 81;
	}
	if(__map_reserved["R"] != null) {
		_g.setReserved("R",82);
	} else {
		_g.h["R"] = 82;
	}
	if(__map_reserved["S"] != null) {
		_g.setReserved("S",83);
	} else {
		_g.h["S"] = 83;
	}
	if(__map_reserved["T"] != null) {
		_g.setReserved("T",84);
	} else {
		_g.h["T"] = 84;
	}
	if(__map_reserved["U"] != null) {
		_g.setReserved("U",85);
	} else {
		_g.h["U"] = 85;
	}
	if(__map_reserved["V"] != null) {
		_g.setReserved("V",86);
	} else {
		_g.h["V"] = 86;
	}
	if(__map_reserved["W"] != null) {
		_g.setReserved("W",87);
	} else {
		_g.h["W"] = 87;
	}
	if(__map_reserved["X"] != null) {
		_g.setReserved("X",88);
	} else {
		_g.h["X"] = 88;
	}
	if(__map_reserved["Y"] != null) {
		_g.setReserved("Y",89);
	} else {
		_g.h["Y"] = 89;
	}
	if(__map_reserved["Z"] != null) {
		_g.setReserved("Z",90);
	} else {
		_g.h["Z"] = 90;
	}
	if(__map_reserved["ZERO"] != null) {
		_g.setReserved("ZERO",48);
	} else {
		_g.h["ZERO"] = 48;
	}
	if(__map_reserved["ONE"] != null) {
		_g.setReserved("ONE",49);
	} else {
		_g.h["ONE"] = 49;
	}
	if(__map_reserved["TWO"] != null) {
		_g.setReserved("TWO",50);
	} else {
		_g.h["TWO"] = 50;
	}
	if(__map_reserved["THREE"] != null) {
		_g.setReserved("THREE",51);
	} else {
		_g.h["THREE"] = 51;
	}
	if(__map_reserved["FOUR"] != null) {
		_g.setReserved("FOUR",52);
	} else {
		_g.h["FOUR"] = 52;
	}
	if(__map_reserved["FIVE"] != null) {
		_g.setReserved("FIVE",53);
	} else {
		_g.h["FIVE"] = 53;
	}
	if(__map_reserved["SIX"] != null) {
		_g.setReserved("SIX",54);
	} else {
		_g.h["SIX"] = 54;
	}
	if(__map_reserved["SEVEN"] != null) {
		_g.setReserved("SEVEN",55);
	} else {
		_g.h["SEVEN"] = 55;
	}
	if(__map_reserved["EIGHT"] != null) {
		_g.setReserved("EIGHT",56);
	} else {
		_g.h["EIGHT"] = 56;
	}
	if(__map_reserved["NINE"] != null) {
		_g.setReserved("NINE",57);
	} else {
		_g.h["NINE"] = 57;
	}
	if(__map_reserved["PAGEUP"] != null) {
		_g.setReserved("PAGEUP",33);
	} else {
		_g.h["PAGEUP"] = 33;
	}
	if(__map_reserved["PAGEDOWN"] != null) {
		_g.setReserved("PAGEDOWN",34);
	} else {
		_g.h["PAGEDOWN"] = 34;
	}
	if(__map_reserved["HOME"] != null) {
		_g.setReserved("HOME",36);
	} else {
		_g.h["HOME"] = 36;
	}
	if(__map_reserved["END"] != null) {
		_g.setReserved("END",35);
	} else {
		_g.h["END"] = 35;
	}
	if(__map_reserved["INSERT"] != null) {
		_g.setReserved("INSERT",45);
	} else {
		_g.h["INSERT"] = 45;
	}
	if(__map_reserved["ESCAPE"] != null) {
		_g.setReserved("ESCAPE",27);
	} else {
		_g.h["ESCAPE"] = 27;
	}
	if(__map_reserved["MINUS"] != null) {
		_g.setReserved("MINUS",189);
	} else {
		_g.h["MINUS"] = 189;
	}
	if(__map_reserved["PLUS"] != null) {
		_g.setReserved("PLUS",187);
	} else {
		_g.h["PLUS"] = 187;
	}
	if(__map_reserved["DELETE"] != null) {
		_g.setReserved("DELETE",46);
	} else {
		_g.h["DELETE"] = 46;
	}
	if(__map_reserved["BACKSPACE"] != null) {
		_g.setReserved("BACKSPACE",8);
	} else {
		_g.h["BACKSPACE"] = 8;
	}
	if(__map_reserved["LBRACKET"] != null) {
		_g.setReserved("LBRACKET",219);
	} else {
		_g.h["LBRACKET"] = 219;
	}
	if(__map_reserved["RBRACKET"] != null) {
		_g.setReserved("RBRACKET",221);
	} else {
		_g.h["RBRACKET"] = 221;
	}
	if(__map_reserved["BACKSLASH"] != null) {
		_g.setReserved("BACKSLASH",220);
	} else {
		_g.h["BACKSLASH"] = 220;
	}
	if(__map_reserved["CAPSLOCK"] != null) {
		_g.setReserved("CAPSLOCK",20);
	} else {
		_g.h["CAPSLOCK"] = 20;
	}
	if(__map_reserved["SEMICOLON"] != null) {
		_g.setReserved("SEMICOLON",186);
	} else {
		_g.h["SEMICOLON"] = 186;
	}
	if(__map_reserved["QUOTE"] != null) {
		_g.setReserved("QUOTE",222);
	} else {
		_g.h["QUOTE"] = 222;
	}
	if(__map_reserved["ENTER"] != null) {
		_g.setReserved("ENTER",13);
	} else {
		_g.h["ENTER"] = 13;
	}
	if(__map_reserved["SHIFT"] != null) {
		_g.setReserved("SHIFT",16);
	} else {
		_g.h["SHIFT"] = 16;
	}
	if(__map_reserved["COMMA"] != null) {
		_g.setReserved("COMMA",188);
	} else {
		_g.h["COMMA"] = 188;
	}
	if(__map_reserved["PERIOD"] != null) {
		_g.setReserved("PERIOD",190);
	} else {
		_g.h["PERIOD"] = 190;
	}
	if(__map_reserved["SLASH"] != null) {
		_g.setReserved("SLASH",191);
	} else {
		_g.h["SLASH"] = 191;
	}
	if(__map_reserved["GRAVEACCENT"] != null) {
		_g.setReserved("GRAVEACCENT",192);
	} else {
		_g.h["GRAVEACCENT"] = 192;
	}
	if(__map_reserved["CONTROL"] != null) {
		_g.setReserved("CONTROL",17);
	} else {
		_g.h["CONTROL"] = 17;
	}
	if(__map_reserved["ALT"] != null) {
		_g.setReserved("ALT",18);
	} else {
		_g.h["ALT"] = 18;
	}
	if(__map_reserved["SPACE"] != null) {
		_g.setReserved("SPACE",32);
	} else {
		_g.h["SPACE"] = 32;
	}
	if(__map_reserved["UP"] != null) {
		_g.setReserved("UP",38);
	} else {
		_g.h["UP"] = 38;
	}
	if(__map_reserved["DOWN"] != null) {
		_g.setReserved("DOWN",40);
	} else {
		_g.h["DOWN"] = 40;
	}
	if(__map_reserved["LEFT"] != null) {
		_g.setReserved("LEFT",37);
	} else {
		_g.h["LEFT"] = 37;
	}
	if(__map_reserved["RIGHT"] != null) {
		_g.setReserved("RIGHT",39);
	} else {
		_g.h["RIGHT"] = 39;
	}
	if(__map_reserved["TAB"] != null) {
		_g.setReserved("TAB",9);
	} else {
		_g.h["TAB"] = 9;
	}
	if(__map_reserved["PRINTSCREEN"] != null) {
		_g.setReserved("PRINTSCREEN",301);
	} else {
		_g.h["PRINTSCREEN"] = 301;
	}
	if(__map_reserved["F1"] != null) {
		_g.setReserved("F1",112);
	} else {
		_g.h["F1"] = 112;
	}
	if(__map_reserved["F2"] != null) {
		_g.setReserved("F2",113);
	} else {
		_g.h["F2"] = 113;
	}
	if(__map_reserved["F3"] != null) {
		_g.setReserved("F3",114);
	} else {
		_g.h["F3"] = 114;
	}
	if(__map_reserved["F4"] != null) {
		_g.setReserved("F4",115);
	} else {
		_g.h["F4"] = 115;
	}
	if(__map_reserved["F5"] != null) {
		_g.setReserved("F5",116);
	} else {
		_g.h["F5"] = 116;
	}
	if(__map_reserved["F6"] != null) {
		_g.setReserved("F6",117);
	} else {
		_g.h["F6"] = 117;
	}
	if(__map_reserved["F7"] != null) {
		_g.setReserved("F7",118);
	} else {
		_g.h["F7"] = 118;
	}
	if(__map_reserved["F8"] != null) {
		_g.setReserved("F8",119);
	} else {
		_g.h["F8"] = 119;
	}
	if(__map_reserved["F9"] != null) {
		_g.setReserved("F9",120);
	} else {
		_g.h["F9"] = 120;
	}
	if(__map_reserved["F10"] != null) {
		_g.setReserved("F10",121);
	} else {
		_g.h["F10"] = 121;
	}
	if(__map_reserved["F11"] != null) {
		_g.setReserved("F11",122);
	} else {
		_g.h["F11"] = 122;
	}
	if(__map_reserved["F12"] != null) {
		_g.setReserved("F12",123);
	} else {
		_g.h["F12"] = 123;
	}
	if(__map_reserved["NUMPADZERO"] != null) {
		_g.setReserved("NUMPADZERO",96);
	} else {
		_g.h["NUMPADZERO"] = 96;
	}
	if(__map_reserved["NUMPADONE"] != null) {
		_g.setReserved("NUMPADONE",97);
	} else {
		_g.h["NUMPADONE"] = 97;
	}
	if(__map_reserved["NUMPADTWO"] != null) {
		_g.setReserved("NUMPADTWO",98);
	} else {
		_g.h["NUMPADTWO"] = 98;
	}
	if(__map_reserved["NUMPADTHREE"] != null) {
		_g.setReserved("NUMPADTHREE",99);
	} else {
		_g.h["NUMPADTHREE"] = 99;
	}
	if(__map_reserved["NUMPADFOUR"] != null) {
		_g.setReserved("NUMPADFOUR",100);
	} else {
		_g.h["NUMPADFOUR"] = 100;
	}
	if(__map_reserved["NUMPADFIVE"] != null) {
		_g.setReserved("NUMPADFIVE",101);
	} else {
		_g.h["NUMPADFIVE"] = 101;
	}
	if(__map_reserved["NUMPADSIX"] != null) {
		_g.setReserved("NUMPADSIX",102);
	} else {
		_g.h["NUMPADSIX"] = 102;
	}
	if(__map_reserved["NUMPADSEVEN"] != null) {
		_g.setReserved("NUMPADSEVEN",103);
	} else {
		_g.h["NUMPADSEVEN"] = 103;
	}
	if(__map_reserved["NUMPADEIGHT"] != null) {
		_g.setReserved("NUMPADEIGHT",104);
	} else {
		_g.h["NUMPADEIGHT"] = 104;
	}
	if(__map_reserved["NUMPADNINE"] != null) {
		_g.setReserved("NUMPADNINE",105);
	} else {
		_g.h["NUMPADNINE"] = 105;
	}
	if(__map_reserved["NUMPADMINUS"] != null) {
		_g.setReserved("NUMPADMINUS",109);
	} else {
		_g.h["NUMPADMINUS"] = 109;
	}
	if(__map_reserved["NUMPADPLUS"] != null) {
		_g.setReserved("NUMPADPLUS",107);
	} else {
		_g.h["NUMPADPLUS"] = 107;
	}
	if(__map_reserved["NUMPADPERIOD"] != null) {
		_g.setReserved("NUMPADPERIOD",110);
	} else {
		_g.h["NUMPADPERIOD"] = 110;
	}
	if(__map_reserved["NUMPADMULTIPLY"] != null) {
		_g.setReserved("NUMPADMULTIPLY",106);
	} else {
		_g.h["NUMPADMULTIPLY"] = 106;
	}
	$r = _g;
	return $r;
}(this));
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.toStringMap = (function($this) {
	var $r;
	var _g = new haxe_ds_IntMap();
	_g.h[-2] = "ANY";
	_g.h[65] = "A";
	_g.h[66] = "B";
	_g.h[67] = "C";
	_g.h[68] = "D";
	_g.h[69] = "E";
	_g.h[70] = "F";
	_g.h[71] = "G";
	_g.h[72] = "H";
	_g.h[73] = "I";
	_g.h[74] = "J";
	_g.h[75] = "K";
	_g.h[76] = "L";
	_g.h[77] = "M";
	_g.h[78] = "N";
	_g.h[79] = "O";
	_g.h[80] = "P";
	_g.h[81] = "Q";
	_g.h[82] = "R";
	_g.h[83] = "S";
	_g.h[84] = "T";
	_g.h[85] = "U";
	_g.h[86] = "V";
	_g.h[87] = "W";
	_g.h[88] = "X";
	_g.h[89] = "Y";
	_g.h[90] = "Z";
	_g.h[48] = "ZERO";
	_g.h[49] = "ONE";
	_g.h[50] = "TWO";
	_g.h[51] = "THREE";
	_g.h[52] = "FOUR";
	_g.h[53] = "FIVE";
	_g.h[54] = "SIX";
	_g.h[55] = "SEVEN";
	_g.h[56] = "EIGHT";
	_g.h[57] = "NINE";
	_g.h[33] = "PAGEUP";
	_g.h[34] = "PAGEDOWN";
	_g.h[36] = "HOME";
	_g.h[35] = "END";
	_g.h[45] = "INSERT";
	_g.h[27] = "ESCAPE";
	_g.h[189] = "MINUS";
	_g.h[187] = "PLUS";
	_g.h[46] = "DELETE";
	_g.h[8] = "BACKSPACE";
	_g.h[219] = "LBRACKET";
	_g.h[221] = "RBRACKET";
	_g.h[220] = "BACKSLASH";
	_g.h[20] = "CAPSLOCK";
	_g.h[186] = "SEMICOLON";
	_g.h[222] = "QUOTE";
	_g.h[13] = "ENTER";
	_g.h[16] = "SHIFT";
	_g.h[188] = "COMMA";
	_g.h[190] = "PERIOD";
	_g.h[191] = "SLASH";
	_g.h[192] = "GRAVEACCENT";
	_g.h[17] = "CONTROL";
	_g.h[18] = "ALT";
	_g.h[32] = "SPACE";
	_g.h[38] = "UP";
	_g.h[40] = "DOWN";
	_g.h[37] = "LEFT";
	_g.h[39] = "RIGHT";
	_g.h[9] = "TAB";
	_g.h[301] = "PRINTSCREEN";
	_g.h[112] = "F1";
	_g.h[113] = "F2";
	_g.h[114] = "F3";
	_g.h[115] = "F4";
	_g.h[116] = "F5";
	_g.h[117] = "F6";
	_g.h[118] = "F7";
	_g.h[119] = "F8";
	_g.h[120] = "F9";
	_g.h[121] = "F10";
	_g.h[122] = "F11";
	_g.h[123] = "F12";
	_g.h[96] = "NUMPADZERO";
	_g.h[97] = "NUMPADONE";
	_g.h[98] = "NUMPADTWO";
	_g.h[99] = "NUMPADTHREE";
	_g.h[100] = "NUMPADFOUR";
	_g.h[101] = "NUMPADFIVE";
	_g.h[102] = "NUMPADSIX";
	_g.h[103] = "NUMPADSEVEN";
	_g.h[104] = "NUMPADEIGHT";
	_g.h[105] = "NUMPADNINE";
	_g.h[109] = "NUMPADMINUS";
	_g.h[107] = "NUMPADPLUS";
	_g.h[110] = "NUMPADPERIOD";
	_g.h[106] = "NUMPADMULTIPLY";
	$r = _g;
	return $r;
}(this));
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ANY = -2;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NONE = -1;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.A = 65;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.B = 66;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.C = 67;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.D = 68;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.E = 69;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F = 70;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.G = 71;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.H = 72;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.I = 73;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.J = 74;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.K = 75;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.L = 76;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.M = 77;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.N = 78;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.O = 79;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.P = 80;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.Q = 81;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.R = 82;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.S = 83;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.T = 84;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.U = 85;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.V = 86;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.W = 87;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.X = 88;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.Y = 89;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.Z = 90;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ZERO = 48;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ONE = 49;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.TWO = 50;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.THREE = 51;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.FOUR = 52;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.FIVE = 53;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SIX = 54;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SEVEN = 55;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.EIGHT = 56;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NINE = 57;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PAGEUP = 33;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PAGEDOWN = 34;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.HOME = 36;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.END = 35;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.INSERT = 45;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ESCAPE = 27;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.MINUS = 189;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PLUS = 187;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.DELETE = 46;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.BACKSPACE = 8;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.LBRACKET = 219;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.RBRACKET = 221;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.BACKSLASH = 220;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.CAPSLOCK = 20;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SEMICOLON = 186;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.QUOTE = 222;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ENTER = 13;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SHIFT = 16;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.COMMA = 188;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PERIOD = 190;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SLASH = 191;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.GRAVEACCENT = 192;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.CONTROL = 17;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.ALT = 18;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.SPACE = 32;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.UP = 38;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.DOWN = 40;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.LEFT = 37;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.RIGHT = 39;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.TAB = 9;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.PRINTSCREEN = 301;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F1 = 112;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F2 = 113;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F3 = 114;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F4 = 115;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F5 = 116;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F6 = 117;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F7 = 118;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F8 = 119;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F9 = 120;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F10 = 121;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F11 = 122;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.F12 = 123;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADZERO = 96;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADONE = 97;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADTWO = 98;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADTHREE = 99;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADFOUR = 100;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADFIVE = 101;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADSIX = 102;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADSEVEN = 103;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADEIGHT = 104;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADNINE = 105;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADMINUS = 109;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADPLUS = 107;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADPERIOD = 110;
flixel_input_keyboard__$FlxKey_FlxKey_$Impl_$.NUMPADMULTIPLY = 106;
flixel_input_mouse__$FlxMouse_GraphicCursor.resourceType = "image/png";
flixel_input_mouse__$FlxMouse_GraphicCursor.resourceName = "__ASSET__:bitmap_flixel_input_mouse__FlxMouse_GraphicCursor";
flixel_input_touch_FlxTouchManager.maxTouchPoints = 0;
flixel_math_FlxMath.MIN_VALUE_FLOAT = 0.0000000000000001;
flixel_math_FlxMath.MAX_VALUE_FLOAT = 1.79e+308;
flixel_math_FlxMath.MIN_VALUE_INT = -2147483647;
flixel_math_FlxMath.MAX_VALUE_INT = 2147483647;
flixel_math_FlxMath.SQUARE_ROOT_OF_TWO = 1.41421356237;
flixel_math_FlxMath.EPSILON = 0.0000001;
flixel_math_FlxVector.EPSILON = 0.0000001;
flixel_math_FlxVector.EPSILON_SQUARED = 9.99999999999999841e-15;
flixel_math_FlxVector._pool = new flixel_util_FlxPool_$flixel_$math_$FlxVector(flixel_math_FlxVector);
flixel_math_FlxVector._vector1 = new flixel_math_FlxVector();
flixel_math_FlxVector._vector2 = new flixel_math_FlxVector();
flixel_math_FlxVector._vector3 = new flixel_math_FlxVector();
flixel_system_GraphicLogo.resourceType = "image/png";
flixel_system_GraphicLogo.resourceName = "__ASSET__:bitmap_flixel_system_GraphicLogo";
flixel_system_GraphicVirtualInput.resourceType = "image/png";
flixel_system_GraphicVirtualInput.resourceName = "__ASSET__:bitmap_flixel_system_GraphicVirtualInput";
flixel_system_VirtualInputData.resourceName = "__ASSET__:file_flixel_system_VirtualInputData";
flixel_system_FlxAssets.FONT_DEFAULT = "Nokia Cellphone FC Small";
flixel_system_FlxAssets.FONT_DEBUGGER = "Monsterrat";
flixel_system_FlxBasePreloader.LOCAL = "localhost";
flixel_system_FlxLinkedList._NUM_CACHED_FLX_LIST = 0;
flixel_system__$FlxPreloader_GraphicLogoLight.resourceType = "image/png";
flixel_system__$FlxPreloader_GraphicLogoLight.resourceName = "__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoLight";
flixel_system__$FlxPreloader_GraphicLogoCorners.resourceType = "image/png";
flixel_system__$FlxPreloader_GraphicLogoCorners.resourceName = "__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoCorners";
flixel_system_FlxQuadTree.A_LIST = 0;
flixel_system_FlxQuadTree.B_LIST = 1;
flixel_system_FlxQuadTree._NUM_CACHED_QUAD_TREES = 0;
flixel_system_debug__$FlxDebugger_GraphicFlixel.resourceType = "image/png";
flixel_system_debug__$FlxDebugger_GraphicFlixel.resourceName = "__ASSET__:bitmap_flixel_system_debug__FlxDebugger_GraphicFlixel";
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.resourceType = "image/png";
flixel_system_debug__$FlxDebugger_GraphicDrawDebug.resourceName = "__ASSET__:bitmap_flixel_system_debug__FlxDebugger_GraphicDrawDebug";
flixel_system_debug_GraphicLog.resourceType = "image/png";
flixel_system_debug_GraphicLog.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicLog";
flixel_system_debug_GraphicStats.resourceType = "image/png";
flixel_system_debug_GraphicStats.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicStats";
flixel_system_debug_GraphicWatch.resourceType = "image/png";
flixel_system_debug_GraphicWatch.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicWatch";
flixel_system_debug_GraphicBitmapLog.resourceType = "image/png";
flixel_system_debug_GraphicBitmapLog.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicBitmapLog";
flixel_system_debug_GraphicConsole.resourceType = "image/png";
flixel_system_debug_GraphicConsole.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicConsole";
flixel_system_debug_GraphicArrowLeft.resourceType = "image/png";
flixel_system_debug_GraphicArrowLeft.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicArrowLeft";
flixel_system_debug_GraphicArrowRight.resourceType = "image/png";
flixel_system_debug_GraphicArrowRight.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicArrowRight";
flixel_system_debug_GraphicCloseButton.resourceType = "image/png";
flixel_system_debug_GraphicCloseButton.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicCloseButton";
flixel_system_debug_GraphicInteractive.resourceType = "image/png";
flixel_system_debug_GraphicInteractive.resourceName = "__ASSET__:bitmap_flixel_system_debug_GraphicInteractive";
flixel_system_debug__$Window_GraphicWindowHandle.resourceType = "image/png";
flixel_system_debug__$Window_GraphicWindowHandle.resourceName = "__ASSET__:bitmap_flixel_system_debug__Window_GraphicWindowHandle";
flixel_system_debug_Window.BG_COLOR = -580952225;
flixel_system_debug_Window.HEADER_COLOR = -1157627904;
flixel_system_debug_Window.HEADER_ALPHA = 0.8;
flixel_system_debug_Window.HEADER_HEIGHT = 15;
flixel_system_debug_Window.WINDOW_AMOUNT = 0;
flixel_system_debug_completion_CompletionListEntry.WIDTH = 150;
flixel_system_debug_completion_CompletionListEntry.HEIGHT = 20;
flixel_system_debug_completion_CompletionListEntry.COLOR_NORMAL = -10526881;
flixel_system_debug_completion_CompletionListEntry.COLOR_HIGHLIGHT = -9605779;
flixel_system_debug_completion_CompletionListEntry.GUTTER = 4;
flixel_system_debug_completion_CompletionListScrollBar.BG_COLOR = -12303292;
flixel_system_debug_completion_CompletionListScrollBar.HANDLE_COLOR = -14540254;
flixel_system_debug_interaction_tools_GraphicEraserTool.resourceType = "image/png";
flixel_system_debug_interaction_tools_GraphicEraserTool.resourceName = "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicEraserTool";
flixel_system_debug_interaction_tools_GraphicMoverTool.resourceType = "image/png";
flixel_system_debug_interaction_tools_GraphicMoverTool.resourceName = "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicMoverTool";
flixel_system_debug_interaction_tools_GraphicCursorCross.resourceType = "image/png";
flixel_system_debug_interaction_tools_GraphicCursorCross.resourceName = "__ASSET__:bitmap_flixel_system_debug_interaction_tools_GraphicCursorCross";
flixel_system_debug_log_LogStyle.NORMAL = new flixel_system_debug_log_LogStyle();
flixel_system_debug_log_LogStyle.WARNING = new flixel_system_debug_log_LogStyle("[WARNING] ","D9F85C",12,false,false,false,"flixel/sounds/beep",true);
flixel_system_debug_log_LogStyle.ERROR = new flixel_system_debug_log_LogStyle("[ERROR] ","FF8888",12,false,false,false,"flixel/sounds/beep",true);
flixel_system_debug_log_LogStyle.NOTICE = new flixel_system_debug_log_LogStyle("[NOTICE] ","5CF878",12,false);
flixel_system_debug_log_LogStyle.CONSOLE = new flixel_system_debug_log_LogStyle("&#62; ","5A96FA",12,false);
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.resourceType = "image/png";
flixel_system_debug_stats__$Stats_GraphicMinimizeButton.resourceName = "__ASSET__:bitmap_flixel_system_debug_stats__Stats_GraphicMinimizeButton";
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.resourceType = "image/png";
flixel_system_debug_stats__$Stats_GraphicMaximizeButton.resourceName = "__ASSET__:bitmap_flixel_system_debug_stats__Stats_GraphicMaximizeButton";
flixel_text__$FlxText_FlxTextAlign_$Impl_$.LEFT = "left";
flixel_text__$FlxText_FlxTextAlign_$Impl_$.CENTER = "center";
flixel_text__$FlxText_FlxTextAlign_$Impl_$.RIGHT = "right";
flixel_text__$FlxText_FlxTextAlign_$Impl_$.JUSTIFY = "justify";
flixel_tile_GraphicAuto.resourceType = "image/png";
flixel_tile_GraphicAuto.resourceName = "__ASSET__:bitmap_flixel_tile_GraphicAuto";
flixel_tile_GraphicAutoAlt.resourceType = "image/png";
flixel_tile_GraphicAutoAlt.resourceName = "__ASSET__:bitmap_flixel_tile_GraphicAutoAlt";
flixel_tweens_FlxEase.PI2 = Math.PI / 2;
flixel_tweens_FlxEase.EL = 2 * Math.PI / .45;
flixel_tweens_FlxEase.B1 = 0.363636363636363646;
flixel_tweens_FlxEase.B2 = 0.727272727272727293;
flixel_tweens_FlxEase.B3 = 0.545454545454545414;
flixel_tweens_FlxEase.B4 = 0.909090909090909061;
flixel_tweens_FlxEase.B5 = 0.818181818181818232;
flixel_tweens_FlxEase.B6 = 0.954545454545454586;
flixel_tweens_FlxEase.ELASTIC_AMPLITUDE = 1;
flixel_tweens_FlxEase.ELASTIC_PERIOD = 0.4;
flixel_tweens_FlxTween.PERSIST = 1;
flixel_tweens_FlxTween.LOOPING = 2;
flixel_tweens_FlxTween.PINGPONG = 4;
flixel_tweens_FlxTween.ONESHOT = 8;
flixel_tweens_FlxTween.BACKWARD = 16;
flixel_ui_FlxButton.NORMAL = 0;
flixel_ui_FlxButton.HIGHLIGHT = 1;
flixel_ui_FlxButton.PRESSED = 2;
flixel_util_FlxBitmapDataPool.maxLength = 8;
flixel_util_FlxBitmapDataPool.$length = 0;
flixel_util_FlxBitmapDataPool._head = null;
flixel_util_FlxBitmapDataPool._tail = null;
flixel_util_FlxBitmapDataPool._rect = new openfl_geom_Rectangle();
flixel_util_FlxBitmapDataUtil.matrix = new flixel_math_FlxMatrix();
flixel_util_FlxCollision.pointA = new flixel_math_FlxVector();
flixel_util_FlxCollision.pointB = new flixel_math_FlxVector();
flixel_util_FlxCollision.centerA = new flixel_math_FlxVector();
flixel_util_FlxCollision.centerB = new flixel_math_FlxVector();
flixel_util_FlxCollision.matrixA = new flixel_math_FlxMatrix();
flixel_util_FlxCollision.matrixB = new flixel_math_FlxMatrix();
flixel_util_FlxCollision.testMatrix = new flixel_math_FlxMatrix();
flixel_util_FlxCollision.boundsA = new flixel_math_FlxRect();
flixel_util_FlxCollision.boundsB = new flixel_math_FlxRect();
flixel_util_FlxCollision.intersect = new flixel_math_FlxRect();
flixel_util_FlxCollision.flashRect = new openfl_geom_Rectangle();
flixel_util__$FlxColor_FlxColor_$Impl_$.TRANSPARENT = 0;
flixel_util__$FlxColor_FlxColor_$Impl_$.WHITE = -1;
flixel_util__$FlxColor_FlxColor_$Impl_$.GRAY = -8355712;
flixel_util__$FlxColor_FlxColor_$Impl_$.BLACK = -16777216;
flixel_util__$FlxColor_FlxColor_$Impl_$.GREEN = -16744448;
flixel_util__$FlxColor_FlxColor_$Impl_$.LIME = -16711936;
flixel_util__$FlxColor_FlxColor_$Impl_$.YELLOW = -256;
flixel_util__$FlxColor_FlxColor_$Impl_$.ORANGE = -23296;
flixel_util__$FlxColor_FlxColor_$Impl_$.RED = -65536;
flixel_util__$FlxColor_FlxColor_$Impl_$.PURPLE = -8388480;
flixel_util__$FlxColor_FlxColor_$Impl_$.BLUE = -16776961;
flixel_util__$FlxColor_FlxColor_$Impl_$.BROWN = -7650029;
flixel_util__$FlxColor_FlxColor_$Impl_$.PINK = -16181;
flixel_util__$FlxColor_FlxColor_$Impl_$.MAGENTA = -65281;
flixel_util__$FlxColor_FlxColor_$Impl_$.CYAN = -16711681;
flixel_util__$FlxColor_FlxColor_$Impl_$.colorLookup = (function($this) {
	var $r;
	var _g = new haxe_ds_StringMap();
	if(__map_reserved["TRANSPARENT"] != null) {
		_g.setReserved("TRANSPARENT",0);
	} else {
		_g.h["TRANSPARENT"] = 0;
	}
	if(__map_reserved["WHITE"] != null) {
		_g.setReserved("WHITE",-1);
	} else {
		_g.h["WHITE"] = -1;
	}
	if(__map_reserved["GRAY"] != null) {
		_g.setReserved("GRAY",-8355712);
	} else {
		_g.h["GRAY"] = -8355712;
	}
	if(__map_reserved["BLACK"] != null) {
		_g.setReserved("BLACK",-16777216);
	} else {
		_g.h["BLACK"] = -16777216;
	}
	if(__map_reserved["GREEN"] != null) {
		_g.setReserved("GREEN",-16744448);
	} else {
		_g.h["GREEN"] = -16744448;
	}
	if(__map_reserved["LIME"] != null) {
		_g.setReserved("LIME",-16711936);
	} else {
		_g.h["LIME"] = -16711936;
	}
	if(__map_reserved["YELLOW"] != null) {
		_g.setReserved("YELLOW",-256);
	} else {
		_g.h["YELLOW"] = -256;
	}
	if(__map_reserved["ORANGE"] != null) {
		_g.setReserved("ORANGE",-23296);
	} else {
		_g.h["ORANGE"] = -23296;
	}
	if(__map_reserved["RED"] != null) {
		_g.setReserved("RED",-65536);
	} else {
		_g.h["RED"] = -65536;
	}
	if(__map_reserved["PURPLE"] != null) {
		_g.setReserved("PURPLE",-8388480);
	} else {
		_g.h["PURPLE"] = -8388480;
	}
	if(__map_reserved["BLUE"] != null) {
		_g.setReserved("BLUE",-16776961);
	} else {
		_g.h["BLUE"] = -16776961;
	}
	if(__map_reserved["BROWN"] != null) {
		_g.setReserved("BROWN",-7650029);
	} else {
		_g.h["BROWN"] = -7650029;
	}
	if(__map_reserved["PINK"] != null) {
		_g.setReserved("PINK",-16181);
	} else {
		_g.h["PINK"] = -16181;
	}
	if(__map_reserved["MAGENTA"] != null) {
		_g.setReserved("MAGENTA",-65281);
	} else {
		_g.h["MAGENTA"] = -65281;
	}
	if(__map_reserved["CYAN"] != null) {
		_g.setReserved("CYAN",-16711681);
	} else {
		_g.h["CYAN"] = -16711681;
	}
	$r = _g;
	return $r;
}(this));
flixel_util__$FlxColor_FlxColor_$Impl_$.COLOR_REGEX = new EReg("^(0x|#)(([A-F0-9]{2}){3,4})$","i");
flixel_util_FlxPath.FORWARD = 0;
flixel_util_FlxPath.BACKWARD = 1;
flixel_util_FlxPath.LOOP_FORWARD = 16;
flixel_util_FlxPath.LOOP_BACKWARD = 256;
flixel_util_FlxPath.YOYO = 4096;
flixel_util_FlxPath.HORIZONTAL_ONLY = 65536;
flixel_util_FlxPath.VERTICAL_ONLY = 1048576;
flixel_util_FlxPath._point = (function($this) {
	var $r;
	var point = flixel_math_FlxPoint._pool.get().set(0,0);
	point._inPool = false;
	$r = point;
	return $r;
}(this));
flixel_util_FlxSort.ASCENDING = -1;
flixel_util_FlxSort.DESCENDING = 1;
flixel_util_FlxSpriteUtil.flashGfxSprite = new openfl_display_Sprite();
flixel_util_FlxSpriteUtil.flashGfx = flixel_util_FlxSpriteUtil.flashGfxSprite.get_graphics();
flixel_util_LabelValuePair._pool = new flixel_util_FlxPool_$flixel_$util_$LabelValuePair(flixel_util_LabelValuePair);
haxe_Serializer.USE_CACHE = false;
haxe_Serializer.USE_ENUM_INDEX = false;
haxe_Serializer.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
haxe_Serializer.BASE64_CODES = null;
haxe_Unserializer.DEFAULT_RESOLVER = new haxe__$Unserializer_DefaultResolver();
haxe_Unserializer.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
haxe_Unserializer.CODES = null;
haxe_crypto_Base64.CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
haxe_crypto_Base64.BYTES = haxe_io_Bytes.ofString(haxe_crypto_Base64.CHARS);
haxe_ds_ObjectMap.count = 0;
haxe_io_FPHelper.i64tmp = new haxe__$Int64__$_$_$Int64(0,0);
haxe_xml_Parser.escapes = (function($this) {
	var $r;
	var h = new haxe_ds_StringMap();
	if(__map_reserved["lt"] != null) {
		h.setReserved("lt","<");
	} else {
		h.h["lt"] = "<";
	}
	if(__map_reserved["gt"] != null) {
		h.setReserved("gt",">");
	} else {
		h.h["gt"] = ">";
	}
	if(__map_reserved["amp"] != null) {
		h.setReserved("amp","&");
	} else {
		h.h["amp"] = "&";
	}
	if(__map_reserved["quot"] != null) {
		h.setReserved("quot","\"");
	} else {
		h.h["quot"] = "\"";
	}
	if(__map_reserved["apos"] != null) {
		h.setReserved("apos","'");
	} else {
		h.h["apos"] = "'";
	}
	$r = h;
	return $r;
}(this));
js_html_compat_Float32Array.BYTES_PER_ELEMENT = 4;
js_html_compat_Uint8Array.BYTES_PER_ELEMENT = 1;
lime_Assets.cache = new lime_AssetCache();
lime_Assets.libraries = new haxe_ds_StringMap();
lime_Assets.onChange = new lime_app_Event_$Void_$Void();
lime_Assets.initialized = false;
lime__$backend_html5_HTML5Window.windowID = 0;
lime_app_Preloader.images = new haxe_ds_StringMap();
lime_app_Preloader.loaders = new haxe_ds_StringMap();
lime_audio_openal_AL.NONE = 0;
lime_audio_openal_AL.FALSE = 0;
lime_audio_openal_AL.TRUE = 1;
lime_audio_openal_AL.SOURCE_RELATIVE = 514;
lime_audio_openal_AL.CONE_INNER_ANGLE = 4097;
lime_audio_openal_AL.CONE_OUTER_ANGLE = 4098;
lime_audio_openal_AL.PITCH = 4099;
lime_audio_openal_AL.POSITION = 4100;
lime_audio_openal_AL.DIRECTION = 4101;
lime_audio_openal_AL.VELOCITY = 4102;
lime_audio_openal_AL.LOOPING = 4103;
lime_audio_openal_AL.BUFFER = 4105;
lime_audio_openal_AL.GAIN = 4106;
lime_audio_openal_AL.MIN_GAIN = 4109;
lime_audio_openal_AL.MAX_GAIN = 4110;
lime_audio_openal_AL.ORIENTATION = 4111;
lime_audio_openal_AL.SOURCE_STATE = 4112;
lime_audio_openal_AL.INITIAL = 4113;
lime_audio_openal_AL.PLAYING = 4114;
lime_audio_openal_AL.PAUSED = 4115;
lime_audio_openal_AL.STOPPED = 4116;
lime_audio_openal_AL.BUFFERS_QUEUED = 4117;
lime_audio_openal_AL.BUFFERS_PROCESSED = 4118;
lime_audio_openal_AL.REFERENCE_DISTANCE = 4128;
lime_audio_openal_AL.ROLLOFF_FACTOR = 4129;
lime_audio_openal_AL.CONE_OUTER_GAIN = 4130;
lime_audio_openal_AL.MAX_DISTANCE = 4131;
lime_audio_openal_AL.SEC_OFFSET = 4132;
lime_audio_openal_AL.SAMPLE_OFFSET = 4133;
lime_audio_openal_AL.BYTE_OFFSET = 4134;
lime_audio_openal_AL.SOURCE_TYPE = 4135;
lime_audio_openal_AL.STATIC = 4136;
lime_audio_openal_AL.STREAMING = 4137;
lime_audio_openal_AL.UNDETERMINED = 4144;
lime_audio_openal_AL.FORMAT_MONO8 = 4352;
lime_audio_openal_AL.FORMAT_MONO16 = 4353;
lime_audio_openal_AL.FORMAT_STEREO8 = 4354;
lime_audio_openal_AL.FORMAT_STEREO16 = 4355;
lime_audio_openal_AL.FREQUENCY = 8193;
lime_audio_openal_AL.BITS = 8194;
lime_audio_openal_AL.CHANNELS = 8195;
lime_audio_openal_AL.SIZE = 8196;
lime_audio_openal_AL.NO_ERROR = 0;
lime_audio_openal_AL.INVALID_NAME = 40961;
lime_audio_openal_AL.INVALID_ENUM = 40962;
lime_audio_openal_AL.INVALID_VALUE = 40963;
lime_audio_openal_AL.INVALID_OPERATION = 40964;
lime_audio_openal_AL.OUT_OF_MEMORY = 40965;
lime_audio_openal_AL.VENDOR = 45057;
lime_audio_openal_AL.VERSION = 45058;
lime_audio_openal_AL.RENDERER = 45059;
lime_audio_openal_AL.EXTENSIONS = 45060;
lime_audio_openal_AL.DOPPLER_FACTOR = 49152;
lime_audio_openal_AL.SPEED_OF_SOUND = 49155;
lime_audio_openal_AL.DOPPLER_VELOCITY = 49153;
lime_audio_openal_AL.DISTANCE_MODEL = 53248;
lime_audio_openal_AL.INVERSE_DISTANCE = 53249;
lime_audio_openal_AL.INVERSE_DISTANCE_CLAMPED = 53250;
lime_audio_openal_AL.LINEAR_DISTANCE = 53251;
lime_audio_openal_AL.LINEAR_DISTANCE_CLAMPED = 53252;
lime_audio_openal_AL.EXPONENT_DISTANCE = 53253;
lime_audio_openal_AL.EXPONENT_DISTANCE_CLAMPED = 53254;
lime_audio_openal_ALC.FALSE = 0;
lime_audio_openal_ALC.TRUE = 1;
lime_audio_openal_ALC.FREQUENCY = 4103;
lime_audio_openal_ALC.REFRESH = 4104;
lime_audio_openal_ALC.SYNC = 4105;
lime_audio_openal_ALC.MONO_SOURCES = 4112;
lime_audio_openal_ALC.STEREO_SOURCES = 4113;
lime_audio_openal_ALC.NO_ERROR = 0;
lime_audio_openal_ALC.INVALID_DEVICE = 40961;
lime_audio_openal_ALC.INVALID_CONTEXT = 40962;
lime_audio_openal_ALC.INVALID_ENUM = 40963;
lime_audio_openal_ALC.INVALID_VALUE = 40964;
lime_audio_openal_ALC.OUT_OF_MEMORY = 40965;
lime_audio_openal_ALC.ATTRIBUTES_SIZE = 4098;
lime_audio_openal_ALC.ALL_ATTRIBUTES = 4099;
lime_audio_openal_ALC.DEFAULT_DEVICE_SPECIFIER = 4100;
lime_audio_openal_ALC.DEVICE_SPECIFIER = 4101;
lime_audio_openal_ALC.EXTENSIONS = 4102;
lime_audio_openal_ALC.ENUMERATE_ALL_EXT = 1;
lime_audio_openal_ALC.DEFAULT_ALL_DEVICES_SPECIFIER = 4114;
lime_audio_openal_ALC.ALL_DEVICES_SPECIFIER = 4115;
lime_graphics_Image.__base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
lime_graphics_cairo__$CairoFTFontFace_CairoFTFontFace_$Impl_$.FT_LOAD_FORCE_AUTOHINT = 32;
lime_graphics_opengl_GL.DEPTH_BUFFER_BIT = 256;
lime_graphics_opengl_GL.STENCIL_BUFFER_BIT = 1024;
lime_graphics_opengl_GL.COLOR_BUFFER_BIT = 16384;
lime_graphics_opengl_GL.POINTS = 0;
lime_graphics_opengl_GL.LINES = 1;
lime_graphics_opengl_GL.LINE_LOOP = 2;
lime_graphics_opengl_GL.LINE_STRIP = 3;
lime_graphics_opengl_GL.TRIANGLES = 4;
lime_graphics_opengl_GL.TRIANGLE_STRIP = 5;
lime_graphics_opengl_GL.TRIANGLE_FAN = 6;
lime_graphics_opengl_GL.ZERO = 0;
lime_graphics_opengl_GL.ONE = 1;
lime_graphics_opengl_GL.SRC_COLOR = 768;
lime_graphics_opengl_GL.ONE_MINUS_SRC_COLOR = 769;
lime_graphics_opengl_GL.SRC_ALPHA = 770;
lime_graphics_opengl_GL.ONE_MINUS_SRC_ALPHA = 771;
lime_graphics_opengl_GL.DST_ALPHA = 772;
lime_graphics_opengl_GL.ONE_MINUS_DST_ALPHA = 773;
lime_graphics_opengl_GL.DST_COLOR = 774;
lime_graphics_opengl_GL.ONE_MINUS_DST_COLOR = 775;
lime_graphics_opengl_GL.SRC_ALPHA_SATURATE = 776;
lime_graphics_opengl_GL.FUNC_ADD = 32774;
lime_graphics_opengl_GL.BLEND_EQUATION = 32777;
lime_graphics_opengl_GL.BLEND_EQUATION_RGB = 32777;
lime_graphics_opengl_GL.BLEND_EQUATION_ALPHA = 34877;
lime_graphics_opengl_GL.FUNC_SUBTRACT = 32778;
lime_graphics_opengl_GL.FUNC_REVERSE_SUBTRACT = 32779;
lime_graphics_opengl_GL.BLEND_DST_RGB = 32968;
lime_graphics_opengl_GL.BLEND_SRC_RGB = 32969;
lime_graphics_opengl_GL.BLEND_DST_ALPHA = 32970;
lime_graphics_opengl_GL.BLEND_SRC_ALPHA = 32971;
lime_graphics_opengl_GL.CONSTANT_COLOR = 32769;
lime_graphics_opengl_GL.ONE_MINUS_CONSTANT_COLOR = 32770;
lime_graphics_opengl_GL.CONSTANT_ALPHA = 32771;
lime_graphics_opengl_GL.ONE_MINUS_CONSTANT_ALPHA = 32772;
lime_graphics_opengl_GL.BLEND_COLOR = 32773;
lime_graphics_opengl_GL.ARRAY_BUFFER = 34962;
lime_graphics_opengl_GL.ELEMENT_ARRAY_BUFFER = 34963;
lime_graphics_opengl_GL.ARRAY_BUFFER_BINDING = 34964;
lime_graphics_opengl_GL.ELEMENT_ARRAY_BUFFER_BINDING = 34965;
lime_graphics_opengl_GL.STREAM_DRAW = 35040;
lime_graphics_opengl_GL.STATIC_DRAW = 35044;
lime_graphics_opengl_GL.DYNAMIC_DRAW = 35048;
lime_graphics_opengl_GL.BUFFER_SIZE = 34660;
lime_graphics_opengl_GL.BUFFER_USAGE = 34661;
lime_graphics_opengl_GL.CURRENT_VERTEX_ATTRIB = 34342;
lime_graphics_opengl_GL.FRONT = 1028;
lime_graphics_opengl_GL.BACK = 1029;
lime_graphics_opengl_GL.FRONT_AND_BACK = 1032;
lime_graphics_opengl_GL.CULL_FACE = 2884;
lime_graphics_opengl_GL.BLEND = 3042;
lime_graphics_opengl_GL.DITHER = 3024;
lime_graphics_opengl_GL.STENCIL_TEST = 2960;
lime_graphics_opengl_GL.DEPTH_TEST = 2929;
lime_graphics_opengl_GL.SCISSOR_TEST = 3089;
lime_graphics_opengl_GL.POLYGON_OFFSET_FILL = 32823;
lime_graphics_opengl_GL.SAMPLE_ALPHA_TO_COVERAGE = 32926;
lime_graphics_opengl_GL.SAMPLE_COVERAGE = 32928;
lime_graphics_opengl_GL.NO_ERROR = 0;
lime_graphics_opengl_GL.INVALID_ENUM = 1280;
lime_graphics_opengl_GL.INVALID_VALUE = 1281;
lime_graphics_opengl_GL.INVALID_OPERATION = 1282;
lime_graphics_opengl_GL.OUT_OF_MEMORY = 1285;
lime_graphics_opengl_GL.CW = 2304;
lime_graphics_opengl_GL.CCW = 2305;
lime_graphics_opengl_GL.LINE_WIDTH = 2849;
lime_graphics_opengl_GL.ALIASED_POINT_SIZE_RANGE = 33901;
lime_graphics_opengl_GL.ALIASED_LINE_WIDTH_RANGE = 33902;
lime_graphics_opengl_GL.CULL_FACE_MODE = 2885;
lime_graphics_opengl_GL.FRONT_FACE = 2886;
lime_graphics_opengl_GL.DEPTH_RANGE = 2928;
lime_graphics_opengl_GL.DEPTH_WRITEMASK = 2930;
lime_graphics_opengl_GL.DEPTH_CLEAR_VALUE = 2931;
lime_graphics_opengl_GL.DEPTH_FUNC = 2932;
lime_graphics_opengl_GL.STENCIL_CLEAR_VALUE = 2961;
lime_graphics_opengl_GL.STENCIL_FUNC = 2962;
lime_graphics_opengl_GL.STENCIL_FAIL = 2964;
lime_graphics_opengl_GL.STENCIL_PASS_DEPTH_FAIL = 2965;
lime_graphics_opengl_GL.STENCIL_PASS_DEPTH_PASS = 2966;
lime_graphics_opengl_GL.STENCIL_REF = 2967;
lime_graphics_opengl_GL.STENCIL_VALUE_MASK = 2963;
lime_graphics_opengl_GL.STENCIL_WRITEMASK = 2968;
lime_graphics_opengl_GL.STENCIL_BACK_FUNC = 34816;
lime_graphics_opengl_GL.STENCIL_BACK_FAIL = 34817;
lime_graphics_opengl_GL.STENCIL_BACK_PASS_DEPTH_FAIL = 34818;
lime_graphics_opengl_GL.STENCIL_BACK_PASS_DEPTH_PASS = 34819;
lime_graphics_opengl_GL.STENCIL_BACK_REF = 36003;
lime_graphics_opengl_GL.STENCIL_BACK_VALUE_MASK = 36004;
lime_graphics_opengl_GL.STENCIL_BACK_WRITEMASK = 36005;
lime_graphics_opengl_GL.VIEWPORT = 2978;
lime_graphics_opengl_GL.SCISSOR_BOX = 3088;
lime_graphics_opengl_GL.COLOR_CLEAR_VALUE = 3106;
lime_graphics_opengl_GL.COLOR_WRITEMASK = 3107;
lime_graphics_opengl_GL.UNPACK_ALIGNMENT = 3317;
lime_graphics_opengl_GL.PACK_ALIGNMENT = 3333;
lime_graphics_opengl_GL.MAX_TEXTURE_SIZE = 3379;
lime_graphics_opengl_GL.MAX_VIEWPORT_DIMS = 3386;
lime_graphics_opengl_GL.SUBPIXEL_BITS = 3408;
lime_graphics_opengl_GL.RED_BITS = 3410;
lime_graphics_opengl_GL.GREEN_BITS = 3411;
lime_graphics_opengl_GL.BLUE_BITS = 3412;
lime_graphics_opengl_GL.ALPHA_BITS = 3413;
lime_graphics_opengl_GL.DEPTH_BITS = 3414;
lime_graphics_opengl_GL.STENCIL_BITS = 3415;
lime_graphics_opengl_GL.POLYGON_OFFSET_UNITS = 10752;
lime_graphics_opengl_GL.POLYGON_OFFSET_FACTOR = 32824;
lime_graphics_opengl_GL.TEXTURE_BINDING_2D = 32873;
lime_graphics_opengl_GL.SAMPLE_BUFFERS = 32936;
lime_graphics_opengl_GL.SAMPLES = 32937;
lime_graphics_opengl_GL.SAMPLE_COVERAGE_VALUE = 32938;
lime_graphics_opengl_GL.SAMPLE_COVERAGE_INVERT = 32939;
lime_graphics_opengl_GL.COMPRESSED_TEXTURE_FORMATS = 34467;
lime_graphics_opengl_GL.DONT_CARE = 4352;
lime_graphics_opengl_GL.FASTEST = 4353;
lime_graphics_opengl_GL.NICEST = 4354;
lime_graphics_opengl_GL.GENERATE_MIPMAP_HINT = 33170;
lime_graphics_opengl_GL.BYTE = 5120;
lime_graphics_opengl_GL.UNSIGNED_BYTE = 5121;
lime_graphics_opengl_GL.SHORT = 5122;
lime_graphics_opengl_GL.UNSIGNED_SHORT = 5123;
lime_graphics_opengl_GL.INT = 5124;
lime_graphics_opengl_GL.UNSIGNED_INT = 5125;
lime_graphics_opengl_GL.FLOAT = 5126;
lime_graphics_opengl_GL.DEPTH_COMPONENT = 6402;
lime_graphics_opengl_GL.ALPHA = 6406;
lime_graphics_opengl_GL.RGB = 6407;
lime_graphics_opengl_GL.RGBA = 6408;
lime_graphics_opengl_GL.BGR_EXT = 32992;
lime_graphics_opengl_GL.BGRA_EXT = 32993;
lime_graphics_opengl_GL.LUMINANCE = 6409;
lime_graphics_opengl_GL.LUMINANCE_ALPHA = 6410;
lime_graphics_opengl_GL.UNSIGNED_SHORT_4_4_4_4 = 32819;
lime_graphics_opengl_GL.UNSIGNED_SHORT_5_5_5_1 = 32820;
lime_graphics_opengl_GL.UNSIGNED_SHORT_5_6_5 = 33635;
lime_graphics_opengl_GL.FRAGMENT_SHADER = 35632;
lime_graphics_opengl_GL.VERTEX_SHADER = 35633;
lime_graphics_opengl_GL.MAX_VERTEX_ATTRIBS = 34921;
lime_graphics_opengl_GL.MAX_VERTEX_UNIFORM_VECTORS = 36347;
lime_graphics_opengl_GL.MAX_VARYING_VECTORS = 36348;
lime_graphics_opengl_GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661;
lime_graphics_opengl_GL.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660;
lime_graphics_opengl_GL.MAX_TEXTURE_IMAGE_UNITS = 34930;
lime_graphics_opengl_GL.MAX_FRAGMENT_UNIFORM_VECTORS = 36349;
lime_graphics_opengl_GL.SHADER_TYPE = 35663;
lime_graphics_opengl_GL.DELETE_STATUS = 35712;
lime_graphics_opengl_GL.LINK_STATUS = 35714;
lime_graphics_opengl_GL.VALIDATE_STATUS = 35715;
lime_graphics_opengl_GL.ATTACHED_SHADERS = 35717;
lime_graphics_opengl_GL.ACTIVE_UNIFORMS = 35718;
lime_graphics_opengl_GL.ACTIVE_ATTRIBUTES = 35721;
lime_graphics_opengl_GL.SHADING_LANGUAGE_VERSION = 35724;
lime_graphics_opengl_GL.CURRENT_PROGRAM = 35725;
lime_graphics_opengl_GL.NEVER = 512;
lime_graphics_opengl_GL.LESS = 513;
lime_graphics_opengl_GL.EQUAL = 514;
lime_graphics_opengl_GL.LEQUAL = 515;
lime_graphics_opengl_GL.GREATER = 516;
lime_graphics_opengl_GL.NOTEQUAL = 517;
lime_graphics_opengl_GL.GEQUAL = 518;
lime_graphics_opengl_GL.ALWAYS = 519;
lime_graphics_opengl_GL.KEEP = 7680;
lime_graphics_opengl_GL.REPLACE = 7681;
lime_graphics_opengl_GL.INCR = 7682;
lime_graphics_opengl_GL.DECR = 7683;
lime_graphics_opengl_GL.INVERT = 5386;
lime_graphics_opengl_GL.INCR_WRAP = 34055;
lime_graphics_opengl_GL.DECR_WRAP = 34056;
lime_graphics_opengl_GL.VENDOR = 7936;
lime_graphics_opengl_GL.RENDERER = 7937;
lime_graphics_opengl_GL.VERSION = 7938;
lime_graphics_opengl_GL.NEAREST = 9728;
lime_graphics_opengl_GL.LINEAR = 9729;
lime_graphics_opengl_GL.NEAREST_MIPMAP_NEAREST = 9984;
lime_graphics_opengl_GL.LINEAR_MIPMAP_NEAREST = 9985;
lime_graphics_opengl_GL.NEAREST_MIPMAP_LINEAR = 9986;
lime_graphics_opengl_GL.LINEAR_MIPMAP_LINEAR = 9987;
lime_graphics_opengl_GL.TEXTURE_MAG_FILTER = 10240;
lime_graphics_opengl_GL.TEXTURE_MIN_FILTER = 10241;
lime_graphics_opengl_GL.TEXTURE_WRAP_S = 10242;
lime_graphics_opengl_GL.TEXTURE_WRAP_T = 10243;
lime_graphics_opengl_GL.TEXTURE_2D = 3553;
lime_graphics_opengl_GL.TEXTURE = 5890;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP = 34067;
lime_graphics_opengl_GL.TEXTURE_BINDING_CUBE_MAP = 34068;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_POSITIVE_X = 34069;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073;
lime_graphics_opengl_GL.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074;
lime_graphics_opengl_GL.MAX_CUBE_MAP_TEXTURE_SIZE = 34076;
lime_graphics_opengl_GL.TEXTURE0 = 33984;
lime_graphics_opengl_GL.TEXTURE1 = 33985;
lime_graphics_opengl_GL.TEXTURE2 = 33986;
lime_graphics_opengl_GL.TEXTURE3 = 33987;
lime_graphics_opengl_GL.TEXTURE4 = 33988;
lime_graphics_opengl_GL.TEXTURE5 = 33989;
lime_graphics_opengl_GL.TEXTURE6 = 33990;
lime_graphics_opengl_GL.TEXTURE7 = 33991;
lime_graphics_opengl_GL.TEXTURE8 = 33992;
lime_graphics_opengl_GL.TEXTURE9 = 33993;
lime_graphics_opengl_GL.TEXTURE10 = 33994;
lime_graphics_opengl_GL.TEXTURE11 = 33995;
lime_graphics_opengl_GL.TEXTURE12 = 33996;
lime_graphics_opengl_GL.TEXTURE13 = 33997;
lime_graphics_opengl_GL.TEXTURE14 = 33998;
lime_graphics_opengl_GL.TEXTURE15 = 33999;
lime_graphics_opengl_GL.TEXTURE16 = 34000;
lime_graphics_opengl_GL.TEXTURE17 = 34001;
lime_graphics_opengl_GL.TEXTURE18 = 34002;
lime_graphics_opengl_GL.TEXTURE19 = 34003;
lime_graphics_opengl_GL.TEXTURE20 = 34004;
lime_graphics_opengl_GL.TEXTURE21 = 34005;
lime_graphics_opengl_GL.TEXTURE22 = 34006;
lime_graphics_opengl_GL.TEXTURE23 = 34007;
lime_graphics_opengl_GL.TEXTURE24 = 34008;
lime_graphics_opengl_GL.TEXTURE25 = 34009;
lime_graphics_opengl_GL.TEXTURE26 = 34010;
lime_graphics_opengl_GL.TEXTURE27 = 34011;
lime_graphics_opengl_GL.TEXTURE28 = 34012;
lime_graphics_opengl_GL.TEXTURE29 = 34013;
lime_graphics_opengl_GL.TEXTURE30 = 34014;
lime_graphics_opengl_GL.TEXTURE31 = 34015;
lime_graphics_opengl_GL.ACTIVE_TEXTURE = 34016;
lime_graphics_opengl_GL.REPEAT = 10497;
lime_graphics_opengl_GL.CLAMP_TO_EDGE = 33071;
lime_graphics_opengl_GL.MIRRORED_REPEAT = 33648;
lime_graphics_opengl_GL.FLOAT_VEC2 = 35664;
lime_graphics_opengl_GL.FLOAT_VEC3 = 35665;
lime_graphics_opengl_GL.FLOAT_VEC4 = 35666;
lime_graphics_opengl_GL.INT_VEC2 = 35667;
lime_graphics_opengl_GL.INT_VEC3 = 35668;
lime_graphics_opengl_GL.INT_VEC4 = 35669;
lime_graphics_opengl_GL.BOOL = 35670;
lime_graphics_opengl_GL.BOOL_VEC2 = 35671;
lime_graphics_opengl_GL.BOOL_VEC3 = 35672;
lime_graphics_opengl_GL.BOOL_VEC4 = 35673;
lime_graphics_opengl_GL.FLOAT_MAT2 = 35674;
lime_graphics_opengl_GL.FLOAT_MAT3 = 35675;
lime_graphics_opengl_GL.FLOAT_MAT4 = 35676;
lime_graphics_opengl_GL.SAMPLER_2D = 35678;
lime_graphics_opengl_GL.SAMPLER_CUBE = 35680;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_ENABLED = 34338;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_SIZE = 34339;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_STRIDE = 34340;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_TYPE = 34341;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_POINTER = 34373;
lime_graphics_opengl_GL.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975;
lime_graphics_opengl_GL.VERTEX_PROGRAM_POINT_SIZE = 34370;
lime_graphics_opengl_GL.POINT_SPRITE = 34913;
lime_graphics_opengl_GL.COMPILE_STATUS = 35713;
lime_graphics_opengl_GL.LOW_FLOAT = 36336;
lime_graphics_opengl_GL.MEDIUM_FLOAT = 36337;
lime_graphics_opengl_GL.HIGH_FLOAT = 36338;
lime_graphics_opengl_GL.LOW_INT = 36339;
lime_graphics_opengl_GL.MEDIUM_INT = 36340;
lime_graphics_opengl_GL.HIGH_INT = 36341;
lime_graphics_opengl_GL.FRAMEBUFFER = 36160;
lime_graphics_opengl_GL.RENDERBUFFER = 36161;
lime_graphics_opengl_GL.RGBA4 = 32854;
lime_graphics_opengl_GL.RGB5_A1 = 32855;
lime_graphics_opengl_GL.RGB565 = 36194;
lime_graphics_opengl_GL.DEPTH_COMPONENT16 = 33189;
lime_graphics_opengl_GL.STENCIL_INDEX = 6401;
lime_graphics_opengl_GL.STENCIL_INDEX8 = 36168;
lime_graphics_opengl_GL.DEPTH_STENCIL = 34041;
lime_graphics_opengl_GL.RENDERBUFFER_WIDTH = 36162;
lime_graphics_opengl_GL.RENDERBUFFER_HEIGHT = 36163;
lime_graphics_opengl_GL.RENDERBUFFER_INTERNAL_FORMAT = 36164;
lime_graphics_opengl_GL.RENDERBUFFER_RED_SIZE = 36176;
lime_graphics_opengl_GL.RENDERBUFFER_GREEN_SIZE = 36177;
lime_graphics_opengl_GL.RENDERBUFFER_BLUE_SIZE = 36178;
lime_graphics_opengl_GL.RENDERBUFFER_ALPHA_SIZE = 36179;
lime_graphics_opengl_GL.RENDERBUFFER_DEPTH_SIZE = 36180;
lime_graphics_opengl_GL.RENDERBUFFER_STENCIL_SIZE = 36181;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050;
lime_graphics_opengl_GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051;
lime_graphics_opengl_GL.COLOR_ATTACHMENT0 = 36064;
lime_graphics_opengl_GL.DEPTH_ATTACHMENT = 36096;
lime_graphics_opengl_GL.STENCIL_ATTACHMENT = 36128;
lime_graphics_opengl_GL.DEPTH_STENCIL_ATTACHMENT = 33306;
lime_graphics_opengl_GL.NONE = 0;
lime_graphics_opengl_GL.FRAMEBUFFER_COMPLETE = 36053;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055;
lime_graphics_opengl_GL.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057;
lime_graphics_opengl_GL.FRAMEBUFFER_UNSUPPORTED = 36061;
lime_graphics_opengl_GL.FRAMEBUFFER_BINDING = 36006;
lime_graphics_opengl_GL.RENDERBUFFER_BINDING = 36007;
lime_graphics_opengl_GL.MAX_RENDERBUFFER_SIZE = 34024;
lime_graphics_opengl_GL.INVALID_FRAMEBUFFER_OPERATION = 1286;
lime_graphics_opengl_GL.UNPACK_FLIP_Y_WEBGL = 37440;
lime_graphics_opengl_GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441;
lime_graphics_opengl_GL.CONTEXT_LOST_WEBGL = 37442;
lime_graphics_opengl_GL.UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443;
lime_graphics_opengl_GL.BROWSER_DEFAULT_WEBGL = 37444;
lime_math__$ColorMatrix_ColorMatrix_$Impl_$.__identity = [1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0];
lime_math_Matrix3.__identity = new lime_math_Matrix3();
lime_math__$Matrix4_Matrix4_$Impl_$.__identity = [1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0];
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_SSL = 1;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_WIN32 = 2;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_ALL = 3;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_NOTHING = 0;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_DEFAULT = 3;
lime_net_curl__$CURL_CURL_$Impl_$.GLOBAL_ACK_EINTR = 4;
lime_system_BackgroundWorker.MESSAGE_COMPLETE = "__COMPLETE__";
lime_system_BackgroundWorker.MESSAGE_ERROR = "__ERROR__";
lime_system_CFFI.__moduleNames = null;
lime_text__$TextDirection_TextDirection_$Impl_$.INVALID = 0;
lime_text__$TextDirection_TextDirection_$Impl_$.LEFT_TO_RIGHT = 4;
lime_text__$TextDirection_TextDirection_$Impl_$.RIGHT_TO_LEFT = 5;
lime_text__$TextDirection_TextDirection_$Impl_$.TOP_TO_BOTTOM = 6;
lime_text__$TextDirection_TextDirection_$Impl_$.BOTTOM_TO_TOP = 7;
lime_text__$TextScript_TextScript_$Impl_$.COMMON = "Zyyy";
lime_text__$TextScript_TextScript_$Impl_$.INHERITED = "Zinh";
lime_text__$TextScript_TextScript_$Impl_$.UNKNOWN = "Zzzz";
lime_text__$TextScript_TextScript_$Impl_$.ARABIC = "Arab";
lime_text__$TextScript_TextScript_$Impl_$.ARMENIAN = "Armn";
lime_text__$TextScript_TextScript_$Impl_$.BENGALI = "Beng";
lime_text__$TextScript_TextScript_$Impl_$.CYRILLIC = "Cyrl";
lime_text__$TextScript_TextScript_$Impl_$.DEVANAGARI = "Deva";
lime_text__$TextScript_TextScript_$Impl_$.GEORGIAN = "Geor";
lime_text__$TextScript_TextScript_$Impl_$.GREEK = "Grek";
lime_text__$TextScript_TextScript_$Impl_$.GUJARATI = "Gujr";
lime_text__$TextScript_TextScript_$Impl_$.GURMUKHI = "Guru";
lime_text__$TextScript_TextScript_$Impl_$.HANGUL = "Hang";
lime_text__$TextScript_TextScript_$Impl_$.HAN = "Hani";
lime_text__$TextScript_TextScript_$Impl_$.HEBREW = "Hebr";
lime_text__$TextScript_TextScript_$Impl_$.HIRAGANA = "Hira";
lime_text__$TextScript_TextScript_$Impl_$.KANNADA = "Knda";
lime_text__$TextScript_TextScript_$Impl_$.KATAKANA = "Kana";
lime_text__$TextScript_TextScript_$Impl_$.LAO = "Laoo";
lime_text__$TextScript_TextScript_$Impl_$.LATIN = "Latn";
lime_text__$TextScript_TextScript_$Impl_$.MALAYALAM = "Mlym";
lime_text__$TextScript_TextScript_$Impl_$.ORIYA = "Orya";
lime_text__$TextScript_TextScript_$Impl_$.TAMIL = "Taml";
lime_text__$TextScript_TextScript_$Impl_$.TELUGA = "Telu";
lime_text__$TextScript_TextScript_$Impl_$.THAI = "Thai";
lime_text__$TextScript_TextScript_$Impl_$.TIBETAN = "Tibt";
lime_text__$TextScript_TextScript_$Impl_$.BOPOMOFO = "Bopo";
lime_text__$TextScript_TextScript_$Impl_$.BRAILLE = "Brai";
lime_text__$TextScript_TextScript_$Impl_$.CANADIAN_SYLLABICS = "Cans";
lime_text__$TextScript_TextScript_$Impl_$.CHEROKEE = "Cher";
lime_text__$TextScript_TextScript_$Impl_$.ETHIOPIC = "Ethi";
lime_text__$TextScript_TextScript_$Impl_$.KHMER = "Khmr";
lime_text__$TextScript_TextScript_$Impl_$.MONGOLIAN = "Mong";
lime_text__$TextScript_TextScript_$Impl_$.MYANMAR = "Mymr";
lime_text__$TextScript_TextScript_$Impl_$.OGHAM = "Ogam";
lime_text__$TextScript_TextScript_$Impl_$.RUNIC = "Runr";
lime_text__$TextScript_TextScript_$Impl_$.SINHALA = "Sinh";
lime_text__$TextScript_TextScript_$Impl_$.SYRIAC = "Syrc";
lime_text__$TextScript_TextScript_$Impl_$.THAANA = "Thaa";
lime_text__$TextScript_TextScript_$Impl_$.YI = "Yiii";
lime_text__$TextScript_TextScript_$Impl_$.DESERET = "Dsrt";
lime_text__$TextScript_TextScript_$Impl_$.GOTHIC = "Goth";
lime_text__$TextScript_TextScript_$Impl_$.OLD_ITALIC = "Ital";
lime_text__$TextScript_TextScript_$Impl_$.BUHID = "Buhd";
lime_text__$TextScript_TextScript_$Impl_$.HANUNOO = "Hano";
lime_text__$TextScript_TextScript_$Impl_$.TAGALOG = "Tglg";
lime_text__$TextScript_TextScript_$Impl_$.TAGBANWA = "Tagb";
lime_text__$TextScript_TextScript_$Impl_$.CYPRIOT = "Cprt";
lime_text__$TextScript_TextScript_$Impl_$.LIMBU = "Limb";
lime_text__$TextScript_TextScript_$Impl_$.LINEAR_B = "Linb";
lime_text__$TextScript_TextScript_$Impl_$.OSMANYA = "Osma";
lime_text__$TextScript_TextScript_$Impl_$.SHAVIAN = "Shaw";
lime_text__$TextScript_TextScript_$Impl_$.TAI_LE = "Tale";
lime_text__$TextScript_TextScript_$Impl_$.UGARITIC = "Ugar";
lime_text__$TextScript_TextScript_$Impl_$.BUGINESE = "Bugi";
lime_text__$TextScript_TextScript_$Impl_$.COPTIC = "Copt";
lime_text__$TextScript_TextScript_$Impl_$.GLAGOLITIC = "Glag";
lime_text__$TextScript_TextScript_$Impl_$.KHAROSHTHI = "Khar";
lime_text__$TextScript_TextScript_$Impl_$.NEW_TAI_LUE = "Talu";
lime_text__$TextScript_TextScript_$Impl_$.OLD_PERSIAN = "Xpeo";
lime_text__$TextScript_TextScript_$Impl_$.SYLOTI_NAGRI = "Sylo";
lime_text__$TextScript_TextScript_$Impl_$.TIFINAGH = "Tfng";
lime_text__$TextScript_TextScript_$Impl_$.BALINESE = "Bali";
lime_text__$TextScript_TextScript_$Impl_$.CUNEIFORM = "Xsux";
lime_text__$TextScript_TextScript_$Impl_$.NKO = "Nkoo";
lime_text__$TextScript_TextScript_$Impl_$.PHAGS_PA = "Phag";
lime_text__$TextScript_TextScript_$Impl_$.PHOENICIAN = "Phnx";
lime_text__$TextScript_TextScript_$Impl_$.CARIAN = "Cari";
lime_text__$TextScript_TextScript_$Impl_$.CHAM = "Cham";
lime_text__$TextScript_TextScript_$Impl_$.KAYAH_LI = "Kali";
lime_text__$TextScript_TextScript_$Impl_$.LEPCHA = "Lepc";
lime_text__$TextScript_TextScript_$Impl_$.LYCIAN = "Lyci";
lime_text__$TextScript_TextScript_$Impl_$.LYDIAN = "Lydi";
lime_text__$TextScript_TextScript_$Impl_$.OL_CHIKI = "Olck";
lime_text__$TextScript_TextScript_$Impl_$.REJANG = "Rjng";
lime_text__$TextScript_TextScript_$Impl_$.SAURASHTRA = "Saur";
lime_text__$TextScript_TextScript_$Impl_$.SUNDANESE = "Sund";
lime_text__$TextScript_TextScript_$Impl_$.VAI = "Vaii";
lime_text__$TextScript_TextScript_$Impl_$.AVESTAN = "Avst";
lime_text__$TextScript_TextScript_$Impl_$.BAMUM = "Bamu";
lime_text__$TextScript_TextScript_$Impl_$.EGYPTIAN_HIEROGLYPHS = "Egyp";
lime_text__$TextScript_TextScript_$Impl_$.IMPERIAL_ARAMAIC = "Armi";
lime_text__$TextScript_TextScript_$Impl_$.INSCRIPTIONAL_PAHLAVI = "Phli";
lime_text__$TextScript_TextScript_$Impl_$.INSCRIPTIONAL_PARTHIAN = "Prti";
lime_text__$TextScript_TextScript_$Impl_$.JAVANESE = "Java";
lime_text__$TextScript_TextScript_$Impl_$.KAITHI = "Kthi";
lime_text__$TextScript_TextScript_$Impl_$.LISU = "Lisu";
lime_text__$TextScript_TextScript_$Impl_$.MEETEI_MAYEK = "Mtei";
lime_text__$TextScript_TextScript_$Impl_$.OLD_SOUTH_ARABIAN = "Sarb";
lime_text__$TextScript_TextScript_$Impl_$.OLD_TURKIC = "Orkh";
lime_text__$TextScript_TextScript_$Impl_$.SAMARITAN = "Samr";
lime_text__$TextScript_TextScript_$Impl_$.TAI_THAM = "Lana";
lime_text__$TextScript_TextScript_$Impl_$.TAI_VIET = "Tavt";
lime_text__$TextScript_TextScript_$Impl_$.BATAK = "Batk";
lime_text__$TextScript_TextScript_$Impl_$.BRAHMI = "Brah";
lime_text__$TextScript_TextScript_$Impl_$.MANDAIC = "Mand";
lime_text__$TextScript_TextScript_$Impl_$.CHAKMA = "Cakm";
lime_text__$TextScript_TextScript_$Impl_$.MEROITIC_CURSIVE = "Merc";
lime_text__$TextScript_TextScript_$Impl_$.MEROITIC_HIEROGLYPHS = "Mero";
lime_text__$TextScript_TextScript_$Impl_$.MIAO = "Plrd";
lime_text__$TextScript_TextScript_$Impl_$.SHARADA = "Shrd";
lime_text__$TextScript_TextScript_$Impl_$.SORA_SOMPENG = "Sora";
lime_text__$TextScript_TextScript_$Impl_$.TAKRI = "Takr";
lime_text__$TextScript_TextScript_$Impl_$.BASSA_VAH = "Bass";
lime_text__$TextScript_TextScript_$Impl_$.CAUCASIAN_ALBANIAN = "Aghb";
lime_text__$TextScript_TextScript_$Impl_$.DUPLOYAN = "Dupl";
lime_text__$TextScript_TextScript_$Impl_$.ELBASAN = "Elba";
lime_text__$TextScript_TextScript_$Impl_$.GRANTHA = "Gran";
lime_text__$TextScript_TextScript_$Impl_$.KHOJKI = "Khoj";
lime_text__$TextScript_TextScript_$Impl_$.KHUDAWADI = "Sind";
lime_text__$TextScript_TextScript_$Impl_$.LINEAR_A = "Lina";
lime_text__$TextScript_TextScript_$Impl_$.MAHAJANI = "Mahj";
lime_text__$TextScript_TextScript_$Impl_$.MANICHAEAN = "Mani";
lime_text__$TextScript_TextScript_$Impl_$.MENDE_KIKAKUI = "Mend";
lime_text__$TextScript_TextScript_$Impl_$.MODI = "Modi";
lime_text__$TextScript_TextScript_$Impl_$.MRO = "Mroo";
lime_text__$TextScript_TextScript_$Impl_$.NABATAEAN = "Nbat";
lime_text__$TextScript_TextScript_$Impl_$.OLD_NORTH_ARABIAN = "Narb";
lime_text__$TextScript_TextScript_$Impl_$.OLD_PERMIC = "Perm";
lime_text__$TextScript_TextScript_$Impl_$.PAHAWH_HMONG = "Hmng";
lime_text__$TextScript_TextScript_$Impl_$.PALMYRENE = "Palm";
lime_text__$TextScript_TextScript_$Impl_$.PAU_CIN_HAU = "Pauc";
lime_text__$TextScript_TextScript_$Impl_$.PSALTER_PAHLAVI = "Phlp";
lime_text__$TextScript_TextScript_$Impl_$.SIDDHAM = "Sidd";
lime_text__$TextScript_TextScript_$Impl_$.TIRHUTA = "Tirh";
lime_text__$TextScript_TextScript_$Impl_$.WARANG_CITI = "Wara";
lime_ui_Gamepad.devices = new haxe_ds_IntMap();
lime_ui_Gamepad.onConnect = new lime_app_Event_$lime_$ui_$Gamepad_$Void();
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.LEFT_X = 0;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.LEFT_Y = 1;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.RIGHT_X = 2;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.RIGHT_Y = 3;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.TRIGGER_LEFT = 4;
lime_ui__$GamepadAxis_GamepadAxis_$Impl_$.TRIGGER_RIGHT = 5;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.A = 0;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.B = 1;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.X = 2;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.Y = 3;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.BACK = 4;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.GUIDE = 5;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.START = 6;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.LEFT_STICK = 7;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.RIGHT_STICK = 8;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.LEFT_SHOULDER = 9;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.RIGHT_SHOULDER = 10;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_UP = 11;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_DOWN = 12;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_LEFT = 13;
lime_ui__$GamepadButton_GamepadButton_$Impl_$.DPAD_RIGHT = 14;
lime_ui_Joystick.devices = new haxe_ds_IntMap();
lime_ui_Joystick.onConnect = new lime_app_Event_$lime_$ui_$Joystick_$Void();
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.CENTER = 0;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.DOWN = 4;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.LEFT = 8;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.RIGHT = 2;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.UP = 1;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.DOWN_LEFT = 12;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.DOWN_RIGHT = 6;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.UP_LEFT = 9;
lime_ui__$JoystickHatPosition_JoystickHatPosition_$Impl_$.UP_RIGHT = 3;
lime_ui__$KeyCode_KeyCode_$Impl_$.UNKNOWN = 0;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKSPACE = 8;
lime_ui__$KeyCode_KeyCode_$Impl_$.TAB = 9;
lime_ui__$KeyCode_KeyCode_$Impl_$.RETURN = 13;
lime_ui__$KeyCode_KeyCode_$Impl_$.ESCAPE = 27;
lime_ui__$KeyCode_KeyCode_$Impl_$.SPACE = 32;
lime_ui__$KeyCode_KeyCode_$Impl_$.EXCLAMATION = 33;
lime_ui__$KeyCode_KeyCode_$Impl_$.QUOTE = 34;
lime_ui__$KeyCode_KeyCode_$Impl_$.HASH = 35;
lime_ui__$KeyCode_KeyCode_$Impl_$.DOLLAR = 36;
lime_ui__$KeyCode_KeyCode_$Impl_$.PERCENT = 37;
lime_ui__$KeyCode_KeyCode_$Impl_$.AMPERSAND = 38;
lime_ui__$KeyCode_KeyCode_$Impl_$.SINGLE_QUOTE = 39;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_PARENTHESIS = 40;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_PARENTHESIS = 41;
lime_ui__$KeyCode_KeyCode_$Impl_$.ASTERISK = 42;
lime_ui__$KeyCode_KeyCode_$Impl_$.PLUS = 43;
lime_ui__$KeyCode_KeyCode_$Impl_$.COMMA = 44;
lime_ui__$KeyCode_KeyCode_$Impl_$.MINUS = 45;
lime_ui__$KeyCode_KeyCode_$Impl_$.PERIOD = 46;
lime_ui__$KeyCode_KeyCode_$Impl_$.SLASH = 47;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_0 = 48;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_1 = 49;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_2 = 50;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_3 = 51;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_4 = 52;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_5 = 53;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_6 = 54;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_7 = 55;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_8 = 56;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMBER_9 = 57;
lime_ui__$KeyCode_KeyCode_$Impl_$.COLON = 58;
lime_ui__$KeyCode_KeyCode_$Impl_$.SEMICOLON = 59;
lime_ui__$KeyCode_KeyCode_$Impl_$.LESS_THAN = 60;
lime_ui__$KeyCode_KeyCode_$Impl_$.EQUALS = 61;
lime_ui__$KeyCode_KeyCode_$Impl_$.GREATER_THAN = 62;
lime_ui__$KeyCode_KeyCode_$Impl_$.QUESTION = 63;
lime_ui__$KeyCode_KeyCode_$Impl_$.AT = 64;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_BRACKET = 91;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKSLASH = 92;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_BRACKET = 93;
lime_ui__$KeyCode_KeyCode_$Impl_$.CARET = 94;
lime_ui__$KeyCode_KeyCode_$Impl_$.UNDERSCORE = 95;
lime_ui__$KeyCode_KeyCode_$Impl_$.GRAVE = 96;
lime_ui__$KeyCode_KeyCode_$Impl_$.A = 97;
lime_ui__$KeyCode_KeyCode_$Impl_$.B = 98;
lime_ui__$KeyCode_KeyCode_$Impl_$.C = 99;
lime_ui__$KeyCode_KeyCode_$Impl_$.D = 100;
lime_ui__$KeyCode_KeyCode_$Impl_$.E = 101;
lime_ui__$KeyCode_KeyCode_$Impl_$.F = 102;
lime_ui__$KeyCode_KeyCode_$Impl_$.G = 103;
lime_ui__$KeyCode_KeyCode_$Impl_$.H = 104;
lime_ui__$KeyCode_KeyCode_$Impl_$.I = 105;
lime_ui__$KeyCode_KeyCode_$Impl_$.J = 106;
lime_ui__$KeyCode_KeyCode_$Impl_$.K = 107;
lime_ui__$KeyCode_KeyCode_$Impl_$.L = 108;
lime_ui__$KeyCode_KeyCode_$Impl_$.M = 109;
lime_ui__$KeyCode_KeyCode_$Impl_$.N = 110;
lime_ui__$KeyCode_KeyCode_$Impl_$.O = 111;
lime_ui__$KeyCode_KeyCode_$Impl_$.P = 112;
lime_ui__$KeyCode_KeyCode_$Impl_$.Q = 113;
lime_ui__$KeyCode_KeyCode_$Impl_$.R = 114;
lime_ui__$KeyCode_KeyCode_$Impl_$.S = 115;
lime_ui__$KeyCode_KeyCode_$Impl_$.T = 116;
lime_ui__$KeyCode_KeyCode_$Impl_$.U = 117;
lime_ui__$KeyCode_KeyCode_$Impl_$.V = 118;
lime_ui__$KeyCode_KeyCode_$Impl_$.W = 119;
lime_ui__$KeyCode_KeyCode_$Impl_$.X = 120;
lime_ui__$KeyCode_KeyCode_$Impl_$.Y = 121;
lime_ui__$KeyCode_KeyCode_$Impl_$.Z = 122;
lime_ui__$KeyCode_KeyCode_$Impl_$.DELETE = 127;
lime_ui__$KeyCode_KeyCode_$Impl_$.CAPS_LOCK = 1073741881;
lime_ui__$KeyCode_KeyCode_$Impl_$.F1 = 1073741882;
lime_ui__$KeyCode_KeyCode_$Impl_$.F2 = 1073741883;
lime_ui__$KeyCode_KeyCode_$Impl_$.F3 = 1073741884;
lime_ui__$KeyCode_KeyCode_$Impl_$.F4 = 1073741885;
lime_ui__$KeyCode_KeyCode_$Impl_$.F5 = 1073741886;
lime_ui__$KeyCode_KeyCode_$Impl_$.F6 = 1073741887;
lime_ui__$KeyCode_KeyCode_$Impl_$.F7 = 1073741888;
lime_ui__$KeyCode_KeyCode_$Impl_$.F8 = 1073741889;
lime_ui__$KeyCode_KeyCode_$Impl_$.F9 = 1073741890;
lime_ui__$KeyCode_KeyCode_$Impl_$.F10 = 1073741891;
lime_ui__$KeyCode_KeyCode_$Impl_$.F11 = 1073741892;
lime_ui__$KeyCode_KeyCode_$Impl_$.F12 = 1073741893;
lime_ui__$KeyCode_KeyCode_$Impl_$.PRINT_SCREEN = 1073741894;
lime_ui__$KeyCode_KeyCode_$Impl_$.SCROLL_LOCK = 1073741895;
lime_ui__$KeyCode_KeyCode_$Impl_$.PAUSE = 1073741896;
lime_ui__$KeyCode_KeyCode_$Impl_$.INSERT = 1073741897;
lime_ui__$KeyCode_KeyCode_$Impl_$.HOME = 1073741898;
lime_ui__$KeyCode_KeyCode_$Impl_$.PAGE_UP = 1073741899;
lime_ui__$KeyCode_KeyCode_$Impl_$.END = 1073741901;
lime_ui__$KeyCode_KeyCode_$Impl_$.PAGE_DOWN = 1073741902;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT = 1073741903;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT = 1073741904;
lime_ui__$KeyCode_KeyCode_$Impl_$.DOWN = 1073741905;
lime_ui__$KeyCode_KeyCode_$Impl_$.UP = 1073741906;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUM_LOCK = 1073741907;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DIVIDE = 1073741908;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MULTIPLY = 1073741909;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MINUS = 1073741910;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PLUS = 1073741911;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_ENTER = 1073741912;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_1 = 1073741913;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_2 = 1073741914;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_3 = 1073741915;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_4 = 1073741916;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_5 = 1073741917;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_6 = 1073741918;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_7 = 1073741919;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_8 = 1073741920;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_9 = 1073741921;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_0 = 1073741922;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PERIOD = 1073741923;
lime_ui__$KeyCode_KeyCode_$Impl_$.APPLICATION = 1073741925;
lime_ui__$KeyCode_KeyCode_$Impl_$.POWER = 1073741926;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_EQUALS = 1073741927;
lime_ui__$KeyCode_KeyCode_$Impl_$.F13 = 1073741928;
lime_ui__$KeyCode_KeyCode_$Impl_$.F14 = 1073741929;
lime_ui__$KeyCode_KeyCode_$Impl_$.F15 = 1073741930;
lime_ui__$KeyCode_KeyCode_$Impl_$.F16 = 1073741931;
lime_ui__$KeyCode_KeyCode_$Impl_$.F17 = 1073741932;
lime_ui__$KeyCode_KeyCode_$Impl_$.F18 = 1073741933;
lime_ui__$KeyCode_KeyCode_$Impl_$.F19 = 1073741934;
lime_ui__$KeyCode_KeyCode_$Impl_$.F20 = 1073741935;
lime_ui__$KeyCode_KeyCode_$Impl_$.F21 = 1073741936;
lime_ui__$KeyCode_KeyCode_$Impl_$.F22 = 1073741937;
lime_ui__$KeyCode_KeyCode_$Impl_$.F23 = 1073741938;
lime_ui__$KeyCode_KeyCode_$Impl_$.F24 = 1073741939;
lime_ui__$KeyCode_KeyCode_$Impl_$.EXECUTE = 1073741940;
lime_ui__$KeyCode_KeyCode_$Impl_$.HELP = 1073741941;
lime_ui__$KeyCode_KeyCode_$Impl_$.MENU = 1073741942;
lime_ui__$KeyCode_KeyCode_$Impl_$.SELECT = 1073741943;
lime_ui__$KeyCode_KeyCode_$Impl_$.STOP = 1073741944;
lime_ui__$KeyCode_KeyCode_$Impl_$.AGAIN = 1073741945;
lime_ui__$KeyCode_KeyCode_$Impl_$.UNDO = 1073741946;
lime_ui__$KeyCode_KeyCode_$Impl_$.CUT = 1073741947;
lime_ui__$KeyCode_KeyCode_$Impl_$.COPY = 1073741948;
lime_ui__$KeyCode_KeyCode_$Impl_$.PASTE = 1073741949;
lime_ui__$KeyCode_KeyCode_$Impl_$.FIND = 1073741950;
lime_ui__$KeyCode_KeyCode_$Impl_$.MUTE = 1073741951;
lime_ui__$KeyCode_KeyCode_$Impl_$.VOLUME_UP = 1073741952;
lime_ui__$KeyCode_KeyCode_$Impl_$.VOLUME_DOWN = 1073741953;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_COMMA = 1073741957;
lime_ui__$KeyCode_KeyCode_$Impl_$.ALT_ERASE = 1073741977;
lime_ui__$KeyCode_KeyCode_$Impl_$.SYSTEM_REQUEST = 1073741978;
lime_ui__$KeyCode_KeyCode_$Impl_$.CANCEL = 1073741979;
lime_ui__$KeyCode_KeyCode_$Impl_$.CLEAR = 1073741980;
lime_ui__$KeyCode_KeyCode_$Impl_$.PRIOR = 1073741981;
lime_ui__$KeyCode_KeyCode_$Impl_$.RETURN2 = 1073741982;
lime_ui__$KeyCode_KeyCode_$Impl_$.SEPARATOR = 1073741983;
lime_ui__$KeyCode_KeyCode_$Impl_$.OUT = 1073741984;
lime_ui__$KeyCode_KeyCode_$Impl_$.OPER = 1073741985;
lime_ui__$KeyCode_KeyCode_$Impl_$.CLEAR_AGAIN = 1073741986;
lime_ui__$KeyCode_KeyCode_$Impl_$.CRSEL = 1073741987;
lime_ui__$KeyCode_KeyCode_$Impl_$.EXSEL = 1073741988;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_00 = 1073742000;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_000 = 1073742001;
lime_ui__$KeyCode_KeyCode_$Impl_$.THOUSAND_SEPARATOR = 1073742002;
lime_ui__$KeyCode_KeyCode_$Impl_$.DECIMAL_SEPARATOR = 1073742003;
lime_ui__$KeyCode_KeyCode_$Impl_$.CURRENCY_UNIT = 1073742004;
lime_ui__$KeyCode_KeyCode_$Impl_$.CURRENCY_SUBUNIT = 1073742005;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_LEFT_PARENTHESIS = 1073742006;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_RIGHT_PARENTHESIS = 1073742007;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_LEFT_BRACE = 1073742008;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_RIGHT_BRACE = 1073742009;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_TAB = 1073742010;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_BACKSPACE = 1073742011;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_A = 1073742012;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_B = 1073742013;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_C = 1073742014;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_D = 1073742015;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_E = 1073742016;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_F = 1073742017;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_XOR = 1073742018;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_POWER = 1073742019;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PERCENT = 1073742020;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_LESS_THAN = 1073742021;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_GREATER_THAN = 1073742022;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_AMPERSAND = 1073742023;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DOUBLE_AMPERSAND = 1073742024;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_VERTICAL_BAR = 1073742025;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DOUBLE_VERTICAL_BAR = 1073742026;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_COLON = 1073742027;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_HASH = 1073742028;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_SPACE = 1073742029;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_AT = 1073742030;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_EXCLAMATION = 1073742031;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_STORE = 1073742032;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_RECALL = 1073742033;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_CLEAR = 1073742034;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_ADD = 1073742035;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_SUBTRACT = 1073742036;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_MULTIPLY = 1073742037;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_MEM_DIVIDE = 1073742038;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_PLUS_MINUS = 1073742039;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_CLEAR = 1073742040;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_CLEAR_ENTRY = 1073742041;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_BINARY = 1073742042;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_OCTAL = 1073742043;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_DECIMAL = 1073742044;
lime_ui__$KeyCode_KeyCode_$Impl_$.NUMPAD_HEXADECIMAL = 1073742045;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_CTRL = 1073742048;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_SHIFT = 1073742049;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_ALT = 1073742050;
lime_ui__$KeyCode_KeyCode_$Impl_$.LEFT_META = 1073742051;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_CTRL = 1073742052;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_SHIFT = 1073742053;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_ALT = 1073742054;
lime_ui__$KeyCode_KeyCode_$Impl_$.RIGHT_META = 1073742055;
lime_ui__$KeyCode_KeyCode_$Impl_$.MODE = 1073742081;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_NEXT = 1073742082;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_PREVIOUS = 1073742083;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_STOP = 1073742084;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_PLAY = 1073742085;
lime_ui__$KeyCode_KeyCode_$Impl_$.AUDIO_MUTE = 1073742086;
lime_ui__$KeyCode_KeyCode_$Impl_$.MEDIA_SELECT = 1073742087;
lime_ui__$KeyCode_KeyCode_$Impl_$.WWW = 1073742088;
lime_ui__$KeyCode_KeyCode_$Impl_$.MAIL = 1073742089;
lime_ui__$KeyCode_KeyCode_$Impl_$.CALCULATOR = 1073742090;
lime_ui__$KeyCode_KeyCode_$Impl_$.COMPUTER = 1073742091;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_SEARCH = 1073742092;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_HOME = 1073742093;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_BACK = 1073742094;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_FORWARD = 1073742095;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_STOP = 1073742096;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_REFRESH = 1073742097;
lime_ui__$KeyCode_KeyCode_$Impl_$.APP_CONTROL_BOOKMARKS = 1073742098;
lime_ui__$KeyCode_KeyCode_$Impl_$.BRIGHTNESS_DOWN = 1073742099;
lime_ui__$KeyCode_KeyCode_$Impl_$.BRIGHTNESS_UP = 1073742100;
lime_ui__$KeyCode_KeyCode_$Impl_$.DISPLAY_SWITCH = 1073742101;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKLIGHT_TOGGLE = 1073742102;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKLIGHT_DOWN = 1073742103;
lime_ui__$KeyCode_KeyCode_$Impl_$.BACKLIGHT_UP = 1073742104;
lime_ui__$KeyCode_KeyCode_$Impl_$.EJECT = 1073742105;
lime_ui__$KeyCode_KeyCode_$Impl_$.SLEEP = 1073742106;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.NONE = 0;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_SHIFT = 1;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_SHIFT = 2;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_CTRL = 64;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_CTRL = 128;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_ALT = 256;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_ALT = 512;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.LEFT_META = 1024;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.RIGHT_META = 2048;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.NUM_LOCK = 4096;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.CAPS_LOCK = 8192;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.MODE = 16384;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.CTRL = 192;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.SHIFT = 3;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.ALT = 768;
lime_ui__$KeyModifier_KeyModifier_$Impl_$.META = 3072;
lime_ui_Touch.onEnd = new lime_app_Event_$lime_$ui_$Touch_$Void();
lime_ui_Touch.onMove = new lime_app_Event_$lime_$ui_$Touch_$Void();
lime_ui_Touch.onStart = new lime_app_Event_$lime_$ui_$Touch_$Void();
lime_utils_Bytes.cffi_lime_bytes_from_data_pointer = lime_system_CFFI.load("lime","lime_bytes_from_data_pointer",2,false);
lime_utils_Bytes.cffi_lime_bytes_get_data_pointer = lime_system_CFFI.load("lime","lime_bytes_get_data_pointer",1,false);
lime_utils_Bytes.cffi_lime_bytes_read_file = lime_system_CFFI.load("lime","lime_bytes_read_file",1,false);
lime_utils__$Float32Array_Float32Array_$Impl_$.BYTES_PER_ELEMENT = 4;
lime_utils__$Int16Array_Int16Array_$Impl_$.BYTES_PER_ELEMENT = 2;
lime_utils__$Int32Array_Int32Array_$Impl_$.BYTES_PER_ELEMENT = 4;
lime_utils__$UInt16Array_UInt16Array_$Impl_$.BYTES_PER_ELEMENT = 2;
lime_utils__$UInt32Array_UInt32Array_$Impl_$.BYTES_PER_ELEMENT = 4;
lime_utils__$UInt8Array_UInt8Array_$Impl_$.BYTES_PER_ELEMENT = 1;
openfl_Assets.cache = new openfl_AssetCache();
openfl_Assets.dispatcher = new openfl_events_EventDispatcher();
openfl_Lib.current = new openfl_display_MovieClip();
openfl_Lib.__sentWarnings = new haxe_ds_StringMap();
openfl__$internal_renderer_GraphicsPaths.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_GraphicsPaths.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_cairo_CairoGraphics.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_cairo_CairoGraphics.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_cairo_CairoGraphics.fillCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_cairo_CairoGraphics.strokeCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_canvas_CanvasGraphics.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_canvas_CanvasGraphics.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_canvas_CanvasGraphics.fillCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_canvas_CanvasGraphics.strokeCommands = new openfl__$internal_renderer_DrawCommandBuffer();
openfl__$internal_renderer_opengl_GLBitmap.fbData = [];
openfl__$internal_renderer_opengl_GLRenderer.glContextId = 0;
openfl__$internal_renderer_opengl_GLRenderer.glContexts = [];
openfl__$internal_renderer_opengl_shaders2_Shader.UID = 0;
openfl__$internal_renderer_opengl_shaders2_DefaultShader.VERTEX_SRC = ["attribute vec2 " + "openfl_aPosition" + ";","attribute vec2 " + "openfl_aTexCoord0" + ";","attribute vec4 " + "openfl_aColor" + ";","uniform mat3 " + "openfl_uProjectionMatrix" + ";","uniform bool " + "openfl_uUseColorTransform" + ";","varying vec2 " + "openfl_vTexCoord" + ";","varying vec4 " + "openfl_vColor" + ";","void main(void) {","   gl_Position = vec4((" + "openfl_uProjectionMatrix" + " * vec3(" + "openfl_aPosition" + ", 1.0)).xy, 0.0, 1.0);","   " + "openfl_vTexCoord" + " = " + "openfl_aTexCoord0" + ";","   if(" + "openfl_uUseColorTransform" + ")","   \t" + "openfl_vColor" + " = " + "openfl_aColor" + ";","   else","   \t" + "openfl_vColor" + " = vec4(" + "openfl_aColor" + ".rgb * " + "openfl_aColor" + ".a, " + "openfl_aColor" + ".a);","}"];
openfl__$internal_renderer_opengl_utils_PathBuiler.__currentWinding = 0;
openfl__$internal_renderer_opengl_utils_PathBuiler.__fillIndex = 0;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.fillVertexAttributes = [new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aPosition")];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.drawTrianglesVertexAttributes = [new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aPosition"),new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aTexCoord0"),new openfl__$internal_renderer_opengl_utils_VertexAttribute(4,5121,true,"openfl_aColor")];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.primitiveVertexAttributes = [new openfl__$internal_renderer_opengl_utils_VertexAttribute(2,5126,false,"openfl_aPosition"),new openfl__$internal_renderer_opengl_utils_VertexAttribute(4,5126,false,"openfl_aColor")];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.graphicsDataPool = [];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.bucketPool = [];
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.SIN45 = 0.70710678118654752440084436210485;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.TAN22 = 0.4142135623730950488016887242097;
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectPosition = new openfl_geom_Point();
openfl__$internal_renderer_opengl_utils_GraphicsRenderer.objectBounds = new openfl_geom_Rectangle();
openfl__$internal_renderer_opengl_utils_ShaderManager.compiledShadersCache = new haxe_ds_StringMap();
openfl__$internal_renderer_opengl_utils_SpriteBatch.VERTS_PER_SPRITE = 4;
openfl__$internal_text_TextEngine.UTF8_TAB = 9;
openfl__$internal_text_TextEngine.UTF8_ENDLINE = 10;
openfl__$internal_text_TextEngine.UTF8_SPACE = 32;
openfl__$internal_text_TextEngine.UTF8_HYPHEN = 45;
openfl__$internal_text_TextEngine.__defaultFonts = new haxe_ds_StringMap();
openfl_display__$BlendMode_BlendMode_$Impl_$.ADD = 0;
openfl_display__$BlendMode_BlendMode_$Impl_$.ALPHA = 1;
openfl_display__$BlendMode_BlendMode_$Impl_$.DARKEN = 2;
openfl_display__$BlendMode_BlendMode_$Impl_$.DIFFERENCE = 3;
openfl_display__$BlendMode_BlendMode_$Impl_$.ERASE = 4;
openfl_display__$BlendMode_BlendMode_$Impl_$.HARDLIGHT = 5;
openfl_display__$BlendMode_BlendMode_$Impl_$.INVERT = 6;
openfl_display__$BlendMode_BlendMode_$Impl_$.LAYER = 7;
openfl_display__$BlendMode_BlendMode_$Impl_$.LIGHTEN = 8;
openfl_display__$BlendMode_BlendMode_$Impl_$.MULTIPLY = 9;
openfl_display__$BlendMode_BlendMode_$Impl_$.NORMAL = 10;
openfl_display__$BlendMode_BlendMode_$Impl_$.OVERLAY = 11;
openfl_display__$BlendMode_BlendMode_$Impl_$.SCREEN = 12;
openfl_display__$BlendMode_BlendMode_$Impl_$.SHADER = 13;
openfl_display__$BlendMode_BlendMode_$Impl_$.SUBTRACT = 14;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.NONE = 0;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.ROUND = 1;
openfl_display__$CapsStyle_CapsStyle_$Impl_$.SQUARE = 2;
openfl_display__$GradientType_GradientType_$Impl_$.LINEAR = 0;
openfl_display__$GradientType_GradientType_$Impl_$.RADIAL = 1;
openfl_display_Graphics.TILE_SCALE = 1;
openfl_display_Graphics.TILE_ROTATION = 2;
openfl_display_Graphics.TILE_RGB = 4;
openfl_display_Graphics.TILE_ALPHA = 8;
openfl_display_Graphics.TILE_TRANS_2x2 = 16;
openfl_display_Graphics.TILE_RECT = 32;
openfl_display_Graphics.TILE_ORIGIN = 64;
openfl_display_Graphics.TILE_BLEND_NORMAL = 0;
openfl_display_Graphics.TILE_BLEND_ADD = 65536;
openfl_display_Graphics.TILE_BLEND_MULTIPLY = 131072;
openfl_display_Graphics.TILE_BLEND_SCREEN = 262144;
openfl_display_Graphics.TILE_BLEND_SUBTRACT = 524288;
openfl_display_Graphics.TILE_BLEND_DARKEN = 1048576;
openfl_display_Graphics.TILE_BLEND_LIGHTEN = 2097152;
openfl_display_Graphics.TILE_BLEND_OVERLAY = 4194304;
openfl_display_Graphics.TILE_BLEND_HARDLIGHT = 8388608;
openfl_display_Graphics.TILE_BLEND_DIFFERENCE = 16777216;
openfl_display_Graphics.TILE_BLEND_INVERT = 33554432;
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.LINEAR_RGB = 0;
openfl_display__$InterpolationMethod_InterpolationMethod_$Impl_$.RGB = 1;
openfl_display__$JointStyle_JointStyle_$Impl_$.BEVEL = 0;
openfl_display__$JointStyle_JointStyle_$Impl_$.MITER = 1;
openfl_display__$JointStyle_JointStyle_$Impl_$.ROUND = 2;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.HORIZONTAL = 0;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.NONE = 1;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.NORMAL = 2;
openfl_display__$LineScaleMode_LineScaleMode_$Impl_$.VERTICAL = 3;
openfl_display_OpenGLView.CONTEXT_LOST = "glcontextlost";
openfl_display_OpenGLView.CONTEXT_RESTORED = "glcontextrestored";
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.ALWAYS = 0;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.AUTO = 1;
openfl_display__$PixelSnapping_PixelSnapping_$Impl_$.NEVER = 2;
openfl_display_Shader.uniformRegex = new EReg("^\\s*uniform\\s+(sampler(?:2D|Cube)|[bi]?vec[234]|float|int|bool|mat[234])\\s+(\\w+)\\s*(?:\\[(\\d+)\\])?\\s*;.*$","gmi");
openfl_display_Shader.aPosition = "openfl_aPosition";
openfl_display_Shader.aTexCoord = "openfl_aTexCoord0";
openfl_display_Shader.aColor = "openfl_aColor";
openfl_display_Shader.uSampler = "openfl_uSampler0";
openfl_display_Shader.uProjectionMatrix = "openfl_uProjectionMatrix";
openfl_display_Shader.uColorMultiplier = "openfl_uColorMultiplier";
openfl_display_Shader.uColorOffset = "openfl_uColorOffset";
openfl_display_Shader.uObjectSize = "openfl_uObjectSize";
openfl_display_Shader.uTextureSize = "openfl_uTextureSize";
openfl_display_Shader.vTexCoord = "openfl_vTexCoord";
openfl_display_Shader.vColor = "openfl_vColor";
openfl_display_Shader.vertexHeader = ["attribute vec2 " + openfl_display_Shader.aPosition + ";","attribute vec2 " + openfl_display_Shader.aTexCoord + ";","attribute vec4 " + openfl_display_Shader.aColor + ";","uniform mat3 " + openfl_display_Shader.uProjectionMatrix + ";","uniform vec2 " + openfl_display_Shader.uObjectSize + ";","uniform vec2 " + openfl_display_Shader.uTextureSize + ";","varying vec2 " + openfl_display_Shader.vTexCoord + ";","varying vec4 " + openfl_display_Shader.vColor + ";"];
openfl_display_Shader.fragmentHeader = ["uniform sampler2D " + openfl_display_Shader.uSampler + ";","uniform vec4 " + openfl_display_Shader.uColorMultiplier + ";","uniform vec4 " + openfl_display_Shader.uColorOffset + ";","uniform vec2 " + openfl_display_Shader.uObjectSize + ";","uniform vec2 " + openfl_display_Shader.uTextureSize + ";","varying vec2 " + openfl_display_Shader.vTexCoord + ";","varying vec4 " + openfl_display_Shader.vColor + ";","vec4 colorTransform(const vec4 color, const vec4 tint, const vec4 multiplier, const vec4 offset) {","   vec4 unmultiply = vec4(color.rgb / color.a, color.a);","   vec4 result = unmultiply * tint * multiplier;","   result = result + offset;","   result = clamp(result, 0., 1.);","   result = vec4(result.rgb * result.a, result.a);","   return result;","}"];
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.PAD = 0;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.REFLECT = 1;
openfl_display__$SpreadMethod_SpreadMethod_$Impl_$.REPEAT = 2;
openfl_display__$StageAlign_StageAlign_$Impl_$.BOTTOM = 0;
openfl_display__$StageAlign_StageAlign_$Impl_$.BOTTOM_LEFT = 1;
openfl_display__$StageAlign_StageAlign_$Impl_$.BOTTOM_RIGHT = 2;
openfl_display__$StageAlign_StageAlign_$Impl_$.LEFT = 3;
openfl_display__$StageAlign_StageAlign_$Impl_$.RIGHT = 4;
openfl_display__$StageAlign_StageAlign_$Impl_$.TOP = 5;
openfl_display__$StageAlign_StageAlign_$Impl_$.TOP_LEFT = 6;
openfl_display__$StageAlign_StageAlign_$Impl_$.TOP_RIGHT = 7;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.FULL_SCREEN = 0;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.FULL_SCREEN_INTERACTIVE = 1;
openfl_display__$StageDisplayState_StageDisplayState_$Impl_$.NORMAL = 2;
openfl_display__$StageQuality_StageQuality_$Impl_$.BEST = 0;
openfl_display__$StageQuality_StageQuality_$Impl_$.HIGH = 1;
openfl_display__$StageQuality_StageQuality_$Impl_$.LOW = 2;
openfl_display__$StageQuality_StageQuality_$Impl_$.MEDIUM = 3;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.EXACT_FIT = 0;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.NO_BORDER = 1;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.NO_SCALE = 2;
openfl_display__$StageScaleMode_StageScaleMode_$Impl_$.SHOW_ALL = 3;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.NEGATIVE = 0;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.NONE = 1;
openfl_display__$TriangleCulling_TriangleCulling_$Impl_$.POSITIVE = 2;
openfl_display3D_Context3D.TEXTURE_MAX_ANISOTROPY_EXT = 34046;
openfl_display3D_Context3D.MAX_SAMPLERS = 8;
openfl_display3D_Context3D.MAX_TEXTURE_MAX_ANISOTROPY_EXT = 34047;
openfl_display3D_Context3D.anisotropySupportTested = false;
openfl_display3D_Context3D.supportsAnisotropy = false;
openfl_display3D_Context3D.maxSupportedAnisotropy = 256;
openfl_display3D_Context3DClearMask.ALL = 17664;
openfl_display3D_Context3DClearMask.COLOR = 16384;
openfl_display3D_Context3DClearMask.DEPTH = 256;
openfl_display3D_Context3DClearMask.STENCIL = 1024;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.ALWAYS = 519;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.EQUAL = 514;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.GREATER = 516;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.GREATER_EQUAL = 518;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.LESS = 513;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.LESS_EQUAL = 515;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.NEVER = 512;
openfl_display3D__$Context3DCompareMode_Context3DCompareMode_$Impl_$.NOT_EQUAL = 517;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.BACK = 1028;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.FRONT = 1029;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.FRONT_AND_BACK = 1032;
openfl_display3D__$Context3DTriangleFace_Context3DTriangleFace_$Impl_$.NONE = 0;
openfl_display3D_textures_Texture.internalFormat = -1;
openfl_errors_Error.DEFAULT_TO_STRING = "Error";
openfl_events_Event.ACTIVATE = "activate";
openfl_events_Event.ADDED = "added";
openfl_events_Event.ADDED_TO_STAGE = "addedToStage";
openfl_events_Event.CANCEL = "cancel";
openfl_events_Event.CHANGE = "change";
openfl_events_Event.CLOSE = "close";
openfl_events_Event.COMPLETE = "complete";
openfl_events_Event.CONNECT = "connect";
openfl_events_Event.CONTEXT3D_CREATE = "context3DCreate";
openfl_events_Event.DEACTIVATE = "deactivate";
openfl_events_Event.ENTER_FRAME = "enterFrame";
openfl_events_Event.ID3 = "id3";
openfl_events_Event.INIT = "init";
openfl_events_Event.MOUSE_LEAVE = "mouseLeave";
openfl_events_Event.OPEN = "open";
openfl_events_Event.REMOVED = "removed";
openfl_events_Event.REMOVED_FROM_STAGE = "removedFromStage";
openfl_events_Event.RENDER = "render";
openfl_events_Event.RESIZE = "resize";
openfl_events_Event.SCROLL = "scroll";
openfl_events_Event.SELECT = "select";
openfl_events_Event.SOUND_COMPLETE = "soundComplete";
openfl_events_Event.TAB_CHILDREN_CHANGE = "tabChildrenChange";
openfl_events_Event.TAB_ENABLED_CHANGE = "tabEnabledChange";
openfl_events_Event.TAB_INDEX_CHANGE = "tabIndexChange";
openfl_events_Event.UNLOAD = "unload";
openfl_events_ActivityEvent.ACTIVITY = "activity";
openfl_events_TextEvent.LINK = "link";
openfl_events_TextEvent.TEXT_INPUT = "textInput";
openfl_events_ErrorEvent.ERROR = "error";
openfl_events_FocusEvent.FOCUS_IN = "focusIn";
openfl_events_FocusEvent.FOCUS_OUT = "focusOut";
openfl_events_FocusEvent.KEY_FOCUS_CHANGE = "keyFocusChange";
openfl_events_FocusEvent.MOUSE_FOCUS_CHANGE = "mouseFocusChange";
openfl_events_FullScreenEvent.FULL_SCREEN = "fullScreen";
openfl_events_FullScreenEvent.FULL_SCREEN_INTERACTIVE_ACCEPTED = "fullScreenInteractiveAccepted";
openfl_events_GameInputEvent.DEVICE_ADDED = "deviceAdded";
openfl_events_GameInputEvent.DEVICE_REMOVED = "deviceRemoved";
openfl_events_GameInputEvent.DEVICE_UNUSABLE = "deviceUnusable";
openfl_events_HTTPStatusEvent.HTTP_RESPONSE_STATUS = "httpResponseStatus";
openfl_events_HTTPStatusEvent.HTTP_STATUS = "httpStatus";
openfl_events_IOErrorEvent.IO_ERROR = "ioError";
openfl_events_KeyboardEvent.KEY_DOWN = "keyDown";
openfl_events_KeyboardEvent.KEY_UP = "keyUp";
openfl_events_MouseEvent.CLICK = "click";
openfl_events_MouseEvent.DOUBLE_CLICK = "doubleClick";
openfl_events_MouseEvent.MIDDLE_CLICK = "middleClick";
openfl_events_MouseEvent.MIDDLE_MOUSE_DOWN = "middleMouseDown";
openfl_events_MouseEvent.MIDDLE_MOUSE_UP = "middleMouseUp";
openfl_events_MouseEvent.MOUSE_DOWN = "mouseDown";
openfl_events_MouseEvent.MOUSE_MOVE = "mouseMove";
openfl_events_MouseEvent.MOUSE_OUT = "mouseOut";
openfl_events_MouseEvent.MOUSE_OVER = "mouseOver";
openfl_events_MouseEvent.MOUSE_UP = "mouseUp";
openfl_events_MouseEvent.MOUSE_WHEEL = "mouseWheel";
openfl_events_MouseEvent.RIGHT_CLICK = "rightClick";
openfl_events_MouseEvent.RIGHT_MOUSE_DOWN = "rightMouseDown";
openfl_events_MouseEvent.RIGHT_MOUSE_UP = "rightMouseUp";
openfl_events_MouseEvent.ROLL_OUT = "rollOut";
openfl_events_MouseEvent.ROLL_OVER = "rollOver";
openfl_events_NetStatusEvent.NET_STATUS = "netStatus";
openfl_events_ProgressEvent.PROGRESS = "progress";
openfl_events_ProgressEvent.SOCKET_DATA = "socketData";
openfl_events_SecurityErrorEvent.SECURITY_ERROR = "securityError";
openfl_events_TouchEvent.TOUCH_BEGIN = "touchBegin";
openfl_events_TouchEvent.TOUCH_END = "touchEnd";
openfl_events_TouchEvent.TOUCH_MOVE = "touchMove";
openfl_events_TouchEvent.TOUCH_OUT = "touchOut";
openfl_events_TouchEvent.TOUCH_OVER = "touchOver";
openfl_events_TouchEvent.TOUCH_ROLL_OUT = "touchRollOut";
openfl_events_TouchEvent.TOUCH_ROLL_OVER = "touchRollOver";
openfl_events_TouchEvent.TOUCH_TAP = "touchTap";
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.AXIS_ANGLE = 0;
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.EULER_ANGLES = 1;
openfl_geom__$Orientation3D_Orientation3D_$Impl_$.QUATERNION = 2;
openfl_media_Sound.__registeredSounds = new haxe_ds_StringMap();
openfl_net_NetConnection.CONNECT_SUCCESS = "connectSuccess";
openfl_net_SharedObject.defaultObjectEncoding = 3;
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.FLUSHED = 0;
openfl_net__$SharedObjectFlushStatus_SharedObjectFlushStatus_$Impl_$.PENDING = 1;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.BINARY = 0;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.TEXT = 1;
openfl_net__$URLLoaderDataFormat_URLLoaderDataFormat_$Impl_$.VARIABLES = 2;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.DELETE = 0;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.GET = 1;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.HEAD = 2;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.OPTIONS = 3;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.POST = 4;
openfl_net__$URLRequestMethod_URLRequestMethod_$Impl_$.PUT = 5;
openfl_system_SecurityDomain.currentDomain = new openfl_system_SecurityDomain();
openfl_system_System.useCodePage = false;
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.ADVANCED = 0;
openfl_text__$AntiAliasType_AntiAliasType_$Impl_$.NORMAL = 1;
openfl_text__$FontStyle_FontStyle_$Impl_$.BOLD = 0;
openfl_text__$FontStyle_FontStyle_$Impl_$.BOLD_ITALIC = 1;
openfl_text__$FontStyle_FontStyle_$Impl_$.ITALIC = 2;
openfl_text__$FontStyle_FontStyle_$Impl_$.REGULAR = 3;
openfl_text__$FontType_FontType_$Impl_$.DEVICE = 0;
openfl_text__$FontType_FontType_$Impl_$.EMBEDDED = 1;
openfl_text__$FontType_FontType_$Impl_$.EMBEDDED_CFF = 2;
openfl_text__$GridFitType_GridFitType_$Impl_$.NONE = 0;
openfl_text__$GridFitType_GridFitType_$Impl_$.PIXEL = 1;
openfl_text__$GridFitType_GridFitType_$Impl_$.SUBPIXEL = 2;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.CENTER = 0;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.LEFT = 1;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.NONE = 2;
openfl_text__$TextFieldAutoSize_TextFieldAutoSize_$Impl_$.RIGHT = 3;
openfl_text__$TextFieldType_TextFieldType_$Impl_$.DYNAMIC = 0;
openfl_text__$TextFieldType_TextFieldType_$Impl_$.INPUT = 1;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.CENTER = 0;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.END = 1;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.JUSTIFY = 2;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.LEFT = 3;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.RIGHT = 4;
openfl_text__$TextFormatAlign_TextFormatAlign_$Impl_$.START = 5;
openfl_ui_GameInputDevice.MAX_BUFFER_SIZE = 32000;
openfl_ui_Keyboard.NUMBER_0 = 48;
openfl_ui_Keyboard.NUMBER_1 = 49;
openfl_ui_Keyboard.NUMBER_2 = 50;
openfl_ui_Keyboard.NUMBER_3 = 51;
openfl_ui_Keyboard.NUMBER_4 = 52;
openfl_ui_Keyboard.NUMBER_5 = 53;
openfl_ui_Keyboard.NUMBER_6 = 54;
openfl_ui_Keyboard.NUMBER_7 = 55;
openfl_ui_Keyboard.NUMBER_8 = 56;
openfl_ui_Keyboard.NUMBER_9 = 57;
openfl_ui_Keyboard.A = 65;
openfl_ui_Keyboard.B = 66;
openfl_ui_Keyboard.C = 67;
openfl_ui_Keyboard.D = 68;
openfl_ui_Keyboard.E = 69;
openfl_ui_Keyboard.F = 70;
openfl_ui_Keyboard.G = 71;
openfl_ui_Keyboard.H = 72;
openfl_ui_Keyboard.I = 73;
openfl_ui_Keyboard.J = 74;
openfl_ui_Keyboard.K = 75;
openfl_ui_Keyboard.L = 76;
openfl_ui_Keyboard.M = 77;
openfl_ui_Keyboard.N = 78;
openfl_ui_Keyboard.O = 79;
openfl_ui_Keyboard.P = 80;
openfl_ui_Keyboard.Q = 81;
openfl_ui_Keyboard.R = 82;
openfl_ui_Keyboard.S = 83;
openfl_ui_Keyboard.T = 84;
openfl_ui_Keyboard.U = 85;
openfl_ui_Keyboard.V = 86;
openfl_ui_Keyboard.W = 87;
openfl_ui_Keyboard.X = 88;
openfl_ui_Keyboard.Y = 89;
openfl_ui_Keyboard.Z = 90;
openfl_ui_Keyboard.NUMPAD_0 = 96;
openfl_ui_Keyboard.NUMPAD_1 = 97;
openfl_ui_Keyboard.NUMPAD_2 = 98;
openfl_ui_Keyboard.NUMPAD_3 = 99;
openfl_ui_Keyboard.NUMPAD_4 = 100;
openfl_ui_Keyboard.NUMPAD_5 = 101;
openfl_ui_Keyboard.NUMPAD_6 = 102;
openfl_ui_Keyboard.NUMPAD_7 = 103;
openfl_ui_Keyboard.NUMPAD_8 = 104;
openfl_ui_Keyboard.NUMPAD_9 = 105;
openfl_ui_Keyboard.NUMPAD_MULTIPLY = 106;
openfl_ui_Keyboard.NUMPAD_ADD = 107;
openfl_ui_Keyboard.NUMPAD_ENTER = 108;
openfl_ui_Keyboard.NUMPAD_SUBTRACT = 109;
openfl_ui_Keyboard.NUMPAD_DECIMAL = 110;
openfl_ui_Keyboard.NUMPAD_DIVIDE = 111;
openfl_ui_Keyboard.F1 = 112;
openfl_ui_Keyboard.F2 = 113;
openfl_ui_Keyboard.F3 = 114;
openfl_ui_Keyboard.F4 = 115;
openfl_ui_Keyboard.F5 = 116;
openfl_ui_Keyboard.F6 = 117;
openfl_ui_Keyboard.F7 = 118;
openfl_ui_Keyboard.F8 = 119;
openfl_ui_Keyboard.F9 = 120;
openfl_ui_Keyboard.F10 = 121;
openfl_ui_Keyboard.F11 = 122;
openfl_ui_Keyboard.F12 = 123;
openfl_ui_Keyboard.F13 = 124;
openfl_ui_Keyboard.F14 = 125;
openfl_ui_Keyboard.F15 = 126;
openfl_ui_Keyboard.BACKSPACE = 8;
openfl_ui_Keyboard.TAB = 9;
openfl_ui_Keyboard.ALTERNATE = 18;
openfl_ui_Keyboard.ENTER = 13;
openfl_ui_Keyboard.COMMAND = 15;
openfl_ui_Keyboard.SHIFT = 16;
openfl_ui_Keyboard.CONTROL = 17;
openfl_ui_Keyboard.BREAK = 19;
openfl_ui_Keyboard.CAPS_LOCK = 20;
openfl_ui_Keyboard.NUMPAD = 21;
openfl_ui_Keyboard.ESCAPE = 27;
openfl_ui_Keyboard.SPACE = 32;
openfl_ui_Keyboard.PAGE_UP = 33;
openfl_ui_Keyboard.PAGE_DOWN = 34;
openfl_ui_Keyboard.END = 35;
openfl_ui_Keyboard.HOME = 36;
openfl_ui_Keyboard.LEFT = 37;
openfl_ui_Keyboard.RIGHT = 39;
openfl_ui_Keyboard.UP = 38;
openfl_ui_Keyboard.DOWN = 40;
openfl_ui_Keyboard.INSERT = 45;
openfl_ui_Keyboard.DELETE = 46;
openfl_ui_Keyboard.NUMLOCK = 144;
openfl_ui_Keyboard.SEMICOLON = 186;
openfl_ui_Keyboard.EQUAL = 187;
openfl_ui_Keyboard.COMMA = 188;
openfl_ui_Keyboard.MINUS = 189;
openfl_ui_Keyboard.PERIOD = 190;
openfl_ui_Keyboard.SLASH = 191;
openfl_ui_Keyboard.BACKQUOTE = 192;
openfl_ui_Keyboard.LEFTBRACKET = 219;
openfl_ui_Keyboard.BACKSLASH = 220;
openfl_ui_Keyboard.RIGHTBRACKET = 221;
openfl_ui_Keyboard.QUOTE = 222;
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.GESTURE = 0;
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.NONE = 1;
openfl_ui__$MultitouchInputMode_MultitouchInputMode_$Impl_$.TOUCH_POINT = 2;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.DEFLATE = 0;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.LZMA = 1;
openfl_utils__$CompressionAlgorithm_CompressionAlgorithm_$Impl_$.ZLIB = 2;
openfl_utils__$Endian_Endian_$Impl_$.BIG_ENDIAN = 0;
openfl_utils__$Endian_Endian_$Impl_$.LITTLE_ENDIAN = 1;
ApplicationMain.main();
})(typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this, typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this);
