!function(t){vare={};functionn(r){if(e[r])returne[r].exports;vari=e[r]={i:r,l:!1,exports:{}};returnt[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)returnt;if(4&e&&"object"==typeoft&&t&&t.__esModule)returnt;varr=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeoft)for(variint)n.d(r,i,function(e){returnt[e]}.bind(null,i));returnr},n.n=function(t){vare=t&&t.__esModule?function(){returnt.default}:function(){returnt};returnn.d(e,"a",e),e},n.o=function(t,e){returnObject.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";window.DWE={};n(1),n(2),n(3),n(4),n(5),n(6)},function(t,e,n){"use strict";DWE.context=function(t){returnt.star=function(e,n,r,i,o){vara=Math.PI/2*3,s=e,u=n,c=Math.PI/r;t.beginPath(),t.moveTo(e,n-i);for(varh=0;h<r;h++)s=e+Math.cos(a)*i,u=n+Math.sin(a)*i,t.lineTo(s,u),a+=c,s=e+Math.cos(a)*o,u=n+Math.sin(a)*o,t.lineTo(s,u),a+=c;t.lineTo(e,n-i),t.closePath()},t.fillStar=function(e,n,r,i,o){t.star(e,n,r,i,o),t.fill()},t.circle=function(e,n,r,i){i||(i=0),t.beginPath(),t.arc(e,n,r,i,2*Math.PI,!0),t.closePath()},t.fillCircle=function(e,n,r,i){t.circle(e,n,r,i),t.fill()},t}},function(t,e,n){"use strict";varr=function(){functiont(t,e){for(varn=0;n<e.length;n++){varr=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}returnfunction(e,n,r){returnn&&t(e.prototype,n),r&&t(e,r),e}}();functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}DWE.Math={},DWE.Math.random=function(t,e){returnMath.floor(Math.random()*e)+t},DWE.Math.lerp=function(t,e,n){return(1-n)*t+n*e},DWE.Math.reverseLerp=function(t,e,n){return1/((e-t)*n)},DWE.Math.intersectsBox=function(t,e,n,r,i,o,a,s){return2*Math.abs(t-i)<=n+a&&2*Math.abs(e-o)<=r+s},DWE.Math.clamp=function(t,e,n){returnMath.max(e,Math.min(n,t))},DWE.Math.Vector2=function(){functiont(e,n){i(this,t),this.x=e,this.y=n}returnr(t,[{key:"normalize",value:function(){vart=this.magnitude;returnthis.x/=t,this.y/=t,this}},{key:"distance",value:function(t){if(!(tinstanceofDWE.Math.Vector2))thrownewError("Distance function takes another Vector2 as an argument.");returnMath.abs(Math.sqrt(Math.pow(t.x-this.x,2)+Math.pow(t.y-this.y,2)))}},{key:"add",value:function(t){if(!(tinstanceofDWE.Math.Vector2))thrownewError("Add function takes another Vector2 as an argument.");returnthis.x+=t.x,this.y+=t.y,this}},{key:"subtract",value:function(t){if(!(tinstanceofDWE.Math.Vector2))thrownewError("Subtract function takes another Vector2 as an argument.");returnthis.x-=t.x,this.y-=t.y,this}},{key:"multiply",value:function(t){if("number"==typeoft&&!isNaN(t))returnthis.x*=t,this.y*=t,this;if(!(tinstanceofDWE.Math.Vector2))thrownewError("Multiply function takes a Vector2 or Number as an argument.");returnthis.x*=t.x,this.y*=t.y,this}},{key:"divide",value:function(t){if("number"==typeoft&&!isNaN(t))returnthis.x/=t,this.y/=t,this;if(!(tinstanceofDWE.Math.Vector2))thrownewError("Division function takes a Vector2 or Number as an argument.");returnthis.x/=t.x,this.y/=t.y,this}},{key:"magnitude",get:function(){returnMath.abs(Math.sqrt(this.x*this.x+this.y*this.y))}},{key:"isNormal",get:function(){return1===Math.floor(this.magnitude)}},{key:"angle",get:function(){returnthis.isNormal?Math.atan2(this.x,this.y):NaN}}]),t}(),DWE.Math.Box2=function(t){functione(t,n,r,o){i(this,e);vara=function(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));returna.width=r,a.height=o,a}returnfunction(t,e){if("function"!=typ