UNPKG

@awayfl/awayfl-player

Version:

Flash Player emulator for executing SWF files (published for FP versions 6 and up) in javascript

1 lines 1.95 MB
var AWAY_NAPE=function(){"use strict";var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};"function"==typeof SuppressedError&&SuppressedError,function(){var e,n,t,r,i,p,o;function l(e,n){var t=function(){return t.method.apply(t.scope,arguments)};return t.scope=e,t.method=n,t}(e={}).callbacks={},e.constraint={},e.dynamics={},e.geom={},e.phys={},e.shape={},e.space={},e.util={},(n={}).callbacks={},n.constraint={},n.dynamics={},n.geom={},n.phys={},n.shape={},n.space={},n.util={},(i=function(){}).__name__=["Reflect"],i.field=function(e,n){try{return e[n]}catch(e){return null}},i.fields=function(e){var n=[];if(null!=e){var t=Object.prototype.hasOwnProperty;for(var r in e)"__id__"!=r&&"hx__closures__"!=r&&t.call(e,r)&&n.push(r)}return n},i.copy=function(e){for(var n={},t=0,r=i.fields(e);t<r.length;){var p=r[t];++t,n[p]=i.field(e,p)}return n},i.prototype.__class__=i,(r=function(){}).__name__=["Std"],r.string=function(e){return t.Boot.__string_rec(e,"")},r.prototype.__class__=r,(p=function(){}).__name__=["StringTools"],p.hex=function(e,n){for(var t="";t="0123456789ABCDEF".charAt(15&e)+t,(e>>>=4)>0;);if(null!=n)for(;t.length<n;)t="0"+t;return t},p.prototype.__class__=p,void 0===t&&(t={}),t._Boot||(t._Boot={}),t._Boot.HaxeError=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,t._Boot.HaxeError)},t._Boot.HaxeError.__name__=["js","_Boot","HaxeError"],t._Boot.HaxeError.__super__=Error,t._Boot.HaxeError.prototype=Object.create(Error.prototype),t._Boot.HaxeError.wrap=function(e){return e instanceof Error?e:new t._Boot.HaxeError(e)},t._Boot.HaxeError.prototype.val=null,t._Boot.HaxeError.prototype.__class__=t._Boot.HaxeError,t.Boot=function(){},t.Boot.__name__=["js","Boot"],t.Boot.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var n=e.__class__;if(null!=n)return n;var r=t.Boot.__nativeClassName(e);return null!=r?t.Boot.__resolveNativeClass(r):null},t.Boot.__string_rec=function(e,n){if(null==e)return"null";if(n.length>=5)return"<...>";var r=typeof e;switch("function"==r&&(e.__name__||e.__ename__)&&(r="object"),r){case"function":return"<function>";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";n+="\t";for(var p=2,o=e.length;p<o;){var l=p++;i+=2!=l?","+t.Boot.__string_rec(e[l],n):t.Boot.__string_rec(e[l],n)}return i+")"}var a="[";n+="\t";for(var s=0,_=e.length;s<_;){var h=s++;a+=(h>0?",":"")+t.Boot.__string_rec(e[h],n)}return a+="]"}var u;try{u=e.toString}catch(e){return"???"}if(null!=u&&u!=Object.toString&&"function"==typeof u){var d=e.toString();if("[object Object]"!=d)return d}var x=null,c="{\n";n+="\t";var z=null!=e.hasOwnProperty;for(var x in e)z&&!e.hasOwnProperty(x)||"prototype"!=x&&"__class__"!=x&&"__super__"!=x&&"__interfaces__"!=x&&"__properties__"!=x&&(2!=c.length&&(c+=", \n"),c+=n+x+" : "+t.Boot.__string_rec(e[x],n));return c+="\n"+(n=n.substring(1))+"}";case"string":return e;default:return String(e)}},t.Boot.__interfLoop=function(e,n){if(null==e)return!1;if(e==n)return!0;var r=e.__interfaces__;if(null!=r)for(var i=0,p=r.length;i<p;){var o=r[i++];if(o==n||t.Boot.__interfLoop(o,n))return!0}return t.Boot.__interfLoop(e.__super__,n)},t.Boot.__instanceof=function(e,n){if(null==n)return!1;switch(n){case Array:return e instanceof Array&&null==e.__enum__;case gi:return"boolean"==typeof e;case bi:return!0;case wi:return"number"==typeof e;case mi:return"number"==typeof e&&(0|e)===e;case String:return"string"==typeof e;default:if(null==e)return!1;if("function"==typeof n){if(e instanceof n)return!0;if(t.Boot.__interfLoop(t.Boot.getClass(e),n))return!0}else if("object"==typeof n&&t.Boot.__isNativeObj(n)&&e instanceof n)return!0;return n==Ei&&null!=e.__name__||(n==Mi&&null!=e.__ename__||e.__enum__==n)}},t.Boot.__nativeClassName=function(e){var n=t.Boot.__toStr.call(e).slice(8,-1);return"Object"==n||"Function"==n||"Math"==n||"JSON"==n?null:n},t.Boot.__isNativeObj=function(e){return null!=t.Boot.__nativeClassName(e)},t.Boot.__resolveNativeClass=function(e){return $global[e]},t.Boot.prototype.__class__=t.Boot;var a=e.Config=function(){};a.__name__=["nape","Config"],a.prototype.__class__=a;var s=e.callbacks.Callback=function(){if(this.zpp_inner=null,!We.internal)throw new t._Boot.HaxeError("Error: Callback cannot be instantiated derp!")};s.__name__=["nape","callbacks","Callback"],s.prototype.zpp_inner=null,s.prototype.get_event=function(){return on.events[this.zpp_inner.event]},s.prototype.get_listener=function(){return this.zpp_inner.listener.outer},s.prototype.toString=function(){return""},s.prototype.__class__=s;var _=e.callbacks.BodyCallback=function(){s.call(this)};_.__name__=["nape","callbacks","BodyCallback"],_.__super__=s,_.prototype=Object.create(s.prototype),_.prototype.get_body=function(){return this.zpp_inner.body.outer},_.prototype.toString=function(){var e="Cb:";return e="Cb:"+["WAKE","SLEEP"][this.zpp_inner.event-2],e+=":"+this.zpp_inner.body.outer.toString(),e+=" : listener: "+r.string(this.zpp_inner.listener.outer)},_.prototype.__class__=_;var h=e.callbacks.Listener=function(){this.zpp_inner=null,on.internal};h.__name__=["nape","callbacks","Listener"],h.prototype.zpp_inner=null,h.prototype.get_type=function(){return on.types[this.zpp_inner.type]},h.prototype.get_event=function(){return on.events[this.zpp_inner.event]},h.prototype.set_event=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot set listener event type to null");var n;on.events[this.zpp_inner.event]!=e&&(null==pn.CbEvent_BEGIN&&(pn.internal=!0,pn.CbEvent_BEGIN=new d,pn.internal=!1),e==pn.CbEvent_BEGIN?n=0:(null==pn.CbEvent_ONGOING&&(pn.internal=!0,pn.CbEvent_ONGOING=new d,pn.internal=!1),e==pn.CbEvent_ONGOING?n=6:(null==pn.CbEvent_END&&(pn.internal=!0,pn.CbEvent_END=new d,pn.internal=!1),e==pn.CbEvent_END?n=1:(null==pn.CbEvent_SLEEP&&(pn.internal=!0,pn.CbEvent_SLEEP=new d,pn.internal=!1),e==pn.CbEvent_SLEEP?n=3:(null==pn.CbEvent_WAKE&&(pn.internal=!0,pn.CbEvent_WAKE=new d,pn.internal=!1),e==pn.CbEvent_WAKE?n=2:(null==pn.CbEvent_PRE&&(pn.internal=!0,pn.CbEvent_PRE=new d,pn.internal=!1),n=e==pn.CbEvent_PRE?5:4))))),this.zpp_inner.swapEvent(n));return on.events[this.zpp_inner.event]},h.prototype.get_precedence=function(){return this.zpp_inner.precedence},h.prototype.set_precedence=function(e){return this.zpp_inner.precedence!=e&&(this.zpp_inner.precedence=e,this.zpp_inner.invalidate_precedence()),this.zpp_inner.precedence},h.prototype.get_space=function(){return null==this.zpp_inner.space?null:this.zpp_inner.space.outer},h.prototype.set_space=function(e){if((null==this.zpp_inner.space?null:this.zpp_inner.space.outer)!=e)if(null!=this.zpp_inner.space&&this.zpp_inner.space.outer.zpp_inner.wrap_listeners.remove(this),null!=e){var n=e.zpp_inner.wrap_listeners;n.zpp_inner.reverse_flag?n.push(this):n.unshift(this)}else this.zpp_inner.space=null;return null==this.zpp_inner.space?null:this.zpp_inner.space.outer},h.prototype.toString=function(){var e=["BEGIN","END","WAKE","SLEEP","BREAK","PRE","ONGOING"][this.zpp_inner.event];if(0==this.zpp_inner.type)return"BodyListener{"+e+"::"+r.string(this.zpp_inner.body.outer_zn.zpp_inner_zn.options.outer)+"}";if(1==this.zpp_inner.type)return"ConstraintListener{"+e+"::"+r.string(this.zpp_inner.constraint.outer_zn.zpp_inner_zn.options.outer)+"}";var n,t=this.zpp_inner.interaction;switch(t.itype){case 1:n="COLLISION";break;case 2:n="SENSOR";break;case 4:n="FLUID";break;default:n="ALL"}return(2==this.zpp_inner.type?"InteractionListener{"+e+"#"+n+"::"+r.string(t.outer_zni.zpp_inner_zn.options1.outer)+":"+r.string(t.outer_zni.zpp_inner_zn.options2.outer)+"}":"PreListener{"+n+"::"+r.string(t.outer_znp.zpp_inner_zn.options1.outer)+":"+r.string(t.outer_znp.zpp_inner_zn.options2.outer)+"}")+" precedence="+this.zpp_inner.precedence},h.prototype.__class__=h;var u=e.callbacks.BodyListener=function(e,n,r,i){if(null==i&&(i=0),this.zpp_inner_zn=null,on.internal=!0,h.call(this),on.internal=!1,null==r)throw new t._Boot.HaxeError("Error: BodyListener::handler cannot be null");var p=-1;if(null==pn.CbEvent_WAKE&&(pn.internal=!0,pn.CbEvent_WAKE=new d,pn.internal=!1),e==pn.CbEvent_WAKE)p=2;else{if(null==pn.CbEvent_SLEEP&&(pn.internal=!0,pn.CbEvent_SLEEP=new d,pn.internal=!1),e!=pn.CbEvent_SLEEP)throw new t._Boot.HaxeError("Error: cbEvent '"+e.toString()+"' is not a valid event type for a BodyListener");p=3}this.zpp_inner_zn=new ln(hn.argument(n),p,r),this.zpp_inner=this.zpp_inner_zn,this.zpp_inner.outer=this,this.zpp_inner_zn.outer_zn=this,this.zpp_inner.precedence=i};u.__name__=["nape","callbacks","BodyListener"],u.__super__=h,u.prototype=Object.create(h.prototype),u.prototype.zpp_inner_zn=null,u.prototype.get_options=function(){return this.zpp_inner_zn.options.outer},u.prototype.set_options=function(e){return this.zpp_inner_zn.options.set(e.zpp_inner),this.zpp_inner_zn.options.outer},u.prototype.get_handler=function(){return this.zpp_inner_zn.handler},u.prototype.set_handler=function(e){if(null==e)throw new t._Boot.HaxeError("Error: BodyListener::handler cannot be null");return this.zpp_inner_zn.handler=e,this.zpp_inner_zn.handler},u.prototype.__class__=u;var d=e.callbacks.CbEvent=function(){pn.internal};d.__name__=["nape","callbacks","CbEvent"],d.BEGIN=null,d.get_BEGIN=function(){return null==pn.CbEvent_BEGIN&&(pn.internal=!0,pn.CbEvent_BEGIN=new d,pn.internal=!1),pn.CbEvent_BEGIN},d.ONGOING=null,d.get_ONGOING=function(){return null==pn.CbEvent_ONGOING&&(pn.internal=!0,pn.CbEvent_ONGOING=new d,pn.internal=!1),pn.CbEvent_ONGOING},d.END=null,d.get_END=function(){return null==pn.CbEvent_END&&(pn.internal=!0,pn.CbEvent_END=new d,pn.internal=!1),pn.CbEvent_END},d.WAKE=null,d.get_WAKE=function(){return null==pn.CbEvent_WAKE&&(pn.internal=!0,pn.CbEvent_WAKE=new d,pn.internal=!1),pn.CbEvent_WAKE},d.SLEEP=null,d.get_SLEEP=function(){return null==pn.CbEvent_SLEEP&&(pn.internal=!0,pn.CbEvent_SLEEP=new d,pn.internal=!1),pn.CbEvent_SLEEP},d.BREAK=null,d.get_BREAK=function(){return null==pn.CbEvent_BREAK&&(pn.internal=!0,pn.CbEvent_BREAK=new d,pn.internal=!1),pn.CbEvent_BREAK},d.PRE=null,d.get_PRE=function(){return null==pn.CbEvent_PRE&&(pn.internal=!0,pn.CbEvent_PRE=new d,pn.internal=!1),pn.CbEvent_PRE},d.prototype.toString=function(){return null==pn.CbEvent_PRE&&(pn.internal=!0,pn.CbEvent_PRE=new d,pn.internal=!1),this==pn.CbEvent_PRE?"PRE":(null==pn.CbEvent_BEGIN&&(pn.internal=!0,pn.CbEvent_BEGIN=new d,pn.internal=!1),this==pn.CbEvent_BEGIN?"BEGIN":(null==pn.CbEvent_ONGOING&&(pn.internal=!0,pn.CbEvent_ONGOING=new d,pn.internal=!1),this==pn.CbEvent_ONGOING?"ONGOING":(null==pn.CbEvent_END&&(pn.internal=!0,pn.CbEvent_END=new d,pn.internal=!1),this==pn.CbEvent_END?"END":(null==pn.CbEvent_WAKE&&(pn.internal=!0,pn.CbEvent_WAKE=new d,pn.internal=!1),this==pn.CbEvent_WAKE?"WAKE":(null==pn.CbEvent_SLEEP&&(pn.internal=!0,pn.CbEvent_SLEEP=new d,pn.internal=!1),this==pn.CbEvent_SLEEP?"SLEEP":(null==pn.CbEvent_BREAK&&(pn.internal=!0,pn.CbEvent_BREAK=new d,pn.internal=!1),this==pn.CbEvent_BREAK?"BREAK":""))))))},d.prototype.__class__=d;var x=e.callbacks.CbType=function(){this.zpp_inner=null,this.zpp_inner=new rn,this.zpp_inner.outer=this};x.__name__=["nape","callbacks","CbType"],x.ANY_BODY=null,x.get_ANY_BODY=function(){return rn.ANY_BODY},x.ANY_CONSTRAINT=null,x.get_ANY_CONSTRAINT=function(){return rn.ANY_CONSTRAINT},x.ANY_SHAPE=null,x.get_ANY_SHAPE=function(){return rn.ANY_SHAPE},x.ANY_COMPOUND=null,x.get_ANY_COMPOUND=function(){return rn.ANY_COMPOUND},x.prototype.zpp_inner=null,x.prototype.get_id=function(){return this.zpp_inner.id},x.prototype.including=function(e){return new M(this).including(e)},x.prototype.excluding=function(e){return new M(this).excluding(e)},x.prototype.get_userData=function(){return null==this.zpp_inner.userData&&(this.zpp_inner.userData={}),this.zpp_inner.userData},x.prototype.get_interactors=function(){return null==this.zpp_inner.wrap_interactors&&(this.zpp_inner.wrap_interactors=Xr.get(this.zpp_inner.interactors,!0)),this.zpp_inner.wrap_interactors},x.prototype.get_constraints=function(){return null==this.zpp_inner.wrap_constraints&&(this.zpp_inner.wrap_constraints=Yr.get(this.zpp_inner.constraints,!0)),this.zpp_inner.wrap_constraints},x.prototype.toString=function(){return this==rn.ANY_BODY?"ANY_BODY":this==rn.ANY_SHAPE?"ANY_SHAPE":this==rn.ANY_COMPOUND?"ANY_COMPOUND":this==rn.ANY_CONSTRAINT?"ANY_CONSTRAINT":"CbType#"+this.zpp_inner.id},x.prototype.__class__=x;var c=e.callbacks.CbTypeIterator=function(){this.zpp_next=null,this.zpp_critical=!1,this.zpp_i=0,this.zpp_inner=null,ei.internal};c.__name__=["nape","callbacks","CbTypeIterator"],c.get=function(e){var n;if(null==c.zpp_pool){ei.internal=!0;var t=new c;ei.internal=!1,n=t}else{var r=c.zpp_pool;c.zpp_pool=r.zpp_next,n=r}return n.zpp_i=0,n.zpp_inner=e,n.zpp_critical=!1,n},c.prototype.zpp_inner=null,c.prototype.zpp_i=null,c.prototype.zpp_critical=null,c.prototype.zpp_next=null,c.prototype.hasNext=function(){this.zpp_inner.zpp_inner.valmod();var e=this.zpp_inner;e.zpp_inner.valmod(),e.zpp_inner.zip_length&&(e.zpp_inner.zip_length=!1,e.zpp_inner.user_length=e.zpp_inner.inner.length);var n=e.zpp_inner.user_length;return this.zpp_critical=!0,this.zpp_i<n||(this.zpp_next=c.zpp_pool,c.zpp_pool=this,this.zpp_inner=null,!1)},c.prototype.next=function(){return this.zpp_critical=!1,this.zpp_inner.at(this.zpp_i++)},c.prototype.__class__=c;var z=e.callbacks.CbTypeList=function(){this.zpp_inner=null,this.zpp_inner=new ei,this.zpp_inner.outer=this};z.__name__=["nape","callbacks","CbTypeList"],z.fromArray=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot convert null Array to Nape list");for(var n=new z,r=0;r<e.length;){var i=e[r];++r,n.push(i)}return n},z.prototype.zpp_inner=null,z.prototype.get_length=function(){return this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),this.zpp_inner.user_length},z.prototype.has=function(e){return this.zpp_inner.valmod(),this.zpp_inner.inner.has(e.zpp_inner)},z.prototype.at=function(e){var n;if(this.zpp_inner.valmod(),e>=0?(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),n=e>=this.zpp_inner.user_length):n=!0,n)throw new t._Boot.HaxeError("Error: Index out of bounds");if(this.zpp_inner.reverse_flag&&(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),e=this.zpp_inner.user_length-1-e),e<this.zpp_inner.at_index||null==this.zpp_inner.at_ite)this.zpp_inner.at_index=e,this.zpp_inner.at_ite=this.zpp_inner.inner.iterator_at(e);else for(;this.zpp_inner.at_index!=e;)this.zpp_inner.at_index++,this.zpp_inner.at_ite=this.zpp_inner.at_ite.next;return this.zpp_inner.at_ite.elt.outer},z.prototype.push=function(e){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: CbTypeList is immutable");this.zpp_inner.modify_test(),this.zpp_inner.valmod();var n=null==this.zpp_inner.adder||this.zpp_inner.adder(e);if(n){if(this.zpp_inner.reverse_flag)this.zpp_inner.inner.add(e.zpp_inner);else{var r;if(null==this.zpp_inner.push_ite)null==this.zpp_inner.inner.head?r=null:(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),r=this.zpp_inner.inner.iterator_at(this.zpp_inner.user_length-1)),this.zpp_inner.push_ite=r;this.zpp_inner.push_ite=this.zpp_inner.inner.insert(this.zpp_inner.push_ite,e.zpp_inner)}this.zpp_inner.invalidate(),null!=this.zpp_inner.post_adder&&this.zpp_inner.post_adder(e)}return n},z.prototype.unshift=function(e){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: CbTypeList is immutable");this.zpp_inner.modify_test(),this.zpp_inner.valmod();var n=null==this.zpp_inner.adder||this.zpp_inner.adder(e);if(n){if(this.zpp_inner.reverse_flag){var r;if(null==this.zpp_inner.push_ite)null==this.zpp_inner.inner.head?r=null:(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),r=this.zpp_inner.inner.iterator_at(this.zpp_inner.user_length-1)),this.zpp_inner.push_ite=r;this.zpp_inner.push_ite=this.zpp_inner.inner.insert(this.zpp_inner.push_ite,e.zpp_inner)}else this.zpp_inner.inner.add(e.zpp_inner);this.zpp_inner.invalidate(),null!=this.zpp_inner.post_adder&&this.zpp_inner.post_adder(e)}return n},z.prototype.pop=function(){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: CbTypeList is immutable");if(this.zpp_inner.modify_test(),null==this.zpp_inner.inner.head)throw new t._Boot.HaxeError("Error: Cannot remove from empty list");this.zpp_inner.valmod();var e=null;if(this.zpp_inner.reverse_flag){var n=(e=this.zpp_inner.inner.head.elt).outer;null!=this.zpp_inner.subber&&this.zpp_inner.subber(n),this.zpp_inner.dontremove||this.zpp_inner.inner.pop()}else{var r;null!=this.zpp_inner.at_ite&&null==this.zpp_inner.at_ite.next&&(this.zpp_inner.at_ite=null),this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),1==this.zpp_inner.user_length?r=null:(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),r=this.zpp_inner.inner.iterator_at(this.zpp_inner.user_length-2));var i=(e=null==r?this.zpp_inner.inner.head.elt:r.next.elt).outer;null!=this.zpp_inner.subber&&this.zpp_inner.subber(i),this.zpp_inner.dontremove||this.zpp_inner.inner.erase(r)}return this.zpp_inner.invalidate(),e.outer},z.prototype.shift=function(){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: CbTypeList is immutable");if(this.zpp_inner.modify_test(),null==this.zpp_inner.inner.head)throw new t._Boot.HaxeError("Error: Cannot remove from empty list");this.zpp_inner.valmod();var e=null;if(this.zpp_inner.reverse_flag){var n;null!=this.zpp_inner.at_ite&&null==this.zpp_inner.at_ite.next&&(this.zpp_inner.at_ite=null),this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),1==this.zpp_inner.user_length?n=null:(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),n=this.zpp_inner.inner.iterator_at(this.zpp_inner.user_length-2));var r=(e=null==n?this.zpp_inner.inner.head.elt:n.next.elt).outer;null!=this.zpp_inner.subber&&this.zpp_inner.subber(r),this.zpp_inner.dontremove||this.zpp_inner.inner.erase(n)}else{var i=(e=this.zpp_inner.inner.head.elt).outer;null!=this.zpp_inner.subber&&this.zpp_inner.subber(i),this.zpp_inner.dontremove||this.zpp_inner.inner.pop()}return this.zpp_inner.invalidate(),e.outer},z.prototype.add=function(e){return this.zpp_inner.reverse_flag?this.push(e):this.unshift(e)},z.prototype.remove=function(e){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: CbTypeList is immutable");var n;this.zpp_inner.modify_test(),this.zpp_inner.valmod(),n=!1;for(var r=this.zpp_inner.inner.head;null!=r;){if(r.elt==e.zpp_inner){n=!0;break}r=r.next}return n&&(null!=this.zpp_inner.subber&&this.zpp_inner.subber(e),this.zpp_inner.dontremove||this.zpp_inner.inner.remove(e.zpp_inner),this.zpp_inner.invalidate()),n},z.prototype.clear=function(){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: CbTypeList is immutable");if(this.zpp_inner.reverse_flag)for(;null!=this.zpp_inner.inner.head;)this.pop();else for(;null!=this.zpp_inner.inner.head;)this.shift()},z.prototype.empty=function(){return null==this.zpp_inner.inner.head},z.prototype.iterator=function(){return this.zpp_inner.valmod(),c.get(this)},z.prototype.copy=function(e){null==e&&(e=!1);var n=new z;this.zpp_inner.valmod();for(var r=c.get(this);;){r.zpp_inner.zpp_inner.valmod();var i=r.zpp_inner;i.zpp_inner.valmod(),i.zpp_inner.zip_length&&(i.zpp_inner.zip_length=!1,i.zpp_inner.user_length=i.zpp_inner.inner.length);var p,o=i.zpp_inner.user_length;if(r.zpp_critical=!0,r.zpp_i<o?p=!0:(r.zpp_next=c.zpp_pool,c.zpp_pool=r,r.zpp_inner=null,p=!1),!p)break;r.zpp_critical=!1;var l=r.zpp_inner.at(r.zpp_i++);if(e)throw new t._Boot.HaxeError("Error: CbType is not a copyable type");n.push(l)}return n},z.prototype.merge=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot merge with null list");e.zpp_inner.valmod();for(var n=c.get(e);;){n.zpp_inner.zpp_inner.valmod();var r=n.zpp_inner;r.zpp_inner.valmod(),r.zpp_inner.zip_length&&(r.zpp_inner.zip_length=!1,r.zpp_inner.user_length=r.zpp_inner.inner.length);var i,p=r.zpp_inner.user_length;if(n.zpp_critical=!0,n.zpp_i<p?i=!0:(n.zpp_next=c.zpp_pool,c.zpp_pool=n,n.zpp_inner=null,i=!1),!i)break;n.zpp_critical=!1;var o=n.zpp_inner.at(n.zpp_i++);this.has(o)||(this.zpp_inner.reverse_flag?this.push(o):this.unshift(o))}},z.prototype.toString=function(){var e="[",n=!0;this.zpp_inner.valmod();for(var t=c.get(this);;){t.zpp_inner.zpp_inner.valmod();var r=t.zpp_inner;r.zpp_inner.valmod(),r.zpp_inner.zip_length&&(r.zpp_inner.zip_length=!1,r.zpp_inner.user_length=r.zpp_inner.inner.length);var i,p=r.zpp_inner.user_length;if(t.zpp_critical=!0,t.zpp_i<p?i=!0:(t.zpp_next=c.zpp_pool,c.zpp_pool=t,t.zpp_inner=null,i=!1),!i)break;t.zpp_critical=!1;var o=t.zpp_inner.at(t.zpp_i++);n||(e+=","),e+=null==o?"NULL":o.toString(),n=!1}return e+"]"},z.prototype.foreach=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot execute null on list elements");this.zpp_inner.valmod();for(var n=c.get(this);;){n.zpp_inner.zpp_inner.valmod();var r=n.zpp_inner;r.zpp_inner.valmod(),r.zpp_inner.zip_length&&(r.zpp_inner.zip_length=!1,r.zpp_inner.user_length=r.zpp_inner.inner.length);var i,p=r.zpp_inner.user_length;if(n.zpp_critical=!0,n.zpp_i<p?i=!0:(n.zpp_next=c.zpp_pool,c.zpp_pool=n,n.zpp_inner=null,i=!1),!i)break;try{n.zpp_critical=!1,e(n.zpp_inner.at(n.zpp_i++))}catch(e){n.zpp_next=c.zpp_pool,c.zpp_pool=n,n.zpp_inner=null;break}}return this},z.prototype.filter=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot select elements of list with null");for(var n=0;this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),n<this.zpp_inner.user_length;){var r=this.at(n);try{e(r)?++n:this.remove(r)}catch(e){break}}return this},z.prototype.__class__=z;var y=e.callbacks.ConstraintCallback=function(){s.call(this)};y.__name__=["nape","callbacks","ConstraintCallback"],y.__super__=s,y.prototype=Object.create(s.prototype),y.prototype.get_constraint=function(){return this.zpp_inner.constraint.outer},y.prototype.toString=function(){var e="Cb:";return e="Cb:"+["WAKE","SLEEP","BREAK"][this.zpp_inner.event-2],e+=":"+this.zpp_inner.constraint.outer.toString(),e+=" : listener: "+r.string(this.zpp_inner.listener.outer)},y.prototype.__class__=y;var v=e.callbacks.ConstraintListener=function(e,n,r,i){if(null==i&&(i=0),this.zpp_inner_zn=null,on.internal=!0,h.call(this),on.internal=!1,null==r)throw new t._Boot.HaxeError("Error: ConstraintListener::handler cannot be null");var p=-1;if(null==pn.CbEvent_WAKE&&(pn.internal=!0,pn.CbEvent_WAKE=new d,pn.internal=!1),e==pn.CbEvent_WAKE)p=2;else if(null==pn.CbEvent_SLEEP&&(pn.internal=!0,pn.CbEvent_SLEEP=new d,pn.internal=!1),e==pn.CbEvent_SLEEP)p=3;else{if(null==pn.CbEvent_BREAK&&(pn.internal=!0,pn.CbEvent_BREAK=new d,pn.internal=!1),e!=pn.CbEvent_BREAK)throw new t._Boot.HaxeError("Error: cbEvent '"+e.toString()+"' is not a valid event type for a ConstraintListener");p=4}this.zpp_inner_zn=new an(hn.argument(n),p,r),this.zpp_inner=this.zpp_inner_zn,this.zpp_inner.outer=this,this.zpp_inner_zn.outer_zn=this,this.zpp_inner.precedence=i};v.__name__=["nape","callbacks","ConstraintListener"],v.__super__=h,v.prototype=Object.create(h.prototype),v.prototype.zpp_inner_zn=null,v.prototype.get_options=function(){return this.zpp_inner_zn.options.outer},v.prototype.set_options=function(e){return this.zpp_inner_zn.options.set(e.zpp_inner),this.zpp_inner_zn.options.outer},v.prototype.get_handler=function(){return this.zpp_inner_zn.handler},v.prototype.set_handler=function(e){if(null==e)throw new t._Boot.HaxeError("Error: ConstraintListener::handler cannot be null");return this.zpp_inner_zn.handler=e,this.zpp_inner_zn.handler},v.prototype.__class__=v;var f=e.callbacks.InteractionCallback=function(){s.call(this)};f.__name__=["nape","callbacks","InteractionCallback"],f.__super__=s,f.prototype=Object.create(s.prototype),f.prototype.get_int1=function(){return this.zpp_inner.int1.outer_i},f.prototype.get_int2=function(){return this.zpp_inner.int2.outer_i},f.prototype.get_arbiters=function(){return this.zpp_inner.wrap_arbiters},f.prototype.toString=function(){var e="Cb:";return e="Cb:"+["BEGIN","END","","","","","ONGOING"][this.zpp_inner.event],e+=":"+this.zpp_inner.int1.outer_i.toString()+"/"+this.zpp_inner.int2.outer_i.toString(),e+=" : "+this.zpp_inner.wrap_arbiters.toString(),e+=" : listener: "+r.string(this.zpp_inner.listener.outer)},f.prototype.__class__=f;var m=e.callbacks.InteractionListener=function(e,n,r,i,p,o){if(null==o&&(o=0),this.zpp_inner_zn=null,on.internal=!0,h.call(this),on.internal=!1,null==p)throw new t._Boot.HaxeError("Error: InteractionListener::handler cannot be null");if(null==e)throw new t._Boot.HaxeError("Error: CbEvent cannot be null for InteractionListener");var l=-1;if(null==pn.CbEvent_BEGIN&&(pn.internal=!0,pn.CbEvent_BEGIN=new d,pn.internal=!1),e==pn.CbEvent_BEGIN)l=0;else if(null==pn.CbEvent_END&&(pn.internal=!0,pn.CbEvent_END=new d,pn.internal=!1),e==pn.CbEvent_END)l=1;else{if(null==pn.CbEvent_ONGOING&&(pn.internal=!0,pn.CbEvent_ONGOING=new d,pn.internal=!1),e!=pn.CbEvent_ONGOING)throw new t._Boot.HaxeError("Error: CbEvent '"+e.toString()+"' is not a valid event type for InteractionListener");l=6}if(this.zpp_inner_zn=new _n(hn.argument(r),hn.argument(i),l,2),this.zpp_inner=this.zpp_inner_zn,this.zpp_inner.outer=this,this.zpp_inner_zn.outer_zni=this,this.zpp_inner.precedence=o,this.zpp_inner_zn.handleri=p,null==n)throw new t._Boot.HaxeError("Error: Cannot set listener interaction type to null");var a,s,_=this.zpp_inner_zn.itype;(1==_?(null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),a=pn.InteractionType_COLLISION):2==_?(null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),a=pn.InteractionType_SENSOR):4==_?(null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),a=pn.InteractionType_FLUID):7==_?(null==pn.InteractionType_ANY&&(pn.internal=!0,pn.InteractionType_ANY=new b,pn.internal=!1),a=pn.InteractionType_ANY):a=null,a!=n)&&(null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),n==pn.InteractionType_COLLISION?s=1:(null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),n==pn.InteractionType_SENSOR?s=2:(null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),s=n==pn.InteractionType_FLUID?4:7)),this.zpp_inner_zn.itype=s);var u=this.zpp_inner_zn.itype;1==u?null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1):2==u?null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1):4==u?null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1):7==u&&null==pn.InteractionType_ANY&&(pn.internal=!0,pn.InteractionType_ANY=new b,pn.internal=!1)};m.__name__=["nape","callbacks","InteractionListener"],m.__super__=h,m.prototype=Object.create(h.prototype),m.prototype.zpp_inner_zn=null,m.prototype.get_options1=function(){return this.zpp_inner_zn.options1.outer},m.prototype.set_options1=function(e){return this.zpp_inner_zn.options1.set(e.zpp_inner),this.zpp_inner_zn.options1.outer},m.prototype.get_options2=function(){return this.zpp_inner_zn.options2.outer},m.prototype.set_options2=function(e){return this.zpp_inner_zn.options2.set(e.zpp_inner),this.zpp_inner_zn.options2.outer},m.prototype.get_interactionType=function(){var e=this.zpp_inner_zn.itype;return 1==e?(null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),pn.InteractionType_COLLISION):2==e?(null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),pn.InteractionType_SENSOR):4==e?(null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),pn.InteractionType_FLUID):7==e?(null==pn.InteractionType_ANY&&(pn.internal=!0,pn.InteractionType_ANY=new b,pn.internal=!1),pn.InteractionType_ANY):null},m.prototype.set_interactionType=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot set listener interaction type to null");var n,r,i=this.zpp_inner_zn.itype;(1==i?(null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),n=pn.InteractionType_COLLISION):2==i?(null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),n=pn.InteractionType_SENSOR):4==i?(null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),n=pn.InteractionType_FLUID):7==i?(null==pn.InteractionType_ANY&&(pn.internal=!0,pn.InteractionType_ANY=new b,pn.internal=!1),n=pn.InteractionType_ANY):n=null,n!=e)&&(null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),e==pn.InteractionType_COLLISION?r=1:(null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),e==pn.InteractionType_SENSOR?r=2:(null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),r=e==pn.InteractionType_FLUID?4:7)),this.zpp_inner_zn.itype=r);var p=this.zpp_inner_zn.itype;return 1==p?(null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),pn.InteractionType_COLLISION):2==p?(null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),pn.InteractionType_SENSOR):4==p?(null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),pn.InteractionType_FLUID):7==p?(null==pn.InteractionType_ANY&&(pn.internal=!0,pn.InteractionType_ANY=new b,pn.internal=!1),pn.InteractionType_ANY):null},m.prototype.get_handler=function(){return this.zpp_inner_zn.handleri},m.prototype.set_handler=function(e){if(null==e)throw new t._Boot.HaxeError("Error: InteractionListener::handler cannot be null");return this.zpp_inner_zn.handleri=e,this.zpp_inner_zn.handleri},m.prototype.get_allowSleepingCallbacks=function(){return this.zpp_inner_zn.allowSleepingCallbacks},m.prototype.set_allowSleepingCallbacks=function(e){return this.zpp_inner_zn.allowSleepingCallbacks=e,this.zpp_inner_zn.allowSleepingCallbacks},m.prototype.__class__=m;var b=e.callbacks.InteractionType=function(){pn.internal};b.__name__=["nape","callbacks","InteractionType"],b.COLLISION=null,b.get_COLLISION=function(){return null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),pn.InteractionType_COLLISION},b.SENSOR=null,b.get_SENSOR=function(){return null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),pn.InteractionType_SENSOR},b.FLUID=null,b.get_FLUID=function(){return null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),pn.InteractionType_FLUID},b.ANY=null,b.get_ANY=function(){return null==pn.InteractionType_ANY&&(pn.internal=!0,pn.InteractionType_ANY=new b,pn.internal=!1),pn.InteractionType_ANY},b.prototype.toString=function(){return null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),this==pn.InteractionType_COLLISION?"COLLISION":(null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),this==pn.InteractionType_SENSOR?"SENSOR":(null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),this==pn.InteractionType_FLUID?"FLUID":(null==pn.InteractionType_ANY&&(pn.internal=!0,pn.InteractionType_ANY=new b,pn.internal=!1),this==pn.InteractionType_ANY?"ANY":"")))},b.prototype.__class__=b;var w=e.callbacks.ListenerIterator=function(){this.zpp_next=null,this.zpp_critical=!1,this.zpp_i=0,this.zpp_inner=null,$r.internal};w.__name__=["nape","callbacks","ListenerIterator"],w.get=function(e){var n;if(null==w.zpp_pool){$r.internal=!0;var t=new w;$r.internal=!1,n=t}else{var r=w.zpp_pool;w.zpp_pool=r.zpp_next,n=r}return n.zpp_i=0,n.zpp_inner=e,n.zpp_critical=!1,n},w.prototype.zpp_inner=null,w.prototype.zpp_i=null,w.prototype.zpp_critical=null,w.prototype.zpp_next=null,w.prototype.hasNext=function(){this.zpp_inner.zpp_inner.valmod();var e=this.zpp_inner;e.zpp_inner.valmod(),e.zpp_inner.zip_length&&(e.zpp_inner.zip_length=!1,e.zpp_inner.user_length=e.zpp_inner.inner.length);var n=e.zpp_inner.user_length;return this.zpp_critical=!0,this.zpp_i<n||(this.zpp_next=w.zpp_pool,w.zpp_pool=this,this.zpp_inner=null,!1)},w.prototype.next=function(){return this.zpp_critical=!1,this.zpp_inner.at(this.zpp_i++)},w.prototype.__class__=w;var g=e.callbacks.ListenerList=function(){this.zpp_inner=null,this.zpp_inner=new $r,this.zpp_inner.outer=this};g.__name__=["nape","callbacks","ListenerList"],g.fromArray=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot convert null Array to Nape list");for(var n=new g,r=0;r<e.length;){var i=e[r];++r,n.push(i)}return n},g.prototype.zpp_inner=null,g.prototype.get_length=function(){return this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),this.zpp_inner.user_length},g.prototype.has=function(e){return this.zpp_inner.valmod(),this.zpp_inner.inner.has(e.zpp_inner)},g.prototype.at=function(e){var n;if(this.zpp_inner.valmod(),e>=0?(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),n=e>=this.zpp_inner.user_length):n=!0,n)throw new t._Boot.HaxeError("Error: Index out of bounds");if(this.zpp_inner.reverse_flag&&(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),e=this.zpp_inner.user_length-1-e),e<this.zpp_inner.at_index||null==this.zpp_inner.at_ite)this.zpp_inner.at_index=e,this.zpp_inner.at_ite=this.zpp_inner.inner.iterator_at(e);else for(;this.zpp_inner.at_index!=e;)this.zpp_inner.at_index++,this.zpp_inner.at_ite=this.zpp_inner.at_ite.next;return this.zpp_inner.at_ite.elt.outer},g.prototype.push=function(e){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: ListenerList is immutable");this.zpp_inner.modify_test(),this.zpp_inner.valmod();var n=null==this.zpp_inner.adder||this.zpp_inner.adder(e);if(n){if(this.zpp_inner.reverse_flag)this.zpp_inner.inner.add(e.zpp_inner);else{var r;if(null==this.zpp_inner.push_ite)null==this.zpp_inner.inner.head?r=null:(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),r=this.zpp_inner.inner.iterator_at(this.zpp_inner.user_length-1)),this.zpp_inner.push_ite=r;this.zpp_inner.push_ite=this.zpp_inner.inner.insert(this.zpp_inner.push_ite,e.zpp_inner)}this.zpp_inner.invalidate(),null!=this.zpp_inner.post_adder&&this.zpp_inner.post_adder(e)}return n},g.prototype.unshift=function(e){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: ListenerList is immutable");this.zpp_inner.modify_test(),this.zpp_inner.valmod();var n=null==this.zpp_inner.adder||this.zpp_inner.adder(e);if(n){if(this.zpp_inner.reverse_flag){var r;if(null==this.zpp_inner.push_ite)null==this.zpp_inner.inner.head?r=null:(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),r=this.zpp_inner.inner.iterator_at(this.zpp_inner.user_length-1)),this.zpp_inner.push_ite=r;this.zpp_inner.push_ite=this.zpp_inner.inner.insert(this.zpp_inner.push_ite,e.zpp_inner)}else this.zpp_inner.inner.add(e.zpp_inner);this.zpp_inner.invalidate(),null!=this.zpp_inner.post_adder&&this.zpp_inner.post_adder(e)}return n},g.prototype.pop=function(){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: ListenerList is immutable");if(this.zpp_inner.modify_test(),null==this.zpp_inner.inner.head)throw new t._Boot.HaxeError("Error: Cannot remove from empty list");this.zpp_inner.valmod();var e=null;if(this.zpp_inner.reverse_flag){var n=(e=this.zpp_inner.inner.head.elt).outer;null!=this.zpp_inner.subber&&this.zpp_inner.subber(n),this.zpp_inner.dontremove||this.zpp_inner.inner.pop()}else{var r;null!=this.zpp_inner.at_ite&&null==this.zpp_inner.at_ite.next&&(this.zpp_inner.at_ite=null),this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),1==this.zpp_inner.user_length?r=null:(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),r=this.zpp_inner.inner.iterator_at(this.zpp_inner.user_length-2));var i=(e=null==r?this.zpp_inner.inner.head.elt:r.next.elt).outer;null!=this.zpp_inner.subber&&this.zpp_inner.subber(i),this.zpp_inner.dontremove||this.zpp_inner.inner.erase(r)}return this.zpp_inner.invalidate(),e.outer},g.prototype.shift=function(){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: ListenerList is immutable");if(this.zpp_inner.modify_test(),null==this.zpp_inner.inner.head)throw new t._Boot.HaxeError("Error: Cannot remove from empty list");this.zpp_inner.valmod();var e=null;if(this.zpp_inner.reverse_flag){var n;null!=this.zpp_inner.at_ite&&null==this.zpp_inner.at_ite.next&&(this.zpp_inner.at_ite=null),this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),1==this.zpp_inner.user_length?n=null:(this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),n=this.zpp_inner.inner.iterator_at(this.zpp_inner.user_length-2));var r=(e=null==n?this.zpp_inner.inner.head.elt:n.next.elt).outer;null!=this.zpp_inner.subber&&this.zpp_inner.subber(r),this.zpp_inner.dontremove||this.zpp_inner.inner.erase(n)}else{var i=(e=this.zpp_inner.inner.head.elt).outer;null!=this.zpp_inner.subber&&this.zpp_inner.subber(i),this.zpp_inner.dontremove||this.zpp_inner.inner.pop()}return this.zpp_inner.invalidate(),e.outer},g.prototype.add=function(e){return this.zpp_inner.reverse_flag?this.push(e):this.unshift(e)},g.prototype.remove=function(e){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: ListenerList is immutable");var n;this.zpp_inner.modify_test(),this.zpp_inner.valmod(),n=!1;for(var r=this.zpp_inner.inner.head;null!=r;){if(r.elt==e.zpp_inner){n=!0;break}r=r.next}return n&&(null!=this.zpp_inner.subber&&this.zpp_inner.subber(e),this.zpp_inner.dontremove||this.zpp_inner.inner.remove(e.zpp_inner),this.zpp_inner.invalidate()),n},g.prototype.clear=function(){if(this.zpp_inner.immutable)throw new t._Boot.HaxeError("Error: ListenerList is immutable");if(this.zpp_inner.reverse_flag)for(;null!=this.zpp_inner.inner.head;)this.pop();else for(;null!=this.zpp_inner.inner.head;)this.shift()},g.prototype.empty=function(){return null==this.zpp_inner.inner.head},g.prototype.iterator=function(){return this.zpp_inner.valmod(),w.get(this)},g.prototype.copy=function(e){null==e&&(e=!1);var n=new g;this.zpp_inner.valmod();for(var r=w.get(this);;){r.zpp_inner.zpp_inner.valmod();var i=r.zpp_inner;i.zpp_inner.valmod(),i.zpp_inner.zip_length&&(i.zpp_inner.zip_length=!1,i.zpp_inner.user_length=i.zpp_inner.inner.length);var p,o=i.zpp_inner.user_length;if(r.zpp_critical=!0,r.zpp_i<o?p=!0:(r.zpp_next=w.zpp_pool,w.zpp_pool=r,r.zpp_inner=null,p=!1),!p)break;r.zpp_critical=!1;var l=r.zpp_inner.at(r.zpp_i++);if(e)throw new t._Boot.HaxeError("Error: Listener is not a copyable type");n.push(l)}return n},g.prototype.merge=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot merge with null list");e.zpp_inner.valmod();for(var n=w.get(e);;){n.zpp_inner.zpp_inner.valmod();var r=n.zpp_inner;r.zpp_inner.valmod(),r.zpp_inner.zip_length&&(r.zpp_inner.zip_length=!1,r.zpp_inner.user_length=r.zpp_inner.inner.length);var i,p=r.zpp_inner.user_length;if(n.zpp_critical=!0,n.zpp_i<p?i=!0:(n.zpp_next=w.zpp_pool,w.zpp_pool=n,n.zpp_inner=null,i=!1),!i)break;n.zpp_critical=!1;var o=n.zpp_inner.at(n.zpp_i++);this.has(o)||(this.zpp_inner.reverse_flag?this.push(o):this.unshift(o))}},g.prototype.toString=function(){var e="[",n=!0;this.zpp_inner.valmod();for(var t=w.get(this);;){t.zpp_inner.zpp_inner.valmod();var r=t.zpp_inner;r.zpp_inner.valmod(),r.zpp_inner.zip_length&&(r.zpp_inner.zip_length=!1,r.zpp_inner.user_length=r.zpp_inner.inner.length);var i,p=r.zpp_inner.user_length;if(t.zpp_critical=!0,t.zpp_i<p?i=!0:(t.zpp_next=w.zpp_pool,w.zpp_pool=t,t.zpp_inner=null,i=!1),!i)break;t.zpp_critical=!1;var o=t.zpp_inner.at(t.zpp_i++);n||(e+=","),e+=null==o?"NULL":o.toString(),n=!1}return e+"]"},g.prototype.foreach=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot execute null on list elements");this.zpp_inner.valmod();for(var n=w.get(this);;){n.zpp_inner.zpp_inner.valmod();var r=n.zpp_inner;r.zpp_inner.valmod(),r.zpp_inner.zip_length&&(r.zpp_inner.zip_length=!1,r.zpp_inner.user_length=r.zpp_inner.inner.length);var i,p=r.zpp_inner.user_length;if(n.zpp_critical=!0,n.zpp_i<p?i=!0:(n.zpp_next=w.zpp_pool,w.zpp_pool=n,n.zpp_inner=null,i=!1),!i)break;try{n.zpp_critical=!1,e(n.zpp_inner.at(n.zpp_i++))}catch(e){n.zpp_next=w.zpp_pool,w.zpp_pool=n,n.zpp_inner=null;break}}return this},g.prototype.filter=function(e){if(null==e)throw new t._Boot.HaxeError("Error: Cannot select elements of list with null");for(var n=0;this.zpp_inner.valmod(),this.zpp_inner.zip_length&&(this.zpp_inner.zip_length=!1,this.zpp_inner.user_length=this.zpp_inner.inner.length),n<this.zpp_inner.user_length;){var r=this.at(n);try{e(r)?++n:this.remove(r)}catch(e){break}}return this},g.prototype.__class__=g;var E=e.callbacks.ListenerType=function(){pn.internal};E.__name__=["nape","callbacks","ListenerType"],E.BODY=null,E.get_BODY=function(){return null==pn.ListenerType_BODY&&(pn.internal=!0,pn.ListenerType_BODY=new E,pn.internal=!1),pn.ListenerType_BODY},E.CONSTRAINT=null,E.get_CONSTRAINT=function(){return null==pn.ListenerType_CONSTRAINT&&(pn.internal=!0,pn.ListenerType_CONSTRAINT=new E,pn.internal=!1),pn.ListenerType_CONSTRAINT},E.INTERACTION=null,E.get_INTERACTION=function(){return null==pn.ListenerType_INTERACTION&&(pn.internal=!0,pn.ListenerType_INTERACTION=new E,pn.internal=!1),pn.ListenerType_INTERACTION},E.PRE=null,E.get_PRE=function(){return null==pn.ListenerType_PRE&&(pn.internal=!0,pn.ListenerType_PRE=new E,pn.internal=!1),pn.ListenerType_PRE},E.prototype.toString=function(){return null==pn.ListenerType_BODY&&(pn.internal=!0,pn.ListenerType_BODY=new E,pn.internal=!1),this==pn.ListenerType_BODY?"BODY":(null==pn.ListenerType_CONSTRAINT&&(pn.internal=!0,pn.ListenerType_CONSTRAINT=new E,pn.internal=!1),this==pn.ListenerType_CONSTRAINT?"CONSTRAINT":(null==pn.ListenerType_INTERACTION&&(pn.internal=!0,pn.ListenerType_INTERACTION=new E,pn.internal=!1),this==pn.ListenerType_INTERACTION?"INTERACTION":(null==pn.ListenerType_PRE&&(pn.internal=!0,pn.ListenerType_PRE=new E,pn.internal=!1),this==pn.ListenerType_PRE?"PRE":"")))},E.prototype.__class__=E;var M=e.callbacks.OptionType=function(e,n){this.zpp_inner=null,this.zpp_inner=new hn,this.zpp_inner.outer=this,null!=e&&this.including(e),null!=n&&this.excluding(n)};M.__name__=["nape","callbacks","OptionType"],M.prototype.zpp_inner=null,M.prototype.get_includes=function(){return null==this.zpp_inner.wrap_includes&&this.zpp_inner.setup_includes(),this.zpp_inner.wrap_includes},M.prototype.get_excludes=function(){return null==this.zpp_inner.wrap_excludes&&this.zpp_inner.setup_excludes(),this.zpp_inner.wrap_excludes},M.prototype.including=function(e){return this.zpp_inner.append(this.zpp_inner.includes,e),this},M.prototype.excluding=function(e){return this.zpp_inner.append(this.zpp_inner.excludes,e),this},M.prototype.toString=function(){null==this.zpp_inner.wrap_includes&&this.zpp_inner.setup_includes();var e=this.zpp_inner.wrap_includes.toString();return null==this.zpp_inner.wrap_excludes&&this.zpp_inner.setup_excludes(),"@{"+e+" excluding "+this.zpp_inner.wrap_excludes.toString()+"}"},M.prototype.__class__=M;var B=e.callbacks.PreCallback=function(){s.call(this)};B.__name__=["nape","callbacks","PreCallback"],B.__super__=s,B.prototype=Object.create(s.prototype),B.prototype.get_arbiter=function(){return this.zpp_inner.pre_arbiter.wrapper()},B.prototype.get_int1=function(){return this.zpp_inner.int1.outer_i},B.prototype.get_int2=function(){return this.zpp_inner.int2.outer_i},B.prototype.get_swapped=function(){return this.zpp_inner.pre_swapped},B.prototype.toString=function(){var e="Cb:PRE:";return e="Cb:PRE::"+this.zpp_inner.int1.outer_i.toString()+"/"+this.zpp_inner.int2.outer_i.toString(),e+=" : "+this.zpp_inner.pre_arbiter.wrapper().toString(),e+=" : listnener: "+r.string(this.zpp_inner.listener.outer)},B.prototype.__class__=B;var C=e.callbacks.PreFlag=function(){pn.internal};C.__name__=["nape","callbacks","PreFlag"],C.ACCEPT=null,C.get_ACCEPT=function(){return null==pn.PreFlag_ACCEPT&&(pn.internal=!0,pn.PreFlag_ACCEPT=new C,pn.internal=!1),pn.PreFlag_ACCEPT},C.IGNORE=null,C.get_IGNORE=function(){return null==pn.PreFlag_IGNORE&&(pn.internal=!0,pn.PreFlag_IGNORE=new C,pn.internal=!1),pn.PreFlag_IGNORE},C.ACCEPT_ONCE=null,C.get_ACCEPT_ONCE=function(){return null==pn.PreFlag_ACCEPT_ONCE&&(pn.internal=!0,pn.PreFlag_ACCEPT_ONCE=new C,pn.internal=!1),pn.PreFlag_ACCEPT_ONCE},C.IGNORE_ONCE=null,C.get_IGNORE_ONCE=function(){return null==pn.PreFlag_IGNORE_ONCE&&(pn.internal=!0,pn.PreFlag_IGNORE_ONCE=new C,pn.internal=!1),pn.PreFlag_IGNORE_ONCE},C.prototype.toString=function(){return null==pn.PreFlag_ACCEPT&&(pn.internal=!0,pn.PreFlag_ACCEPT=new C,pn.internal=!1),this==pn.PreFlag_ACCEPT?"ACCEPT":(null==pn.PreFlag_IGNORE&&(pn.internal=!0,pn.PreFlag_IGNORE=new C,pn.internal=!1),this==pn.PreFlag_IGNORE?"IGNORE":(null==pn.PreFlag_ACCEPT_ONCE&&(pn.internal=!0,pn.PreFlag_ACCEPT_ONCE=new C,pn.internal=!1),this==pn.PreFlag_ACCEPT_ONCE?"ACCEPT_ONCE":(null==pn.PreFlag_IGNORE_ONCE&&(pn.internal=!0,pn.PreFlag_IGNORE_ONCE=new C,pn.internal=!1),this==pn.PreFlag_IGNORE_ONCE?"IGNORE_ONCE":"")))},C.prototype.__class__=C;var V=e.callbacks.PreListener=function(e,n,r,i,p,o){if(null==o&&(o=!1),null==p&&(p=0),this.zpp_inner_zn=null,on.internal=!0,h.call(this),on.internal=!1,null==i)throw new t._Boot.HaxeError("Error: PreListener must take a handler!");if(this.zpp_inner_zn=new _n(hn.argument(n),hn.argument(r),5,3),this.zpp_inner=this.zpp_inner_zn,this.zpp_inner.outer=this,this.zpp_inner_zn.outer_znp=this,this.zpp_inner.precedence=p,this.zpp_inner_zn.pure=o,this.zpp_inner_zn.handlerp=i,null==e)throw new t._Boot.HaxeError("Error: Cannot set listener interaction type to null");var l,a,s=this.zpp_inner_zn.itype;(1==s?(null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),l=pn.InteractionType_COLLISION):2==s?(null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),l=pn.InteractionType_SENSOR):4==s?(null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),l=pn.InteractionType_FLUID):7==s?(null==pn.InteractionType_ANY&&(pn.internal=!0,pn.InteractionType_ANY=new b,pn.internal=!1),l=pn.InteractionType_ANY):l=null,l!=e)&&(null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1),e==pn.InteractionType_COLLISION?a=1:(null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1),e==pn.InteractionType_SENSOR?a=2:(null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1),a=e==pn.InteractionType_FLUID?4:7)),this.zpp_inner_zn.itype=a);var _=this.zpp_inner_zn.itype;1==_?null==pn.InteractionType_COLLISION&&(pn.internal=!0,pn.InteractionType_COLLISION=new b,pn.internal=!1):2==_?null==pn.InteractionType_SENSOR&&(pn.internal=!0,pn.InteractionType_SENSOR=new b,pn.internal=!1):4==_?null==pn.InteractionType_FLUID&&(pn.internal=!0,pn.InteractionType_FLUID=new b,pn.internal=!1):7==_&&null==pn.InteractionType_ANY&&(pn.internal=!0,pn.InteractionType_ANY=new b,pn.internal=!1)};V.__name__=["nape","callbacks","PreListener"],V.__super__=h,V.prototype=Object.create(h.prototype),V.prototype.zpp_inner_zn=null,V.prototype.get_options1=function(){return this.zpp_inner_zn.options1.outer},V.prototype.set_options1=function(e){return this.zpp_inner_zn.options1.set(e.zpp_inner),this.zpp_inner_zn.options1.outer},V.prototype.get_options2=function(){return this.zpp_inner_zn.options2.outer},V.prototype.set_options2=function(e){return this.zpp_inner_zn.options2.set(e.zpp_inner),this.zpp_inner_zn.options2.outer},V.prototype.get_handler=function(){return this.zpp_inner_zn.handlerp},V.prototype.set_handler=function(e){if(null==e)throw new t._Boot.HaxeError("Error: PreListener must take a non-null handler!");return this.zpp_inner_zn.handlerp=e,this.zpp_inner_zn.wake(),this.zpp_inner_zn.handlerp},V.prototype.get_pure=function(){return this.zpp_inner_zn.pure},V.prototype.set_pure=function(e){return e||this.zpp_inner_zn.wake(),this.zpp_inner_zn.pure=e,this.zpp_inner_zn.pure},V.prototype.get_interactionType=function(){var e=this.zpp_inner_zn.itype;return 1==e?(null==pn.InteractionType_COLLISION&&(pn.internal=!0,