Error.stackTraceLimit=1/0;var$global,$module,$NaN=NaN;if("undefined"!=typeofwindow?$global=window:"undefined"!=typeofself?$global=self:"undefined"!=typeofglobal?($global=global).require=require:$global=this,void0===$global||void0===$global.Array)thrownewError("no global object found");if("undefined"!=typeofmodule&&($module=module),!$global.fs&&$global.require)try{varfs=$global.require("fs");"object"==typeoffs&&null!==fs&&0!==Object.keys(fs).length&&($global.fs=fs)}catch(e){}if(!$global.fs){varoutputBuf="",decoder=newTextDecoder("utf-8");$global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(e,n){varr=(outputBuf+=decoder.decode(n)).lastIndexOf("\n");return-1!=r&&(console.log(outputBuf.substr(0,r)),outputBuf=outputBuf.substr(r+1)),n.length},write:function(e,n,r,t,i,a){0===r&&t===n.length&&null===i?a(null,this.writeSync(e,n)):a(enosys())}}}var$throwRuntimeError,$linknames={},$packages={},$idCounter=0,$keys=function(e){returne?Object.keys(e):[]},$flushConsole=function(){},$throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference")},$call=function(e,n,r){returne.apply(n,r)},$makeFunc=function(e){returnfunction(){return$externalize(e(this,new($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments,[]))),$emptyInterface)}},$unused=function(e){},$print=console.log;if(void0!==$global.process&&$global.require)try{varutil=$global.require("util");$print=function(){$global.process.stderr.write(util.format.apply(this,arguments))}}catch(e){}var$println=console.log,$initAllLinknames=function(){for(vare=$keys($packages),n=0;n<e.length;n++){varr=$packages[e[n]].$initLinknames;"function"==typeofr&&r()}},$mapArray=function(e,n){for(varr=newe.constructor(e.length),t=0;t<e.length;t++)r[t]=n(e[t]);returnr},$methodVal=function(e,n){varr=e.$methodVals||{};e.$methodVals=r;vart=r[n];returnvoid0!==t?t:(t=e[n].bind(e),r[n]=t,t)},$methodExpr=function(e,n){varr=e.prototype[n];returnvoid0===r.$expr&&(r.$expr=function(){$stackDepthOffset--;try{returne.wrapped&&(arguments[0]=newe(arguments[0])),Function.call.apply(r,arguments)}finally{$stackDepthOffset++}}),r.$expr},$ifaceMethodExprs={},$ifaceMethodExpr=function(e){varn=$ifaceMethodExprs["$"+e];returnvoid0===n&&(n=$ifaceMethodExprs["$"+e]=function(){$stackDepthOffset--;try{returnFunction.call.apply(arguments[0][e],arguments)}finally{$stackDepthOffset++}}),n},$subslice=function(e,n,r,t){if(void0===r&&(r=e.$length),void0===t&&(t=e.$capacity),(n<0||r<n||t<r||r>e.$capacity||t>e.$capacity)&&$throwRuntimeError("slice bounds out of range"),e===e.constructor.nil)returne;vari=newe.constructor(e.$array);returni.$offset=e.$offset+n,i.$length=r-n,i.$capacity=t-n,i},$substring=function(e,n,r){return(n<0||r<n||r>e.length)&&$throwRuntimeError("slice bounds out of range"),e.substring(n,r)},$sliceToNativeArray=function(e){returne.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+e.$length):e.$array.slice(e.$offset,e.$offset+e.$length)},$sliceToGoArray=function(e,n){varr=n.elem;returnvoid0!==r&&e.$length<r.len&&$throwRuntimeError("cannot convert slice with length "+e.$length+" to pointer to array with length "+r.len),e==e.constructor.nil?n.nil:e.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+r.len):0==e.$offset&&e.$length==e.$capacity&&e.$length==r.len?e.$array:0==r.len?newr([]):void$throwRuntimeError("gopherjs: non-numeric slice to underlying array conversion is not supported for subslices")},$convertSliceType=function(e,n){returne==e.constructor.nil?n.nil:$subslice(newn(e.$array),e.$offset,e.$offset+e.$length)},$decodeRune=function(e,n){varr=e.charCodeAt(n);if(r<128)return[r,1];if(r!=r||r<192)return[65533,1];vart=e.charCodeAt(n+1);if(t!=t||t<128||192<=t)return[65533,1];if(r<224)return(a=(31&r)<<6|63&t)<=127?[65533,1]:[a,2];vari=e.charCodeAt(n+2);if(i!=i||i<128||192<=i)return[65533,1];if(r<240)return(a=(15&r)<<12|(63&t)<<6|63&i)<=2047?[65533,1]:55296<=a&&a<=57343?[65533,1]:[a,3];vara,o=e.charCodeAt(n+3);returno!=o||o
$packages["runtime"]=(function(){var$pkg={},$init,A,C,D,AT,AZ,BD,AM,E,AU;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg._type=$newType(0,$kindStruct,"runtime._type",true,"runtime",false,function(str_){this.$val=this;if(arguments.length===0){this.str="";return;}this.str=str_;});D=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError",true,"runtime",true,function(_interface_,concrete_,asserted_,missingMethod_){this.$val=this;if(arguments.length===0){this._interface=AZ.nil;this.concrete=AZ.nil;this.asserted=AZ.nil;this.missingMethod="";return;}this._interface=_interface_;this.concrete=concrete_;this.asserted=asserted_;this.missingMethod=missingMethod_;});AT=$pkg.errorString=$newType(8,$kindString,"runtime.errorString",true,"runtime",false,null);AZ=$ptrType(C);BD=$ptrType(D);C.ptr.prototype.string=function(){vara;a=this;returna.str;};C.prototype.string=function(){returnthis.$val.string();};C.ptr.prototype.pkgpath=function(){vara;a=this;return"";};C.prototype.pkgpath=function(){returnthis.$val.pkgpath();};D.ptr.prototype.RuntimeError=function(){};D.prototype.RuntimeError=function(){returnthis.$val.RuntimeError();};D.ptr.prototype.Error=function(){vara,b,c,d,e;a=this;b="interface";if(!(a._interface===AZ.nil)){b=a._interface.string();}c=a.asserted.string();if(a.concrete===AZ.nil){return"interface conversion: "+b+" is nil, not "+c;}d=a.concrete.string();if(a.missingMethod===""){e="interface conversion: "+b+" is "+d+", not "+c;if(d===c){if(!(a.concrete.pkgpath()===a.asserted.pkgpath())){e=e+(" (types from different packages)");}else{e=e+(" (types from different scopes)");}}returne;}return"interface conversion: "+d+" is not "+c+": missing method "+a.missingMethod;};D.prototype.Error=function(){returnthis.$val.Error();};E=function(){vara,b;a=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$jsObjectPtr=a.Object.ptr;$jsErrorPtr=a.Error.ptr;$throwRuntimeError=AU;AM=$internalize($goVersion,$String);b=$ifaceNil;b=newD.ptr(AZ.nil,AZ.nil,AZ.nil,"");$unused(b);};AT.prototype.RuntimeError=function(){vara;a=this.$val;};$ptrType(AT).prototype.RuntimeError=function(){returnnewAT(this.$get()).RuntimeError();};AT.prototype.Error=function(){vara;a=this.$val;return"runtime error: "+(a);};$ptrType(AT).prototype.Error=function(){returnnewAT(this.$get()).Error();};AU=function(a){vara;$panic(newAT((a)));};AZ.methods=[{prop:"string",name:"string",pkg:"runtime",typ:$funcType([],[$String],false)},{prop:"pkgpath",name:"pkgpath",pkg:"runtime",typ:$funcType([],[$String],false)}];BD.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AT.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init("runtime",[{prop:"str",name:"str",embedded:false,exported:false,typ:$String,tag:""}]);D.init("runtime",[{prop:"_interface",name:"_interface",embedded:false,exported:false,typ:AZ,tag:""},{prop:"concrete",name:"concrete",embedded:false,exported:false,typ:AZ,tag:""},{prop:"asserted",name:"asserted",embedded:false,exported:false,typ:AZ,tag:""},{prop:"missingMethod",name:"missingMethod",embedded:false,exported:false,typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var$f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case0:$r=A.$init();$s=1;case1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){breaks;}AM="";E();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return$f;};$pkg.$init=$init;return$pkg;})();
$packages["jsexport"]=(function(){var$pkg={},$init,A,B,C,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD;A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["jsexport/battle"];C=$packages["resolv"];AE=$ptrType(A.Object);AF=$sliceType(AE);AG=$sliceType($Uint64);AH=$ptrType(B.Vec2D);AI=$sliceType(AH);AJ=$ptrType(B.Polygon2D);AK=$ptrType(B.CharacterConfig);AL=$ptrType(B.RoomDownsyncFrame);AM=$ptrType(B.InputFrameDownsync);AN=$funcType([$Float64,$Float64],[AE],false);AO=$funcType([AH,AI],[AE],false);AP=$funcType([AJ],[AE],false);AQ=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Bool,$Bool,$Int32,$Int32,$Bool,$Int32,$Int32,$Int32,$Int32],[AE],false);AR=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Bool,$Int32,$Int32,$Int32,$Int32,$Int32],[AE],false);AS=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Bool,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32],[AE],false);AT=$funcType([$Uint64,$Uint64,$Float64,$Float64],[AE],false);AU=$ptrType(B.PlayerDownsync);AV=$sliceType(AU);AW=$ptrType(B.MeleeBullet);AX=$sliceType(AW);AY=$ptrType(B.FireballBullet);AZ=$sliceType(AY);BA=$funcType([$Int32,AV,$Int32,AX,AZ],[AE],false);BB=$funcType([$Int,$Int,$Int,$Int],[AE],false);BC=$funcType([],[AE],false);BD=$funcType([$Int32,AG,$Uint64],[AE],false);BE=$funcType([$Int32],[AE],false);BF=$funcType([AJ,$Float64,$Float64,$emptyInterface,$String],[AE],false);BG=$ptrType(C.Space);BH=$funcType([BG],[AF],false);BI=$funcType([$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64],[$Float64,$Float64],false);BJ=$funcType([$Float64,$Float64],[$Int32,$Int32],false);BK=$funcType([$Int32,$Int32],[$Float64,$Float64],false);BL=$sliceType($Int);BM=$funcType([BL],[AF],false);BN=$ptrType(C.RingBuffer);BO=$ptrType(C.Object);BP=$mapType($Int32,BO);BQ=$sliceType(AK);BR=$ptrType(C.Collision);BS=$sliceType(AI);BT=$sliceType($Bool);BU=$sliceType(BO);BV=$sliceType($Int32);BW=$funcType([BN,$Int32,BG,BP,$Float64,$Float64,BQ,BN,BR,AI,BS,BT,BU,BV,AG,$Bool],[$Bool],false);BX=$funcType([$Int32],[$Int32],false);BY=$funcType([$Int32],[$Bool],false);BZ=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32],[$Bool],false);CA=$funcType([BN,$Int32],[AE],false);CB=$funcType([AL,$Int],[AE],false);CC=$funcType([AM,$Int],[$Uint64],false);CD=$funcType([$Int],[AF],false);CE=$funcType([AM,$Int32],[$Bool],false);CF=$funcType([AM,$Int,$Uint64],[$Bool],false);CG=$funcType([AM,$Uint64],[$Bool],false);CH=$mapType($String,$emptyInterface);D=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case0:b=$makeSlice(AF,a);c=0;case1:if(!(c<a)){$s=2;continue;}d=B.GenerateRectCollider(0,0,0,0,0,0,0,0,0,0,$ifaceNil,"");$s=3;case3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){breaks;}e=A.MakeWrapper(d);$s=4;case4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){breaks;}((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]=e);c=c+(1)>>0;$s=1;continue;case2:$s=-1;returnb;}return;}var$f={$blk:D,$c:true,$r,a,b,c,d,e,$s};return$f;};$pkg.NewDynamicRectangleColliders=D;E=function(){returnA.MakeWrapper(C.NewCollision());};$pkg.NewCollisionHolder=E;F=function(a,b,c){vara,b,c;returnA.MakeWrapper(newB.InputFrameDownsync.ptr(a,b,c));};$pkg.NewInputFrameDownsync=F;G=function(a){vara;returnA.MakeWrapper(C.NewRingBuffer(a));};$pkg.NewRingBufferJs=G;H=function(a,b,c,d){vara,b,c,d;returnA.MakeWrapper(C.NewSpace(a,b,c,d));};$pkg.NewCollisionSpaceJs=H;I=function(a,b){vara,b;returnA.MakeWrapper(newB.Vec2D.ptr(a,b));};$pkg.NewVec2DJs=I;J=function(a,b){vara,b;returnA.MakeWrapper(newB.Polygon2D.p