var Re=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Le(F){return F&&F.__esModule&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F}var se={exports:{}};(function(F,R){(function(S,t){F.exports=t()})(Re,function(){return function(c){var S={};function t(e){if(S[e])return S[e].exports;var u=S[e]={i:e,l:!1,exports:{}};return c[e].call(u.exports,u,u.exports,t),u.l=!0,u.exports}return t.m=c,t.c=S,t.d=function(e,u,o){t.o(e,u)||Object.defineProperty(e,u,{enumerable:!0,get:o})},t.r=function(e){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,u){if(u&1&&(e=t(e)),u&8||u&4&&typeof e=="object"&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),u&2&&typeof e!="string")for(var a in e)t.d(o,a,function(s){return e[s]}.bind(null,a));return o},t.n=function(e){var u=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(u,"a",u),u},t.o=function(e,u){return Object.prototype.hasOwnProperty.call(e,u)},t.p="",t(t.s=1528)}([function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */function t(i){return!!i.get&&typeof i.get=="function"||!!i.set&&typeof i.set=="function"}function e(i,n,l){var r=l?i[n]:Object.getOwnPropertyDescriptor(i,n);return!l&&r.value&&typeof r.value=="object"&&(r=r.value),r&&t(r)?(typeof r.enumerable=="undefined"&&(r.enumerable=!0),typeof r.configurable=="undefined"&&(r.configurable=!0),r):!1}function u(i,n){var l=Object.getOwnPropertyDescriptor(i,n);return l?(l.value&&typeof l.value=="object"&&(l=l.value),l.configurable===!1):!1}function o(i,n,l,r){for(var h in n)if(!!n.hasOwnProperty(h)){var f=e(n,h,l);if(f!==!1){var v=r||i;if(u(v.prototype,h)){if(s.ignoreFinals)continue;throw new Error("cannot override final property '"+h+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(i.prototype,h,f)}else i.prototype[h]=n[h]}}function a(i,n){if(!!n){Array.isArray(n)||(n=[n]);for(var l=0;l<n.length;l++)o(i,n[l].prototype||n[l])}}function s(i){i||(i={});var n,l;if(i.initialize){if(typeof i.initialize!="function")throw new Error("initialize must be a function");n=i.initialize,delete i.initialize}else if(i.Extends){var r=i.Extends;n=function(){r.apply(this,arguments)}}else n=function(){};i.Extends?(n.prototype=Object.create(i.Extends.prototype),n.prototype.constructor=n,l=i.Extends,delete i.Extends):n.prototype.constructor=n;var h=null;return i.Mixins&&(h=i.Mixins,delete i.Mixins),a(n,h),o(n,i,!0,l),n}s.extend=o,s.mixin=a,s.ignoreFinals=!1,c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(){};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=typeof e;return!e||a==="number"||a==="string"?o:e.hasOwnProperty(u)&&e[u]!==void 0?e[u]:o};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(124),o=new e({initialize:function(s,i){this.x=0,this.y=0,typeof s=="object"?(this.x=s.x||0,this.y=s.y||0):(i===void 0&&(i=s),this.x=s||0,this.y=i||0)},clone:function(){return new o(this.x,this.y)},copy:function(a){return this.x=a.x||0,this.y=a.y||0,this},setFromObject:function(a){return this.x=a.x||0,this.y=a.y||0,this},set:function(a,s){return s===void 0&&(s=a),this.x=a,this.y=s,this},setTo:function(a,s){return this.set(a,s)},setToPolar:function(a,s){return s==null&&(s=1),this.x=Math.cos(a)*s,this.y=Math.sin(a)*s,this},equals:function(a){return this.x===a.x&&this.y===a.y},fuzzyEquals:function(a,s){return u(this.x,a.x,s)&&u(this.y,a.y,s)},angle:function(){var a=Math.atan2(this.y,this.x);return a<0&&(a+=2*Math.PI),a},setAngle:function(a){return this.setToPolar(a,this.length())},add:function(a){return this.x+=a.x,this.y+=a.y,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this},scale:function(a){return isFinite(a)?(this.x*=a,this.y*=a):(this.x=0,this.y=0),this},divide:function(a){return this.x/=a.x,this.y/=a.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(a){var s=a.x-this.x,i=a.y-this.y;return Math.sqrt(s*s+i*i)},distanceSq:function(a){var s=a.x-this.x,i=a.y-this.y;return s*s+i*i},length:function(){var a=this.x,s=this.y;return Math.sqrt(a*a+s*s)},setLength:function(a){return this.normalize().scale(a)},lengthSq:function(){var a=this.x,s=this.y;return a*a+s*s},normalize:function(){var a=this.x,s=this.y,i=a*a+s*s;return i>0&&(i=1/Math.sqrt(i),this.x=a*i,this.y=s*i),this},normalizeRightHand:function(){var a=this.x;return this.x=this.y*-1,this.y=a,this},normalizeLeftHand:function(){var a=this.x;return this.x=this.y,this.y=a*-1,this},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},lerp:function(a,s){s===void 0&&(s=0);var i=this.x,n=this.y;return this.x=i+s*(a.x-i),this.y=n+s*(a.y-n),this},transformMat3:function(a){var s=this.x,i=this.y,n=a.val;return this.x=n[0]*s+n[3]*i+n[6],this.y=n[1]*s+n[4]*i+n[7],this},transformMat4:function(a){var s=this.x,i=this.y,n=a.val;return this.x=n[0]*s+n[4]*i+n[12],this.y=n[1]*s+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(a){var s=this.length();return s&&s>a&&this.scale(a/s),this},reflect:function(a){return a=a.clone().normalize(),this.subtract(a.scale(2*this.dot(a)))},mirror:function(a){return this.reflect(a).negate()},rotate:function(a){var s=Math.cos(a),i=Math.sin(a);return this.set(s*this.x-i*this.y,i*this.x+s*this.y)}});o.ZERO=new o,o.RIGHT=new o(1,0),o.LEFT=new o(-1,0),o.UP=new o(0,-1),o.DOWN=new o(0,1),o.ONE=new o(1,1),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(56),o=new e({initialize:function(s,i){s===void 0&&(s=0),i===void 0&&(i=s),this.type=u.POINT,this.x=s,this.y=i},setTo:function(a,s){return a===void 0&&(a=0),s===void 0&&(s=a),this.x=a,this.y=s,this}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(24),o=t(20),a=new e({initialize:function(i){this.scene=i,this.systems=i.sys,this.events=i.sys.events,this.displayList,this.updateList,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},existing:function(s){return(s.renderCanvas||s.renderWebGL)&&this.displayList.add(s),s.preUpdate&&this.updateList.add(s),s},shutdown:function(){this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(s,i){a.prototype.hasOwnProperty(s)||(a.prototype[s]=i)},a.remove=function(s){a.prototype.hasOwnProperty(s)&&delete a.prototype[s]},u.register("GameObjectFactory",a,"add"),c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(!e||typeof e=="number")return o;if(e.hasOwnProperty(u))return e[u];if(u.indexOf(".")!==-1){for(var a=u.split("."),s=e,i=o,n=0;n<a.length;n++)if(s.hasOwnProperty(a[n]))i=s[a[n]],s=s[a[n]];else{i=o;break}return i}else return o};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){if(typeof e!="object"||e.nodeType||e===e.window)return!1;try{if(e.constructor&&!{}.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={},e={install:function(u){for(var o in t)u[o]=t[o]},register:function(u,o){t[u]=o},destroy:function(){t={}}};c.exports=e},function(c,S,t){var e=Object.prototype.hasOwnProperty,u="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(u=!1));function a(l,r,h){this.fn=l,this.context=r,this.once=h||!1}function s(l,r,h,f,v){if(typeof h!="function")throw new TypeError("The listener must be a function");var d=new a(h,f||l,v),p=u?u+r:r;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],d]:l._events[p].push(d):(l._events[p]=d,l._eventsCount++),l}function i(l,r){--l._eventsCount==0?l._events=new o:delete l._events[r]}function n(){this._events=new o,this._eventsCount=0}n.prototype.eventNames=function(){var r=[],h,f;if(this._eventsCount===0)return r;for(f in h=this._events)e.call(h,f)&&r.push(u?f.slice(1):f);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(h)):r},n.prototype.listeners=function(r){var h=u?u+r:r,f=this._events[h];if(!f)return[];if(f.fn)return[f.fn];for(var v=0,d=f.length,p=new Array(d);v<d;v++)p[v]=f[v].fn;return p},n.prototype.listenerCount=function(r){var h=u?u+r:r,f=this._events[h];return f?f.fn?1:f.length:0},n.prototype.emit=function(r,h,f,v,d,p){var g=u?u+r:r;if(!this._events[g])return!1;var m=this._events[g],x=arguments.length,y,T;if(m.fn){switch(m.once&&this.removeListener(r,m.fn,void 0,!0),x){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,h),!0;case 3:return m.fn.call(m.context,h,f),!0;case 4:return m.fn.call(m.context,h,f,v),!0;case 5:return m.fn.call(m.context,h,f,v,d),!0;case 6:return m.fn.call(m.context,h,f,v,d,p),!0}for(T=1,y=new Array(x-1);T<x;T++)y[T-1]=arguments[T];m.fn.apply(m.context,y)}else{var E=m.length,C;for(T=0;T<E;T++)switch(m[T].once&&this.removeListener(r,m[T].fn,void 0,!0),x){case 1:m[T].fn.call(m[T].context);break;case 2:m[T].fn.call(m[T].context,h);break;case 3:m[T].fn.call(m[T].context,h,f);break;case 4:m[T].fn.call(m[T].context,h,f,v);break;default:if(!y)for(C=1,y=new Array(x-1);C<x;C++)y[C-1]=arguments[C];m[T].fn.apply(m[T].context,y)}}return!0},n.prototype.on=function(r,h,f){return s(this,r,h,f,!1)},n.prototype.once=function(r,h,f){return s(this,r,h,f,!0)},n.prototype.removeListener=function(r,h,f,v){var d=u?u+r:r;if(!this._events[d])return this;if(!h)return i(this,d),this;var p=this._events[d];if(p.fn)p.fn===h&&(!v||p.once)&&(!f||p.context===f)&&i(this,d);else{for(var g=0,m=[],x=p.length;g<x;g++)(p[g].fn!==h||v&&!p[g].once||f&&p[g].context!==f)&&m.push(p[g]);m.length?this._events[d]=m.length===1?m[0]:m:i(this,d)}return this},n.prototype.removeAllListeners=function(r){var h;return r?(h=u?u+r:r,this._events[h]&&i(this,h)):(this._events=new o,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=u,n.EventEmitter=n,c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(57),o=t(171),a=t(306),s=t(56),i=t(47),n=t(174),l=new e({initialize:function(h,f,v,d){h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),d===void 0&&(d=0),this.type=s.RECTANGLE,this.x=h,this.y=f,this.width=v,this.height=d},contains:function(r,h){return u(this,r,h)},getPoint:function(r,h){return o(this,r,h)},getPoints:function(r,h,f){return a(this,r,h,f)},getRandomPoint:function(r){return n(this,r)},setTo:function(r,h,f,v){return this.x=r,this.y=h,this.width=f,this.height=v,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(r,h){return h===void 0&&(h=r),this.x=r,this.y=h,this},setSize:function(r,h){return h===void 0&&(h=r),this.width=r,this.height=h,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(r){return r===void 0&&(r=new i),r.setTo(this.x,this.y,this.right,this.y),r},getLineB:function(r){return r===void 0&&(r=new i),r.setTo(this.right,this.y,this.right,this.bottom),r},getLineC:function(r){return r===void 0&&(r=new i),r.setTo(this.right,this.bottom,this.x,this.bottom),r},getLineD:function(r){return r===void 0&&(r=new i),r.setTo(this.x,this.bottom,this.x,this.y),r},left:{get:function(){return this.x},set:function(r){r>=this.right?this.width=0:this.width=this.right-r,this.x=r}},right:{get:function(){return this.x+this.width},set:function(r){r<=this.x?this.width=0:this.width=r-this.x}},top:{get:function(){return this.y},set:function(r){r>=this.bottom?this.height=0:this.height=this.bottom-r,this.y=r}},bottom:{get:function(){return this.y+this.height},set:function(r){r<=this.y?this.height=0:this.height=r-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(r){this.x=r-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(r){this.y=r-this.height/2}}});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Alpha:t(607),AlphaSingle:t(303),BlendMode:t(304),ComputedSize:t(608),Crop:t(609),Depth:t(305),Flip:t(610),GetBounds:t(611),Mask:t(309),Origin:t(632),PathFollower:t(633),Pipeline:t(167),ScrollFactor:t(312),Size:t(634),Texture:t(635),TextureCrop:t(636),Tint:t(637),ToJSON:t(176),Transform:t(313),TransformMatrix:t(25),Visible:t(314)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @author       Matthew Groves <@doormat>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */function t(e){for(var u="",o=0;o<e;++o)o>0&&(u+=`
else `),o<e-1&&(u+="if(test == "+o+".0){}");return u}c.exports={getTintFromFloats:function(e,u,o,a){var s=(e*255|0)&255,i=(u*255|0)&255,n=(o*255|0)&255,l=(a*255|0)&255;return(l<<24|s<<16|i<<8|n)>>>0},getTintAppendFloatAlpha:function(e,u){var o=(u*255|0)&255;return(o<<24|e)>>>0},getTintAppendFloatAlphaAndSwap:function(e,u){var o=(e>>16|0)&255,a=(e>>8|0)&255,s=(e|0)&255,i=(u*255|0)&255;return(i<<24|s<<16|a<<8|o)>>>0},getFloatsFromUintRGB:function(e){var u=(e>>16|0)&255,o=(e>>8|0)&255,a=(e|0)&255;return[u/255,o/255,a/255]},checkShaderMax:function(e,u){(!u||u===-1)&&(u=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS));for(var o=e.createShader(e.FRAGMENT_SHADER),a=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
`);;){var s=a.replace(/%forloop%/gi,t(u));if(e.shaderSource(o,s),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS))u=u/2|0;else break}return u},parseFragmentShaderMaxTextures:function(e,u){if(!e)return"";for(var o="",a=0;a<u;a++)a>0&&(o+=`
	else `),a<u-1&&(o+="if (outTexId < "+a+".5)"),o+=`
	{`,o+=`
		texture = texture2D(uMainSampler[`+a+"], outTexCoord);",o+=`
	}`;return e=e.replace(/%count%/gi,u.toString()),e.replace(/%forloop%/gi,o)}}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(193),u=t(6),o=function(a,s,i){var n=u(a,s,null);if(n===null)return i;if(Array.isArray(n))return e.RND.pick(n);if(typeof n=="object"){if(n.hasOwnProperty("randInt"))return e.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return e.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if(typeof n=="function")return n(s);return n};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(176),o=t(101),a=t(9),s=t(75),i=t(20),n=new e({Extends:a,initialize:function(r,h){a.call(this),this.scene=r,this.displayList=null,this.type=h,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(s.ADDED_TO_SCENE,this.addedToScene,this),this.on(s.REMOVED_FROM_SCENE,this.removedFromScene,this),r.sys.queueDepthSort()},setActive:function(l){return this.active=l,this},setName:function(l){return this.name=l,this},setState:function(l){return this.state=l,this},setDataEnabled:function(){return this.data||(this.data=new o(this)),this},setData:function(l,r){return this.data||(this.data=new o(this)),this.data.set(l,r),this},incData:function(l,r){return this.data||(this.data=new o(this)),this.data.inc(l,r),this},toggleData:function(l){return this.data||(this.data=new o(this)),this.data.toggle(l),this},getData:function(l){return this.data||(this.data=new o(this)),this.data.get(l)},setInteractive:function(l,r,h){return this.scene.sys.input.enable(this,l,r,h),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return u(this)},willRender:function(l){return!(n.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&l.id)},getIndexList:function(){for(var l=this,r=this.parentContainer,h=[];r&&(h.unshift(r.getIndex(l)),l=r,r.parentContainer);)r=r.parentContainer;return this.displayList?h.unshift(this.displayList.getIndex(l)):h.unshift(this.scene.sys.displayList.getIndex(l)),h},addToDisplayList:function(l){return l===void 0&&(l=this.scene.sys.displayList),this.displayList&&this.displayList!==l&&this.removeFromDisplayList(),l.exists(this)||(this.displayList=l,l.add(this,!0),l.queueDepthSort(),this.emit(s.ADDED_TO_SCENE,this,this.scene),l.events.emit(i.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var l=this.displayList||this.scene.sys.displayList;return l.exists(this)&&(l.remove(this,!0),l.queueDepthSort(),this.displayList=null,this.emit(s.REMOVED_FROM_SCENE,this,this.scene),l.events.emit(i.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(l){!this.scene||this.ignoreDestroy||(l===void 0&&(l=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(s.DESTROY,this,l),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});n.RENDER_MASK=15,c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(24),o=t(20),a=new e({initialize:function(i){this.scene=i,this.systems=i.sys,this.events=i.sys.events,this.displayList,this.updateList,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(s,i){a.prototype.hasOwnProperty(s)||(a.prototype[s]=i)},a.remove=function(s){a.prototype.hasOwnProperty(s)&&delete a.prototype[s]},u.register("GameObjectCreator",a,"make"),c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(7),u=function(){var o,a,s,i,n,l,r=arguments[0]||{},h=1,f=arguments.length,v=!1;for(typeof r=="boolean"&&(v=r,r=arguments[1]||{},h=2),f===h&&(r=this,--h);h<f;h++)if((o=arguments[h])!=null)for(a in o)s=r[a],i=o[a],r!==i&&(v&&i&&(e(i)||(n=Array.isArray(i)))?(n?(n=!1,l=s&&Array.isArray(s)?s:[]):l=s&&e(s)?s:{},r[a]=u(v,l,i)):i!==void 0&&(r[a]=i));return r};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return Math.max(u,Math.min(o,e))};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(25),u=new e,o=new e,a=new e,s={camera:u,sprite:o,calc:a},i=function(n,l,r){var h=u,f=o,v=a;return f.applyITRS(n.x,n.y,n.rotation,n.scaleX,n.scaleY),h.copyFrom(l.matrix),r?(h.multiplyWithOffset(r,-l.scrollX*n.scrollFactorX,-l.scrollY*n.scrollFactorY),f.e=n.x,f.f=n.y):(f.e-=l.scrollX*n.scrollFactorX,f.f-=l.scrollY*n.scrollFactorY),h.multiply(f,v),s};c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ADDED_TO_SCENE:t(656),BOOT:t(657),CREATE:t(658),DESTROY:t(659),PAUSE:t(660),POST_UPDATE:t(661),PRE_RENDER:t(662),PRE_UPDATE:t(663),READY:t(664),REMOVED_FROM_SCENE:t(665),RENDER:t(666),RESUME:t(667),SHUTDOWN:t(668),SLEEP:t(669),START:t(670),TRANSITION_COMPLETE:t(671),TRANSITION_INIT:t(672),TRANSITION_OUT:t(673),TRANSITION_START:t(674),TRANSITION_WAKE:t(675),UPDATE:t(676),WAKE:t(677)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={BLUR:t(612),BOOT:t(613),CONTEXT_LOST:t(614),CONTEXT_RESTORED:t(615),DESTROY:t(616),FOCUS:t(617),HIDDEN:t(618),PAUSE:t(619),POST_RENDER:t(620),POST_STEP:t(621),PRE_RENDER:t(622),PRE_STEP:t(623),READY:t(624),RESUME:t(625),STEP:t(626),VISIBLE:t(627)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(95),a=t(2),s=t(155),i=t(240),n=t(517),l=t(156),r=new e({initialize:function(f,v){this.loader=f,this.cache=a(v,"cache",!1),this.type=a(v,"type",!1),this.key=a(v,"key",!1);var d=this.key;if(f.prefix&&f.prefix!==""&&(this.key=f.prefix+d),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var p=a(v,"url");p===void 0?p=f.path+d+"."+a(v,"extension",""):typeof p=="string"&&!p.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)&&(p=f.path+p),this.url=p,this.src="",this.xhrSettings=l(a(v,"responseType",void 0)),a(v,"xhrSettings",!1)&&(this.xhrSettings=i(this.xhrSettings,a(v,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?u.FILE_POPULATED:u.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(v,"config",{}),this.multiFile,this.linkFile},setLink:function(h){this.linkFile=h,h.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===u.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=u.FILE_LOADING,this.src=s(this,this.loader.baseURL),this.src.indexOf("data:")===0?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=n(this,this.loader.xhr))},onLoad:function(h,f){var v=h.responseURL&&(h.responseURL.indexOf("file://")===0||h.responseURL.indexOf("capacitor://")===0),d=v&&f.target.status===0,p=!(f.target&&f.target.status!==200)||d;h.readyState===4&&h.status>=400&&h.status<=599&&(p=!1),this.state=u.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,p)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(h){h.lengthComputable&&(this.bytesLoaded=h.loaded,this.bytesTotal=h.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(o.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=u.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=u.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=u.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(h){h===void 0&&(h=this.data);var f=this.key,v=this.type;this.loader.emit(o.FILE_COMPLETE,f,v,h),this.loader.emit(o.FILE_KEY_COMPLETE+v+"-"+f,f,v,h),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});r.createObjectURL=function(h,f,v){if(typeof URL=="function")h.src=URL.createObjectURL(f);else{var d=new FileReader;d.onload=function(){h.removeAttribute("crossOrigin"),h.src="data:"+(f.type||v)+";base64,"+d.result.split(",")[1]},d.onerror=h.onerror,d.readAsDataURL(f)}},r.revokeObjectURL=function(h){typeof URL=="function"&&URL.revokeObjectURL(h.src)},c.exports=r},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={},e={},u={};u.register=function(o,a,s,i){i===void 0&&(i=!1),t[o]={plugin:a,mapping:s,custom:i}},u.registerCustom=function(o,a,s,i){e[o]={plugin:a,mapping:s,data:i}},u.hasCore=function(o){return t.hasOwnProperty(o)},u.hasCustom=function(o){return e.hasOwnProperty(o)},u.getCore=function(o){return t[o]},u.getCustom=function(o){return e[o]},u.getCustomClass=function(o){return e.hasOwnProperty(o)?e[o].plugin:null},u.remove=function(o){t.hasOwnProperty(o)&&delete t[o]},u.removeCustom=function(o){e.hasOwnProperty(o)&&delete e[o]},u.destroyCorePlugins=function(){for(var o in t)t.hasOwnProperty(o)&&delete t[o]},u.destroyCustomPlugins=function(){for(var o in e)e.hasOwnProperty(o)&&delete e[o]},c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(14),o=t(3),a=new e({initialize:function(i,n,l,r,h,f){i===void 0&&(i=1),n===void 0&&(n=0),l===void 0&&(l=0),r===void 0&&(r=1),h===void 0&&(h=0),f===void 0&&(f=0),this.matrix=new Float32Array([i,n,l,r,h,f,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(s){this.matrix[0]=s}},b:{get:function(){return this.matrix[1]},set:function(s){this.matrix[1]=s}},c:{get:function(){return this.matrix[2]},set:function(s){this.matrix[2]=s}},d:{get:function(){return this.matrix[3]},set:function(s){this.matrix[3]=s}},e:{get:function(){return this.matrix[4]},set:function(s){this.matrix[4]=s}},f:{get:function(){return this.matrix[5]},set:function(s){this.matrix[5]=s}},tx:{get:function(){return this.matrix[4]},set:function(s){this.matrix[4]=s}},ty:{get:function(){return this.matrix[5]},set:function(s){this.matrix[5]=s}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var s=this.matrix,i=s[0],n=s[1],l=s[2],r=s[3];return i||n?n>0?Math.acos(i/this.scaleX):-Math.acos(i/this.scaleX):l||r?u.TAU-(r>0?Math.acos(-l/this.scaleY):-Math.acos(l/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var s=this.matrix;return s[0]=1,s[1]=0,s[2]=0,s[3]=1,s[4]=0,s[5]=0,this},translate:function(s,i){var n=this.matrix;return n[4]=n[0]*s+n[2]*i+n[4],n[5]=n[1]*s+n[3]*i+n[5],this},scale:function(s,i){var n=this.matrix;return n[0]*=s,n[1]*=s,n[2]*=i,n[3]*=i,this},rotate:function(s){var i=Math.sin(s),n=Math.cos(s),l=this.matrix,r=l[0],h=l[1],f=l[2],v=l[3];return l[0]=r*n+f*i,l[1]=h*n+v*i,l[2]=r*-i+f*n,l[3]=h*-i+v*n,this},multiply:function(s,i){var n=this.matrix,l=s.matrix,r=n[0],h=n[1],f=n[2],v=n[3],d=n[4],p=n[5],g=l[0],m=l[1],x=l[2],y=l[3],T=l[4],E=l[5],C=i===void 0?this:i;return C.a=g*r+m*f,C.b=g*h+m*v,C.c=x*r+y*f,C.d=x*h+y*v,C.e=T*r+E*f+d,C.f=T*h+E*v+p,C},multiplyWithOffset:function(s,i,n){var l=this.matrix,r=s.matrix,h=l[0],f=l[1],v=l[2],d=l[3],p=l[4],g=l[5],m=i*h+n*v+p,x=i*f+n*d+g,y=r[0],T=r[1],E=r[2],C=r[3],A=r[4],P=r[5];return l[0]=y*h+T*v,l[1]=y*f+T*d,l[2]=E*h+C*v,l[3]=E*f+C*d,l[4]=A*h+P*v+m,l[5]=A*f+P*d+x,this},transform:function(s,i,n,l,r,h){var f=this.matrix,v=f[0],d=f[1],p=f[2],g=f[3],m=f[4],x=f[5];return f[0]=s*v+i*p,f[1]=s*d+i*g,f[2]=n*v+l*p,f[3]=n*d+l*g,f[4]=r*v+h*p+m,f[5]=r*d+h*g+x,this},transformPoint:function(s,i,n){n===void 0&&(n={x:0,y:0});var l=this.matrix,r=l[0],h=l[1],f=l[2],v=l[3],d=l[4],p=l[5];return n.x=s*r+i*f+d,n.y=s*h+i*v+p,n},invert:function(){var s=this.matrix,i=s[0],n=s[1],l=s[2],r=s[3],h=s[4],f=s[5],v=i*r-n*l;return s[0]=r/v,s[1]=-n/v,s[2]=-l/v,s[3]=i/v,s[4]=(l*f-r*h)/v,s[5]=-(i*f-n*h)/v,this},copyFrom:function(s){var i=this.matrix;return i[0]=s.a,i[1]=s.b,i[2]=s.c,i[3]=s.d,i[4]=s.e,i[5]=s.f,this},copyFromArray:function(s){var i=this.matrix;return i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3],i[4]=s[4],i[5]=s[5],this},copyToContext:function(s){var i=this.matrix;return s.transform(i[0],i[1],i[2],i[3],i[4],i[5]),s},setToContext:function(s){var i=this.matrix;return s.setTransform(i[0],i[1],i[2],i[3],i[4],i[5]),s},copyToArray:function(s){var i=this.matrix;return s===void 0?s=[i[0],i[1],i[2],i[3],i[4],i[5]]:(s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=i[3],s[4]=i[4],s[5]=i[5]),s},setTransform:function(s,i,n,l,r,h){var f=this.matrix;return f[0]=s,f[1]=i,f[2]=n,f[3]=l,f[4]=r,f[5]=h,this},decomposeMatrix:function(){var s=this.decomposedMatrix,i=this.matrix,n=i[0],l=i[1],r=i[2],h=i[3],f=n*h-l*r;if(s.translateX=i[4],s.translateY=i[5],n||l){var v=Math.sqrt(n*n+l*l);s.rotation=l>0?Math.acos(n/v):-Math.acos(n/v),s.scaleX=v,s.scaleY=f/v}else if(r||h){var d=Math.sqrt(r*r+h*h);s.rotation=Math.PI*.5-(h>0?Math.acos(-r/d):-Math.acos(r/d)),s.scaleX=f/d,s.scaleY=d}else s.rotation=0,s.scaleX=0,s.scaleY=0;return s},applyITRS:function(s,i,n,l,r){var h=this.matrix,f=Math.sin(n),v=Math.cos(n);return h[4]=s,h[5]=i,h[0]=v*l,h[1]=f*l,h[2]=-f*r,h[3]=v*r,this},applyInverse:function(s,i,n){n===void 0&&(n=new o);var l=this.matrix,r=l[0],h=l[1],f=l[2],v=l[3],d=l[4],p=l[5],g=1/(r*v+f*-h);return n.x=v*g*s+-f*g*i+(p*f-d*v)*g,n.y=r*g*i+-h*g*s+(-p*r+d*h)*g,n},getX:function(s,i){return s*this.a+i*this.c+this.e},getY:function(s,i){return s*this.b+i*this.d+this.f},getXRound:function(s,i,n){var l=this.getX(s,i);return n&&(l=Math.round(l)),l},getYRound:function(s,i,n){var l=this.getY(s,i);return n&&(l=Math.round(l)),l},getCSSMatrix:function(){var s=this.matrix;return"matrix("+s[0]+","+s[1]+","+s[2]+","+s[3]+","+s[4]+","+s[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(2),u=function(o,a,s,i,n,l){o===void 0&&(o=0),a===void 0&&(a=0),s===void 0&&(s=l.width),i===void 0&&(i=l.height),n||(n={});var r=e(n,"isNotEmpty",!1),h=e(n,"isColliding",!1),f=e(n,"hasInterestingFace",!1);o<0&&(s+=o,o=0),a<0&&(i+=a,a=0),o+s>l.width&&(s=Math.max(l.width-o,0)),a+i>l.height&&(i=Math.max(l.height-a,0));for(var v=[],d=a;d<a+i;d++)for(var p=o;p<o+s;p++){var g=l.data[d][p];if(g!==null){if(r&&g.index===-1||h&&!g.collides||f&&!g.hasInterestingFace)continue;v.push(g)}}return v};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s,i){a===void 0&&(a=0),s===void 0&&(s=0),i===void 0&&(i=1);var n,l=0,r=e.length;if(i===1)for(n=s;n<r;n++)e[n][u]=o+l*a,l++;else for(n=s;n>=0;n--)e[n][u]=o+l*a,l++;return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(35),u=t(13),o=function(a,s,i){s.x=u(i,"x",0),s.y=u(i,"y",0),s.depth=u(i,"depth",0),s.flipX=u(i,"flipX",!1),s.flipY=u(i,"flipY",!1);var n=u(i,"scale",null);typeof n=="number"?s.setScale(n):n!==null&&(s.scaleX=u(n,"x",1),s.scaleY=u(n,"y",1));var l=u(i,"scrollFactor",null);typeof l=="number"?s.setScrollFactor(l):l!==null&&(s.scrollFactorX=u(l,"x",1),s.scrollFactorY=u(l,"y",1)),s.rotation=u(i,"rotation",0);var r=u(i,"angle",null);r!==null&&(s.angle=r),s.alpha=u(i,"alpha",1);var h=u(i,"origin",null);if(typeof h=="number")s.setOrigin(h);else if(h!==null){var f=u(h,"x",.5),v=u(h,"y",.5);s.setOrigin(f,v)}s.blendMode=u(i,"blendMode",e.NORMAL),s.visible=u(i,"visible",!0);var d=u(i,"add",!0);return d&&a.sys.displayList.add(s),s.preUpdate&&a.sys.updateList.add(s),s};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=function(o,a,s,i,n){var l=i.alpha*s.alpha;if(l<=0)return!1;var r=e(s,i,n).calc;return a.globalCompositeOperation=o.blendModes[s.blendMode],a.globalAlpha=l,a.save(),r.setToContext(a),a.imageSmoothingEnabled=!(!o.antialias||s.frame&&s.frame.source.scaleMode),!0};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(33),u=t(192),o=[],a=!1,s=function(){var i=function(g,m,x,y,T){m===void 0&&(m=1),x===void 0&&(x=1),y===void 0&&(y=e.CANVAS),T===void 0&&(T=!1);var E,C=r(y);return C===null?(C={parent:g,canvas:document.createElement("canvas"),type:y},y===e.CANVAS&&o.push(C),E=C.canvas):(C.parent=g,E=C.canvas),T&&(C.parent=E),E.width=m,E.height=x,a&&y===e.CANVAS&&u.disable(E.getContext("2d")),E},n=function(g,m,x){return i(g,m,x,e.CANVAS)},l=function(g,m,x){return i(g,m,x,e.WEBGL)},r=function(g){if(g===void 0&&(g=e.CANVAS),g===e.WEBGL)return null;for(var m=0;m<o.length;m++){var x=o[m];if(!x.parent&&x.type===g)return x}return null},h=function(g){var m=g instanceof HTMLCanvasElement;o.forEach(function(x){(m&&x.canvas===g||!m&&x.parent===g)&&(x.parent=null,x.canvas.width=1,x.canvas.height=1)})},f=function(){var g=0;return o.forEach(function(m){m.parent&&g++}),g},v=function(){return o.length-f()},d=function(){a=!0},p=function(){a=!1};return{create2D:n,create:i,createWebGL:l,disableSmoothing:d,enableSmoothing:p,first:r,free:v,pool:o,remove:h,total:f}};c.exports=s()},function(c,S){var t={};c.exports=t,function(){t._nextId=0,t._seed=0,t._nowStartTime=+new Date,t.extend=function(u,o){var a,s;typeof o=="boolean"?(a=2,s=o):(a=1,s=!0);for(var i=a;i<arguments.length;i++){var n=arguments[i];if(n)for(var l in n)s&&n[l]&&n[l].constructor===Object&&(!u[l]||u[l].constructor===Object)?(u[l]=u[l]||{},t.extend(u[l],s,n[l])):u[l]=n[l]}return u},t.clone=function(u,o){return t.extend({},o,u)},t.keys=function(u){if(Object.keys)return Object.keys(u);var o=[];for(var a in u)o.push(a);return o},t.values=function(u){var o=[];if(Object.keys){for(var a=Object.keys(u),s=0;s<a.length;s++)o.push(u[a[s]]);return o}for(var i in u)o.push(u[i]);return o},t.get=function(u,o,a,s){o=o.split(".").slice(a,s);for(var i=0;i<o.length;i+=1)u=u[o[i]];return u},t.set=function(u,o,a,s,i){var n=o.split(".").slice(s,i);return t.get(u,o,0,-1)[n[n.length-1]]=a,a},t.shuffle=function(u){for(var o=u.length-1;o>0;o--){var a=Math.floor(t.random()*(o+1)),s=u[o];u[o]=u[a],u[a]=s}return u},t.choose=function(u){return u[Math.floor(t.random()*u.length)]},t.isElement=function(u){return typeof HTMLElement!="undefined"?u instanceof HTMLElement:!!(u&&u.nodeType&&u.nodeName)},t.isArray=function(u){return Object.prototype.toString.call(u)==="[object Array]"},t.isFunction=function(u){return typeof u=="function"},t.isPlainObject=function(u){return typeof u=="object"&&u.constructor===Object},t.isString=function(u){return Object.prototype.toString.call(u)==="[object String]"},t.clamp=function(u,o,a){return u<o?o:u>a?a:u},t.sign=function(u){return u<0?-1:1},t.now=function(){if(typeof window!="undefined"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-t._nowStartTime},t.random=function(u,o){return u=typeof u!="undefined"?u:0,o=typeof o!="undefined"?o:1,u+e()*(o-u)};var e=function(){return t._seed=(t._seed*9301+49297)%233280,t._seed/233280};t.colorToNumber=function(u){return u=u.replace("#",""),u.length==3&&(u=u.charAt(0)+u.charAt(0)+u.charAt(1)+u.charAt(1)+u.charAt(2)+u.charAt(2)),parseInt(u,16)},t.logLevel=1,t.log=function(){console&&t.logLevel>0&&t.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},t.info=function(){console&&t.logLevel>0&&t.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},t.warn=function(){console&&t.logLevel>0&&t.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},t.nextId=function(){return t._nextId++},t.indexOf=function(u,o){if(u.indexOf)return u.indexOf(o);for(var a=0;a<u.length;a++)if(u[a]===o)return a;return-1},t.map=function(u,o){if(u.map)return u.map(o);for(var a=[],s=0;s<u.length;s+=1)a.push(o(u[s]));return a},t.topologicalSort=function(u){var o=[],a=[],s=[];for(var i in u)!a[i]&&!s[i]&&t._topologicalSort(i,a,s,u,o);return o},t._topologicalSort=function(u,o,a,s,i){var n=s[u]||[];a[u]=!0;for(var l=0;l<n.length;l+=1){var r=n[l];a[r]||o[r]||t._topologicalSort(r,o,a,s,i)}a[u]=!1,o[u]=!0,i.push(u)},t.chain=function(){for(var u=[],o=0;o<arguments.length;o+=1){var a=arguments[o];a._chained?u.push.apply(u,a._chained):u.push(a)}var s=function(){for(var i,n=new Array(arguments.length),l=0,r=arguments.length;l<r;l++)n[l]=arguments[l];for(l=0;l<u.length;l+=1){var h=u[l].apply(i,n);typeof h!="undefined"&&(i=h)}return i};return s._chained=u,s},t.chainPathBefore=function(u,o,a){return t.set(u,o,t.chain(a,t.get(u,o)))},t.chainPathAfter=function(u,o,a){return t.set(u,o,t.chain(t.get(u,o),a))}}()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e={VERSION:"3.55.2",BlendModes:t(35),ScaleModes:t(168),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(15),a=t(47),s=new e({Extends:o,Mixins:[u.AlphaSingle,u.BlendMode,u.Depth,u.GetBounds,u.Mask,u.Origin,u.Pipeline,u.ScrollFactor,u.Transform,u.Visible],initialize:function(n,l,r){l===void 0&&(l="Shape"),o.call(this,n,l),this.geom=r,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new a,this.width=0,this.height=0,this.initPipeline()},setFillStyle:function(i,n){return n===void 0&&(n=1),i===void 0?this.isFilled=!1:(this.fillColor=i,this.fillAlpha=n,this.isFilled=!0),this},setStrokeStyle:function(i,n,l){return l===void 0&&(l=1),i===void 0?this.isStroked=!1:(this.lineWidth=i,this.strokeColor=n,this.strokeAlpha=l,this.isStroked=!0),this},setClosePath:function(i){return this.closePath=i,this},setSize:function(i,n){return this.width=i,this.height=n,this},setDisplaySize:function(i,n){return this.displayWidth=i,this.displayHeight=n,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(i){this.scaleX=i/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(i){this.scaleY=i/this.height}}});c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=function(o){return o*e.DEG_TO_RAD};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={DESTROY:t(743),FADE_IN_COMPLETE:t(744),FADE_IN_START:t(745),FADE_OUT_COMPLETE:t(746),FADE_OUT_START:t(747),FLASH_COMPLETE:t(748),FLASH_START:t(749),FOLLOW_UPDATE:t(750),PAN_COMPLETE:t(751),PAN_START:t(752),POST_RENDER:t(753),PRE_RENDER:t(754),ROTATE_COMPLETE:t(755),ROTATE_START:t(756),SHAKE_COMPLETE:t(757),SHAKE_START:t(758),ZOOM_COMPLETE:t(759),ZOOM_START:t(760)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(103),o=t(328),a=t(188),s=t(329),i=new e({initialize:function(l,r,h,f){l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(l,r,h,f)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(n,l,r,h,f){return h===void 0&&(h=255),f===void 0&&(f=!0),this._locked=!0,this.red=n,this.green=l,this.blue=r,this.alpha=h,this._locked=!1,this.update(f)},setGLTo:function(n,l,r,h){return h===void 0&&(h=1),this._locked=!0,this.redGL=n,this.greenGL=l,this.blueGL=r,this.alphaGL=h,this._locked=!1,this.update(!0)},setFromRGB:function(n){return this._locked=!0,this.red=n.r,this.green=n.g,this.blue=n.b,n.hasOwnProperty("a")&&(this.alpha=n.a),this._locked=!1,this.update(!0)},setFromHSV:function(n,l,r){return a(n,l,r,this)},update:function(n){if(n===void 0&&(n=!1),this._locked)return this;var l=this.r,r=this.g,h=this.b,f=this.a;return this._color=u(l,r,h),this._color32=o(l,r,h,f),this._rgba="rgba("+l+","+r+","+h+","+f/255+")",n&&s(l,r,h,this),this},updateHSV:function(){var n=this.r,l=this.g,r=this.b;return s(n,l,r,this),this},clone:function(){return new i(this.r,this.g,this.b,this.a)},gray:function(n){return this.setTo(n,n,n)},random:function(n,l){n===void 0&&(n=0),l===void 0&&(l=255);var r=Math.floor(n+Math.random()*(l-n)),h=Math.floor(n+Math.random()*(l-n)),f=Math.floor(n+Math.random()*(l-n));return this.setTo(r,h,f)},randomGray:function(n,l){n===void 0&&(n=0),l===void 0&&(l=255);var r=Math.floor(n+Math.random()*(l-n));return this.setTo(r,r,r)},saturate:function(n){return this.s+=n/100,this},desaturate:function(n){return this.s-=n/100,this},lighten:function(n){return this.v+=n/100,this},darken:function(n){return this.v-=n/100,this},brighten:function(n){var l=this.r,r=this.g,h=this.b;return l=Math.max(0,Math.min(255,l-Math.round(255*-(n/100)))),r=Math.max(0,Math.min(255,r-Math.round(255*-(n/100)))),h=Math.max(0,Math.min(255,h-Math.round(255*-(n/100)))),this.setTo(l,r,h)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(n){this.gl[0]=Math.min(Math.abs(n),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(n){this.gl[1]=Math.min(Math.abs(n),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(n){this.gl[2]=Math.min(Math.abs(n),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(n){this.gl[3]=Math.min(Math.abs(n),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(n){n=Math.floor(Math.abs(n)),this.r=Math.min(n,255),this.gl[0]=n/255,this.update(!0)}},green:{get:function(){return this.g},set:function(n){n=Math.floor(Math.abs(n)),this.g=Math.min(n,255),this.gl[1]=n/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(n){n=Math.floor(Math.abs(n)),this.b=Math.min(n,255),this.gl[2]=n/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(n){n=Math.floor(Math.abs(n)),this.a=Math.min(n,255),this.gl[3]=n/255,this.update()}},h:{get:function(){return this._h},set:function(n){this._h=n,a(n,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(n){this._s=n,a(this._h,n,this._v,this)}},v:{get:function(){return this._v},set:function(n){this._v=n,a(this._h,this._s,n,this)}}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s,i){this.x=0,this.y=0,this.z=0,typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0):(this.x=a||0,this.y=s||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(o){return this.x=Math.min(this.x,o.x),this.y=Math.min(this.y,o.y),this.z=Math.min(this.z,o.z),this},max:function(o){return this.x=Math.max(this.x,o.x),this.y=Math.max(this.y,o.y),this.z=Math.max(this.z,o.z),this},clone:function(){return new u(this.x,this.y,this.z)},addVectors:function(o,a){return this.x=o.x+a.x,this.y=o.y+a.y,this.z=o.z+a.z,this},crossVectors:function(o,a){var s=o.x,i=o.y,n=o.z,l=a.x,r=a.y,h=a.z;return this.x=i*h-n*r,this.y=n*l-s*h,this.z=s*r-i*l,this},equals:function(o){return this.x===o.x&&this.y===o.y&&this.z===o.z},copy:function(o){return this.x=o.x,this.y=o.y,this.z=o.z||0,this},set:function(o,a,s){return typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0):(this.x=o||0,this.y=a||0,this.z=s||0),this},setFromMatrixPosition:function(o){return this.fromArray(o.val,12)},setFromMatrixColumn:function(o,a){return this.fromArray(o.val,a*4)},fromArray:function(o,a){return a===void 0&&(a=0),this.x=o[a],this.y=o[a+1],this.z=o[a+2],this},add:function(o){return this.x+=o.x,this.y+=o.y,this.z+=o.z||0,this},addScalar:function(o){return this.x+=o,this.y+=o,this.z+=o,this},addScale:function(o,a){return this.x+=o.x*a,this.y+=o.y*a,this.z+=o.z*a||0,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this.z-=o.z||0,this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this.z*=o.z||1,this},scale:function(o){return isFinite(o)?(this.x*=o,this.y*=o,this.z*=o):(this.x=0,this.y=0,this.z=0),this},divide:function(o){return this.x/=o.x,this.y/=o.y,this.z/=o.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(o){var a=o.x-this.x,s=o.y-this.y,i=o.z-this.z||0;return Math.sqrt(a*a+s*s+i*i)},distanceSq:function(o){var a=o.x-this.x,s=o.y-this.y,i=o.z-this.z||0;return a*a+s*s+i*i},length:function(){var o=this.x,a=this.y,s=this.z;return Math.sqrt(o*o+a*a+s*s)},lengthSq:function(){var o=this.x,a=this.y,s=this.z;return o*o+a*a+s*s},normalize:function(){var o=this.x,a=this.y,s=this.z,i=o*o+a*a+s*s;return i>0&&(i=1/Math.sqrt(i),this.x=o*i,this.y=a*i,this.z=s*i),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z},cross:function(o){var a=this.x,s=this.y,i=this.z,n=o.x,l=o.y,r=o.z;return this.x=s*r-i*l,this.y=i*n-a*r,this.z=a*l-s*n,this},lerp:function(o,a){a===void 0&&(a=0);var s=this.x,i=this.y,n=this.z;return this.x=s+a*(o.x-s),this.y=i+a*(o.y-i),this.z=n+a*(o.z-n),this},applyMatrix3:function(o){var a=this.x,s=this.y,i=this.z,n=o.val;return this.x=n[0]*a+n[3]*s+n[6]*i,this.y=n[1]*a+n[4]*s+n[7]*i,this.z=n[2]*a+n[5]*s+n[8]*i,this},applyMatrix4:function(o){var a=this.x,s=this.y,i=this.z,n=o.val,l=1/(n[3]*a+n[7]*s+n[11]*i+n[15]);return this.x=(n[0]*a+n[4]*s+n[8]*i+n[12])*l,this.y=(n[1]*a+n[5]*s+n[9]*i+n[13])*l,this.z=(n[2]*a+n[6]*s+n[10]*i+n[14])*l,this},transformMat3:function(o){var a=this.x,s=this.y,i=this.z,n=o.val;return this.x=a*n[0]+s*n[3]+i*n[6],this.y=a*n[1]+s*n[4]+i*n[7],this.z=a*n[2]+s*n[5]+i*n[8],this},transformMat4:function(o){var a=this.x,s=this.y,i=this.z,n=o.val;return this.x=n[0]*a+n[4]*s+n[8]*i+n[12],this.y=n[1]*a+n[5]*s+n[9]*i+n[13],this.z=n[2]*a+n[6]*s+n[10]*i+n[14],this},transformCoordinates:function(o){var a=this.x,s=this.y,i=this.z,n=o.val,l=a*n[0]+s*n[4]+i*n[8]+n[12],r=a*n[1]+s*n[5]+i*n[9]+n[13],h=a*n[2]+s*n[6]+i*n[10]+n[14],f=a*n[3]+s*n[7]+i*n[11]+n[15];return this.x=l/f,this.y=r/f,this.z=h/f,this},transformQuat:function(o){var a=this.x,s=this.y,i=this.z,n=o.x,l=o.y,r=o.z,h=o.w,f=h*a+l*i-r*s,v=h*s+r*a-n*i,d=h*i+n*s-l*a,p=-n*a-l*s-r*i;return this.x=f*h+p*-n+v*-r-d*-l,this.y=v*h+p*-l+d*-n-f*-r,this.z=d*h+p*-r+f*-l-v*-n,this},project:function(o){var a=this.x,s=this.y,i=this.z,n=o.val,l=n[0],r=n[1],h=n[2],f=n[3],v=n[4],d=n[5],p=n[6],g=n[7],m=n[8],x=n[9],y=n[10],T=n[11],E=n[12],C=n[13],A=n[14],P=n[15],M=1/(a*f+s*g+i*T+P);return this.x=(a*l+s*v+i*m+E)*M,this.y=(a*r+s*d+i*x+C)*M,this.z=(a*h+s*p+i*y+A)*M,this},projectViewMatrix:function(o,a){return this.applyMatrix4(o).applyMatrix4(a)},unprojectViewMatrix:function(o,a){return this.applyMatrix4(o).applyMatrix4(a)},unproject:function(o,a){var s=o.x,i=o.y,n=o.z,l=o.w,r=this.x-s,h=l-this.y-1-i,f=this.z;return this.x=2*r/n-1,this.y=2*h/l-1,this.z=2*f-1,this.project(a)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});u.ZERO=new u,u.RIGHT=new u(1,0,0),u.LEFT=new u(-1,0,0),u.UP=new u(0,-1,0),u.DOWN=new u(0,1,0),u.FORWARD=new u(0,0,1),u.BACK=new u(0,0,-1),u.ONE=new u(1,1,1),c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(c,S,t){var e={};c.exports=e;var u=t(64),o=t(83),a=t(165),s=t(32),i=t(84),n=t(271);(function(){e._inertiaScale=4,e._nextCollidingGroupId=1,e._nextNonCollidingGroupId=-1,e._nextCategory=1,e.create=function(r){var h={id:s.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!r.hasOwnProperty("position")&&r.hasOwnProperty("vertices")?r.position=u.centre(r.vertices):r.hasOwnProperty("vertices")||(h.vertices=u.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var f=s.extend(h,r);return l(f,r),f.setOnCollideWith=function(v,d){return d?this.onCollideWith[v.id]=d:delete this.onCollideWith[v.id],this},f},e.nextGroup=function(r){return r?e._nextNonCollidingGroupId--:e._nextCollidingGroupId++},e.nextCategory=function(){return e._nextCategory=e._nextCategory<<1,e._nextCategory};var l=function(r,h){h=h||{},e.set(r,{bounds:r.bounds||i.create(r.vertices),positionPrev:r.positionPrev||o.clone(r.position),anglePrev:r.anglePrev||r.angle,vertices:r.vertices,parts:r.parts||[r],isStatic:r.isStatic,isSleeping:r.isSleeping,parent:r.parent||r});var f=r.bounds;if(u.rotate(r.vertices,r.angle,r.position),n.rotate(r.axes,r.angle),i.update(f,r.vertices,r.velocity),e.set(r,{axes:h.axes||r.axes,area:h.area||r.area,mass:h.mass||r.mass,inertia:h.inertia||r.inertia}),r.parts.length===1){var v=r.centerOfMass,d=r.centerOffset,p=f.max.x-f.min.x,g=f.max.y-f.min.y;v.x=-(f.min.x-r.position.x)/p,v.y=-(f.min.y-r.position.y)/g,d.x=p*v.x,d.y=g*v.y}};e.set=function(r,h,f){var v;typeof h=="string"&&(v=h,h={},h[v]=f);for(v in h)if(!!Object.prototype.hasOwnProperty.call(h,v))switch(f=h[v],v){case"isStatic":e.setStatic(r,f);break;case"isSleeping":a.set(r,f);break;case"mass":e.setMass(r,f);break;case"density":e.setDensity(r,f);break;case"inertia":e.setInertia(r,f);break;case"vertices":e.setVertices(r,f);break;case"position":e.setPosition(r,f);break;case"angle":e.setAngle(r,f);break;case"velocity":e.setVelocity(r,f);break;case"angularVelocity":e.setAngularVelocity(r,f);break;case"parts":e.setParts(r,f);break;case"centre":e.setCentre(r,f);break;default:r[v]=f}},e.setStatic=function(r,h){for(var f=0;f<r.parts.length;f++){var v=r.parts[f];v.isStatic=h,h?(v._original={restitution:v.restitution,friction:v.friction,mass:v.mass,inertia:v.inertia,density:v.density,inverseMass:v.inverseMass,inverseInertia:v.inverseInertia},v.restitution=0,v.friction=1,v.mass=v.inertia=v.density=1/0,v.inverseMass=v.inverseInertia=0,v.positionPrev.x=v.position.x,v.positionPrev.y=v.position.y,v.anglePrev=v.angle,v.angularVelocity=0,v.speed=0,v.angularSpeed=0,v.motion=0):v._original&&(v.restitution=v._original.restitution,v.friction=v._original.friction,v.mass=v._original.mass,v.inertia=v._original.inertia,v.density=v._original.density,v.inverseMass=v._original.inverseMass,v.inverseInertia=v._original.inverseInertia,v._original=null)}},e.setMass=function(r,h){var f=r.inertia/(r.mass/6);r.inertia=f*(h/6),r.inverseInertia=1/r.inertia,r.mass=h,r.inverseMass=1/r.mass,r.density=r.mass/r.area},e.setDensity=function(r,h){e.setMass(r,h*r.area),r.density=h},e.setInertia=function(r,h){r.inertia=h,r.inverseInertia=1/r.inertia},e.setVertices=function(r,h){h[0].body===r?r.vertices=h:r.vertices=u.create(h,r),r.axes=n.fromVertices(r.vertices),r.area=u.area(r.vertices),e.setMass(r,r.density*r.area);var f=u.centre(r.vertices);u.translate(r.vertices,f,-1),e.setInertia(r,e._inertiaScale*u.inertia(r.vertices,r.mass)),u.translate(r.vertices,r.position),i.update(r.bounds,r.vertices,r.velocity)},e.setParts=function(r,h,f){var v;for(h=h.slice(0),r.parts.length=0,r.parts.push(r),r.parent=r,v=0;v<h.length;v++){var d=h[v];d!==r&&(d.parent=r,r.parts.push(d))}if(r.parts.length!==1){if(f=typeof f!="undefined"?f:!0,f){var p=[];for(v=0;v<h.length;v++)p=p.concat(h[v].vertices);u.clockwiseSort(p);var g=u.hull(p),m=u.centre(g);e.setVertices(r,g),u.translate(r.vertices,m)}var x=e._totalProperties(r),y=x.centre.x,T=x.centre.y,E=r.bounds,C=r.centerOfMass,A=r.centerOffset;i.update(E,r.vertices,r.velocity),C.x=-(E.min.x-y)/(E.max.x-E.min.x),C.y=-(E.min.y-T)/(E.max.y-E.min.y),A.x=y,A.y=T,r.area=x.area,r.parent=r,r.position.x=y,r.position.y=T,r.positionPrev.x=y,r.positionPrev.y=T,e.setMass(r,x.mass),e.setInertia(r,x.inertia),e.setPosition(r,x.centre)}},e.setCentre=function(r,h,f){f?(r.positionPrev.x+=h.x,r.positionPrev.y+=h.y,r.position.x+=h.x,r.position.y+=h.y):(r.positionPrev.x=h.x-(r.position.x-r.positionPrev.x),r.positionPrev.y=h.y-(r.position.y-r.positionPrev.y),r.position.x=h.x,r.position.y=h.y)},e.setPosition=function(r,h){var f=o.sub(h,r.position);r.positionPrev.x+=f.x,r.positionPrev.y+=f.y;for(var v=0;v<r.parts.length;v++){var d=r.parts[v];d.position.x+=f.x,d.position.y+=f.y,u.translate(d.vertices,f),i.update(d.bounds,d.vertices,r.velocity)}},e.setAngle=function(r,h){var f=h-r.angle;r.anglePrev+=f;for(var v=0;v<r.parts.length;v++){var d=r.parts[v];d.angle+=f,u.rotate(d.vertices,f,r.position),n.rotate(d.axes,f),i.update(d.bounds,d.vertices,r.velocity),v>0&&o.rotateAbout(d.position,f,r.position,d.position)}},e.setVelocity=function(r,h){r.positionPrev.x=r.position.x-h.x,r.positionPrev.y=r.position.y-h.y,r.velocity.x=h.x,r.velocity.y=h.y,r.speed=o.magnitude(r.velocity)},e.setAngularVelocity=function(r,h){r.anglePrev=r.angle-h,r.angularVelocity=h,r.angularSpeed=Math.abs(r.angularVelocity)},e.translate=function(r,h){e.setPosition(r,o.add(r.position,h))},e.rotate=function(r,h,f){if(!f)e.setAngle(r,r.angle+h);else{var v=Math.cos(h),d=Math.sin(h),p=r.position.x-f.x,g=r.position.y-f.y;e.setPosition(r,{x:f.x+(p*v-g*d),y:f.y+(p*d+g*v)}),e.setAngle(r,r.angle+h)}},e.scale=function(r,h,f,v){var d=0,p=0;v=v||r.position;for(var g=0;g<r.parts.length;g++){var m=r.parts[g];m.scale.x=h,m.scale.y=f,u.scale(m.vertices,h,f,v),m.axes=n.fromVertices(m.vertices),m.area=u.area(m.vertices),e.setMass(m,r.density*m.area),u.translate(m.vertices,{x:-m.position.x,y:-m.position.y}),e.setInertia(m,e._inertiaScale*u.inertia(m.vertices,m.mass)),u.translate(m.vertices,{x:m.position.x,y:m.position.y}),g>0&&(d+=m.area,p+=m.inertia),m.position.x=v.x+(m.position.x-v.x)*h,m.position.y=v.y+(m.position.y-v.y)*f,i.update(m.bounds,m.vertices,r.velocity)}r.parts.length>1&&(r.area=d,r.isStatic||(e.setMass(r,r.density*d),e.setInertia(r,p))),r.circleRadius&&(h===f?r.circleRadius*=h:r.circleRadius=null)},e.update=function(r,h,f,v){var d=Math.pow(h*f*r.timeScale,2),p=1-r.frictionAir*f*r.timeScale,g=r.position.x-r.positionPrev.x,m=r.position.y-r.positionPrev.y;r.velocity.x=g*p*v+r.force.x/r.mass*d,r.velocity.y=m*p*v+r.force.y/r.mass*d,r.positionPrev.x=r.position.x,r.positionPrev.y=r.position.y,r.position.x+=r.velocity.x,r.position.y+=r.velocity.y,r.angularVelocity=(r.angle-r.anglePrev)*p*v+r.torque/r.inertia*d,r.anglePrev=r.angle,r.angle+=r.angularVelocity,r.speed=o.magnitude(r.velocity),r.angularSpeed=Math.abs(r.angularVelocity);for(var x=0;x<r.parts.length;x++){var y=r.parts[x];u.translate(y.vertices,r.velocity),x>0&&(y.position.x+=r.velocity.x,y.position.y+=r.velocity.y),r.angularVelocity!==0&&(u.rotate(y.vertices,r.angularVelocity,r.position),n.rotate(y.axes,r.angularVelocity),x>0&&o.rotateAbout(y.position,r.angularVelocity,r.position,y.position)),i.update(y.bounds,y.vertices,r.velocity)}},e.applyForce=function(r,h,f){r.force.x+=f.x,r.force.y+=f.y;var v={x:h.x-r.position.x,y:h.y-r.position.y};r.torque+=v.x*f.y-v.y*f.x},e._totalProperties=function(r){for(var h={mass:0,area:0,inertia:0,centre:{x:0,y:0}},f=r.parts.length===1?0:1;f<r.parts.length;f++){var v=r.parts[f],d=v.mass!==1/0?v.mass:1;h.mass+=d,h.area+=v.area,h.inertia+=v.inertia,h.centre=o.add(h.centre,o.mult(v.position,d))}return h.centre=o.div(h.centre,h.mass),h}})()},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.y+e.height-e.height*e.originY};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.x-e.width*e.originX};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.x+e.width-e.width*e.originX};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.y-e.height*e.originY};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s,i){a===void 0&&(a=0),s===void 0&&(s=0),i===void 0&&(i=1);var n,l=0,r=e.length;if(i===1)for(n=s;n<r;n++)e[n][u]+=o+l*a,l++;else for(n=s;n>=0;n--)e[n][u]+=o+l*a,l++;return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(307),o=t(172),a=t(56),s=t(173),i=t(3),n=new e({initialize:function(r,h,f,v){r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),this.type=a.LINE,this.x1=r,this.y1=h,this.x2=f,this.y2=v},getPoint:function(l,r){return u(this,l,r)},getPoints:function(l,r,h){return o(this,l,r,h)},getRandomPoint:function(l){return s(this,l)},setTo:function(l,r,h,f){return l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=0),this.x1=l,this.y1=r,this.x2=h,this.y2=f,this},getPointA:function(l){return l===void 0&&(l=new i),l.set(this.x1,this.y1),l},getPointB:function(l){return l===void 0&&(l=new i),l.set(this.x2,this.y2),l},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(l){this.x1<=this.x2?this.x1=l:this.x2=l}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(l){this.x1>this.x2?this.x1=l:this.x2=l}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(l){this.y1<=this.y2?this.y1=l:this.y2=l}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(l){this.y1>this.y2?this.y1=l:this.y2=l}}});c.exports=n},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=o||u.fillColor,i=a||u.fillAlpha,n=(s&16711680)>>>16,l=(s&65280)>>>8,r=s&255;e.fillStyle="rgba("+n+","+l+","+r+","+i+")"};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s,i,n){var l=[];n.forEach(function(h){h&&l.push(h)}),this.loader=a,this.type=s,this.key=i,this.multiKeyIndex=a.multiKeyIndex++,this.files=l,this.complete=!1,this.pending=l.length,this.failed=0,this.config={},this.baseURL=a.baseURL,this.path=a.path,this.prefix=a.prefix;for(var r=0;r<l.length;r++)l[r].multiFile=this},isReadyToProcess:function(){return this.pending===0&&this.failed===0&&!this.complete},addToMultiFile:function(o){return this.files.push(o),o.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(o){var a=this.files.indexOf(o);a!==-1&&this.pending--},onFileFailed:function(o){var a=this.files.indexOf(o);a!==-1&&this.failed++}});c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=e-o,i=u-a;return Math.sqrt(s*s+i*i)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={BOOT:t(922),DESTROY:t(923),DRAG_END:t(924),DRAG_ENTER:t(925),DRAG:t(926),DRAG_LEAVE:t(927),DRAG_OVER:t(928),DRAG_START:t(929),DROP:t(930),GAME_OUT:t(931),GAME_OVER:t(932),GAMEOBJECT_DOWN:t(933),GAMEOBJECT_DRAG_END:t(934),GAMEOBJECT_DRAG_ENTER:t(935),GAMEOBJECT_DRAG:t(936),GAMEOBJECT_DRAG_LEAVE:t(937),GAMEOBJECT_DRAG_OVER:t(938),GAMEOBJECT_DRAG_START:t(939),GAMEOBJECT_DROP:t(940),GAMEOBJECT_MOVE:t(941),GAMEOBJECT_OUT:t(942),GAMEOBJECT_OVER:t(943),GAMEOBJECT_POINTER_DOWN:t(944),GAMEOBJECT_POINTER_MOVE:t(945),GAMEOBJECT_POINTER_OUT:t(946),GAMEOBJECT_POINTER_OVER:t(947),GAMEOBJECT_POINTER_UP:t(948),GAMEOBJECT_POINTER_WHEEL:t(949),GAMEOBJECT_UP:t(950),GAMEOBJECT_WHEEL:t(951),MANAGER_BOOT:t(952),MANAGER_PROCESS:t(953),MANAGER_UPDATE:t(954),POINTER_DOWN:t(955),POINTER_DOWN_OUTSIDE:t(956),POINTER_MOVE:t(957),POINTER_OUT:t(958),POINTER_OVER:t(959),POINTER_UP:t(960),POINTER_UP_OUTSIDE:t(961),POINTER_WHEEL:t(962),POINTERLOCK_CHANGE:t(963),PRE_UPDATE:t(964),SHUTDOWN:t(965),START:t(966),UPDATE:t(967)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.y=u+e.height*e.originY,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x=u+e.width*e.originX,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x=u-e.width+e.width*e.originX,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.y=u-e.height+e.height*e.originY,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e.width<=0||e.height<=0?!1:e.x<=u&&e.x+e.width>=u&&e.y<=o&&e.y+e.height>=o};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(175),o=t(9),a=t(374),s=t(2),i=t(69),n=t(91),l=t(141),r=t(12),h=t(375),f=new e({Extends:o,initialize:function(d){o.call(this);var p=d.game,g=p.renderer,m=g.gl;this.name=s(d,"name","WebGLPipeline"),this.game=p,this.renderer=g,this.manager,this.gl=m,this.view=p.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.topology=s(d,"topology",m.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.currentUnit=0,this.forceZero=s(d,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=d,this.glReset=!1},boot:function(){var v,d=this.gl,p=this.config,g=this.renderer;this.isPostFX||(this.projectionMatrix=new i().identity());var m=this.renderTargets,x=s(p,"renderTarget",!1);typeof x=="boolean"&&x&&(x=1);var y=g.width,T=g.height;if(typeof x=="number")for(v=0;v<x;v++)m.push(new l(g,y,T,1,0,!0));else if(Array.isArray(x))for(v=0;v<x.length;v++){var E=s(x[v],"scale",1),C=s(x[v],"minFilter",0),A=s(x[v],"autoClear",1);m.push(new l(g,y,T,E,C,A))}m.length&&(this.currentRenderTarget=m[0]),this.setShadersFromConfig(p);var P=this.shaders,M=0;for(v=0;v<P.length;v++)P[v].vertexSize>M&&(M=P[v].vertexSize);var O=s(p,"batchSize",g.config.batchSize);this.vertexCapacity=O*6;var I=new ArrayBuffer(this.vertexCapacity*M);this.vertexData=I,this.bytes=new Uint8Array(I),this.vertexViewF32=new Float32Array(I),this.vertexViewU32=new Uint32Array(I);var N=s(p,"vertices",null);for(N?(this.vertexViewF32.set(N),this.vertexBuffer=g.createVertexBuffer(I,d.STATIC_DRAW)):this.vertexBuffer=g.createVertexBuffer(I.byteLength,d.DYNAMIC_DRAW),this.setVertexBuffer(),v=P.length-1;v>=0;v--)P[v].rebind();this.hasBooted=!0,g.on(n.RESIZE,this.resize,this),g.on(n.PRE_RENDER,this.onPreRender,this),g.on(n.RENDER,this.onRender,this),g.on(n.POST_RENDER,this.onPostRender,this),this.emit(a.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(v,d){var p=this.renderer;if(v!==this.currentShader||p.currentProgram!==this.currentShader.program){this.flush(),p.resetTextures();var g=this.setVertexBuffer();g&&!d&&(d=!0),v.bind(d,!1),this.currentShader=v}return this},getShaderByName:function(v){for(var d=this.shaders,p=0;p<d.length;p++)if(d[p].name===v)return d[p]},setShadersFromConfig:function(v){var d,p=this.shaders,g=this.renderer;for(d=0;d<p.length;d++)p[d].destroy();var m="vertShader",x="fragShader",y="attributes",T=s(v,m,null),E=r.parseFragmentShaderMaxTextures(s(v,x,null),g.maxTextures),C=s(v,y,null),A=s(v,"shaders",[]),P=A.length;if(P===0)T&&E&&(this.shaders=[new h(this,"default",T,E,u(C))]);else{var M=[];for(d=0;d<P;d++){var O=A[d],I=s(O,"name","default"),N=s(O,m,T),Y=r.parseFragmentShaderMaxTextures(s(O,x,E),g.maxTextures),X=s(O,y,C);N&&Y&&M.push(new h(this,I,N,Y,u(X)))}this.shaders=M}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},setGameObject:function(v,d){return d===void 0&&(d=v.frame),this.currentUnit=this.renderer.setTextureSource(d.source),this.currentUnit},shouldFlush:function(v){return v===void 0&&(v=0),this.vertexCount+v>this.vertexCapacity},resize:function(v,d){(v!==this.width||d!==this.height)&&this.flush(),this.width=v,this.height=d;for(var p=this.renderTargets,g=0;g<p.length;g++)p[g].resize(v,d);return this.setProjectionMatrix(v,d),this.emit(a.RESIZE,v,d,this),this.onResize(v,d),this},setProjectionMatrix:function(v,d){var p=this.projectionMatrix;if(!p)return this;this.projectionWidth=v,this.projectionHeight=d,p.ortho(0,v,d,0,-1e3,1e3);for(var g=this.shaders,m="uProjectionMatrix",x=0;x<g.length;x++){var y=g[x];y.hasUniform(m)&&(y.resetUniform(m),y.setMatrix4fv(m,!1,p.val,y))}return this},updateProjectionMatrix:function(){if(this.projectionMatrix){var v=this.renderer.projectionWidth,d=this.renderer.projectionHeight;(this.projectionWidth!==v||this.projectionHeight!==d)&&this.setProjectionMatrix(v,d)}},bind:function(v){if(v===void 0&&(v=this.currentShader),this.glReset)return this.rebind(v);var d=this.setVertexBuffer();return v.bind(d),this.currentShader=v,this.emit(a.BIND,this,v),this.onActive(v),this},rebind:function(v){this.setVertexBuffer();for(var d=this.shaders,p=d.length-1;p>=0;p--){var g=d[p].rebind();(!v||g===v)&&(this.currentShader=g)}return this.emit(a.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(){var v=this.gl,d=this.vertexBuffer;return v.getParameter(v.ARRAY_BUFFER_BINDING)!==d?(v.bindBuffer(v.ARRAY_BUFFER,d),!0):!1},preBatch:function(v){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(v),this},postBatch:function(v){return this.onDraw(this.currentRenderTarget),this.onPostBatch(v),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(v){if(v===void 0&&(v=!1),this.vertexCount>0){this.emit(a.BEFORE_FLUSH,this,v),this.onBeforeFlush(v);var d=this.gl,p=this.vertexCount,g=this.currentShader.vertexSize;this.active&&(this.setVertexBuffer(),p===this.vertexCapacity?d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.DYNAMIC_DRAW):d.bufferSubData(d.ARRAY_BUFFER,0,this.bytes.subarray(0,p*g)),d.drawArrays(this.topology,0,p)),this.vertexCount=0,this.emit(a.AFTER_FLUSH,this,v),this.onAfterFlush(v)}return this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(v,d,p,g,m,x,y){var T=this.vertexViewF32,E=this.vertexViewU32,C=this.vertexCount*this.currentShader.vertexComponentCount-1;T[++C]=v,T[++C]=d,T[++C]=p,T[++C]=g,T[++C]=m,T[++C]=x,E[++C]=y,this.vertexCount++},batchQuad:function(v,d,p,g,m,x,y,T,E,C,A,P,M,O,I,N,Y,X,W,H){H===void 0&&(H=this.currentUnit);var D=!1;return this.shouldFlush(6)&&(this.flush(),D=!0,H=this.setTexture2D(W)),this.batchVert(d,p,C,A,H,X,O),this.batchVert(g,m,C,M,H,X,N),this.batchVert(x,y,P,M,H,X,Y),this.batchVert(d,p,C,A,H,X,O),this.batchVert(x,y,P,M,H,X,Y),this.batchVert(T,E,P,A,H,X,I),this.onBatch(v),D},batchTri:function(v,d,p,g,m,x,y,T,E,C,A,P,M,O,I,N,Y){Y===void 0&&(Y=this.currentUnit);var X=!1;return this.shouldFlush(3)&&(this.flush(),X=!0,Y=this.setTexture2D(N)),this.batchVert(d,p,T,E,Y,I,P),this.batchVert(g,m,T,A,Y,I,M),this.batchVert(x,y,C,A,Y,I,O),this.onBatch(v),X},drawFillRect:function(v,d,p,g,m,x,y,T){y===void 0&&(y=this.renderer.whiteTexture.glTexture),T===void 0&&(T=!0),v=Math.floor(v),d=Math.floor(d);var E=Math.floor(v+p),C=Math.floor(d+g),A=this.setTexture2D(y),P=r.getTintAppendFloatAlphaAndSwap(m,x),M=0,O=0,I=1,N=1;T&&(O=1,N=0),this.batchQuad(null,v,d,v,C,E,C,E,d,M,O,I,N,P,P,P,P,0,y,A)},setTexture2D:function(v){return v===void 0&&(v=this.renderer.whiteTexture.glTexture),this.currentUnit=this.renderer.setTexture2D(v),this.currentUnit},bindTexture:function(v,d){d===void 0&&(d=0);var p=this.gl;return p.activeTexture(p.TEXTURE0+d),p.bindTexture(p.TEXTURE_2D,v),this},bindRenderTarget:function(v,d){return this.bindTexture(v.texture,d)},setTime:function(v){return this.set1f(v,this.game.loop.getDuration()),this},set1f:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set1f(v,d),this},set2f:function(v,d,p,g){return g===void 0&&(g=this.currentShader),g.set2f(v,d,p),this},set3f:function(v,d,p,g,m){return m===void 0&&(m=this.currentShader),m.set3f(v,d,p,g),this},set4f:function(v,d,p,g,m,x){return x===void 0&&(x=this.currentShader),x.set4f(v,d,p,g,m),this},set1fv:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set1fv(v,d),this},set2fv:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set2fv(v,d),this},set3fv:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set3fv(v,d),this},set4fv:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set4fv(v,d),this},set1iv:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set1iv(v,d),this},set2iv:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set2iv(v,d),this},set3iv:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set3iv(v,d),this},set4iv:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set4iv(v,d),this},set1i:function(v,d,p){return p===void 0&&(p=this.currentShader),p.set1i(v,d),this},set2i:function(v,d,p,g){return g===void 0&&(g=this.currentShader),g.set2i(v,d,p),this},set3i:function(v,d,p,g,m){return m===void 0&&(m=this.currentShader),m.set3i(v,d,p,g),this},set4i:function(v,d,p,g,m,x){return x===void 0&&(x=this.currentShader),x.set4i(v,d,p,g,m),this},setMatrix2fv:function(v,d,p,g){return g===void 0&&(g=this.currentShader),g.setMatrix2fv(v,d,p),this},setMatrix3fv:function(v,d,p,g){return g===void 0&&(g=this.currentShader),g.setMatrix3fv(v,d,p),this},setMatrix4fv:function(v,d,p,g){return g===void 0&&(g=this.currentShader),g.setMatrix4fv(v,d,p),this},destroy:function(){this.emit(a.DESTROY,this);var v,d=this.shaders;for(v=0;v<d.length;v++)d[v].destroy();var p=this.renderTargets;for(v=0;v<p.length;v++)p[v].destroy();this.gl.deleteBuffer(this.vertexBuffer);var g=this.renderer;return g.off(n.RESIZE,this.resize,this),g.off(n.PRE_RENDER,this.onPreRender,this),g.off(n.RENDER,this.onRender,this),g.off(n.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this}});c.exports=f},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */function e(L,B,G){G=G||2;var w=B&&B.length,z=w?B[0]*G:L.length,U=u(L,0,z,G,!0),V=[];if(!U||U.next===U.prev)return V;var Z,$,Q,j,k,et,_;if(w&&(U=r(L,B,U,G)),L.length>80*G){Z=Q=L[0],$=j=L[1];for(var nt=G;nt<z;nt+=G)k=L[nt],et=L[nt+1],k<Z&&(Z=k),et<$&&($=et),k>Q&&(Q=k),et>j&&(j=et);_=Math.max(Q-Z,j-$),_=_!==0?1/_:0}return a(U,V,G,Z,$,_),V}function u(L,B,G,w,z){var U,V;if(z===D(L,B,G,w)>0)for(U=B;U<G;U+=w)V=X(U,L[U],L[U+1],V);else for(U=G-w;U>=B;U-=w)V=X(U,L[U],L[U+1],V);return V&&C(V,V.next)&&(W(V),V=V.next),V}function o(L,B){if(!L)return L;B||(B=L);var G=L,w;do if(w=!1,!G.steiner&&(C(G,G.next)||E(G.prev,G,G.next)===0)){if(W(G),G=B=G.prev,G===G.next)break;w=!0}else G=G.next;while(w||G!==B);return B}function a(L,B,G,w,z,U,V){if(!!L){!V&&U&&p(L,w,z,U);for(var Z=L,$,Q;L.prev!==L.next;){if($=L.prev,Q=L.next,U?i(L,w,z,U):s(L)){B.push($.i/G),B.push(L.i/G),B.push(Q.i/G),W(L),L=Q.next,Z=Q.next;continue}if(L=Q,L===Z){V?V===1?(L=n(o(L),B,G),a(L,B,G,w,z,U,2)):V===2&&l(L,B,G,w,z,U):a(o(L),B,G,w,z,U,1);break}}}}function s(L){var B=L.prev,G=L,w=L.next;if(E(B,G,w)>=0)return!1;for(var z=L.next.next;z!==L.prev;){if(y(B.x,B.y,G.x,G.y,w.x,w.y,z.x,z.y)&&E(z.prev,z,z.next)>=0)return!1;z=z.next}return!0}function i(L,B,G,w){var z=L.prev,U=L,V=L.next;if(E(z,U,V)>=0)return!1;for(var Z=z.x<U.x?z.x<V.x?z.x:V.x:U.x<V.x?U.x:V.x,$=z.y<U.y?z.y<V.y?z.y:V.y:U.y<V.y?U.y:V.y,Q=z.x>U.x?z.x>V.x?z.x:V.x:U.x>V.x?U.x:V.x,j=z.y>U.y?z.y>V.y?z.y:V.y:U.y>V.y?U.y:V.y,k=m(Z,$,B,G,w),et=m(Q,j,B,G,w),_=L.prevZ,nt=L.nextZ;_&&_.z>=k&&nt&&nt.z<=et;){if(_!==L.prev&&_!==L.next&&y(z.x,z.y,U.x,U.y,V.x,V.y,_.x,_.y)&&E(_.prev,_,_.next)>=0||(_=_.prevZ,nt!==L.prev&&nt!==L.next&&y(z.x,z.y,U.x,U.y,V.x,V.y,nt.x,nt.y)&&E(nt.prev,nt,nt.next)>=0))return!1;nt=nt.nextZ}for(;_&&_.z>=k;){if(_!==L.prev&&_!==L.next&&y(z.x,z.y,U.x,U.y,V.x,V.y,_.x,_.y)&&E(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;nt&&nt.z<=et;){if(nt!==L.prev&&nt!==L.next&&y(z.x,z.y,U.x,U.y,V.x,V.y,nt.x,nt.y)&&E(nt.prev,nt,nt.next)>=0)return!1;nt=nt.nextZ}return!0}function n(L,B,G){var w=L;do{var z=w.prev,U=w.next.next;!C(z,U)&&A(z,w,w.next,U)&&I(z,U)&&I(U,z)&&(B.push(z.i/G),B.push(w.i/G),B.push(U.i/G),W(w),W(w.next),w=L=U),w=w.next}while(w!==L);return o(w)}function l(L,B,G,w,z,U){var V=L;do{for(var Z=V.next.next;Z!==V.prev;){if(V.i!==Z.i&&T(V,Z)){var $=Y(V,Z);V=o(V,V.next),$=o($,$.next),a(V,B,G,w,z,U),a($,B,G,w,z,U);return}Z=Z.next}V=V.next}while(V!==L)}function r(L,B,G,w){var z=[],U,V,Z,$,Q;for(U=0,V=B.length;U<V;U++)Z=B[U]*w,$=U<V-1?B[U+1]*w:L.length,Q=u(L,Z,$,w,!1),Q===Q.next&&(Q.steiner=!0),z.push(x(Q));for(z.sort(h),U=0;U<z.length;U++)f(z[U],G),G=o(G,G.next);return G}function h(L,B){return L.x-B.x}function f(L,B){if(B=v(L,B),B){var G=Y(B,L);o(B,B.next),o(G,G.next)}}function v(L,B){var G=B,w=L.x,z=L.y,U=-1/0,V;do{if(z<=G.y&&z>=G.next.y&&G.next.y!==G.y){var Z=G.x+(z-G.y)*(G.next.x-G.x)/(G.next.y-G.y);if(Z<=w&&Z>U){if(U=Z,Z===w){if(z===G.y)return G;if(z===G.next.y)return G.next}V=G.x<G.next.x?G:G.next}}G=G.next}while(G!==B);if(!V)return null;if(w===U)return V;var $=V,Q=V.x,j=V.y,k=1/0,et;G=V;do w>=G.x&&G.x>=Q&&w!==G.x&&y(z<j?w:U,z,Q,j,z<j?U:w,z,G.x,G.y)&&(et=Math.abs(z-G.y)/(w-G.x),I(G,L)&&(et<k||et===k&&(G.x>V.x||G.x===V.x&&d(V,G)))&&(V=G,k=et)),G=G.next;while(G!==$);return V}function d(L,B){return E(L.prev,L,B.prev)<0&&E(B.next,L,L.next)<0}function p(L,B,G,w){var z=L;do z.z===null&&(z.z=m(z.x,z.y,B,G,w)),z.prevZ=z.prev,z.nextZ=z.next,z=z.next;while(z!==L);z.prevZ.nextZ=null,z.prevZ=null,g(z)}function g(L){var B,G,w,z,U,V,Z,$,Q=1;do{for(G=L,L=null,U=null,V=0;G;){for(V++,w=G,Z=0,B=0;B<Q&&(Z++,w=w.nextZ,!!w);B++);for($=Q;Z>0||$>0&&w;)Z!==0&&($===0||!w||G.z<=w.z)?(z=G,G=G.nextZ,Z--):(z=w,w=w.nextZ,$--),U?U.nextZ=z:L=z,z.prevZ=U,U=z;G=w}U.nextZ=null,Q*=2}while(V>1);return L}function m(L,B,G,w,z){return L=32767*(L-G)*z,B=32767*(B-w)*z,L=(L|L<<8)&16711935,L=(L|L<<4)&252645135,L=(L|L<<2)&858993459,L=(L|L<<1)&1431655765,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,L|B<<1}function x(L){var B=L,G=L;do(B.x<G.x||B.x===G.x&&B.y<G.y)&&(G=B),B=B.next;while(B!==L);return G}function y(L,B,G,w,z,U,V,Z){return(z-V)*(B-Z)-(L-V)*(U-Z)>=0&&(L-V)*(w-Z)-(G-V)*(B-Z)>=0&&(G-V)*(U-Z)-(z-V)*(w-Z)>=0}function T(L,B){return L.next.i!==B.i&&L.prev.i!==B.i&&!O(L,B)&&(I(L,B)&&I(B,L)&&N(L,B)&&(E(L.prev,L,B.prev)||E(L,B.prev,B))||C(L,B)&&E(L.prev,L,L.next)>0&&E(B.prev,B,B.next)>0)}function E(L,B,G){return(B.y-L.y)*(G.x-B.x)-(B.x-L.x)*(G.y-B.y)}function C(L,B){return L.x===B.x&&L.y===B.y}function A(L,B,G,w){var z=M(E(L,B,G)),U=M(E(L,B,w)),V=M(E(G,w,L)),Z=M(E(G,w,B));return!!(z!==U&&V!==Z||z===0&&P(L,G,B)||U===0&&P(L,w,B)||V===0&&P(G,L,w)||Z===0&&P(G,B,w))}function P(L,B,G){return B.x<=Math.max(L.x,G.x)&&B.x>=Math.min(L.x,G.x)&&B.y<=Math.max(L.y,G.y)&&B.y>=Math.min(L.y,G.y)}function M(L){return L>0?1:L<0?-1:0}function O(L,B){var G=L;do{if(G.i!==L.i&&G.next.i!==L.i&&G.i!==B.i&&G.next.i!==B.i&&A(G,G.next,L,B))return!0;G=G.next}while(G!==L);return!1}function I(L,B){return E(L.prev,L,L.next)<0?E(L,B,L.next)>=0&&E(L,L.prev,B)>=0:E(L,B,L.prev)<0||E(L,L.next,B)<0}function N(L,B){var G=L,w=!1,z=(L.x+B.x)/2,U=(L.y+B.y)/2;do G.y>U!=G.next.y>U&&G.next.y!==G.y&&z<(G.next.x-G.x)*(U-G.y)/(G.next.y-G.y)+G.x&&(w=!w),G=G.next;while(G!==L);return w}function Y(L,B){var G=new H(L.i,L.x,L.y),w=new H(B.i,B.x,B.y),z=L.next,U=B.prev;return L.next=B,B.prev=L,G.next=z,z.prev=G,w.next=G,G.prev=w,U.next=w,w.prev=U,w}function X(L,B,G,w){var z=new H(L,B,G);return w?(z.next=w.next,z.prev=w,w.next.prev=z,w.next=z):(z.prev=z,z.next=z),z}function W(L){L.next.prev=L.prev,L.prev.next=L.next,L.prevZ&&(L.prevZ.nextZ=L.nextZ),L.nextZ&&(L.nextZ.prevZ=L.prevZ)}function H(L,B,G){this.i=L,this.x=B,this.y=G,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}e.deviation=function(L,B,G,w){var z=B&&B.length,U=z?B[0]*G:L.length,V=Math.abs(D(L,0,U,G));if(z)for(var Z=0,$=B.length;Z<$;Z++){var Q=B[Z]*G,j=Z<$-1?B[Z+1]*G:L.length;V-=Math.abs(D(L,Q,j,G))}var k=0;for(Z=0;Z<w.length;Z+=3){var et=w[Z]*G,_=w[Z+1]*G,nt=w[Z+2]*G;k+=Math.abs((L[et]-L[nt])*(L[_+1]-L[et+1])-(L[et]-L[_])*(L[nt+1]-L[et+1]))}return V===0&&k===0?0:Math.abs((k-V)/V)};function D(L,B,G,w){for(var z=0,U=B,V=G-w;U<G;U+=w)z+=(L[V]-L[U])*(L[U+1]+L[V+1]),V=U;return z}e.flatten=function(L){for(var B=L[0][0].length,G={vertices:[],holes:[],dimensions:B},w=0,z=0;z<L.length;z++){for(var U=0;U<L[z].length;U++)for(var V=0;V<B;V++)G.vertices.push(L[z][U][V]);z>0&&(w+=L[z-1].length,G.holes.push(w))}return G},c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=o||u.strokeColor,i=a||u.strokeAlpha,n=(s&16711680)>>>16,l=(s&65280)>>>8,r=s&255;e.strokeStyle="rgba("+n+","+l+","+r+","+i+")",e.lineWidth=u.lineWidth};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(6),n=t(7),l=new e({Extends:o,initialize:function(h,f,v,d,p){var g="json";if(n(f)){var m=f;f=s(m,"key"),v=s(m,"url"),d=s(m,"xhrSettings"),g=s(m,"extension",g),p=s(m,"dataKey",p)}var x={type:"json",cache:h.cacheManager.json,extension:g,responseType:"text",key:f,url:v,xhrSettings:d,config:p};o.call(this,h,x),n(v)&&(p?this.data=i(v,p):this.data=v,this.state=u.FILE_POPULATED)},onProcess:function(){if(this.state!==u.FILE_POPULATED){this.state=u.FILE_PROCESSING;try{var r=JSON.parse(this.xhrLoader.responseText)}catch(f){throw console.warn("Invalid JSON: "+this.key),this.onProcessError(),f}var h=this.config;typeof h=="string"?this.data=i(r,h,r):this.data=r}this.onProcessComplete()}});a.register("json",function(r,h,f,v){if(Array.isArray(r))for(var d=0;d<r.length;d++)this.addFile(new l(this,r[d]));else this.addFile(new l(this,r,h,v,f));return this}),c.exports=l},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(158),u=t(26),o=function(a,s,i,n,l){for(var r=null,h=null,f=null,v=null,d=u(a,s,i,n,null,l),p=0;p<d.length;p++){var g=d[p];g&&(g.collides?(r=e(g.x,g.y-1,!0,l),h=e(g.x,g.y+1,!0,l),f=e(g.x-1,g.y,!0,l),v=e(g.x+1,g.y,!0,l),g.faceTop=!(r&&r.collides),g.faceBottom=!(h&&h.collides),g.faceLeft=!(f&&f.collides),g.faceRight=!(v&&v.collides)):g.resetFaces())}};c.exports=o},function(c,S,t){var e={};c.exports=e;var u=t(83),o=t(32);(function(){e.create=function(a,s){for(var i=[],n=0;n<a.length;n++){var l=a[n],r={x:l.x,y:l.y,index:n,body:s,isInternal:!1,contact:null,offset:null};r.contact={vertex:r,normalImpulse:0,tangentImpulse:0},i.push(r)}return i},e.fromPath=function(a,s){var i=/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig,n=[];return a.replace(i,function(l,r,h){n.push({x:parseFloat(r),y:parseFloat(h)})}),e.create(n,s)},e.centre=function(a){for(var s=e.area(a,!0),i={x:0,y:0},n,l,r,h=0;h<a.length;h++)r=(h+1)%a.length,n=u.cross(a[h],a[r]),l=u.mult(u.add(a[h],a[r]),n),i=u.add(i,l);return u.div(i,6*s)},e.mean=function(a){for(var s={x:0,y:0},i=0;i<a.length;i++)s.x+=a[i].x,s.y+=a[i].y;return u.div(s,a.length)},e.area=function(a,s){for(var i=0,n=a.length-1,l=0;l<a.length;l++)i+=(a[n].x-a[l].x)*(a[n].y+a[l].y),n=l;return s?i/2:Math.abs(i)/2},e.inertia=function(a,s){for(var i=0,n=0,l=a,r,h,f=0;f<l.length;f++)h=(f+1)%l.length,r=Math.abs(u.cross(l[h],l[f])),i+=r*(u.dot(l[h],l[h])+u.dot(l[h],l[f])+u.dot(l[f],l[f])),n+=r;return s/6*(i/n)},e.translate=function(a,s,i){var n;if(i)for(n=0;n<a.length;n++)a[n].x+=s.x*i,a[n].y+=s.y*i;else for(n=0;n<a.length;n++)a[n].x+=s.x,a[n].y+=s.y;return a},e.rotate=function(a,s,i){if(s!==0){for(var n=Math.cos(s),l=Math.sin(s),r=0;r<a.length;r++){var h=a[r],f=h.x-i.x,v=h.y-i.y;h.x=i.x+(f*n-v*l),h.y=i.y+(f*l+v*n)}return a}},e.contains=function(a,s){for(var i=0;i<a.length;i++){var n=a[i],l=a[(i+1)%a.length];if((s.x-n.x)*(l.y-n.y)+(s.y-n.y)*(n.x-l.x)>0)return!1}return!0},e.scale=function(a,s,i,n){if(s===1&&i===1)return a;n=n||e.centre(a);for(var l,r,h=0;h<a.length;h++)l=a[h],r=u.sub(l,n),a[h].x=n.x+r.x*s,a[h].y=n.y+r.y*i;return a},e.chamfer=function(a,s,i,n,l){typeof s=="number"?s=[s]:s=s||[8],i=typeof i!="undefined"?i:-1,n=n||2,l=l||14;for(var r=[],h=0;h<a.length;h++){var f=a[h-1>=0?h-1:a.length-1],v=a[h],d=a[(h+1)%a.length],p=s[h<s.length?h:s.length-1];if(p===0){r.push(v);continue}var g=u.normalise({x:v.y-f.y,y:f.x-v.x}),m=u.normalise({x:d.y-v.y,y:v.x-d.x}),x=Math.sqrt(2*Math.pow(p,2)),y=u.mult(o.clone(g),p),T=u.normalise(u.mult(u.add(g,m),.5)),E=u.sub(v,u.mult(T,x)),C=i;i===-1&&(C=Math.pow(p,.32)*1.75),C=o.clamp(C,n,l),C%2==1&&(C+=1);for(var A=Math.acos(u.dot(g,m)),P=A/C,M=0;M<C;M++)r.push(u.add(u.rotate(y,P*M),E))}return r},e.clockwiseSort=function(a){var s=e.mean(a);return a.sort(function(i,n){return u.angle(s,i)-u.angle(s,n)}),a},e.isConvex=function(a){var s=0,i=a.length,n,l,r,h;if(i<3)return null;for(n=0;n<i;n++)if(l=(n+1)%i,r=(n+2)%i,h=(a[l].x-a[n].x)*(a[r].y-a[l].y),h-=(a[l].y-a[n].y)*(a[r].x-a[l].x),h<0?s|=1:h>0&&(s|=2),s===3)return!1;return s!==0?!0:null},e.hull=function(a){var s=[],i=[],n,l;for(a=a.slice(0),a.sort(function(r,h){var f=r.x-h.x;return f!==0?f:r.y-h.y}),l=0;l<a.length;l+=1){for(n=a[l];i.length>=2&&u.cross3(i[i.length-2],i[i.length-1],n)<=0;)i.pop();i.push(n)}for(l=a.length-1;l>=0;l-=1){for(n=a[l];s.length>=2&&u.cross3(s[s.length-2],s[s.length-1],n)<=0;)s.pop();s.push(n)}return s.pop(),i.pop(),s.concat(i)}})()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(66),o=t(300),a=t(301),s=t(56),i=t(170),n=new e({initialize:function(r,h,f){r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=0),this.type=s.CIRCLE,this.x=r,this.y=h,this._radius=f,this._diameter=f*2},contains:function(l,r){return u(this,l,r)},getPoint:function(l,r){return o(this,l,r)},getPoints:function(l,r,h){return a(this,l,r,h)},getRandomPoint:function(l){return i(this,l)},setTo:function(l,r,h){return this.x=l,this.y=r,this._radius=h,this._diameter=h*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(l,r){return r===void 0&&(r=l),this.x=l,this.y=r,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(l){this._radius=l,this._diameter=l*2}},diameter:{get:function(){return this._diameter},set:function(l){this._diameter=l,this._radius=l*.5}},left:{get:function(){return this.x-this._radius},set:function(l){this.x=l+this._radius}},right:{get:function(){return this.x+this._radius},set:function(l){this.x=l-this._radius}},top:{get:function(){return this.y-this._radius},set:function(l){this.y=l+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(l){this.y=l-this._radius}}});c.exports=n},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(e.radius>0&&u>=e.left&&u<=e.right&&o>=e.top&&o<=e.bottom){var a=(e.x-u)*(e.x-u),s=(e.y-o)*(e.y-o);return a+s<=e.radius*e.radius}else return!1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return Math.sqrt((e.x2-e.x1)*(e.x2-e.x1)+(e.y2-e.y1)*(e.y2-e.y1))};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=o-u;return u+((e-u)%a+a)%a};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(39),o=1e-6,a=new e({initialize:function(f){this.val=new Float32Array(16),f?this.copy(f):this.identity()},clone:function(){return new a(this)},set:function(h){return this.copy(h)},setValues:function(h,f,v,d,p,g,m,x,y,T,E,C,A,P,M,O){var I=this.val;return I[0]=h,I[1]=f,I[2]=v,I[3]=d,I[4]=p,I[5]=g,I[6]=m,I[7]=x,I[8]=y,I[9]=T,I[10]=E,I[11]=C,I[12]=A,I[13]=P,I[14]=M,I[15]=O,this},copy:function(h){var f=h.val;return this.setValues(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15])},fromArray:function(h){return this.setValues(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10],h[11],h[12],h[13],h[14],h[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(h,f,v){var d=s.fromQuat(v),p=d.val,g=f.x,m=f.y,x=f.z;return this.setValues(p[0]*g,p[1]*g,p[2]*g,0,p[4]*m,p[5]*m,p[6]*m,0,p[8]*x,p[9]*x,p[10]*x,0,h.x,h.y,h.z,1)},xyz:function(h,f,v){this.identity();var d=this.val;return d[12]=h,d[13]=f,d[14]=v,this},scaling:function(h,f,v){this.zero();var d=this.val;return d[0]=h,d[5]=f,d[10]=v,d[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var h=this.val,f=h[1],v=h[2],d=h[3],p=h[6],g=h[7],m=h[11];return h[1]=h[4],h[2]=h[8],h[3]=h[12],h[4]=f,h[6]=h[9],h[7]=h[13],h[8]=v,h[9]=p,h[11]=h[14],h[12]=d,h[13]=g,h[14]=m,this},getInverse:function(h){return this.copy(h),this.invert()},invert:function(){var h=this.val,f=h[0],v=h[1],d=h[2],p=h[3],g=h[4],m=h[5],x=h[6],y=h[7],T=h[8],E=h[9],C=h[10],A=h[11],P=h[12],M=h[13],O=h[14],I=h[15],N=f*m-v*g,Y=f*x-d*g,X=f*y-p*g,W=v*x-d*m,H=v*y-p*m,D=d*y-p*x,L=T*M-E*P,B=T*O-C*P,G=T*I-A*P,w=E*O-C*M,z=E*I-A*M,U=C*I-A*O,V=N*U-Y*z+X*w+W*G-H*B+D*L;return V?(V=1/V,this.setValues((m*U-x*z+y*w)*V,(d*z-v*U-p*w)*V,(M*D-O*H+I*W)*V,(C*H-E*D-A*W)*V,(x*G-g*U-y*B)*V,(f*U-d*G+p*B)*V,(O*X-P*D-I*Y)*V,(T*D-C*X+A*Y)*V,(g*z-m*G+y*L)*V,(v*G-f*z-p*L)*V,(P*H-M*X+I*N)*V,(E*X-T*H-A*N)*V,(m*B-g*w-x*L)*V,(f*w-v*B+d*L)*V,(M*Y-P*W-O*N)*V,(T*W-E*Y+C*N)*V)):this},adjoint:function(){var h=this.val,f=h[0],v=h[1],d=h[2],p=h[3],g=h[4],m=h[5],x=h[6],y=h[7],T=h[8],E=h[9],C=h[10],A=h[11],P=h[12],M=h[13],O=h[14],I=h[15];return this.setValues(m*(C*I-A*O)-E*(x*I-y*O)+M*(x*A-y*C),-(v*(C*I-A*O)-E*(d*I-p*O)+M*(d*A-p*C)),v*(x*I-y*O)-m*(d*I-p*O)+M*(d*y-p*x),-(v*(x*A-y*C)-m*(d*A-p*C)+E*(d*y-p*x)),-(g*(C*I-A*O)-T*(x*I-y*O)+P*(x*A-y*C)),f*(C*I-A*O)-T*(d*I-p*O)+P*(d*A-p*C),-(f*(x*I-y*O)-g*(d*I-p*O)+P*(d*y-p*x)),f*(x*A-y*C)-g*(d*A-p*C)+T*(d*y-p*x),g*(E*I-A*M)-T*(m*I-y*M)+P*(m*A-y*E),-(f*(E*I-A*M)-T*(v*I-p*M)+P*(v*A-p*E)),f*(m*I-y*M)-g*(v*I-p*M)+P*(v*y-p*m),-(f*(m*A-y*E)-g*(v*A-p*E)+T*(v*y-p*m)),-(g*(E*O-C*M)-T*(m*O-x*M)+P*(m*C-x*E)),f*(E*O-C*M)-T*(v*O-d*M)+P*(v*C-d*E),-(f*(m*O-x*M)-g*(v*O-d*M)+P*(v*x-d*m)),f*(m*C-x*E)-g*(v*C-d*E)+T*(v*x-d*m))},determinant:function(){var h=this.val,f=h[0],v=h[1],d=h[2],p=h[3],g=h[4],m=h[5],x=h[6],y=h[7],T=h[8],E=h[9],C=h[10],A=h[11],P=h[12],M=h[13],O=h[14],I=h[15],N=f*m-v*g,Y=f*x-d*g,X=f*y-p*g,W=v*x-d*m,H=v*y-p*m,D=d*y-p*x,L=T*M-E*P,B=T*O-C*P,G=T*I-A*P,w=E*O-C*M,z=E*I-A*M,U=C*I-A*O;return N*U-Y*z+X*w+W*G-H*B+D*L},multiply:function(h){var f=this.val,v=f[0],d=f[1],p=f[2],g=f[3],m=f[4],x=f[5],y=f[6],T=f[7],E=f[8],C=f[9],A=f[10],P=f[11],M=f[12],O=f[13],I=f[14],N=f[15],Y=h.val,X=Y[0],W=Y[1],H=Y[2],D=Y[3];return f[0]=X*v+W*m+H*E+D*M,f[1]=X*d+W*x+H*C+D*O,f[2]=X*p+W*y+H*A+D*I,f[3]=X*g+W*T+H*P+D*N,X=Y[4],W=Y[5],H=Y[6],D=Y[7],f[4]=X*v+W*m+H*E+D*M,f[5]=X*d+W*x+H*C+D*O,f[6]=X*p+W*y+H*A+D*I,f[7]=X*g+W*T+H*P+D*N,X=Y[8],W=Y[9],H=Y[10],D=Y[11],f[8]=X*v+W*m+H*E+D*M,f[9]=X*d+W*x+H*C+D*O,f[10]=X*p+W*y+H*A+D*I,f[11]=X*g+W*T+H*P+D*N,X=Y[12],W=Y[13],H=Y[14],D=Y[15],f[12]=X*v+W*m+H*E+D*M,f[13]=X*d+W*x+H*C+D*O,f[14]=X*p+W*y+H*A+D*I,f[15]=X*g+W*T+H*P+D*N,this},multiplyLocal:function(h){var f=this.val,v=h.val;return this.setValues(f[0]*v[0]+f[1]*v[4]+f[2]*v[8]+f[3]*v[12],f[0]*v[1]+f[1]*v[5]+f[2]*v[9]+f[3]*v[13],f[0]*v[2]+f[1]*v[6]+f[2]*v[10]+f[3]*v[14],f[0]*v[3]+f[1]*v[7]+f[2]*v[11]+f[3]*v[15],f[4]*v[0]+f[5]*v[4]+f[6]*v[8]+f[7]*v[12],f[4]*v[1]+f[5]*v[5]+f[6]*v[9]+f[7]*v[13],f[4]*v[2]+f[5]*v[6]+f[6]*v[10]+f[7]*v[14],f[4]*v[3]+f[5]*v[7]+f[6]*v[11]+f[7]*v[15],f[8]*v[0]+f[9]*v[4]+f[10]*v[8]+f[11]*v[12],f[8]*v[1]+f[9]*v[5]+f[10]*v[9]+f[11]*v[13],f[8]*v[2]+f[9]*v[6]+f[10]*v[10]+f[11]*v[14],f[8]*v[3]+f[9]*v[7]+f[10]*v[11]+f[11]*v[15],f[12]*v[0]+f[13]*v[4]+f[14]*v[8]+f[15]*v[12],f[12]*v[1]+f[13]*v[5]+f[14]*v[9]+f[15]*v[13],f[12]*v[2]+f[13]*v[6]+f[14]*v[10]+f[15]*v[14],f[12]*v[3]+f[13]*v[7]+f[14]*v[11]+f[15]*v[15])},premultiply:function(h){return this.multiplyMatrices(h,this)},multiplyMatrices:function(h,f){var v=h.val,d=f.val,p=v[0],g=v[4],m=v[8],x=v[12],y=v[1],T=v[5],E=v[9],C=v[13],A=v[2],P=v[6],M=v[10],O=v[14],I=v[3],N=v[7],Y=v[11],X=v[15],W=d[0],H=d[4],D=d[8],L=d[12],B=d[1],G=d[5],w=d[9],z=d[13],U=d[2],V=d[6],Z=d[10],$=d[14],Q=d[3],j=d[7],k=d[11],et=d[15];return this.setValues(p*W+g*B+m*U+x*Q,y*W+T*B+E*U+C*Q,A*W+P*B+M*U+O*Q,I*W+N*B+Y*U+X*Q,p*H+g*G+m*V+x*j,y*H+T*G+E*V+C*j,A*H+P*G+M*V+O*j,I*H+N*G+Y*V+X*j,p*D+g*w+m*Z+x*k,y*D+T*w+E*Z+C*k,A*D+P*w+M*Z+O*k,I*D+N*w+Y*Z+X*k,p*L+g*z+m*$+x*et,y*L+T*z+E*$+C*et,A*L+P*z+M*$+O*et,I*L+N*z+Y*$+X*et)},translate:function(h){return this.translateXYZ(h.x,h.y,h.z)},translateXYZ:function(h,f,v){var d=this.val;return d[12]=d[0]*h+d[4]*f+d[8]*v+d[12],d[13]=d[1]*h+d[5]*f+d[9]*v+d[13],d[14]=d[2]*h+d[6]*f+d[10]*v+d[14],d[15]=d[3]*h+d[7]*f+d[11]*v+d[15],this},scale:function(h){return this.scaleXYZ(h.x,h.y,h.z)},scaleXYZ:function(h,f,v){var d=this.val;return d[0]=d[0]*h,d[1]=d[1]*h,d[2]=d[2]*h,d[3]=d[3]*h,d[4]=d[4]*f,d[5]=d[5]*f,d[6]=d[6]*f,d[7]=d[7]*f,d[8]=d[8]*v,d[9]=d[9]*v,d[10]=d[10]*v,d[11]=d[11]*v,this},makeRotationAxis:function(h,f){var v=Math.cos(f),d=Math.sin(f),p=1-v,g=h.x,m=h.y,x=h.z,y=p*g,T=p*m;return this.setValues(y*g+v,y*m-d*x,y*x+d*m,0,y*m+d*x,T*m+v,T*x-d*g,0,y*x-d*m,T*x+d*g,p*x*x+v,0,0,0,0,1)},rotate:function(h,f){var v=this.val,d=f.x,p=f.y,g=f.z,m=Math.sqrt(d*d+p*p+g*g);if(Math.abs(m)<o)return this;m=1/m,d*=m,p*=m,g*=m;var x=Math.sin(h),y=Math.cos(h),T=1-y,E=v[0],C=v[1],A=v[2],P=v[3],M=v[4],O=v[5],I=v[6],N=v[7],Y=v[8],X=v[9],W=v[10],H=v[11],D=v[12],L=v[13],B=v[14],G=v[15],w=d*d*T+y,z=p*d*T+g*x,U=g*d*T-p*x,V=d*p*T-g*x,Z=p*p*T+y,$=g*p*T+d*x,Q=d*g*T+p*x,j=p*g*T-d*x,k=g*g*T+y;return this.setValues(E*w+M*z+Y*U,C*w+O*z+X*U,A*w+I*z+W*U,P*w+N*z+H*U,E*V+M*Z+Y*$,C*V+O*Z+X*$,A*V+I*Z+W*$,P*V+N*Z+H*$,E*Q+M*j+Y*k,C*Q+O*j+X*k,A*Q+I*j+W*k,P*Q+N*j+H*k,D,L,B,G)},rotateX:function(h){var f=this.val,v=Math.sin(h),d=Math.cos(h),p=f[4],g=f[5],m=f[6],x=f[7],y=f[8],T=f[9],E=f[10],C=f[11];return f[4]=p*d+y*v,f[5]=g*d+T*v,f[6]=m*d+E*v,f[7]=x*d+C*v,f[8]=y*d-p*v,f[9]=T*d-g*v,f[10]=E*d-m*v,f[11]=C*d-x*v,this},rotateY:function(h){var f=this.val,v=Math.sin(h),d=Math.cos(h),p=f[0],g=f[1],m=f[2],x=f[3],y=f[8],T=f[9],E=f[10],C=f[11];return f[0]=p*d-y*v,f[1]=g*d-T*v,f[2]=m*d-E*v,f[3]=x*d-C*v,f[8]=p*v+y*d,f[9]=g*v+T*d,f[10]=m*v+E*d,f[11]=x*v+C*d,this},rotateZ:function(h){var f=this.val,v=Math.sin(h),d=Math.cos(h),p=f[0],g=f[1],m=f[2],x=f[3],y=f[4],T=f[5],E=f[6],C=f[7];return f[0]=p*d+y*v,f[1]=g*d+T*v,f[2]=m*d+E*v,f[3]=x*d+C*v,f[4]=y*d-p*v,f[5]=T*d-g*v,f[6]=E*d-m*v,f[7]=C*d-x*v,this},fromRotationTranslation:function(h,f){var v=h.x,d=h.y,p=h.z,g=h.w,m=v+v,x=d+d,y=p+p,T=v*m,E=v*x,C=v*y,A=d*x,P=d*y,M=p*y,O=g*m,I=g*x,N=g*y;return this.setValues(1-(A+M),E+N,C-I,0,E-N,1-(T+M),P+O,0,C+I,P-O,1-(T+A),0,f.x,f.y,f.z,1)},fromQuat:function(h){var f=h.x,v=h.y,d=h.z,p=h.w,g=f+f,m=v+v,x=d+d,y=f*g,T=f*m,E=f*x,C=v*m,A=v*x,P=d*x,M=p*g,O=p*m,I=p*x;return this.setValues(1-(C+P),T+I,E-O,0,T-I,1-(y+P),A+M,0,E+O,A-M,1-(y+C),0,0,0,0,1)},frustum:function(h,f,v,d,p,g){var m=1/(f-h),x=1/(d-v),y=1/(p-g);return this.setValues(p*2*m,0,0,0,0,p*2*x,0,0,(f+h)*m,(d+v)*x,(g+p)*y,-1,0,0,g*p*2*y,0)},perspective:function(h,f,v,d){var p=1/Math.tan(h/2),g=1/(v-d);return this.setValues(p/f,0,0,0,0,p,0,0,0,0,(d+v)*g,-1,0,0,2*d*v*g,0)},perspectiveLH:function(h,f,v,d){return this.setValues(2*v/h,0,0,0,0,2*v/f,0,0,0,0,-d/(v-d),1,0,0,v*d/(v-d),0)},ortho:function(h,f,v,d,p,g){var m=h-f,x=v-d,y=p-g;return m=m===0?m:1/m,x=x===0?x:1/x,y=y===0?y:1/y,this.setValues(-2*m,0,0,0,0,-2*x,0,0,0,0,2*y,0,(h+f)*m,(d+v)*x,(g+p)*y,1)},lookAtRH:function(h,f,v){var d=this.val;return r.subVectors(h,f),r.getLengthSquared()===0&&(r.z=1),r.normalize(),n.crossVectors(v,r),n.getLengthSquared()===0&&(Math.abs(v.z)===1?r.x+=1e-4:r.z+=1e-4,r.normalize(),n.crossVectors(v,r)),n.normalize(),l.crossVectors(r,n),d[0]=n.x,d[1]=n.y,d[2]=n.z,d[4]=l.x,d[5]=l.y,d[6]=l.z,d[8]=r.x,d[9]=r.y,d[10]=r.z,this},lookAt:function(h,f,v){var d=h.x,p=h.y,g=h.z,m=v.x,x=v.y,y=v.z,T=f.x,E=f.y,C=f.z;if(Math.abs(d-T)<o&&Math.abs(p-E)<o&&Math.abs(g-C)<o)return this.identity();var A=d-T,P=p-E,M=g-C,O=1/Math.sqrt(A*A+P*P+M*M);A*=O,P*=O,M*=O;var I=x*M-y*P,N=y*A-m*M,Y=m*P-x*A;O=Math.sqrt(I*I+N*N+Y*Y),O?(O=1/O,I*=O,N*=O,Y*=O):(I=0,N=0,Y=0);var X=P*Y-M*N,W=M*I-A*Y,H=A*N-P*I;return O=Math.sqrt(X*X+W*W+H*H),O?(O=1/O,X*=O,W*=O,H*=O):(X=0,W=0,H=0),this.setValues(I,X,A,0,N,W,P,0,Y,H,M,0,-(I*d+N*p+Y*g),-(X*d+W*p+H*g),-(A*d+P*p+M*g),1)},yawPitchRoll:function(h,f,v){this.zero(),s.zero(),i.zero();var d=this.val,p=s.val,g=i.val,m=Math.sin(v),x=Math.cos(v);return d[10]=1,d[15]=1,d[0]=x,d[1]=m,d[4]=-m,d[5]=x,m=Math.sin(f),x=Math.cos(f),p[0]=1,p[15]=1,p[5]=x,p[10]=x,p[9]=-m,p[6]=m,m=Math.sin(h),x=Math.cos(h),g[5]=1,g[15]=1,g[0]=x,g[2]=-m,g[8]=m,g[10]=x,this.multiplyLocal(s),this.multiplyLocal(i),this},setWorldMatrix:function(h,f,v,d,p){return this.yawPitchRoll(h.y,h.x,h.z),s.scaling(v.x,v.y,v.z),i.xyz(f.x,f.y,f.z),this.multiplyLocal(s),this.multiplyLocal(i),d&&this.multiplyLocal(d),p&&this.multiplyLocal(p),this},multiplyToMat4:function(h,f){var v=this.val,d=h.val,p=v[0],g=v[1],m=v[2],x=v[3],y=v[4],T=v[5],E=v[6],C=v[7],A=v[8],P=v[9],M=v[10],O=v[11],I=v[12],N=v[13],Y=v[14],X=v[15],W=d[0],H=d[1],D=d[2],L=d[3],B=d[4],G=d[5],w=d[6],z=d[7],U=d[8],V=d[9],Z=d[10],$=d[11],Q=d[12],j=d[13],k=d[14],et=d[15];return f.setValues(W*p+H*y+D*A+L*I,H*g+H*T+D*P+L*N,D*m+H*E+D*M+L*Y,L*x+H*C+D*O+L*X,B*p+G*y+w*A+z*I,B*g+G*T+w*P+z*N,B*m+G*E+w*M+z*Y,B*x+G*C+w*O+z*X,U*p+V*y+Z*A+$*I,U*g+V*T+Z*P+$*N,U*m+V*E+Z*M+$*Y,U*x+V*C+Z*O+$*X,Q*p+j*y+k*A+et*I,Q*g+j*T+k*P+et*N,Q*m+j*E+k*M+et*Y,Q*x+j*C+k*O+et*X)},fromRotationXYTranslation:function(h,f,v){var d=f.x,p=f.y,g=f.z,m=Math.sin(h.x),x=Math.cos(h.x),y=Math.sin(h.y),T=Math.cos(h.y),E=d,C=p,A=g,P=-m,M=0-P*y,O=0-x*y,I=P*T,N=x*T;return v||(E=T*d+y*g,C=M*d+x*p+I*g,A=O*d+m*p+N*g),this.setValues(T,M,O,0,0,x,m,0,y,I,N,0,E,C,A,1)},getMaxScaleOnAxis:function(){var h=this.val,f=h[0]*h[0]+h[1]*h[1]+h[2]*h[2],v=h[4]*h[4]+h[5]*h[5]+h[6]*h[6],d=h[8]*h[8]+h[9]*h[9]+h[10]*h[10];return Math.sqrt(Math.max(f,v,d))}}),s=new a,i=new a,n=new u,l=new u,r=new u;c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={COMPLETE:t(987),DECODED:t(988),DECODED_ALL:t(989),DESTROY:t(990),DETUNE:t(991),GLOBAL_DETUNE:t(992),GLOBAL_MUTE:t(993),GLOBAL_RATE:t(994),GLOBAL_VOLUME:t(995),LOOP:t(996),LOOPED:t(997),MUTE:t(998),PAN:t(999),PAUSE_ALL:t(1e3),PAUSE:t(1001),PLAY:t(1002),RATE:t(1003),RESUME_ALL:t(1004),RESUME:t(1005),SEEK:t(1006),STOP_ALL:t(1007),STOP:t(1008),UNLOCKED:t(1009),VOLUME:t(1010)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function l(r,h,f,v,d){var p="png",g;if(i(h)){var m=h;h=s(m,"key"),f=s(m,"url"),g=s(m,"normalMap"),v=s(m,"xhrSettings"),p=s(m,"extension",p),d=s(m,"frameConfig")}Array.isArray(f)&&(g=f[1],f=f[0]);var x={type:"image",cache:r.textureManager,extension:p,responseType:"blob",key:h,url:f,xhrSettings:v,config:d};if(o.call(this,r,x),g){var y=new l(r,this.key,g,v,d);y.type="normalMap",this.setLink(y),r.addFile(y)}},onProcess:function(){this.state=u.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var l=this;this.data.onload=function(){o.revokeObjectURL(l.data),l.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(l.data),l.onProcessError()},o.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var l,r=this.linkFile;r&&r.state===u.FILE_COMPLETE?(this.type==="image"?l=this.cache.addImage(this.key,this.data,r.data):l=this.cache.addImage(r.key,r.data,this.data),this.pendingDestroy(l),r.pendingDestroy(l)):r||(l=this.cache.addImage(this.key,this.data),this.pendingDestroy(l))}});a.register("image",function(l,r,h){if(Array.isArray(l))for(var f=0;f<l.length;f++)this.addFile(new n(this,l[f]));else this.addFile(new n(this,l,r,h));return this}),c.exports=n},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u?e.setCollision(!0,!0,!0,!0,!1):e.resetCollision(!1)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(164),u=t(0),o=t(11),a=t(15),s=t(1065),i=new u({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Size,o.TextureCrop,o.Tint,o.Transform,o.Visible,s],initialize:function(l,r,h,f,v){a.call(this,l,"Sprite"),this._crop=this.resetCropObject(),this.anims=new e(this),this.setTexture(f,v),this.setPosition(r,h),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(n,l){this.anims.update(n,l)},play:function(n,l){return this.anims.play(n,l)},playReverse:function(n,l){return this.anims.playReverse(n,l)},playAfterDelay:function(n,l){return this.anims.playAfterDelay(n,l)},playAfterRepeat:function(n,l){return this.anims.playAfterRepeat(n,l)},chain:function(n){return this.anims.chain(n)},stop:function(){return this.anims.stop()},stopAfterDelay:function(n){return this.anims.stopAfterDelay(n)},stopAfterRepeat:function(n){return this.anims.stopAfterRepeat(n)},stopOnFrame:function(n){return this.anims.stopOnFrame(n)},toJSON:function(){return o.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});c.exports=i},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){if(!(u>=e.length)){for(var o=e.length-1,a=e[u],s=u;s<o;s++)e[s]=e[s+1];return e.length=o,a}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ADDED_TO_SCENE:t(643),DESTROY:t(644),REMOVED_FROM_SCENE:t(645),VIDEO_COMPLETE:t(646),VIDEO_CREATED:t(647),VIDEO_ERROR:t(648),VIDEO_LOOP:t(649),VIDEO_PLAY:t(650),VIDEO_SEEKED:t(651),VIDEO_SEEKING:t(652),VIDEO_STOP:t(653),VIDEO_TIMEOUT:t(654),VIDEO_UNLOCKED:t(655)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){return o===void 0&&(o=0),u===0?e:(e-=o,e=u*Math.floor(e/u),a?(o+e)/u:o+e)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u={};for(var o in e)Array.isArray(e[o])?u[o]=e[o].slice(0):u[o]=e[o];return u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=e.length;if(u<0||u>s||u>=o||o>s||u+o>s){if(a)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Angry Bytes (and contributors)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */function t(a,s){return String(a).localeCompare(s)}function e(a,s){var i=a.length;if(i<=1)return a;for(var n=new Array(i),l=1;l<i;l*=2){u(a,s,l,n);var r=a;a=n,n=r}return a}function u(a,s,i,n){var l=a.length,r=0,h=i*2,f,v,d,p,g;for(f=0;f<l;f+=h)for(v=f+i,d=v+i,v>l&&(v=l),d>l&&(d=l),p=f,g=v;;)if(p<v&&g<d)s(a[p],a[g])<=0?n[r++]=a[p++]:n[r++]=a[g++];else if(p<v)n[r++]=a[p++];else if(g<d)n[r++]=a[g++];else break}var o=function(a,s){s===void 0&&(s=t);var i=e(a,s);return i!==a&&u(i,null,a.length,a),a};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(134),u=t(205),o=function(a,s){var i=e.Power0;if(typeof a=="string")if(e.hasOwnProperty(a))i=e[a];else{var n="";a.indexOf(".")&&(n=a.substr(a.indexOf(".")+1),n.toLowerCase()==="in"?n="easeIn":n.toLowerCase()==="out"?n="easeOut":n.toLowerCase()==="inout"&&(n="easeInOut")),a=u(a.substr(0,a.indexOf(".")+1)+n),e.hasOwnProperty(a)&&(i=e[a])}else typeof a=="function"?i=a:Array.isArray(a)&&a.length===4;if(!s)return i;var l=s.slice(0);return l.unshift(0),function(r){return l[0]=r,i.apply(this,l)}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(12),u=function(o,a,s,i,n){var l=o.strokeTint,r=e.getTintAppendFloatAlpha(a.strokeColor,a.strokeAlpha*s);l.TL=r,l.TR=r,l.BL=r,l.BR=r;var h=a.pathData,f=h.length-1,v=a.lineWidth,d=v/2,p=h[0]-i,g=h[1]-n;a.closePath||(f-=2);for(var m=2;m<f;m+=2){var x=h[m]-i,y=h[m+1]-n;o.batchLine(p,g,x,y,d,d,v,m-2,a.closePath?m===f-1:!1),p=x,g=y}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(115),o=t(476),a=t(477),s=t(56),i=t(47),n=t(181),l=new e({initialize:function(h,f,v,d,p,g){h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),this.type=s.TRIANGLE,this.x1=h,this.y1=f,this.x2=v,this.y2=d,this.x3=p,this.y3=g},contains:function(r,h){return u(this,r,h)},getPoint:function(r,h){return o(this,r,h)},getPoints:function(r,h,f){return a(this,r,h,f)},getRandomPoint:function(r){return n(this,r)},setTo:function(r,h,f,v,d,p){return r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),d===void 0&&(d=0),p===void 0&&(p=0),this.x1=r,this.y1=h,this.x2=f,this.y2=v,this.x3=d,this.y3=p,this},getLineA:function(r){return r===void 0&&(r=new i),r.setTo(this.x1,this.y1,this.x2,this.y2),r},getLineB:function(r){return r===void 0&&(r=new i),r.setTo(this.x2,this.y2,this.x3,this.y3),r},getLineC:function(r){return r===void 0&&(r=new i),r.setTo(this.x3,this.y3,this.x1,this.y1),r},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(r){var h=0;this.x1<=this.x2&&this.x1<=this.x3?h=this.x1-r:this.x2<=this.x1&&this.x2<=this.x3?h=this.x2-r:h=this.x3-r,this.x1-=h,this.x2-=h,this.x3-=h}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(r){var h=0;this.x1>=this.x2&&this.x1>=this.x3?h=this.x1-r:this.x2>=this.x1&&this.x2>=this.x3?h=this.x2-r:h=this.x3-r,this.x1-=h,this.x2-=h,this.x3-=h}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(r){var h=0;this.y1<=this.y2&&this.y1<=this.y3?h=this.y1-r:this.y2<=this.y1&&this.y2<=this.y3?h=this.y2-r:h=this.y3-r,this.y1-=h,this.y2-=h,this.y3-=h}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(r){var h=0;this.y1>=this.y2&&this.y1>=this.y3?h=this.y1-r:this.y2>=this.y1&&this.y2>=this.y3?h=this.y2-r:h=this.y3-r,this.y1-=h,this.y2-=h,this.y3-=h}}});c.exports=l},function(c,S){var t={};c.exports=t,function(){t.create=function(e,u){return{x:e||0,y:u||0}},t.clone=function(e){return{x:e.x,y:e.y}},t.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},t.rotate=function(e,u,o){var a=Math.cos(u),s=Math.sin(u);o||(o={});var i=e.x*a-e.y*s;return o.y=e.x*s+e.y*a,o.x=i,o},t.rotateAbout=function(e,u,o,a){var s=Math.cos(u),i=Math.sin(u);a||(a={});var n=o.x+((e.x-o.x)*s-(e.y-o.y)*i);return a.y=o.y+((e.x-o.x)*i+(e.y-o.y)*s),a.x=n,a},t.normalise=function(e){var u=t.magnitude(e);return u===0?{x:0,y:0}:{x:e.x/u,y:e.y/u}},t.dot=function(e,u){return e.x*u.x+e.y*u.y},t.cross=function(e,u){return e.x*u.y-e.y*u.x},t.cross3=function(e,u,o){return(u.x-e.x)*(o.y-e.y)-(u.y-e.y)*(o.x-e.x)},t.add=function(e,u,o){return o||(o={}),o.x=e.x+u.x,o.y=e.y+u.y,o},t.sub=function(e,u,o){return o||(o={}),o.x=e.x-u.x,o.y=e.y-u.y,o},t.mult=function(e,u){return{x:e.x*u,y:e.y*u}},t.div=function(e,u){return{x:e.x/u,y:e.y/u}},t.perp=function(e,u){return u=u===!0?-1:1,{x:u*-e.y,y:u*e.x}},t.neg=function(e){return{x:-e.x,y:-e.y}},t.angle=function(e,u){return Math.atan2(u.y-e.y,u.x-e.x)},t._temp=[t.create(),t.create(),t.create(),t.create(),t.create(),t.create()]}()},function(c,S){var t={};c.exports=t,function(){t.create=function(e){var u={min:{x:0,y:0},max:{x:0,y:0}};return e&&t.update(u,e),u},t.update=function(e,u,o){e.min.x=1/0,e.max.x=-1/0,e.min.y=1/0,e.max.y=-1/0;for(var a=0;a<u.length;a++){var s=u[a];s.x>e.max.x&&(e.max.x=s.x),s.x<e.min.x&&(e.min.x=s.x),s.y>e.max.y&&(e.max.y=s.y),s.y<e.min.y&&(e.min.y=s.y)}o&&(o.x>0?e.max.x+=o.x:e.min.x+=o.x,o.y>0?e.max.y+=o.y:e.min.y+=o.y)},t.contains=function(e,u){return u.x>=e.min.x&&u.x<=e.max.x&&u.y>=e.min.y&&u.y<=e.max.y},t.overlaps=function(e,u){return e.min.x<=u.max.x&&e.max.x>=u.min.x&&e.max.y>=u.min.y&&e.min.y<=u.max.y},t.translate=function(e,u){e.min.x+=u.x,e.max.x+=u.x,e.min.y+=u.y,e.max.y+=u.y},t.shift=function(e,u){var o=e.max.x-e.min.x,a=e.max.y-e.min.y;e.min.x=u.x,e.max.x=u.x+o,e.min.y=u.y,e.max.y=u.y+a}}()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(29),u=t(0),o=t(11),a=t(502),s=new u({Mixins:[o.Alpha,o.Flip,o.Visible],initialize:function(n,l,r,h,f,v,d,p){this.layer=n,this.index=l,this.x=r,this.y=h,this.width=f,this.height=v,this.right,this.bottom,this.baseWidth=d!==void 0?d:f,this.baseHeight=p!==void 0?p:v,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(i,n){return!(i<this.pixelX||n<this.pixelY||i>this.right||n>this.bottom)},copy:function(i){return this.index=i.index,this.alpha=i.alpha,this.properties=i.properties,this.visible=i.visible,this.setFlip(i.flipX,i.flipY),this.tint=i.tint,this.rotation=i.rotation,this.collideUp=i.collideUp,this.collideDown=i.collideDown,this.collideLeft=i.collideLeft,this.collideRight=i.collideRight,this.collisionCallback=i.collisionCallback,this.collisionCallbackContext=i.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(i){var n=this.tilemapLayer;return n?n.tileToWorldX(this.x,i):this.x*this.baseWidth},getRight:function(i){var n=this.tilemapLayer;return n?this.getLeft(i)+this.width*n.scaleX:this.getLeft(i)+this.width},getTop:function(i){var n=this.tilemapLayer;return n?n.tileToWorldY(this.y,i)-(this.height-this.baseHeight)*n.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(i){var n=this.tilemapLayer;return n?this.getTop(i)+this.height*n.scaleY:this.getTop(i)+this.height},getBounds:function(i,n){return n===void 0&&(n=new a),n.x=this.getLeft(),n.y=this.getTop(),n.width=this.getRight()-n.x,n.height=this.getBottom()-n.y,n},getCenterX:function(i){return(this.getLeft(i)+this.getRight(i))/2},getCenterY:function(i){return(this.getTop(i)+this.getBottom(i))/2},intersects:function(i,n,l,r){return!(l<=this.pixelX||r<=this.pixelY||i>=this.right||n>=this.bottom)},isInteresting:function(i,n){return i&&n?this.canCollide||this.hasInterestingFace:i?this.collides:n?this.hasInterestingFace:!1},resetCollision:function(i){if(i===void 0&&(i=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,i){var n=this.tilemapLayer;n&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(i,n,l,r,h){if(n===void 0&&(n=i),l===void 0&&(l=i),r===void 0&&(r=i),h===void 0&&(h=!0),this.collideLeft=i,this.collideRight=n,this.collideUp=l,this.collideDown=r,this.faceLeft=i,this.faceRight=n,this.faceTop=l,this.faceBottom=r,h){var f=this.tilemapLayer;f&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(i,n){return i===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=i,this.collisionCallbackContext=n),this},setSize:function(i,n,l,r){return i!==void 0&&(this.width=i),n!==void 0&&(this.height=n),l!==void 0&&(this.baseWidth=l),r!==void 0&&(this.baseHeight=r),this.updatePixelXY(),this},updatePixelXY:function(){var i=this.layer.orientation;if(i===e.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(i===e.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(i===e.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(i===e.HEXAGONAL){var n=this.layer.hexSideLength,l=(this.baseHeight-n)/2+n;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*l}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var i=this.layer.tilemapLayer;if(i){var n=i.gidMap[this.index];if(n)return n}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var i=this.tilemapLayer;return i?i.tilemap:null}}});c.exports=s},function(c,S,t){var e={};c.exports=e;var u=t(64),o=t(32),a=t(41),s=t(84),i=t(83),n=t(1393);(function(){e.rectangle=function(l,r,h,f,v){v=v||{};var d={label:"Rectangle Body",position:{x:l,y:r},vertices:u.fromPath("L 0 0 L "+h+" 0 L "+h+" "+f+" L 0 "+f)};if(v.chamfer){var p=v.chamfer;d.vertices=u.chamfer(d.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete v.chamfer}return a.create(o.extend({},d,v))},e.trapezoid=function(l,r,h,f,v,d){d=d||{},v*=.5;var p=(1-v*2)*h,g=h*v,m=g+p,x=m+g,y;v<.5?y="L 0 0 L "+g+" "+-f+" L "+m+" "+-f+" L "+x+" 0":y="L 0 0 L "+m+" "+-f+" L "+x+" 0";var T={label:"Trapezoid Body",position:{x:l,y:r},vertices:u.fromPath(y)};if(d.chamfer){var E=d.chamfer;T.vertices=u.chamfer(T.vertices,E.radius,E.quality,E.qualityMin,E.qualityMax),delete d.chamfer}return a.create(o.extend({},T,d))},e.circle=function(l,r,h,f,v){f=f||{};var d={label:"Circle Body",circleRadius:h};v=v||25;var p=Math.ceil(Math.max(10,Math.min(v,h)));return p%2==1&&(p+=1),e.polygon(l,r,p,h,o.extend({},d,f))},e.polygon=function(l,r,h,f,v){if(v=v||{},h<3)return e.circle(l,r,f,v);for(var d=2*Math.PI/h,p="",g=d*.5,m=0;m<h;m+=1){var x=g+m*d,y=Math.cos(x)*f,T=Math.sin(x)*f;p+="L "+y.toFixed(3)+" "+T.toFixed(3)+" "}var E={label:"Polygon Body",position:{x:l,y:r},vertices:u.fromPath(p)};if(v.chamfer){var C=v.chamfer;E.vertices=u.chamfer(E.vertices,C.radius,C.quality,C.qualityMin,C.qualityMax),delete v.chamfer}return a.create(o.extend({},E,v))},e.fromVertices=function(l,r,h,f,v,d,p){var g,m,x,y,T,E;for(f=f||{},m=[],v=typeof v!="undefined"?v:!1,d=typeof d!="undefined"?d:.01,p=typeof p!="undefined"?p:10,n||o.warn("Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull."),o.isArray(h[0])||(h=[h]),E=0;E<h.length;E+=1)if(y=h[E],x=u.isConvex(y),x||!n)x?y=u.clockwiseSort(y):y=u.hull(y),m.push({position:{x:l,y:r},vertices:y});else{var C=y.map(function(O){return[O.x,O.y]});n.makeCCW(C),d!==!1&&n.removeCollinearPoints(C,d);var A=n.quickDecomp(C);for(T=0;T<A.length;T++){var P=A[T],M=P.map(function(O){return{x:O[0],y:O[1]}});p>0&&u.area(M)<p||m.push({position:u.centre(M),vertices:M})}}for(T=0;T<m.length;T++)m[T]=a.create(o.extend(m[T],f));return v&&e.flagCoincidentParts(m,5),m.length>1?(g=a.create(o.extend({parts:m.slice(0)},f)),a.setPosition(g,{x:l,y:r}),g):m[0]},e.flagCoincidentParts=function(l,r){r===void 0&&(r=5);for(var h=0;h<l.length;h++)for(var f=l[h],v=h+1;v<l.length;v++){var d=l[v];if(s.overlaps(f.bounds,d.bounds))for(var p=f.vertices,g=d.vertices,m=0;m<f.vertices.length;m++)for(var x=0;x<d.vertices.length;x++){var y=i.magnitudeSquared(i.sub(p[(m+1)%p.length],g[x])),T=i.magnitudeSquared(i.sub(p[m],g[(x+1)%g.length]));y<r&&T<r&&(p[m].isInternal=!0,g[x].isInternal=!0)}}return l}})()},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.x-e.width*e.originX+e.width*.5};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.width*e.originX;return e.x=u+o-e.width*.5,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.y-e.height*e.originY+e.height*.5};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.height*e.originY;return e.y=u+o-e.height*.5,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={POST_RENDER:t(628),PRE_RENDER:t(629),RENDER:t(630),RESIZE:t(631)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline"};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(74),u=function(o,a,s,i){i===void 0&&(i=o);var n;if(!Array.isArray(a))return n=o.indexOf(a),n!==-1?(e(o,n),s&&s.call(i,a),a):null;for(var l=a.length-1,r=[];l>=0;){var h=a[l];n=o.indexOf(h),n!==-1&&(e(o,n),r.push(h),s&&s.call(i,h)),l--}return r};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(199),o=t(10),a=t(3),s=new e({initialize:function(n){this.type=n,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new a,this._tmpVec2B=new a},draw:function(i,n){return n===void 0&&(n=32),i.strokePoints(this.getPoints(n))},getBounds:function(i,n){i||(i=new o),n===void 0&&(n=16);var l=this.getLength();n>l&&(n=l/2);var r=Math.max(1,Math.round(l/n));return u(this.getSpacedPoints(r),i)},getDistancePoints:function(i){var n=this.getLength(),l=Math.max(1,n/i);return this.getSpacedPoints(l)},getEndPoint:function(i){return i===void 0&&(i=new a),this.getPointAt(1,i)},getLength:function(){var i=this.getLengths();return i[i.length-1]},getLengths:function(i){if(i===void 0&&(i=this.arcLengthDivisions),this.cacheArcLengths.length===i+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var n=[],l,r=this.getPoint(0,this._tmpVec2A),h=0;n.push(0);for(var f=1;f<=i;f++)l=this.getPoint(f/i,this._tmpVec2B),h+=l.distance(r),n.push(h),r.copy(l);return this.cacheArcLengths=n,n},getPointAt:function(i,n){var l=this.getUtoTmapping(i);return this.getPoint(l,n)},getPoints:function(i,n,l){l===void 0&&(l=[]),i||(n?i=this.getLength()/n:i=this.defaultDivisions);for(var r=0;r<=i;r++)l.push(this.getPoint(r/i));return l},getRandomPoint:function(i){return i===void 0&&(i=new a),this.getPoint(Math.random(),i)},getSpacedPoints:function(i,n,l){l===void 0&&(l=[]),i||(n?i=this.getLength()/n:i=this.defaultDivisions);for(var r=0;r<=i;r++){var h=this.getUtoTmapping(r/i,null,i);l.push(this.getPoint(h))}return l},getStartPoint:function(i){return i===void 0&&(i=new a),this.getPointAt(0,i)},getTangent:function(i,n){n===void 0&&(n=new a);var l=1e-4,r=i-l,h=i+l;return r<0&&(r=0),h>1&&(h=1),this.getPoint(r,this._tmpVec2A),this.getPoint(h,n),n.subtract(this._tmpVec2A).normalize()},getTangentAt:function(i,n){var l=this.getUtoTmapping(i);return this.getTangent(l,n)},getTFromDistance:function(i,n){return i<=0?0:this.getUtoTmapping(0,i,n)},getUtoTmapping:function(i,n,l){var r=this.getLengths(l),h=0,f=r.length,v;n?v=Math.min(n,r[f-1]):v=i*r[f-1];for(var d=0,p=f-1,g;d<=p;)if(h=Math.floor(d+(p-d)/2),g=r[h]-v,g<0)d=h+1;else if(g>0)p=h-1;else{p=h;break}if(h=p,r[h]===v)return h/(f-1);var m=r[h],x=r[h+1],y=x-m,T=(v-m)/y;return(h+T)/(f-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ADD:t(968),COMPLETE:t(969),FILE_COMPLETE:t(970),FILE_KEY_COMPLETE:t(971),FILE_LOAD_ERROR:t(972),FILE_LOAD:t(973),FILE_PROGRESS:t(974),POST_PROCESS:t(975),PROGRESS:t(976),START:t(977)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a,s){s===void 0&&(s=new e);var i=o.x1,n=o.y1,l=o.x2,r=o.y2,h=a.x1,f=a.y1,v=a.x2,d=a.y2,p=(v-h)*(n-f)-(d-f)*(i-h),g=(l-i)*(n-f)-(r-n)*(i-h),m=(d-f)*(l-i)-(v-h)*(r-n);if(m===0)return!1;var x=p/m,y=g/m;return x>=0&&x<=1&&y>=0&&y<=1?(s.x=i+x*(l-i),s.y=n+x*(r-n),!0):!1};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return Math.atan2(e.y2-e.y1,e.x2-e.x1)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=function(o,a,s){return o=e(o,0,1),(s-a)*o+a};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e&&e.hasOwnProperty(u)?e[u]:o};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(315),o=new e({initialize:function(s,i){this.parent=s,this.events=i,i||(this.events=s.events?s.events:s),this.list={},this.values={},this._frozen=!1,!s.hasOwnProperty("sys")&&this.events&&this.events.once(u.DESTROY,this.destroy,this)},get:function(a){var s=this.list;if(Array.isArray(a)){for(var i=[],n=0;n<a.length;n++)i.push(s[a[n]]);return i}else return s[a]},getAll:function(){var a={};for(var s in this.list)this.list.hasOwnProperty(s)&&(a[s]=this.list[s]);return a},query:function(a){var s={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(a)&&(s[i]=this.list[i]);return s},set:function(a,s){if(this._frozen)return this;if(typeof a=="string")return this.setValue(a,s);for(var i in a)this.setValue(i,a[i]);return this},inc:function(a,s){if(this._frozen)return this;s===void 0&&(s=1);var i=this.get(a);return i===void 0&&(i=0),this.set(a,i+s),this},toggle:function(a){return this._frozen?this:(this.set(a,!this.get(a)),this)},setValue:function(a,s){if(this._frozen)return this;if(this.has(a))this.values[a]=s;else{var i=this,n=this.list,l=this.events,r=this.parent;Object.defineProperty(this.values,a,{enumerable:!0,configurable:!0,get:function(){return n[a]},set:function(h){if(!i._frozen){var f=n[a];n[a]=h,l.emit(u.CHANGE_DATA,r,a,h,f),l.emit(u.CHANGE_DATA_KEY+a,r,h,f)}}}),n[a]=s,l.emit(u.SET_DATA,r,a,s)}return this},each:function(a,s){for(var i=[this.parent,null,void 0],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var l in this.list)i[1]=l,i[2]=this.list[l],a.apply(s,i);return this},merge:function(a,s){s===void 0&&(s=!0);for(var i in a)a.hasOwnProperty(i)&&(s||!s&&!this.has(i))&&this.setValue(i,a[i]);return this},remove:function(a){if(this._frozen)return this;if(Array.isArray(a))for(var s=0;s<a.length;s++)this.removeValue(a[s]);else return this.removeValue(a);return this},removeValue:function(a){if(this.has(a)){var s=this.list[a];delete this.list[a],delete this.values[a],this.events.emit(u.REMOVE_DATA,this.parent,a,s)}return this},pop:function(a){var s=void 0;return!this._frozen&&this.has(a)&&(s=this.list[a],delete this.list[a],delete this.values[a],this.events.emit(u.REMOVE_DATA,this.parent,a,s)),s},has:function(a){return this.list.hasOwnProperty(a)},setFreeze:function(a){return this._frozen=a,this},reset:function(){for(var a in this.list)delete this.list[a],delete this.values[a];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(u.CHANGE_DATA),this.events.off(u.SET_DATA),this.events.off(u.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(a){this._frozen=!!a}},count:{get:function(){var a=0;for(var s in this.list)this.list[s]!==void 0&&a++;return a}}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a){if(this.entries={},this.size=0,Array.isArray(a))for(var s=0;s<a.length;s++)this.set(a[s][0],a[s][1])},set:function(o,a){return this.has(o)||this.size++,this.entries[o]=a,this},get:function(o){if(this.has(o))return this.entries[o]},getArray:function(){var o=[],a=this.entries;for(var s in a)o.push(a[s]);return o},has:function(o){return this.entries.hasOwnProperty(o)},delete:function(o){return this.has(o)&&(delete this.entries[o],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(o){delete this.entries[o]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var o=[],a=this.entries;for(var s in a)o.push(a[s]);return o},dump:function(){var o=this.entries;console.group("Map");for(var a in o)console.log(a,o[a]);console.groupEnd()},each:function(o){var a=this.entries;for(var s in a)if(o(s,a[s])===!1)break;return this},contains:function(o){var a=this.entries;for(var s in a)if(a[s]===o)return!0;return!1},merge:function(o,a){a===void 0&&(a=!1);var s=this.entries,i=o.entries;for(var n in i)s.hasOwnProperty(n)&&a?s[n]=i[n]:this.set(n,i[n]);return this}});c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e<<16|u<<8|o};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ENTER_FULLSCREEN:t(800),FULLSCREEN_FAILED:t(801),FULLSCREEN_UNSUPPORTED:t(802),LEAVE_FULLSCREEN:t(803),ORIENTATION_CHANGE:t(804),RESIZE:t(805)}},function(c,S,t){(function(e){/**
* @author       Richard Davey <rich@photonstorm.com>
* @copyright    2020 Photon Storm Ltd.
* @license      {@link https://opensource.org/licenses/MIT|MIT License}
*/var u={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function o(){if(typeof importScripts=="function")return u;var a=navigator.userAgent;/Windows/.test(a)?u.windows=!0:/Mac OS/.test(a)&&!/like Mac OS/.test(a)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(u.iOS=!0,u.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),u.iOSVersion=parseInt(RegExp.$1,10)):u.macOS=!0:/Android/.test(a)?u.android=!0:/Linux/.test(a)?u.linux=!0:/iP[ao]d|iPhone/i.test(a)?(u.iOS=!0,navigator.appVersion.match(/OS (\d+)/),u.iOSVersion=parseInt(RegExp.$1,10),u.iPhone=a.toLowerCase().indexOf("iphone")!==-1,u.iPad=a.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(a)||/\bKF[A-Z][A-Z]+/.test(a)||/Silk.*Mobile Safari/.test(a)?u.kindle=!0:/CrOS/.test(a)&&(u.chromeOS=!0),(/Windows Phone/i.test(a)||/IEMobile/i.test(a))&&(u.android=!1,u.iOS=!1,u.macOS=!1,u.windows=!0,u.windowsPhone=!0);var s=/Silk/.test(a);return(u.windows||u.macOS||u.linux&&!s||u.chromeOS)&&(u.desktop=!0),(u.windowsPhone||/Windows NT/i.test(a)&&/Touch/i.test(a))&&(u.desktop=!1),navigator.standalone&&(u.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(u.cordova=!0),window.ejecta!==void 0&&(u.ejecta=!0)),typeof e!="undefined"&&e.versions&&e.versions.node&&(u.node=!0),u.node&&typeof e.versions=="object"&&(u.nodeWebkit=!!e.versions["node-webkit"],u.electron=!!e.versions.electron),/Crosswalk/.test(a)&&(u.crosswalk=!0),u.pixelRatio=window.devicePixelRatio||1,u}c.exports=o()}).call(this,t(807))},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ADD:t(861),ERROR:t(862),LOAD:t(863),READY:t(864),REMOVE:t(865)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(59),o=t(2),a=t(878),s=t(879),i=t(25),n=t(12),l=t(107),r=t(58),h=new e({Extends:r,initialize:function(v){var d=v.game.renderer,p=o(v,"fragShader",a);v.fragShader=n.parseFragmentShaderMaxTextures(p,d.maxTextures),v.vertShader=o(v,"vertShader",s),v.attributes=o(v,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:l.UNSIGNED_BYTE,normalized:!0}]),r.call(this,v),this._tempMatrix1=new i,this._tempMatrix2=new i,this._tempMatrix3=new i,this.calcMatrix=new i,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){r.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(f,v,d){this.manager.set(this,f);var p=this._tempMatrix1,g=this._tempMatrix2,m=this._tempMatrix3,x=f.frame,y=x.glTexture,T=x.u0,E=x.v0,C=x.u1,A=x.v1,P=x.x,M=x.y,O=x.cutWidth,I=x.cutHeight,N=x.customPivot,Y=f.displayOriginX,X=f.displayOriginY,W=-Y+P,H=-X+M;if(f.isCropped){var D=f._crop;(D.flipX!==f.flipX||D.flipY!==f.flipY)&&x.updateCropUVs(D,f.flipX,f.flipY),T=D.u0,E=D.v0,C=D.u1,A=D.v1,O=D.width,I=D.height,P=D.x,M=D.y,W=-Y+P,H=-X+M}var L=1,B=1;f.flipX&&(N||(W+=-x.realWidth+Y*2),L=-1),(f.flipY||x.source.isGLTexture&&!y.flipY)&&(N||(H+=-x.realHeight+X*2),B=-1),g.applyITRS(f.x,f.y,f.rotation,f.scaleX*L,f.scaleY*B),p.copyFrom(v.matrix),d?(p.multiplyWithOffset(d,-v.scrollX*f.scrollFactorX,-v.scrollY*f.scrollFactorY),g.e=f.x,g.f=f.y):(g.e-=v.scrollX*f.scrollFactorX,g.f-=v.scrollY*f.scrollFactorY),p.multiply(g,m);var G=W+O,w=H+I,z=v.roundPixels,U=m.getXRound(W,H,z),V=m.getYRound(W,H,z),Z=m.getXRound(W,w,z),$=m.getYRound(W,w,z),Q=m.getXRound(G,w,z),j=m.getYRound(G,w,z),k=m.getXRound(G,H,z),et=m.getYRound(G,H,z),_=n.getTintAppendFloatAlpha,nt=v.alpha,ut=_(f.tintTopLeft,nt*f._alphaTL),ht=_(f.tintTopRight,nt*f._alphaTR),at=_(f.tintBottomLeft,nt*f._alphaBL),tt=_(f.tintBottomRight,nt*f._alphaBR);this.shouldFlush(6)&&this.flush();var dt=this.setGameObject(f,x);this.manager.preBatch(f),this.batchQuad(f,U,V,Z,$,Q,j,k,et,T,E,C,A,ut,ht,at,tt,f.tintFill,y,dt),this.manager.postBatch(f)},batchTexture:function(f,v,d,p,g,m,x,y,T,E,C,A,P,M,O,I,N,Y,X,W,H,D,L,B,G,w,z,U,V,Z,$,Q){this.manager.set(this,f);var j=this._tempMatrix1,k=this._tempMatrix2,et=this._tempMatrix3,_=Y/d+z,nt=X/p+U,ut=(Y+W)/d+z,ht=(X+H)/p+U,at=x,tt=y,dt=-I,rt=-N;if(f.isCropped){var lt=f._crop,Pt=lt.width,At=lt.height;at=Pt,tt=At,x=Pt,y=At,Y=lt.x,X=lt.y;var gt=Y,vt=X;A&&(gt=W-lt.x-Pt),P&&(vt=H-lt.y-At),_=gt/d+z,nt=vt/p+U,ut=(gt+Pt)/d+z,ht=(vt+At)/p+U,dt=-I+Y,rt=-N+X}P=P^(!$&&v.isRenderTexture?1:0),A&&(at*=-1,dt+=x),P&&(tt*=-1,rt+=y);var Tt=dt+at,xt=rt+tt;k.applyITRS(g,m,C,T,E),j.copyFrom(V.matrix),Z?(j.multiplyWithOffset(Z,-V.scrollX*M,-V.scrollY*O),k.e=g,k.f=m):(k.e-=V.scrollX*M,k.f-=V.scrollY*O),j.multiply(k,et);var mt=V.roundPixels,yt=et.getXRound(dt,rt,mt),Ft=et.getYRound(dt,rt,mt),K=et.getXRound(dt,xt,mt),J=et.getYRound(dt,xt,mt),q=et.getXRound(Tt,xt,mt),b=et.getYRound(Tt,xt,mt),it=et.getXRound(Tt,rt,mt),ot=et.getYRound(Tt,rt,mt);Q===void 0&&(Q=this.renderer.setTexture2D(v)),f&&this.manager.preBatch(f),this.batchQuad(f,yt,Ft,K,J,q,b,it,ot,_,nt,ut,ht,D,L,B,G,w,v,Q),f&&this.manager.postBatch(f)},batchTextureFrame:function(f,v,d,p,g,m,x){this.manager.set(this);var y=this._tempMatrix1.copyFrom(m),T=this._tempMatrix2,E=v+f.width,C=d+f.height;x?y.multiply(x,T):T=y;var A=T.getX(v,d),P=T.getY(v,d),M=T.getX(v,C),O=T.getY(v,C),I=T.getX(E,C),N=T.getY(E,C),Y=T.getX(E,d),X=T.getY(E,d),W=this.renderer.setTextureSource(f.source);p=n.getTintAppendFloatAlpha(p,g),this.batchQuad(null,A,P,M,O,I,N,Y,X,f.u0,f.v0,f.u1,f.v1,p,p,p,p,0,f.glTexture,W)},batchFillRect:function(f,v,d,p,g,m){this.renderer.pipelines.set(this);var x=this.calcMatrix;m&&m.multiply(g,x);var y=f+d,T=v+p,E=x.getX(f,v),C=x.getY(f,v),A=x.getX(f,T),P=x.getY(f,T),M=x.getX(y,T),O=x.getY(y,T),I=x.getX(y,v),N=x.getY(y,v),Y=this.fillTint;this.batchQuad(null,E,C,A,P,M,O,I,N,0,0,1,1,Y.TL,Y.TR,Y.BL,Y.BR,2)},batchFillTriangle:function(f,v,d,p,g,m,x,y){this.renderer.pipelines.set(this);var T=this.calcMatrix;y&&y.multiply(x,T);var E=T.getX(f,v),C=T.getY(f,v),A=T.getX(d,p),P=T.getY(d,p),M=T.getX(g,m),O=T.getY(g,m),I=this.fillTint;this.batchTri(null,E,C,A,P,M,O,0,0,1,1,I.TL,I.TR,I.BL,2)},batchStrokeTriangle:function(f,v,d,p,g,m,x,y,T){var E=this.tempTriangle;E[0].x=f,E[0].y=v,E[0].width=x,E[1].x=d,E[1].y=p,E[1].width=x,E[2].x=g,E[2].y=m,E[2].width=x,E[3].x=f,E[3].y=v,E[3].width=x,this.batchStrokePath(E,x,!1,y,T)},batchFillPath:function(f,v,d){this.renderer.pipelines.set(this);var p=this.calcMatrix;d&&d.multiply(v,p);for(var g=f.length,m=this.polygonCache,x,y,T=this.fillTint.TL,E=this.fillTint.TR,C=this.fillTint.BL,A=0;A<g;++A)y=f[A],m.push(y.x,y.y);x=u(m),g=x.length;for(var P=0;P<g;P+=3){var M=x[P+0]*2,O=x[P+1]*2,I=x[P+2]*2,N=m[M+0],Y=m[M+1],X=m[O+0],W=m[O+1],H=m[I+0],D=m[I+1],L=p.getX(N,Y),B=p.getY(N,Y),G=p.getX(X,W),w=p.getY(X,W),z=p.getX(H,D),U=p.getY(H,D);this.batchTri(null,L,B,G,w,z,U,0,0,1,1,T,E,C,2)}m.length=0},batchStrokePath:function(f,v,d,p,g){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var m=f.length-1,x=0;x<m;x++){var y=f[x],T=f[x+1];this.batchLine(y.x,y.y,T.x,T.y,y.width/2,T.width/2,v,x,!d&&x===m-1,p,g)}},batchLine:function(f,v,d,p,g,m,x,y,T,E,C){this.renderer.pipelines.set(this);var A=this.calcMatrix;C&&C.multiply(E,A);var P=d-f,M=p-v,O=Math.sqrt(P*P+M*M),I=g*(p-v)/O,N=g*(f-d)/O,Y=m*(p-v)/O,X=m*(f-d)/O,W=d-Y,H=p-X,D=f-I,L=v-N,B=d+Y,G=p+X,w=f+I,z=v+N,U=A.getX(W,H),V=A.getY(W,H),Z=A.getX(D,L),$=A.getY(D,L),Q=A.getX(B,G),j=A.getY(B,G),k=A.getX(w,z),et=A.getY(w,z),_=this.strokeTint,nt=_.TL,ut=_.TR,ht=_.BL,at=_.BR;if(this.batchQuad(null,k,et,Z,$,U,V,Q,j,0,0,1,1,nt,ut,ht,at,2),!(x<=2)){var tt=this.prevQuad,dt=this.firstQuad;y>0&&tt[4]?this.batchQuad(null,k,et,Z,$,tt[0],tt[1],tt[2],tt[3],0,0,1,1,nt,ut,ht,at,2):(dt[0]=k,dt[1]=et,dt[2]=Z,dt[3]=$,dt[4]=1),T&&dt[4]?this.batchQuad(null,U,V,Q,j,dt[0],dt[1],dt[2],dt[3],0,0,1,1,nt,ut,ht,at,2):(tt[0]=U,tt[1]=V,tt[2]=Q,tt[3]=j,tt[4]=1)}}});c.exports=h},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(18),o=t(17),a=new e({initialize:function(i,n,l,r,h,f,v){this.texture=i,this.name=n,this.source=i.source[l],this.sourceIndex=l,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(f,v,r,h)},setSize:function(s,i,n,l){n===void 0&&(n=0),l===void 0&&(l=0),this.cutX=n,this.cutY=l,this.cutWidth=s,this.cutHeight=i,this.width=s,this.height=i,this.halfWidth=Math.floor(s*.5),this.halfHeight=Math.floor(i*.5),this.centerX=Math.floor(s/2),this.centerY=Math.floor(i/2);var r=this.data,h=r.cut;h.x=n,h.y=l,h.w=s,h.h=i,h.r=n+s,h.b=l+i,r.sourceSize.w=s,r.sourceSize.h=i,r.spriteSourceSize.w=s,r.spriteSourceSize.h=i,r.radius=.5*Math.sqrt(s*s+i*i);var f=r.drawImage;return f.x=n,f.y=l,f.width=s,f.height=i,this.updateUVs()},setTrim:function(s,i,n,l,r,h){var f=this.data,v=f.spriteSourceSize;return f.trim=!0,f.sourceSize.w=s,f.sourceSize.h=i,v.x=n,v.y=l,v.w=r,v.h=h,v.r=n+r,v.b=l+h,this.x=n,this.y=l,this.width=r,this.height=h,this.halfWidth=r*.5,this.halfHeight=h*.5,this.centerX=Math.floor(r/2),this.centerY=Math.floor(h/2),this.updateUVs()},setCropUVs:function(s,i,n,l,r,h,f){var v=this.cutX,d=this.cutY,p=this.cutWidth,g=this.cutHeight,m=this.realWidth,x=this.realHeight;i=u(i,0,m),n=u(n,0,x),l=u(l,0,m-i),r=u(r,0,x-n);var y=v+i,T=d+n,E=l,C=r,A=this.data;if(A.trim){var P=A.spriteSourceSize;l=u(l,0,p-i),r=u(r,0,g-n);var M=i+l,O=n+r,I=!(P.r<i||P.b<n||P.x>M||P.y>O);if(I){var N=Math.max(P.x,i),Y=Math.max(P.y,n),X=Math.min(P.r,M)-N,W=Math.min(P.b,O)-Y;E=X,C=W,h?y=v+(p-(N-P.x)-X):y=v+(N-P.x),f?T=d+(g-(Y-P.y)-W):T=d+(Y-P.y),i=N,n=Y,l=X,r=W}else y=0,T=0,E=0,C=0}else h&&(y=v+(p-i-l)),f&&(T=d+(g-n-r));var H=this.source.width,D=this.source.height;return s.u0=Math.max(0,y/H),s.v0=Math.max(0,T/D),s.u1=Math.min(1,(y+E)/H),s.v1=Math.min(1,(T+C)/D),s.x=i,s.y=n,s.cx=y,s.cy=T,s.cw=E,s.ch=C,s.width=l,s.height=r,s.flipX=h,s.flipY=f,s},updateCropUVs:function(s,i,n){return this.setCropUVs(s,s.x,s.y,s.width,s.height,i,n)},setUVs:function(s,i,n,l,r,h){var f=this.data.drawImage;return f.width=s,f.height=i,this.u0=n,this.v0=l,this.u1=r,this.v1=h,this},updateUVs:function(){var s=this.cutX,i=this.cutY,n=this.cutWidth,l=this.cutHeight,r=this.data.drawImage;r.width=n,r.height=l;var h=this.source.width,f=this.source.height;return this.u0=s/h,this.v0=i/f,this.u1=(s+n)/h,this.v1=(i+l)/f,this},updateUVsInverted:function(){var s=this.source.width,i=this.source.height;return this.u0=(this.cutX+this.cutHeight)/s,this.v0=this.cutY/i,this.u1=this.cutX/s,this.v1=(this.cutY+this.cutWidth)/i,this},clone:function(){var s=new a(this.texture,this.name,this.sourceIndex);return s.cutX=this.cutX,s.cutY=this.cutY,s.cutWidth=this.cutWidth,s.cutHeight=this.cutHeight,s.x=this.x,s.y=this.y,s.width=this.width,s.height=this.height,s.halfWidth=this.halfWidth,s.halfHeight=this.halfHeight,s.centerX=this.centerX,s.centerY=this.centerY,s.rotated=this.rotated,s.data=o(!0,s.data,this.data),s.updateUVs(),s},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(208),u=t(0),o=t(1),a=t(79),s=new u({initialize:function(n){this.parent=n,this.list=[],this.position=0,this.addCallback=o,this.removeCallback=o,this._sortKey=""},add:function(i,n){return n?e.Add(this.list,i):e.Add(this.list,i,0,this.addCallback,this)},addAt:function(i,n,l){return l?e.AddAt(this.list,i,n):e.AddAt(this.list,i,n,0,this.addCallback,this)},getAt:function(i){return this.list[i]},getIndex:function(i){return this.list.indexOf(i)},sort:function(i,n){return i?(n===void 0&&(n=function(l,r){return l[i]-r[i]}),a(this.list,n),this):this},getByName:function(i){return e.GetFirst(this.list,"name",i)},getRandom:function(i,n){return e.GetRandom(this.list,i,n)},getFirst:function(i,n,l,r){return e.GetFirst(this.list,i,n,l,r)},getAll:function(i,n,l,r){return e.GetAll(this.list,i,n,l,r)},count:function(i,n){return e.CountAllMatching(this.list,i,n)},swap:function(i,n){e.Swap(this.list,i,n)},moveTo:function(i,n){return e.MoveTo(this.list,i,n)},moveAbove:function(i,n){return e.MoveAbove(this.list,i,n)},moveBelow:function(i,n){return e.MoveBelow(this.list,i,n)},remove:function(i,n){return n?e.Remove(this.list,i):e.Remove(this.list,i,this.removeCallback,this)},removeAt:function(i,n){return n?e.RemoveAt(this.list,i):e.RemoveAt(this.list,i,this.removeCallback,this)},removeBetween:function(i,n,l){return l?e.RemoveBetween(this.list,i,n):e.RemoveBetween(this.list,i,n,this.removeCallback,this)},removeAll:function(i){for(var n=this.list.length;n--;)this.remove(this.list[n],i);return this},bringToTop:function(i){return e.BringToTop(this.list,i)},sendToBack:function(i){return e.SendToBack(this.list,i)},moveUp:function(i){return e.MoveUp(this.list,i),i},moveDown:function(i){return e.MoveDown(this.list,i),i},reverse:function(){return this.list.reverse(),this},shuffle:function(){return e.Shuffle(this.list),this},replace:function(i,n){return e.Replace(this.list,i,n)},exists:function(i){return this.list.indexOf(i)>-1},setAll:function(i,n,l,r){return e.SetAll(this.list,i,n,l,r),this},each:function(i,n){for(var l=[null],r=2;r<arguments.length;r++)l.push(arguments[r]);for(r=0;r<this.list.length;r++)l[0]=this.list[r],i.apply(n,l)},shutdown:function(){this.removeAll(),this.list=[]},destroy:function(){this.removeAll(),this.parent=null,this.addCallback=null,this.removeCallback=null},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(112),o=t(445),a=t(446),s=t(56),i=t(180),n=new e({initialize:function(r,h,f,v){r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),this.type=s.ELLIPSE,this.x=r,this.y=h,this.width=f,this.height=v},contains:function(l,r){return u(this,l,r)},getPoint:function(l,r){return o(this,l,r)},getPoints:function(l,r,h){return a(this,l,r,h)},getRandomPoint:function(l){return i(this,l)},setTo:function(l,r,h,f){return this.x=l,this.y=r,this.width=h,this.height=f,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(l,r){return r===void 0&&(r=l),this.x=l,this.y=r,this},setSize:function(l,r){return r===void 0&&(r=l),this.width=l,this.height=r,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(l){this.x=l+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(l){this.x=l-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(l){this.y=l+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(l){this.y=l-this.height/2}}});c.exports=n},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(e.width<=0||e.height<=0)return!1;var a=(u-e.x)/e.width,s=(o-e.y)/e.height;return a*=a,s*=s,a+s<.25};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(275),u=t(0),o=t(75),a=t(9),s=t(207),i=t(2),n=t(6),l=t(7),r=t(437),h=t(149),f=t(73),v=new u({Extends:a,initialize:function(p,g,m){a.call(this),m?g&&!Array.isArray(g)&&(g=[g]):Array.isArray(g)?l(g[0])&&(m=g,g=null):l(g)&&(m=g,g=null),this.scene=p,this.children=new h,this.isParent=!0,this.type="Group",this.classType=i(m,"classType",f),this.name=i(m,"name",""),this.active=i(m,"active",!0),this.maxSize=i(m,"maxSize",-1),this.defaultKey=i(m,"defaultKey",null),this.defaultFrame=i(m,"defaultFrame",null),this.runChildUpdate=i(m,"runChildUpdate",!1),this.createCallback=i(m,"createCallback",null),this.removeCallback=i(m,"removeCallback",null),this.createMultipleCallback=i(m,"createMultipleCallback",null),this.internalCreateCallback=i(m,"internalCreateCallback",null),this.internalRemoveCallback=i(m,"internalRemoveCallback",null),g&&this.addMultiple(g),m&&this.createMultiple(m),this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(d,p,g,m,x,y){if(d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=this.defaultKey),m===void 0&&(m=this.defaultFrame),x===void 0&&(x=!0),y===void 0&&(y=!0),this.isFull())return null;var T=new this.classType(this.scene,d,p,g,m);return T.addToDisplayList(this.scene.sys.displayList),T.addToUpdateList(),T.visible=x,T.setActive(y),this.add(T),T},createMultiple:function(d){if(this.isFull())return[];Array.isArray(d)||(d=[d]);var p=[];if(d[0].key)for(var g=0;g<d.length;g++){var m=this.createFromConfig(d[g]);p=p.concat(m)}return p},createFromConfig:function(d){if(this.isFull())return[];this.classType=i(d,"classType",this.classType);var p=i(d,"key",void 0),g=i(d,"frame",null),m=i(d,"visible",!0),x=i(d,"active",!0),y=[];if(p===void 0)return y;Array.isArray(p)||(p=[p]),Array.isArray(g)||(g=[g]);var T=i(d,"repeat",0),E=i(d,"randomKey",!1),C=i(d,"randomFrame",!1),A=i(d,"yoyo",!1),P=i(d,"quantity",!1),M=i(d,"frameQuantity",1),O=i(d,"max",0),I=r(p,g,{max:O,qty:P||M,random:E,randomB:C,repeat:T,yoyo:A});d.createCallback&&(this.createCallback=d.createCallback),d.removeCallback&&(this.removeCallback=d.removeCallback);for(var N=0;N<I.length;N++){var Y=this.create(0,0,I[N].a,I[N].b,m,x);if(!Y)break;y.push(Y)}var X=n(d,"setXY.x",0),W=n(d,"setXY.y",0),H=n(d,"setXY.stepX",0),D=n(d,"setXY.stepY",0);e.SetXY(y,X,W,H,D);var L=n(d,"setRotation.value",0),B=n(d,"setRotation.step",0);e.SetRotation(y,L,B);var G=n(d,"setScale.x",1),w=n(d,"setScale.y",G),z=n(d,"setScale.stepX",0),U=n(d,"setScale.stepY",0);e.SetScale(y,G,w,z,U);var V=n(d,"setOrigin.x",.5),Z=n(d,"setOrigin.y",V),$=n(d,"setOrigin.stepX",0),Q=n(d,"setOrigin.stepY",0);e.SetOrigin(y,V,Z,$,Q);var j=n(d,"setAlpha.value",1),k=n(d,"setAlpha.step",0);e.SetAlpha(y,j,k);var et=n(d,"setDepth.value",0),_=n(d,"setDepth.step",0);e.SetDepth(y,et,_);var nt=n(d,"setScrollFactor.x",1),ut=n(d,"setScrollFactor.y",nt),ht=n(d,"setScrollFactor.stepX",0),at=n(d,"setScrollFactor.stepY",0);e.SetScrollFactor(y,nt,ut,ht,at);var tt=i(d,"hitArea",null),dt=i(d,"hitAreaCallback",null);tt&&e.SetHitArea(y,tt,dt);var rt=i(d,"gridAlign",!1);return rt&&e.GridAlign(y,rt),this.createMultipleCallback&&this.createMultipleCallback.call(this,y),y},preUpdate:function(d,p){if(!(!this.runChildUpdate||this.children.size===0))for(var g=this.children.entries.slice(),m=0;m<g.length;m++){var x=g[m];x.active&&x.update(d,p)}},add:function(d,p){return p===void 0&&(p=!1),this.isFull()?this:(this.children.set(d),this.internalCreateCallback&&this.internalCreateCallback.call(this,d),this.createCallback&&this.createCallback.call(this,d),p&&(d.addToDisplayList(this.scene.sys.displayList),d.addToUpdateList()),d.on(o.DESTROY,this.remove,this),this)},addMultiple:function(d,p){if(p===void 0&&(p=!1),Array.isArray(d))for(var g=0;g<d.length;g++)this.add(d[g],p);return this},remove:function(d,p,g){return p===void 0&&(p=!1),g===void 0&&(g=!1),this.children.contains(d)?(this.children.delete(d),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,d),this.removeCallback&&this.removeCallback.call(this,d),d.off(o.DESTROY,this.remove,this),g?d.destroy():p&&(d.removeFromDisplayList(),d.removeFromUpdateList()),this):this},clear:function(d,p){d===void 0&&(d=!1),p===void 0&&(p=!1);for(var g=this.children,m=0;m<g.size;m++){var x=g.entries[m];x.off(o.DESTROY,this.remove,this),p?x.destroy():d&&(x.removeFromDisplayList(),x.removeFromUpdateList())}return this.children.clear(),this},contains:function(d){return this.children.contains(d)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(d,p,g,m){return s(this.children.entries,d,p,g,m)},getFirst:function(d,p,g,m,x,y,T){return this.getHandler(!0,1,d,p,g,m,x,y,T)},getFirstNth:function(d,p,g,m,x,y,T,E){return this.getHandler(!0,d,p,g,m,x,y,T,E)},getLast:function(d,p,g,m,x,y,T){return this.getHandler(!1,1,d,p,g,m,x,y,T)},getLastNth:function(d,p,g,m,x,y,T,E){return this.getHandler(!1,d,p,g,m,x,y,T,E)},getHandler:function(d,p,g,m,x,y,T,E,C){g===void 0&&(g=!1),m===void 0&&(m=!1);var A,P,M=0,O=this.children.entries;if(d)for(P=0;P<O.length;P++)if(A=O[P],A.active===g){if(M++,M===p)break}else A=null;else for(P=O.length-1;P>=0;P--)if(A=O[P],A.active===g){if(M++,M===p)break}else A=null;return A?(typeof x=="number"&&(A.x=x),typeof y=="number"&&(A.y=y),A):m?this.create(x,y,T,E,C):null},get:function(d,p,g,m,x){return this.getFirst(!1,!0,d,p,g,m,x)},getFirstAlive:function(d,p,g,m,x,y){return this.getFirst(!0,d,p,g,m,x,y)},getFirstDead:function(d,p,g,m,x,y){return this.getFirst(!1,d,p,g,m,x,y)},playAnimation:function(d,p){return e.PlayAnimation(this.children.entries,d,p),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(d){d===void 0&&(d=!0);for(var p=0,g=0;g<this.children.size;g++)this.children.entries[g].active===d&&p++;return p},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var d=this.getTotalUsed(),p=this.maxSize===-1?999999999999:this.maxSize;return p-d},setActive:function(d){return this.active=d,this},setName:function(d){return this.name=d,this},propertyValueSet:function(d,p,g,m,x){return e.PropertyValueSet(this.children.entries,d,p,g,m,x),this},propertyValueInc:function(d,p,g,m,x){return e.PropertyValueInc(this.children.entries,d,p,g,m,x),this},setX:function(d,p){return e.SetX(this.children.entries,d,p),this},setY:function(d,p){return e.SetY(this.children.entries,d,p),this},setXY:function(d,p,g,m){return e.SetXY(this.children.entries,d,p,g,m),this},incX:function(d,p){return e.IncX(this.children.entries,d,p),this},incY:function(d,p){return e.IncY(this.children.entries,d,p),this},incXY:function(d,p,g,m){return e.IncXY(this.children.entries,d,p,g,m),this},shiftPosition:function(d,p,g){return e.ShiftPosition(this.children.entries,d,p,g),this},angle:function(d,p){return e.Angle(this.children.entries,d,p),this},rotate:function(d,p){return e.Rotate(this.children.entries,d,p),this},rotateAround:function(d,p){return e.RotateAround(this.children.entries,d,p),this},rotateAroundDistance:function(d,p,g){return e.RotateAroundDistance(this.children.entries,d,p,g),this},setAlpha:function(d,p){return e.SetAlpha(this.children.entries,d,p),this},setTint:function(d,p,g,m){return e.SetTint(this.children.entries,d,p,g,m),this},setOrigin:function(d,p,g,m){return e.SetOrigin(this.children.entries,d,p,g,m),this},scaleX:function(d,p){return e.ScaleX(this.children.entries,d,p),this},scaleY:function(d,p){return e.ScaleY(this.children.entries,d,p),this},scaleXY:function(d,p,g,m){return e.ScaleXY(this.children.entries,d,p,g,m),this},setDepth:function(d,p){return e.SetDepth(this.children.entries,d,p),this},setBlendMode:function(d){return e.SetBlendMode(this.children.entries,d),this},setHitArea:function(d,p){return e.SetHitArea(this.children.entries,d,p),this},shuffle:function(){return e.Shuffle(this.children.entries),this},kill:function(d){this.children.contains(d)&&d.setActive(!1)},killAndHide:function(d){this.children.contains(d)&&(d.setActive(!1),d.setVisible(!1))},setVisible:function(d,p,g){return e.SetVisible(this.children.entries,d,p,g),this},toggleVisible:function(){return e.ToggleVisible(this.children.entries),this},destroy:function(d,p){d===void 0&&(d=!1),p===void 0&&(p=!1),!(!this.scene||this.ignoreDestroy)&&(this.emit(o.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(p,d),this.scene=void 0,this.children=void 0)}});c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(12),u=function(o,a,s,i,n,l){for(var r=e.getTintAppendFloatAlpha(s.fillColor,s.fillAlpha*i),h=s.pathData,f=s.pathIndexes,v=0;v<f.length;v+=3){var d=f[v]*2,p=f[v+1]*2,g=f[v+2]*2,m=h[d+0]-n,x=h[d+1]-l,y=h[p+0]-n,T=h[p+1]-l,E=h[g+0]-n,C=h[g+1]-l,A=a.getX(m,x),P=a.getY(m,x),M=a.getX(y,T),O=a.getY(y,T),I=a.getX(E,C),N=a.getY(E,C);o.batchTri(s,A,P,M,O,I,N,0,0,1,1,r,r,r,2)}};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=e.x3-e.x1,s=e.y3-e.y1,i=e.x2-e.x1,n=e.y2-e.y1,l=u-e.x1,r=o-e.y1,h=a*a+s*s,f=a*i+s*n,v=a*l+s*r,d=i*i+n*n,p=i*l+n*r,g=h*d-f*f,m=g===0?0:1/g,x=(d*v-f*p)*m,y=(h*p-f*v)*m;return x>=0&&y>=0&&x+y<1};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(10),o=t(3);function a(i,n,l,r){var h=i-l,f=n-r,v=h*h+f*f;return Math.sqrt(v)}var s=new e({initialize:function(n,l,r){this.vertex1=n,this.vertex2=l,this.vertex3=r,this.bounds=new u,this._inCenter=new o},getInCenter:function(i){i===void 0&&(i=!0);var n=this.vertex1,l=this.vertex2,r=this.vertex3,h,f,v,d,p,g;i?(h=n.x,f=n.y,v=l.x,d=l.y,p=r.x,g=r.y):(h=n.vx,f=n.vy,v=l.vx,d=l.vy,p=r.vx,g=r.vy);var m=a(p,g,v,d),x=a(h,f,p,g),y=a(v,d,h,f),T=m+x+y;return this._inCenter.set((h*m+v*x+p*y)/T,(f*m+d*x+g*y)/T)},contains:function(i,n,l){var r=this.vertex1,h=this.vertex2,f=this.vertex3,v=r.vx,d=r.vy,p=h.vx,g=h.vy,m=f.vx,x=f.vy;if(l){var y=l.a,T=l.b,E=l.c,C=l.d,A=l.e,P=l.f;v=r.vx*y+r.vy*E+A,d=r.vx*T+r.vy*C+P,p=h.vx*y+h.vy*E+A,g=h.vx*T+h.vy*C+P,m=f.vx*y+f.vy*E+A,x=f.vx*T+f.vy*C+P}var M=m-v,O=x-d,I=p-v,N=g-d,Y=i-v,X=n-d,W=M*M+O*O,H=M*I+O*N,D=M*Y+O*X,L=I*I+N*N,B=I*Y+N*X,G=W*L-H*H,w=G===0?0:1/G,z=(L*D-H*B)*w,U=(W*B-H*D)*w;return z>=0&&U>=0&&z+U<1},isCounterClockwise:function(i){var n=this.vertex1,l=this.vertex2,r=this.vertex3,h=(l.vx-n.vx)*(r.vy-n.vy)-(l.vy-n.vy)*(r.vx-n.vx);return i<=0?h>=0:h<0},load:function(i,n,l,r,h){return l=this.vertex1.load(i,n,l,r,h),l=this.vertex2.load(i,n,l,r,h),l=this.vertex3.load(i,n,l,r,h),l},transformCoordinatesLocal:function(i,n,l,r){return this.vertex1.transformCoordinatesLocal(i,n,l,r),this.vertex2.transformCoordinatesLocal(i,n,l,r),this.vertex3.transformCoordinatesLocal(i,n,l,r),this},updateBounds:function(){var i=this.vertex1,n=this.vertex2,l=this.vertex3,r=this.bounds;return r.x=Math.min(i.vx,n.vx,l.vx),r.y=Math.min(i.vy,n.vy,l.vy),r.width=Math.max(i.vx,n.vx,l.vx)-r.x,r.height=Math.max(i.vy,n.vy,l.vy)-r.y,this},isInView:function(i,n,l,r,h,f,v,d,p,g,m){var x=this.vertex1.update(h,f,v,d,p,g,m,r),y=this.vertex2.update(h,f,v,d,p,g,m,r),T=this.vertex3.update(h,f,v,d,p,g,m,r);if(x.ta<=0&&y.ta<=0&&T.ta<=0||n&&!this.isCounterClockwise(l))return!1;var E=this.bounds;E.x=Math.min(x.tx,y.tx,T.tx),E.y=Math.min(x.ty,y.ty,T.ty),E.width=Math.max(x.tx,y.tx,T.tx)-E.x,E.height=Math.max(x.ty,y.ty,T.ty)-E.y;var C=i.x+i.width,A=i.y+i.height;return E.width<=0||E.height<=0||i.width<=0||i.height<=0?!1:!(E.right<i.x||E.bottom<i.y||E.x>C||E.y>A)},translate:function(i,n){n===void 0&&(n=0);var l=this.vertex1,r=this.vertex2,h=this.vertex3;return l.x+=i,l.y+=n,r.x+=i,r.y+=n,h.x+=i,h.y+=n,this},x:{get:function(){return this.getInCenter().x},set:function(i){var n=this.getInCenter();this.translate(i-n.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(i){var n=this.getInCenter();this.translate(0,i-n.y)}},alpha:{get:function(){var i=this.vertex1,n=this.vertex2,l=this.vertex3;return(i.alpha+n.alpha+l.alpha)/3},set:function(i){this.vertex1.alpha=i,this.vertex2.alpha=i,this.vertex3.alpha=i}},depth:{get:function(){var i=this.vertex1,n=this.vertex2,l=this.vertex3;return(i.vz+n.vz+l.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(12),o=t(39),a=new e({Extends:o,initialize:function(i,n,l,r,h,f,v,d,p,g){f===void 0&&(f=16777215),v===void 0&&(v=1),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),o.call(this,i,n,l),this.vx=0,this.vy=0,this.vz=0,this.nx=d,this.ny=p,this.nz=g,this.u=r,this.v=h,this.color=f,this.alpha=v,this.tx=0,this.ty=0,this.ta=0},setUVs:function(s,i){return this.u=s,this.v=i,this},transformCoordinatesLocal:function(s,i,n,l){var r=this.x,h=this.y,f=this.z,v=s.val,d=r*v[0]+h*v[4]+f*v[8]+v[12],p=r*v[1]+h*v[5]+f*v[9]+v[13],g=r*v[2]+h*v[6]+f*v[10]+v[14],m=r*v[3]+h*v[7]+f*v[11]+v[15];this.vx=d/m*i,this.vy=-(p/m)*n,l<=0?this.vz=g/m:this.vz=-(g/m)},update:function(s,i,n,l,r,h,f,v){var d=this.vx*s+this.vy*n+r,p=this.vx*i+this.vy*l+h;return f&&(d=Math.round(d),p=Math.round(p)),this.tx=d,this.ty=p,this.ta=this.alpha*v,this},load:function(s,i,n,l,r){return s[++n]=this.tx,s[++n]=this.ty,s[++n]=this.u,s[++n]=this.v,s[++n]=l,s[++n]=r,i[++n]=u.getTintAppendFloatAlpha(this.color,this.ta),n}});c.exports=a},function(c,S,t){var e={};c.exports=e;var u=t(166),o=t(32),a=t(84),s=t(41);(function(){e.create=function(i){return o.extend({id:o.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},i)},e.setModified=function(i,n,l,r){if(u.trigger(i,"compositeModified",i),i.isModified=n,l&&i.parent&&e.setModified(i.parent,n,l,r),r)for(var h=0;h<i.composites.length;h++){var f=i.composites[h];e.setModified(f,n,l,r)}},e.add=function(i,n){var l=[].concat(n);u.trigger(i,"beforeAdd",{object:n});for(var r=0;r<l.length;r++){var h=l[r];switch(h.type){case"body":if(h.parent!==h){o.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}e.addBody(i,h);break;case"constraint":e.addConstraint(i,h);break;case"composite":e.addComposite(i,h);break;case"mouseConstraint":e.addConstraint(i,h.constraint);break}}return u.trigger(i,"afterAdd",{object:n}),i},e.remove=function(i,n,l){var r=[].concat(n);u.trigger(i,"beforeRemove",{object:n});for(var h=0;h<r.length;h++){var f=r[h];switch(f.type){case"body":e.removeBody(i,f,l);break;case"constraint":e.removeConstraint(i,f,l);break;case"composite":e.removeComposite(i,f,l);break;case"mouseConstraint":e.removeConstraint(i,f.constraint);break}}return u.trigger(i,"afterRemove",{object:n}),i},e.addComposite=function(i,n){return i.composites.push(n),n.parent=i,e.setModified(i,!0,!0,!1),i},e.removeComposite=function(i,n,l){var r=i.composites.indexOf(n);if(r!==-1&&(e.removeCompositeAt(i,r),e.setModified(i,!0,!0,!1)),l)for(var h=0;h<i.composites.length;h++)e.removeComposite(i.composites[h],n,!0);return i},e.removeCompositeAt=function(i,n){return i.composites.splice(n,1),e.setModified(i,!0,!0,!1),i},e.addBody=function(i,n){return i.bodies.push(n),e.setModified(i,!0,!0,!1),i},e.removeBody=function(i,n,l){var r=i.bodies.indexOf(n);if(r!==-1&&(e.removeBodyAt(i,r),e.setModified(i,!0,!0,!1)),l)for(var h=0;h<i.composites.length;h++)e.removeBody(i.composites[h],n,!0);return i},e.removeBodyAt=function(i,n){return i.bodies.splice(n,1),e.setModified(i,!0,!0,!1),i},e.addConstraint=function(i,n){return i.constraints.push(n),e.setModified(i,!0,!0,!1),i},e.removeConstraint=function(i,n,l){var r=i.constraints.indexOf(n);if(r!==-1&&e.removeConstraintAt(i,r),l)for(var h=0;h<i.composites.length;h++)e.removeConstraint(i.composites[h],n,!0);return i},e.removeConstraintAt=function(i,n){return i.constraints.splice(n,1),e.setModified(i,!0,!0,!1),i},e.clear=function(i,n,l){if(l)for(var r=0;r<i.composites.length;r++)e.clear(i.composites[r],n,!0);return n?i.bodies=i.bodies.filter(function(h){return h.isStatic}):i.bodies.length=0,i.constraints.length=0,i.composites.length=0,e.setModified(i,!0,!0,!1),i},e.allBodies=function(i){for(var n=[].concat(i.bodies),l=0;l<i.composites.length;l++)n=n.concat(e.allBodies(i.composites[l]));return n},e.allConstraints=function(i){for(var n=[].concat(i.constraints),l=0;l<i.composites.length;l++)n=n.concat(e.allConstraints(i.composites[l]));return n},e.allComposites=function(i){for(var n=[].concat(i.composites),l=0;l<i.composites.length;l++)n=n.concat(e.allComposites(i.composites[l]));return n},e.get=function(i,n,l){var r,h;switch(l){case"body":r=e.allBodies(i);break;case"constraint":r=e.allConstraints(i);break;case"composite":r=e.allComposites(i).concat(i);break}return r?(h=r.filter(function(f){return f.id.toString()===n.toString()}),h.length===0?null:h[0]):null},e.move=function(i,n,l){return e.remove(i,n),e.add(l,n),i},e.rebase=function(i){for(var n=e.allBodies(i).concat(e.allConstraints(i)).concat(e.allComposites(i)),l=0;l<n.length;l++)n[l].id=o.nextId();return e.setModified(i,!0,!0,!1),i},e.translate=function(i,n,l){for(var r=l?e.allBodies(i):i.bodies,h=0;h<r.length;h++)s.translate(r[h],n);return e.setModified(i,!0,!0,!1),i},e.rotate=function(i,n,l,r){for(var h=Math.cos(n),f=Math.sin(n),v=r?e.allBodies(i):i.bodies,d=0;d<v.length;d++){var p=v[d],g=p.position.x-l.x,m=p.position.y-l.y;s.setPosition(p,{x:l.x+(g*h-m*f),y:l.y+(g*f+m*h)}),s.rotate(p,n)}return e.setModified(i,!0,!0,!1),i},e.scale=function(i,n,l,r,h){for(var f=h?e.allBodies(i):i.bodies,v=0;v<f.length;v++){var d=f[v],p=d.position.x-r.x,g=d.position.y-r.y;s.setPosition(d,{x:r.x+p*n,y:r.y+g*l}),s.scale(d,n,l)}return e.setModified(i,!0,!0,!1),i},e.bounds=function(i){for(var n=e.allBodies(i),l=[],r=0;r<n.length;r+=1){var h=n[r];l.push(h.bounds.min,h.bounds.max)}return a.create(l)}})()},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e>=0&&e<o.width&&u>=0&&u<o.height};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(29),o=t(2),a=new e({initialize:function(i){i===void 0&&(i={}),this.name=o(i,"name","layer"),this.x=o(i,"x",0),this.y=o(i,"y",0),this.width=o(i,"width",0),this.height=o(i,"height",0),this.tileWidth=o(i,"tileWidth",0),this.tileHeight=o(i,"tileHeight",0),this.baseTileWidth=o(i,"baseTileWidth",this.tileWidth),this.baseTileHeight=o(i,"baseTileHeight",this.tileHeight),this.orientation=o(i,"orientation",u.ORTHOGONAL),this.widthInPixels=o(i,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=o(i,"heightInPixels",this.height*this.baseTileHeight),this.alpha=o(i,"alpha",1),this.visible=o(i,"visible",!0),this.properties=o(i,"properties",[]),this.indexes=o(i,"indexes",[]),this.collideIndexes=o(i,"collideIndexes",[]),this.callbacks=o(i,"callbacks",[]),this.bodies=o(i,"bodies",[]),this.data=o(i,"data",[]),this.tilemapLayer=o(i,"tilemapLayer",null),this.hexSideLength=o(i,"hexSideLength",0)}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(29),o=t(2),a=new e({initialize:function(i){i===void 0&&(i={}),this.name=o(i,"name","map"),this.width=o(i,"width",0),this.height=o(i,"height",0),this.infinite=o(i,"infinite",!1),this.tileWidth=o(i,"tileWidth",0),this.tileHeight=o(i,"tileHeight",0),this.widthInPixels=o(i,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=o(i,"heightInPixels",this.height*this.tileHeight),this.format=o(i,"format",null),this.orientation=o(i,"orientation",u.ORTHOGONAL),this.renderOrder=o(i,"renderOrder","right-down"),this.version=o(i,"version","1"),this.properties=o(i,"properties",{}),this.layers=o(i,"layers",[]),this.images=o(i,"images",[]),this.objects=o(i,"objects",{}),this.collision=o(i,"collision",{}),this.tilesets=o(i,"tilesets",[]),this.imageCollections=o(i,"imageCollections",[]),this.tiles=o(i,"tiles",[]),this.hexSideLength=o(i,"hexSideLength",0)}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s,i,n,l,r,h,f){(i===void 0||i<=0)&&(i=32),(n===void 0||n<=0)&&(n=32),l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h={}),f===void 0&&(f={}),this.name=a,this.firstgid=s,this.tileWidth=i,this.tileHeight=n,this.tileMargin=l,this.tileSpacing=r,this.tileProperties=h,this.tileData=f,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(o){return this.containsTileIndex(o)?this.tileProperties[o-this.firstgid]:null},getTileData:function(o){return this.containsTileIndex(o)?this.tileData[o-this.firstgid]:null},getTileCollisionGroup:function(o){var a=this.getTileData(o);return a&&a.objectgroup?a.objectgroup:null},containsTileIndex:function(o){return o>=this.firstgid&&o<this.firstgid+this.total},getTileTextureCoordinates:function(o){return this.containsTileIndex(o)?this.texCoordinates[o-this.firstgid]:null},setImage:function(o){return this.image=o,this.glTexture=o.get().source.glTexture,this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setTileSize:function(o,a){return o!==void 0&&(this.tileWidth=o),a!==void 0&&(this.tileHeight=a),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(o,a){return o!==void 0&&(this.tileMargin=o),a!==void 0&&(this.tileSpacing=a),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(o,a){var s=(a-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),i=(o-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(s%1!=0||i%1!=0)&&console.warn("Image tile area not tile size multiple in: "+this.name),s=Math.floor(s),i=Math.floor(i),this.rows=s,this.columns=i,this.total=s*i,this.texCoordinates.length=0;for(var n=this.tileMargin,l=this.tileMargin,r=0;r<this.rows;r++){for(var h=0;h<this.columns;h++)this.texCoordinates.push({x:n,y:l}),n+=this.tileWidth+this.tileSpacing;n=this.tileMargin,l+=this.tileHeight+this.tileSpacing}return this}});c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return o===void 0&&(o=1e-4),Math.abs(e-u)<o};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(15),a=t(1068),s=new e({Extends:o,Mixins:[u.Alpha,u.BlendMode,u.Depth,u.Flip,u.GetBounds,u.Mask,u.Origin,u.Pipeline,u.ScrollFactor,u.Size,u.TextureCrop,u.Tint,u.Transform,u.Visible,a],initialize:function(n,l,r,h,f){o.call(this,n,"Image"),this._crop=this.resetCropObject(),this.setTexture(h,f),this.setPosition(l,r),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.hasOwnProperty(u)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(77),u=function(o,a){var s=e(o);for(var i in a)s.hasOwnProperty(i)||(s[i]=a[i]);return s};c.exports=u},function(c,S,t){var e={};c.exports=e;var u=t(64),o=t(83),a=t(165),s=t(84),i=t(271),n=t(32);(function(){e._warming=.4,e._torqueDampen=1,e._minLength=1e-6,e.create=function(l){var r=l;r.bodyA&&!r.pointA&&(r.pointA={x:0,y:0}),r.bodyB&&!r.pointB&&(r.pointB={x:0,y:0});var h=r.bodyA?o.add(r.bodyA.position,r.pointA):r.pointA,f=r.bodyB?o.add(r.bodyB.position,r.pointB):r.pointB,v=o.magnitude(o.sub(h,f));r.length=typeof r.length!="undefined"?r.length:v,r.id=r.id||n.nextId(),r.label=r.label||"Constraint",r.type="constraint",r.stiffness=r.stiffness||(r.length>0?1:.7),r.damping=r.damping||0,r.angularStiffness=r.angularStiffness||0,r.angleA=r.bodyA?r.bodyA.angle:r.angleA,r.angleB=r.bodyB?r.bodyB.angle:r.angleB,r.plugin={};var d={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return r.length===0&&r.stiffness>.1?(d.type="pin",d.anchors=!1):r.stiffness<.9&&(d.type="spring"),r.render=n.extend(d,r.render),r},e.preSolveAll=function(l){for(var r=0;r<l.length;r+=1){var h=l[r],f=h.constraintImpulse;h.isStatic||f.x===0&&f.y===0&&f.angle===0||(h.position.x+=f.x,h.position.y+=f.y,h.angle+=f.angle)}},e.solveAll=function(l,r){for(var h=0;h<l.length;h+=1){var f=l[h],v=!f.bodyA||f.bodyA&&f.bodyA.isStatic,d=!f.bodyB||f.bodyB&&f.bodyB.isStatic;(v||d)&&e.solve(l[h],r)}for(h=0;h<l.length;h+=1)f=l[h],v=!f.bodyA||f.bodyA&&f.bodyA.isStatic,d=!f.bodyB||f.bodyB&&f.bodyB.isStatic,!v&&!d&&e.solve(l[h],r)},e.solve=function(l,r){var h=l.bodyA,f=l.bodyB,v=l.pointA,d=l.pointB;if(!(!h&&!f)){h&&!h.isStatic&&(o.rotate(v,h.angle-l.angleA,v),l.angleA=h.angle),f&&!f.isStatic&&(o.rotate(d,f.angle-l.angleB,d),l.angleB=f.angle);var p=v,g=d;if(h&&(p=o.add(h.position,v)),f&&(g=o.add(f.position,d)),!(!p||!g)){var m=o.sub(p,g),x=o.magnitude(m);x<e._minLength&&(x=e._minLength);var y=(x-l.length)/x,T=l.stiffness<1?l.stiffness*r:l.stiffness,E=o.mult(m,y*T),C=(h?h.inverseMass:0)+(f?f.inverseMass:0),A=(h?h.inverseInertia:0)+(f?f.inverseInertia:0),P=C+A,M,O,I,N,Y;if(l.damping){var X=o.create();I=o.div(m,x),Y=o.sub(f&&o.sub(f.position,f.positionPrev)||X,h&&o.sub(h.position,h.positionPrev)||X),N=o.dot(I,Y)}h&&!h.isStatic&&(O=h.inverseMass/C,h.constraintImpulse.x-=E.x*O,h.constraintImpulse.y-=E.y*O,h.position.x-=E.x*O,h.position.y-=E.y*O,l.damping&&(h.positionPrev.x-=l.damping*I.x*N*O,h.positionPrev.y-=l.damping*I.y*N*O),M=o.cross(v,E)/P*e._torqueDampen*h.inverseInertia*(1-l.angularStiffness),h.constraintImpulse.angle-=M,h.angle-=M),f&&!f.isStatic&&(O=f.inverseMass/C,f.constraintImpulse.x+=E.x*O,f.constraintImpulse.y+=E.y*O,f.position.x+=E.x*O,f.position.y+=E.y*O,l.damping&&(f.positionPrev.x+=l.damping*I.x*N*O,f.positionPrev.y+=l.damping*I.y*N*O),M=o.cross(d,E)/P*e._torqueDampen*f.inverseInertia*(1-l.angularStiffness),f.constraintImpulse.angle+=M,f.angle+=M)}}},e.postSolveAll=function(l){for(var r=0;r<l.length;r++){var h=l[r],f=h.constraintImpulse;if(!(h.isStatic||f.x===0&&f.y===0&&f.angle===0)){a.set(h,!1);for(var v=0;v<h.parts.length;v++){var d=h.parts[v];u.translate(d.vertices,f),v>0&&(d.position.x+=f.x,d.position.y+=f.y),f.angle!==0&&(u.rotate(d.vertices,f.angle,h.position),i.rotate(d.axes,f.angle),v>0&&o.rotateAbout(d.position,f.angle,h.position,d.position)),s.update(d.bounds,d.vertices,h.velocity)}f.angle*=e._warming,f.x*=e._warming,f.y*=e._warming}}},e.pointAWorld=function(l){return{x:(l.bodyA?l.bodyA.position.x:0)+l.pointA.x,y:(l.bodyA?l.bodyA.position.y:0)+l.pointA.y}},e.pointBWorld=function(l){return{x:(l.bodyB?l.bodyB.position.x:0)+l.pointB.x,y:(l.bodyB?l.bodyB.position.y:0)+l.pointB.y}}})()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(35),u=t(65),o=t(66),a=t(0),s=t(11),i=t(15),n=t(10),l=t(57),r=new a({Extends:i,Mixins:[s.Depth,s.GetBounds,s.Origin,s.Transform,s.ScrollFactor,s.Visible],initialize:function(f,v,d,p,g){p===void 0&&(p=1),g===void 0&&(g=p),i.call(this,f,"Zone"),this.setPosition(v,d),this.width=p,this.height=g,this.blendMode=e.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(h){this.scaleX=h/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(h){this.scaleY=h/this.height}},setSize:function(h,f,v){v===void 0&&(v=!0),this.width=h,this.height=f,this.updateDisplayOrigin();var d=this.input;return v&&d&&!d.customHitArea&&(d.hitArea.width=h,d.hitArea.height=f),this},setDisplaySize:function(h,f){return this.displayWidth=h,this.displayHeight=f,this},setCircleDropZone:function(h){return this.setDropZone(new u(0,0,h),o)},setRectangleDropZone:function(h,f){return this.setDropZone(new n(0,0,h,f),l)},setDropZone:function(h,f){return h===void 0?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(h,f,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(h,f,v){v.addToRenderList(f)},renderWebGL:function(h,f,v){v.addToRenderList(f)}});c.exports=r},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return 2*(e.width+e.height)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){for(var u=e.length-1;u>0;u--){var o=Math.floor(Math.random()*(u+1)),a=e[u];e[u]=e[o],e[o]=a}return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ADD_ANIMATION:t(724),ANIMATION_COMPLETE:t(725),ANIMATION_COMPLETE_KEY:t(726),ANIMATION_REPEAT:t(727),ANIMATION_RESTART:t(728),ANIMATION_START:t(729),ANIMATION_STOP:t(730),ANIMATION_UPDATE:t(731),PAUSE_ALL:t(732),REMOVE_ANIMATION:t(733),RESUME_ALL:t(734)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(36),a=t(9),s=t(37),i=t(10),n=t(25),l=t(187),r=t(3),h=new e({Extends:a,Mixins:[u.Alpha,u.Visible],initialize:function(v,d,p,g){v===void 0&&(v=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),a.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new i,this.dirty=!0,this._x=v,this._y=d,this._width=p,this._height=g,this._bounds=new i,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new n,this.transparent=!0,this.backgroundColor=l("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new r(p/2,g/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[]},addToRenderList:function(f){this.renderList.push(f)},setOrigin:function(f,v){return f===void 0&&(f=.5),v===void 0&&(v=f),this.originX=f,this.originY=v,this},getScroll:function(f,v,d){d===void 0&&(d=new r);var p=this.width*.5,g=this.height*.5;return d.x=f-p,d.y=v-g,this.useBounds&&(d.x=this.clampX(d.x),d.y=this.clampY(d.y)),d},centerOnX:function(f){var v=this.width*.5;return this.midPoint.x=f,this.scrollX=f-v,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(f){var v=this.height*.5;return this.midPoint.y=f,this.scrollY=f-v,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(f,v){return this.centerOnX(f),this.centerOnY(v),this},centerToBounds:function(){if(this.useBounds){var f=this._bounds,v=this.width*.5,d=this.height*.5;this.midPoint.set(f.centerX,f.centerY),this.scrollX=f.centerX-v,this.scrollY=f.centerY-d}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(f){if(this.disableCull)return f;var v=this.matrix.matrix,d=v[0],p=v[1],g=v[2],m=v[3],x=d*m-p*g;if(!x)return f;var y=v[4],T=v[5],E=this.scrollX,C=this.scrollY,A=this.width,P=this.height,M=this.y,O=M+P,I=this.x,N=I+A,Y=this.culledObjects,X=f.length;x=1/x,Y.length=0;for(var W=0;W<X;++W){var H=f[W];if(!H.hasOwnProperty("width")||H.parentContainer){Y.push(H);continue}var D=H.width,L=H.height,B=H.x-E*H.scrollFactorX-D*H.originX,G=H.y-C*H.scrollFactorY-L*H.originY,w=B*d+G*g+y,z=B*p+G*m+T,U=(B+D)*d+(G+L)*g+y,V=(B+D)*p+(G+L)*m+T;U>I&&w<N&&V>M&&z<O&&Y.push(H)}return Y},getWorldPoint:function(f,v,d){d===void 0&&(d=new r);var p=this.matrix.matrix,g=p[0],m=p[1],x=p[2],y=p[3],T=p[4],E=p[5],C=g*y-m*x;if(!C)return d.x=f,d.y=v,d;C=1/C;var A=y*C,P=-m*C,M=-x*C,O=g*C,I=(x*E-y*T)*C,N=(m*T-g*E)*C,Y=Math.cos(this.rotation),X=Math.sin(this.rotation),W=this.zoomX,H=this.zoomY,D=this.scrollX,L=this.scrollY,B=f+(D*Y-L*X)*W,G=v+(D*X+L*Y)*H;return d.x=B*A+G*M+I,d.y=B*P+G*O+N,d},ignore:function(f){var v=this.id;Array.isArray(f)||(f=[f]);for(var d=0;d<f.length;d++){var p=f[d];Array.isArray(p)?this.ignore(p):p.isParent?this.ignore(p.getChildren()):p.cameraFilter|=v}return this},preRender:function(){this.renderList.length=0;var f=this.width,v=this.height,d=f*.5,p=v*.5,g=this.zoomX,m=this.zoomY,x=this.matrix,y=f*this.originX,T=v*this.originY,E=this.scrollX,C=this.scrollY;this.useBounds&&(E=this.clampX(E),C=this.clampY(C)),this.roundPixels&&(y=Math.round(y),T=Math.round(T)),this.scrollX=E,this.scrollY=C;var A=E+d,P=C+p;this.midPoint.set(A,P);var M=f/g,O=v/m;this.worldView.setTo(A-M/2,P-O/2,M,O),x.applyITRS(this.x+y,this.y+T,this.rotation,g,m),x.translate(-y,-T)},clampX:function(f){var v=this._bounds,d=this.displayWidth,p=v.x+(d-this.width)/2,g=Math.max(p,p+v.width-d);return f<p?f=p:f>g&&(f=g),f},clampY:function(f){var v=this._bounds,d=this.displayHeight,p=v.y+(d-this.height)/2,g=Math.max(p,p+v.height-d);return f<p?f=p:f>g&&(f=g),f},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(f){return f===void 0&&(f=0),this.rotation=o(f),this},setBackgroundColor:function(f){return f===void 0&&(f="rgba(0,0,0,0)"),this.backgroundColor=l(f),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(f,v,d,p,g){return g===void 0&&(g=!1),this._bounds.setTo(f,v,d,p),this.dirty=!0,this.useBounds=!0,g?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(f){f===void 0&&(f=new i);var v=this._bounds;return f.setTo(v.x,v.y,v.width,v.height),f},setName:function(f){return f===void 0&&(f=""),this.name=f,this},setPosition:function(f,v){return v===void 0&&(v=f),this.x=f,this.y=v,this},setRotation:function(f){return f===void 0&&(f=0),this.rotation=f,this},setRoundPixels:function(f){return this.roundPixels=f,this},setScene:function(f){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=f;var v=f.sys;return this.sceneManager=v.game.scene,this.scaleManager=v.scale,this.cameraManager=v.cameras,this.updateSystem(),this},setScroll:function(f,v){return v===void 0&&(v=f),this.scrollX=f,this.scrollY=v,this},setSize:function(f,v){return v===void 0&&(v=f),this.width=f,this.height=v,this},setViewport:function(f,v,d,p){return this.x=f,this.y=v,this.width=d,this.height=p,this},setZoom:function(f,v){return f===void 0&&(f=1),v===void 0&&(v=f),f===0&&(f=.001),v===0&&(v=.001),this.zoomX=f,this.zoomY=v,this},setMask:function(f,v){return v===void 0&&(v=!0),this.mask=f,this._maskCamera=v?this.cameraManager.default:this,this},clearMask:function(f){return f===void 0&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var f={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(f.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),f},update:function(){},updateSystem:function(){if(!!this.scaleManager){var f=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,v=this.sceneManager;f&&!this._customViewport?v.customViewports++:!f&&this._customViewport&&v.customViewports--,this.dirty=!0,this._customViewport=f}},destroy:function(){this.emit(s.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(f){this._x=f,this.updateSystem()}},y:{get:function(){return this._y},set:function(f){this._y=f,this.updateSystem()}},width:{get:function(){return this._width},set:function(f){this._width=f,this.updateSystem()}},height:{get:function(){return this._height},set:function(f){this._height=f,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(f){this._scrollX=f,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(f){this._scrollY=f,this.dirty=!0}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(f){this._zoomX=f,this._zoomY=f,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(f){this._zoomX=f,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(f){this._zoomY=f,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(f){this._rotation=f,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});c.exports=h},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(334),u=t(335),o=t(336),a=t(337),s=t(338),i=t(339),n=t(340),l=t(341),r=t(342),h=t(343),f=t(344),v=t(345);c.exports={Power0:n,Power1:l.Out,Power2:a.Out,Power3:r.Out,Power4:h.Out,Linear:n,Quad:l.Out,Cubic:a.Out,Quart:r.Out,Quint:h.Out,Sine:f.Out,Expo:i.Out,Circ:o.Out,Elastic:s.Out,Back:e.Out,Bounce:u.Out,Stepped:v,"Quad.easeIn":l.In,"Cubic.easeIn":a.In,"Quart.easeIn":r.In,"Quint.easeIn":h.In,"Sine.easeIn":f.In,"Expo.easeIn":i.In,"Circ.easeIn":o.In,"Elastic.easeIn":s.In,"Back.easeIn":e.In,"Bounce.easeIn":u.In,"Quad.easeOut":l.Out,"Cubic.easeOut":a.Out,"Quart.easeOut":r.Out,"Quint.easeOut":h.Out,"Sine.easeOut":f.Out,"Expo.easeOut":i.Out,"Circ.easeOut":o.Out,"Elastic.easeOut":s.Out,"Back.easeOut":e.Out,"Bounce.easeOut":u.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":a.InOut,"Quart.easeInOut":r.InOut,"Quint.easeInOut":h.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":i.InOut,"Circ.easeInOut":o.InOut,"Elastic.easeInOut":s.InOut,"Back.easeInOut":e.InOut,"Bounce.easeInOut":u.InOut}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return(u-e)*o+e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(105),u={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};function o(){var a=navigator.userAgent;return/Edge\/\d+/.test(a)?u.edge=!0:/Chrome\/(\d+)/.test(a)&&!e.windowsPhone?(u.chrome=!0,u.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(a)?(u.firefox=!0,u.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(a)&&e.iOS?u.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(a)?(u.ie=!0,u.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(a)?u.opera=!0:/Safari/.test(a)&&!e.windowsPhone?u.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(a)&&(u.ie=!0,u.trident=!0,u.tridentVersion=parseInt(RegExp.$1,10),u.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(a)&&(u.silk=!0),u}c.exports=o()},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return Math.random()*(u-e)+e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e>0&&(e&e-1)==0&&u>0&&(u&u-1)==0};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){return o===void 0&&(o=0),u===0?e:(e-=o,e=u*Math.ceil(e/u),a?(o+e)/u:o+e)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s,i,n){this.x=0,this.y=0,this.z=0,this.w=0,typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.w=a.w||0):(this.x=a||0,this.y=s||0,this.z=i||0,this.w=n||0)},clone:function(){return new u(this.x,this.y,this.z,this.w)},copy:function(o){return this.x=o.x,this.y=o.y,this.z=o.z||0,this.w=o.w||0,this},equals:function(o){return this.x===o.x&&this.y===o.y&&this.z===o.z&&this.w===o.w},set:function(o,a,s,i){return typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0,this.w=o.w||0):(this.x=o||0,this.y=a||0,this.z=s||0,this.w=i||0),this},add:function(o){return this.x+=o.x,this.y+=o.y,this.z+=o.z||0,this.w+=o.w||0,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this.z-=o.z||0,this.w-=o.w||0,this},scale:function(o){return this.x*=o,this.y*=o,this.z*=o,this.w*=o,this},length:function(){var o=this.x,a=this.y,s=this.z,i=this.w;return Math.sqrt(o*o+a*a+s*s+i*i)},lengthSq:function(){var o=this.x,a=this.y,s=this.z,i=this.w;return o*o+a*a+s*s+i*i},normalize:function(){var o=this.x,a=this.y,s=this.z,i=this.w,n=o*o+a*a+s*s+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=o*n,this.y=a*n,this.z=s*n,this.w=i*n),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z+this.w*o.w},lerp:function(o,a){a===void 0&&(a=0);var s=this.x,i=this.y,n=this.z,l=this.w;return this.x=s+a*(o.x-s),this.y=i+a*(o.y-i),this.z=n+a*(o.z-n),this.w=l+a*(o.w-l),this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this.z*=o.z||1,this.w*=o.w||1,this},divide:function(o){return this.x/=o.x,this.y/=o.y,this.z/=o.z||1,this.w/=o.w||1,this},distance:function(o){var a=o.x-this.x,s=o.y-this.y,i=o.z-this.z||0,n=o.w-this.w||0;return Math.sqrt(a*a+s*s+i*i+n*n)},distanceSq:function(o){var a=o.x-this.x,s=o.y-this.y,i=o.z-this.z||0,n=o.w-this.w||0;return a*a+s*s+i*i+n*n},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(o){var a=this.x,s=this.y,i=this.z,n=this.w,l=o.val;return this.x=l[0]*a+l[4]*s+l[8]*i+l[12]*n,this.y=l[1]*a+l[5]*s+l[9]*i+l[13]*n,this.z=l[2]*a+l[6]*s+l[10]*i+l[14]*n,this.w=l[3]*a+l[7]*s+l[11]*i+l[15]*n,this},transformQuat:function(o){var a=this.x,s=this.y,i=this.z,n=o.x,l=o.y,r=o.z,h=o.w,f=h*a+l*i-r*s,v=h*s+r*a-n*i,d=h*i+n*s-l*a,p=-n*a-l*s-r*i;return this.x=f*h+p*-n+v*-r-d*-l,this.y=v*h+p*-l+d*-n-f*-r,this.z=d*h+p*-r+f*-l-v*-n,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});u.prototype.sub=u.prototype.subtract,u.prototype.mul=u.prototype.multiply,u.prototype.div=u.prototype.divide,u.prototype.dist=u.prototype.distance,u.prototype.distSq=u.prototype.distanceSq,u.prototype.len=u.prototype.length,u.prototype.lenSq=u.prototype.lengthSq,c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(91),o=new e({initialize:function(s,i,n,l,r,h,f){l===void 0&&(l=1),r===void 0&&(r=0),h===void 0&&(h=!0),f===void 0&&(f=!1),this.renderer=s,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=l,this.minFilter=r,this.autoClear=h,this.autoResize=!1,this.resize(i,n),f&&this.setAutoResize(!0)},setAutoResize:function(a){return a&&!this.autoResize?(this.renderer.on(u.RESIZE,this.resize,this),this.autoResize=!0):!a&&this.autoResize&&(this.renderer.off(u.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(a,s){var i=a*this.scale,n=s*this.scale;if(i!==this.width||n!==this.height){var l=this.renderer;l.deleteFramebuffer(this.framebuffer),l.deleteTexture(this.texture),a*=this.scale,s*=this.scale,a=Math.round(a),s=Math.round(s),a<=0&&(a=1),s<=0&&(s=1),this.texture=l.createTextureFromSource(null,a,s,this.minFilter),this.framebuffer=l.createFramebuffer(a,s,this.texture,!1),this.width=a,this.height=s}return this},bind:function(a,s,i){if(a===void 0&&(a=!1),a&&this.renderer.flush(),s&&i&&this.resize(s,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),a&&this.adjustViewport(),this.autoClear){var n=this.renderer.gl;n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)}},adjustViewport:function(){var a=this.renderer.gl;a.viewport(0,0,this.width,this.height),a.disable(a.SCISSOR_TEST)},clear:function(){var a=this.renderer,s=a.gl;a.pushFramebuffer(this.framebuffer),s.disable(s.SCISSOR_TEST),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),a.popFramebuffer(),a.resetScissor()},unbind:function(a){a===void 0&&(a=!1);var s=this.renderer;return a&&s.flush(),s.popFramebuffer()},destroy:function(){var a=this.renderer;a.deleteFramebuffer(this.framebuffer),a.deleteTexture(this.texture),a.off(u.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o;if(u)typeof u=="string"?o=document.getElementById(u):typeof u=="object"&&u.nodeType===1&&(o=u);else if(e.parentElement||u===null)return e;return o||(o=document.body),o.appendChild(e),e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(77),o=t(9),a=t(70),s=t(22),i=t(1),n=t(207),l=t(428),r=new e({Extends:o,initialize:function(f){o.call(this),this.game=f,this.jsonCache=f.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,f.events.on(s.BLUR,this.onGameBlur,this),f.events.on(s.FOCUS,this.onGameFocus,this),f.events.on(s.PRE_STEP,this.update,this),f.events.once(s.DESTROY,this.destroy,this)},add:i,addAudioSprite:function(h,f){f===void 0&&(f={});var v=this.add(h,f);v.spritemap=this.jsonCache.get(h).spritemap;for(var d in v.spritemap)if(!!v.spritemap.hasOwnProperty(d)){var p=u(f),g=v.spritemap[d];p.loop=g.hasOwnProperty("loop")?g.loop:!1,v.addMarker({name:d,start:g.start,duration:g.end-g.start,config:p})}return v},get:function(h){return l(this.sounds,"key",h)},getAll:function(h){return n(this.sounds,"key",h)},play:function(h,f){var v=this.add(h);return v.once(a.COMPLETE,v.destroy,v),f?f.name?(v.addMarker(f),v.play(f.name)):v.play(f):v.play()},playAudioSprite:function(h,f,v){var d=this.addAudioSprite(h);return d.once(a.COMPLETE,d.destroy,d),d.play(f,v)},remove:function(h){var f=this.sounds.indexOf(h);return f!==-1?(h.destroy(),this.sounds.splice(f,1),!0):!1},removeAll:function(){this.sounds.forEach(function(h){h.destroy()}),this.sounds.length=0},removeByKey:function(h){for(var f=0,v=this.sounds.length-1;v>=0;v--){var d=this.sounds[v];d.key===h&&(d.destroy(),this.sounds.splice(v,1),f++)}return f},pauseAll:function(){this.forEachActiveSound(function(h){h.pause()}),this.emit(a.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(h){h.resume()}),this.emit(a.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(h){h.stop()}),this.emit(a.STOP_ALL,this)},stopByKey:function(h){var f=0;return this.getAll(h).forEach(function(v){v.stop()&&f++}),f},unlock:i,onBlur:i,onFocus:i,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(h,f){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(a.UNLOCKED,this));for(var v=this.sounds.length-1;v>=0;v--)this.sounds[v].pendingRemove&&this.sounds.splice(v,1);this.sounds.forEach(function(d){d.update(h,f)})},destroy:function(){this.game.events.off(s.BLUR,this.onGameBlur,this),this.game.events.off(s.FOCUS,this.onGameFocus,this),this.game.events.off(s.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(h,f){var v=this;this.sounds.forEach(function(d,p){d&&!d.pendingRemove&&h.call(f||v,d,p,v.sounds)})},setRate:function(h){return this.rate=h,this},rate:{get:function(){return this._rate},set:function(h){this._rate=h,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(a.GLOBAL_RATE,this,h)}},setDetune:function(h){return this.detune=h,this},detune:{get:function(){return this._detune},set:function(h){this._detune=h,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(a.GLOBAL_DETUNE,this,h)}}});c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(9),o=t(70),a=t(17),s=t(1),i=new e({Extends:u,initialize:function(l,r,h){u.call(this),this.manager=l,this.key=r,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=a(this.config,h),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(n){return!n||!n.name||typeof n.name!="string"?!1:this.markers[n.name]?(console.error("addMarker "+n.name+" already exists in Sound"),!1):(n=a(!0,{name:"",start:0,duration:this.totalDuration-(n.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},n),this.markers[n.name]=n,!0)},updateMarker:function(n){return!n||!n.name||typeof n.name!="string"?!1:this.markers[n.name]?(this.markers[n.name]=a(!0,this.markers[n.name],n),!0):(console.warn("Audio Marker: "+n.name+" missing in Sound: "+this.key),!1)},removeMarker:function(n){var l=this.markers[n];return l?(this.markers[n]=null,l):null},play:function(n,l){if(n===void 0&&(n=""),typeof n=="object"&&(l=n,n=""),typeof n!="string")return!1;if(!n)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[n])return console.warn("Marker: "+n+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[n],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=a(this.currentConfig,l),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:s,calculateRate:function(){var n=1.0005777895065548,l=this.currentConfig.detune+this.manager.detune,r=Math.pow(n,l);this.totalRate=this.currentConfig.rate*this.manager.rate*r},destroy:function(){this.pendingRemove||(this.emit(o.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(209),u=t(435),o=function(a,s){if(s===void 0&&(s=90),!e(a))return null;if(typeof s!="string"&&(s=(s%360+360)%360),s===90||s===-270||s==="rotateLeft")a=u(a),a.reverse();else if(s===-90||s===270||s==="rotateRight")a.reverse(),a=u(a);else if(Math.abs(s)===180||s==="rotate180"){for(var i=0;i<a.length;i++)a[i].reverse();a.reverse()}return a};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(18),o=t(11),a=t(15),s=t(1043),i=t(1044),n=t(212),l=t(10),r=t(1045),h=new e({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Texture,o.Tint,o.Transform,o.Visible,r],initialize:function(v,d,p,g,m,x,y){m===void 0&&(m=""),y===void 0&&(y=0),a.call(this,v,"BitmapText"),this.font=g;var T=this.scene.sys.cache.bitmapFont.get(g);T||console.warn("Invalid BitmapText key: "+g),this.fontData=T.data,this._text="",this._fontSize=x||this.fontData.size,this._letterSpacing=0,this._align=y,this._bounds=s(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=T.fromAtlas,this.setTexture(T.texture,T.frame),this.setPosition(d,p),this.setOrigin(0,0),this.initPipeline(),this.setText(m)},setLeftAlign:function(){return this._align=h.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=h.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=h.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(f){return this._fontSize=f,this._dirty=!0,this},setLetterSpacing:function(f){return f===void 0&&(f=0),this._letterSpacing=f,this._dirty=!0,this},setText:function(f){return!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(`
`)),f!==this.text&&(this._text=f.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(f,v,d,p){return f===void 0&&(f=0),v===void 0&&(v=0),d===void 0&&(d=0),p===void 0&&(p=.5),this.dropShadowX=f,this.dropShadowY=v,this.dropShadowColor=d,this.dropShadowAlpha=p,this},setCharacterTint:function(f,v,d,p,g,m,x){f===void 0&&(f=0),v===void 0&&(v=1),d===void 0&&(d=!1),p===void 0&&(p=-1),g===void 0&&(g=p,m=p,x=p);var y=this.text.length;v===-1&&(v=y),f<0&&(f=y+f),f=u(f,0,y-1);for(var T=u(f+v,f,y),E=this.charColors,C=f;C<T;C++){var A=E[C];if(p===-1)E[C]=null;else{var P=d?1:0;A?(A.tintEffect=P,A.tintTL=p,A.tintTR=g,A.tintBL=m,A.tintBR=x):E[C]={tintEffect:P,tintTL:p,tintTR:g,tintBL:m,tintBR:x}}}return this},setWordTint:function(f,v,d,p,g,m,x){v===void 0&&(v=1);for(var y=this.getTextBounds(),T=y.words,E=typeof f=="number",C=0,A=0;A<T.length;A++){var P=T[A];if((E&&A===f||!E&&P.word===f)&&(this.setCharacterTint(P.i,P.word.length,d,p,g,m,x),C++,C===v))return this}return this},getTextBounds:function(f){var v=this._bounds;return(this._dirty||f||this.scaleX!==v.scaleX||this.scaleY!==v.scaleY)&&(s(this,f,!0,v),this._dirty=!1),v},getCharacterAt:function(f,v,d){for(var p=this.getLocalPoint(f,v,null,d),g=this.getTextBounds(),m=g.characters,x=new l,y=0;y<m.length;y++){var T=m[y];if(x.setTo(T.x,T.t,T.r-T.x,T.b),x.contains(p.x,p.y))return T}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(f,v,d){if(v===void 0&&(v=this._fontSize),d===void 0&&(d=this._align),f!==this.font){var p=this.scene.sys.cache.bitmapFont.get(f);p&&(this.font=f,this.fontData=p.data,this._fontSize=v,this._align=d,this.fromAtlas=p.fromAtlas===!0,this.setTexture(p.texture,p.frame),s(this,!1,!0,this._bounds))}return this},setMaxWidth:function(f,v){return this._maxWidth=f,this._dirty=!0,v!==void 0&&(this.wordWrapCharCode=v),this},align:{set:function(f){this._align=f,this._dirty=!0},get:function(){return this._align}},text:{set:function(f){this.setText(f)},get:function(){return this._text}},fontSize:{set:function(f){this._fontSize=f,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(f){this._letterSpacing=f,this._dirty=!0},get:function(){return this._letterSpacing}},maxWidth:{set:function(f){this._maxWidth=f,this._dirty=!0},get:function(){return this._maxWidth}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var f=o.ToJSON(this),v={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,align:this.align};return f.data=v,f},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});h.ALIGN_LEFT=0,h.ALIGN_CENTER=1,h.ALIGN_RIGHT=2,h.ParseFromAtlas=i,h.ParseXMLBitmapFont=n,c.exports=h},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a){if(this.entries=[],Array.isArray(a))for(var s=0;s<a.length;s++)this.set(a[s])},set:function(o){return this.entries.indexOf(o)===-1&&this.entries.push(o),this},get:function(o,a){for(var s=0;s<this.entries.length;s++){var i=this.entries[s];if(i[o]===a)return i}},getArray:function(){return this.entries.slice(0)},delete:function(o){var a=this.entries.indexOf(o);return a>-1&&this.entries.splice(a,1),this},dump:function(){console.group("Set");for(var o=0;o<this.entries.length;o++){var a=this.entries[o];console.log(a)}console.groupEnd()},each:function(o,a){var s,i=this.entries.slice(),n=i.length;if(a)for(s=0;s<n&&o.call(a,i[s],s)!==!1;s++);else for(s=0;s<n&&o(i[s],s)!==!1;s++);return this},iterate:function(o,a){var s,i=this.entries.length;if(a)for(s=0;s<i&&o.call(a,this.entries[s],s)!==!1;s++);else for(s=0;s<i&&o(this.entries[s],s)!==!1;s++);return this},iterateLocal:function(o){var a,s=[];for(a=1;a<arguments.length;a++)s.push(arguments[a]);var i=this.entries.length;for(a=0;a<i;a++){var n=this.entries[a];n[o].apply(n,s)}return this},clear:function(){return this.entries.length=0,this},contains:function(o){return this.entries.indexOf(o)>-1},union:function(o){var a=new u;return o.entries.forEach(function(s){a.set(s)}),this.entries.forEach(function(s){a.set(s)}),a},intersect:function(o){var a=new u;return this.entries.forEach(function(s){o.contains(s)&&a.set(s)}),a},difference:function(o){var a=new u;return this.entries.forEach(function(s){o.contains(s)||a.set(s)}),a},size:{get:function(){return this.entries.length},set:function(o){return o<this.entries.length?this.entries.length=o:this.entries.length}}});c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(15),a=t(189),s=t(92),i=t(1182),n=new e({Extends:o,Mixins:[u.AlphaSingle,u.BlendMode,u.Depth,u.GetBounds,u.Mask,u.Pipeline,u.ScrollFactor,u.Transform,u.Visible,i],initialize:function(r,h,f,v,d,p,g){v===void 0&&(v=16777215),d===void 0&&(d=128),p===void 0&&(p=1),g===void 0&&(g=.1),o.call(this,r,"PointLight"),this.initPipeline(s.POINTLIGHT_PIPELINE),this.setPosition(h,f),this.color=a(v),this.intensity=p,this.attenuation=g,this.width=d*2,this.height=d*2,this._radius=d},radius:{get:function(){return this._radius},set:function(l){this._radius=l,this.width=l*2,this.height=l*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});c.exports=n},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=u.width/2,a=u.height/2,s=Math.abs(e.x-u.x-o),i=Math.abs(e.y-u.y-a),n=o+e.radius,l=a+e.radius;if(s>n||i>l)return!1;if(s<=o||i<=a)return!0;var r=s-o,h=i-a,f=r*r,v=h*h,d=e.radius*e.radius;return f+v<=d};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.width<=0||e.height<=0||u.width<=0||u.height<=0?!1:!(e.right<u.x||e.bottom<u.y||e.x>u.right||e.y>u.bottom)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(6),u={},o={};o.register=function(a,s,i,n,l){u[a]={plugin:s,mapping:i,settingsKey:n,configKey:l}},o.getPlugin=function(a){return u[a]},o.install=function(a){var s=a.scene.sys,i=s.settings.input,n=s.game.config;for(var l in u){var r=u[l].plugin,h=u[l].mapping,f=u[l].settingsKey,v=u[l].configKey;e(i,f,n[v])&&(a[h]=new r(a))}},o.remove=function(a){u.hasOwnProperty(a)&&delete u[a]},c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ANY_KEY_DOWN:t(1323),ANY_KEY_UP:t(1324),COMBO_MATCH:t(1325),DOWN:t(1326),KEY_DOWN:t(1327),KEY_UP:t(1328),UP:t(1329)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.url?e.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?e.url:u+e.url:!1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s,i){return e===void 0&&(e=""),u===void 0&&(u=!0),o===void 0&&(o=""),a===void 0&&(a=""),s===void 0&&(s=0),i===void 0&&(i=!1),{responseType:e,async:u,user:o,password:a,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:i}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(243),o=t(73),a=new e({Extends:o,Mixins:[u.Acceleration,u.Angular,u.Bounce,u.Debug,u.Drag,u.Enable,u.Friction,u.Gravity,u.Immovable,u.Mass,u.Pushable,u.Size,u.Velocity],initialize:function(i,n,l,r,h){o.call(this,i,n,l,r,h),this.body=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(119),u=function(o,a,s,i){if(s===void 0&&(s=!1),e(o,a,i)){var n=i.data[a][o]||null;return n?n.index===-1?s?n:null:n:null}else return null};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=e.data,i=e.width,n=e.height,l=e.tilemapLayer,r=Math.max(0,u.left),h=Math.min(i,u.right),f=Math.max(0,u.top),v=Math.min(n,u.bottom),d,p,g;if(o===0)for(p=f;p<v;p++)for(d=r;s[p]&&d<h;d++)g=s[p][d],!(!g||g.index===-1||!g.visible||g.alpha===0)&&a.push(g);else if(o===1)for(p=f;p<v;p++)for(d=h;s[p]&&d>=r;d--)g=s[p][d],!(!g||g.index===-1||!g.visible||g.alpha===0)&&a.push(g);else if(o===2)for(p=v;p>=f;p--)for(d=r;s[p]&&d<h;d++)g=s[p][d],!(!g||g.index===-1||!g.visible||g.alpha===0)&&a.push(g);else if(o===3)for(p=v;p>=f;p--)for(d=h;s[p]&&d>=r;d--)g=s[p][d],!(!g||g.index===-1||!g.visible||g.alpha===0)&&a.push(g);return l.tilesDrawn=a.length,l.tilesTotal=i*n,a};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=o.collideIndexes.indexOf(e);u&&a===-1?o.collideIndexes.push(e):!u&&a!==-1&&o.collideIndexes.splice(a,1)};c.exports=t},function(c,S,t){/**
 * @author       Seth Berrier <berriers@uwstout.edu>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(2),u=function(o,a,s){if(!a)return{i:0,layers:o.layers,name:"",opacity:1,visible:!0,x:0,y:0};var i=a.x+e(a,"startx",0)*o.tilewidth+e(a,"offsetx",0),n=a.y+e(a,"starty",0)*o.tileheight+e(a,"offsety",0);return{i:0,layers:a.layers,name:s.name+a.name+"/",opacity:s.opacity*a.opacity,visible:s.visible&&a.visible,x:s.x+i,y:s.y+n}};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a;if(e.hasOwnProperty(u)){var s=typeof e[u];s==="function"?a=function(i,n,l,r,h,f){return e[u](i,n,l,r,h,f)}:a=function(){return e[u]}}else typeof o=="function"?a=o:a=function(){return o};return a};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(265),u=t(13),o=t(99),a=t(80),s=t(162),i=t(583),n=t(263),l=t(6),r=t(264),h=t(266),f=t(268),v=function(d,p,g){g===void 0&&(g=e);for(var m=g.targets?g.targets:n(p),x=i(p),y=s(p,"delay",g.delay),T=s(p,"duration",g.duration),E=l(p,"easeParams",g.easeParams),C=a(l(p,"ease",g.ease),E),A=s(p,"hold",g.hold),P=s(p,"repeat",g.repeat),M=s(p,"repeatDelay",g.repeatDelay),O=o(p,"yoyo",g.yoyo),I=o(p,"flipX",g.flipX),N=o(p,"flipY",g.flipY),Y=[],X=0;X<x.length;X++)for(var W=x[X].key,H=x[X].value,D=0;D<m.length;D++){var L=r(W,H),B=f(m[D],D,W,L.getEnd,L.getStart,L.getActive,a(l(H,"ease",C),l(H,"easeParams",E)),s(H,"delay",y),s(H,"duration",T),o(H,"yoyo",O),s(H,"hold",A),s(H,"repeat",P),s(H,"repeatDelay",M),o(H,"flipX",I),o(H,"flipY",N));Y.push(B)}var G=new h(d,Y,m);G.offset=u(p,"offset",null),G.completeDelay=u(p,"completeDelay",0),G.loop=Math.round(u(p,"loop",0)),G.loopDelay=Math.round(u(p,"loopDelay",0)),G.paused=o(p,"paused",!1),G.useFrames=o(p,"useFrames",!1);for(var w=l(p,"callbackScope",G),z=[G,null],U=h.TYPES,V=0;V<U.length;V++){var Z=U[V],$=l(p,Z,!1);if($){var Q=l(p,Z+"Scope",w),j=l(p,Z+"Params",[]);G.setCallback(Z,$,z.concat(j),Q)}}return G};c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(102),o=t(2),a=t(132),s=t(185),i=new e({initialize:function(l){this.parent=l,this.animationManager=l.scene.sys.anims,this.animationManager.on(a.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(n){var l=this.parent;if(n===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,l;Array.isArray(n)||(n=[n]);for(var r=0;r<n.length;r++){var h=n[r];this.nextAnim===null?this.nextAnim=h:this.nextAnimsQueue.push(h)}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(n){this.isPlaying&&this.stop();var l=this.animationManager,r=typeof n=="string"?n:o(n,"key",null),h=this.exists(r)?this.get(r):l.get(r);if(!h)console.warn("Missing animation: "+r);else{this.currentAnim=h;var f=h.getTotalFrames(),v=o(n,"frameRate",h.frameRate),d=o(n,"duration",h.duration);h.calculateDuration(this,f,d,v),this.delay=o(n,"delay",h.delay),this.repeat=o(n,"repeat",h.repeat),this.repeatDelay=o(n,"repeatDelay",h.repeatDelay),this.yoyo=o(n,"yoyo",h.yoyo),this.showOnStart=o(n,"showOnStart",h.showOnStart),this.hideOnComplete=o(n,"hideOnComplete",h.hideOnComplete),this.skipMissedFrames=o(n,"skipMissedFrames",h.skipMissedFrames),this.timeScale=o(n,"timeScale",this.timeScale);var p=o(n,"startFrame",0);p>h.getTotalFrames()&&(p=0);var g=h.frames[p];p===0&&!this.forward&&(g=h.getLastFrame()),this.currentFrame=g}return this.parent},pause:function(n){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),n!==void 0&&this.setCurrentFrame(n),this.parent},resume:function(n){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),n!==void 0&&this.setCurrentFrame(n),this.parent},playAfterDelay:function(n,l){if(!this.isPlaying)this.delayCounter=l,this.play(n,!0);else{var r=this.nextAnim,h=this.nextAnimsQueue;r&&h.unshift(r),this.nextAnim=n,this._pendingStop=1,this._pendingStopValue=l}return this.parent},playAfterRepeat:function(n,l){if(l===void 0&&(l=1),!this.isPlaying)this.play(n);else{var r=this.nextAnim,h=this.nextAnimsQueue;r&&h.unshift(r),this.repeatCounter!==-1&&l>this.repeatCounter&&(l=this.repeatCounter),this.nextAnim=n,this._pendingStop=2,this._pendingStopValue=l}return this.parent},play:function(n,l){l===void 0&&(l=!1);var r=this.currentAnim,h=this.parent,f=typeof n=="string"?n:n.key;if(l&&this.isPlaying&&r.key===f)return h;if(r&&this.isPlaying){var v=this.animationManager.getMix(r.key,n);if(v>0)return this.playAfterDelay(n,v)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(n)},playReverse:function(n,l){l===void 0&&(l=!1);var r=typeof n=="string"?n:n.key;return l&&this.isPlaying&&this.currentAnim.key===r?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(n))},startAnimation:function(n){this.load(n);var l=this.currentAnim,r=this.parent;return l&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,l.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0&&this.handleStart()),r},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(a.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(a.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(a.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(a.ANIMATION_COMPLETE,a.ANIMATION_COMPLETE_KEY)},emitEvents:function(n,l){var r=this.currentAnim,h=this.currentFrame,f=this.parent,v=h.textureFrame;f.emit(n,r,h,f,v),l&&f.emit(l+r.key,r,h,f,v)},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var n=this.currentFrame;if(!n)return 0;var l=n.progress;return this.inReverse&&(l*=-1),l},setProgress:function(n){return this.forward||(n=1-n),this.setCurrentFrame(this.currentAnim.getFrameByProgress(n)),this.parent},setRepeat:function(n){return this.repeatCounter=n===-1?Number.MAX_VALUE:n,this.parent},globalRemove:function(n,l){l===void 0&&(l=this.currentAnim),this.isPlaying&&l.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(n,l){n===void 0&&(n=!1),l===void 0&&(l=!1);var r=this.currentAnim,h=this.parent;return r?(l&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),r.getFirstTick(this),this.emitEvents(a.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!n,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(r.frames[0]),this.parent):h},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var n=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(n)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleStop(),this.nextAnim){var n=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(n)}return this.parent},stopAfterDelay:function(n){return this._pendingStop=1,this._pendingStopValue=n,this.parent},stopAfterRepeat:function(n){return n===void 0&&(n=1),this.repeatCounter!==-1&&n>this.repeatCounter&&(n=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=n,this.parent},stopOnFrame:function(n){return this._pendingStop=3,this._pendingStopValue=n,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(n,l){var r=this.currentAnim;if(!(!this.isPlaying||!r||r.paused)){if(this.accumulator+=l*this.timeScale,this._pendingStop===1&&(this._pendingStopValue-=l,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?r.nextFrame(this):r.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var h=0;do this.forward?r.nextFrame(this):r.previousFrame(this),h++;while(this.isPlaying&&this.accumulator>this.nextTick&&h<60)}}},setCurrentFrame:function(n){var l=this.parent;return this.currentFrame=n,l.texture=n.frame.texture,l.frame=n.frame,l.isCropped&&l.frame.updateCropUVs(l._crop,l.flipX,l.flipY),n.setAlpha&&(l.alpha=n.alpha),l.setSizeToFrame(),l._originComponent&&(n.frame.customPivot?l.setOrigin(n.frame.pivotX,n.frame.pivotY):l.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(a.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===n&&this.stop()),l},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(n){return this.anims?this.anims.get(n):null},exists:function(n){return this.anims?this.anims.has(n):!1},create:function(n){var l=n.key,r=!1;return l&&(r=this.get(l),r||(r=new s(this,l,n),this.anims||(this.anims=new u),this.anims.set(l,r))),r},generateFrameNames:function(n,l){return this.animationManager.generateFrameNames(n,l)},generateFrameNumbers:function(n,l){return this.animationManager.generateFrameNumbers(n,l)},remove:function(n){var l=this.get(n);return l&&(this.currentAnim===l&&this.stop(),this.anims.delete(n)),l},destroy:function(){this.animationManager.off(a.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});c.exports=i},function(c,S,t){var e={};c.exports=e;var u=t(166);(function(){e._motionWakeThreshold=.18,e._motionSleepThreshold=.08,e._minBias=.9,e.update=function(o,a){for(var s=a*a*a,i=0;i<o.length;i++){var n=o[i],l=n.speed*n.speed+n.angularSpeed*n.angularSpeed;if(n.force.x!==0||n.force.y!==0){e.set(n,!1);continue}var r=Math.min(n.motion,l),h=Math.max(n.motion,l);n.motion=e._minBias*r+(1-e._minBias)*h,n.sleepThreshold>0&&n.motion<e._motionSleepThreshold*s?(n.sleepCounter+=1,n.sleepCounter>=n.sleepThreshold&&e.set(n,!0)):n.sleepCounter>0&&(n.sleepCounter-=1)}},e.afterCollisions=function(o,a){for(var s=a*a*a,i=0;i<o.length;i++){var n=o[i];if(!!n.isActive){var l=n.collision,r=l.bodyA.parent,h=l.bodyB.parent;if(!(r.isSleeping&&h.isSleeping||r.isStatic||h.isStatic)&&(r.isSleeping||h.isSleeping)){var f=r.isSleeping&&!r.isStatic?r:h,v=f===r?h:r;!f.isStatic&&v.motion>e._motionWakeThreshold*s&&e.set(f,!1)}}}},e.set=function(o,a){var s=o.isSleeping;a?(o.isSleeping=!0,o.sleepCounter=o.sleepThreshold,o.positionImpulse.x=0,o.positionImpulse.y=0,o.positionPrev.x=o.position.x,o.positionPrev.y=o.position.y,o.anglePrev=o.angle,o.speed=0,o.angularSpeed=0,o.motion=0,s||u.trigger(o,"sleepStart")):(o.isSleeping=!1,o.sleepCounter=0,s&&u.trigger(o,"sleepEnd"))}})()},function(c,S,t){var e={};c.exports=e;var u=t(32);(function(){e.on=function(o,a,s){for(var i=a.split(" "),n,l=0;l<i.length;l++)n=i[l],o.events=o.events||{},o.events[n]=o.events[n]||[],o.events[n].push(s);return s},e.off=function(o,a,s){if(!a){o.events={};return}typeof a=="function"&&(s=a,a=u.keys(o.events).join(" "));for(var i=a.split(" "),n=0;n<i.length;n++){var l=o.events[i[n]],r=[];if(s&&l)for(var h=0;h<l.length;h++)l[h]!==s&&r.push(l[h]);o.events[i[n]]=r}},e.trigger=function(o,a,s){var i,n,l,r,h=o.events;if(h&&u.keys(h).length>0){s||(s={}),i=a.split(" ");for(var f=0;f<i.length;f++)if(n=i[f],l=h[n],l){r=u.clone(s,!1),r.name=n,r.source=o;for(var v=0;v<l.length;v++)l[v].apply(o,[r])}}}})()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(175),u=t(92),o=t(74),a={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(s){s===void 0&&(s=u.MULTI_PIPELINE);var i=this.scene.sys.renderer;if(!i)return!1;var n=i.pipelines;if(this.postPipelines=[],this.pipelineData={},n){var l=n.get(s);if(l)return this.defaultPipeline=l,this.pipeline=l,!0}return!1},setPipeline:function(s,i,n){var l=this.scene.sys.renderer;if(!l)return this;var r=l.pipelines;if(r){var h=r.get(s);h&&(this.pipeline=h),i&&(this.pipelineData=n?e(i):i)}return this},setPostPipeline:function(s,i,n){var l=this.scene.sys.renderer;if(!l)return this;var r=l.pipelines;if(r){Array.isArray(s)||(s=[s]);for(var h=0;h<s.length;h++){var f=r.getPostPipeline(s[h],this);f&&this.postPipelines.push(f)}i&&(this.pipelineData=n?e(i):i)}return this.hasPostPipeline=this.postPipelines.length>0,this},setPipelineData:function(s,i){var n=this.pipelineData;return i===void 0?delete n[s]:n[s]=i,this},getPostPipeline:function(s){for(var i=this.postPipelines,n=[],l=0;l<i.length;l++){var r=i[l];(typeof s=="string"&&r.name===s||r instanceof s)&&n.push(r)}return n.length===1?n[0]:n},resetPipeline:function(s,i){return s===void 0&&(s=!1),i===void 0&&(i=!1),this.pipeline=this.defaultPipeline,s&&(this.postPipelines=[],this.hasPostPipeline=!1),i&&(this.pipelineData={}),this.pipeline!==null},resetPostPipeline:function(s){s===void 0&&(s=!1);for(var i=this.postPipelines,n=0;n<i.length;n++)i[n].destroy();this.postPipelines=[],this.hasPostPipeline=!1,s&&(this.pipelineData={})},removePostPipeline:function(s){for(var i=this.postPipelines,n=i.length-1;n>=0;n--){var l=i[n];(typeof s=="string"&&l.name===s||typeof s!="string"&&l instanceof s)&&(l.destroy(),o(i,n))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={DEFAULT:0,LINEAR:0,NEAREST:1};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a,s){return s===void 0&&(s=new e),s.x=o.x+o.radius*Math.cos(a),s.y=o.y+o.radius*Math.sin(a),s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){a===void 0&&(a=new e);var s=2*Math.PI*Math.random(),i=Math.random()+Math.random(),n=i>1?2-i:i,l=n*Math.cos(s),r=n*Math.sin(s);return a.x=o.x+l*o.radius,a.y=o.y+r*o.radius,a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(130),u=t(4),o=function(a,s,i){if(i===void 0&&(i=new u),s<=0||s>=1)return i.x=a.x,i.y=a.y,i;var n=e(a)*s;return s>.5?(n-=a.width+a.height,n<=a.width?(i.x=a.right-n,i.y=a.bottom):(i.x=a.x,i.y=a.bottom-(n-a.width))):n<=a.width?(i.x=a.x+n,i.y=a.y):(i.x=a.right,i.y=a.y+(n-a.width)),i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(67),u=t(4),o=function(a,s,i,n){n===void 0&&(n=[]),!s&&i>0&&(s=e(a)/i);for(var l=a.x1,r=a.y1,h=a.x2,f=a.y2,v=0;v<s;v++){var d=v/s,p=l+(h-l)*d,g=r+(f-r)*d;n.push(new u(p,g))}return n};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){a===void 0&&(a=new e);var s=Math.random();return a.x=o.x1+s*(o.x2-o.x1),a.y=o.y1+s*(o.y2-o.y1),a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){return a===void 0&&(a=new e),a.x=o.x+Math.random()*o.width,a.y=o.y+Math.random()*o.height,a};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u,o,a;if(typeof e!="object"||e===null)return e;u=Array.isArray(e)?[]:{};for(a in e)o=e[a],u[a]=t(o);return u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u={name:e.name,type:e.type,x:e.x,y:e.y,depth:e.depth,scale:{x:e.scaleX,y:e.scaleY},origin:{x:e.originX,y:e.originY},flipX:e.flipX,flipY:e.flipY,rotation:e.rotation,alpha:e.alpha,visible:e.visible,blendMode:e.blendMode,textureKey:"",frameKey:"",data:{}};return e.texture&&(u.textureKey=e.texture.key,u.frameKey=e.frame.name),u};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=function(o,a,s,i,n,l,r,h){h===void 0&&(h=new e);var f=Math.sin(n),v=Math.cos(n),d=v*l,p=f*l,g=-f*r,m=v*r,x=1/(d*m+g*-p);return h.x=m*x*o+-g*x*a+(i*g-s*m)*x,h.y=d*x*a+-p*x*o+(-i*d+s*p)*x,h};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u===void 0&&(u=1);for(var o=null,a=0;a<u;a++)o=e.shift(),e.push(o);return o};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u===void 0&&(u=1);for(var o=null,a=0;a<u;a++)o=e.pop(),e.unshift(o);return o};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){a===void 0&&(a=new e);var s=Math.random()*Math.PI*2,i=Math.sqrt(Math.random());return a.x=o.x+i*Math.cos(s)*o.width/2,a.y=o.y+i*Math.sin(s)*o.height/2,a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){a===void 0&&(a=new e);var s=o.x2-o.x1,i=o.y2-o.y1,n=o.x3-o.x1,l=o.y3-o.y1,r=Math.random(),h=Math.random();return r+h>=1&&(r=1-r,h=1-h),a.x=o.x1+(s*r+n*h),a.y=o.y1+(i*r+l*h),a};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s){var i=a+Math.atan2(e.y-o,e.x-u);return e.x=u+s*Math.cos(i),e.y=o+s*Math.sin(i),e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e=Math.max(0,Math.min(1,(e-u)/(o-u))),e*e*e*(e*(e*6-15)+10)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e<=u?0:e>=o?1:(e=(e-u)/(o-u),e*e*(3-2*e))};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=t(0),o=t(132),a=t(318),s=t(319),i=t(6),n=t(320),l=new u({initialize:function(h,f,v){this.manager=h,this.key=f,this.type="frame",this.frames=this.getFrames(h.textureManager,i(v,"frames",[]),i(v,"defaultTextureKey",null),i(v,"sortFrames",!0)),this.frameRate=i(v,"frameRate",null),this.duration=i(v,"duration",null),this.msPerFrame,this.skipMissedFrames=i(v,"skipMissedFrames",!0),this.delay=i(v,"delay",0),this.repeat=i(v,"repeat",0),this.repeatDelay=i(v,"repeatDelay",0),this.yoyo=i(v,"yoyo",!1),this.showOnStart=i(v,"showOnStart",!1),this.hideOnComplete=i(v,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(r,h,f,v){f===null&&v===null?(r.frameRate=24,r.duration=24/h*1e3):f&&v===null?(r.duration=f,r.frameRate=h/(f/1e3)):(r.frameRate=v,r.duration=h/v*1e3),r.msPerFrame=1e3/r.frameRate},addFrame:function(r){return this.addFrameAt(this.frames.length,r)},addFrameAt:function(r,h){var f=this.getFrames(this.manager.textureManager,h);if(f.length>0){if(r===0)this.frames=f.concat(this.frames);else if(r===this.frames.length)this.frames=this.frames.concat(f);else{var v=this.frames.slice(0,r),d=this.frames.slice(r);this.frames=v.concat(f,d)}this.updateFrameSequence()}return this},checkFrame:function(r){return r>=0&&r<this.frames.length},getFirstTick:function(r){r.accumulator=0,r.nextTick=r.msPerFrame+r.currentFrame.duration},getFrameAt:function(r){return this.frames[r]},getFrames:function(r,h,f,v){v===void 0&&(v=!0);var d=[],p,g,m=1,x,y;if(typeof h=="string"){y=h;var T=r.get(y),E=T.getFrameNames();v&&n(E),h=[],E.forEach(function(I){h.push({key:y,frame:I})})}if(!Array.isArray(h)||h.length===0)return d;for(x=0;x<h.length;x++){var C=h[x],A=i(C,"key",f);if(!!A){var P=i(C,"frame",0),M=r.getFrame(A,P);g=new s(A,P,m,M),g.duration=i(C,"duration",0),g.isFirst=!p,p&&(p.nextFrame=g,g.prevFrame=p),d.push(g),p=g,m++}}if(d.length>0){g.isLast=!0,g.nextFrame=d[0],d[0].prevFrame=g;var O=1/(d.length-1);for(x=0;x<d.length;x++)d[x].progress=x*O}return d},getNextTick:function(r){r.accumulator-=r.nextTick,r.nextTick=r.msPerFrame+r.currentFrame.duration},getFrameByProgress:function(r){return r=e(r,0,1),a(r,this.frames,"progress")},nextFrame:function(r){var h=r.currentFrame;h.isLast?r.yoyo?this.handleYoyoFrame(r,!1):r.repeatCounter>0?r.inReverse&&r.forward?r.forward=!1:this.repeatAnimation(r):r.complete():this.updateAndGetNextTick(r,h.nextFrame)},handleYoyoFrame:function(r,h){if(h||(h=!1),r.inReverse===!h&&r.repeatCounter>0){(r.repeatDelay===0||r.pendingRepeat)&&(r.forward=h),this.repeatAnimation(r);return}if(r.inReverse!==h&&r.repeatCounter===0){r.complete();return}r.forward=h;var f=h?r.currentFrame.nextFrame:r.currentFrame.prevFrame;this.updateAndGetNextTick(r,f)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(r){var h=r.currentFrame;h.isFirst?r.yoyo?this.handleYoyoFrame(r,!0):r.repeatCounter>0?r.inReverse&&!r.forward?this.repeatAnimation(r):(r.forward=!0,this.repeatAnimation(r)):r.complete():this.updateAndGetNextTick(r,h.prevFrame)},updateAndGetNextTick:function(r,h){r.setCurrentFrame(h),this.getNextTick(r)},removeFrame:function(r){var h=this.frames.indexOf(r);return h!==-1&&this.removeFrameAt(h),this},removeFrameAt:function(r){return this.frames.splice(r,1),this.updateFrameSequence(),this},repeatAnimation:function(r){if(r._pendingStop===2){if(r._pendingStopValue===0)return r.stop();r._pendingStopValue--}r.repeatDelay>0&&!r.pendingRepeat?(r.pendingRepeat=!0,r.accumulator-=r.nextTick,r.nextTick+=r.repeatDelay):(r.repeatCounter--,r.forward?r.setCurrentFrame(r.currentFrame.nextFrame):r.setCurrentFrame(r.currentFrame.prevFrame),r.isPlaying&&(this.getNextTick(r),r.handleRepeat()))},toJSON:function(){var r={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(h){r.frames.push(h.toJSON())}),r},updateFrameSequence:function(){for(var r=this.frames.length,h=1/(r-1),f,v=0;v<r;v++)f=this.frames[v],f.index=v+1,f.isFirst=!1,f.isLast=!1,f.progress=v*h,v===0?(f.isFirst=!0,r===1?(f.isLast=!0,f.nextFrame=f,f.prevFrame=f):(f.isLast=!1,f.prevFrame=this.frames[r-1],f.nextFrame=this.frames[v+1])):v===r-1&&r>1?(f.isLast=!0,f.prevFrame=this.frames[r-2],f.nextFrame=this.frames[0]):r>1&&(f.prevFrame=this.frames[v-1],f.nextFrame=this.frames[v+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var r=0;r<this.frames.length;r++)this.frames[r].destroy();this.frames=[],this.manager=null}});c.exports=l},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){u===void 0&&(u=0),o===void 0&&(o=" "),a===void 0&&(a=3),e=e.toString();var s=0;if(u+1>=e.length)switch(a){case 1:e=new Array(u+1-e.length).join(o)+e;break;case 3:var i=Math.ceil((s=u-e.length)/2),n=s-i;e=new Array(n+1).join(o)+e+new Array(i+1).join(o);break;default:e=e+new Array(u+1-e.length).join(o);break}return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(327),u=t(189),o=t(331),a=t(332),s=function(i){var n=typeof i;switch(n){case"string":return i.substr(0,3).toLowerCase()==="rgb"?a(i):e(i);case"number":return u(i);case"object":return o(i)}};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(103);function u(a,s,i,n){var l=(a+s*6)%6,r=Math.min(l,4-l,1);return Math.round(255*(n-n*i*Math.max(0,r)))}var o=function(a,s,i,n){s===void 0&&(s=1),i===void 0&&(i=1);var l=u(5,a,s,i),r=u(3,a,s,i),h=u(1,a,s,i);return n?n.setTo?n.setTo(l,r,h,n.alpha,!1):(n.r=l,n.g=r,n.b=h,n.color=e(l,r,h),n):{r:l,g:r,b:h,color:e(l,r,h)}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(38),u=t(330),o=function(a){var s=u(a);return new e(s.r,s.g,s.b,s.a)};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e.x=u-e.width/2,e.y=o-e.height/2,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(105),u=t(136),o=t(31),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function s(){var n=new ArrayBuffer(4),l=new Uint8Array(n),r=new Uint32Array(n);return l[0]=161,l[1]=178,l[2]=195,l[3]=212,r[0]===3569595041?!0:r[0]===2712847316?!1:null}function i(){if(typeof importScripts=="function")return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch{a.localStorage=!1}a.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,a.fileSystem=!!window.requestFileSystem;var n=!1,l=function(){if(window.WebGLRenderingContext)try{var r=o.createWebGL(this),h=r.getContext("webgl")||r.getContext("experimental-webgl"),f=o.create2D(this),v=f.getContext("2d"),d=v.createImageData(1,1);return n=d.data instanceof Uint8ClampedArray,o.remove(r),o.remove(f),!!h}catch{return!1}return!1};return a.webGL=l(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,u.firefox&&u.firefoxVersion<21&&(a.getUserMedia=!1),!e.iOS&&(u.ie||u.firefox||u.chrome)&&(a.canvasBitBltShift=!0),(u.safari||u.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint32Array!="undefined"&&(a.littleEndian=s()),a.support32bit=typeof ArrayBuffer!="undefined"&&typeof Uint8ClampedArray!="undefined"&&typeof Int32Array!="undefined"&&a.littleEndian!==null&&n,a}c.exports=i()},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t="",e=function(){var u=function(i){for(var n=["i","webkitI","msI","mozI","oI"],l=0;l<n.length;l++){var r=n[l]+"mageSmoothingEnabled";if(r in i)return r}return null},o=function(i){return t===""&&(t=u(i)),t&&(i[t]=!0),i},a=function(i){return t===""&&(t=u(i)),t&&(i[t]=!1),i},s=function(i){return t!==null?i[t]:null};return{disable:a,enable:o,getPrefix:u,isEnabled:s}};c.exports=e()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=t(17),o={Angle:t(812),Distance:t(821),Easing:t(826),Fuzzy:t(827),Interpolation:t(830),Pow2:t(835),Snap:t(837),RandomDataGenerator:t(839),Average:t(840),Bernstein:t(356),Between:t(195),CatmullRom:t(194),CeilTo:t(841),Clamp:t(18),DegToRad:t(36),Difference:t(842),Euler:t(843),Factorial:t(357),FloatBetween:t(137),FloorTo:t(844),FromPercent:t(98),GetSpeed:t(845),IsEven:t(846),IsEvenStrict:t(847),Linear:t(135),MaxAdd:t(848),Median:t(849),MinSub:t(850),Percent:t(851),RadToDeg:t(196),RandomXY:t(852),RandomXYZ:t(853),RandomXYZW:t(854),Rotate:t(362),RotateAround:t(308),RotateAroundDistance:t(182),RotateTo:t(855),RoundAwayFromZero:t(363),RoundTo:t(856),SinCosTableGenerator:t(857),SmootherStep:t(183),SmoothStep:t(184),ToXY:t(858),TransformXY:t(177),Within:t(859),Wrap:t(68),Vector2:t(3),Vector3:t(39),Vector4:t(140),Matrix3:t(364),Matrix4:t(69),Quaternion:t(365),RotateVec3:t(860)};o=u(!1,o,e),c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s){var i=(a-u)*.5,n=(s-o)*.5,l=e*e,r=e*l;return(2*o-2*a+i+n)*r+(-3*o+3*a-2*i-n)*l+i*e+o};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return Math.floor(Math.random()*(u-e+1)+e)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=function(o){return o*e.RAD_TO_DEG};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(o){return this._matrix=o,this._dirty=!0,this},reset:function(){var o=this._matrix;return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=0,o[6]=1,o[7]=0,o[8]=0,o[9]=0,o[10]=0,o[11]=0,o[12]=1,o[13]=0,o[14]=0,o[15]=0,o[16]=0,o[17]=0,o[18]=1,o[19]=0,this._dirty=!0,this},getData:function(){if(this._dirty){var o=new Float32Array(this._matrix);o[4]/=255,o[9]/=255,o[14]/=255,o[19]/=255,this._data=o,this._dirty=!1}return this._data},brightness:function(o,a){o===void 0&&(o=0),a===void 0&&(a=!1);var s=o;return this.multiply([s,0,0,0,0,0,s,0,0,0,0,0,s,0,0,0,0,0,1,0],a)},saturate:function(o,a){o===void 0&&(o=0),a===void 0&&(a=!1);var s=o*2/3+1,i=(s-1)*-.5;return this.multiply([s,i,i,0,0,i,s,i,0,0,i,i,s,0,0,0,0,0,1,0],a)},desaturate:function(o){return o===void 0&&(o=!1),this.saturate(-1,o)},hue:function(o,a){o===void 0&&(o=0),a===void 0&&(a=!1),o=o/180*Math.PI;var s=Math.cos(o),i=Math.sin(o),n=.213,l=.715,r=.072;return this.multiply([n+s*(1-n)+i*-n,l+s*-l+i*-l,r+s*-r+i*(1-r),0,0,n+s*-n+i*.143,l+s*(1-l)+i*.14,r+s*-r+i*-.283,0,0,n+s*-n+i*-(1-n),l+s*-l+i*l,r+s*(1-r)+i*r,0,0,0,0,0,1,0],a)},grayscale:function(o,a){return o===void 0&&(o=1),a===void 0&&(a=!1),this.saturate(-o,a)},blackWhite:function(o){return o===void 0&&(o=!1),this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],o)},contrast:function(o,a){o===void 0&&(o=0),a===void 0&&(a=!1);var s=o+1,i=-.5*(s-1);return this.multiply([s,0,0,0,i,0,s,0,0,i,0,0,s,0,i,0,0,0,1,0],a)},negative:function(o){return o===void 0&&(o=!1),this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],o)},desaturateLuminance:function(o){return o===void 0&&(o=!1),this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],o)},sepia:function(o){return o===void 0&&(o=!1),this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],o)},night:function(o,a){return o===void 0&&(o=.1),a===void 0&&(a=!1),this.multiply([o*-2,-o,0,0,0,-o,0,o,0,0,0,o,o*2,0,0,0,0,0,1,0],a)},lsd:function(o){return o===void 0&&(o=!1),this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],o)},brown:function(o){return o===void 0&&(o=!1),this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],o)},vintagePinhole:function(o){return o===void 0&&(o=!1),this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],o)},kodachrome:function(o){return o===void 0&&(o=!1),this.multiply([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],o)},technicolor:function(o){return o===void 0&&(o=!1),this.multiply([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],o)},polaroid:function(o){return o===void 0&&(o=!1),this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],o)},shiftToBGR:function(o){return o===void 0&&(o=!1),this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],o)},multiply:function(o,a){a||this.reset();for(var s=this._matrix,i=[],n=0;n<20;n++)i[n]=s[n];return s[0]=i[0]*o[0]+i[1]*o[5]+i[2]*o[10]+i[3]*o[15],s[1]=i[0]*o[1]+i[1]*o[6]+i[2]*o[11]+i[3]*o[16],s[2]=i[0]*o[2]+i[1]*o[7]+i[2]*o[12]+i[3]*o[17],s[3]=i[0]*o[3]+i[1]*o[8]+i[2]*o[13]+i[3]*o[18],s[4]=i[0]*o[4]+i[1]*o[9]+i[2]*o[14]+i[3]*o[19]+i[4],s[5]=i[5]*o[0]+i[6]*o[5]+i[7]*o[10]+i[8]*o[15],s[6]=i[5]*o[1]+i[6]*o[6]+i[7]*o[11]+i[8]*o[16],s[7]=i[5]*o[2]+i[6]*o[7]+i[7]*o[12]+i[8]*o[17],s[8]=i[5]*o[3]+i[6]*o[8]+i[7]*o[13]+i[8]*o[18],s[9]=i[5]*o[4]+i[6]*o[9]+i[7]*o[14]+i[8]*o[19]+i[9],s[10]=i[10]*o[0]+i[11]*o[5]+i[12]*o[10]+i[13]*o[15],s[11]=i[10]*o[1]+i[11]*o[6]+i[12]*o[11]+i[13]*o[16],s[12]=i[10]*o[2]+i[11]*o[7]+i[12]*o[12]+i[13]*o[17],s[13]=i[10]*o[3]+i[11]*o[8]+i[12]*o[13]+i[13]*o[18],s[14]=i[10]*o[4]+i[11]*o[9]+i[12]*o[14]+i[13]*o[19]+i[14],s[15]=i[15]*o[0]+i[16]*o[5]+i[17]*o[10]+i[18]*o[15],s[16]=i[15]*o[1]+i[16]*o[6]+i[17]*o[11]+i[18]*o[16],s[17]=i[15]*o[2]+i[16]*o[7]+i[17]*o[12]+i[18]*o[17],s[18]=i[15]*o[3]+i[16]*o[8]+i[17]*o[13]+i[18]*o[18],s[19]=i[15]*o[4]+i[16]*o[9]+i[17]*o[14]+i[18]*o[19]+i[19],this._dirty=!0,this}});c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=t(14),o=function(a,s){if(s===void 0&&(s=new e),a.length===0)return s;for(var i=Number.MAX_VALUE,n=Number.MAX_VALUE,l=u.MIN_SAFE_INTEGER,r=u.MIN_SAFE_INTEGER,h,f,v,d=0;d<a.length;d++)h=a[d],Array.isArray(h)?(f=h[0],v=h[1]):(f=h.x,v=h.y),i=Math.min(i,f),n=Math.min(n,v),l=Math.max(l,f),r=Math.max(r,v);return s.x=i,s.y=n,s.width=l-i,s.height=r-n,s};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(1),o=new e({initialize:function(s,i,n){this._rgb=[0,0,0],this.onChangeCallback=u,this.dirty=!1,this.set(s,i,n)},set:function(a,s,i){return a===void 0&&(a=0),s===void 0&&(s=0),i===void 0&&(i=0),this._rgb=[a,s,i],this.onChange(),this},equals:function(a,s,i){var n=this._rgb;return n.r===a&&n.g===s&&n.b===i},onChange:function(){this.dirty=!0;var a=this._rgb;this.onChangeCallback.call(this,a[0],a[1],a[2])},r:{get:function(){return this._rgb[0]},set:function(a){this._rgb[0]=a,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(a){this._rgb[1]=a,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(a){this._rgb[2]=a,this.onChange()}},destroy:function(){this.onChangeCallback=null}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e={CENTER:t(403),ORIENTATION:t(404),SCALE_MODE:t(405),ZOOM:t(406)};c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){e.parentNode&&e.parentNode.removeChild(e)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(144),o=t(197),a=t(20),s=t(419),i=t(420),n=t(33),l=t(1),r=t(421),h=new e({initialize:function(v,d){this.scene=v,this.game,this.renderer,this.config=d,this.settings=r.create(d),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(f){this.settings.status=u.INIT,this.sceneUpdate=l,this.game=f,this.renderer=f.renderer,this.canvas=f.canvas,this.context=f.context;var v=f.plugins;this.plugins=v,v.addToScene(this,o.Global,[o.CoreScene,i(this),s(this)]),this.events.emit(a.BOOT,this),this.settings.isBooted=!0},step:function(f,v){var d=this.events;d.emit(a.PRE_UPDATE,f,v),d.emit(a.UPDATE,f,v),this.sceneUpdate.call(this.scene,f,v),d.emit(a.POST_UPDATE,f,v)},render:function(f){var v=this.displayList;v.depthSort(),this.events.emit(a.PRE_RENDER,f),this.cameras.render(f,v),this.events.emit(a.RENDER,f)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(f){var v=this.events,d=this.settings;return this.settings.active&&(d.status=u.PAUSED,d.active=!1,v.emit(a.PAUSE,this,f)),this},resume:function(f){var v=this.events,d=this.settings;return this.settings.active||(d.status=u.RUNNING,d.active=!0,v.emit(a.RESUME,this,f)),this},sleep:function(f){var v=this.events,d=this.settings;return d.status=u.SLEEPING,d.active=!1,d.visible=!1,v.emit(a.SLEEP,this,f),this},wake:function(f){var v=this.events,d=this.settings;return d.status=u.RUNNING,d.active=!0,d.visible=!0,v.emit(a.WAKE,this,f),d.isTransition&&v.emit(a.TRANSITION_WAKE,d.transitionFrom,d.transitionDuration),this},getData:function(){return this.settings.data},isSleeping:function(){return this.settings.status===u.SLEEPING},isActive:function(){return this.settings.status===u.RUNNING},isPaused:function(){return this.settings.status===u.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(f){return this.settings.visible=f,this},setActive:function(f,v){return f?this.resume(v):this.pause(v)},start:function(f){var v=this.events,d=this.settings;f&&(d.data=f),d.status=u.START,d.active=!0,d.visible=!0,v.emit(a.START,this),v.emit(a.READY,this,f)},shutdown:function(f){var v=this.events,d=this.settings;v.off(a.TRANSITION_INIT),v.off(a.TRANSITION_START),v.off(a.TRANSITION_COMPLETE),v.off(a.TRANSITION_OUT),d.status=u.SHUTDOWN,d.active=!1,d.visible=!1,this.renderer===n.WEBGL&&this.renderer.resetTextures(!0),v.emit(a.SHUTDOWN,this,f)},destroy:function(){var f=this.events,v=this.settings;v.status=u.DESTROYED,v.active=!1,v.visible=!1,f.emit(a.DESTROY,this),f.removeAllListeners();for(var d=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],p=0;p<d.length;p++)this[d[p]]=null}});c.exports=h},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e&&e[0].toUpperCase()+e.slice(1)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(33),u=t(0),o=t(109),a=t(424),s="Texture.frame missing: ",i=new u({initialize:function(l,r,h,f,v){Array.isArray(h)||(h=[h]),this.manager=l,this.key=r,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var d=0;d<h.length;d++)this.source.push(new a(this,h[d],f,v))},add:function(n,l,r,h,f,v){if(this.has(n))return null;var d=new o(this,n,l,r,h,f,v);return this.frames[n]=d,this.firstFrame==="__BASE"&&(this.firstFrame=n),this.frameTotal++,d},remove:function(n){if(this.has(n)){var l=this.get(n);return l.destroy(),delete this.frames[n],!0}return!1},has:function(n){return this.frames[n]},get:function(n){n||(n=this.firstFrame);var l=this.frames[n];return l||(console.warn(s+n),l=this.frames[this.firstFrame]),l},getTextureSourceIndex:function(n){for(var l=0;l<this.source.length;l++)if(this.source[l]===n)return l;return-1},getFramesFromTextureSource:function(n,l){l===void 0&&(l=!1);var r=[];for(var h in this.frames)if(!(h==="__BASE"&&!l)){var f=this.frames[h];f.sourceIndex===n&&r.push(f)}return r},getFrameNames:function(n){n===void 0&&(n=!1);var l=Object.keys(this.frames);if(!n){var r=l.indexOf("__BASE");r!==-1&&l.splice(r,1)}return l},getSourceImage:function(n){(n==null||this.frameTotal===1)&&(n="__BASE");var l=this.frames[n];return l?l.source.image:(console.warn(s+n),this.frames.__BASE.source.image)},getDataSourceImage:function(n){(n==null||this.frameTotal===1)&&(n="__BASE");var l=this.frames[n],r;return l?r=l.sourceIndex:(console.warn(s+n),r=this.frames.__BASE.sourceIndex),this.dataSource[r].image},setDataSource:function(n){Array.isArray(n)||(n=[n]);for(var l=0;l<n.length;l++){var r=this.source[l];this.dataSource.push(new a(this,n[l],r.width,r.height))}},setFilter:function(n){var l;for(l=0;l<this.source.length;l++)this.source[l].setFilter(n);for(l=0;l<this.dataSource.length;l++)this.dataSource[l].setFilter(n)},destroy:function(){var n;for(n=0;n<this.source.length;n++)this.source[n].destroy();for(n=0;n<this.dataSource.length;n++)this.dataSource[n].destroy();for(var l in this.frames){var r=this.frames[l];r.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key);var h=this.manager.game.renderer;h&&h.type===e.WEBGL&&h.resetTextures(!0),this.manager=null}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(78),u=function(o,a,s,i,n){i===void 0&&(i=0),n===void 0&&(n=o.length);var l=[];if(e(o,i,n))for(var r=i;r<n;r++){var h=o[r];(!a||a&&s===void 0&&h.hasOwnProperty(a)||a&&s!==void 0&&h[a]===s)&&l.push(h)}return l};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Matrix:t(1013),Add:t(1021),AddAt:t(1022),BringToTop:t(1023),CountAllMatching:t(1024),Each:t(1025),EachInRange:t(1026),FindClosestInSorted:t(318),GetAll:t(207),GetFirst:t(428),GetRandom:t(210),MoveDown:t(1027),MoveTo:t(1028),MoveUp:t(1029),MoveAbove:t(1030),MoveBelow:t(1031),NumberArray:t(322),NumberArrayStep:t(1032),QuickSelect:t(436),Range:t(437),Remove:t(93),RemoveAt:t(1033),RemoveBetween:t(1034),RemoveRandomElement:t(1035),Replace:t(1036),RotateLeft:t(178),RotateRight:t(179),SafeRange:t(78),SendToBack:t(1037),SetAll:t(1038),Shuffle:t(131),SortByDigits:t(320),SpliceOne:t(74),StableSort:t(79),Swap:t(1039)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){if(!Array.isArray(e)||e.length<2||!Array.isArray(e[0]))return!1;for(var u=e[0].length,o=1;o<e.length;o++)if(e[o].length!==u)return!1;return!0};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){u===void 0&&(u=0),o===void 0&&(o=e.length);var a=u+Math.floor(Math.random()*o);return e[a]===void 0?null:e[a]};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(9),o=t(438),a=new e({Extends:u,initialize:function(){u.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},add:function(s){return this._pending.push(s),this._toProcess++,s},remove:function(s){return this._destroy.push(s),this._toProcess++,s},removeAll:function(){for(var s=this._active,i=this._destroy,n=s.length;n--;)i.push(s[n]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var s=this._destroy,i=this._active,n,l;for(n=0;n<s.length;n++){l=s[n];var r=i.indexOf(l);r!==-1&&(i.splice(r,1),this.emit(o.PROCESS_QUEUE_REMOVE,l))}for(s.length=0,s=this._pending,n=0;n<s.length;n++)l=s[n],(!this.checkQueue||this.checkQueue&&i.indexOf(l)===-1)&&(i.push(l),this.emit(o.PROCESS_QUEUE_ADD,l));return s.length=0,this._toProcess=0,i},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */function t(u,o){return parseInt(u.getAttribute(o),10)}var e=function(u,o,a,s,i){a===void 0&&(a=0),s===void 0&&(s=0);var n=o.cutX,l=o.cutY,r=o.source.width,h=o.source.height,f=o.sourceIndex,v={},d=u.getElementsByTagName("info")[0],p=u.getElementsByTagName("common")[0];v.font=d.getAttribute("face"),v.size=t(d,"size"),v.lineHeight=t(p,"lineHeight")+s,v.chars={};var g=u.getElementsByTagName("char"),m=o!==void 0&&o.trimmed;if(m)var x=o.height,y=o.width;for(var T=0;T<g.length;T++){var E=g[T],C=t(E,"id"),A=String.fromCharCode(C),P=t(E,"x"),M=t(E,"y"),O=t(E,"width"),I=t(E,"height");m&&(P<y&&(y=P),M<x&&(x=M)),m&&x!==0&&y!==0&&(P-=o.x,M-=o.y);var N=(n+P)/r,Y=(l+M)/h,X=(n+P+O)/r,W=(l+M+I)/h;if(v.chars[C]={x:P,y:M,width:O,height:I,centerX:Math.floor(O/2),centerY:Math.floor(I/2),xOffset:t(E,"xoffset"),yOffset:t(E,"yoffset"),xAdvance:t(E,"xadvance")+a,data:{},kerning:{},u0:N,v0:Y,u1:X,v1:W},i&&O!==0&&I!==0){var H=i.add(A,f,P,M,O,I);H&&H.setUVs(O,I,N,Y,X,W)}}var D=u.getElementsByTagName("kerning");for(T=0;T<D.length;T++){var L=D[T],B=t(L,"first"),G=t(L,"second"),w=t(L,"amount");v.chars[G].kerning[B]=w}return v};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1049),u=t(440),o=t(0),a=t(11),s=t(109),i=t(15),n=t(110),l=new o({Extends:i,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.ScrollFactor,a.Size,a.Texture,a.Transform,a.Visible,e],initialize:function(h,f,v,d,p){i.call(this,h,"Blitter"),this.setTexture(d,p),this.setPosition(f,v),this.initPipeline(),this.children=new n,this.renderList=[],this.dirty=!1},create:function(r,h,f,v,d){v===void 0&&(v=!0),d===void 0&&(d=this.children.length),f===void 0?f=this.frame:f instanceof s||(f=this.texture.get(f));var p=new u(this,r,h,f,v);return this.children.addAt(p,d,!1),this.dirty=!0,p},createFromCallback:function(r,h,f,v){for(var d=this.createMultiple(h,f,v),p=0;p<d.length;p++){var g=d[p];r.call(this,g,p)}return d},createMultiple:function(r,h,f){h===void 0&&(h=this.frame.name),f===void 0&&(f=!0),Array.isArray(h)||(h=[h]);var v=[],d=this;return h.forEach(function(p){for(var g=0;g<r;g++)v.push(d.create(0,0,p,f))}),v},childCanRender:function(r){return r.visible&&r.alpha>0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(208),u=t(35),o=t(0),a=t(11),s=t(75),i=t(15),n=t(10),l=t(1052),r=t(441),h=t(3),f=new o({Extends:i,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Pipeline,a.Transform,a.Visible,l],initialize:function(d,p,g,m){i.call(this,d,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=d.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(p,g),this.clearAlpha(),this.setBlendMode(u.SKIP_CHECK),m&&this.add(m)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(v){return v===void 0&&(v=!0),this.exclusive=v,this},getBounds:function(v){if(v===void 0&&(v=new n),v.setTo(this.x,this.y,0,0),this.parentContainer){var d=this.parentContainer.getBoundsTransformMatrix(),p=d.transformPoint(this.x,this.y);v.setTo(p.x,p.y,0,0)}if(this.list.length>0){var g=this.list,m=new n,x=!1;v.setEmpty();for(var y=0;y<g.length;y++){var T=g[y];T.getBounds&&(T.getBounds(m),x?r(m,v,v):(v.setTo(m.x,m.y,m.width,m.height),x=!0))}}return v},addHandler:function(v){v.once(s.DESTROY,this.remove,this),this.exclusive&&(v.parentContainer&&v.parentContainer.remove(v),v.removeFromDisplayList(),v.parentContainer=this)},removeHandler:function(v){v.off(s.DESTROY,this.remove),this.exclusive&&(v.parentContainer=null,v.addToDisplayList())},pointToContainer:function(v,d){d===void 0&&(d=new h),this.parentContainer?this.parentContainer.pointToContainer(v,d):d=new h(v.x,v.y);var p=this.tempTransformMatrix;return p.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),p.invert(),p.transformPoint(v.x,v.y,d),d},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(v){return e.Add(this.list,v,this.maxSize,this.addHandler,this),this},addAt:function(v,d){return e.AddAt(this.list,v,d,this.maxSize,this.addHandler,this),this},getAt:function(v){return this.list[v]},getIndex:function(v){return this.list.indexOf(v)},sort:function(v,d){return v?(d===void 0&&(d=function(p,g){return p[v]-g[v]}),e.StableSort(this.list,d),this):this},getByName:function(v){return e.GetFirst(this.list,"name",v)},getRandom:function(v,d){return e.GetRandom(this.list,v,d)},getFirst:function(v,d,p,g){return e.GetFirst(this.list,v,d,p,g)},getAll:function(v,d,p,g){return e.GetAll(this.list,v,d,p,g)},count:function(v,d,p,g){return e.CountAllMatching(this.list,v,d,p,g)},swap:function(v,d){return e.Swap(this.list,v,d),this},moveTo:function(v,d){return e.MoveTo(this.list,v,d),this},moveAbove:function(v,d){return e.MoveAbove(this.list,v,d),this},moveBelow:function(v,d){return e.MoveBelow(this.list,v,d),this},remove:function(v,d){var p=e.Remove(this.list,v,this.removeHandler,this);if(d&&p){Array.isArray(p)||(p=[p]);for(var g=0;g<p.length;g++)p[g].destroy()}return this},removeAt:function(v,d){var p=e.RemoveAt(this.list,v,this.removeHandler,this);return d&&p&&p.destroy(),this},removeBetween:function(v,d,p){var g=e.RemoveBetween(this.list,v,d,this.removeHandler,this);if(p)for(var m=0;m<g.length;m++)g[m].destroy();return this},removeAll:function(v){var d=e.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(v)for(var p=0;p<d.length;p++)d[p].destroy();return this},bringToTop:function(v){return e.BringToTop(this.list,v),this},sendToBack:function(v){return e.SendToBack(this.list,v),this},moveUp:function(v){return e.MoveUp(this.list,v),this},moveDown:function(v){return e.MoveDown(this.list,v),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return e.Shuffle(this.list),this},replace:function(v,d,p){var g=e.Replace(this.list,v,d);return g&&(this.addHandler(d),this.removeHandler(v),p&&v.destroy()),this},exists:function(v){return this.list.indexOf(v)>-1},setAll:function(v,d,p,g){return e.SetAll(this.list,v,d,p,g),this},each:function(v,d){var p=[null],g,m=this.list.slice(),x=m.length;for(g=2;g<arguments.length;g++)p.push(arguments[g]);for(g=0;g<x;g++)p[0]=m[g],v.apply(d,p);return this},iterate:function(v,d){var p=[null],g;for(g=2;g<arguments.length;g++)p.push(arguments[g]);for(g=0;g<this.list.length;g++)p[0]=this.list[g],v.apply(d,p);return this},setScrollFactor:function(v,d,p){return d===void 0&&(d=v),p===void 0&&(p=!1),this.scrollFactorX=v,this.scrollFactorY=d,p&&(e.SetAll(this.list,"scrollFactorX",v),e.SetAll(this.list,"scrollFactorY",d)),this},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});c.exports=f},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(148),u=t(0),o=t(1057),a=new u({Extends:e,Mixins:[o],initialize:function(i,n,l,r,h,f,v){e.call(this,i,n,l,r,h,f,v),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(s,i){return this.cropWidth=s,this.cropHeight=i,this},setDisplayCallback:function(s){return this.displayCallback=s,this},setScrollX:function(s){return this.scrollX=s,this},setScrollY:function(s){return this.scrollY=s,this}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(133),u=t(0),o=t(217),a=t(303),s=t(304),i=t(305),n=t(309),l=t(167),r=t(312),h=t(313),f=t(314),v=t(111),d=t(15),p=t(2),g=t(6),m=t(14),x=t(1063),y=new u({Extends:d,Mixins:[a,s,i,n,l,h,f,r,x],initialize:function(E,C){var A=g(C,"x",0),P=g(C,"y",0);d.call(this,E,"Graphics"),this.setPosition(A,P),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(C)},setDefaultStyles:function(T){return g(T,"lineStyle",null)&&(this.defaultStrokeWidth=g(T,"lineStyle.width",1),this.defaultStrokeColor=g(T,"lineStyle.color",16777215),this.defaultStrokeAlpha=g(T,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),g(T,"fillStyle",null)&&(this.defaultFillColor=g(T,"fillStyle.color",16777215),this.defaultFillAlpha=g(T,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(T,E,C){return C===void 0&&(C=1),this.commandBuffer.push(o.LINE_STYLE,T,E,C),this._lineWidth=T,this},fillStyle:function(T,E){return E===void 0&&(E=1),this.commandBuffer.push(o.FILL_STYLE,T,E),this},fillGradientStyle:function(T,E,C,A,P,M,O,I){return P===void 0&&(P=1),M===void 0&&(M=P),O===void 0&&(O=P),I===void 0&&(I=P),this.commandBuffer.push(o.GRADIENT_FILL_STYLE,P,M,O,I,T,E,C,A),this},lineGradientStyle:function(T,E,C,A,P,M){return M===void 0&&(M=1),this.commandBuffer.push(o.GRADIENT_LINE_STYLE,T,M,E,C,A,P),this},beginPath:function(){return this.commandBuffer.push(o.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(o.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(o.FILL_PATH),this},fill:function(){return this.commandBuffer.push(o.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(o.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(o.STROKE_PATH),this},fillCircleShape:function(T){return this.fillCircle(T.x,T.y,T.radius)},strokeCircleShape:function(T){return this.strokeCircle(T.x,T.y,T.radius)},fillCircle:function(T,E,C){return this.beginPath(),this.arc(T,E,C,0,m.PI2),this.fillPath(),this},strokeCircle:function(T,E,C){return this.beginPath(),this.arc(T,E,C,0,m.PI2),this.strokePath(),this},fillRectShape:function(T){return this.fillRect(T.x,T.y,T.width,T.height)},strokeRectShape:function(T){return this.strokeRect(T.x,T.y,T.width,T.height)},fillRect:function(T,E,C,A){return this.commandBuffer.push(o.FILL_RECT,T,E,C,A),this},strokeRect:function(T,E,C,A){var P=this._lineWidth/2,M=T-P,O=T+P;return this.beginPath(),this.moveTo(T,E),this.lineTo(T,E+A),this.strokePath(),this.beginPath(),this.moveTo(T+C,E),this.lineTo(T+C,E+A),this.strokePath(),this.beginPath(),this.moveTo(M,E),this.lineTo(O+C,E),this.strokePath(),this.beginPath(),this.moveTo(M,E+A),this.lineTo(O+C,E+A),this.strokePath(),this},fillRoundedRect:function(T,E,C,A,P){P===void 0&&(P=20);var M=P,O=P,I=P,N=P;return typeof P!="number"&&(M=p(P,"tl",20),O=p(P,"tr",20),I=p(P,"bl",20),N=p(P,"br",20)),this.beginPath(),this.moveTo(T+M,E),this.lineTo(T+C-O,E),this.arc(T+C-O,E+O,O,-m.TAU,0),this.lineTo(T+C,E+A-N),this.arc(T+C-N,E+A-N,N,0,m.TAU),this.lineTo(T+I,E+A),this.arc(T+I,E+A-I,I,m.TAU,Math.PI),this.lineTo(T,E+M),this.arc(T+M,E+M,M,-Math.PI,-m.TAU),this.fillPath(),this},strokeRoundedRect:function(T,E,C,A,P){P===void 0&&(P=20);var M=P,O=P,I=P,N=P;return typeof P!="number"&&(M=p(P,"tl",20),O=p(P,"tr",20),I=p(P,"bl",20),N=p(P,"br",20)),this.beginPath(),this.moveTo(T+M,E),this.lineTo(T+C-O,E),this.moveTo(T+C-O,E),this.arc(T+C-O,E+O,O,-m.TAU,0),this.lineTo(T+C,E+A-N),this.moveTo(T+C,E+A-N),this.arc(T+C-N,E+A-N,N,0,m.TAU),this.lineTo(T+I,E+A),this.moveTo(T+I,E+A),this.arc(T+I,E+A-I,I,m.TAU,Math.PI),this.lineTo(T,E+M),this.moveTo(T,E+M),this.arc(T+M,E+M,M,-Math.PI,-m.TAU),this.strokePath(),this},fillPointShape:function(T,E){return this.fillPoint(T.x,T.y,E)},fillPoint:function(T,E,C){return!C||C<1?C=1:(T-=C/2,E-=C/2),this.commandBuffer.push(o.FILL_RECT,T,E,C,C),this},fillTriangleShape:function(T){return this.fillTriangle(T.x1,T.y1,T.x2,T.y2,T.x3,T.y3)},strokeTriangleShape:function(T){return this.strokeTriangle(T.x1,T.y1,T.x2,T.y2,T.x3,T.y3)},fillTriangle:function(T,E,C,A,P,M){return this.commandBuffer.push(o.FILL_TRIANGLE,T,E,C,A,P,M),this},strokeTriangle:function(T,E,C,A,P,M){return this.commandBuffer.push(o.STROKE_TRIANGLE,T,E,C,A,P,M),this},strokeLineShape:function(T){return this.lineBetween(T.x1,T.y1,T.x2,T.y2)},lineBetween:function(T,E,C,A){return this.beginPath(),this.moveTo(T,E),this.lineTo(C,A),this.strokePath(),this},lineTo:function(T,E){return this.commandBuffer.push(o.LINE_TO,T,E),this},moveTo:function(T,E){return this.commandBuffer.push(o.MOVE_TO,T,E),this},strokePoints:function(T,E,C,A){E===void 0&&(E=!1),C===void 0&&(C=!1),A===void 0&&(A=T.length),this.beginPath(),this.moveTo(T[0].x,T[0].y);for(var P=1;P<A;P++)this.lineTo(T[P].x,T[P].y);return E&&this.lineTo(T[0].x,T[0].y),C&&this.closePath(),this.strokePath(),this},fillPoints:function(T,E,C,A){E===void 0&&(E=!1),C===void 0&&(C=!1),A===void 0&&(A=T.length),this.beginPath(),this.moveTo(T[0].x,T[0].y);for(var P=1;P<A;P++)this.lineTo(T[P].x,T[P].y);return E&&this.lineTo(T[0].x,T[0].y),C&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(T,E){E===void 0&&(E=32);var C=T.getPoints(E);return this.strokePoints(C,!0)},strokeEllipse:function(T,E,C,A,P){P===void 0&&(P=32);var M=new v(T,E,C,A),O=M.getPoints(P);return this.strokePoints(O,!0)},fillEllipseShape:function(T,E){E===void 0&&(E=32);var C=T.getPoints(E);return this.fillPoints(C,!0)},fillEllipse:function(T,E,C,A,P){P===void 0&&(P=32);var M=new v(T,E,C,A),O=M.getPoints(P);return this.fillPoints(O,!0)},arc:function(T,E,C,A,P,M,O){return M===void 0&&(M=!1),O===void 0&&(O=0),this.commandBuffer.push(o.ARC,T,E,C,A,P,M,O),this},slice:function(T,E,C,A,P,M,O){return M===void 0&&(M=!1),O===void 0&&(O=0),this.commandBuffer.push(o.BEGIN_PATH),this.commandBuffer.push(o.MOVE_TO,T,E),this.commandBuffer.push(o.ARC,T,E,C,A,P,M,O),this.commandBuffer.push(o.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(o.SAVE),this},restore:function(){return this.commandBuffer.push(o.RESTORE),this},translateCanvas:function(T,E){return this.commandBuffer.push(o.TRANSLATE,T,E),this},scaleCanvas:function(T,E){return this.commandBuffer.push(o.SCALE,T,E),this},rotateCanvas:function(T){return this.commandBuffer.push(o.ROTATE,T),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(T,E,C){var A=this.scene.sys,P=A.game.renderer;E===void 0&&(E=A.scale.width),C===void 0&&(C=A.scale.height),y.TargetCamera.setScene(this.scene),y.TargetCamera.setViewport(0,0,E,C),y.TargetCamera.scrollX=this.x,y.TargetCamera.scrollY=this.y;var M,O;if(typeof T=="string")if(A.textures.exists(T)){M=A.textures.get(T);var I=M.getSourceImage();I instanceof HTMLCanvasElement&&(O=I.getContext("2d"))}else M=A.textures.createCanvas(T,E,C),O=M.getSourceImage().getContext("2d");else T instanceof HTMLCanvasElement&&(O=T.getContext("2d"));return O&&(this.renderCanvas(P,this,y.TargetCamera,null,O,!1),M&&M.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});y.TargetCamera=new e,c.exports=y},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a,s){s===void 0&&(s=new e);var i=o.width/2,n=o.height/2;return s.x=o.x+i*Math.cos(a),s.y=o.y+n*Math.sin(a),s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(35),u=t(0),o=t(11),a=t(176),s=t(101),i=t(9),n=t(75),l=t(110),r=t(1071),h=t(20),f=t(79),v=new u({Extends:l,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.Visible,i,r],initialize:function(p,g){l.call(this,p),i.call(this),this.scene=p,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=p.sys,this.events=p.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(e.SKIP_CHECK),g&&this.add(g),p.sys.queueDepthSort()},setActive:function(d){return this.active=d,this},setName:function(d){return this.name=d,this},setState:function(d){return this.state=d,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(d,p){return this.data||(this.data=new s(this)),this.data.set(d,p),this},incData:function(d,p){return this.data||(this.data=new s(this)),this.data.inc(d,p),this},toggleData:function(d){return this.data||(this.data=new s(this)),this.data.toggle(d),this},getData:function(d){return this.data||(this.data=new s(this)),this.data.get(d)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return a(this)},willRender:function(d){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&d.id)},getIndexList:function(){for(var d=this,p=this.parentContainer,g=[];p&&(g.unshift(p.getIndex(d)),d=p,p.parentContainer);)p=p.parentContainer;return g.unshift(this.displayList.getIndex(d)),g},addChildCallback:function(d){d.displayList&&d.displayList!==this&&d.removeFromDisplayList(),d.displayList||(this.queueDepthSort(),d.displayList=this,d.emit(n.ADDED_TO_SCENE,d,this.scene),this.events.emit(h.ADDED_TO_SCENE,d,this.scene))},removeChildCallback:function(d){this.queueDepthSort(),d.displayList=null,d.emit(n.REMOVED_FROM_SCENE,d,this.scene),this.events.emit(h.REMOVED_FROM_SCENE,d,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(d,p){return d._depth-p._depth},getChildren:function(){return this.list},destroy:function(){if(!(!this.scene||this.ignoreDestroy)){this.emit(n.DESTROY,this);for(var d=this.list.length;d--;)this.list[d].destroy();this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(15),a=t(450),s=t(110),i=t(452),n=t(1075),l=new e({Extends:o,Mixins:[u.Depth,u.Mask,u.Pipeline,u.Transform,u.Visible,n],initialize:function(h,f,v,d){if(o.call(this,h,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],v!==null&&(typeof v=="object"||Array.isArray(v))&&(d=v,v=null),this.setTexture(f,v),this.initPipeline(),this.emitters=new s(this),this.wells=new s(this),d){Array.isArray(d)||(d=[d]);for(var p=0;p<d.length;p++)this.createEmitter(d[p])}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setTexture:function(r,h){return this.texture=this.scene.sys.textures.get(r),this.setFrame(h)},setFrame:function(r){this.frame=this.texture.get(r);var h=this.texture.getFramesFromTextureSource(this.frame.sourceIndex),f=[];return h.forEach(function(v){f.push(v.name)}),this.frameNames=f,this.defaultFrame=this.frame,this},setEmitterFrames:function(r,h){Array.isArray(r)||(r=[r]);var f=h.frames;f.length=0;for(var v=0;v<r.length;v++){var d=r[v];this.frameNames.indexOf(d)!==-1&&f.push(this.texture.get(d))}return f.length>0?h.defaultFrame=f[0]:h.defaultFrame=this.defaultFrame,this},addEmitter:function(r){return this.emitters.add(r)},createEmitter:function(r){return this.addEmitter(new i(this,r))},removeEmitter:function(r){return this.emitters.remove(r,!0)},addGravityWell:function(r){return this.wells.add(r)},createGravityWell:function(r){return this.addGravityWell(new a(r))},emitParticle:function(r,h,f){for(var v=this.emitters.list,d=0;d<v.length;d++){var p=v[d];p.active&&p.emitParticle(r,h,f)}return this},emitParticleAt:function(r,h,f){return this.emitParticle(f,r,h)},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},getProcessors:function(){return this.wells.getAll("active",!0)},preUpdate:function(r,h){h*=this.timeScale;for(var f=this.emitters.list,v=0;v<f.length;v++){var d=f[v];d.active&&d.preUpdate(r,h)}},setAlpha:function(){},setScrollFactor:function(){},setBlendMode:function(){}});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(35),u=t(133),o=t(31),a=t(0),s=t(11),i=t(33),n=t(109),l=t(15),r=t(1),h=t(92),f=t(1079),v=t(141),d=t(12),p=t(222),g=new a({Extends:l,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Crop,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Tint,s.Transform,s.Visible,f],initialize:function(x,y,T,E,C,A,P){y===void 0&&(y=0),T===void 0&&(T=0),E===void 0&&(E=32),C===void 0&&(C=32),l.call(this,x,"RenderTexture"),this.renderer=x.sys.renderer,this.textureManager=x.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=null,this.dirty=!1,this._crop=this.resetCropObject(),this.texture=null,this.frame=null,this._saved=!1,A===void 0?(this.canvas=o.create2D(this,E,C),this.texture=x.sys.textures.addCanvas(p(),this.canvas),this.frame=this.texture.get()):(this.texture=x.sys.textures.get(A),this.frame=this.texture.get(P),this.canvas=this.frame.source.image,this._saved=!0,this.dirty=!0,this.width=this.frame.cutWidth,this.height=this.frame.cutHeight),this.context=this.canvas.getContext("2d"),this._eraseMode=!1,this.camera=new u(0,0,E,C),this.renderTarget=null;var M=this.renderer;M?M.type===i.WEBGL?(this.drawGameObject=this.batchGameObjectWebGL,this.renderTarget=new v(M,E,C,1,0,!1)):M.type===i.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas):this.drawGameObject=r,this.camera.setScene(x),this.setPosition(y,T),A===void 0&&this.setSize(E,C),this.setOrigin(0,0),this.initPipeline(h.SINGLE_PIPELINE)},setSize:function(m,x){return this.resize(m,x)},resize:function(m,x){x===void 0&&(x=m);var y=this.frame;if(m!==this.width||x!==this.height){if(y.name==="__BASE"){this.canvas.width=m,this.canvas.height=x,this.texture.width=m,this.texture.height=x;var T=this.renderTarget;T&&(T.resize(m,x),y.glTexture=T.texture,y.source.isRenderTexture=!0,y.source.isGLTexture=!0,y.source.glTexture=T.texture),this.camera.setSize(m,x),y.source.width=m,y.source.height=x,y.setSize(m,x),this.width=m,this.height=x}}else{var E=this.texture.getSourceImage();y.cutX+m>E.width&&(m=E.width-y.cutX),y.cutY+x>E.height&&(x=E.height-y.cutY),y.setSize(m,x,y.cutX,y.cutY)}this.updateDisplayOrigin();var C=this.input;return C&&!C.customHitArea&&(C.hitArea.width=m,C.hitArea.height=x),this},setGlobalTint:function(m){return this.globalTint=m,this},setGlobalAlpha:function(m){return this.globalAlpha=m,this},saveTexture:function(m){return this.textureManager.renameTexture(this.texture.key,m),this._saved=!0,this.texture},fill:function(m,x,y,T,E,C){var A=this.frame,P=this.camera,M=this.renderer;x===void 0&&(x=1),y===void 0&&(y=0),T===void 0&&(T=0),E===void 0&&(E=A.cutWidth),C===void 0&&(C=A.cutHeight);var O=(m>>16&255)/255,I=(m>>8&255)/255,N=(m&255)/255,Y=this.renderTarget;if(P.preRender(),Y){Y.bind(!0);var X=this.pipeline;X.manager.set(X);var W=Y.width,H=Y.height,D=M.width,L=M.height,B=D/W,G=L/H;X.drawFillRect(y*B,T*G,E*B,C*G,d.getTintFromFloats(N,I,O,1),x),Y.unbind(!0)}else{var w=this.context;M.setContext(w),w.fillStyle="rgba("+O+","+I+","+N+","+x+")",w.fillRect(y+A.cutX,T+A.cutY,E,C),M.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var m=this.renderTarget;if(m)m.clear();else{var x=this.context;x.save(),x.setTransform(1,0,0,1,0,0),x.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),x.restore()}this.dirty=!1}return this},erase:function(m,x,y){return this._eraseMode=!0,this.draw(m,x,y,1,16777215),this._eraseMode=!1,this},draw:function(m,x,y,T,E){return this.beginDraw(),this.batchDraw(m,x,y,T,E),this.endDraw(),this},drawFrame:function(m,x,y,T,E,C){return this.beginDraw(),this.batchDrawFrame(m,x,y,T,E,C),this.endDraw(),this},beginDraw:function(){var m=this.camera,x=this.renderer,y=this.renderTarget;return m.preRender(),y?x.beginCapture(y.width,y.height):x.setContext(this.context),this},batchDraw:function(m,x,y,T,E){return T===void 0&&(T=this.globalAlpha),E===void 0?E=(this.globalTint>>16)+(this.globalTint&65280)+((this.globalTint&255)<<16):E=(E>>16)+(E&65280)+((E&255)<<16),Array.isArray(m)||(m=[m]),this.batchList(m,x,y,T,E),this},batchDrawFrame:function(m,x,y,T,E,C){y===void 0&&(y=0),T===void 0&&(T=0),E===void 0&&(E=this.globalAlpha),C===void 0?C=(this.globalTint>>16)+(this.globalTint&65280)+((this.globalTint&255)<<16):C=(C>>16)+(C&65280)+((C&255)<<16);var A=this.textureManager.getFrame(m,x);return A&&(this.renderTarget?this.pipeline.batchTextureFrame(A,y,T,C,E,this.camera.matrix,null):this.batchTextureFrame(A,y+this.frame.cutX,T+this.frame.cutY,E,C)),this},endDraw:function(m){m===void 0&&(m=this._eraseMode);var x=this.renderer,y=this.renderTarget;if(y){var T=x.endCapture(),E=x.pipelines.setUtility();E.blitFrame(T,y,1,!1,!1,m),x.resetScissor(),x.resetViewport()}else x.setContext();return this.dirty=!0,this},batchList:function(m,x,y,T,E){for(var C=0;C<m.length;C++){var A=m[C];!A||A===this||(A.renderWebGL||A.renderCanvas?this.drawGameObject(A,x,y):A.isParent||A.list?this.batchGroup(A.getChildren(),x,y):typeof A=="string"?this.batchTextureFrameKey(A,null,x,y,T,E):A instanceof n?this.batchTextureFrame(A,x,y,T,E):Array.isArray(A)&&this.batchList(A,x,y,T,E))}},batchGroup:function(m,x,y){x===void 0&&(x=0),y===void 0&&(y=0),x+=this.frame.cutX,y+=this.frame.cutY;for(var T=0;T<m.length;T++){var E=m[T];if(E.willRender(this.camera)){var C=E.x+x,A=E.y+y;this.drawGameObject(E,C,A)}}},batchGameObjectWebGL:function(m,x,y){x===void 0&&(x=m.x),y===void 0&&(y=m.y);var T=m.x,E=m.y;m.setPosition(x+this.frame.cutX,y+this.frame.cutY),m.renderDirect?m.renderDirect(this.renderer,m,this.camera):m.renderWebGL(this.renderer,m,this.camera),m.setPosition(T,E)},batchGameObjectCanvas:function(m,x,y){x===void 0&&(x=m.x),y===void 0&&(y=m.y);var T=m.x,E=m.y;if(this._eraseMode){var C=m.blendMode;m.blendMode=e.ERASE}m.setPosition(x+this.frame.cutX,y+this.frame.cutY),m.renderCanvas(this.renderer,m,this.camera,null),m.setPosition(T,E),this._eraseMode&&(m.blendMode=C)},batchTextureFrameKey:function(m,x,y,T,E,C){var A=this.textureManager.getFrame(m,x);A&&this.batchTextureFrame(A,y,T,E,C)},batchTextureFrame:function(m,x,y,T,E){x===void 0&&(x=0),y===void 0&&(y=0),x+=this.frame.cutX,y+=this.frame.cutY;var C=this.renderTarget;if(C)this.pipeline.batchTextureFrame(m,x,y,E,T,this.camera.matrix,null);else{var A=this.context,P=m.canvasData,M=m.source.image,O=this.camera.matrix;A.save(),A.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",A.globalAlpha=T,O.setToContext(A),A.drawImage(M,P.x,P.y,P.width,P.height,x,y,P.width,P.height),A.restore()}},snapshotArea:function(m,x,y,T,E,C,A){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,E,!1,m,x,y,T,C,A):this.renderer.snapshotCanvas(this.canvas,E,!1,m,x,y,T,C,A),this},snapshot:function(m,x,y){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,m,!1,0,0,this.width,this.height,x,y):this.renderer.snapshotCanvas(this.canvas,m,!1,0,0,this.width,this.height,x,y),this},snapshotPixel:function(m,x,y){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,y,!0,m,x):this.renderer.snapshotCanvas(this.canvas,y,!0,m,x),this},preDestroy:function(){this._saved||(o.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.texture.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.texture=null)}});c.exports=g},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var u=Math.random()*16|0,o=e==="x"?u:u&3|8;return o.toString(16)})};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(164),u=t(0),o=t(11),a=t(15),s=t(92),i=t(1085),n=t(3),l=new u({Extends:a,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Flip,o.Mask,o.Pipeline,o.Size,o.Texture,o.Transform,o.Visible,o.ScrollFactor,i],initialize:function(h,f,v,d,p,g,m,x,y){d===void 0&&(d="__DEFAULT"),g===void 0&&(g=2),m===void 0&&(m=!0),a.call(this,h,"Rope"),this.anims=new e(this),this.points=g,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=d==="__DEFAULT",this.dirty=!1,this.horizontal=m,this._flipX=!1,this._flipY=!1,this._perp=new n,this.debugCallback=null,this.debugGraphic=null,this.setTexture(d,p),this.setPosition(f,v),this.setSizeToFrame(),this.initPipeline(s.ROPE_PIPELINE),Array.isArray(g)&&this.resizeArrays(g.length),this.setPoints(g,x,y),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(r,h){var f=this.anims.currentFrame;this.anims.update(r,h),this.anims.currentFrame!==f&&(this.updateUVs(),this.updateVertices())},play:function(r,h,f){return this.anims.play(r,h,f),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(r,h,f){return r===void 0&&(r=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(r,h,f))},setVertical:function(r,h,f){return r===void 0&&(r=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(r,h,f)):this},setTintFill:function(r){return r===void 0&&(r=!1),this.tintFill=r,this},setAlphas:function(r,h){var f=this.points.length;if(f<1)return this;var v=this.alphas;r===void 0?r=[1]:!Array.isArray(r)&&h===void 0&&(r=[r]);var d,p=0;if(h!==void 0)for(d=0;d<f;d++)p=d*2,v[p]=r,v[p+1]=h;else if(r.length===f)for(d=0;d<f;d++)p=d*2,v[p]=r[d],v[p+1]=r[d];else{var g=r[0];for(d=0;d<f;d++)p=d*2,r.length>p&&(g=r[p]),v[p]=g,r.length>p+1&&(g=r[p+1]),v[p+1]=g}return this},setColors:function(r){var h=this.points.length;if(h<1)return this;var f=this.colors;r===void 0?r=[16777215]:Array.isArray(r)||(r=[r]);var v,d=0;if(r.length===h)for(v=0;v<h;v++)d=v*2,f[d]=r[v],f[d+1]=r[v];else{var p=r[0];for(v=0;v<h;v++)d=v*2,r.length>d&&(p=r[d]),f[d]=p,r.length>d+1&&(p=r[d+1]),f[d+1]=p}return this},setPoints:function(r,h,f){if(r===void 0&&(r=2),typeof r=="number"){var v=r;v<2&&(v=2),r=[];var d,p,g;if(this.horizontal)for(g=-this.frame.halfWidth,p=this.frame.width/(v-1),d=0;d<v;d++)r.push({x:g+d*p,y:0});else for(g=-this.frame.halfHeight,p=this.frame.height/(v-1),d=0;d<v;d++)r.push({x:0,y:g+d*p})}var m=r.length,x=this.points.length;return m<1?(console.warn("Rope: Not enough points given"),this):(m===1&&(r.unshift({x:0,y:0}),m++),x!==m&&this.resizeArrays(m),this.points=r,this.updateUVs(),h!=null&&this.setColors(h),f!=null&&this.setAlphas(f),this)},updateUVs:function(){for(var r=this.uv,h=this.points.length,f=this.frame.u0,v=this.frame.v0,d=this.frame.u1,p=this.frame.v1,g=(d-f)/(h-1),m=(p-v)/(h-1),x=0;x<h;x++){var y=x*4,T,E,C,A;this.horizontal?(this._flipX?(T=d-x*g,C=d-x*g):(T=f+x*g,C=f+x*g),this._flipY?(E=p,A=v):(E=v,A=p)):(this._flipX?(T=f,C=d):(T=d,C=f),this._flipY?(E=p-x*m,A=p-x*m):(E=v+x*m,A=v+x*m)),r[y+0]=T,r[y+1]=E,r[y+2]=C,r[y+3]=A}return this},resizeArrays:function(r){var h=this.colors,f=this.alphas;this.vertices=new Float32Array(r*4),this.uv=new Float32Array(r*4),h=new Uint32Array(r*2),f=new Float32Array(r*2);for(var v=0;v<r*2;v++)h[v]=16777215,f[v]=1;return this.colors=h,this.alphas=f,this.dirty=!0,this},updateVertices:function(){var r=this._perp,h=this.points,f=this.vertices,v=h.length;if(this.dirty=!1,!(v<1)){for(var d,p=h[0],g=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,m=0;m<v;m++){var x=h[m],y=m*4;m<v-1?d=h[m+1]:d=x,r.x=d.y-p.y,r.y=-(d.x-p.x);var T=r.length();r.x/=T,r.y/=T,r.x*=g,r.y*=g,f[y]=x.x+r.x,f[y+1]=x.y+r.y,f[y+2]=x.x-r.x,f[y+3]=x.y-r.y,p=x}return this}},setDebug:function(r,h){return this.debugGraphic=r,!r&&!h?this.debugCallback=null:h?this.debugCallback=h:this.debugCallback=this.renderDebugVerts,this},renderDebugVerts:function(r,h,f){var v=r.debugGraphic,d=f[0],p=f[1],g=f[2],m=f[3];v.lineBetween(d,p,g,m);for(var x=4;x<h;x+=4){var y=f[x+0],T=f[x+1],E=f[x+2],C=f[x+3];v.lineBetween(d,p,y,T),v.lineBetween(g,m,E,C),v.lineBetween(g,m,y,T),v.lineBetween(y,T,E,C),d=y,p=T,g=E,m=C}},preDestroy:function(){this.anims.destroy(),this.anims=void 0,this.points=null,this.vertices=null,this.uv=null,this.colors=null,this.alphas=null,this.debugCallback=null,this.debugGraphic=null},flipX:{get:function(){return this._flipX},set:function(r){return this._flipX=r,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(r){return this._flipY=r,this.updateUVs()}}});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(142),u=t(31),o=t(0),a=t(11),s=t(22),i=t(15),n=t(458),l=t(6),r=t(202),h=t(1088),f=t(459),v=new o({Extends:i,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,h],initialize:function(p,g,m,x,y){g===void 0&&(g=0),m===void 0&&(m=0),i.call(this,p,"Text"),this.renderer=p.sys.renderer,this.setPosition(g,m),this.setOrigin(0,0),this.initPipeline(),this.canvas=u.create(this),this.context=this.canvas.getContext("2d"),this.style=new f(this,y),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=p.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(x),y&&y.padding&&this.setPadding(y.padding),y&&y.lineSpacing&&this.setLineSpacing(y.lineSpacing),p.sys.game.events.on(s.CONTEXT_RESTORED,function(){this.dirty=!0},this)},initRTL:function(){!this.style.rtl||(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",e(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(d){var p=this.style;if(p.wordWrapCallback){var g=p.wordWrapCallback.call(p.wordWrapCallbackScope,d,this);return Array.isArray(g)&&(g=g.join(`
`)),g}else return p.wordWrapWidth?p.wordWrapUseAdvanced?this.advancedWordWrap(d,this.context,this.style.wordWrapWidth):this.basicWordWrap(d,this.context,this.style.wordWrapWidth):d},advancedWordWrap:function(d,p,g){for(var m="",x=d.replace(/ +/gi," ").split(this.splitRegExp),y=x.length,T=0;T<y;T++){var E=x[T],C="";E=E.replace(/^ *|\s*$/gi,"");var A=p.measureText(E).width;if(A<g){m+=E+`
`;continue}for(var P=g,M=E.split(" "),O=0;O<M.length;O++){var I=M[O],N=I+" ",Y=p.measureText(N).width;if(Y>P){if(O===0){for(var X=N;X.length&&(X=X.slice(0,-1),Y=p.measureText(X).width,!(Y<=P)););if(!X.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var W=I.substr(X.length);M[O]=W,C+=X}var H=M[O].length?O:O+1,D=M.slice(H).join(" ").replace(/[ \n]*$/gi,"");x[T+1]=D+" "+(x[T+1]||""),y=x.length;break}else C+=N,P-=Y}m+=C.replace(/[ \n]*$/gi,"")+`
`}return m=m.replace(/[\s|\n]*$/gi,""),m},basicWordWrap:function(d,p,g){for(var m="",x=d.split(this.splitRegExp),y=x.length-1,T=p.measureText(" ").width,E=0;E<=y;E++){for(var C=g,A=x[E].split(" "),P=A.length-1,M=0;M<=P;M++){var O=A[M],I=p.measureText(O).width,N=I;M<P&&(N+=T),N>C&&M>0&&(m+=`
`,C=g),m+=O,M<P?(m+=" ",C-=N):C-=I}E<y&&(m+=`
`)}return m},getWrappedText:function(d){d===void 0&&(d=this._text),this.style.syncFont(this.canvas,this.context);var p=this.runWordWrap(d);return p.split(this.splitRegExp)},setText:function(d){return!d&&d!==0&&(d=""),Array.isArray(d)&&(d=d.join(`
`)),d!==this._text&&(this._text=d.toString(),this.updateText()),this},setStyle:function(d){return this.style.setStyle(d)},setFont:function(d){return this.style.setFont(d)},setFontFamily:function(d){return this.style.setFontFamily(d)},setFontSize:function(d){return this.style.setFontSize(d)},setFontStyle:function(d){return this.style.setFontStyle(d)},setFixedSize:function(d,p){return this.style.setFixedSize(d,p)},setBackgroundColor:function(d){return this.style.setBackgroundColor(d)},setFill:function(d){return this.style.setFill(d)},setColor:function(d){return this.style.setColor(d)},setStroke:function(d,p){return this.style.setStroke(d,p)},setShadow:function(d,p,g,m,x,y){return this.style.setShadow(d,p,g,m,x,y)},setShadowOffset:function(d,p){return this.style.setShadowOffset(d,p)},setShadowColor:function(d){return this.style.setShadowColor(d)},setShadowBlur:function(d){return this.style.setShadowBlur(d)},setShadowStroke:function(d){return this.style.setShadowStroke(d)},setShadowFill:function(d){return this.style.setShadowFill(d)},setWordWrapWidth:function(d,p){return this.style.setWordWrapWidth(d,p)},setWordWrapCallback:function(d,p){return this.style.setWordWrapCallback(d,p)},setAlign:function(d){return this.style.setAlign(d)},setResolution:function(d){return this.style.setResolution(d)},setLineSpacing:function(d){return this.lineSpacing=d,this.updateText()},setPadding:function(d,p,g,m){if(typeof d=="object"){var x=d,y=l(x,"x",null);y!==null?(d=y,g=y):(d=l(x,"left",0),g=l(x,"right",d));var T=l(x,"y",null);T!==null?(p=T,m=T):(p=l(x,"top",0),m=l(x,"bottom",p))}else d===void 0&&(d=0),p===void 0&&(p=d),g===void 0&&(g=d),m===void 0&&(m=p);return this.padding.left=d,this.padding.top=p,this.padding.right=g,this.padding.bottom=m,this.updateText()},setMaxLines:function(d){return this.style.setMaxLines(d)},updateText:function(){var d=this.canvas,p=this.context,g=this.style,m=g.resolution,x=g.metrics;g.syncFont(d,p);var y=this._text;(g.wordWrapWidth||g.wordWrapCallback)&&(y=this.runWordWrap(this._text));var T=y.split(this.splitRegExp),E=n(this,x,T),C=this.padding,A;g.fixedWidth===0?(this.width=E.width+C.left+C.right,A=E.width):(this.width=g.fixedWidth,A=this.width-C.left-C.right,A<E.width&&(A=E.width)),g.fixedHeight===0?this.height=E.height+C.top+C.bottom:this.height=g.fixedHeight;var P=this.width,M=this.height;this.updateDisplayOrigin(),P*=m,M*=m,P=Math.max(P,1),M=Math.max(M,1),d.width!==P||d.height!==M?(d.width=P,d.height=M,this.frame.setSize(P,M),g.syncFont(d,p)):p.clearRect(0,0,P,M),p.save(),p.scale(m,m),g.backgroundColor&&(p.fillStyle=g.backgroundColor,p.fillRect(0,0,P,M)),g.syncStyle(d,p),p.textBaseline="alphabetic",p.translate(C.left,C.top);for(var O,I,N=0;N<E.lines;N++){if(O=g.strokeThickness/2,I=g.strokeThickness/2+N*E.lineHeight+x.ascent,N>0&&(I+=E.lineSpacing*N),g.rtl)O=P-O;else if(g.align==="right")O+=A-E.lineWidths[N];else if(g.align==="center")O+=(A-E.lineWidths[N])/2;else if(g.align==="justify"){var Y=.85;if(E.lineWidths[N]/E.width>=Y){var X=E.width-E.lineWidths[N],W=p.measureText(" ").width,H=T[N].trim(),D=H.split(" ");X+=(T[N].length-H.length)*W;for(var L=Math.floor(X/W),B=0;L>0;)D[B]+=" ",B=(B+1)%(D.length-1||1),--L;T[N]=D.join(" ")}}this.autoRound&&(O=Math.round(O),I=Math.round(I)),g.strokeThickness&&(this.style.syncShadow(p,g.shadowStroke),p.strokeText(T[N],O,I)),g.color&&(this.style.syncShadow(p,g.shadowFill),p.fillText(T[N],O,I))}p.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(d,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var G=this.input;return G&&!G.customHitArea&&(G.hitArea.width=this.width,G.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(d){this.setText(d)}},toJSON:function(){var d=a.ToJSON(this),p={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return d.data=p,d},preDestroy:function(){this.style.rtl&&r(this.canvas),u.remove(this.canvas),this.texture.destroy()}});c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(31),u=t(0),o=t(11),a=t(22),s=t(15),i=t(361),n=t(192),l=t(1091),r=t(3),h=8,f=new u({Extends:s,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,l],initialize:function(d,p,g,m,x,y,T){var E=d.sys.renderer;s.call(this,d,"TileSprite");var C=d.sys.textures.get(y),A=C.get(T);!m||!x?(m=A.width,x=A.height):(m=Math.floor(m),x=Math.floor(x)),this._tilePosition=new r,this._tileScale=new r(1,1),this.dirty=!1,this.renderer=E,this.canvas=e.create(this,m,x),this.context=this.canvas.getContext("2d"),this.displayTexture=C,this.displayFrame=A,this._crop=this.resetCropObject(),this.texture=d.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=i(A.width),this.potHeight=i(A.height),this.fillCanvas=e.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(p,g),this.setSize(m,x),this.setFrame(T),this.setOriginFromFrame(),this.initPipeline(),d.sys.game.events.on(a.CONTEXT_RESTORED,function(P){if(!!P){var M=P.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=P.createTexture2D(0,M.LINEAR,M.LINEAR,M.REPEAT,M.REPEAT,M.RGBA,this.fillCanvas,this.potWidth,this.potHeight)}},this)},setTexture:function(v,d){return this.displayTexture=this.scene.sys.textures.get(v),this.setFrame(d)},setFrame:function(v){var d=this.displayTexture.get(v);return this.potWidth=i(d.width),this.potHeight=i(d.height),this.canvas.width=0,!d.cutWidth||!d.cutHeight?this.renderFlags&=~h:this.renderFlags|=h,this.displayFrame=d,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(v,d){return v!==void 0&&(this.tilePositionX=v),d!==void 0&&(this.tilePositionY=d),this},setTileScale:function(v,d){return v===void 0&&(v=this.tileScaleX),d===void 0&&(d=v),this.tileScaleX=v,this.tileScaleY=d,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var v=this.displayFrame;if(v.source.isRenderTexture||v.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var d=this.fillContext,p=this.fillCanvas,g=this.potWidth,m=this.potHeight;(!this.renderer||!this.renderer.gl)&&(g=v.cutWidth,m=v.cutHeight),d.clearRect(0,0,g,m),p.width=g,p.height=m,d.drawImage(v.source.image,v.cutX,v.cutY,v.cutWidth,v.cutHeight,0,0,g,m),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(p,this.fillPattern):this.fillPattern=d.createPattern(p,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var v=this.canvas;if((v.width!==this.width||v.height!==this.height)&&(v.width=this.width,v.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var d=this.context;this.scene.sys.game.config.antialias||n.disable(d);var p=this._tileScale.x,g=this._tileScale.y,m=this._tilePosition.x,x=this._tilePosition.y;d.clearRect(0,0,this.width,this.height),d.save(),d.scale(p,g),d.translate(-m,-x),d.fillStyle=this.fillPattern,d.fillRect(m,x,this.width/p,this.height/g),d.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),e.remove(this.canvas),e.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(v){this._tilePosition.x=v,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(v){this._tilePosition.y=v,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(v){this._tileScale.x=v,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(v){this._tileScale.y=v,this.dirty=!0}}});c.exports=f},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(18),o=t(11),a=t(75),s=t(22),i=t(51),n=t(15),l=t(70),r=t(222),h=t(1094),f=t(14),v=new e({Extends:n,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Size,o.TextureCrop,o.Tint,o.Transform,o.Visible,h],initialize:function(p,g,m,x){n.call(this,p,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=r(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=f.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(g,m),this.initPipeline(),x&&this.changeSource(x,!1);var y=p.sys.game.events;y.on(s.PAUSE,this.globalPause,this),y.on(s.RESUME,this.globalResume,this);var T=p.sys.sound;T&&T.on(l.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(d,p,g){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var m=this.video;if(!m)return console.warn("Video not loaded"),this;d===void 0&&(d=m.loop);var x=this.scene.sys.sound;x&&x.mute&&this.setMute(!0),isNaN(p)||(this._markerIn=p),!isNaN(g)&&g>p&&(this._markerOut=g),m.loop=d;var y=this._callbacks,T=m.play();return T!==void 0?T.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(m.addEventListener("playing",y.play,!0),m.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),m.addEventListener("ended",y.end,!0),m.addEventListener("timeupdate",y.time,!0),m.addEventListener("seeking",y.seeking,!0),m.addEventListener("seeked",y.seeked,!0),this},changeSource:function(d,p,g,m,x){p===void 0&&(p=!0);var y=this.video;y&&this.stop();var T=this.scene.sys.cache.video.get(d);return T?(this.video=T,this._cacheKey=d,this._codePaused=T.paused,this._codeMuted=T.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,T,T.videoWidth,T.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,T.videoWidth,T.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(a.VIDEO_CREATED,this,T.videoWidth,T.videoHeight)):this.updateTexture(),T.currentTime=0,this._lastUpdate=0,p&&this.play(g,m,x)):this.video=null,this},addMarker:function(d,p,g){return!isNaN(p)&&p>=0&&!isNaN(g)&&(this.markers[d]=[p,g]),this},playMarker:function(d,p){var g=this.markers[d];return g&&this.play(p,g[0],g[1]),this},removeMarker:function(d){return delete this.markers[d],this},snapshot:function(d,p){return d===void 0&&(d=this.width),p===void 0&&(p=this.height),this.snapshotArea(0,0,this.width,this.height,d,p)},snapshotArea:function(d,p,g,m,x,y){d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=this.width),m===void 0&&(m=this.height),x===void 0&&(x=g),y===void 0&&(y=m);var T=this.video,E=this.snapshotTexture;return E?(E.setSize(x,y),T&&E.context.drawImage(T,d,p,g,m,0,0,x,y)):(E=this.scene.sys.textures.createCanvas(r(),x,y),this.snapshotTexture=E,T&&E.context.drawImage(T,d,p,g,m,0,0,x,y)),E.update()},saveSnapshotTexture:function(d){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,d):this.snapshotTexture=this.scene.sys.textures.createCanvas(d,this.width,this.height),this.snapshotTexture},loadURL:function(d,p,g){g===void 0&&(g=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var m=document.createElement("video");return m.controls=!1,g&&(m.muted=!0,m.defaultMuted=!0,m.setAttribute("autoplay","autoplay")),m.setAttribute("playsinline","playsinline"),m.setAttribute("preload","auto"),m.addEventListener("error",this._callbacks.error,!0),m.src=d,m.load(),this.video=m,this},loadMediaStream:function(d,p,g){g===void 0&&(g=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var m=document.createElement("video");m.controls=!1,g&&(m.muted=!0,m.defaultMuted=!0,m.setAttribute("autoplay","autoplay")),m.setAttribute("playsinline","playsinline"),m.setAttribute("preload","auto"),m.addEventListener("error",this._callbacks.error,!0);try{m.srcObject=d}catch{m.src=window.URL.createObjectURL(d)}return m.load(),this.video=m,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(a.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(d){this.scene.sys.input.once(i.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(a.VIDEO_ERROR,this,d)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(a.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(d){this.stop(),this.emit(a.VIDEO_ERROR,this,d)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(a.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(a.VIDEO_PLAY,this)},completeHandler:function(){this.emit(a.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime<this._lastUpdate&&(this.emit(a.VIDEO_LOOP,this),this._lastUpdate=0)},preUpdate:function(){var d=this.video;if(d){var p=d.currentTime;p!==this._lastUpdate&&(this._lastUpdate=p,this.updateTexture(),p>=this._markerOut&&(d.loop?(d.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=p,this.emit(a.VIDEO_LOOP,this)):(this.emit(a.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(a.VIDEO_TIMEOUT,this))},updateTexture:function(){var d=this.video,p=d.videoWidth,g=d.videoHeight;if(!this.videoTexture)this.videoTexture=this.scene.sys.textures.create(this._key,d,p,g),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,p,g),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(a.VIDEO_CREATED,this,p,g);else{var m=this.videoTextureSource;m.source!==d&&(m.source=d,m.width=p,m.height=g),m.update()}},getVideoKey:function(){return this._cacheKey},seekTo:function(d){var p=this.video;if(p){var g=p.duration;if(g!==1/0&&!isNaN(g)){var m=g*d;this.setCurrentTime(m)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(d){var p=this.video;if(p){if(typeof d=="string"){var g=d[0],m=parseFloat(d.substr(1));g==="+"?d=p.currentTime+m:g==="-"&&(d=p.currentTime-m)}p.currentTime=d,this._lastUpdate=d}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(a.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(a.VIDEO_SEEKED,this);var d=this.video;d&&this.updateTexture()},getProgress:function(){var d=this.video;if(d){var p=d.currentTime,g=d.duration;if(g!==1/0&&!isNaN(g))return p/g}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(d){d===void 0&&(d=!0),this._codeMuted=d;var p=this.video;return p&&(p.muted=this._systemMuted?!0:d),this},isMuted:function(){return this._codeMuted},globalMute:function(d,p){this._systemMuted=p;var g=this.video;g&&(g.muted=this._codeMuted?!0:p)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(d){d===void 0&&(d=!0);var p=this.video;return this._codePaused=d,p&&(d?p.paused||p.pause():d||p.paused&&!this._systemPaused&&p.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(d){return d===void 0&&(d=1),this.video&&(this.video.volume=u(d,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(d){return this.video&&(this.video.playbackRate=d),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(d){return d===void 0&&(d=!0),this.video&&(this.video.loop=d),this},isPlaying:function(){return this.video?!(this.video.paused||this.video.ended):!1},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(d,p){return p===void 0&&(p=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,d),this._key=d,this.flipY=p,this.videoTextureSource&&this.videoTextureSource.setFlipY(p),this.videoTexture},stop:function(){var d=this.video;if(d){var p=this._callbacks;for(var g in p)d.removeEventListener(g,p[g],!0);d.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(a.VIDEO_STOP,this),this},removeVideoElement:function(){var d=this.video;if(!!d){for(d.parentNode&&d.parentNode.removeChild(d);d.hasChildNodes();)d.removeChild(d.firstChild);d.removeAttribute("autoplay"),d.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var d=this.scene.sys.game.events;d.off(s.PAUSE,this.globalPause,this),d.off(s.RESUME,this.globalResume,this);var p=this.scene.sys.sound;p&&p.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(228),o=t(470),a=t(56),s=new e({initialize:function(n){this.type=a.POLYGON,this.area=0,this.points=[],n&&this.setTo(n)},contains:function(i,n){return u(this,i,n)},setTo:function(i){if(this.area=0,this.points=[],typeof i=="string"&&(i=i.split(" ")),!Array.isArray(i))return this;for(var n,l=Number.MAX_VALUE,r=0;r<i.length;r++)n={x:0,y:0},typeof i[r]=="number"||typeof i[r]=="string"?(n.x=parseFloat(i[r]),n.y=parseFloat(i[r+1]),r++):Array.isArray(i[r])?(n.x=i[r][0],n.y=i[r][1]):(n.x=i[r].x,n.y=i[r].y),this.points.push(n),n.y<l&&(l=n.y);return this.calculateArea(l),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var i=0,n,l,r=0;r<this.points.length-1;r++)n=this.points[r],l=this.points[r+1],i+=(l.x-n.x)*(n.y+l.y);return n=this.points[0],l=this.points[this.points.length-1],i+=(n.x-l.x)*(l.y+n.y),this.area=-i*.5,this.area},getPoints:function(i,n,l){return o(this,i,n,l)}});c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){for(var a=!1,s=-1,i=e.points.length-1;++s<e.points.length;i=s){var n=e.points[s].x,l=e.points[s].y,r=e.points[i].x,h=e.points[i].y;(l<=o&&o<h||h<=o&&o<l)&&u<(r-n)*(o-l)/(h-l)+n&&(a=!a)}return a};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(15),a=t(2),s=t(17),i=t(478),n=t(1176),l=t(25),r=new e({Extends:o,Mixins:[u.ComputedSize,u.Depth,u.GetBounds,u.Mask,u.Origin,u.ScrollFactor,u.Transform,u.Visible,n],initialize:function(f,v,d,p,g,m,x,y){d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=128),m===void 0&&(m=128),o.call(this,f,"Shader"),this.blendMode=-1,this.shader;var T=f.sys.renderer;this.renderer=T,this.gl=T.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=T.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=T.width,this._rendererHeight=T.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(d,p),this.setSize(g,m),this.setOrigin(.5,.5),this.setShader(v,x,y)},willRender:function(h){return this.renderToTexture?!0:!(o.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&h.id)},setRenderToTexture:function(h,f){if(f===void 0&&(f=!1),!this.renderToTexture){var v=this.width,d=this.height,p=this.renderer;this.glTexture=p.createTextureFromSource(null,v,d,0),this.glTexture.flipY=f,this.framebuffer=p.createFramebuffer(v,d,this.glTexture,!1),this._rendererWidth=v,this._rendererHeight=d,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),h&&(this.texture=this.scene.sys.textures.addGLTexture(h,this.glTexture,v,d))}return this.shader&&(p.pipelines.clear(),this.load(),this.flush(),p.pipelines.rebind()),this},setShader:function(h,f,v){if(f===void 0&&(f=[]),typeof h=="string"){var d=this.scene.sys.cache.shader;if(!d.has(h))return console.warn("Shader missing: "+h),this;this.shader=d.get(h)}else this.shader=h;var p=this.gl,g=this.renderer;this.program&&p.deleteProgram(this.program);var m=g.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);p.uniformMatrix4fv(p.getUniformLocation(m,"uViewMatrix"),!1,this.viewMatrix),p.uniformMatrix4fv(p.getUniformLocation(m,"uProjectionMatrix"),!1,this.projectionMatrix),p.uniform2f(p.getUniformLocation(m,"uResolution"),this.width,this.height),this.program=m;var x=new Date,y={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[x.getFullYear(),x.getMonth(),x.getDate(),x.getHours()*60*60+x.getMinutes()*60+x.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=s(!0,{},this.shader.uniforms,y):this.uniforms=y;for(var T=0;T<4;T++)f[T]&&this.setSampler2D("iChannel"+T,f[T],T,v);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(h){return this.pointer=h,this},projOrtho:function(h,f,v,d){var p=-1e3,g=1e3,m=1/(h-f),x=1/(v-d),y=1/(p-g),T=this.projectionMatrix;T[0]=-2*m,T[5]=-2*x,T[10]=2*y,T[12]=(h+f)*m,T[13]=(d+v)*x,T[14]=(g+p)*y;var E=this.program,C=this.gl,A=this.renderer;A.setProgram(E),C.uniformMatrix4fv(C.getUniformLocation(E,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=f,this._rendererHeight=v},initUniforms:function(){var h=this.gl,f=this.renderer.glFuncMap,v=this.program;this._textureCount=0;for(var d in this.uniforms){var p=this.uniforms[d],g=p.type,m=f[g];p.uniformLocation=h.getUniformLocation(v,d),g!=="sampler2D"&&(p.glMatrix=m.matrix,p.glValueLength=m.length,p.glFunc=m.func)}},setSampler2DBuffer:function(h,f,v,d,p,g){p===void 0&&(p=0),g===void 0&&(g={});var m=this.uniforms[h];return m.value=f,g.width=v,g.height=d,m.textureData=g,this._textureCount=p,this.initSampler2D(m),this},setSampler2D:function(h,f,v,d){v===void 0&&(v=0);var p=this.scene.sys.textures;if(p.exists(f)){var g=p.getFrame(f);if(g.glTexture&&g.glTexture.isRenderTexture)return this.setSampler2DBuffer(h,g.glTexture,g.width,g.height,v,d);var m=this.uniforms[h],x=g.source;m.textureKey=f,m.source=x.image,m.value=g.glTexture,x.isGLTexture&&(d||(d={}),d.width=x.width,d.height=x.height),d&&(m.textureData=d),this._textureCount=v,this.initSampler2D(m)}return this},setUniform:function(h,f){return i(this.uniforms,h,f),this},getUniform:function(h){return a(this.uniforms,h,null)},setChannel0:function(h,f){return this.setSampler2D("iChannel0",h,0,f)},setChannel1:function(h,f){return this.setSampler2D("iChannel1",h,1,f)},setChannel2:function(h,f){return this.setSampler2D("iChannel2",h,2,f)},setChannel3:function(h,f){return this.setSampler2D("iChannel3",h,3,f)},initSampler2D:function(h){if(!!h.value){var f=this.gl;f.activeTexture(f.TEXTURE0+this._textureCount),f.bindTexture(f.TEXTURE_2D,h.value);var v=h.textureData;if(v&&!h.value.isRenderTexture){var d=f[a(v,"magFilter","linear").toUpperCase()],p=f[a(v,"minFilter","linear").toUpperCase()],g=f[a(v,"wrapS","repeat").toUpperCase()],m=f[a(v,"wrapT","repeat").toUpperCase()],x=f[a(v,"format","rgba").toUpperCase()];if(v.repeat&&(g=f.REPEAT,m=f.REPEAT),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!!v.flipY),v.width){var y=a(v,"width",512),T=a(v,"height",2),E=a(v,"border",0);f.texImage2D(f.TEXTURE_2D,0,x,y,T,E,x,f.UNSIGNED_BYTE,null)}else f.texImage2D(f.TEXTURE_2D,0,x,f.RGBA,f.UNSIGNED_BYTE,h.source);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,d),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,p),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,g),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,m)}this.renderer.setProgram(this.program),f.uniform1i(h.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var h=this.gl,f=this.uniforms,v,d,p,g,m,x=0;for(var y in f)v=f[y],p=v.glFunc,d=v.glValueLength,g=v.uniformLocation,m=v.value,m!==null&&(d===1?v.glMatrix?p.call(h,g,v.transpose,m):p.call(h,g,m):d===2?p.call(h,g,m.x,m.y):d===3?p.call(h,g,m.x,m.y,m.z):d===4?p.call(h,g,m.x,m.y,m.z,m.w):v.type==="sampler2D"&&(h.activeTexture(h.TEXTURE0+x),h.bindTexture(h.TEXTURE_2D,m),h.uniform1i(g,x),x++))},load:function(h){var f=this.gl,v=this.width,d=this.height,p=this.renderer,g=this.program,m=this.viewMatrix;if(!this.renderToTexture){var x=-this._displayOriginX,y=-this._displayOriginY;m[0]=h[0],m[1]=h[1],m[4]=h[2],m[5]=h[3],m[8]=h[4],m[9]=h[5],m[12]=m[0]*x+m[4]*y,m[13]=m[1]*x+m[5]*y}f.useProgram(g),f.uniformMatrix4fv(f.getUniformLocation(g,"uViewMatrix"),!1,m),f.uniform2f(f.getUniformLocation(g,"uResolution"),this.width,this.height);var T=this.uniforms,E=T.resolution;E.value.x=v,E.value.y=d,T.time.value=p.game.loop.getDuration();var C=this.pointer;if(C){var A=T.mouse,P=C.x/v,M=1-C.y/d;A.value.x=P.toFixed(2),A.value.y=M.toFixed(2)}this.syncUniforms()},flush:function(){var h=this.width,f=this.height,v=this.program,d=this.gl,p=this.vertexBuffer,g=this.renderer,m=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(g.setFramebuffer(this.framebuffer),d.clearColor(0,0,0,0),d.clear(d.COLOR_BUFFER_BIT)),d.bindBuffer(d.ARRAY_BUFFER,p);var x=d.getAttribLocation(v,"inPosition");x!==-1&&(d.enableVertexAttribArray(x),d.vertexAttribPointer(x,2,d.FLOAT,!1,m,0));var y=this.vertexViewF32;y[3]=f,y[4]=h,y[5]=f,y[8]=h,y[9]=f,y[10]=h;var T=6;d.bufferSubData(d.ARRAY_BUFFER,0,this.bytes.subarray(0,T*m)),d.drawArrays(d.TRIANGLES,0,T),this.renderToTexture&&g.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var h=this.gl;h.deleteProgram(this.program),h.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(36),a=t(116),s=t(15),i=t(479),n=t(480),l=t(19),r=t(69),h=t(1179),f=t(79),v=t(39),d=t(117),p=new e({Extends:s,Mixins:[u.AlphaSingle,u.BlendMode,u.Depth,u.Mask,u.Pipeline,u.Size,u.Texture,u.Transform,u.Visible,u.ScrollFactor,h],initialize:function(m,x,y,T,E,C,A,P,M,O,I,N){x===void 0&&(x=0),y===void 0&&(y=0),T===void 0&&(T="__WHITE"),s.call(this,m,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new v,this.modelScale=new v(1,1,1),this.modelRotation=new v,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new r,this.viewPosition=new v,this.viewMatrix=new r,this.projectionMatrix=new r,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;var Y=m.sys.renderer;this.setPosition(x,y),this.setTexture(T,E),this.setSize(Y.width,Y.height),this.initPipeline(),this.setPerspective(Y.width,Y.height),C&&this.addVertices(C,A,P,M,O,I,N)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(g){return this.viewPosition.addScale(v.LEFT,g),this.dirtyCache[10]=1,this},panY:function(g){return this.viewPosition.y+=v.DOWN.y*g,this.dirtyCache[10]=1,this},panZ:function(g){return this.viewPosition.z+=g,this.dirtyCache[10]=1,this},setPerspective:function(g,m,x,y,T){return x===void 0&&(x=45),y===void 0&&(y=.01),T===void 0&&(T=1e3),this.projectionMatrix.perspective(o(x),g/m,y,T),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(g,m,x,y){return g===void 0&&(g=this.scene.sys.renderer.getAspectRatio()),m===void 0&&(m=1),x===void 0&&(x=-1e3),y===void 0&&(y=1e3),this.projectionMatrix.ortho(-g,g,-m,m,x,y),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(g){g.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(g,m,x,y,T,E,C,A,P){var M=this.scene.sys.cache.obj.get(g);return M&&n(M,this,m,x,y,T,E,C,A,P),this},sortByDepth:function(g,m){return g.depth-m.depth},depthSort:function(){return f(this.faces,this.sortByDepth),this},addVertex:function(g,m,x,y,T,E,C){var A=new d(g,m,x,y,T,E,C);return this.vertices.push(A),A},addFace:function(g,m,x){var y=new a(g,m,x);return this.faces.push(y),this.dirtyCache[9]=-1,y},addVertices:function(g,m,x,y,T,E,C){var A=i(g,m,x,y,T,E,C);return A&&(this.faces=this.faces.concat(A.faces),this.vertices=this.vertices.concat(A.vertices)),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(g){return this.faces[g]},getFaceAt:function(g,m,x){x===void 0&&(x=this.scene.sys.cameras.main);for(var y=l(this,x).calc,T=this.faces,E=[],C=0;C<T.length;C++){var A=T[C];A.contains(g,m,y)&&E.push(A)}return f(E,this.sortByDepth)},setDebug:function(g,m){return this.debugGraphic=g,!g&&!m?this.debugCallback=null:m?this.debugCallback=m:this.debugCallback=this.renderDebug,this},isDirty:function(){var g=this.modelPosition,m=this.modelRotation,x=this.modelScale,y=this.dirtyCache,T=g.x,E=g.y,C=g.z,A=m.x,P=m.y,M=m.z,O=x.x,I=x.y,N=x.z,Y=this.getFaceCount(),X=y[0],W=y[1],H=y[2],D=y[3],L=y[4],B=y[5],G=y[6],w=y[7],z=y[8],U=y[9];return y[0]=T,y[1]=E,y[2]=C,y[3]=A,y[4]=P,y[5]=M,y[6]=O,y[7]=I,y[8]=N,y[9]=Y,X!==T||W!==E||H!==C||D!==A||L!==P||B!==M||G!==O||w!==I||z!==N||U!==Y},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var g=this.dirtyCache;if(!(!this.ignoreDirtyCache&&!g[10]&&!this.isDirty())){var m=this.width,x=this.height,y=this.viewMatrix,T=this.viewPosition;g[10]&&(y.identity(),y.translate(T),y.invert(),g[10]=0);var E=this.transformMatrix;E.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var C=T.z,A=this.faces,P=0;P<A.length;P++)A[P].transformCoordinatesLocal(E,m,x,C);this.depthSort()}},renderDebug:function(g,m){for(var x=g.debugGraphic,y=0;y<m.length;y++){var T=m[y],E=T.vertex1.tx,C=T.vertex1.ty,A=T.vertex2.tx,P=T.vertex2.ty,M=T.vertex3.tx,O=T.vertex3.ty;x.strokeTriangle(E,C,A,P,M,O)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null}});c.exports=p},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(50),u=function(o,a){return e(o.x,o.y,a.x,a.y)<=o.radius+a.radius};c.exports=u},function(c,S,t){/**
 * @author       Florian Vazelle
 * @author       Geoffrey Glaive
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=t(233),o=function(a,s,i){if(i===void 0&&(i=[]),u(a,s)){var n=a.x1,l=a.y1,r=a.x2,h=a.y2,f=s.x,v=s.y,d=s.radius,p=r-n,g=h-l,m=n-f,x=l-v,y=p*p+g*g,T=2*(p*m+g*x),E=m*m+x*x-d*d,C=T*T-4*y*E,A,P;if(C===0){var M=-T/(2*y);A=n+M*p,P=l+M*g,M>=0&&M<=1&&i.push(new e(A,P))}else if(C>0){var O=(-T-Math.sqrt(C))/(2*y);A=n+O*p,P=l+O*g,O>=0&&O<=1&&i.push(new e(A,P));var I=(-T+Math.sqrt(C))/(2*y);A=n+I*p,P=l+I*g,I>=0&&I<=1&&i.push(new e(A,P))}}return i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(66),u=t(4),o=new u,a=function(s,i,n){if(n===void 0&&(n=o),e(i,s.x1,s.y1))return n.x=s.x1,n.y=s.y1,!0;if(e(i,s.x2,s.y2))return n.x=s.x2,n.y=s.y2,!0;var l=s.x2-s.x1,r=s.y2-s.y1,h=i.x-s.x1,f=i.y-s.y1,v=l*l+r*r,d=l,p=r;if(v>0){var g=(h*l+f*r)/v;d*=g,p*=g}n.x=s.x1+d,n.y=s.y1+p;var m=d*d+p*p;return m<=v&&d*l+p*r>=0&&e(i,n.x,n.y)};c.exports=a},function(c,S,t){/**
 * @author       Florian Vazelle
 * @author       Geoffrey Glaive
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=t(96),o=t(488),a=function(s,i,n){if(n===void 0&&(n=[]),o(s,i))for(var l=i.getLineA(),r=i.getLineB(),h=i.getLineC(),f=i.getLineD(),v=[new e,new e,new e,new e],d=[u(l,s,v[0]),u(r,s,v[1]),u(h,s,v[2]),u(f,s,v[3])],p=0;p<4;p++)d[p]&&n.push(v[p]);return n};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o===void 0&&(o=!1),a===void 0&&(a=[]);for(var s=e.x3-e.x1,i=e.y3-e.y1,n=e.x2-e.x1,l=e.y2-e.y1,r=s*s+i*i,h=s*n+i*l,f=n*n+l*l,v=r*f-h*h,d=v===0?0:1/v,p,g,m,x,y,T,E=e.x1,C=e.y1,A=0;A<u.length&&(m=u[A].x-E,x=u[A].y-C,y=s*m+i*x,T=n*m+l*x,p=(f*y-h*T)*d,g=(r*T-h*y)*d,!(p>=0&&g>=0&&p+g<1&&(a.push({x:u[A].x,y:u[A].y}),o)));A++);return a};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=Math.cos(a),i=Math.sin(a),n=e.x1-u,l=e.y1-o;return e.x1=n*s-l*i+u,e.y1=n*i+l*s+o,n=e.x2-u,l=e.y2-o,e.x2=n*s-l*i+u,e.y2=n*i+l*s+o,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.height===0?NaN:e.width/e.height};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=Math.cos(a),i=Math.sin(a),n=e.x1-u,l=e.y1-o;return e.x1=n*s-l*i+u,e.y1=n*i+l*s+o,n=e.x2-u,l=e.y2-o,e.x2=n*s-l*i+u,e.y2=n*i+l*s+o,n=e.x3-u,l=e.y3-o,e.x3=n*s-l*i+u,e.y3=n*i+l*s+o,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={BUTTON_DOWN:t(1310),BUTTON_UP:t(1311),CONNECTED:t(1312),DISCONNECTED:t(1313),GAMEPAD_BUTTON_DOWN:t(1314),GAMEPAD_BUTTON_UP:t(1315)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(17),u=t(156),o=function(a,s){var i=a===void 0?u():e({},a);if(s)for(var n in s)s[n]!==void 0&&(i[n]=s[n]);return i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=t(408),l=new e({Extends:o,initialize:function(h,f,v,d){var p="xml";if(i(f)){var g=f;f=s(g,"key"),v=s(g,"url"),d=s(g,"xhrSettings"),p=s(g,"extension",p)}var m={type:"xml",cache:h.cacheManager.xml,extension:p,responseType:"text",key:f,url:v,xhrSettings:d};o.call(this,h,m)},onProcess:function(){this.state=u.FILE_PROCESSING,this.data=n(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});a.register("xml",function(r,h,f){if(Array.isArray(r))for(var v=0;v<r.length;v++)this.addFile(new l(this,r[v]));else this.addFile(new l(this,r,h,f));return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v){var d="text",p="txt",g=r.cacheManager.text;if(i(h)){var m=h;h=s(m,"key"),f=s(m,"url"),v=s(m,"xhrSettings"),p=s(m,"extension",p),d=s(m,"type",d),g=s(m,"cache",g)}var x={type:d,cache:g,extension:p,responseType:"text",key:h,url:f,xhrSettings:v};o.call(this,r,x)},onProcess:function(){this.state=u.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",function(l,r,h){if(Array.isArray(l))for(var f=0;f<l.length;f++)this.addFile(new n(this,l[f]));else this.addFile(new n(this,l,r,h));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Acceleration:t(1368),Angular:t(1369),Bounce:t(1370),Debug:t(1371),Drag:t(1372),Enable:t(1373),Friction:t(1374),Gravity:t(1375),Immovable:t(1376),Mass:t(1377),OverlapCirc:t(523),OverlapRect:t(244),Pushable:t(1378),Size:t(1379),Velocity:t(1380)}},function(c,S){var t=function(e,u,o,a,s,i,n){i===void 0&&(i=!0),n===void 0&&(n=!1);var l=[],r=[],h=e.treeMinMax;if(h.minX=u,h.minY=o,h.maxX=u+a,h.maxY=o+s,n&&(r=e.staticTree.search(h)),i&&e.useTree)l=e.tree.search(h);else if(i){var f=e.bodies,v={position:{x:u,y:o},left:u,top:o,right:u+a,bottom:o+s,isCircle:!1},d=e.intersects;f.iterate(function(p){d(p,v)&&l.push(p)})}return r.concat(l)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={COLLIDE:t(1381),OVERLAP:t(1382),PAUSE:t(1383),RESUME:t(1384),TILE_COLLIDE:t(1385),TILE_OVERLAP:t(1386),WORLD_BOUNDS:t(1387),WORLD_STEP:t(1388)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(62),u=function(o,a,s,i){var n=0,l=o.deltaAbsX()+a.deltaAbsX()+i;return o._dx===0&&a._dx===0?(o.embedded=!0,a.embedded=!0):o._dx>a._dx?(n=o.right-a.x,n>l&&!s||o.checkCollision.right===!1||a.checkCollision.left===!1?n=0:(o.touching.none=!1,o.touching.right=!0,a.touching.none=!1,a.touching.left=!0,a.physicsType===e.STATIC_BODY&&!s&&(o.blocked.none=!1,o.blocked.right=!0),o.physicsType===e.STATIC_BODY&&!s&&(a.blocked.none=!1,a.blocked.left=!0))):o._dx<a._dx&&(n=o.x-a.width-a.x,-n>l&&!s||o.checkCollision.left===!1||a.checkCollision.right===!1?n=0:(o.touching.none=!1,o.touching.left=!0,a.touching.none=!1,a.touching.right=!0,a.physicsType===e.STATIC_BODY&&!s&&(o.blocked.none=!1,o.blocked.left=!0),o.physicsType===e.STATIC_BODY&&!s&&(a.blocked.none=!1,a.blocked.right=!0))),o.overlapX=n,a.overlapX=n,n};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(62),u=function(o,a,s,i){var n=0,l=o.deltaAbsY()+a.deltaAbsY()+i;return o._dy===0&&a._dy===0?(o.embedded=!0,a.embedded=!0):o._dy>a._dy?(n=o.bottom-a.y,n>l&&!s||o.checkCollision.down===!1||a.checkCollision.up===!1?n=0:(o.touching.none=!1,o.touching.down=!0,a.touching.none=!1,a.touching.up=!0,a.physicsType===e.STATIC_BODY&&!s&&(o.blocked.none=!1,o.blocked.down=!0),o.physicsType===e.STATIC_BODY&&!s&&(a.blocked.none=!1,a.blocked.up=!0))):o._dy<a._dy&&(n=o.y-a.bottom,-n>l&&!s||o.checkCollision.up===!1||a.checkCollision.down===!1?n=0:(o.touching.none=!1,o.touching.up=!0,a.touching.none=!1,a.touching.down=!0,a.physicsType===e.STATIC_BODY&&!s&&(o.blocked.none=!1,o.blocked.up=!0),o.physicsType===e.STATIC_BODY&&!s&&(a.blocked.none=!1,a.blocked.down=!0))),o.overlapY=n,a.overlapY=n,n};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return!(u.right<=e.left||u.bottom<=e.top||u.position.x>=e.right||u.position.y>=e.bottom)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Bounce:t(1495),Collision:t(1496),Force:t(1497),Friction:t(1498),Gravity:t(1499),Mass:t(1500),Sensor:t(1501),SetBody:t(1502),Sleep:t(1503),Static:t(1520),Transform:t(1521),Velocity:t(1522)}},function(c,S){var t={};c.exports=t,function(){t.create=function(e,u){var o=e.bodyA,a=e.bodyB,s={id:t.id(o,a),bodyA:o,bodyB:a,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:o.isSensor||a.isSensor,timeCreated:u,timeUpdated:u,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return t.update(s,e,u),s},t.update=function(e,u,o){if(e.collision=u,u.collided){var a=u.supports,s=e.activeContacts,i=u.parentA,n=u.parentB;e.inverseMass=i.inverseMass+n.inverseMass,e.friction=Math.min(i.friction,n.friction),e.frictionStatic=Math.max(i.frictionStatic,n.frictionStatic),e.restitution=Math.max(i.restitution,n.restitution),e.slop=Math.max(i.slop,n.slop);for(var l=0;l<a.length;l++)s[l]=a[l].contact;var r=a.length;r<s.length&&(s.length=r),e.separation=u.depth,t.setActive(e,!0,o)}else e.isActive===!0&&t.setActive(e,!1,o)},t.setActive=function(e,u,o){u?(e.isActive=!0,e.timeUpdated=o):(e.isActive=!1,e.activeContacts.length=0)},t.id=function(e,u){return e.id<u.id?"A"+e.id+"B"+u.id:"A"+u.id+"B"+e.id}}()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={CalculateFacesAt:t(252),CalculateFacesWithin:t(63),CheckIsoBounds:t(541),Copy:t(1420),CreateFromTiles:t(1421),CullBounds:t(543),CullTiles:t(544),Fill:t(1422),FilterTiles:t(1423),FindByIndex:t(1424),FindTile:t(1425),ForEachTile:t(1426),GetCullTilesFunction:t(1427),GetTileAt:t(158),GetTileAtWorldXY:t(1428),GetTilesWithin:t(26),GetTilesWithinShape:t(1429),GetTilesWithinWorldXY:t(529),GetTileToWorldXFunction:t(1430),GetTileToWorldXYFunction:t(1431),GetTileToWorldYFunction:t(1432),GetWorldToTileXFunction:t(1433),GetWorldToTileXYFunction:t(1434),GetWorldToTileYFunction:t(1435),HasTileAt:t(562),HasTileAtWorldXY:t(1436),HexagonalCullBounds:t(546),HexagonalCullTiles:t(545),HexagonalTileToWorldXY:t(550),HexagonalTileToWorldY:t(554),HexagonalWorldToTileXY:t(556),HexagonalWorldToTileY:t(560),IsInLayerBounds:t(119),IsometricCullTiles:t(547),IsometricTileToWorldXY:t(551),IsometricWorldToTileXY:t(557),PutTileAt:t(257),PutTileAtWorldXY:t(1437),PutTilesAt:t(1438),Randomize:t(1439),RemoveTileAt:t(563),RemoveTileAtWorldXY:t(1440),RenderDebug:t(1441),ReplaceByIndex:t(542),RunCull:t(159),SetCollision:t(1442),SetCollisionBetween:t(1443),SetCollisionByExclusion:t(1444),SetCollisionByProperty:t(1445),SetCollisionFromCollisionGroup:t(1446),SetLayerCollisionIndex:t(160),SetTileCollision:t(72),SetTileIndexCallback:t(1447),SetTileLocationCallback:t(1448),Shuffle:t(1449),StaggeredCullBounds:t(549),StaggeredCullTiles:t(548),StaggeredTileToWorldXY:t(552),StaggeredTileToWorldY:t(555),StaggeredWorldToTileXY:t(558),StaggeredWorldToTileY:t(561),SwapByIndex:t(1450),TileToWorldX:t(253),TileToWorldXY:t(553),TileToWorldY:t(254),WeightedRandomize:t(1451),WorldToTileX:t(255),WorldToTileXY:t(559),WorldToTileY:t(256)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(158),u=function(o,a,s){var i=e(o,a,!0,s),n=e(o,a-1,!0,s),l=e(o,a+1,!0,s),r=e(o-1,a,!0,s),h=e(o+1,a,!0,s),f=i&&i.collides;return f&&(i.faceTop=!0,i.faceBottom=!0,i.faceLeft=!0,i.faceRight=!0),n&&n.collides&&(f&&(i.faceTop=!1),n.faceBottom=!f),l&&l.collides&&(f&&(i.faceBottom=!1),l.faceTop=!f),r&&r.collides&&(f&&(i.faceLeft=!1),r.faceRight=!f),h&&h.collides&&(f&&(i.faceRight=!1),h.faceLeft=!f),i&&!i.collides&&i.resetFaces(),i};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=o.baseTileWidth,s=o.tilemapLayer,i=0;return s&&(u||(u=s.scene.cameras.main),i=s.x+u.scrollX*(1-s.scrollFactorX),a*=s.scaleX),i+e*a};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=o.baseTileHeight,s=o.tilemapLayer,i=0;return s&&(u||(u=s.scene.cameras.main),i=s.y+u.scrollY*(1-s.scrollFactorY),a*=s.scaleY),i+e*a};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){u===void 0&&(u=!0);var s=a.baseTileWidth,i=a.tilemapLayer;return i&&(o||(o=i.scene.cameras.main),e=e-(i.x+o.scrollX*(1-i.scrollFactorX)),s*=i.scaleX),u?Math.floor(e/s):e/s};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){u===void 0&&(u=!0);var s=a.baseTileHeight,i=a.tilemapLayer;return i&&(o||(o=i.scene.cameras.main),e=e-(i.y+o.scrollY*(1-i.scrollFactorY)),s*=i.scaleY),u?Math.floor(e/s):e/s};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(85),u=t(119),o=t(252),a=t(72),s=function(i,n,l,r,h){if(r===void 0&&(r=!0),!u(n,l,h))return null;var f=h.data[l][n],v=f&&f.collides;if(i instanceof e)h.data[l][n]===null&&(h.data[l][n]=new e(h,i.index,n,l,h.tileWidth,h.tileHeight)),h.data[l][n].copy(i);else{var d=i;h.data[l][n]===null?h.data[l][n]=new e(h,d,n,l,h.tileWidth,h.tileHeight):h.data[l][n].index=d}var p=h.data[l][n],g=h.collideIndexes.indexOf(p.index)!==-1;return a(p,g),r&&v!==p.collides&&o(n,l,h),p};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(29),u=function(o){return o=o.toLowerCase(),o==="isometric"?e.ISOMETRIC:o==="staggered"?e.STAGGERED:o==="hexagonal"?e.HEXAGONAL:e.ORTHOGONAL};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(40),u=t(120),o=t(121),a=t(85),s=function(i,n,l,r,h){for(var f=new u({tileWidth:l,tileHeight:r}),v=new o({name:i,tileWidth:l,tileHeight:r,format:e.ARRAY_2D,layers:[f]}),d=[],p=n.length,g=0,m=0;m<n.length;m++){d[m]=[];for(var x=n[m],y=0;y<x.length;y++){var T=parseInt(x[y],10);isNaN(T)||T===-1?d[m][y]=h?null:new a(f,-1,y,m,l,r):d[m][y]=new a(f,T,y,m,l,r)}g===0&&(g=x.length)}return v.width=f.width=g,v.height=f.height=p,v.widthInPixels=f.widthInPixels=g*l,v.heightInPixels=f.heightInPixels=p*r,f.data=d,v};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(571),u=t(261),o=function(i){return{x:i.x,y:i.y}},a=["id","name","type","rotation","properties","visible","x","y","width","height"],s=function(i,n,l){n===void 0&&(n=0),l===void 0&&(l=0);var r=e(i,a);if(r.x+=n,r.y+=l,i.gid){var h=u(i.gid);r.gid=h.gid,r.flippedHorizontal=h.flippedHorizontal,r.flippedVertical=h.flippedVertical,r.flippedAntiDiagonal=h.flippedAntiDiagonal}else i.polyline?r.polyline=i.polyline.map(o):i.polygon?r.polygon=i.polygon.map(o):i.ellipse?r.ellipse=i.ellipse:i.text?r.text=i.text:i.point?r.point=!0:r.rectangle=!0;return r};c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=2147483648,e=1073741824,u=536870912,o=function(a){var s=Boolean(a&t),i=Boolean(a&e),n=Boolean(a&u);a=a&~(t|e|u);var l=0,r=!1;return s&&i&&n?(l=Math.PI/2,r=!0):s&&i&&!n?(l=Math.PI,r=!1):s&&!i&&n?(l=Math.PI/2,r=!1):s&&!i&&!n?(l=0,r=!0):!s&&i&&n?(l=3*Math.PI/2,r=!1):!s&&i&&!n?(l=Math.PI,r=!0):!s&&!i&&n?(l=3*Math.PI/2,r=!0):!s&&!i&&!n&&(l=0,r=!1),{gid:a,flippedHorizontal:s,flippedVertical:i,flippedAntiDiagonal:n,rotation:l,flipped:r}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(40),u=t(121),o=t(564),a=t(580),s=function(i,n,l,r,h,f,v,d){l===void 0&&(l=32),r===void 0&&(r=32),h===void 0&&(h=10),f===void 0&&(f=10),d===void 0&&(d=!1);var p=null;if(Array.isArray(v)){var g=n!==void 0?n:"map";p=o(g,e.ARRAY_2D,v,l,r,d)}else if(n!==void 0){var m=i.cache.tilemap.get(n);m?p=o(n,m.format,m.data,l,r,d):console.warn("No map data found for key "+n)}return p===null&&(p=new u({tileWidth:l,tileHeight:r,width:h,height:f})),new a(i,p)};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(6),u=function(o){var a=e(o,"targets",null);return a===null||(typeof a=="function"&&(a=a.call()),Array.isArray(a)||(a=[a])),a};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */function t(s){return!!s.getActive&&typeof s.getActive=="function"}function e(s){return!!s.getStart&&typeof s.getStart=="function"}function u(s){return!!s.getEnd&&typeof s.getEnd=="function"}function o(s){return e(s)||u(s)||t(s)}var a=function(s,i){var n,l=function(T,E,C){return C},r=function(T,E,C){return C},h=null,f=typeof i;if(f==="number")l=function(){return i};else if(f==="string"){var v=i[0],d=parseFloat(i.substr(2));switch(v){case"+":l=function(T,E,C){return C+d};break;case"-":l=function(T,E,C){return C-d};break;case"*":l=function(T,E,C){return C*d};break;case"/":l=function(T,E,C){return C/d};break;default:l=function(){return parseFloat(i)}}}else if(f==="function")l=i;else if(f==="object")if(o(i))t(i)&&(h=i.getActive),u(i)&&(l=i.getEnd),e(i)&&(r=i.getStart);else if(i.hasOwnProperty("value"))n=a(s,i.value);else{var p=i.hasOwnProperty("to"),g=i.hasOwnProperty("from"),m=i.hasOwnProperty("start");if(p&&(g||m)){if(n=a(s,i.to),m){var x=a(s,i.start);n.getActive=x.getEnd}if(g){var y=a(s,i.from);n.getStart=y.getEnd}}}return n||(n={getActive:h,getEnd:l,getStart:r}),n};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(9),o=t(267),a=t(16),s=t(5),i=t(100),n=t(14),l=new e({Extends:u,initialize:function(h,f,v){u.call(this),this.parent=h,this.parentIsTimeline=h.hasOwnProperty("isTimeline"),this.data=f,this.totalData=f.length,this.targets=v,this.totalTargets=v.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.startDelay=0,this.hasStarted=!1,this.isSeeking=!1,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=i.PENDING_ADD,this._pausedState=i.INIT,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onActive:null,onComplete:null,onLoop:null,onRepeat:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(r){return r===void 0&&(r=0),this.data[r].current},setTimeScale:function(r){return this.timeScale=r,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===i.ACTIVE},isPaused:function(){return this.state===i.PAUSED},hasTarget:function(r){return this.targets.indexOf(r)!==-1},updateTo:function(r,h,f){f===void 0&&(f=!1);for(var v=0;v<this.totalData;v++){var d=this.data[v];d.key===r&&(d.end=h,f&&(d.start=d.current))}return this},restart:function(){return this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0,this.state===i.ACTIVE?this.seek(0):this.state===i.REMOVED?(this.seek(0),this.parent.makeActive(this),this):this.state===i.PENDING_ADD?this:this.play()},calcDuration:function(){for(var r=0,h=n.MAX_SAFE_INTEGER,f=this.data,v=0;v<this.totalData;v++){var d=f[v];d.t1=d.duration+d.hold,d.yoyo&&(d.t1+=d.duration),d.t2=d.t1+d.repeatDelay,d.totalDuration=d.delay+d.t1,d.repeat===-1?d.totalDuration+=d.t2*999999999999:d.repeat>0&&(d.totalDuration+=d.t2*d.repeat),d.totalDuration>r&&(r=d.totalDuration),d.delay<h&&(h=d.delay)}this.duration=Math.max(r,.001),this.loopCounter=this.loop===-1?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=h},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=i.PENDING_ADD,this._pausedState=i.INIT,!1;for(var r=this.data,h=this.totalTargets,f=0;f<this.totalData;f++){var v=r[f],d=v.target,p=v.gen,g=v.key,m=v.index;v.delay=p.delay(d,g,0,m,h,this),v.duration=Math.max(p.duration(d,g,0,m,h,this),.001),v.hold=p.hold(d,g,0,m,h,this),v.repeat=p.repeat(d,g,0,m,h,this),v.repeatDelay=p.repeatDelay(d,g,0,m,h,this)}return this.calcDuration(),this.progress=0,this.totalProgress=0,this.elapsed=0,this.totalElapsed=0,this.state=i.INIT,!0},makeActive:function(){this.parent.makeActive(this),this.dispatchTweenEvent(o.TWEEN_ACTIVE,this.callbacks.onActive)},nextState:function(){this.loopCounter>0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=i.LOOP_DELAY):(this.state=i.ACTIVE,this.dispatchTweenEvent(o.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=i.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=i.PENDING_REMOVE,this.dispatchTweenEvent(o.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===i.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=i.PAUSED,this)},play:function(r){r===void 0&&(r=!1);var h=this.state;return h===i.INIT&&!this.parentIsTimeline?(this.resetTweenData(!1),this.state=i.ACTIVE,this):h===i.ACTIVE||h===i.PENDING_ADD&&this._pausedState===i.PENDING_ADD?this:!this.parentIsTimeline&&(h===i.PENDING_REMOVE||h===i.REMOVED)?(this.seek(0),this.parent.makeActive(this),this):(this.parentIsTimeline?(this.resetTweenData(r),this.calculatedOffset===0?this.state=i.ACTIVE:(this.countdown=this.calculatedOffset,this.state=i.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(r),this.state=i.ACTIVE,this.makeActive()),this)},resetTweenData:function(r){for(var h=this.data,f=this.totalData,v=this.totalTargets,d=0;d<f;d++){var p=h[d],g=p.target,m=p.key,x=p.index;p.progress=0,p.elapsed=0,p.repeatCounter=p.repeat===-1?999999999999:p.repeat,r?(p.start=p.getStartValue(g,m,p.start,x,v,this),p.end=p.getEndValue(g,m,p.end,x,v,this),p.current=p.start,p.state=i.PLAYING_FORWARD):p.state=i.PENDING_RENDER,p.delay>0&&(p.elapsed=p.delay,p.state=i.DELAY),p.getActiveValue&&(g[m]=p.getActiveValue(p.target,p.key,p.start))}},resume:function(){return this.state===i.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(r,h){h===void 0&&(h=16.6),this.state===i.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var f=this.data,v=this.totalTargets,d=0;d<this.totalData;d++){var p=f[d],g=p.target,m=p.gen,x=p.key,y=p.index;p.progress=0,p.elapsed=0,p.repeatCounter=p.repeat===-1?999999999999:p.repeat,p.delay=m.delay(g,x,0,y,v,this),p.duration=Math.max(m.duration(g,x,0,y,v,this),.001),p.hold=m.hold(g,x,0,y,v,this),p.repeat=m.repeat(g,x,0,y,v,this),p.repeatDelay=m.repeatDelay(g,x,0,y,v,this),p.current=p.start,p.state=i.PLAYING_FORWARD,this.updateTweenData(this,p,0,y,v),p.delay>0&&(p.elapsed=p.delay,p.state=i.DELAY)}this.calcDuration();var T=!1;this.state===i.PAUSED&&(T=!0,this.state=i.ACTIVE),this.isSeeking=!0;do this.update(0,h);while(this.totalProgress<r);return this.isSeeking=!1,T&&(this.state=i.PAUSED),this},setCallback:function(r,h,f,v){return this.callbacks[r]={func:h,scope:v,params:f},this},complete:function(r){return r===void 0&&(r=0),r?(this.state=i.COMPLETE_DELAY,this.countdown=r):(this.state=i.PENDING_REMOVE,this.dispatchTweenEvent(o.TWEEN_COMPLETE,this.callbacks.onComplete)),this},remove:function(){return this.parent.remove(this),this},stop:function(r){return this.state===i.ACTIVE&&r!==void 0&&this.seek(r),this.state!==i.REMOVED&&((this.state===i.PAUSED||this.state===i.PENDING_ADD)&&(this.parentIsTimeline?(this.parent.manager._destroy.push(this),this.parent.manager._toProcess++):(this.parent._destroy.push(this),this.parent._toProcess++)),this.dispatchTweenEvent(o.TWEEN_STOP,this.callbacks.onStop),this.removeAllListeners(),this.state=i.PENDING_REMOVE),this},update:function(r,h){if(this.state===i.PAUSED)return!1;switch(this.useFrames&&(h=1*this.parent.timeScale),h*=this.timeScale,this.elapsed+=h,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=h,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case i.ACTIVE:!this.hasStarted&&!this.isSeeking&&(this.startDelay-=h,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchTweenEvent(o.TWEEN_START,this.callbacks.onStart)));for(var f=!1,v=0;v<this.totalData;v++){var d=this.data[v];this.updateTweenData(this,d,h)&&(f=!0)}f||this.nextState();break;case i.LOOP_DELAY:this.countdown-=h,this.countdown<=0&&(this.state=i.ACTIVE,this.dispatchTweenEvent(o.TWEEN_LOOP,this.callbacks.onLoop));break;case i.OFFSET_DELAY:this.countdown-=h,this.countdown<=0&&(this.state=i.ACTIVE);break;case i.COMPLETE_DELAY:this.countdown-=h,this.countdown<=0&&(this.state=i.PENDING_REMOVE,this.dispatchTweenEvent(o.TWEEN_COMPLETE,this.callbacks.onComplete));break}return this.state===i.PENDING_REMOVE},dispatchTweenDataEvent:function(r,h,f){this.isSeeking||(this.emit(r,this,f.key,f.target,f.current,f.previous),h&&(h.params[1]=f.target,h.func.apply(h.scope,h.params)))},dispatchTweenEvent:function(r,h){this.isSeeking||(this.emit(r,this,this.targets),h&&(h.params[1]=this.targets,h.func.apply(h.scope,h.params)))},setStateFromEnd:function(r,h,f){return h.yoyo?(h.elapsed=f,h.progress=f/h.duration,h.flipX&&h.target.toggleFlipX(),h.flipY&&h.target.toggleFlipY(),this.dispatchTweenDataEvent(o.TWEEN_YOYO,r.callbacks.onYoyo,h),h.start=h.getStartValue(h.target,h.key,h.start,h.index,r.totalTargets,r),i.PLAYING_BACKWARD):h.repeatCounter>0?(h.repeatCounter--,h.elapsed=f,h.progress=f/h.duration,h.flipX&&h.target.toggleFlipX(),h.flipY&&h.target.toggleFlipY(),h.start=h.getStartValue(h.target,h.key,h.start,h.index,r.totalTargets,r),h.end=h.getEndValue(h.target,h.key,h.start,h.index,r.totalTargets,r),h.repeatDelay>0?(h.elapsed=h.repeatDelay-f,h.current=h.start,h.target[h.key]=h.current,i.REPEAT_DELAY):(this.dispatchTweenDataEvent(o.TWEEN_REPEAT,r.callbacks.onRepeat,h),i.PLAYING_FORWARD)):i.COMPLETE},setStateFromStart:function(r,h,f){return h.repeatCounter>0?(h.repeatCounter--,h.elapsed=f,h.progress=f/h.duration,h.flipX&&h.target.toggleFlipX(),h.flipY&&h.target.toggleFlipY(),h.end=h.getEndValue(h.target,h.key,h.start,h.index,r.totalTargets,r),h.repeatDelay>0?(h.elapsed=h.repeatDelay-f,h.current=h.start,h.target[h.key]=h.current,i.REPEAT_DELAY):(this.dispatchTweenDataEvent(o.TWEEN_REPEAT,r.callbacks.onRepeat,h),i.PLAYING_FORWARD)):i.COMPLETE},updateTweenData:function(r,h,f){var v=h.target;switch(h.state){case i.PLAYING_FORWARD:case i.PLAYING_BACKWARD:if(!v){h.state=i.COMPLETE;break}var d=h.elapsed,p=h.duration,g=0;d+=f,d>p&&(g=d-p,d=p);var m=h.state===i.PLAYING_FORWARD,x=d/p;if(h.elapsed=d,h.progress=x,h.previous=h.current,x===1)m?(h.current=h.end,v[h.key]=h.end,h.hold>0?(h.elapsed=h.hold-g,h.state=i.HOLD_DELAY):h.state=this.setStateFromEnd(r,h,g)):(h.current=h.start,v[h.key]=h.start,h.state=this.setStateFromStart(r,h,g));else{var y=m?h.ease(x):h.ease(1-x);h.current=h.start+(h.end-h.start)*y,v[h.key]=h.current}this.dispatchTweenDataEvent(o.TWEEN_UPDATE,r.callbacks.onUpdate,h);break;case i.DELAY:h.elapsed-=f,h.elapsed<=0&&(h.elapsed=Math.abs(h.elapsed),h.state=i.PENDING_RENDER);break;case i.REPEAT_DELAY:h.elapsed-=f,h.elapsed<=0&&(h.elapsed=Math.abs(h.elapsed),h.state=i.PLAYING_FORWARD,this.dispatchTweenDataEvent(o.TWEEN_REPEAT,r.callbacks.onRepeat,h));break;case i.HOLD_DELAY:h.elapsed-=f,h.elapsed<=0&&(h.state=this.setStateFromEnd(r,h,Math.abs(h.elapsed)));break;case i.PENDING_RENDER:v?(h.start=h.getStartValue(v,h.key,v[h.key],h.index,r.totalTargets,r),h.end=h.getEndValue(v,h.key,h.start,h.index,r.totalTargets,r),h.current=h.start,v[h.key]=h.start,h.state=i.PLAYING_FORWARD):h.state=i.COMPLETE;break}return h.state!==i.COMPLETE}});l.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onStop","onUpdate","onYoyo"],s.register("tween",function(r){return this.scene.sys.tweens.add(r)}),a.register("tween",function(r){return this.scene.sys.tweens.create(r)}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={TIMELINE_COMPLETE:t(1466),TIMELINE_LOOP:t(1467),TIMELINE_PAUSE:t(1468),TIMELINE_RESUME:t(1469),TIMELINE_START:t(1470),TIMELINE_UPDATE:t(1471),TWEEN_ACTIVE:t(1472),TWEEN_COMPLETE:t(1473),TWEEN_LOOP:t(1474),TWEEN_REPEAT:t(1475),TWEEN_START:t(1476),TWEEN_STOP:t(1477),TWEEN_UPDATE:t(1478),TWEEN_YOYO:t(1479)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s,i,n,l,r,h,f,v,d,p,g){return{target:e,index:u,key:o,getActiveValue:i,getEndValue:a,getStartValue:s,ease:n,duration:0,totalDuration:0,delay:0,yoyo:h,hold:0,repeat:0,repeatDelay:0,flipX:p,flipY:g,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:l,duration:r,hold:f,repeat:v,repeatDelay:d},state:0}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(68),u=function(o){return e(o,-Math.PI,Math.PI)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(68),u=function(o){return e(o,-180,180)};c.exports=u},function(c,S,t){var e={};c.exports=e;var u=t(83),o=t(32);(function(){e.fromVertices=function(a){for(var s={},i=0;i<a.length;i++){var n=(i+1)%a.length,l=u.normalise({x:a[n].y-a[i].y,y:a[i].x-a[n].x}),r=l.y===0?1/0:l.x/l.y;r=r.toFixed(3).toString(),s[r]=l}return o.values(s)},e.rotate=function(a,s){if(s!==0)for(var i=Math.cos(s),n=Math.sin(s),l=0;l<a.length;l++){var r=a[l],h;h=r.x*i-r.y*n,r.y=r.x*n+r.y*i,r.x=h}}})()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={AFTER_ADD:t(1504),AFTER_REMOVE:t(1505),AFTER_UPDATE:t(1506),BEFORE_ADD:t(1507),BEFORE_REMOVE:t(1508),BEFORE_UPDATE:t(1509),COLLISION_ACTIVE:t(1510),COLLISION_END:t(1511),COLLISION_START:t(1512),DRAG_END:t(1513),DRAG:t(1514),DRAG_START:t(1515),PAUSE:t(1516),RESUME:t(1517),SLEEP_END:t(1518),SLEEP_START:t(1519)}},function(c,S,t){var e={};c.exports=e;var u=t(274),o=t(250),a=t(84);(function(){e.collisions=function(s,i){for(var n=[],l=i.pairs.table,r=i.metrics,h=0;h<s.length;h++){var f=s[h][0],v=s[h][1];if(!((f.isStatic||f.isSleeping)&&(v.isStatic||v.isSleeping))&&!!e.canCollide(f.collisionFilter,v.collisionFilter)&&(r.midphaseTests+=1,a.overlaps(f.bounds,v.bounds)))for(var d=f.parts.length>1?1:0;d<f.parts.length;d++)for(var p=f.parts[d],g=v.parts.length>1?1:0;g<v.parts.length;g++){var m=v.parts[g];if(p===f&&m===v||a.overlaps(p.bounds,m.bounds)){var x=o.id(p,m),y=l[x],T;y&&y.isActive?T=y.collision:T=null;var E=u.collides(p,m,T);r.narrowphaseTests+=1,E.reused&&(r.narrowReuseCount+=1),E.collided&&(n.push(E),r.narrowDetections+=1)}}}return n},e.canCollide=function(s,i){return s.group===i.group&&s.group!==0?s.group>0:(s.mask&i.category)!=0&&(i.mask&s.category)!=0}})()},function(c,S,t){var e={};c.exports=e;var u=t(64),o=t(83);(function(){e.collides=function(a,s,i){var n,l,r,h,f=!1;if(i){var v=a.parent,d=s.parent,p=v.speed*v.speed+v.angularSpeed*v.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;f=i&&i.collided&&p<.2,h=i}else h={collided:!1,bodyA:a,bodyB:s};if(i&&f){var g=h.axisBody,m=g===a?s:a,x=[g.axes[i.axisNumber]];if(r=e._overlapAxes(g.vertices,m.vertices,x),h.reused=!0,r.overlap<=0)return h.collided=!1,h}else{if(n=e._overlapAxes(a.vertices,s.vertices,a.axes),n.overlap<=0||(l=e._overlapAxes(s.vertices,a.vertices,s.axes),l.overlap<=0))return h.collided=!1,h;n.overlap<l.overlap?(r=n,h.axisBody=a):(r=l,h.axisBody=s),h.axisNumber=r.axisNumber}h.bodyA=a.id<s.id?a:s,h.bodyB=a.id<s.id?s:a,h.collided=!0,h.depth=r.overlap,h.parentA=h.bodyA.parent,h.parentB=h.bodyB.parent,a=h.bodyA,s=h.bodyB,o.dot(r.axis,o.sub(s.position,a.position))<0?h.normal={x:r.axis.x,y:r.axis.y}:h.normal={x:-r.axis.x,y:-r.axis.y},h.tangent=o.perp(h.normal),h.penetration=h.penetration||{},h.penetration.x=h.normal.x*h.depth,h.penetration.y=h.normal.y*h.depth;var y=e._findSupports(a,s,h.normal),T=[];if(u.contains(a.vertices,y[0])&&T.push(y[0]),u.contains(a.vertices,y[1])&&T.push(y[1]),T.length<2){var E=e._findSupports(s,a,o.neg(h.normal));u.contains(s.vertices,E[0])&&T.push(E[0]),T.length<2&&u.contains(s.vertices,E[1])&&T.push(E[1])}return T.length<1&&(T=[y[0]]),h.supports=T,h},e._overlapAxes=function(a,s,i){for(var n=o._temp[0],l=o._temp[1],r={overlap:Number.MAX_VALUE},h,f,v=0;v<i.length;v++){if(f=i[v],e._projectToAxis(n,a,f),e._projectToAxis(l,s,f),h=Math.min(n.max-l.min,l.max-n.min),h<=0)return r.overlap=h,r;h<r.overlap&&(r.overlap=h,r.axis=f,r.axisNumber=v)}return r},e._projectToAxis=function(a,s,i){for(var n=o.dot(s[0],i),l=n,r=1;r<s.length;r+=1){var h=o.dot(s[r],i);h>l?l=h:h<n&&(n=h)}a.min=n,a.max=l},e._findSupports=function(a,s,i){for(var n=Number.MAX_VALUE,l=o._temp[0],r=s.vertices,h=a.position,f,v,d,p,g=0;g<r.length;g++)v=r[g],l.x=v.x-h.x,l.y=v.y-h.y,f=-o.dot(i,l),f<n&&(n=f,d=v);var m=d.index-1>=0?d.index-1:r.length-1;v=r[m],l.x=v.x-h.x,l.y=v.y-h.y,n=-o.dot(i,l),p=v;var x=(d.index+1)%r.length;return v=r[x],l.x=v.x-h.x,l.y=v.y-h.y,f=-o.dot(i,l),f<n&&(p=v),[d,p]}})()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={AlignTo:t(601),Angle:t(602),Call:t(603),GetFirst:t(604),GetLast:t(605),GridAlign:t(606),IncAlpha:t(678),IncX:t(679),IncXY:t(680),IncY:t(681),PlaceOnCircle:t(682),PlaceOnEllipse:t(683),PlaceOnLine:t(684),PlaceOnRectangle:t(685),PlaceOnTriangle:t(686),PlayAnimation:t(687),PropertyValueInc:t(46),PropertyValueSet:t(27),RandomCircle:t(688),RandomEllipse:t(689),RandomLine:t(690),RandomRectangle:t(691),RandomTriangle:t(692),Rotate:t(693),RotateAround:t(694),RotateAroundDistance:t(695),ScaleX:t(696),ScaleXY:t(697),ScaleY:t(698),SetAlpha:t(699),SetBlendMode:t(700),SetDepth:t(701),SetHitArea:t(702),SetOrigin:t(703),SetRotation:t(704),SetScale:t(705),SetScaleX:t(706),SetScaleY:t(707),SetScrollFactor:t(708),SetScrollFactorX:t(709),SetScrollFactorY:t(710),SetTint:t(711),SetVisible:t(712),SetX:t(713),SetXY:t(714),SetY:t(715),ShiftPosition:t(716),Shuffle:t(717),SmootherStep:t(718),SmoothStep:t(719),Spread:t(720),ToggleVisible:t(721),WrapInRectangle:t(722)}},function(c,S,t){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(123),u=[];u[e.BOTTOM_CENTER]=t(277),u[e.BOTTOM_LEFT]=t(278),u[e.BOTTOM_RIGHT]=t(279),u[e.LEFT_BOTTOM]=t(280),u[e.LEFT_CENTER]=t(281),u[e.LEFT_TOP]=t(282),u[e.RIGHT_BOTTOM]=t(283),u[e.RIGHT_CENTER]=t(284),u[e.RIGHT_TOP]=t(285),u[e.TOP_CENTER]=t(286),u[e.TOP_LEFT]=t(287),u[e.TOP_RIGHT]=t(288);var o=function(a,s,i,n,l){return u[i](a,s,n,l)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(42),u=t(87),o=t(88),a=t(52),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),o(i,u(n)+l),a(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(42),u=t(43),o=t(53),a=t(52),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),o(i,u(n)-l),a(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(42),u=t(44),o=t(54),a=t(52),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),o(i,u(n)+l),a(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(42),u=t(43),o=t(55),a=t(54),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,u(n)-l),o(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(89),u=t(43),o=t(90),a=t(54),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,u(n)-l),o(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(43),u=t(45),o=t(54),a=t(52),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),o(i,e(n)-l),a(i,u(n)-r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(42),u=t(44),o=t(55),a=t(53),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,u(n)+l),o(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(89),u=t(44),o=t(90),a=t(53),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,u(n)+l),o(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(44),u=t(45),o=t(53),a=t(52),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),o(i,e(n)+l),a(i,u(n)-r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(87),u=t(45),o=t(55),a=t(88),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,e(n)+l),o(i,u(n)-r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(43),u=t(45),o=t(55),a=t(53),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,e(n)-l),o(i,u(n)-r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(44),u=t(45),o=t(55),a=t(54),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,e(n)+l),o(i,u(n)-r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(123),u=[];u[e.BOTTOM_CENTER]=t(290),u[e.BOTTOM_LEFT]=t(291),u[e.BOTTOM_RIGHT]=t(292),u[e.CENTER]=t(293),u[e.LEFT_CENTER]=t(295),u[e.RIGHT_CENTER]=t(296),u[e.TOP_CENTER]=t(297),u[e.TOP_LEFT]=t(298),u[e.TOP_RIGHT]=t(299),u[e.LEFT_BOTTOM]=u[e.BOTTOM_LEFT],u[e.LEFT_TOP]=u[e.TOP_LEFT],u[e.RIGHT_BOTTOM]=u[e.BOTTOM_RIGHT],u[e.RIGHT_TOP]=u[e.TOP_RIGHT];var o=function(a,s,i,n,l){return u[i](a,s,n,l)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(42),u=t(87),o=t(55),a=t(88),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,u(n)+l),o(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(42),u=t(43),o=t(55),a=t(53),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,u(n)-l),o(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(42),u=t(44),o=t(55),a=t(54),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,u(n)+l),o(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(294),u=t(87),o=t(89),a=function(s,i,n,l){return n===void 0&&(n=0),l===void 0&&(l=0),e(s,u(i)+n,o(i)+l),s};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(88),u=t(90),o=function(a,s,i){return e(a,s),u(a,i)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(89),u=t(43),o=t(90),a=t(53),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,u(n)-l),o(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(89),u=t(44),o=t(90),a=t(54),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),a(i,u(n)+l),o(i,e(n)+r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(87),u=t(45),o=t(88),a=t(52),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),o(i,e(n)+l),a(i,u(n)-r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(43),u=t(45),o=t(53),a=t(52),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),o(i,e(n)-l),a(i,u(n)-r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(44),u=t(45),o=t(54),a=t(52),s=function(i,n,l,r){return l===void 0&&(l=0),r===void 0&&(r=0),o(i,e(n)+l),a(i,u(n)-r),i};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(169),u=t(98),o=t(14),a=t(4),s=function(i,n,l){l===void 0&&(l=new a);var r=u(n,0,o.PI2);return e(i,r,l)};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(302),u=t(169),o=t(98),a=t(14),s=function(i,n,l,r){r===void 0&&(r=[]),!n&&l>0&&(n=e(i)/l);for(var h=0;h<n;h++){var f=o(h/n,0,a.PI2);r.push(u(i,f))}return r};c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return 2*(Math.PI*e.radius)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=2,o={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(a){return a===void 0&&(a=1),this.alpha=a,this},alpha:{get:function(){return this._alpha},set:function(a){var s=e(a,0,1);this._alpha=s,s===0?this.renderFlags&=~u:this.renderFlags|=u}}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(35),u={_blendMode:e.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(o){typeof o=="string"&&(o=e[o]),o|=0,o>=-1&&(this._blendMode=o)}},setBlendMode:function(o){return this.blendMode=o,this}};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={_depth:0,depth:{get:function(){return this._depth},set:function(e){this.displayList&&this.displayList.queueDepthSort(),this._depth=e}},setDepth:function(e){return e===void 0&&(e=0),this.depth=e,this}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(171),u=t(130),o=function(a,s,i,n){n===void 0&&(n=[]),!s&&i>0&&(s=u(a)/i);for(var l=0;l<s;l++){var r=l/s;n.push(e(a,r))}return n};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a,s){return s===void 0&&(s=new e),s.x=o.x1+(o.x2-o.x1)*a,s.y=o.y1+(o.y2-o.y1)*a,s};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=Math.cos(a),i=Math.sin(a),n=e.x-u,l=e.y-o;return e.x=n*s-l*i+u,e.y=n*i+l*s+o,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(310),u=t(311),o={mask:null,setMask:function(a){return this.mask=a,this},clearMask:function(a){return a===void 0&&(a=!1),a&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(a){return a===void 0&&(this.texture||this.shader)&&(a=this),new e(this.scene,a)},createGeometryMask:function(a){return a===void 0&&this.type==="Graphics"&&(a=this),new u(this.scene,a)}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(22),o=t(91),a=new e({initialize:function(i,n){var l=i.sys.renderer;this.renderer=l,this.bitmapMask=n,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.createMask(),i.sys.game.events.on(u.CONTEXT_RESTORED,this.createMask,this),l&&l.on(o.RESIZE,this.createMask,this)},createMask:function(){var s=this.renderer;if(!(!s||!s.gl)){this.mainTexture&&this.clearMask();var i=s.width,n=s.height,l=(i&i-1)==0&&(n&n-1)==0,r=s.gl,h=l?r.REPEAT:r.CLAMP_TO_EDGE,f=r.LINEAR;this.mainTexture=s.createTexture2D(0,f,f,h,h,r.RGBA,null,i,n),this.maskTexture=s.createTexture2D(0,f,f,h,h,r.RGBA,null,i,n),this.mainFramebuffer=s.createFramebuffer(i,n,this.mainTexture,!0),this.maskFramebuffer=s.createFramebuffer(i,n,this.maskTexture,!0)}},clearMask:function(){var s=this.renderer;!s||!s.gl||!this.mainTexture||(s.deleteTexture(this.mainTexture),s.deleteTexture(this.maskTexture),s.deleteFramebuffer(this.mainFramebuffer),s.deleteFramebuffer(this.maskFramebuffer),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null)},setBitmap:function(s){this.bitmapMask=s},preRenderWebGL:function(s,i,n){s.pipelines.BITMAPMASK_PIPELINE.beginMask(this,i,n)},postRenderWebGL:function(s,i){s.pipelines.BITMAPMASK_PIPELINE.endMask(this,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.renderer&&this.renderer.off(o.RESIZE,this.createMask,this),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s){this.geometryMask=s,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(o){return this.geometryMask=o,this},setInvertAlpha:function(o){return o===void 0&&(o=!0),this.invertAlpha=o,this},preRenderWebGL:function(o,a,s){var i=o.gl;o.flush(),o.maskStack.length===0&&(i.enable(i.STENCIL_TEST),i.clear(i.STENCIL_BUFFER_BIT),o.maskCount=0),o.currentCameraMask.mask!==this&&(o.currentMask.mask=this),o.maskStack.push({mask:this,camera:s}),this.applyStencil(o,s,!0),o.maskCount++},applyStencil:function(o,a,s){var i=o.gl,n=this.geometryMask,l=o.maskCount;i.colorMask(!1,!1,!1,!1),s?(i.stencilFunc(i.EQUAL,l,255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)):(i.stencilFunc(i.EQUAL,l+1,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)),n.renderWebGL(o,n,a),o.flush(),i.colorMask(!0,!0,!0,!0),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),s?this.invertAlpha?i.stencilFunc(i.NOTEQUAL,l+1,255):i.stencilFunc(i.EQUAL,l+1,255):this.invertAlpha?i.stencilFunc(i.NOTEQUAL,l,255):i.stencilFunc(i.EQUAL,l,255)},postRenderWebGL:function(o){var a=o.gl;o.maskStack.pop(),o.maskCount--,o.flush();var s=o.currentMask;if(o.maskStack.length===0)s.mask=null,a.disable(a.STENCIL_TEST);else{var i=o.maskStack[o.maskStack.length-1];i.mask.applyStencil(o,i.camera,!1),o.currentCameraMask.mask!==i.mask?(s.mask=i.mask,s.camera=i.camera):s.mask=null}},preRenderCanvas:function(o,a,s){var i=this.geometryMask;o.currentContext.save(),i.renderCanvas(o,i,s,null,null,!0),o.currentContext.clip()},postRenderCanvas:function(o){o.currentContext.restore()},destroy:function(){this.geometryMask=null}});c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(e,u){return u===void 0&&(u=e),this.scrollFactorX=e,this.scrollFactorY=u,this}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=t(25),o=t(177),a=t(269),s=t(270),i=t(3),n=4,l={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(r){this._scaleX=r,this._scaleY=r,r===0?this.renderFlags&=~n:this.renderFlags|=n}},scaleX:{get:function(){return this._scaleX},set:function(r){this._scaleX=r,r===0?this.renderFlags&=~n:this.renderFlags|=n}},scaleY:{get:function(){return this._scaleY},set:function(r){this._scaleY=r,r===0?this.renderFlags&=~n:this.renderFlags|=n}},angle:{get:function(){return s(this._rotation*e.RAD_TO_DEG)},set:function(r){this.rotation=s(r)*e.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(r){this._rotation=a(r)}},setPosition:function(r,h,f,v){return r===void 0&&(r=0),h===void 0&&(h=r),f===void 0&&(f=0),v===void 0&&(v=0),this.x=r,this.y=h,this.z=f,this.w=v,this},copyPosition:function(r){return r.x!==void 0&&(this.x=r.x),r.y!==void 0&&(this.y=r.y),r.z!==void 0&&(this.z=r.z),r.w!==void 0&&(this.w=r.w),this},setRandomPosition:function(r,h,f,v){return r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=this.scene.sys.scale.width),v===void 0&&(v=this.scene.sys.scale.height),this.x=r+Math.random()*f,this.y=h+Math.random()*v,this},setRotation:function(r){return r===void 0&&(r=0),this.rotation=r,this},setAngle:function(r){return r===void 0&&(r=0),this.angle=r,this},setScale:function(r,h){return r===void 0&&(r=1),h===void 0&&(h=r),this.scaleX=r,this.scaleY=h,this},setX:function(r){return r===void 0&&(r=0),this.x=r,this},setY:function(r){return r===void 0&&(r=0),this.y=r,this},setZ:function(r){return r===void 0&&(r=0),this.z=r,this},setW:function(r){return r===void 0&&(r=0),this.w=r,this},getLocalTransformMatrix:function(r){return r===void 0&&(r=new u),r.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(r,h){r===void 0&&(r=new u),h===void 0&&(h=new u);var f=this.parentContainer;if(!f)return this.getLocalTransformMatrix(r);for(r.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);f;)h.applyITRS(f.x,f.y,f._rotation,f._scaleX,f._scaleY),h.multiply(r,r),f=f.parentContainer;return r},getLocalPoint:function(r,h,f,v){f||(f=new i),v||(v=this.scene.sys.cameras.main);var d=v.scrollX,p=v.scrollY,g=r+d*this.scrollFactorX-d,m=h+p*this.scrollFactorY-p;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(g,m,f):o(g,m,this.x,this.y,this.rotation,this.scaleX,this.scaleY,f),this._originComponent&&(f.x+=this._displayOriginX,f.y+=this._displayOriginY),f},getParentRotation:function(){for(var r=0,h=this.parentContainer;h;)r+=h.rotation,h=h.parentContainer;return r}};c.exports=l},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=1,e={_visible:!0,visible:{get:function(){return this._visible},set:function(u){u?(this._visible=!0,this.renderFlags|=t):(this._visible=!1,this.renderFlags&=~t)}},setVisible:function(u){return this.visible=u,this}};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={CHANGE_DATA:t(638),CHANGE_DATA_KEY:t(639),DESTROY:t(640),REMOVE_DATA:t(641),SET_DATA:t(642)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(130),u=t(4),o=function(a,s,i,n){if(n===void 0&&(n=[]),!s&&!i)return n;s?i=Math.round(e(a)/s):s=e(a)/i;for(var l=a.x,r=a.y,h=0,f=0;f<i;f++)switch(n.push(new u(l,r)),h){case 0:l+=s,l>=a.right&&(h=1,r+=l-a.right,l=a.right);break;case 1:r+=s,r>=a.bottom&&(h=2,l-=r-a.bottom,r=a.bottom);break;case 2:l-=s,l<=a.left&&(h=3,r-=a.left-l,l=a.left);break;case 3:r-=s,r<=a.top&&(h=0,r=a.top);break}return n};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){u===void 0&&(u=1),o===void 0&&(o=[]);var a=Math.round(e.x1),s=Math.round(e.y1),i=Math.round(e.x2),n=Math.round(e.y2),l=Math.abs(i-a),r=Math.abs(n-s),h=a<i?1:-1,f=s<n?1:-1,v=l-r;o.push({x:a,y:s});for(var d=1;!(a===i&&s===n);){var p=v<<1;p>-r&&(v-=r,a+=h),p<l&&(v+=l,s+=f),d%u==0&&o.push({x:a,y:s}),d++}return o};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(u.length){if(u.length===1)return u[0]}else return NaN;var a=1,s,i;if(o){if(e<u[0][o])return u[0];for(;u[a][o]<e;)a++}else for(;u[a]<e;)a++;return a>u.length&&(a=u.length),o?(s=u[a-1][o],i=u[a][o],i-e<=e-s?u[a]:u[a-1]):(s=u[a-1],i=u[a],i-e<=e-s?i:s)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s,i,n,l){l===void 0&&(l=!1),this.textureKey=a,this.textureFrame=s,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=l},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u=/\D/g;return e.sort(function(o,a){return parseInt(o.replace(u,""),10)-parseInt(a.replace(u,""),10)}),e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(185),u=t(0),o=t(102),a=t(9),s=t(132),i=t(22),n=t(2),l=t(6),r=t(186),h=t(322),f=new u({Extends:a,initialize:function(d){a.call(this),this.game=d,this.textureManager=null,this.globalTimeScale=1,this.anims=new o,this.mixes=new o,this.paused=!1,this.name="AnimationManager",d.events.once(i.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(i.DESTROY,this.destroy,this)},addMix:function(v,d,p){var g=this.anims,m=this.mixes,x=typeof v=="string"?v:v.key,y=typeof d=="string"?d:d.key;if(g.has(x)&&g.has(y)){var T=m.get(x);T||(T={}),T[y]=p,m.set(x,T)}return this},removeMix:function(v,d){var p=this.mixes,g=typeof v=="string"?v:v.key,m=p.get(g);if(m)if(d){var x=typeof d=="string"?d:d.key;m.hasOwnProperty(x)&&delete m[x]}else d||p.delete(g);return this},getMix:function(v,d){var p=this.mixes,g=typeof v=="string"?v:v.key,m=typeof d=="string"?d:d.key,x=p.get(g);return x&&x.hasOwnProperty(m)?x[m]:0},add:function(v,d){return this.anims.has(v)?(console.warn("Animation key exists: "+v),this):(d.key=v,this.anims.set(v,d),this.emit(s.ADD_ANIMATION,v,d),this)},exists:function(v){return this.anims.has(v)},createFromAseprite:function(v,d){var p=[],g=this.game.cache.json.get(v);if(!g)return p;var m=this,x=l(g,"meta",null),y=l(g,"frames",null);if(x&&y){var T=l(x,"frameTags",[]);T.forEach(function(E){var C=[],A=n(E,"name",null),P=n(E,"from",0),M=n(E,"to",0),O=n(E,"direction","forward");if(!!A&&(!d||d&&d.indexOf(A)>-1)){for(var I=[],N=Number.MAX_SAFE_INTEGER,Y=P;Y<=M;Y++){var X=Y.toString(),W=y[X];if(W){var H=n(W,"duration",Number.MAX_SAFE_INTEGER);H<N&&(N=H),I.push({frame:X,duration:H})}}I.forEach(function(G){C.push({key:v,frame:G.frame,duration:N-G.duration})});var D=N*C.length;O==="reverse"&&(C=C.reverse());var L={key:A,frames:C,duration:D,yoyo:O==="pingpong"},B=m.create(L);B&&p.push(B)}})}return p},create:function(v){var d=v.key,p=!1;return d&&(p=this.get(d),p||(p=new e(this,d,v),this.anims.set(d,p),this.emit(s.ADD_ANIMATION,d,p))),p},fromJSON:function(v,d){d===void 0&&(d=!1),d&&this.anims.clear(),typeof v=="string"&&(v=JSON.parse(v));var p=[];if(v.hasOwnProperty("anims")&&Array.isArray(v.anims)){for(var g=0;g<v.anims.length;g++)p.push(this.create(v.anims[g]));v.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=v.globalTimeScale)}else v.hasOwnProperty("key")&&v.type==="frame"&&p.push(this.create(v));return p},generateFrameNames:function(v,d){var p=l(d,"prefix",""),g=l(d,"start",0),m=l(d,"end",0),x=l(d,"suffix",""),y=l(d,"zeroPad",0),T=l(d,"outputArray",[]),E=l(d,"frames",!1),C=this.textureManager.get(v);if(!C)return T;var A;if(d)for(E||(E=h(g,m)),A=0;A<E.length;A++){var P=p+r(E[A],y,"0",1)+x;C.has(P)?T.push({key:v,frame:P}):console.warn("generateFrameNames: Frame missing: "+P+" from texture: "+v)}else for(E=C.getFrameNames(),A=0;A<E.length;A++)T.push({key:v,frame:E[A]});return T},generateFrameNumbers:function(v,d){var p=l(d,"start",0),g=l(d,"end",-1),m=l(d,"first",!1),x=l(d,"outputArray",[]),y=l(d,"frames",!1),T=this.textureManager.get(v);if(!T)return x;m&&T.has(m)&&x.push({key:v,frame:m}),y||(g===-1&&(g=T.frameTotal-2),y=h(p,g));for(var E=0;E<y.length;E++)T.has(y[E])?x.push({key:v,frame:y[E]}):console.warn("generateFrameNumbers: Frame "+E+" missing from texture: "+v);return x},get:function(v){return this.anims.get(v)},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(s.PAUSE_ALL)),this},play:function(v,d){Array.isArray(d)||(d=[d]);for(var p=0;p<d.length;p++)d[p].anims.play(v);return this},staggerPlay:function(v,d,p,g){p===void 0&&(p=0),g===void 0&&(g=!0),Array.isArray(d)||(d=[d]);var m=d.length;g||m--;for(var x=0;x<d.length;x++){var y=p<0?Math.abs(p)*(m-x):p*x;d[x].anims.playAfterDelay(v,y)}return this},remove:function(v){var d=this.get(v);return d&&(this.emit(s.REMOVE_ANIMATION,v,d),this.anims.delete(v),this.removeMix(v)),d},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(s.RESUME_ALL)),this},toJSON:function(v){var d={anims:[],globalTimeScale:this.globalTimeScale};return v!==void 0&&v!==""?d.anims.push(this.anims.get(v).toJSON()):this.anims.each(function(p,g){d.anims.push(g.toJSON())}),d},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});c.exports=f},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=[],i,n=!1;if((o||a)&&(n=!0,o||(o=""),a||(a="")),u<e)for(i=e;i>=u;i--)n?s.push(o+i.toString()+a):s.push(i);else for(i=e;i<=u;i++)n?s.push(o+i.toString()+a):s.push(i);return s};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(102),o=t(9),a=t(324),s=new e({initialize:function(){this.entries=new u,this.events=new o},add:function(i,n){return this.entries.set(i,n),this.events.emit(a.ADD,this,i,n),this},has:function(i){return this.entries.has(i)},exists:function(i){return this.entries.has(i)},get:function(i){return this.entries.get(i)},remove:function(i){var n=this.get(i);return n&&(this.entries.delete(i),this.events.emit(a.REMOVE,this,i,n.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ADD:t(736),REMOVE:t(737)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(323),u=t(0),o=t(22),a=new u({initialize:function(i){this.game=i,this.binary=new e,this.bitmapFont=new e,this.json=new e,this.physics=new e,this.shader=new e,this.audio=new e,this.video=new e,this.text=new e,this.html=new e,this.obj=new e,this.tilemap=new e,this.xml=new e,this.custom={},this.game.events.once(o.DESTROY,this.destroy,this)},addCustom:function(s){return this.custom.hasOwnProperty(s)||(this.custom[s]=new e),this.custom[s]},destroy:function(){for(var s=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],i=0;i<s.length;i++)this[s[i]].destroy(),this[s[i]]=null;for(var n in this.custom)this.custom[n].destroy();this.custom=null,this.game=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(133),u=t(190),o=t(18),a=t(0),s=t(11),i=t(333),n=t(37),l=t(135),r=t(10),h=t(3),f=new a({Extends:e,Mixins:[s.Flip,s.Tint,s.Pipeline],initialize:function(d,p,g,m){e.call(this,d,p,g,m),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new i.Fade(this),this.flashEffect=new i.Flash(this),this.shakeEffect=new i.Shake(this),this.panEffect=new i.Pan(this),this.rotateToEffect=new i.RotateTo(this),this.zoomEffect=new i.Zoom(this),this.lerp=new h(1,1),this.followOffset=new h,this.deadzone=null,this._follow=null},setDeadzone:function(v,d){if(v===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=v,this.deadzone.height=d):this.deadzone=new r(0,0,v,d),this._follow){var p=this.width/2,g=this.height/2,m=this._follow.x-this.followOffset.x,x=this._follow.y-this.followOffset.y;this.midPoint.set(m,x),this.scrollX=m-p,this.scrollY=x-g}u(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(v,d,p,g,m,x){return this.fadeEffect.start(!1,v,d,p,g,!0,m,x)},fadeOut:function(v,d,p,g,m,x){return this.fadeEffect.start(!0,v,d,p,g,!0,m,x)},fadeFrom:function(v,d,p,g,m,x,y){return this.fadeEffect.start(!1,v,d,p,g,m,x,y)},fade:function(v,d,p,g,m,x,y){return this.fadeEffect.start(!0,v,d,p,g,m,x,y)},flash:function(v,d,p,g,m,x,y){return this.flashEffect.start(v,d,p,g,m,x,y)},shake:function(v,d,p,g,m){return this.shakeEffect.start(v,d,p,g,m)},pan:function(v,d,p,g,m,x,y){return this.panEffect.start(v,d,p,g,m,x,y)},rotateTo:function(v,d,p,g,m,x,y){return this.rotateToEffect.start(v,d,p,g,m,x,y)},zoomTo:function(v,d,p,g,m,x){return this.zoomEffect.start(v,d,p,g,m,x)},preRender:function(){this.renderList.length=0;var v=this.width,d=this.height,p=v*.5,g=d*.5,m=this.zoom,x=this.matrix,y=v*this.originX,T=d*this.originY,E=this._follow,C=this.deadzone,A=this.scrollX,P=this.scrollY;C&&u(C,this.midPoint.x,this.midPoint.y);var M=!1;if(E&&!this.panEffect.isRunning){var O=E.x-this.followOffset.x,I=E.y-this.followOffset.y;C?(O<C.x?A=l(A,A-(C.x-O),this.lerp.x):O>C.right&&(A=l(A,A+(O-C.right),this.lerp.x)),I<C.y?P=l(P,P-(C.y-I),this.lerp.y):I>C.bottom&&(P=l(P,P+(I-C.bottom),this.lerp.y))):(A=l(A,O-y,this.lerp.x),P=l(P,I-T,this.lerp.y)),M=!0}this.useBounds&&(A=this.clampX(A),P=this.clampY(P)),this.roundPixels&&(y=Math.round(y),T=Math.round(T),A=Math.round(A),P=Math.round(P)),this.scrollX=A,this.scrollY=P;var N=A+p,Y=P+g;this.midPoint.set(N,Y);var X=v/m,W=d/m,H=N-X/2,D=Y-W/2;this.roundPixels&&(H=Math.round(H),D=Math.round(D)),this.worldView.setTo(H,D,X,W),x.applyITRS(this.x+y,this.y+T,this.rotation,m,m),x.translate(-y,-T),this.shakeEffect.preRender(),M&&this.emit(n.FOLLOW_UPDATE,this,E)},setLerp:function(v,d){return v===void 0&&(v=1),d===void 0&&(d=v),this.lerp.set(v,d),this},setFollowOffset:function(v,d){return v===void 0&&(v=0),d===void 0&&(d=0),this.followOffset.set(v,d),this},startFollow:function(v,d,p,g,m,x){d===void 0&&(d=!1),p===void 0&&(p=1),g===void 0&&(g=p),m===void 0&&(m=0),x===void 0&&(x=m),this._follow=v,this.roundPixels=d,p=o(p,0,1),g=o(g,0,1),this.lerp.set(p,g),this.followOffset.set(m,x);var y=this.width/2,T=this.height/2,E=v.x-m,C=v.y-x;return this.midPoint.set(E,C),this.scrollX=E-y,this.scrollY=C-T,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(v,d){this.visible&&(this.rotateToEffect.update(v,d),this.panEffect.update(v,d),this.zoomEffect.update(v,d),this.shakeEffect.update(v,d),this.flashEffect.update(v,d),this.fadeEffect.update(v,d))},destroy:function(){this.resetFX(),e.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});c.exports=f},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(38),u=function(o){var a=new e;o=o.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(r,h,f,v){return h+h+f+f+v+v});var s=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);if(s){var i=parseInt(s[1],16),n=parseInt(s[2],16),l=parseInt(s[3],16);a.setTo(i,n,l)}return a};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){return a<<24|e<<16|u<<8|o};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){a===void 0&&(a={h:0,s:0,v:0}),e/=255,u/=255,o/=255;var s=Math.min(e,u,o),i=Math.max(e,u,o),n=i-s,l=0,r=i===0?0:n/i,h=i;return i!==s&&(i===e?l=(u-o)/n+(u<o?6:0):i===u?l=(o-e)/n+2:i===o&&(l=(e-u)/n+4),l/=6),a.hasOwnProperty("_h")?(a._h=l,a._s=r,a._v=h):(a.h=l,a.s=r,a.v=h),a};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e>16777215?{a:e>>>24,r:e>>16&255,g:e>>8&255,b:e&255}:{a:255,r:e>>16&255,g:e>>8&255,b:e&255}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(38),u=function(o){return new e(o.r,o.g,o.b,o.a)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(38),u=function(o){var a=new e,s=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(o.toLowerCase());if(s){var i=parseInt(s[1],10),n=parseInt(s[2],10),l=parseInt(s[3],10),r=s[4]!==void 0?parseFloat(s[4]):1;a.setTo(i,n,l,r*255)}return a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Fade:t(761),Flash:t(762),Pan:t(763),Shake:t(796),RotateTo:t(797),Zoom:t(798)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(764),Out:t(765),InOut:t(766)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(767),Out:t(768),InOut:t(769)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(770),Out:t(771),InOut:t(772)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(773),Out:t(774),InOut:t(775)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(776),Out:t(777),InOut:t(778)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(779),Out:t(780),InOut:t(781)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports=t(782)},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(783),Out:t(784),InOut:t(785)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(786),Out:t(787),InOut:t(788)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(789),Out:t(790),InOut:t(791)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={In:t(792),Out:t(793),InOut:t(794)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports=t(795)},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(33),o=t(347),a=t(2),s=t(6),i=t(7),n=t(193),l=t(1),r=t(197),h=t(187),f=new e({initialize:function(d){d===void 0&&(d={});var p=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],g="#ffffff";this.width=s(d,"width",1024),this.height=s(d,"height",768),this.zoom=s(d,"zoom",1),this.parent=s(d,"parent",void 0),this.scaleMode=s(d,"scaleMode",0),this.expandParent=s(d,"expandParent",!0),this.autoRound=s(d,"autoRound",!1),this.autoCenter=s(d,"autoCenter",0),this.resizeInterval=s(d,"resizeInterval",500),this.fullscreenTarget=s(d,"fullscreenTarget",null),this.minWidth=s(d,"minWidth",0),this.maxWidth=s(d,"maxWidth",0),this.minHeight=s(d,"minHeight",0),this.maxHeight=s(d,"maxHeight",0);var m=s(d,"scale",null);m&&(this.width=s(m,"width",this.width),this.height=s(m,"height",this.height),this.zoom=s(m,"zoom",this.zoom),this.parent=s(m,"parent",this.parent),this.scaleMode=s(m,"mode",this.scaleMode),this.expandParent=s(m,"expandParent",this.expandParent),this.autoRound=s(m,"autoRound",this.autoRound),this.autoCenter=s(m,"autoCenter",this.autoCenter),this.resizeInterval=s(m,"resizeInterval",this.resizeInterval),this.fullscreenTarget=s(m,"fullscreenTarget",this.fullscreenTarget),this.minWidth=s(m,"min.width",this.minWidth),this.maxWidth=s(m,"max.width",this.maxWidth),this.minHeight=s(m,"min.height",this.minHeight),this.maxHeight=s(m,"max.height",this.maxHeight)),this.renderType=s(d,"type",u.AUTO),this.canvas=s(d,"canvas",null),this.context=s(d,"context",null),this.canvasStyle=s(d,"canvasStyle",null),this.customEnvironment=s(d,"customEnvironment",!1),this.sceneConfig=s(d,"scene",null),this.seed=s(d,"seed",[(Date.now()*Math.random()).toString()]),n.RND=new n.RandomDataGenerator(this.seed),this.gameTitle=s(d,"title",""),this.gameURL=s(d,"url","https://phaser.io"),this.gameVersion=s(d,"version",""),this.autoFocus=s(d,"autoFocus",!0),this.domCreateContainer=s(d,"dom.createContainer",!1),this.domBehindCanvas=s(d,"dom.behindCanvas",!1),this.domPointerEvents=s(d,"dom.pointerEvents","none"),this.inputKeyboard=s(d,"input.keyboard",!0),this.inputKeyboardEventTarget=s(d,"input.keyboard.target",window),this.inputKeyboardCapture=s(d,"input.keyboard.capture",[]),this.inputMouse=s(d,"input.mouse",!0),this.inputMouseEventTarget=s(d,"input.mouse.target",null),this.inputMousePreventDefaultDown=s(d,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=s(d,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=s(d,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=s(d,"input.mouse.preventDefaultWheel",!0),this.inputTouch=s(d,"input.touch",o.input.touch),this.inputTouchEventTarget=s(d,"input.touch.target",null),this.inputTouchCapture=s(d,"input.touch.capture",!0),this.inputActivePointers=s(d,"input.activePointers",1),this.inputSmoothFactor=s(d,"input.smoothFactor",0),this.inputWindowEvents=s(d,"input.windowEvents",!0),this.inputGamepad=s(d,"input.gamepad",!1),this.inputGamepadEventTarget=s(d,"input.gamepad.target",window),this.disableContextMenu=s(d,"disableContextMenu",!1),this.audio=s(d,"audio",{}),this.hideBanner=s(d,"banner",null)===!1,this.hidePhaser=s(d,"banner.hidePhaser",!1),this.bannerTextColor=s(d,"banner.text",g),this.bannerBackgroundColor=s(d,"banner.background",p),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=s(d,"fps",null);var x=s(d,"render",d);this.pipeline=s(x,"pipeline",null),this.antialias=s(x,"antialias",!0),this.antialiasGL=s(x,"antialiasGL",!0),this.mipmapFilter=s(x,"mipmapFilter","LINEAR"),this.desynchronized=s(x,"desynchronized",!1),this.roundPixels=s(x,"roundPixels",!1),this.pixelArt=s(x,"pixelArt",this.zoom!==1),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=s(x,"transparent",!1),this.clearBeforeRender=s(x,"clearBeforeRender",!0),this.preserveDrawingBuffer=s(x,"preserveDrawingBuffer",!1),this.premultipliedAlpha=s(x,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=s(x,"failIfMajorPerformanceCaveat",!1),this.powerPreference=s(x,"powerPreference","default"),this.batchSize=s(x,"batchSize",4096),this.maxTextures=s(x,"maxTextures",-1),this.maxLights=s(x,"maxLights",10);var y=s(d,"backgroundColor",0);this.backgroundColor=h(y),this.transparent&&(this.backgroundColor=h(0),this.backgroundColor.alpha=0),this.preBoot=s(d,"callbacks.preBoot",l),this.postBoot=s(d,"callbacks.postBoot",l),this.physics=s(d,"physics",{}),this.defaultPhysicsSystem=s(this.physics,"default",!1),this.loaderBaseURL=s(d,"loader.baseURL",""),this.loaderPath=s(d,"loader.path","");var T=o.os.android?6:32;this.loaderMaxParallelDownloads=s(d,"loader.maxParallelDownloads",T),this.loaderCrossOrigin=s(d,"loader.crossOrigin",void 0),this.loaderResponseType=s(d,"loader.responseType",""),this.loaderAsync=s(d,"loader.async",!0),this.loaderUser=s(d,"loader.user",""),this.loaderPassword=s(d,"loader.password",""),this.loaderTimeout=s(d,"loader.timeout",0),this.loaderWithCredentials=s(d,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var E=s(d,"plugins",null),C=r.DefaultScene;E&&(Array.isArray(E)?this.defaultPlugins=E:i(E)&&(this.installGlobalPlugins=a(E,"global",[]),this.installScenePlugins=a(E,"scene",[]),Array.isArray(E.default)?C=E.default:Array.isArray(E.defaultMerge)&&(C=C.concat(E.defaultMerge)))),this.defaultPlugins=C;var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=s(d,"images.default",A+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=s(d,"images.missing",A+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=s(d,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=u.WEBGL:window.FORCE_CANVAS&&(this.renderType=u.CANVAS))}});c.exports=f},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={os:t(105),browser:t(136),features:t(191),input:t(808),audio:t(809),video:t(810),fullscreen:t(811),canvasFeatures:t(348)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(31),u={supportInverseAlpha:!1,supportNewBlendModes:!1};function o(){var i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",l=new Image;return l.onload=function(){var r=new Image;r.onload=function(){var h=e.create(r,6,1),f=h.getContext("2d");if(f.globalCompositeOperation="multiply",f.drawImage(l,0,0),f.drawImage(r,2,0),!f.getImageData(2,0,1,1))return!1;var v=f.getImageData(2,0,1,1).data;e.remove(r),u.supportNewBlendModes=v[0]===255&&v[1]===0&&v[2]===0},r.src=i+"/wCKxvRF"+n},l.src=i+"AP804Oa6"+n,!1}function a(){var i=e.create(this,2,1),n=i.getContext("2d");n.fillStyle="rgba(10, 20, 30, 0.5)",n.fillRect(0,0,1,1);var l=n.getImageData(0,0,1,1);if(l===null)return!1;n.putImageData(l,1,0);var r=n.getImageData(1,0,1,1);return r.data[0]===l.data[0]&&r.data[1]===l.data[1]&&r.data[2]===l.data[2]&&r.data[3]===l.data[3]}function s(){return typeof importScripts!="function"&&document!==void 0&&(u.supportNewBlendModes=o(),u.supportInverseAlpha=a()),u}c.exports=s()},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){return Math.atan2(a-u,o-e)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return Math.atan2(u.y-e.y,u.x-e.x)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e=e%(2*Math.PI),e>=0?e:e+2*Math.PI};c.exports=t},function(c,S){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.x-u.x,a=e.y-u.y;return Math.sqrt(o*o+a*a)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=e-o,i=u-a;return s*s+i*i};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return o===void 0&&(o=1e-4),e>u-o};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return o===void 0&&(o=1e-4),e<u+o};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(357),u=function(o,a){return e(o)/e(a)/e(o-a)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){if(e===0)return 1;for(var u=e;--e;)u*=e;return u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */function t(s,i){var n=1-s;return n*n*n*i}function e(s,i){var n=1-s;return 3*n*n*s*i}function u(s,i){return 3*(1-s)*s*s*i}function o(s,i){return s*s*s*i}var a=function(s,i,n,l,r){return t(s,i)+e(s,n)+u(s,l)+o(s,r)};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */function t(a,s){var i=1-a;return i*i*s}function e(a,s){return 2*(1-a)*a*s}function u(a,s){return a*a*s}var o=function(a,s,i,n){return t(a,s)+e(a,i)+u(a,n)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(184),u=function(o,a,s){return a+(s-a)*e(o,0,1)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u=Math.log(e)/.6931471805599453;return 1<<Math.ceil(u)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.x,a=e.y;return e.x=o*Math.cos(u)-a*Math.sin(u),e.y=o*Math.sin(u)+a*Math.cos(u),e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e>0?Math.ceil(e):Math.floor(e)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a){this.val=new Float32Array(9),a?this.copy(a):this.identity()},clone:function(){return new u(this)},set:function(o){return this.copy(o)},copy:function(o){var a=this.val,s=o.val;return a[0]=s[0],a[1]=s[1],a[2]=s[2],a[3]=s[3],a[4]=s[4],a[5]=s[5],a[6]=s[6],a[7]=s[7],a[8]=s[8],this},fromMat4:function(o){var a=o.val,s=this.val;return s[0]=a[0],s[1]=a[1],s[2]=a[2],s[3]=a[4],s[4]=a[5],s[5]=a[6],s[6]=a[8],s[7]=a[9],s[8]=a[10],this},fromArray:function(o){var a=this.val;return a[0]=o[0],a[1]=o[1],a[2]=o[2],a[3]=o[3],a[4]=o[4],a[5]=o[5],a[6]=o[6],a[7]=o[7],a[8]=o[8],this},identity:function(){var o=this.val;return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=1,o[5]=0,o[6]=0,o[7]=0,o[8]=1,this},transpose:function(){var o=this.val,a=o[1],s=o[2],i=o[5];return o[1]=o[3],o[2]=o[6],o[3]=a,o[5]=o[7],o[6]=s,o[7]=i,this},invert:function(){var o=this.val,a=o[0],s=o[1],i=o[2],n=o[3],l=o[4],r=o[5],h=o[6],f=o[7],v=o[8],d=v*l-r*f,p=-v*n+r*h,g=f*n-l*h,m=a*d+s*p+i*g;return m?(m=1/m,o[0]=d*m,o[1]=(-v*s+i*f)*m,o[2]=(r*s-i*l)*m,o[3]=p*m,o[4]=(v*a-i*h)*m,o[5]=(-r*a+i*n)*m,o[6]=g*m,o[7]=(-f*a+s*h)*m,o[8]=(l*a-s*n)*m,this):null},adjoint:function(){var o=this.val,a=o[0],s=o[1],i=o[2],n=o[3],l=o[4],r=o[5],h=o[6],f=o[7],v=o[8];return o[0]=l*v-r*f,o[1]=i*f-s*v,o[2]=s*r-i*l,o[3]=r*h-n*v,o[4]=a*v-i*h,o[5]=i*n-a*r,o[6]=n*f-l*h,o[7]=s*h-a*f,o[8]=a*l-s*n,this},determinant:function(){var o=this.val,a=o[0],s=o[1],i=o[2],n=o[3],l=o[4],r=o[5],h=o[6],f=o[7],v=o[8];return a*(v*l-r*f)+s*(-v*n+r*h)+i*(f*n-l*h)},multiply:function(o){var a=this.val,s=a[0],i=a[1],n=a[2],l=a[3],r=a[4],h=a[5],f=a[6],v=a[7],d=a[8],p=o.val,g=p[0],m=p[1],x=p[2],y=p[3],T=p[4],E=p[5],C=p[6],A=p[7],P=p[8];return a[0]=g*s+m*l+x*f,a[1]=g*i+m*r+x*v,a[2]=g*n+m*h+x*d,a[3]=y*s+T*l+E*f,a[4]=y*i+T*r+E*v,a[5]=y*n+T*h+E*d,a[6]=C*s+A*l+P*f,a[7]=C*i+A*r+P*v,a[8]=C*n+A*h+P*d,this},translate:function(o){var a=this.val,s=o.x,i=o.y;return a[6]=s*a[0]+i*a[3]+a[6],a[7]=s*a[1]+i*a[4]+a[7],a[8]=s*a[2]+i*a[5]+a[8],this},rotate:function(o){var a=this.val,s=a[0],i=a[1],n=a[2],l=a[3],r=a[4],h=a[5],f=Math.sin(o),v=Math.cos(o);return a[0]=v*s+f*l,a[1]=v*i+f*r,a[2]=v*n+f*h,a[3]=v*l-f*s,a[4]=v*r-f*i,a[5]=v*h-f*n,this},scale:function(o){var a=this.val,s=o.x,i=o.y;return a[0]=s*a[0],a[1]=s*a[1],a[2]=s*a[2],a[3]=i*a[3],a[4]=i*a[4],a[5]=i*a[5],this},fromQuat:function(o){var a=o.x,s=o.y,i=o.z,n=o.w,l=a+a,r=s+s,h=i+i,f=a*l,v=a*r,d=a*h,p=s*r,g=s*h,m=i*h,x=n*l,y=n*r,T=n*h,E=this.val;return E[0]=1-(p+m),E[3]=v+T,E[6]=d-y,E[1]=v-T,E[4]=1-(f+m),E[7]=g+x,E[2]=d+y,E[5]=g-x,E[8]=1-(f+p),this},normalFromMat4:function(o){var a=o.val,s=this.val,i=a[0],n=a[1],l=a[2],r=a[3],h=a[4],f=a[5],v=a[6],d=a[7],p=a[8],g=a[9],m=a[10],x=a[11],y=a[12],T=a[13],E=a[14],C=a[15],A=i*f-n*h,P=i*v-l*h,M=i*d-r*h,O=n*v-l*f,I=n*d-r*f,N=l*d-r*v,Y=p*T-g*y,X=p*E-m*y,W=p*C-x*y,H=g*E-m*T,D=g*C-x*T,L=m*C-x*E,B=A*L-P*D+M*H+O*W-I*X+N*Y;return B?(B=1/B,s[0]=(f*L-v*D+d*H)*B,s[1]=(v*W-h*L-d*X)*B,s[2]=(h*D-f*W+d*Y)*B,s[3]=(l*D-n*L-r*H)*B,s[4]=(i*L-l*W+r*X)*B,s[5]=(n*W-i*D-r*Y)*B,s[6]=(T*N-E*I+C*O)*B,s[7]=(E*M-y*N-C*P)*B,s[8]=(y*I-T*M+C*A)*B,this):null}});c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(364),o=t(1),a=t(39),s=1e-6,i=new Int8Array([1,2,0]),n=new Float32Array([0,0,0]),l=new a(1,0,0),r=new a(0,1,0),h=new a,f=new u,v=new e({initialize:function(p,g,m,x){this.onChangeCallback=o,this.set(p,g,m,x)},x:{get:function(){return this._x},set:function(d){this._x=d,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(d){this._y=d,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(d){this._z=d,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(d){this._w=d,this.onChangeCallback(this)}},copy:function(d){return this.set(d)},set:function(d,p,g,m,x){return x===void 0&&(x=!0),typeof d=="object"?(this._x=d.x||0,this._y=d.y||0,this._z=d.z||0,this._w=d.w||0):(this._x=d||0,this._y=p||0,this._z=g||0,this._w=m||0),x&&this.onChangeCallback(this),this},add:function(d){return this._x+=d.x,this._y+=d.y,this._z+=d.z,this._w+=d.w,this.onChangeCallback(this),this},subtract:function(d){return this._x-=d.x,this._y-=d.y,this._z-=d.z,this._w-=d.w,this.onChangeCallback(this),this},scale:function(d){return this._x*=d,this._y*=d,this._z*=d,this._w*=d,this.onChangeCallback(this),this},length:function(){var d=this.x,p=this.y,g=this.z,m=this.w;return Math.sqrt(d*d+p*p+g*g+m*m)},lengthSq:function(){var d=this.x,p=this.y,g=this.z,m=this.w;return d*d+p*p+g*g+m*m},normalize:function(){var d=this.x,p=this.y,g=this.z,m=this.w,x=d*d+p*p+g*g+m*m;return x>0&&(x=1/Math.sqrt(x),this._x=d*x,this._y=p*x,this._z=g*x,this._w=m*x),this.onChangeCallback(this),this},dot:function(d){return this.x*d.x+this.y*d.y+this.z*d.z+this.w*d.w},lerp:function(d,p){p===void 0&&(p=0);var g=this.x,m=this.y,x=this.z,y=this.w;return this.set(g+p*(d.x-g),m+p*(d.y-m),x+p*(d.z-x),y+p*(d.w-y))},rotationTo:function(d,p){var g=d.x*p.x+d.y*p.y+d.z*p.z;return g<-.999999?(h.copy(l).cross(d).length()<s&&h.copy(r).cross(d),h.normalize(),this.setAxisAngle(h,Math.PI)):g>.999999?this.set(0,0,0,1):(h.copy(d).cross(p),this._x=h.x,this._y=h.y,this._z=h.z,this._w=1+g,this.normalize())},setAxes:function(d,p,g){var m=f.val;return m[0]=p.x,m[3]=p.y,m[6]=p.z,m[1]=g.x,m[4]=g.y,m[7]=g.z,m[2]=-d.x,m[5]=-d.y,m[8]=-d.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(d,p){p=p*.5;var g=Math.sin(p);return this.set(g*d.x,g*d.y,g*d.z,Math.cos(p))},multiply:function(d){var p=this.x,g=this.y,m=this.z,x=this.w,y=d.x,T=d.y,E=d.z,C=d.w;return this.set(p*C+x*y+g*E-m*T,g*C+x*T+m*y-p*E,m*C+x*E+p*T-g*y,x*C-p*y-g*T-m*E)},slerp:function(d,p){var g=this.x,m=this.y,x=this.z,y=this.w,T=d.x,E=d.y,C=d.z,A=d.w,P=g*T+m*E+x*C+y*A;P<0&&(P=-P,T=-T,E=-E,C=-C,A=-A);var M=1-p,O=p;if(1-P>s){var I=Math.acos(P),N=Math.sin(I);M=Math.sin((1-p)*I)/N,O=Math.sin(p*I)/N}return this.set(M*g+O*T,M*m+O*E,M*x+O*C,M*y+O*A)},invert:function(){var d=this.x,p=this.y,g=this.z,m=this.w,x=d*d+p*p+g*g+m*m,y=x?1/x:0;return this.set(-d*y,-p*y,-g*y,m*y)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(d){d*=.5;var p=this.x,g=this.y,m=this.z,x=this.w,y=Math.sin(d),T=Math.cos(d);return this.set(p*T+x*y,g*T+m*y,m*T-g*y,x*T-p*y)},rotateY:function(d){d*=.5;var p=this.x,g=this.y,m=this.z,x=this.w,y=Math.sin(d),T=Math.cos(d);return this.set(p*T-m*y,g*T+x*y,m*T+p*y,x*T-g*y)},rotateZ:function(d){d*=.5;var p=this.x,g=this.y,m=this.z,x=this.w,y=Math.sin(d),T=Math.cos(d);return this.set(p*T+g*y,g*T-p*y,m*T+x*y,x*T-m*y)},calculateW:function(){var d=this.x,p=this.y,g=this.z;return this.w=-Math.sqrt(1-d*d-p*p-g*g),this},setFromEuler:function(d,p){var g=d.x/2,m=d.y/2,x=d.z/2,y=Math.cos(g),T=Math.cos(m),E=Math.cos(x),C=Math.sin(g),A=Math.sin(m),P=Math.sin(x);switch(d.order){case"XYZ":{this.set(C*T*E+y*A*P,y*A*E-C*T*P,y*T*P+C*A*E,y*T*E-C*A*P,p);break}case"YXZ":{this.set(C*T*E+y*A*P,y*A*E-C*T*P,y*T*P-C*A*E,y*T*E+C*A*P,p);break}case"ZXY":{this.set(C*T*E-y*A*P,y*A*E+C*T*P,y*T*P+C*A*E,y*T*E-C*A*P,p);break}case"ZYX":{this.set(C*T*E-y*A*P,y*A*E+C*T*P,y*T*P-C*A*E,y*T*E+C*A*P,p);break}case"YZX":{this.set(C*T*E+y*A*P,y*A*E+C*T*P,y*T*P-C*A*E,y*T*E-C*A*P,p);break}case"XZY":{this.set(C*T*E-y*A*P,y*A*E-C*T*P,y*T*P+C*A*E,y*T*E+C*A*P,p);break}}return this},setFromRotationMatrix:function(d){var p=d.val,g=p[0],m=p[4],x=p[8],y=p[1],T=p[5],E=p[9],C=p[2],A=p[6],P=p[10],M=g+T+P,O;return M>0?(O=.5/Math.sqrt(M+1),this.set((A-E)*O,(x-C)*O,(y-m)*O,.25/O)):g>T&&g>P?(O=2*Math.sqrt(1+g-T-P),this.set(.25*O,(m+y)/O,(x+C)/O,(A-E)/O)):T>P?(O=2*Math.sqrt(1+T-g-P),this.set((m+y)/O,.25*O,(E+A)/O,(x-C)/O)):(O=2*Math.sqrt(1+P-g-T),this.set((x+C)/O,(E+A)/O,.25*O,(y-m)/O)),this},fromMat3:function(d){var p=d.val,g=p[0]+p[4]+p[8],m;if(g>0)m=Math.sqrt(g+1),this.w=.5*m,m=.5/m,this._x=(p[7]-p[5])*m,this._y=(p[2]-p[6])*m,this._z=(p[3]-p[1])*m;else{var x=0;p[4]>p[0]&&(x=1),p[8]>p[x*3+x]&&(x=2);var y=i[x],T=i[y];m=Math.sqrt(p[x*3+x]-p[y*3+y]-p[T*3+T]+1),n[x]=.5*m,m=.5/m,n[y]=(p[y*3+x]+p[x*3+y])*m,n[T]=(p[T*3+x]+p[x*3+T])*m,this._x=n[0],this._y=n[1],this._z=n[2],this._w=(p[T*3+y]-p[y*3+T])*m}return this.onChangeCallback(this),this}});c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(367),u=t(31),o=t(33),a=t(191),s=function(i){var n=i.config;if((n.customEnvironment||n.canvas)&&n.renderType===o.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!n.customEnvironment&&!n.canvas&&n.renderType!==o.HEADLESS)if(n.renderType===o.CANVAS||n.renderType!==o.CANVAS&&!a.webGL)if(a.canvas)n.renderType=o.CANVAS;else throw new Error("Cannot create Canvas or WebGL context, aborting.");else n.renderType=o.WEBGL;n.antialias||u.disableSmoothing();var l=i.scale.baseSize,r=l.width,h=l.height;if(n.canvas?(i.canvas=n.canvas,i.canvas.width=r,i.canvas.height=h):i.canvas=u.create(i,r,h,n.renderType),n.canvasStyle&&(i.canvas.style=n.canvasStyle),n.antialias||e.setCrisp(i.canvas),n.renderType!==o.HEADLESS){var f,v;f=t(368),v=t(371),n.renderType===o.WEBGL?i.renderer=new v(i):(i.renderer=new f(i),i.context=i.renderer.gameContext)}};c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setCrisp:function(e){var u=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return u.forEach(function(o){e.style["image-rendering"]=o}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(e){return e.style["image-rendering"]="auto",e.style.msInterpolationMode="bicubic",e}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(37),u=t(369),o=t(0),a=t(33),s=t(9),i=t(91),n=t(370),l=t(104),r=t(106),h=t(25),f=new o({Extends:s,initialize:function(d){s.call(this);var p=d.config;this.config={clearBeforeRender:p.clearBeforeRender,backgroundColor:p.backgroundColor,antialias:p.antialias,roundPixels:p.roundPixels},this.game=d,this.type=a.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=d.canvas;var g={alpha:d.config.transparent,desynchronized:d.config.desynchronized};this.gameContext=p.context?p.context:this.gameCanvas.getContext("2d",g),this.currentContext=this.gameContext,this.antialias=d.config.antialias,this.blendModes=n(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(r.READY,this.boot,this)},boot:function(){var v=this.game,d=v.scale.baseSize;this.width=d.width,this.height=d.height,this.isBooted=!0,v.scale.on(l.RESIZE,this.onResize,this),this.resize(d.width,d.height)},onResize:function(v,d){(d.width!==this.width||d.height!==this.height)&&this.resize(d.width,d.height)},resize:function(v,d){this.width=v,this.height=d,this.emit(i.RESIZE,v,d)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(v){return this.currentContext.globalCompositeOperation=v,this},setContext:function(v){return this.currentContext=v||this.gameContext,this},setAlpha:function(v){return this.currentContext.globalAlpha=v,this},preRender:function(){var v=this.gameContext,d=this.config,p=this.width,g=this.height;v.globalAlpha=1,v.globalCompositeOperation="source-over",v.setTransform(1,0,0,1,0,0),d.clearBeforeRender&&(v.clearRect(0,0,p,g),d.transparent||(v.fillStyle=d.backgroundColor.rgba,v.fillRect(0,0,p,g))),v.save(),this.drawCount=0,this.emit(i.PRE_RENDER)},render:function(v,d,p){var g=d.length;this.emit(i.RENDER,v,p);var m=p.x,x=p.y,y=p.width,T=p.height,E=p.renderToTexture?p.context:v.sys.context;E.save(),this.game.scene.customViewports&&(E.beginPath(),E.rect(m,x,y,T),E.clip()),this.currentContext=E;var C=p.mask;C&&C.preRenderCanvas(this,null,p._maskCamera),p.transparent||(E.fillStyle=p.backgroundColor.rgba,E.fillRect(m,x,y,T)),E.globalAlpha=p.alpha,E.globalCompositeOperation="source-over",this.drawCount+=g,p.renderToTexture&&p.emit(e.PRE_RENDER,p),p.matrix.copyToContext(E);for(var A=0;A<g;A++){var P=d[A];P.mask&&P.mask.preRenderCanvas(this,P,p),P.renderCanvas(this,P,p),P.mask&&P.mask.postRenderCanvas(this,P,p)}E.setTransform(1,0,0,1,0,0),E.globalCompositeOperation="source-over",E.globalAlpha=1,p.flashEffect.postRenderCanvas(E),p.fadeEffect.postRenderCanvas(E),p.dirty=!1,C&&C.postRenderCanvas(this),E.restore(),p.renderToTexture&&(p.emit(e.POST_RENDER,p),p.renderToGame&&v.sys.context.drawImage(p.canvas,m,x))},postRender:function(){var v=this.gameContext;v.restore(),this.emit(i.POST_RENDER);var d=this.snapshotState;d.callback&&(u(this.gameCanvas,d),d.callback=null)},snapshotCanvas:function(v,d,p,g,m,x,y,T,E){p===void 0&&(p=!1),this.snapshotArea(g,m,x,y,d,T,E);var C=this.snapshotState;return C.getPixel=p,u(this.canvas,C),C.callback=null,this},snapshot:function(v,d,p){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,v,d,p)},snapshotArea:function(v,d,p,g,m,x,y){var T=this.snapshotState;return T.callback=m,T.type=x,T.encoder=y,T.getPixel=!1,T.x=v,T.y=d,T.width=Math.min(p,this.gameCanvas.width),T.height=Math.min(g,this.gameCanvas.height),this},snapshotPixel:function(v,d,p){return this.snapshotArea(v,d,1,1,p),this.snapshotState.getPixel=!0,this},batchSprite:function(v,d,p,g){var m=p.alpha*v.alpha;if(m!==0){var x=this.currentContext,y=this._tempMatrix1,T=this._tempMatrix2,E=d.canvasData,C=E.x,A=E.y,P=d.cutWidth,M=d.cutHeight,O=d.customPivot,I=d.source.resolution,N=v.displayOriginX,Y=v.displayOriginY,X=-N+d.x,W=-Y+d.y;if(v.isCropped){var H=v._crop;(H.flipX!==v.flipX||H.flipY!==v.flipY)&&d.updateCropUVs(H,v.flipX,v.flipY),P=H.cw,M=H.ch,C=H.cx,A=H.cy,X=-N+H.x,W=-Y+H.y,v.flipX&&(X>=0?X=-(X+P):X<0&&(X=Math.abs(X)-P)),v.flipY&&(W>=0?W=-(W+M):W<0&&(W=Math.abs(W)-M))}var D=1,L=1;v.flipX&&(O||(X+=-d.realWidth+N*2),D=-1),v.flipY&&(O||(W+=-d.realHeight+Y*2),L=-1),T.applyITRS(v.x,v.y,v.rotation,v.scaleX*D,v.scaleY*L),y.copyFrom(p.matrix),g?(y.multiplyWithOffset(g,-p.scrollX*v.scrollFactorX,-p.scrollY*v.scrollFactorY),T.e=v.x,T.f=v.y):(T.e-=p.scrollX*v.scrollFactorX,T.f-=p.scrollY*v.scrollFactorY),y.multiply(T),x.save(),y.setToContext(x),x.globalCompositeOperation=this.blendModes[v.blendMode],x.globalAlpha=m,x.imageSmoothingEnabled=!(!this.antialias||d.source.scaleMode),v.mask&&v.mask.preRenderCanvas(this,v,p),x.drawImage(d.source.image,C,A,P,M,X,W,P/I,M/I),v.mask&&v.mask.postRenderCanvas(this,v,p),x.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});c.exports=f},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(31),u=t(38),o=t(2),a=function(s,i){var n=o(i,"callback"),l=o(i,"type","image/png"),r=o(i,"encoder",.92),h=Math.abs(Math.round(o(i,"x",0))),f=Math.abs(Math.round(o(i,"y",0))),v=o(i,"width",s.width),d=o(i,"height",s.height),p=o(i,"getPixel",!1);if(p){var g=s.getContext("2d"),m=g.getImageData(h,f,1,1),x=m.data;n.call(null,new u(x[0],x[1],x[2],x[3]/255))}else if(h!==0||f!==0||v!==s.width||d!==s.height){var y=e.createWebGL(this,v,d),T=y.getContext("2d");T.drawImage(s,h,f,v,d,0,0,v,d);var E=new Image;E.onerror=function(){n.call(null),e.remove(y)},E.onload=function(){n.call(null,E),e.remove(y)},E.src=y.toDataURL(l,r)}else{var C=new Image;C.onerror=function(){n.call(null)},C.onload=function(){n.call(null,C)},C.src=s.toDataURL(l,r)}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(35),u=t(348),o=function(){var a=[],s=u.supportNewBlendModes,i="source-over";return a[e.NORMAL]=i,a[e.ADD]="lighter",a[e.MULTIPLY]=s?"multiply":i,a[e.SCREEN]=s?"screen":i,a[e.OVERLAY]=s?"overlay":i,a[e.DARKEN]=s?"darken":i,a[e.LIGHTEN]=s?"lighten":i,a[e.COLOR_DODGE]=s?"color-dodge":i,a[e.COLOR_BURN]=s?"color-burn":i,a[e.HARD_LIGHT]=s?"hard-light":i,a[e.SOFT_LIGHT]=s?"soft-light":i,a[e.DIFFERENCE]=s?"difference":i,a[e.EXCLUSION]=s?"exclusion":i,a[e.HUE]=s?"hue":i,a[e.SATURATION]=s?"saturation":i,a[e.COLOR]=s?"color":i,a[e.LUMINOSITY]=s?"luminosity":i,a[e.ERASE]="destination-out",a[e.SOURCE_IN]="source-in",a[e.SOURCE_OUT]="source-out",a[e.SOURCE_ATOP]="source-atop",a[e.DESTINATION_OVER]="destination-over",a[e.DESTINATION_IN]="destination-in",a[e.DESTINATION_OUT]="destination-out",a[e.DESTINATION_ATOP]="destination-atop",a[e.LIGHTER]="lighter",a[e.COPY]="copy",a[e.XOR]="xor",a};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(93),u=t(37),o=t(0),a=t(33),s=t(9),i=t(91),n=t(22),l=t(138),r=t(69),h=t(1),f=t(372),v=t(141),d=t(104),p=t(106),g=t(12),m=t(383),x=new o({Extends:s,initialize:function(T){s.call(this);var E=T.config,C={alpha:E.transparent,desynchronized:E.desynchronized,depth:!1,antialias:E.antialiasGL,premultipliedAlpha:E.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:E.failIfMajorPerformanceCaveat,powerPreference:E.powerPreference,preserveDrawingBuffer:E.preserveDrawingBuffer};this.config={clearBeforeRender:E.clearBeforeRender,antialias:E.antialias,backgroundColor:E.backgroundColor,contextCreation:C,roundPixels:E.roundPixels,maxTextures:E.maxTextures,maxTextureSize:E.maxTextureSize,batchSize:E.batchSize,maxLights:E.maxLights,mipmapFilter:E.mipmapFilter},this.game=T,this.type=a.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=T.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTexture=0,this.startActiveTexture=0,this.maxTextures=0,this.textureIndexes,this.tempTextures,this.textureZero,this.normalTexture,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=h,this.contextRestoredHandler=h,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.textureFlush=0,this.isTextureClean=!1,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.init(this.config)},init:function(y){var T,E=this.game,C=this.canvas,A=y.backgroundColor;if(E.config.context?T=E.config.context:T=C.getContext("webgl",y.contextCreation)||C.getContext("experimental-webgl",y.contextCreation),!T||T.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=T;var P=this;this.contextLostHandler=function(B){P.contextLost=!0,P.game.events.emit(n.CONTEXT_LOST,P),B.preventDefault()},this.contextRestoredHandler=function(){P.contextLost=!1,P.init(P.config),P.game.events.emit(n.CONTEXT_RESTORED,P)},C.addEventListener("webglcontextlost",this.contextLostHandler,!1),C.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),E.context=T;for(var M=0;M<=27;M++)this.blendModes.push({func:[T.ONE,T.ONE_MINUS_SRC_ALPHA],equation:T.FUNC_ADD});this.blendModes[1].func=[T.ONE,T.DST_ALPHA],this.blendModes[2].func=[T.DST_COLOR,T.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[T.ONE,T.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[T.ZERO,T.ONE_MINUS_SRC_ALPHA],equation:T.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=T.BYTE,this.glFormats[1]=T.SHORT,this.glFormats[2]=T.UNSIGNED_BYTE,this.glFormats[3]=T.UNSIGNED_SHORT,this.glFormats[4]=T.FLOAT,this.glFuncMap={mat2:{func:T.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:T.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:T.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:T.uniform1f,length:1},"1fv":{func:T.uniform1fv,length:1},"1i":{func:T.uniform1i,length:1},"1iv":{func:T.uniform1iv,length:1},"2f":{func:T.uniform2f,length:2},"2fv":{func:T.uniform2fv,length:1},"2i":{func:T.uniform2i,length:2},"2iv":{func:T.uniform2iv,length:1},"3f":{func:T.uniform3f,length:3},"3fv":{func:T.uniform3fv,length:1},"3i":{func:T.uniform3i,length:3},"3iv":{func:T.uniform3iv,length:1},"4f":{func:T.uniform4f,length:4},"4fv":{func:T.uniform4fv,length:1},"4i":{func:T.uniform4i,length:4},"4iv":{func:T.uniform4iv,length:1}};var O=T.getSupportedExtensions();(!y.maxTextures||y.maxTextures===-1)&&(y.maxTextures=T.getParameter(T.MAX_TEXTURE_IMAGE_UNITS)),y.maxTextureSize||(y.maxTextureSize=T.getParameter(T.MAX_TEXTURE_SIZE));var I="WEBGL_compressed_texture_",N="WEBKIT_"+I;this.compression.ETC1=T.getExtension(I+"etc1")||T.getExtension(N+"etc1"),this.compression.PVRTC=T.getExtension(I+"pvrtc")||T.getExtension(N+"pvrtc"),this.compression.S3TC=T.getExtension(I+"s3tc")||T.getExtension(N+"s3tc"),this.supportedExtensions=O;var Y="ANGLE_instanced_arrays";this.instancedArraysExtension=O.indexOf(Y)>-1?T.getExtension(Y):null;var X="OES_vertex_array_object";this.vaoExtension=O.indexOf(X)>-1?T.getExtension(X):null,T.disable(T.DEPTH_TEST),T.disable(T.CULL_FACE),T.enable(T.BLEND),T.clearColor(A.redGL,A.greenGL,A.blueGL,A.alphaGL),this.mipmapFilter=T[y.mipmapFilter],this.maxTextures=g.checkShaderMax(T,y.maxTextures),this.textureIndexes=[];var W=this.tempTextures;if(Array.isArray(W))for(var H=0;M<this.maxTextures;H++)T.deleteTexture(W[H]);else W=new Array(this.maxTextures);for(var D=0;D<this.maxTextures;D++){var L=T.createTexture();T.activeTexture(T.TEXTURE0+D),T.bindTexture(T.TEXTURE_2D,L),T.texImage2D(T.TEXTURE_2D,0,T.RGBA,1,1,0,T.RGBA,T.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),W[D]=L,this.textureIndexes.push(D)}return this.tempTextures=W,this.currentActiveTexture=1,this.startActiveTexture++,T.activeTexture(T.TEXTURE1),this.pipelines=new f(this),this.setBlendMode(a.BlendModes.NORMAL),this.projectionMatrix=new r().identity(),E.textures.once(p.READY,this.boot,this),this},boot:function(){var y=this.game,T=this.pipelines,E=y.scale.baseSize;this.width=E.width,this.height=E.height,this.isBooted=!0,this.renderTarget=new v(this,this.width,this.height,1,0,!0,!0),T.boot(y.config.pipeline),this.blankTexture=y.textures.getFrame("__DEFAULT"),this.whiteTexture=y.textures.getFrame("__WHITE");var C=this.gl;C.bindFramebuffer(C.FRAMEBUFFER,null),C.enable(C.SCISSOR_TEST),y.scale.on(d.RESIZE,this.onResize,this),this.resize(E.width,E.height)},onResize:function(y,T){(T.width!==this.width||T.height!==this.height)&&this.resize(T.width,T.height)},beginCapture:function(y,T){y===void 0&&(y=this.width),T===void 0&&(T=this.height),this.renderTarget.bind(!0,y,T),this.setProjectionMatrix(y,T),this.resetTextures()},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(y,T){var E=this.gl;return this.width=y,this.height=T,this.setProjectionMatrix(y,T),E.viewport(0,0,y,T),this.drawingBufferHeight=E.drawingBufferHeight,E.scissor(0,E.drawingBufferHeight-T,y,T),this.defaultScissor[2]=y,this.defaultScissor[3]=T,this.emit(i.RESIZE,y,T),this},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(y,T){return(y!==this.projectionWidth||T!==this.projectionHeight)&&(this.projectionWidth=y,this.projectionHeight=T,this.projectionMatrix.ortho(0,y,T,0,-1e3,1e3)),this},resetProjectionMatrix:function(){this.projectionWidth=this.width,this.projectionHeight=this.height,this.projectionMatrix.ortho(0,this.width,this.height,0,-1e3,1e3)},hasExtension:function(y){return this.supportedExtensions?this.supportedExtensions.indexOf(y):!1},getExtension:function(y){return this.hasExtension(y)?(y in this.extensions||(this.extensions[y]=this.gl.getExtension(y)),this.extensions[y]):null},flush:function(){this.pipelines.flush()},pushScissor:function(y,T,E,C,A){A===void 0&&(A=this.drawingBufferHeight);var P=this.scissorStack,M=[y,T,E,C];return P.push(M),this.setScissor(y,T,E,C,A),this.currentScissor=M,M},setScissor:function(y,T,E,C,A){A===void 0&&(A=this.drawingBufferHeight);var P=this.gl,M=this.currentScissor,O=E>0&&C>0;if(M&&O){var I=M[0],N=M[1],Y=M[2],X=M[3];O=I!==y||N!==T||Y!==E||X!==C}O&&(this.flush(),P.scissor(y,A-T-C,E,C))},resetScissor:function(){var y=this.gl;y.enable(y.SCISSOR_TEST);var T=this.currentScissor;if(T){var E=T[0],C=T[1],A=T[2],P=T[3];A>0&&P>0&&y.scissor(E,this.drawingBufferHeight-C-P,A,P)}},popScissor:function(){var y=this.scissorStack;y.pop();var T=y[y.length-1];T&&this.setScissor(T[0],T[1],T[2],T[3]),this.currentScissor=T},hasActiveStencilMask:function(){var y=this.currentMask.mask,T=this.currentCameraMask.mask;return y&&y.isStencil||T&&T.isStencil},resetViewport:function(){var y=this.gl;y.viewport(0,0,this.width,this.height),this.drawingBufferHeight=y.drawingBufferHeight},setBlendMode:function(y,T){T===void 0&&(T=!1);var E=this.gl,C=this.blendModes[y];return T||y!==a.BlendModes.SKIP_CHECK&&this.currentBlendMode!==y?(this.flush(),E.enable(E.BLEND),E.blendEquation(C.equation),C.func.length>2?E.blendFuncSeparate(C.func[0],C.func[1],C.func[2],C.func[3]):E.blendFunc(C.func[0],C.func[1]),this.currentBlendMode=y,!0):!1},addBlendMode:function(y,T){var E=this.blendModes.push({func:y,equation:T});return E-1},updateBlendMode:function(y,T,E){return this.blendModes[y]&&(this.blendModes[y].func=T,E&&(this.blendModes[y].equation=E)),this},removeBlendMode:function(y){return y>17&&this.blendModes[y]&&this.blendModes.splice(y,1),this},setBlankTexture:function(){this.setTexture2D(this.blankTexture.glTexture)},setTextureSource:function(y){if(this.pipelines.forceZero())return this.setTextureZero(y.glTexture,!0),0;var T=this.gl,E=this.currentActiveTexture;return y.glIndexCounter<this.startActiveTexture&&(y.glIndexCounter=this.startActiveTexture,E<this.maxTextures?(y.glIndex=E,T.activeTexture(T.TEXTURE0+E),T.bindTexture(T.TEXTURE_2D,y.glTexture),this.currentActiveTexture++):(this.flush(),this.startActiveTexture++,this.textureFlush++,y.glIndexCounter=this.startActiveTexture,y.glIndex=1,T.activeTexture(T.TEXTURE1),T.bindTexture(T.TEXTURE_2D,y.glTexture),this.currentActiveTexture=2)),this.isTextureClean=!1,y.glIndex},isNewNormalMap:function(y,T){return this.textureZero!==y||this.normalTexture!==T},setTextureZero:function(y,T){if(this.textureZero!==y){T&&this.flush();var E=this.gl;E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,y),this.textureZero=y}},clearTextureZero:function(){this.textureZero=null},setNormalMap:function(y){if(this.normalTexture!==y){var T=this.gl;T.activeTexture(T.TEXTURE1),T.bindTexture(T.TEXTURE_2D,y),this.normalTexture=y,this.currentActiveTexture===1&&(this.currentActiveTexture=2)}},clearNormalMap:function(){this.normalTexture=null,this.startActiveTexture++,this.currentActiveTexture=1,this.textureFlush++},unbindTextures:function(){for(var y=this.gl,T=this.tempTextures,E=0;E<T.length;E++)y.activeTexture(y.TEXTURE0+E),y.bindTexture(y.TEXTURE_2D,null);this.normalTexture=null,this.textureZero=null,this.currentActiveTexture=1,this.startActiveTexture++,this.textureFlush++},resetTextures:function(y){if(y===void 0&&(y=!1),!this.isTextureClean){this.flush();var T=this.gl,E=this.tempTextures;if(y){for(var C=0;C<E.length;C++)T.activeTexture(T.TEXTURE0+C),T.bindTexture(T.TEXTURE_2D,E[C]);T.activeTexture(T.TEXTURE1),T.bindTexture(T.TEXTURE_2D,E[1]),this.isTextureClean=!0}else T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,E[0]),T.activeTexture(T.TEXTURE1),T.bindTexture(T.TEXTURE_2D,E[1]);this.normalTexture=null,this.textureZero=null,this.currentActiveTexture=1,this.startActiveTexture++,this.textureFlush++}},setTexture2D:function(y){if(this.pipelines.forceZero())return this.setTextureZero(y,!0),0;var T=this.gl,E=this.currentActiveTexture;return y.glIndexCounter<this.startActiveTexture&&(y.glIndexCounter=this.startActiveTexture,E<this.maxTextures?(y.glIndex=E,T.activeTexture(T.TEXTURE0+E),T.bindTexture(T.TEXTURE_2D,y),this.currentActiveTexture++):(this.flush(),this.startActiveTexture++,this.textureFlush++,y.glIndexCounter=this.startActiveTexture,y.glIndex=1,T.activeTexture(T.TEXTURE1),T.bindTexture(T.TEXTURE_2D,y),this.currentActiveTexture=2)),this.isTextureClean=!1,y.glIndex},pushFramebuffer:function(y,T,E,C){return y===this.currentFramebuffer?this:(this.fboStack.push(y),this.setFramebuffer(y,T,E,C))},setFramebuffer:function(y,T,E,C){if(T===void 0&&(T=!1),E===void 0&&(E=!1),C===void 0&&(C=!0),y===this.currentFramebuffer)return this;var A=this.gl,P=this.width,M=this.height;return y&&y.renderTexture&&C?(P=y.renderTexture.width,M=y.renderTexture.height):this.flush(),A.bindFramebuffer(A.FRAMEBUFFER,y),C&&A.viewport(0,0,P,M),T&&(y?(this.drawingBufferHeight=M,this.pushScissor(0,0,P,M)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=y,E&&this.resetTextures(),this},popFramebuffer:function(y,T,E){y===void 0&&(y=!1),T===void 0&&(T=!1),E===void 0&&(E=!0);var C=this.fboStack;C.pop();var A=C[C.length-1];return A||(A=null),this.setFramebuffer(A,y,T,E),A},setProgram:function(y){return y!==this.currentProgram?(this.flush(),this.gl.useProgram(y),this.currentProgram=y,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(y,T,E,C){var A=this.gl,P=A.NEAREST,M=A.NEAREST,O=A.CLAMP_TO_EDGE,I=null;T=y?y.width:T,E=y?y.height:E;var N=l(T,E);return N&&(O=A.REPEAT),C===a.ScaleModes.LINEAR&&this.config.antialias&&(P=N?this.mipmapFilter:A.LINEAR,M=A.LINEAR),!y&&typeof T=="number"&&typeof E=="number"?I=this.createTexture2D(0,P,M,O,O,A.RGBA,null,T,E):I=this.createTexture2D(0,P,M,O,O,A.RGBA,y),I},createTexture2D:function(y,T,E,C,A,P,M,O,I,N,Y,X){N=N==null?!0:N,Y===void 0&&(Y=!1),X===void 0&&(X=!1);var W=this.gl,H=W.createTexture();W.activeTexture(W.TEXTURE0);var D=W.getParameter(W.TEXTURE_BINDING_2D);return W.bindTexture(W.TEXTURE_2D,H),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,T),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,E),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,A),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,C),W.pixelStorei(W.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N),W.pixelStorei(W.UNPACK_FLIP_Y_WEBGL,X),M==null?W.texImage2D(W.TEXTURE_2D,y,P,O,I,0,P,W.UNSIGNED_BYTE,null):(Y||(O=M.width,I=M.height),W.texImage2D(W.TEXTURE_2D,y,P,P,W.UNSIGNED_BYTE,M)),l(O,I)&&W.generateMipmap(W.TEXTURE_2D),D&&W.bindTexture(W.TEXTURE_2D,D),H.isAlphaPremultiplied=N,H.isRenderTexture=!1,H.width=O,H.height=I,H.glIndex=0,H.glIndexCounter=-1,H},createFramebuffer:function(y,T,E,C){var A=this.gl,P=A.createFramebuffer(),M=0;if(this.setFramebuffer(P),C){var O=A.createRenderbuffer();A.bindRenderbuffer(A.RENDERBUFFER,O),A.renderbufferStorage(A.RENDERBUFFER,A.DEPTH_STENCIL,y,T),A.framebufferRenderbuffer(A.FRAMEBUFFER,A.DEPTH_STENCIL_ATTACHMENT,A.RENDERBUFFER,O)}if(E.isRenderTexture=!0,E.isAlphaPremultiplied=!1,A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,E,0),M=A.checkFramebufferStatus(A.FRAMEBUFFER),M!==A.FRAMEBUFFER_COMPLETE){var I={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"};throw new Error("Framebuffer status: "+I[M])}return P.renderTexture=E,this.setFramebuffer(null),this.resetTextures(),P},createProgram:function(y,T){var E=this.gl,C=E.createProgram(),A=E.createShader(E.VERTEX_SHADER),P=E.createShader(E.FRAGMENT_SHADER);if(E.shaderSource(A,y),E.shaderSource(P,T),E.compileShader(A),E.compileShader(P),!E.getShaderParameter(A,E.COMPILE_STATUS))throw new Error(`Vertex Shader failed:
`+E.getShaderInfoLog(A));if(!E.getShaderParameter(P,E.COMPILE_STATUS))throw new Error(`Fragment Shader failed:
`+E.getShaderInfoLog(P));if(E.attachShader(C,A),E.attachShader(C,P),E.linkProgram(C),!E.getProgramParameter(C,E.LINK_STATUS))throw new Error(`Link Program failed:
`+E.getProgramInfoLog(C));return E.useProgram(C),C},createVertexBuffer:function(y,T){var E=this.gl,C=E.createBuffer();return E.bindBuffer(E.ARRAY_BUFFER,C),E.bufferData(E.ARRAY_BUFFER,y,T),E.bindBuffer(E.ARRAY_BUFFER,null),C},createIndexBuffer:function(y,T){var E=this.gl,C=E.createBuffer();return E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,C),E.bufferData(E.ELEMENT_ARRAY_BUFFER,y,T),E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,null),C},deleteTexture:function(y,T){return T&&this.resetTextures(!0),y&&this.gl.deleteTexture(y),this},deleteFramebuffer:function(y){return y&&(this.gl.deleteFramebuffer(y),e(this.fboStack,y),this.currentFramebuffer===y&&(this.currentFramebuffer=null)),this},deleteProgram:function(y){return y&&this.gl.deleteProgram(y),this},deleteBuffer:function(y){return this.gl.deleteBuffer(y),this},preRenderCamera:function(y){var T=y.x,E=y.y,C=y.width,A=y.height,P=y.backgroundColor;if(y.emit(u.PRE_RENDER,y),this.pipelines.preBatchCamera(y),this.pushScissor(T,E,C,A),y.mask&&(this.currentCameraMask.mask=y.mask,this.currentCameraMask.camera=y._maskCamera,y.mask.preRenderWebGL(this,y,y._maskCamera)),P.alphaGL>0){var M=this.pipelines.setMulti();M.drawFillRect(T,E,C,A,g.getTintFromFloats(P.blueGL,P.greenGL,P.redGL,1),P.alphaGL)}},getCurrentStencilMask:function(){var y=null,T=this.maskStack,E=this.currentCameraMask;return T.length>0?y=T[T.length-1]:E.mask&&E.mask.isStencil&&(y=E),y},postRenderCamera:function(y){var T=y.flashEffect,E=y.fadeEffect;if(T.isRunning||E.isRunning||E.isComplete){var C=this.pipelines.setMulti();T.postRenderWebGL(C,g.getTintFromFloats),E.postRenderWebGL(C,g.getTintFromFloats)}y.dirty=!1,this.popScissor(),y.mask&&(this.currentCameraMask.mask=null,y.mask.postRenderWebGL(this,y._maskCamera)),this.pipelines.postBatchCamera(y),y.emit(u.POST_RENDER,y)},preRender:function(){if(!this.contextLost){var y=this.gl;if(y.bindFramebuffer(y.FRAMEBUFFER,null),this.config.clearBeforeRender){var T=this.config.backgroundColor;y.clearColor(T.redGL,T.greenGL,T.blueGL,T.alphaGL),y.clear(y.COLOR_BUFFER_BIT|y.DEPTH_BUFFER_BIT|y.STENCIL_BUFFER_BIT)}y.enable(y.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&y.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.textureFlush=0,this.emit(i.PRE_RENDER)}},render:function(y,T,E){if(!this.contextLost){var C=T.length;if(this.emit(i.RENDER,y,E),this.preRenderCamera(E),C===0){this.setBlendMode(a.BlendModes.NORMAL),this.postRenderCamera(E);return}this.currentType="";for(var A=this.currentMask,P=0;P<C;P++){this.finalType=P===C-1;var M=T[P],O=M.mask;A=this.currentMask,A.mask&&A.mask!==O&&A.mask.postRenderWebGL(this,A.camera),O&&A.mask!==O&&O.preRenderWebGL(this,M,E),M.blendMode!==this.currentBlendMode&&this.setBlendMode(M.blendMode);var I=M.type;I!==this.currentType&&(this.newType=!0,this.currentType=I),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=T[P+1].type===this.currentType,M.renderWebGL(this,M,E),this.newType=!1}A=this.currentMask,A.mask&&A.mask.postRenderWebGL(this,A.camera),this.setBlendMode(a.BlendModes.NORMAL),this.postRenderCamera(E)}},postRender:function(){if(!this.contextLost){this.flush(),this.emit(i.POST_RENDER);var y=this.snapshotState;y.callback&&(m(this.canvas,y),y.callback=null),this.textureFlush>0&&(this.startActiveTexture++,this.currentActiveTexture=1)}},snapshot:function(y,T,E){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,y,T,E)},snapshotArea:function(y,T,E,C,A,P,M){var O=this.snapshotState;return O.callback=A,O.type=P,O.encoder=M,O.getPixel=!1,O.x=y,O.y=T,O.width=Math.min(E,this.gl.drawingBufferWidth),O.height=Math.min(C,this.gl.drawingBufferHeight),this},snapshotPixel:function(y,T,E){return this.snapshotArea(y,T,1,1,E),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(y,T,E,C,A,P,M,O,I,N,Y){A===void 0&&(A=!1),P===void 0&&(P=0),M===void 0&&(M=0),O===void 0&&(O=T),I===void 0&&(I=E);var X=this.currentFramebuffer;this.snapshotArea(P,M,O,I,C,N,Y);var W=this.snapshotState;return W.getPixel=A,W.isFramebuffer=!0,W.bufferWidth=T,W.bufferHeight=E,this.setFramebuffer(y),m(this.canvas,W),this.setFramebuffer(X),W.callback=null,W.isFramebuffer=!1,this},canvasToTexture:function(y,T,E,C){return E===void 0&&(E=!1),C===void 0&&(C=!1),T?this.updateCanvasTexture(y,T,C):this.createCanvasTexture(y,E,C)},createCanvasTexture:function(y,T,E){T===void 0&&(T=!1),E===void 0&&(E=!1);var C=this.gl,A=C.NEAREST,P=C.NEAREST,M=y.width,O=y.height,I=C.CLAMP_TO_EDGE,N=l(M,O);return!T&&N&&(I=C.REPEAT),this.config.antialias&&(A=N?this.mipmapFilter:C.LINEAR,P=C.LINEAR),this.createTexture2D(0,A,P,I,I,C.RGBA,y,M,O,!0,!1,E)},updateCanvasTexture:function(y,T,E){E===void 0&&(E=!1);var C=this.gl,A=y.width,P=y.height;if(A>0&&P>0){C.activeTexture(C.TEXTURE0);var M=C.getParameter(C.TEXTURE_BINDING_2D);C.bindTexture(C.TEXTURE_2D,T),C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,E),C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,y),T.width=A,T.height=P,M&&C.bindTexture(C.TEXTURE_2D,M)}return T},createVideoTexture:function(y,T,E){T===void 0&&(T=!1),E===void 0&&(E=!1);var C=this.gl,A=C.NEAREST,P=C.NEAREST,M=y.videoWidth,O=y.videoHeight,I=C.CLAMP_TO_EDGE,N=l(M,O);return!T&&N&&(I=C.REPEAT),this.config.antialias&&(A=N?this.mipmapFilter:C.LINEAR,P=C.LINEAR),this.createTexture2D(0,A,P,I,I,C.RGBA,y,M,O,!0,!0,E)},updateVideoTexture:function(y,T,E){E===void 0&&(E=!1);var C=this.gl,A=y.videoWidth,P=y.videoHeight;if(A>0&&P>0){C.activeTexture(C.TEXTURE0);var M=C.getParameter(C.TEXTURE_BINDING_2D);C.bindTexture(C.TEXTURE_2D,T),C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,E),C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,y),T.width=A,T.height=P,M&&C.bindTexture(C.TEXTURE_2D,M)}return T},setTextureFilter:function(y,T){var E=this.gl,C=[E.LINEAR,E.NEAREST][T];E.activeTexture(E.TEXTURE0);var A=E.getParameter(E.TEXTURE_BINDING_2D);return E.bindTexture(E.TEXTURE_2D,y),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,C),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,C),A&&E.bindTexture(E.TEXTURE_2D,A),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);for(var y=this.gl,T=this.tempTextures,E=0;E<T.length;E++)y.deleteTexture(T[E]);this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});c.exports=x},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(92),o=t(102),a=t(373),s=t(376),i=t(377),n=t(108),l=t(378),r=t(379),h=t(380),f=t(381),v=new e({initialize:function(p){this.game=p.game,this.renderer=p,this.classes=new o([[u.UTILITY_PIPELINE,f],[u.MULTI_PIPELINE,n],[u.BITMAPMASK_PIPELINE,a],[u.SINGLE_PIPELINE,h],[u.ROPE_PIPELINE,r],[u.LIGHT_PIPELINE,i],[u.POINTLIGHT_PIPELINE,l],[u.GRAPHICS_PIPELINE,s]]),this.postPipelineClasses=new o,this.pipelines=new o,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(d){var p,g,m=this,x=this.game;if(this.classes.each(function(T,E){p=m.add(T,new E({game:x})),T===u.UTILITY_PIPELINE&&(m.UTILITY_PIPELINE=p,m.fullFrame1=p.fullFrame1,m.fullFrame2=p.fullFrame2,m.halfFrame1=p.halfFrame1,m.halfFrame2=p.halfFrame2)}),this.MULTI_PIPELINE=this.get(u.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(u.BITMAPMASK_PIPELINE),d)for(g in d){var y=d[g];p=new y(x),p.isPostFX?this.postPipelineClasses.set(g,y):this.has(g)||(this.classes.set(g,y),this.add(g,p))}},add:function(d,p){if(p.isPostFX){console.warn(d+" is a Post Pipeline. Use `addPostPipeline` instead");return}var g=this.pipelines,m=this.renderer;return g.has(d)?console.warn("Pipeline exists: "+d):(p.name=d,p.manager=this,g.set(d,p)),p.hasBooted||p.boot(),m.width!==0&&m.height!==0&&p.resize(m.width,m.height),p},addPostPipeline:function(d,p){this.postPipelineClasses.has(d)||this.postPipelineClasses.set(d,p)},flush:function(){this.current&&this.current.flush()},has:function(d){var p=this.pipelines;return typeof d=="string"?p.has(d):!!p.contains(d)},get:function(d){var p=this.pipelines;if(typeof d=="string")return p.get(d);if(p.contains(d))return d},getPostPipeline:function(d,p){var g=this.postPipelineClasses,m;if(typeof d=="string"?m=g.get(d):typeof d=="function"?g.contains(d)&&(m=d):typeof d=="object"&&(m=g.get(d.name)),m){var x=new m(this.game);return p&&(x.gameObject=p),x}},remove:function(d,p,g){p===void 0&&(p=!0),g===void 0&&(g=!0),this.pipelines.delete(d),p&&this.classes.delete(d),g&&this.postPipelineClasses.delete(d)},set:function(d,p,g){if(!d.isPostFX)return this.isCurrent(d,g)||(this.flush(),this.current&&this.current.unbind(),this.current=d,d.bind(g)),d.updateProjectionMatrix(),d.onBind(p),d},preBatch:function(d){if(d.hasPostPipeline){this.flush();for(var p=d.postPipelines,g=p.length-1;g>=0;g--){var m=p[g];m.active&&m.preBatch(d)}}},postBatch:function(d){if(d.hasPostPipeline){this.flush();for(var p=d.postPipelines,g=0;g<p.length;g++){var m=p[g];m.active&&m.postBatch(d)}}},preBatchCamera:function(d){if(d.hasPostPipeline){this.flush();for(var p=d.postPipelines,g=p.length-1;g>=0;g--){var m=p[g];m.active&&m.preBatch(d)}}},postBatchCamera:function(d){if(d.hasPostPipeline){this.flush();for(var p=d.postPipelines,g=0;g<p.length;g++){var m=p[g];m.active&&m.postBatch(d)}}},isCurrent:function(d,p){var g=this.renderer,m=this.current;return m&&!p&&(p=m.currentShader),!(m!==d||p.program!==g.currentProgram)},copyFrame:function(d,p,g,m,x){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(d,p,g,m,x),this},copyToGame:function(d){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(d),this},drawFrame:function(d,p,g,m){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(d,p,g,m),this},blendFrames:function(d,p,g,m,x){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(d,p,g,m,x),this},blendFramesAdditive:function(d,p,g,m,x){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(d,p,g,m,x),this},clearFrame:function(d,p){return this.UTILITY_PIPELINE.clearFrame(d,p),this},blitFrame:function(d,p,g,m,x,y){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(d,p,g,m,x,y),this},copyFrameRect:function(d,p,g,m,x,y,T,E){return this.UTILITY_PIPELINE.copyFrameRect(d,p,g,m,x,y,T,E),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(d){return this.UTILITY_PIPELINE.bind(d)},rebind:function(d){d===void 0&&this.previous&&(d=this.previous);var p=this.renderer,g=p.gl;g.disable(g.DEPTH_TEST),g.disable(g.CULL_FACE),p.hasActiveStencilMask()?g.clear(g.DEPTH_BUFFER_BIT):(g.disable(g.STENCIL_TEST),g.clear(g.DEPTH_BUFFER_BIT|g.STENCIL_BUFFER_BIT)),g.viewport(0,0,p.width,p.height),p.currentProgram=null,p.setBlendMode(0,!0);var m=this.pipelines.entries;for(var x in m)m[x].glReset=!0;d&&(this.current=d,d.rebind()),p.resetTextures()},clear:function(){var d=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,d.currentProgram=null,d.setBlendMode(0,!0)},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.current=null,this.previous=null}});c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(2),o=t(866),a=t(867),s=t(107),i=t(58),n=new e({Extends:i,initialize:function(r){r.fragShader=u(r,"fragShader",o),r.vertShader=u(r,"vertShader",a),r.batchSize=u(r,"batchSize",1),r.vertices=u(r,"vertices",[-1,1,-1,-7,7,1]),r.attributes=u(r,"attributes",[{name:"inPosition",size:2,type:s.FLOAT}]),i.call(this,r)},boot:function(){i.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(l,r){i.prototype.resize.call(this,l,r),this.set2f("uResolution",l,r)},beginMask:function(l,r,h){var f=this.gl;if(l.bitmapMask&&f){var v=this.renderer;v.flush(),v.pushFramebuffer(l.mainFramebuffer),f.disable(f.STENCIL_TEST),f.clearColor(0,0,0,0),f.clear(f.COLOR_BUFFER_BIT),v.currentCameraMask.mask!==l&&(v.currentMask.mask=l,v.currentMask.camera=h)}},endMask:function(l,r){var h=this.gl,f=this.renderer,v=l.bitmapMask;if(v&&h){f.flush(),f.pushFramebuffer(l.maskFramebuffer),h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),f.setBlendMode(0,!0),v.renderWebGL(f,v,r),f.flush(),f.popFramebuffer(),f.popFramebuffer();var d=f.getCurrentStencilMask();d?(h.enable(h.STENCIL_TEST),d.mask.applyStencil(f,d.camera,!0)):f.currentMask.mask=null,f.pipelines.set(this),h.activeTexture(h.TEXTURE1),h.bindTexture(h.TEXTURE_2D,l.maskTexture),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,l.mainTexture),this.set1i("uInvertMaskAlpha",l.invertAlpha),h.drawArrays(this.topology,0,3),f.resetTextures()}}});c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={AFTER_FLUSH:t(868),BEFORE_FLUSH:t(869),BIND:t(870),BOOT:t(871),DESTROY:t(872),REBIND:t(873),RESIZE:t(874)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(2),o=t(107),a=new e({initialize:function(i,n,l,r,h){this.pipeline=i,this.name=n,this.renderer=i.renderer,this.gl=this.renderer.gl,this.program=this.renderer.createProgram(l,r),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(h),this.createUniforms()},createAttributes:function(s){var i=0,n=0,l=[];this.vertexComponentCount=0;for(var r=0;r<s.length;r++){var h=s[r],f=h.name,v=u(h,"size",1),d=u(h,"type",o.FLOAT),p=d.enum,g=d.size,m=!!h.normalized;l.push({name:f,size:v,type:p,normalized:m,offset:n,enabled:!1,location:-1}),g===4?i+=v:i++,n+=v*g}this.vertexSize=n,this.vertexComponentCount=i,this.attributes=l},bind:function(s,i){return s===void 0&&(s=!1),i===void 0&&(i=!1),i&&this.pipeline.flush(),this.renderer.setProgram(this.program),s&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(s){s===void 0&&(s=!1);for(var i=this.gl,n=this.vertexSize,l=this.attributes,r=this.program,h=0;h<l.length;h++){var f=l[h],v=f.size,d=f.type,p=f.offset,g=f.enabled,m=f.location,x=!!f.normalized;if(s){var y=i.getAttribLocation(r,f.name);y>=0?(i.enableVertexAttribArray(y),i.vertexAttribPointer(y,v,d,x,n,p),f.enabled=!0,f.location=y):y!==-1&&i.disableVertexAttribArray(y)}else g?i.vertexAttribPointer(m,v,d,x,n,p):!g&&m>-1&&(i.disableVertexAttribArray(m),f.location=-1)}return this},createUniforms:function(){var s=this.gl,i=this.program,n=this.uniforms,l,r,h,f=s.getProgramParameter(i,s.ACTIVE_UNIFORMS);for(l=0;l<f;l++){var v=s.getActiveUniform(i,l);if(v){r=v.name,h=s.getUniformLocation(i,r),h!==null&&(n[r]={name:r,location:h,value1:null,value2:null,value3:null,value4:null});var d=r.indexOf("[");d>0&&(r=r.substr(0,d),n.hasOwnProperty(r)||(h=s.getUniformLocation(i,r),h!==null&&(n[r]={name:r,location:h,value1:null,value2:null,value3:null,value4:null})))}}return this},hasUniform:function(s){return this.uniforms.hasOwnProperty(s)},resetUniform:function(s){var i=this.uniforms[s];return i&&(i.value1=null,i.value2=null,i.value3=null,i.value4=null),this},setUniform1:function(s,i,n,l){var r=this.uniforms[i];return r?((l||r.value1!==n)&&(r.value1=n,this.renderer.setProgram(this.program),s.call(this.gl,r.location,n),this.pipeline.currentShader=this),this):this},setUniform2:function(s,i,n,l,r){var h=this.uniforms[i];return h?((r||h.value1!==n||h.value2!==l)&&(h.value1=n,h.value2=l,this.renderer.setProgram(this.program),s.call(this.gl,h.location,n,l),this.pipeline.currentShader=this),this):this},setUniform3:function(s,i,n,l,r,h){var f=this.uniforms[i];return f?((h||f.value1!==n||f.value2!==l||f.value3!==r)&&(f.value1=n,f.value2=l,f.value3=r,this.renderer.setProgram(this.program),s.call(this.gl,f.location,n,l,r),this.pipeline.currentShader=this),this):this},setUniform4:function(s,i,n,l,r,h,f){var v=this.uniforms[i];return v?((f||v.value1!==n||v.value2!==l||v.value3!==r||v.value4!==h)&&(v.value1=n,v.value2=l,v.value3=r,v.value4=h,this.renderer.setProgram(this.program),s.call(this.gl,v.location,n,l,r,h),this.pipeline.currentShader=this),this):this},set1f:function(s,i){return this.setUniform1(this.gl.uniform1f,s,i)},set2f:function(s,i,n){return this.setUniform2(this.gl.uniform2f,s,i,n)},set3f:function(s,i,n,l){return this.setUniform3(this.gl.uniform3f,s,i,n,l)},set4f:function(s,i,n,l,r){return this.setUniform4(this.gl.uniform4f,s,i,n,l,r)},set1fv:function(s,i){return this.setUniform1(this.gl.uniform1fv,s,i,!0)},set2fv:function(s,i){return this.setUniform1(this.gl.uniform2fv,s,i,!0)},set3fv:function(s,i){return this.setUniform1(this.gl.uniform3fv,s,i,!0)},set4fv:function(s,i){return this.setUniform1(this.gl.uniform4fv,s,i,!0)},set1iv:function(s,i){return this.setUniform1(this.gl.uniform1iv,s,i,!0)},set2iv:function(s,i){return this.setUniform1(this.gl.uniform2iv,s,i,!0)},set3iv:function(s,i){return this.setUniform1(this.gl.uniform3iv,s,i,!0)},set4iv:function(s,i){return this.setUniform1(this.gl.uniform4iv,s,i,!0)},set1i:function(s,i){return this.setUniform1(this.gl.uniform1i,s,i)},set2i:function(s,i,n){return this.setUniform2(this.gl.uniform2i,s,i,n)},set3i:function(s,i,n,l){return this.setUniform3(this.gl.uniform3i,s,i,n,l)},set4i:function(s,i,n,l,r){return this.setUniform4(this.gl.uniform4i,s,i,n,l,r)},setMatrix2fv:function(s,i,n){return this.setUniform2(this.gl.uniformMatrix2fv,s,i,n,!0)},setMatrix3fv:function(s,i,n){return this.setUniform2(this.gl.uniformMatrix3fv,s,i,n,!0)},setMatrix4fv:function(s,i,n){return this.setUniform2(this.gl.uniformMatrix4fv,s,i,n,!0)},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(59),o=t(2),a=t(875),s=t(876),i=t(25),n=t(107),l=t(58),r=new e({Extends:l,initialize:function(f){f.fragShader=o(f,"fragShader",a),f.vertShader=o(f,"vertShader",s),f.attributes=o(f,"attributes",[{name:"inPosition",size:2},{name:"inColor",size:4,type:n.UNSIGNED_BYTE,normalized:!0}]),l.call(this,f),this.calcMatrix=new i,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},batchFillRect:function(h,f,v,d,p,g){this.renderer.pipelines.set(this);var m=this.calcMatrix;g&&g.multiply(p,m);var x=h+v,y=f+d,T=m.getX(h,f),E=m.getY(h,f),C=m.getX(h,y),A=m.getY(h,y),P=m.getX(x,y),M=m.getY(x,y),O=m.getX(x,f),I=m.getY(x,f),N=this.fillTint;this.batchQuad(T,E,C,A,P,M,O,I,N.TL,N.TR,N.BL,N.BR)},batchFillTriangle:function(h,f,v,d,p,g,m,x){this.renderer.pipelines.set(this);var y=this.calcMatrix;x&&x.multiply(m,y);var T=y.getX(h,f),E=y.getY(h,f),C=y.getX(v,d),A=y.getY(v,d),P=y.getX(p,g),M=y.getY(p,g),O=this.fillTint;this.batchTri(T,E,C,A,P,M,O.TL,O.TR,O.BL)},batchStrokeTriangle:function(h,f,v,d,p,g,m,x,y){var T=this.tempTriangle;T[0].x=h,T[0].y=f,T[0].width=m,T[1].x=v,T[1].y=d,T[1].width=m,T[2].x=p,T[2].y=g,T[2].width=m,T[3].x=h,T[3].y=f,T[3].width=m,this.batchStrokePath(T,m,!1,x,y)},batchFillPath:function(h,f,v){this.renderer.pipelines.set(this);var d=this.calcMatrix;v&&v.multiply(f,d);for(var p=h.length,g=this.polygonCache,m,x,y=this.fillTint.TL,T=this.fillTint.TR,E=this.fillTint.BL,C=0;C<p;++C)x=h[C],g.push(x.x,x.y);m=u(g),p=m.length;for(var A=0;A<p;A+=3){var P=m[A+0]*2,M=m[A+1]*2,O=m[A+2]*2,I=g[P+0],N=g[P+1],Y=g[M+0],X=g[M+1],W=g[O+0],H=g[O+1],D=d.getX(I,N),L=d.getY(I,N),B=d.getX(Y,X),G=d.getY(Y,X),w=d.getX(W,H),z=d.getY(W,H);this.batchTri(D,L,B,G,w,z,y,T,E)}g.length=0},batchStrokePath:function(h,f,v,d,p){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var g=h.length-1,m=0;m<g;m++){var x=h[m],y=h[m+1];this.batchLine(x.x,x.y,y.x,y.y,x.width/2,y.width/2,f,m,!v&&m===g-1,d,p)}},batchLine:function(h,f,v,d,p,g,m,x,y,T,E){this.renderer.pipelines.set(this);var C=this.calcMatrix;E&&E.multiply(T,C);var A=v-h,P=d-f,M=Math.sqrt(A*A+P*P),O=p*(d-f)/M,I=p*(h-v)/M,N=g*(d-f)/M,Y=g*(h-v)/M,X=v-N,W=d-Y,H=h-O,D=f-I,L=v+N,B=d+Y,G=h+O,w=f+I,z=C.getX(X,W),U=C.getY(X,W),V=C.getX(H,D),Z=C.getY(H,D),$=C.getX(L,B),Q=C.getY(L,B),j=C.getX(G,w),k=C.getY(G,w),et=this.strokeTint,_=et.TL,nt=et.TR,ut=et.BL,ht=et.BR;if(this.batchQuad(j,k,V,Z,z,U,$,Q,_,nt,ut,ht),!(m<=2)){var at=this.prevQuad,tt=this.firstQuad;x>0&&at[4]?this.batchQuad(j,k,V,Z,at[0],at[1],at[2],at[3],_,nt,ut,ht):(tt[0]=j,tt[1]=k,tt[2]=V,tt[3]=Z,tt[4]=1),y&&tt[4]?this.batchQuad(z,U,$,Q,tt[0],tt[1],tt[2],tt[3],_,nt,ut,ht):(at[0]=z,at[1]=U,at[2]=$,at[3]=Q,at[4]=1)}},batchVert:function(h,f,v){var d=this.vertexViewF32,p=this.vertexViewU32,g=this.vertexCount*this.currentShader.vertexComponentCount-1;d[++g]=h,d[++g]=f,p[++g]=v,this.vertexCount++},batchQuad:function(h,f,v,d,p,g,m,x,y,T,E,C){var A=!1;return this.shouldFlush(6)&&(this.flush(),A=!0),this.batchVert(h,f,y),this.batchVert(v,d,E),this.batchVert(p,g,C),this.batchVert(h,f,y),this.batchVert(p,g,C),this.batchVert(m,x,T),A},batchTri:function(h,f,v,d,p,g,m,x,y){var T=!1;return this.shouldFlush(3)&&(this.flush(),T=!0),this.batchVert(h,f,m),this.batchVert(v,d,x),this.batchVert(p,g,y),T},destroy:function(){return l.prototype.destroy.call(this),this.polygonCache=null,this}});c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(2),o=t(877),a=t(108),s=t(3),i=t(58),n=10,l=new s,r=new e({Extends:a,initialize:function(f){n=f.game.renderer.config.maxLights;for(var v=u(f,"fragShader",o),d=[],p=1;p<=n;p++)d.push({name:"lights"+p,fragShader:v.replace("%LIGHT_COUNT%",p.toString())});f.shaders=d,a.call(this,f),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.lightsActive=!0},boot:function(){i.prototype.boot.call(this);var h=this.gl,f=h.createTexture();h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,f),h.texImage2D(h.TEXTURE_2D,0,h.RGBA,1,1,0,h.RGBA,h.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:f};for(var v=0;v<this.shaders.length;v++)this["lightShader"+(v+1)]=this.shaders[v]},onRender:function(h,f){var v=h.sys.lights;if(this.lightsActive=!1,!(!v||!v.active)){var d=v.getLights(f),p=d.length;if(p!==0){this.lightsActive=!0,this.setShader(this["lightShader"+p],!0);var g,m=this.renderer,x=m.height,y=f.matrix;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",f.x,f.y,f.rotation,f.zoom),this.set3f("uAmbientLightColor",v.ambientColor.r,v.ambientColor.g,v.ambientColor.b),g=0;g<p;g++){var T=d[g].light,E=T.color,C="uLights["+g+"].";y.transformPoint(T.x,T.y,l),this.set2f(C+"position",l.x-f.scrollX*T.scrollFactorX*f.zoom,x-(l.y-f.scrollY*T.scrollFactorY*f.zoom)),this.set3f(C+"color",E.r,E.g,E.b),this.set1f(C+"intensity",T.intensity),this.set1f(C+"radius",T.radius)}this.currentNormalMapRotation=null}}},setNormalMapRotation:function(h){if(h!==this.currentNormalMapRotation||this.vertexCount===0){this.vertexCount>0&&this.flush();var f=this.inverseRotationMatrix;if(h){var v=-h,d=Math.cos(v),p=Math.sin(v);f[1]=p,f[3]=-p,f[0]=f[4]=d}else f[0]=f[4]=1,f[1]=f[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,f),this.currentNormalMapRotation=h}},setTexture2D:function(h,f){var v=this.renderer;h===void 0&&(h=v.tempTextures[0]);var d=this.getNormalMap(f);v.isNewNormalMap(h,d)&&(this.flush(),v.setTextureZero(h),v.setNormalMap(d));var p=f?f.rotation:0;return this.setNormalMapRotation(p),this.currentUnit=0,0},setGameObject:function(h,f){f===void 0&&(f=h.frame);var v=this.renderer,d=f.glTexture,p=this.getNormalMap(h);return v.isNewNormalMap()&&(this.flush(),v.setTextureZero(d),v.setNormalMap(p)),this.setNormalMapRotation(h.rotation),this.currentUnit=0,0},getNormalMap:function(h){var f;return h?h.displayTexture?f=h.displayTexture.dataSource[h.displayFrame.sourceIndex]:h.texture?f=h.texture.dataSource[h.frame.sourceIndex]:h.tileset&&(Array.isArray(h.tileset)?f=h.tileset[0].image.dataSource[0]:f=h.tileset.image.dataSource[0]):f=this.defaultNormalMap,f||(f=this.defaultNormalMap),f.glTexture},batchSprite:function(h,f,v){this.lightsActive&&a.prototype.batchSprite.call(this,h,f,v)},batchTexture:function(h,f,v,d,p,g,m,x,y,T,E,C,A,P,M,O,I,N,Y,X,W,H,D,L,B,G,w,z,U,V,Z,$){this.lightsActive&&a.prototype.batchTexture.call(this,h,f,v,d,p,g,m,x,y,T,E,C,A,P,M,O,I,N,Y,X,W,H,D,L,B,G,w,z,U,V,Z,$)},batchTextureFrame:function(h,f,v,d,p,g,m){this.lightsActive&&a.prototype.batchTextureFrame.call(this,h,f,v,d,p,g,m)}});r.LIGHT_COUNT=n,c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(2),o=t(880),a=t(881),s=t(58),i=new e({Extends:s,initialize:function(l){l.vertShader=u(l,"vertShader",a),l.fragShader=u(l,"fragShader",o),l.attributes=u(l,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),s.call(this,l)},onRender:function(n,l){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",l.zoom)},batchPointLight:function(n,l,r,h,f,v,d,p,g,m,x,y){var T=n.color,E=n.intensity,C=n.radius,A=n.attenuation,P=T.r*E,M=T.g*E,O=T.b*E,I=l.alpha*n.alpha;this.shouldFlush(6)&&this.flush(),this.batchLightVert(r,h,x,y,C,A,P,M,O,I),this.batchLightVert(f,v,x,y,C,A,P,M,O,I),this.batchLightVert(d,p,x,y,C,A,P,M,O,I),this.batchLightVert(r,h,x,y,C,A,P,M,O,I),this.batchLightVert(d,p,x,y,C,A,P,M,O,I),this.batchLightVert(g,m,x,y,C,A,P,M,O,I)},batchLightVert:function(n,l,r,h,f,v,d,p,g,m){var x=this.vertexViewF32,y=this.vertexCount*this.currentShader.vertexComponentCount-1;x[++y]=n,x[++y]=l,x[++y]=r,x[++y]=h,x[++y]=f,x[++y]=v,x[++y]=d,x[++y]=p,x[++y]=g,x[++y]=m,this.vertexCount++}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(2),o=t(108),a=new e({Extends:o,initialize:function(i){i.topology=5,i.batchSize=u(i,"batchSize",256),o.call(this,i)}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(2),o=t(108),a=t(882),s=t(883),i=t(58),n=new e({Extends:o,initialize:function(r){r.fragShader=u(r,"fragShader",a),r.vertShader=u(r,"vertShader",s),r.forceZero=!0,o.call(this,r)},boot:function(){i.prototype.boot.call(this),this.set1i("uMainSampler",0)}});c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(884),u=t(35),o=t(0),a=t(198),s=t(885),i=t(886),n=t(2),l=t(887),r=t(382),h=t(58),f=new o({Extends:h,initialize:function(d){d.renderTarget=n(d,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),d.vertShader=n(d,"vertShader",r),d.shaders=n(d,"shaders",[{name:"Copy",fragShader:i},{name:"AddBlend",fragShader:e},{name:"LinearBlend",fragShader:l},{name:"ColorMatrix",fragShader:s}]),d.attributes=n(d,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),d.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],d.batchSize=1,h.call(this,d),this.colorMatrix=new a,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){h.prototype.boot.call(this);var v=this.shaders,d=this.renderTargets;this.copyShader=v[0],this.addShader=v[1],this.linearShader=v[2],this.colorMatrixShader=v[3],this.fullFrame1=d[0],this.fullFrame2=d[1],this.halfFrame1=d[2],this.halfFrame2=d[3]},copyFrame:function(v,d,p,g,m){p===void 0&&(p=1),g===void 0&&(g=!0),m===void 0&&(m=!0);var x=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,v.texture),d?(x.viewport(0,0,d.width,d.height),x.bindFramebuffer(x.FRAMEBUFFER,d.framebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,d.texture,0)):x.viewport(0,0,v.width,v.height),g&&(m?x.clearColor(0,0,0,0):x.clearColor(0,0,0,1),x.clear(x.COLOR_BUFFER_BIT)),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null),x.bindTexture(x.TEXTURE_2D,null)},blitFrame:function(v,d,p,g,m,x){p===void 0&&(p=1),g===void 0&&(g=!0),m===void 0&&(m=!0),x===void 0&&(x=!1);var y=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,v.texture),v.height>d.height)y.viewport(0,0,v.width,v.height),this.setTargetUVs(v,d);else{var T=d.height-v.height;y.viewport(0,T,v.width,v.height)}if(y.bindFramebuffer(y.FRAMEBUFFER,d.framebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,d.texture,0),g&&(m?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT)),x){var E=this.renderer.currentBlendMode;this.renderer.setBlendMode(u.ERASE)}y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),x&&this.renderer.setBlendMode(E),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(v,d,p,g,m,x,y,T){y===void 0&&(y=!0),T===void 0&&(T=!0);var E=this.gl;E.bindFramebuffer(E.FRAMEBUFFER,v.framebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,v.texture,0),y&&(T?E.clearColor(0,0,0,0):E.clearColor(0,0,0,1),E.clear(E.COLOR_BUFFER_BIT)),E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,d.texture),E.copyTexSubImage2D(E.TEXTURE_2D,0,0,0,p,g,m,x),E.bindFramebuffer(E.FRAMEBUFFER,null),E.bindTexture(E.TEXTURE_2D,null)},copyToGame:function(v){var d=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,v.texture),d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.STATIC_DRAW),d.drawArrays(d.TRIANGLES,0,6),this.renderer.resetTextures()},drawFrame:function(v,d,p,g){p===void 0&&(p=!0),g===void 0&&(g=this.colorMatrix);var m=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",g.getData()),this.set1f("uAlpha",g.alpha),m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,v.texture),d?(m.viewport(0,0,d.width,d.height),m.bindFramebuffer(m.FRAMEBUFFER,d.framebuffer),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,d.texture,0)):m.viewport(0,0,v.width,v.height),p?m.clearColor(0,0,0,0):m.clearColor(0,0,0,1),m.clear(m.COLOR_BUFFER_BIT),m.bufferData(m.ARRAY_BUFFER,this.vertexData,m.STATIC_DRAW),m.drawArrays(m.TRIANGLES,0,6),m.bindFramebuffer(m.FRAMEBUFFER,null),m.bindTexture(m.TEXTURE_2D,null)},blendFrames:function(v,d,p,g,m,x){g===void 0&&(g=1),m===void 0&&(m=!0),x===void 0&&(x=this.linearShader);var y=this.gl;this.setShader(x),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",g),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,v.texture),y.activeTexture(y.TEXTURE1),y.bindTexture(y.TEXTURE_2D,d.texture),p?(y.bindFramebuffer(y.FRAMEBUFFER,p.framebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,p.texture,0),y.viewport(0,0,p.width,p.height)):y.viewport(0,0,v.width,v.height),m?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null)},blendFramesAdditive:function(v,d,p,g,m){this.blendFrames(v,d,p,g,m,this.addShader)},clearFrame:function(v,d){d===void 0&&(d=!0);var p=this.gl;p.viewport(0,0,v.width,v.height),p.bindFramebuffer(p.FRAMEBUFFER,v.framebuffer),d?p.clearColor(0,0,0,0):p.clearColor(0,0,0,1),p.clear(p.COLOR_BUFFER_BIT);var g=this.renderer.currentFramebuffer;p.bindFramebuffer(p.FRAMEBUFFER,g)},setUVs:function(v,d,p,g,m,x,y,T){var E=this.vertexViewF32;E[2]=v,E[3]=d,E[6]=p,E[7]=g,E[10]=m,E[11]=x,E[14]=v,E[15]=d,E[18]=m,E[19]=x,E[22]=y,E[23]=T},setTargetUVs:function(v,d){var p=d.height/v.height;p>.5?p=.5-(p-.5):p=.5+(.5-p),this.setUVs(0,p,0,1+p,1,1+p,1,p)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});c.exports=f},function(c,S){c.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{","    outFragCoord = inPosition.xy * 0.5 + 0.5;","    outTexCoord = inTexCoord;","","    gl_Position = vec4(inPosition, 0, 1);","}",""].join(`
`)},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(31),u=t(38),o=t(2),a=function(s,i){var n=s.getContext("experimental-webgl"),l=o(i,"callback"),r=o(i,"type","image/png"),h=o(i,"encoder",.92),f=o(i,"x",0),v=o(i,"y",0),d=o(i,"getPixel",!1),p=o(i,"isFramebuffer",!1),g=p?o(i,"bufferWidth",1):n.drawingBufferWidth,m=p?o(i,"bufferHeight",1):n.drawingBufferHeight;if(d){var x=new Uint8Array(4),y=p?v:m-v;n.readPixels(f,y,1,1,n.RGBA,n.UNSIGNED_BYTE,x),l.call(null,new u(x[0],x[1],x[2],x[3]/255))}else{var T=o(i,"width",g),E=o(i,"height",m),C=T*E*4,A=new Uint8Array(C);n.readPixels(f,m-v-E,T,E,n.RGBA,n.UNSIGNED_BYTE,A);for(var P=e.createWebGL(this,T,E),M=P.getContext("2d"),O=M.getImageData(0,0,T,E),I=O.data,N=0;N<E;N++)for(var Y=0;Y<T;Y++){var X=((E-N-1)*T+Y)*4,W=(N*T+Y)*4;I[W+0]=A[X+0],I[W+1]=A[X+1],I[W+2]=A[X+2],I[W+3]=A[X+3]}M.putImageData(O,0,0);var H=new Image;H.onerror=function(){l.call(null),e.remove(P)},H.onload=function(){l.call(null,H),e.remove(P)},H.src=P.toDataURL(r,h)}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(33),u=function(o){var a=o.config;if(!a.hideBanner){var s="WebGL";a.renderType===e.CANVAS?s="Canvas":a.renderType===e.HEADLESS&&(s="Headless");var i=a.audio,n=o.device.audio,l;if(n.webAudio&&!i.disableWebAudio?l="Web Audio":i.noAudio||!n.webAudio&&!n.audioData?l="No Audio":l="HTML5 Audio",o.device.browser.ie)window.console&&console.log("Phaser v"+e.VERSION+" / https://phaser.io");else{var r="",h=[r];if(Array.isArray(a.bannerBackgroundColor)){var f;a.bannerBackgroundColor.forEach(function(d){r=r.concat("%c "),h.push("background: "+d),f=d}),h[h.length-1]="color: "+a.bannerTextColor+"; background: "+f}else r=r.concat("%c "),h.push("color: "+a.bannerTextColor+"; background: "+a.bannerBackgroundColor);h.push("background: transparent"),a.gameTitle&&(r=r.concat(a.gameTitle),a.gameVersion&&(r=r.concat(" v"+a.gameVersion)),a.hidePhaser||(r=r.concat(" / ")));var v="";a.hidePhaser||(r=r.concat("Phaser v"+e.VERSION+v+" ("+s+" | "+l+")")),r=r.concat(" %c "+a.gameURL),h[0]=r,console.log.apply(console,h)}}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(6),o=t(1),a=t(386),s=new e({initialize:function(n,l){this.game=n,this.raf=new a,this.started=!1,this.running=!1,this.minFps=u(l,"min",5),this.targetFps=u(l,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=o,this.forceSetTimeOut=u(l,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=u(l,"deltaHistory",10),this.panicMax=u(l,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=u(l,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var i=window.performance.now();this.time=i,this.lastTime=i,this.nextFpsUpdate=i+1e3,this.framesThisSecond=0;for(var n=0;n<this.deltaSmoothingMax;n++)this.deltaHistory[n]=Math.min(this._target,this.deltaHistory[n]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(i){if(this.started)return this;this.started=!0,this.running=!0;for(var n=0;n<this.deltaSmoothingMax;n++)this.deltaHistory[n]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=i,this.raf.start(this.step.bind(this),this.forceSetTimeOut,this._target)},step:function(){var i=window.performance.now();this.now=i;var n=i-this.lastTime;n<0&&(n=0),this.rawDelta=n;var l=this.deltaIndex,r=this.deltaHistory,h=this.deltaSmoothingMax,f=n,v=n;if(this.smoothStep){(this._coolDown>0||!this.inFocus)&&(this._coolDown--,f=Math.min(f,this._target)),f>this._min&&(f=r[l],f=Math.min(f,this._min)),r[l]=f,this.deltaIndex++,this.deltaIndex>h&&(this.deltaIndex=0),v=0;for(var d=0;d<h;d++)v+=r[d];v/=h}this.delta=v,this.time+=this.rawDelta,i>this.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=i+1e3,this.framesThisSecond=0),this.framesThisSecond++;var p=v/this._target;this.callback(i,v,p),this.lastTime=i,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(i){this.running||(i&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=o,this.raf=null,this.game=null}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(1),o=new e({initialize:function(){this.isRunning=!1,this.callback=u,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var s=this;this.step=function i(){var n=window.performance.now();s.lastTime=s.tick,s.tick=n,s.callback(n),s.timeOutID=window.requestAnimationFrame(i)},this.stepTimeout=function i(){var n=Date.now(),l=Math.min(Math.max(s.target*2+s.tick-n,0),s.target);s.lastTime=s.tick,s.tick=n,s.callback(n),s.timeOutID=window.setTimeout(i,l)}},start:function(a,s,i){this.isRunning||(this.callback=a,this.isSetTimeOut=s,this.target=i,this.isRunning=!0,this.timeOutID=s?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=u}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(22),u=function(o){var a,s=o.events;if(document.hidden!==void 0)a="visibilitychange";else{var i=["webkit","moz","ms"];i.forEach(function(l){document[l+"Hidden"]!==void 0&&(document.hidden=function(){return document[l+"Hidden"]},a=l+"visibilitychange")})}var n=function(l){document.hidden||l.type==="pause"?s.emit(e.HIDDEN):s.emit(e.VISIBLE)};a&&document.addEventListener(a,n,!1),window.onblur=function(){s.emit(e.BLUR)},window.onfocus=function(){s.emit(e.FOCUS)},window.focus&&o.config.autoFocus&&window.focus()};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(389),u=t(31),o=t(6),a=function(s){var i=o(s,"data",[]),n=o(s,"canvas",null),l=o(s,"palette",e),r=o(s,"pixelWidth",1),h=o(s,"pixelHeight",r),f=o(s,"resizeCanvas",!0),v=o(s,"clearCanvas",!0),d=o(s,"preRender",null),p=o(s,"postRender",null),g=Math.floor(Math.abs(i[0].length*r)),m=Math.floor(Math.abs(i.length*h));n||(n=u.create2D(this,g,m),f=!1,v=!1),f&&(n.width=g,n.height=m);var x=n.getContext("2d");v&&x.clearRect(0,0,g,m),d&&d(n,x);for(var y=0;y<i.length;y++)for(var T=i[y],E=0;E<T.length;E++){var C=T[E];C!=="."&&C!==" "&&(x.fillStyle=l[C],x.fillRect(E*r,y*h,r,h))}return p&&p(n,x),n};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(358),o=t(94),a=t(3),s=new e({Extends:o,initialize:function(n,l,r,h){o.call(this,"CubicBezierCurve"),Array.isArray(n)&&(h=new a(n[6],n[7]),r=new a(n[4],n[5]),l=new a(n[2],n[3]),n=new a(n[0],n[1])),this.p0=n,this.p1=l,this.p2=r,this.p3=h},getStartPoint:function(i){return i===void 0&&(i=new a),i.copy(this.p0)},getResolution:function(i){return i},getPoint:function(i,n){n===void 0&&(n=new a);var l=this.p0,r=this.p1,h=this.p2,f=this.p3;return n.set(u(i,l.x,r.x,h.x,f.x),u(i,l.y,r.y,h.y,f.y))},draw:function(i,n){n===void 0&&(n=32);var l=this.getPoints(n);i.beginPath(),i.moveTo(this.p0.x,this.p0.y);for(var r=1;r<l.length;r++)i.lineTo(l[r].x,l[r].y);return i.strokePath(),i},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y,this.p3.x,this.p3.y]}}});s.fromJSON=function(i){var n=i.points,l=new a(n[0],n[1]),r=new a(n[2],n[3]),h=new a(n[4],n[5]),f=new a(n[6],n[7]);return new s(l,r,h,f)},c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(94),o=t(36),a=t(6),s=t(196),i=t(3),n=new e({Extends:u,initialize:function(r,h,f,v,d,p,g,m){if(typeof r=="object"){var x=r;r=a(x,"x",0),h=a(x,"y",0),f=a(x,"xRadius",0),v=a(x,"yRadius",f),d=a(x,"startAngle",0),p=a(x,"endAngle",360),g=a(x,"clockwise",!1),m=a(x,"rotation",0)}else v===void 0&&(v=f),d===void 0&&(d=0),p===void 0&&(p=360),g===void 0&&(g=!1),m===void 0&&(m=0);u.call(this,"EllipseCurve"),this.p0=new i(r,h),this._xRadius=f,this._yRadius=v,this._startAngle=o(d),this._endAngle=o(p),this._clockwise=g,this._rotation=o(m)},getStartPoint:function(l){return l===void 0&&(l=new i),this.getPoint(0,l)},getResolution:function(l){return l*2},getPoint:function(l,r){r===void 0&&(r=new i);for(var h=Math.PI*2,f=this._endAngle-this._startAngle,v=Math.abs(f)<Number.EPSILON;f<0;)f+=h;for(;f>h;)f-=h;f<Number.EPSILON&&(v?f=0:f=h),this._clockwise&&!v&&(f===h?f=-h:f=f-h);var d=this._startAngle+l*f,p=this.p0.x+this._xRadius*Math.cos(d),g=this.p0.y+this._yRadius*Math.sin(d);if(this._rotation!==0){var m=Math.cos(this._rotation),x=Math.sin(this._rotation),y=p-this.p0.x,T=g-this.p0.y;p=y*m-T*x+this.p0.x,g=y*x+T*m+this.p0.y}return r.set(p,g)},setXRadius:function(l){return this.xRadius=l,this},setYRadius:function(l){return this.yRadius=l,this},setWidth:function(l){return this.xRadius=l/2,this},setHeight:function(l){return this.yRadius=l/2,this},setStartAngle:function(l){return this.startAngle=l,this},setEndAngle:function(l){return this.endAngle=l,this},setClockwise:function(l){return this.clockwise=l,this},setRotation:function(l){return this.rotation=l,this},x:{get:function(){return this.p0.x},set:function(l){this.p0.x=l}},y:{get:function(){return this.p0.y},set:function(l){this.p0.y=l}},xRadius:{get:function(){return this._xRadius},set:function(l){this._xRadius=l}},yRadius:{get:function(){return this._yRadius},set:function(l){this._yRadius=l}},startAngle:{get:function(){return s(this._startAngle)},set:function(l){this._startAngle=o(l)}},endAngle:{get:function(){return s(this._endAngle)},set:function(l){this._endAngle=o(l)}},clockwise:{get:function(){return this._clockwise},set:function(l){this._clockwise=l}},angle:{get:function(){return s(this._rotation)},set:function(l){this._rotation=o(l)}},rotation:{get:function(){return this._rotation},set:function(l){this._rotation=l}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:s(this._startAngle),endAngle:s(this._endAngle),clockwise:this._clockwise,rotation:s(this._rotation)}}});n.fromJSON=function(l){return new n(l)},c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(94),o=t(199),a=t(10),s=t(3),i=new e({Extends:u,initialize:function(l,r){u.call(this,"LineCurve"),Array.isArray(l)&&(r=new s(l[2],l[3]),l=new s(l[0],l[1])),this.p0=l,this.p1=r,this.arcLengthDivisions=1},getBounds:function(n){return n===void 0&&(n=new a),o([this.p0,this.p1],n)},getStartPoint:function(n){return n===void 0&&(n=new s),n.copy(this.p0)},getResolution:function(n){return n===void 0&&(n=1),n},getPoint:function(n,l){return l===void 0&&(l=new s),n===1?l.copy(this.p1):(l.copy(this.p1).subtract(this.p0).scale(n).add(this.p0),l)},getPointAt:function(n,l){return this.getPoint(n,l)},getTangent:function(n,l){return l===void 0&&(l=new s),l.copy(this.p1).subtract(this.p0).normalize(),l},getUtoTmapping:function(n,l,r){var h;if(l){var f=this.getLengths(r),v=f[f.length-1],d=Math.min(l,v);h=d/v}else h=n;return h},draw:function(n){return n.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),n},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});i.fromJSON=function(n){var l=n.points,r=new s(l[0],l[1]),h=new s(l[2],l[3]);return new i(r,h)},c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(3),o=new e({initialize:function(s,i){this.active=!1,this.p0=new u(s,i)},getPoint:function(a,s){return s===void 0&&(s=new u),s.copy(this.p0)},getPointAt:function(a,s){return this.getPoint(a,s)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(94),o=t(359),a=t(3),s=new e({Extends:u,initialize:function(n,l,r){u.call(this,"QuadraticBezier"),Array.isArray(n)&&(r=new a(n[4],n[5]),l=new a(n[2],n[3]),n=new a(n[0],n[1])),this.p0=n,this.p1=l,this.p2=r},getStartPoint:function(i){return i===void 0&&(i=new a),i.copy(this.p0)},getResolution:function(i){return i},getPoint:function(i,n){n===void 0&&(n=new a);var l=this.p0,r=this.p1,h=this.p2;return n.set(o(i,l.x,r.x,h.x),o(i,l.y,r.y,h.y))},draw:function(i,n){n===void 0&&(n=32);var l=this.getPoints(n);i.beginPath(),i.moveTo(this.p0.x,this.p0.y);for(var r=1;r<l.length;r++)i.lineTo(l[r].x,l[r].y);return i.strokePath(),i},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y]}}});s.fromJSON=function(i){var n=i.points,l=new a(n[0],n[1]),r=new a(n[2],n[3]),h=new a(n[4],n[5]);return new s(l,r,h)},c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(194),u=t(0),o=t(94),a=t(3),s=new u({Extends:o,initialize:function(n){n===void 0&&(n=[]),o.call(this,"SplineCurve"),this.points=[],this.addPoints(n)},addPoints:function(i){for(var n=0;n<i.length;n++){var l=new a;typeof i[n]=="number"?(l.x=i[n],l.y=i[n+1],n++):Array.isArray(i[n])?(l.x=i[n][0],l.y=i[n][1]):(l.x=i[n].x,l.y=i[n].y),this.points.push(l)}return this},addPoint:function(i,n){var l=new a(i,n);return this.points.push(l),l},getStartPoint:function(i){return i===void 0&&(i=new a),i.copy(this.points[0])},getResolution:function(i){return i*this.points.length},getPoint:function(i,n){n===void 0&&(n=new a);var l=this.points,r=(l.length-1)*i,h=Math.floor(r),f=r-h,v=l[h===0?h:h-1],d=l[h],p=l[h>l.length-2?l.length-1:h+1],g=l[h>l.length-3?l.length-1:h+2];return n.set(e(f,v.x,d.x,p.x,g.x),e(f,v.y,d.y,p.y,g.y))},toJSON:function(){for(var i=[],n=0;n<this.points.length;n++)i.push(this.points[n].x),i.push(this.points[n].y);return{type:this.type,points:i}}});s.fromJSON=function(i){return new s(i.points)},c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s,i,n){(!s||s==="")&&(s=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {","    vec2 uv = fragCoord / resolution.xy;","    gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(`
`)),(!i||i==="")&&(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {","   gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);","   fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);","   outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(`
`)),n===void 0&&(n=null),this.key=a,this.fragmentSrc=s,this.vertexSrc=i,this.uniforms=n}});c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(38);e.ColorSpectrum=t(909),e.ColorToRGBA=t(910),e.ComponentToHex=t(398),e.GetColor=t(103),e.GetColor32=t(328),e.HexStringToColor=t(327),e.HSLToColor=t(911),e.HSVColorWheel=t(912),e.HSVToRGB=t(188),e.HueToComponent=t(399),e.IntegerToColor=t(189),e.IntegerToRGB=t(330),e.Interpolate=t(913),e.ObjectToColor=t(331),e.RandomRGB=t(914),e.RGBStringToColor=t(332),e.RGBToHSV=t(329),e.RGBToString=t(915),e.ValueToColor=t(187),c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u=e.toString(16);return u.length===1?"0"+u:u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(u-e)*6*o:o<1/2?u:o<2/3?e+(u-e)*(2/3-o)*6:e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(105),u=function(o){if(document.readyState==="complete"||document.readyState==="interactive"){o();return}var a=function(){document.removeEventListener("deviceready",a,!0),document.removeEventListener("DOMContentLoaded",a,!0),window.removeEventListener("load",a,!0),o()};document.body?e.cordova?document.addEventListener("deviceready",a,!1):(document.addEventListener("DOMContentLoaded",a,!0),window.addEventListener("load",a,!0)):window.setTimeout(a,20)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){if(!e)return window.innerHeight;var u=Math.abs(window.orientation),o={w:0,h:0},a=document.createElement("div");return a.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(a),o.w=u===90?a.offsetHeight:window.innerWidth,o.h=u===90?window.innerWidth:a.offsetHeight,document.documentElement.removeChild(a),a=null,Math.abs(window.orientation)!==90?o.h:o.w};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(201),u=function(o,a){var s=window.screen,i=s?s.orientation||s.mozOrientation||s.msOrientation:!1;if(i&&typeof i.type=="string")return i.type;if(typeof i=="string")return i;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?e.ORIENTATION.PORTRAIT:e.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return e.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return e.ORIENTATION.LANDSCAPE}else return a>o?e.ORIENTATION.PORTRAIT:e.ORIENTATION.LANDSCAPE};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u;return e!==""&&(typeof e=="string"?u=document.getElementById(e):e&&e.nodeType===1&&(u=e)),u||(u=document.body),u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u="";try{if(window.DOMParser){var o=new DOMParser;u=o.parseFromString(e,"text/xml")}else u=new ActiveXObject("Microsoft.XMLDOM"),u.loadXML(e)}catch{u=null}return!u||!u.documentElement||u.getElementsByTagName("parsererror").length?null:u};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(203),o=t(9),a=t(51),s=t(22),i=t(410),n=t(411),l=t(412),r=t(413),h=t(25),f=t(177),v=new e({initialize:function(p,g){this.game=p,this.scaleManager,this.canvas,this.config=g,this.enabled=!0,this.events=new o,this.isOver=!0,this.defaultCursor="",this.keyboard=g.inputKeyboard?new i(this):null,this.mouse=g.inputMouse?new n(this):null,this.touch=g.inputTouch?new r(this):null,this.pointers=[],this.pointersTotal=g.inputActivePointers,g.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var m=0;m<=this.pointersTotal;m++){var x=new l(this,m);x.smoothFactor=g.inputSmoothFactor,this.pointers.push(x)}this.mousePointer=g.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new h,this._tempMatrix2=new h,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],p.events.once(s.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(a.MANAGER_BOOT),this.game.events.on(s.PRE_RENDER,this.preRender,this),this.game.events.once(s.DESTROY,this.destroy,this)},setCanvasOver:function(d){this.isOver=!0,this.events.emit(a.GAME_OVER,d)},setCanvasOut:function(d){this.isOver=!1,this.events.emit(a.GAME_OUT,d)},preRender:function(){var d=this.game.loop.now,p=this.game.loop.delta,g=this.game.scene.getScenes(!0,!0);this.time=d,this.events.emit(a.MANAGER_UPDATE);for(var m=0;m<g.length;m++){var x=g[m];if(x.sys.input&&x.sys.input.updatePoll(d,p)&&this.globalTopOnly)return}},setDefaultCursor:function(d){this.defaultCursor=d,this.canvas.style.cursor!==d&&(this.canvas.style.cursor=d)},setCursor:function(d){d.cursor&&(this.canvas.style.cursor=d.cursor)},resetCursor:function(d){d.cursor&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(d){d===void 0&&(d=1);var p=[];this.pointersTotal+d>10&&(d=10-this.pointersTotal);for(var g=0;g<d;g++){var m=this.pointers.length,x=new l(this,m);x.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(x),this.pointersTotal++,p.push(x)}return p},updateInputPlugins:function(d,p){var g=this.game.scene.getScenes(!0,!0);this._tempSkip=!1;for(var m=0;m<g.length;m++){var x=g[m];if(x.sys.input){var y=x.sys.input.update(d,p);if(y&&this.globalTopOnly||this._tempSkip)return}}},onTouchStart:function(d){for(var p=this.pointers,g=[],m=0;m<d.changedTouches.length;m++)for(var x=d.changedTouches[m],y=1;y<this.pointersTotal;y++){var T=p[y];if(!T.active){T.touchstart(x,d),this.activePointer=T,g.push(T);break}}this.updateInputPlugins(u.TOUCH_START,g)},onTouchMove:function(d){for(var p=this.pointers,g=[],m=0;m<d.changedTouches.length;m++)for(var x=d.changedTouches[m],y=1;y<this.pointersTotal;y++){var T=p[y];if(T.active&&T.identifier===x.identifier){T.touchmove(x,d),this.activePointer=T,g.push(T);break}}this.updateInputPlugins(u.TOUCH_MOVE,g)},onTouchEnd:function(d){for(var p=this.pointers,g=[],m=0;m<d.changedTouches.length;m++)for(var x=d.changedTouches[m],y=1;y<this.pointersTotal;y++){var T=p[y];if(T.active&&T.identifier===x.identifier){T.touchend(x,d),g.push(T);break}}this.updateInputPlugins(u.TOUCH_END,g)},onTouchCancel:function(d){for(var p=this.pointers,g=[],m=0;m<d.changedTouches.length;m++)for(var x=d.changedTouches[m],y=1;y<this.pointersTotal;y++){var T=p[y];if(T.active&&T.identifier===x.identifier){T.touchcancel(x,d),g.push(T);break}}this.updateInputPlugins(u.TOUCH_CANCEL,g)},onMouseDown:function(d){var p=this.mousePointer;p.down(d),p.updateMotion(),this.activePointer=p,this.updateInputPlugins(u.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(d){var p=this.mousePointer;p.move(d),p.updateMotion(),this.activePointer=p,this.updateInputPlugins(u.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(d){var p=this.mousePointer;p.up(d),p.updateMotion(),this.activePointer=p,this.updateInputPlugins(u.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(d){var p=this.mousePointer;p.wheel(d),this.activePointer=p,this.updateInputPlugins(u.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(d){var p=this.mouse.locked;this.mousePointer.locked=p,this.events.emit(a.POINTERLOCK_CHANGE,d,p)},inputCandidate:function(d,p){var g=d.input;if(!g||!g.enabled||!g.alwaysEnabled&&!d.willRender(p))return!1;var m=!0,x=d.parentContainer;if(x)do{if(!x.willRender(p)){m=!1;break}x=x.parentContainer}while(x);return m},hitTest:function(d,p,g,m){m===void 0&&(m=this._tempHitTest);var x=this._tempPoint,y=g.scrollX,T=g.scrollY;m.length=0;var E=d.x,C=d.y;g.getWorldPoint(E,C,x),d.worldX=x.x,d.worldY=x.y;for(var A={x:0,y:0},P=this._tempMatrix,M=this._tempMatrix2,O=0;O<p.length;O++){var I=p[O];if(!!this.inputCandidate(I,g)){var N=x.x+y*I.scrollFactorX-y,Y=x.y+T*I.scrollFactorY-T;I.parentContainer?(I.getWorldTransformMatrix(P,M),P.applyInverse(N,Y,A)):f(N,Y,I.x,I.y,I.rotation,I.scaleX,I.scaleY,A),this.pointWithinHitArea(I,A.x,A.y)&&m.push(I)}}return m},pointWithinHitArea:function(d,p,g){p+=d.displayOriginX,g+=d.displayOriginY;var m=d.input;return m&&m.hitAreaCallback(m.hitArea,p,g,d)?(m.localX=p,m.localY=g,!0):!1},pointWithinInteractiveObject:function(d,p,g){return d.hitArea?(p+=d.gameObject.displayOriginX,g+=d.gameObject.displayOriginY,d.localX=p,d.localY=g,d.hitAreaCallback(d.hitArea,p,g,d)):!1},transformPointer:function(d,p,g,m){var x=d.position,y=d.prevPosition;y.x=x.x,y.y=x.y;var T=this.scaleManager.transformX(p),E=this.scaleManager.transformY(g),C=d.smoothFactor;!m||C===0?(x.x=T,x.y=E):(x.x=T*C+y.x*(1-C),x.y=E*C+y.y*(1-C))},destroy:function(){this.events.removeAllListeners(),this.game.events.off(s.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var d=0;d<this.pointers.length;d++)this.pointers[d].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(93),u=t(0),o=t(22),a=t(51),s=t(143),i=t(1),n=new u({initialize:function(r){this.manager=r,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=i,this.onKeyUp=i,r.events.once(a.MANAGER_BOOT,this.boot,this)},boot:function(){var l=this.manager.config;this.enabled=l.inputKeyboard,this.target=l.inputKeyboardEventTarget,this.addCapture(l.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(o.POST_STEP,this.postUpdate,this)},startListeners:function(){var l=this;this.onKeyDown=function(h){if(!(h.defaultPrevented||!l.enabled||!l.manager)){l.queue.push(h),l.manager.events.emit(a.MANAGER_PROCESS);var f=h.altKey||h.ctrlKey||h.shiftKey||h.metaKey;l.preventDefault&&!f&&l.captures.indexOf(h.keyCode)>-1&&h.preventDefault()}},this.onKeyUp=function(h){if(!(h.defaultPrevented||!l.enabled||!l.manager)){l.queue.push(h),l.manager.events.emit(a.MANAGER_PROCESS);var f=h.altKey||h.ctrlKey||h.shiftKey||h.metaKey;l.preventDefault&&!f&&l.captures.indexOf(h.keyCode)>-1&&h.preventDefault()}};var r=this.target;r&&(r.addEventListener("keydown",this.onKeyDown,!1),r.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var l=this.target;l.removeEventListener("keydown",this.onKeyDown,!1),l.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(l){typeof l=="string"&&(l=l.split(",")),Array.isArray(l)||(l=[l]);for(var r=this.captures,h=0;h<l.length;h++){var f=l[h];typeof f=="string"&&(f=s[f.trim().toUpperCase()]),r.indexOf(f)===-1&&r.push(f)}this.preventDefault=r.length>0},removeCapture:function(l){typeof l=="string"&&(l=l.split(",")),Array.isArray(l)||(l=[l]);for(var r=this.captures,h=0;h<l.length;h++){var f=l[h];typeof f=="string"&&(f=s[f.toUpperCase()]),e(r,f)}this.preventDefault=r.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(o.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(191),o=t(51),a=t(1),s=new e({initialize:function(n){this.manager=n,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=a,this.onMouseDown=a,this.onMouseUp=a,this.onMouseDownWindow=a,this.onMouseUpWindow=a,this.onMouseOver=a,this.onMouseOut=a,this.onMouseWheel=a,this.pointerLockChange=a,this.isTop=!0,n.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var i=this.manager.config;this.enabled=i.inputMouse,this.target=i.inputMouseEventTarget,this.passive=i.inputMousePassive,this.preventDefaultDown=i.inputMousePreventDefaultDown,this.preventDefaultUp=i.inputMousePreventDefaultUp,this.preventDefaultMove=i.inputMousePreventDefaultMove,this.preventDefaultWheel=i.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,i.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(i){return i.preventDefault(),!1}),this},requestPointerLock:function(){if(u.pointerLock){var i=this.target;i.requestPointerLock=i.requestPointerLock||i.mozRequestPointerLock||i.webkitRequestPointerLock,i.requestPointerLock()}},releasePointerLock:function(){u.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var i=this.target;if(!!i){var n=this,l=this.manager,r=l.canvas,h=window&&window.focus&&l.game.config.autoFocus;this.onMouseMove=function(v){!v.defaultPrevented&&n.enabled&&l&&l.enabled&&(l.onMouseMove(v),n.preventDefaultMove&&v.preventDefault())},this.onMouseDown=function(v){h&&window.focus(),!v.defaultPrevented&&n.enabled&&l&&l.enabled&&(l.onMouseDown(v),n.preventDefaultDown&&v.target===r&&v.preventDefault())},this.onMouseDownWindow=function(v){!v.defaultPrevented&&n.enabled&&l&&l.enabled&&v.target!==r&&l.onMouseDown(v)},this.onMouseUp=function(v){!v.defaultPrevented&&n.enabled&&l&&l.enabled&&(l.onMouseUp(v),n.preventDefaultUp&&v.target===r&&v.preventDefault())},this.onMouseUpWindow=function(v){!v.defaultPrevented&&n.enabled&&l&&l.enabled&&v.target!==r&&l.onMouseUp(v)},this.onMouseOver=function(v){!v.defaultPrevented&&n.enabled&&l&&l.enabled&&l.setCanvasOver(v)},this.onMouseOut=function(v){!v.defaultPrevented&&n.enabled&&l&&l.enabled&&l.setCanvasOut(v)},this.onMouseWheel=function(v){!v.defaultPrevented&&n.enabled&&l&&l.enabled&&l.onMouseWheel(v),n.preventDefaultWheel&&v.target===r&&v.preventDefault()};var f={passive:!0};if(i.addEventListener("mousemove",this.onMouseMove),i.addEventListener("mousedown",this.onMouseDown),i.addEventListener("mouseup",this.onMouseUp),i.addEventListener("mouseover",this.onMouseOver,f),i.addEventListener("mouseout",this.onMouseOut,f),this.preventDefaultWheel?i.addEventListener("wheel",this.onMouseWheel,{passive:!1}):i.addEventListener("wheel",this.onMouseWheel,f),window&&l.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,f),window.top.addEventListener("mouseup",this.onMouseUpWindow,f)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,f),window.addEventListener("mouseup",this.onMouseUpWindow,f),this.isTop=!1}u.pointerLock&&(this.pointerLockChange=function(v){var d=n.target;n.locked=document.pointerLockElement===d||document.mozPointerLockElement===d||document.webkitPointerLockElement===d,l.onPointerLockChange(v)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var i=this.target;i.removeEventListener("mousemove",this.onMouseMove),i.removeEventListener("mousedown",this.onMouseDown),i.removeEventListener("mouseup",this.onMouseUp),i.removeEventListener("mouseover",this.onMouseOver),i.removeEventListener("mouseout",this.onMouseOut),window&&(i=this.isTop?window.top:window,i.removeEventListener("mousedown",this.onMouseDownWindow),i.removeEventListener("mouseup",this.onMouseUpWindow)),u.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(349),u=t(0),o=t(50),a=t(124),s=t(360),i=t(3),n=t(105),l=new u({initialize:function(h,f){this.manager=h,this.id=f,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new i,this.prevPosition=new i,this.midPoint=new i(-1,-1),this.velocity=new i,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=f===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(r){var h=r.getWorldPoint(this.x,this.y);return this.worldX=h.x,this.worldY=h.y,this},positionToCamera:function(r,h){return r.getWorldPoint(this.x,this.y,h)},updateMotion:function(){var r=this.position.x,h=this.position.y,f=this.midPoint.x,v=this.midPoint.y;if(!(r===f&&h===v)){var d=s(this.motionFactor,f,r),p=s(this.motionFactor,v,h);a(d,r,.1)&&(d=r),a(p,h,.1)&&(p=h),this.midPoint.set(d,p);var g=r-d,m=h-p;this.velocity.set(g,m),this.angle=e(d,p,r,h),this.distance=Math.sqrt(g*g+m*m)}},up:function(r){"buttons"in r&&(this.buttons=r.buttons),this.event=r,this.button=r.button,this.upElement=r.target,this.manager.transformPointer(this,r.pageX,r.pageY,!1),r.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=r.timeStamp,this.wasTouch=!1)},down:function(r){"buttons"in r&&(this.buttons=r.buttons),this.event=r,this.button=r.button,this.downElement=r.target,this.manager.transformPointer(this,r.pageX,r.pageY,!1),r.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),n.macOS&&r.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=r.timeStamp),this.wasTouch=!1},move:function(r){"buttons"in r&&(this.buttons=r.buttons),this.event=r,this.manager.transformPointer(this,r.pageX,r.pageY,!0),this.locked&&(this.movementX=r.movementX||r.mozMovementX||r.webkitMovementX||0,this.movementY=r.movementY||r.mozMovementY||r.webkitMovementY||0),this.moveTime=r.timeStamp,this.wasTouch=!1},wheel:function(r){"buttons"in r&&(this.buttons=r.buttons),this.event=r,this.manager.transformPointer(this,r.pageX,r.pageY,!1),this.deltaX=r.deltaX,this.deltaY=r.deltaY,this.deltaZ=r.deltaZ,this.wasTouch=!1},touchstart:function(r,h){r.pointerId&&(this.pointerId=r.pointerId),this.identifier=r.identifier,this.target=r.target,this.active=!0,this.buttons=1,this.event=h,this.downElement=r.target,this.manager.transformPointer(this,r.pageX,r.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=h.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(r,h){this.event=h,this.manager.transformPointer(this,r.pageX,r.pageY,!0),this.moveTime=h.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(r,h){this.buttons=0,this.event=h,this.upElement=r.target,this.manager.transformPointer(this,r.pageX,r.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=h.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(r,h){this.buttons=0,this.event=h,this.upElement=r.target,this.manager.transformPointer(this,r.pageX,r.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=h.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?o(this.downX,this.downY,this.x,this.y):o(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?e(this.downX,this.downY,this.x,this.y):e(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(r,h){r===void 0&&(r=10),h===void 0&&(h=[]);for(var f=this.prevPosition.x,v=this.prevPosition.y,d=this.position.x,p=this.position.y,g=0;g<r;g++){var m=1/r*g;h[g]={x:s(m,f,d),y:s(m,v,p)}}return h},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(r){this.position.x=r}},y:{get:function(){return this.position.y},set:function(r){this.position.y=r}},time:{get:function(){return this.event?this.event.timeStamp:0}}});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(51),o=t(1),a=new e({initialize:function(i){this.manager=i,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=o,this.onTouchStartWindow=o,this.onTouchMove=o,this.onTouchEnd=o,this.onTouchEndWindow=o,this.onTouchCancel=o,this.onTouchCancelWindow=o,this.onTouchOver=o,this.onTouchOut=o,i.events.once(u.MANAGER_BOOT,this.boot,this)},boot:function(){var s=this.manager.config;this.enabled=s.inputTouch,this.target=s.inputTouchEventTarget,this.capture=s.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),s.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(s){return s.preventDefault(),!1}),this},startListeners:function(){var s=this,i=this.manager.canvas,n=window&&window.focus&&this.manager.game.config.autoFocus;this.onTouchStart=function(f){n&&window.focus(),!f.defaultPrevented&&s.enabled&&s.manager&&s.manager.enabled&&(s.manager.onTouchStart(f),s.capture&&f.cancelable&&f.target===i&&f.preventDefault())},this.onTouchStartWindow=function(f){!f.defaultPrevented&&s.enabled&&s.manager&&s.manager.enabled&&f.target!==i&&s.manager.onTouchStart(f)},this.onTouchMove=function(f){!f.defaultPrevented&&s.enabled&&s.manager&&s.manager.enabled&&(s.manager.onTouchMove(f),s.capture&&f.cancelable&&f.preventDefault())},this.onTouchEnd=function(f){!f.defaultPrevented&&s.enabled&&s.manager&&s.manager.enabled&&(s.manager.onTouchEnd(f),s.capture&&f.cancelable&&f.target===i&&f.preventDefault())},this.onTouchEndWindow=function(f){!f.defaultPrevented&&s.enabled&&s.manager&&s.manager.enabled&&f.target!==i&&s.manager.onTouchEnd(f)},this.onTouchCancel=function(f){!f.defaultPrevented&&s.enabled&&s.manager&&s.manager.enabled&&(s.manager.onTouchCancel(f),s.capture&&f.preventDefault())},this.onTouchCancelWindow=function(f){!f.defaultPrevented&&s.enabled&&s.manager&&s.manager.enabled&&s.manager.onTouchCancel(f)},this.onTouchOver=function(f){!f.defaultPrevented&&s.enabled&&s.manager&&s.manager.enabled&&s.manager.setCanvasOver(f)},this.onTouchOut=function(f){!f.defaultPrevented&&s.enabled&&s.manager&&s.manager.enabled&&s.manager.setCanvasOut(f)};var l=this.target;if(!!l){var r={passive:!0},h={passive:!1};l.addEventListener("touchstart",this.onTouchStart,this.capture?h:r),l.addEventListener("touchmove",this.onTouchMove,this.capture?h:r),l.addEventListener("touchend",this.onTouchEnd,this.capture?h:r),l.addEventListener("touchcancel",this.onTouchCancel,this.capture?h:r),l.addEventListener("touchover",this.onTouchOver,this.capture?h:r),l.addEventListener("touchout",this.onTouchOut,this.capture?h:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("touchstart",this.onTouchStartWindow,h),window.addEventListener("touchend",this.onTouchEndWindow,h),window.addEventListener("touchcancel",this.onTouchCancelWindow,h)),this.enabled=!0}},stopListeners:function(){var s=this.target;s.removeEventListener("touchstart",this.onTouchStart),s.removeEventListener("touchmove",this.onTouchMove),s.removeEventListener("touchend",this.onTouchEnd),s.removeEventListener("touchcancel",this.onTouchCancel),s.removeEventListener("touchover",this.onTouchOver),s.removeEventListener("touchout",this.onTouchOut),window&&(window.removeEventListener("touchstart",this.onTouchStartWindow),window.removeEventListener("touchend",this.onTouchEndWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(22),o=t(9),a=t(8),s=t(16),i=t(5),n=t(2),l=t(24),r=t(93),h=new e({Extends:o,initialize:function(v){o.call(this),this.game=v,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],v.isBooted?this.boot():v.events.once(u.BOOT,this.boot,this)},boot:function(){var f,v,d,p,g,m,x,y=this.game.config,T=y.installGlobalPlugins;for(T=T.concat(this._pendingGlobal),f=0;f<T.length;f++)v=T[f],d=n(v,"key",null),p=n(v,"plugin",null),g=n(v,"start",!1),m=n(v,"mapping",null),x=n(v,"data",null),d&&(p?this.install(d,p,g,m,x):console.warn("Missing `plugin` for key: "+d));for(T=y.installScenePlugins,T=T.concat(this._pendingScene),f=0;f<T.length;f++)v=T[f],d=n(v,"key",null),p=n(v,"plugin",null),m=n(v,"mapping",null),d&&(p?this.installScenePlugin(d,p,m):console.warn("Missing `plugin` for key: "+d));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(u.DESTROY,this.destroy,this)},addToScene:function(f,v,d){var p,g,m,x=this.game,y=f.scene,T=f.settings.map,E=f.settings.isBooted;for(p=0;p<v.length;p++)g=v[p],x[g]?(f[g]=x[g],T.hasOwnProperty(g)&&(y[T[g]]=f[g])):g==="game"&&T.hasOwnProperty(g)&&(y[T[g]]=x);for(var C=0;C<d.length;C++)for(m=d[C],p=0;p<m.length;p++)if(g=m[p],!!l.hasCore(g)){var A=l.getCore(g),P=A.mapping,M=new A.plugin(y,this,P);f[P]=M,A.custom?y[P]=M:T.hasOwnProperty(P)&&(y[T[P]]=M),E&&M.boot()}for(m=this.plugins,p=0;p<m.length;p++){var O=m[p];O.mapping&&(y[O.mapping]=O.plugin)}},getDefaultScenePlugins:function(){var f=this.game.config.defaultPlugins;return f=f.concat(this.scenePlugins),f},installScenePlugin:function(f,v,d,p,g){if(g===void 0&&(g=!1),typeof v!="function"){console.warn("Invalid Scene Plugin: "+f);return}if(!l.hasCore(f))l.register(f,v,d,!0),this.scenePlugins.push(f);else if(!g&&l.hasCore(f)){console.warn("Scene Plugin key in use: "+f);return}if(p){var m=new v(p,this,f);p.sys[f]=m,d&&d!==""&&(p[d]=m),m.boot()}},install:function(f,v,d,p,g){if(d===void 0&&(d=!1),p===void 0&&(p=null),g===void 0&&(g=null),typeof v!="function")return console.warn("Invalid Plugin: "+f),null;if(l.hasCustom(f))return console.warn("Plugin key in use: "+f),null;if(p!==null&&(d=!0),!this.game.isBooted)this._pendingGlobal.push({key:f,plugin:v,start:d,mapping:p,data:g});else if(l.registerCustom(f,v,p,g),d)return this.start(f);return null},getIndex:function(f){for(var v=this.plugins,d=0;d<v.length;d++){var p=v[d];if(p.key===f)return d}return-1},getEntry:function(f){var v=this.getIndex(f);if(v!==-1)return this.plugins[v]},isActive:function(f){var v=this.getEntry(f);return v&&v.active},start:function(f,v){v===void 0&&(v=f);var d=this.getEntry(v);return d&&!d.active?(d.active=!0,d.plugin.start()):d||(d=this.createEntry(f,v)),d?d.plugin:null},createEntry:function(f,v){var d=l.getCustom(f);if(d){var p=new d.plugin(this);d={key:v,plugin:p,active:!0,mapping:d.mapping,data:d.data},this.plugins.push(d),p.init(d.data),p.start()}return d},stop:function(f){var v=this.getEntry(f);return v&&v.active&&(v.active=!1,v.plugin.stop()),this},get:function(f,v){v===void 0&&(v=!0);var d=this.getEntry(f);if(d)return d.plugin;var p=this.getClass(f);return p&&v?(d=this.createEntry(f,f),d?d.plugin:null):p||null},getClass:function(f){return l.getCustomClass(f)},removeGlobalPlugin:function(f){var v=this.getEntry(f);v&&r(this.plugins,v),l.removeCustom(f)},removeScenePlugin:function(f){r(this.scenePlugins,f),l.remove(f)},registerGameObject:function(f,v,d){return v&&i.register(f,v),d&&s.register(f,d),this},removeGameObject:function(f,v,d){return v===void 0&&(v=!0),d===void 0&&(d=!0),v&&i.remove(f),d&&s.remove(f),this},registerFileType:function(f,v,d){a.register(f,v),d&&d.sys.load&&(d.sys.load[f]=v)},destroy:function(){for(var f=0;f<this.plugins.length;f++)this.plugins[f].plugin.destroy();l.destroyCustomPlugins(),this.game.noReturn&&l.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});c.exports=h},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(201),u=t(0),o=t(9),a=t(104),s=t(22),i=t(401),n=t(407),l=t(402),r=t(1),h=t(10),f=t(416),v=t(76),d=t(3),p=new u({Extends:o,initialize:function(m){o.call(this),this.game=m,this.canvas,this.canvasBounds=new h,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=e.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new d(1,1),this.autoRound=!1,this.autoCenter=e.CENTER.NO_CENTER,this.orientation=e.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.listeners={orientationChange:r,windowResize:r,fullScreenChange:r,fullScreenError:r}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(s.BOOT,this.boot,this)},boot:function(){var g=this.game;this.canvas=g.canvas,this.fullscreen=g.device.fullscreen,this.scaleMode!==e.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===e.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),g.events.on(s.PRE_STEP,this.step,this),g.events.once(s.READY,this.refresh,this),g.events.once(s.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(g){this.getParent(g),this.getParentBounds();var m=g.width,x=g.height,y=g.scaleMode,T=g.zoom,E=g.autoRound;if(typeof m=="string"){var C=this.parentSize.width;C===0&&(C=window.innerWidth);var A=parseInt(m,10)/100;m=Math.floor(C*A)}if(typeof x=="string"){var P=this.parentSize.height;P===0&&(P=window.innerHeight);var M=parseInt(x,10)/100;x=Math.floor(P*M)}this.scaleMode=y,this.autoRound=E,this.autoCenter=g.autoCenter,this.resizeInterval=g.resizeInterval,E&&(m=Math.floor(m),x=Math.floor(x)),this.gameSize.setSize(m,x),T===e.ZOOM.MAX_ZOOM&&(T=this.getMaxZoom()),this.zoom=T,T!==1&&(this._resetZoom=!0),this.baseSize.setSize(m,x),E&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),g.minWidth>0&&this.displaySize.setMin(g.minWidth*T,g.minHeight*T),g.maxWidth>0&&this.displaySize.setMax(g.maxWidth*T,g.maxHeight*T),this.displaySize.setSize(m,x),this.orientation=l(m,x)},getParent:function(g){var m=g.parent;if(m!==null){if(this.parent=n(m),this.parentIsWindow=this.parent===document.body,g.expandParent&&g.scaleMode!==e.SCALE_MODE.NONE){var x=this.parent.getBoundingClientRect();(this.parentIsWindow||x.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",x=this.parent.getBoundingClientRect(),!this.parentIsWindow&&x.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}g.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=n(g.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var g=this.parentSize,m=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(m.height=i(!0));var x=m.width,y=m.height;return g.width!==x||g.height!==y?(g.setSize(x,y),!0):!1},lockOrientation:function(g){var m=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return m?m.call(screen,g):!1},setParentSize:function(g,m){return this.parentSize.setSize(g,m),this.refresh()},setGameSize:function(g,m){var x=this.autoRound;x&&(g=Math.floor(g),m=Math.floor(m));var y=this.width,T=this.height;return this.gameSize.resize(g,m),this.baseSize.resize(g,m),x&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(g/m),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(y,T)},resize:function(g,m){var x=this.zoom,y=this.autoRound;y&&(g=Math.floor(g),m=Math.floor(m));var T=this.width,E=this.height;this.gameSize.resize(g,m),this.baseSize.resize(g,m),y&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(g*x,m*x),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var C=this.canvas.style,A=g*x,P=m*x;return y&&(A=Math.floor(A),P=Math.floor(P)),(A!==g||P!==m)&&(C.width=A+"px",C.height=P+"px"),this.refresh(T,E)},setZoom:function(g){return this.zoom=g,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(g,m){g===void 0&&(g=this.width),m===void 0&&(m=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var x=this.game.domContainer;if(x){this.baseSize.setCSS(x);var y=this.canvas.style,T=x.style;T.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",T.marginLeft=y.marginLeft,T.marginTop=y.marginTop}return this.emit(a.RESIZE,this.gameSize,this.baseSize,this.displaySize,g,m),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var g=l(this.width,this.height);g!==this.orientation&&(this.orientation=g,this.emit(a.ORIENTATION_CHANGE,g))}},updateScale:function(){var g=this.canvas.style,m=this.gameSize.width,x=this.gameSize.height,y,T,E=this.zoom,C=this.autoRound;this.scaleMode===e.SCALE_MODE.NONE?(this.displaySize.setSize(m*E,x*E),y=this.displaySize.width,T=this.displaySize.height,C&&(y=Math.floor(y),T=Math.floor(T)),this._resetZoom&&(g.width=y+"px",g.height=T+"px",this._resetZoom=!1)):this.scaleMode===e.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),y=this.displaySize.width,T=this.displaySize.height,C&&(y=Math.floor(y),T=Math.floor(T)),this.canvas.width=y,this.canvas.height=T):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),y=this.displaySize.width,T=this.displaySize.height,C&&(y=Math.floor(y),T=Math.floor(T)),g.width=y+"px",g.height=T+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var g=v(this.parentSize.width,this.gameSize.width,0,!0),m=v(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(g,m),1)},updateCenter:function(){var g=this.autoCenter;if(g!==e.CENTER.NO_CENTER){var m=this.canvas,x=m.style,y=m.getBoundingClientRect(),T=y.width,E=y.height,C=Math.floor((this.parentSize.width-T)/2),A=Math.floor((this.parentSize.height-E)/2);g===e.CENTER.CENTER_HORIZONTALLY?A=0:g===e.CENTER.CENTER_VERTICALLY&&(C=0),x.marginLeft=C+"px",x.marginTop=A+"px"}},updateBounds:function(){var g=this.canvasBounds,m=this.canvas.getBoundingClientRect();g.x=m.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),g.y=m.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),g.width=m.width,g.height=m.height},transformX:function(g){return(g-this.canvasBounds.left)*this.displayScale.x},transformY:function(g){return(g-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(g){g===void 0&&(g={navigationUI:"hide"});var m=this.fullscreen;if(!m.available){this.emit(a.FULLSCREEN_UNSUPPORTED);return}if(!m.active){var x=this.getFullscreenTarget();m.keyboard?x[m.request](Element.ALLOW_KEYBOARD_INPUT):x[m.request](g)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(a.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(g){this.removeFullscreenTarget(),this.emit(a.FULLSCREEN_FAILED,g)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var g=document.createElement("div");g.style.margin="0",g.style.padding="0",g.style.width="100%",g.style.height="100%",this.fullscreenTarget=g,this._createdFullscreenTarget=!0}if(this._createdFullscreenTarget){var m=this.canvas.parentNode;m.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)}return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var g=this.fullscreenTarget;if(g&&g.parentNode){var m=g.parentNode;m.insertBefore(this.canvas,g),m.removeChild(g)}}},stopFullscreen:function(){var g=this.fullscreen;if(!g.available)return this.emit(a.FULLSCREEN_UNSUPPORTED),!1;g.active&&document[g.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(a.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(g){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(g)},startListeners:function(){var g=this,m=this.listeners;if(m.orientationChange=function(){g.updateBounds(),g._checkOrientation=!0,g.dirty=!0},m.windowResize=function(){g.updateBounds(),g.dirty=!0},window.addEventListener("orientationchange",m.orientationChange,!1),window.addEventListener("resize",m.windowResize,!1),this.fullscreen.available){m.fullScreenChange=function(y){return g.onFullScreenChange(y)},m.fullScreenError=function(y){return g.onFullScreenError(y)};var x=["webkit","moz",""];x.forEach(function(y){document.addEventListener(y+"fullscreenchange",m.fullScreenChange,!1),document.addEventListener(y+"fullscreenerror",m.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",m.fullScreenChange,!1),document.addEventListener("MSFullscreenError",m.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(g,m){!this.parent||(this._lastCheck+=m,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var g=this.listeners;window.removeEventListener("orientationchange",g.orientationChange,!1),window.removeEventListener("resize",g.windowResize,!1);var m=["webkit","moz",""];m.forEach(function(x){document.removeEventListener(x+"fullscreenchange",g.fullScreenChange,!1),document.removeEventListener(x+"fullscreenerror",g.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",g.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",g.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===e.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===e.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});c.exports=p},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=t(0),o=t(76),a=t(3),s=new u({initialize:function(n,l,r,h){n===void 0&&(n=0),l===void 0&&(l=n),r===void 0&&(r=0),h===void 0&&(h=null),this._width=n,this._height=l,this._parent=h,this.aspectMode=r,this.aspectRatio=l===0?1:n/l,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new a},setAspectMode:function(i){return i===void 0&&(i=0),this.aspectMode=i,this.setSize(this._width,this._height)},setSnap:function(i,n){return i===void 0&&(i=0),n===void 0&&(n=i),this.snapTo.set(i,n),this.setSize(this._width,this._height)},setParent:function(i){return this._parent=i,this.setSize(this._width,this._height)},setMin:function(i,n){return i===void 0&&(i=0),n===void 0&&(n=i),this.minWidth=e(i,0,this.maxWidth),this.minHeight=e(n,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(i,n){return i===void 0&&(i=Number.MAX_VALUE),n===void 0&&(n=i),this.maxWidth=e(i,this.minWidth,Number.MAX_VALUE),this.maxHeight=e(n,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(i,n){switch(i===void 0&&(i=0),n===void 0&&(n=i),this.aspectMode){case s.NONE:this._width=this.getNewWidth(o(i,this.snapTo.x)),this._height=this.getNewHeight(o(n,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case s.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(o(i,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case s.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(o(n,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case s.FIT:this.constrain(i,n,!0);break;case s.ENVELOP:this.constrain(i,n,!1);break}return this},setAspectRatio:function(i){return this.aspectRatio=i,this.setSize(this._width,this._height)},resize:function(i,n){return this._width=this.getNewWidth(o(i,this.snapTo.x)),this._height=this.getNewHeight(o(n,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(i,n){return n===void 0&&(n=!0),i=e(i,this.minWidth,this.maxWidth),n&&this._parent&&i>this._parent.width&&(i=Math.max(this.minWidth,this._parent.width)),i},getNewHeight:function(i,n){return n===void 0&&(n=!0),i=e(i,this.minHeight,this.maxHeight),n&&this._parent&&i>this._parent.height&&(i=Math.max(this.minHeight,this._parent.height)),i},constrain:function(i,n,l){i===void 0&&(i=0),n===void 0&&(n=i),l===void 0&&(l=!0),i=this.getNewWidth(i),n=this.getNewHeight(n);var r=this.snapTo,h=n===0?1:i/n;return l&&this.aspectRatio>h||!l&&this.aspectRatio<h?(i=o(i,r.x),n=i/this.aspectRatio,r.y>0&&(n=o(n,r.y),i=n*this.aspectRatio)):(l&&this.aspectRatio<h||!l&&this.aspectRatio>h)&&(n=o(n,r.y),i=n*this.aspectRatio,r.x>0&&(i=o(i,r.x),n=i*(1/this.aspectRatio))),this._width=i,this._height=n,this},fitTo:function(i,n){return this.constrain(i,n,!0)},envelop:function(i,n){return this.constrain(i,n,!1)},setWidth:function(i){return this.setSize(i,this._height)},setHeight:function(i){return this.setSize(this._width,i)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(i){i&&i.style&&(i.style.width=this._width+"px",i.style.height=this._height+"px")},copy:function(i){return i.setAspectMode(this.aspectMode),i.aspectRatio=this.aspectRatio,i.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(i){this.setSize(i,this._height)}},height:{get:function(){return this._height},set:function(i){this.setSize(this._width,i)}}});s.NONE=0,s.WIDTH_CONTROLS_HEIGHT=1,s.HEIGHT_CONTROLS_WIDTH=2,s.FIT=3,s.ENVELOP=4,c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(144),o=t(20),a=t(22),s=t(6),i=t(95),n=t(1),l=t(418),r=t(204),h=new e({initialize:function(v,d){if(this.game=v,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,d){Array.isArray(d)||(d=[d]);for(var p=0;p<d.length;p++)this._pending.push({key:"default",scene:d[p],autoStart:p===0,data:{}})}v.events.once(a.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){var f,v,d,p;for(f=0;f<this._pending.length;f++){v=this._pending[f],d=v.key,p=v.scene;var g;p instanceof l?g=this.createSceneFromInstance(d,p):typeof p=="object"?g=this.createSceneFromObject(d,p):typeof p=="function"&&(g=this.createSceneFromFunction(d,p)),d=g.sys.settings.key,this.keys[d]=g,this.scenes.push(g),this._data[d]&&(g.sys.settings.data=this._data[d].data,this._data[d].autoStart&&(v.autoStart=!0)),(v.autoStart||g.sys.settings.active)&&this._start.push(d)}for(this._pending.length=0,this._data={},this.isBooted=!0,f=0;f<this._start.length;f++)v=this._start[f],this.start(v);this._start.length=0}},processQueue:function(){var f=this._pending.length,v=this._queue.length;if(!(f===0&&v===0)){var d,p;if(f){for(d=0;d<f;d++)p=this._pending[d],this.add(p.key,p.scene,p.autoStart,p.data);for(d=0;d<this._start.length;d++)p=this._start[d],this.start(p);this._start.length=0,this._pending.length=0;return}for(d=0;d<this._queue.length;d++)p=this._queue[d],this[p.op](p.keyA,p.keyB);this._queue.length=0}},add:function(f,v,d,p){if(d===void 0&&(d=!1),p===void 0&&(p={}),this.isProcessing||!this.isBooted)return this._pending.push({key:f,scene:v,autoStart:d,data:p}),this.isBooted||(this._data[f]={data:p}),null;f=this.getKey(f,v);var g;return v instanceof l?g=this.createSceneFromInstance(f,v):typeof v=="object"?(v.key=f,g=this.createSceneFromObject(f,v)):typeof v=="function"&&(g=this.createSceneFromFunction(f,v)),g.sys.settings.data=p,f=g.sys.settings.key,this.keys[f]=g,this.scenes.push(g),(d||g.sys.settings.active)&&(this._pending.length?this._start.push(f):this.start(f)),g},remove:function(f){if(this.isProcessing)this._queue.push({op:"remove",keyA:f,keyB:null});else{var v=this.getScene(f);if(!v||v.sys.isTransitioning())return this;var d=this.scenes.indexOf(v),p=v.sys.settings.key;d>-1&&(delete this.keys[p],this.scenes.splice(d,1),this._start.indexOf(p)>-1&&(d=this._start.indexOf(p),this._start.splice(d,1)),v.sys.destroy())}return this},bootScene:function(f){var v=f.sys,d=v.settings;v.sceneUpdate=n,f.init&&(f.init.call(f,d.data),d.status=u.INIT,d.isTransition&&v.events.emit(o.TRANSITION_INIT,d.transitionFrom,d.transitionDuration));var p;v.load&&(p=v.load,p.reset()),p&&f.preload?(f.preload.call(f),p.list.size===0?this.create(f):(d.status=u.LOADING,p.once(i.COMPLETE,this.loadComplete,this),p.start())):this.create(f)},loadComplete:function(f){this.create(f.scene)},payloadComplete:function(f){this.bootScene(f.scene)},update:function(f,v){this.processQueue(),this.isProcessing=!0;for(var d=this.scenes.length-1;d>=0;d--){var p=this.scenes[d].sys;p.settings.status>u.START&&p.settings.status<=u.RUNNING&&p.step(f,v)}},render:function(f){for(var v=0;v<this.scenes.length;v++){var d=this.scenes[v].sys;d.settings.visible&&d.settings.status>=u.LOADING&&d.settings.status<u.SLEEPING&&d.render(f)}this.isProcessing=!1},create:function(f){var v=f.sys,d=v.settings;f.create&&(d.status=u.CREATING,f.create.call(f,d.data),d.status===u.DESTROYED)||(d.isTransition&&v.events.emit(o.TRANSITION_START,d.transitionFrom,d.transitionDuration),f.update&&(v.sceneUpdate=f.update),d.status=u.RUNNING,v.events.emit(o.CREATE,f))},createSceneFromFunction:function(f,v){var d=new v;if(d instanceof l){var p=d.sys.settings.key;if(p!==""&&(f=p),this.keys.hasOwnProperty(f))throw new Error("Cannot add a Scene with duplicate key: "+f);return this.createSceneFromInstance(f,d)}else return d.sys=new r(d),d.sys.settings.key=f,d.sys.init(this.game),d},createSceneFromInstance:function(f,v){var d=v.sys.settings.key;return d===""&&(v.sys.settings.key=f),v.sys.init(this.game),v},createSceneFromObject:function(f,v){var d=new l(v),p=d.sys.settings.key;p!==""?f=p:d.sys.settings.key=f,d.sys.init(this.game);for(var g=["init","preload","create","update","render"],m=0;m<g.length;m++){var x=s(v,g[m],null);x&&(d[g[m]]=x)}if(v.hasOwnProperty("extend")){for(var y in v.extend)if(!!v.extend.hasOwnProperty(y)){var T=v.extend[y];y==="data"&&d.hasOwnProperty("data")&&typeof T=="object"?d.data.merge(T):y!=="sys"&&(d[y]=T)}}return d},getKey:function(f,v){if(f||(f="default"),typeof v=="function")return f;if(v instanceof l?f=v.sys.settings.key:typeof v=="object"&&v.hasOwnProperty("key")&&(f=v.key),this.keys.hasOwnProperty(f))throw new Error("Cannot add a Scene with duplicate key: "+f);return f},getScenes:function(f,v){f===void 0&&(f=!0),v===void 0&&(v=!1);for(var d=[],p=this.scenes,g=0;g<p.length;g++){var m=p[g];m&&(!f||f&&m.sys.isActive())&&d.push(m)}return v?d.reverse():d},getScene:function(f){if(typeof f=="string"){if(this.keys[f])return this.keys[f]}else for(var v=0;v<this.scenes.length;v++)if(f===this.scenes[v])return f;return null},isActive:function(f){var v=this.getScene(f);return v?v.sys.isActive():null},isPaused:function(f){var v=this.getScene(f);return v?v.sys.isPaused():null},isVisible:function(f){var v=this.getScene(f);return v?v.sys.isVisible():null},isSleeping:function(f){var v=this.getScene(f);return v?v.sys.isSleeping():null},pause:function(f,v){var d=this.getScene(f);return d&&d.sys.pause(v),this},resume:function(f,v){var d=this.getScene(f);return d&&d.sys.resume(v),this},sleep:function(f,v){var d=this.getScene(f);return d&&!d.sys.isTransitioning()&&d.sys.sleep(v),this},wake:function(f,v){var d=this.getScene(f);return d&&d.sys.wake(v),this},run:function(f,v){var d=this.getScene(f);if(!d){for(var p=0;p<this._pending.length;p++)if(this._pending[p].key===f){this.queueOp("start",f,v);break}return this}d.sys.isSleeping()?d.sys.wake(v):d.sys.isPaused()?d.sys.resume(v):this.start(f,v)},start:function(f,v){if(!this.isBooted)return this._data[f]={autoStart:!0,data:v},this;var d=this.getScene(f);if(d){var p=d.sys;if(p.isActive()||p.isPaused())p.shutdown(),p.sceneUpdate=n,p.start(v);else{p.sceneUpdate=n,p.start(v);var g;if(p.load&&(g=p.load),g&&p.settings.hasOwnProperty("pack")&&(g.reset(),g.addPack({payload:p.settings.pack})))return p.settings.status=u.LOADING,g.once(i.COMPLETE,this.payloadComplete,this),g.start(),this}this.bootScene(d)}return this},stop:function(f,v){var d=this.getScene(f);return d&&!d.sys.isTransitioning()&&d.sys.shutdown(v),this},switch:function(f,v){var d=this.getScene(f),p=this.getScene(v);return d&&p&&d!==p&&(this.sleep(f),this.isSleeping(v)?this.wake(v):this.start(v)),this},getAt:function(f){return this.scenes[f]},getIndex:function(f){var v=this.getScene(f);return this.scenes.indexOf(v)},bringToTop:function(f){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:f,keyB:null});else{var v=this.getIndex(f);if(v!==-1&&v<this.scenes.length){var d=this.getScene(f);this.scenes.splice(v,1),this.scenes.push(d)}}return this},sendToBack:function(f){if(this.isProcessing)this._queue.push({op:"sendToBack",keyA:f,keyB:null});else{var v=this.getIndex(f);if(v!==-1&&v>0){var d=this.getScene(f);this.scenes.splice(v,1),this.scenes.unshift(d)}}return this},moveDown:function(f){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:f,keyB:null});else{var v=this.getIndex(f);if(v>0){var d=v-1,p=this.getScene(f),g=this.getAt(d);this.scenes[v]=g,this.scenes[d]=p}}return this},moveUp:function(f){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:f,keyB:null});else{var v=this.getIndex(f);if(v<this.scenes.length-1){var d=v+1,p=this.getScene(f),g=this.getAt(d);this.scenes[v]=g,this.scenes[d]=p}}return this},moveAbove:function(f,v){if(f===v)return this;if(this.isProcessing)this._queue.push({op:"moveAbove",keyA:f,keyB:v});else{var d=this.getIndex(f),p=this.getIndex(v);if(d!==-1&&p!==-1){var g=this.getAt(p);this.scenes.splice(p,1),this.scenes.splice(d+1,0,g)}}return this},moveBelow:function(f,v){if(f===v)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:f,keyB:v});else{var d=this.getIndex(f),p=this.getIndex(v);if(d!==-1&&p!==-1){var g=this.getAt(p);this.scenes.splice(p,1),d===0?this.scenes.unshift(g):this.scenes.splice(d,0,g)}}return this},queueOp:function(f,v,d){return this._queue.push({op:f,keyA:v,keyB:d}),this},swapPosition:function(f,v){if(f===v)return this;if(this.isProcessing)this._queue.push({op:"swapPosition",keyA:f,keyB:v});else{var d=this.getIndex(f),p=this.getIndex(v);if(d!==p&&d!==-1&&p!==-1){var g=this.getAt(d);this.scenes[d]=this.scenes[p],this.scenes[p]=g}}return this},dump:function(){for(var f=[],v=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],d=0;d<this.scenes.length;d++){var p=this.scenes[d].sys,g=p.settings.visible&&(p.settings.status===u.RUNNING||p.settings.status===u.PAUSED)?"[*] ":"[-] ";g+=p.settings.key+" ("+v[p.settings.status]+")",f.push(g)}console.log(f.join(`
`))},destroy:function(){for(var f=0;f<this.scenes.length;f++){var v=this.scenes[f].sys;v.destroy()}this.update=n,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});c.exports=h},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(204),o=new e({initialize:function(s){this.sys=new u(this,s),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(2),u=t(205),o=function(a){var s=a.game.config.defaultPhysicsSystem,i=e(a.settings,"physics",!1);if(!(!s&&!i)){var n=[];if(s&&n.push(u(s+"Physics")),i)for(var l in i)l=u(l.concat("Physics")),n.indexOf(l)===-1&&n.push(l);return n}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(2),u=function(o){var a=o.plugins.getDefaultScenePlugins(),s=e(o.settings,"plugins",!1);return Array.isArray(s)?s:a||[]};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(144),u=t(6),o=t(127),a=t(978),s={create:function(i){return typeof i=="string"?i={key:i}:i===void 0&&(i={}),{status:e.PENDING,key:u(i,"key",""),active:u(i,"active",!1),visible:u(i,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:u(i,"pack",!1),cameras:u(i,"cameras",null),map:u(i,"map",o(a,u(i,"mapAdd",{}))),physics:u(i,"physics",{}),loader:u(i,"loader",{}),plugins:u(i,"plugins",!1),input:u(i,"input",{})}}};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(31),u=t(423),o=t(0),a=t(38),s=t(33),i=t(9),n=t(106),l=t(22),r=t(388),h=t(6),f=t(425),v=t(206),d=new o({Extends:i,initialize:function(g){i.call(this),this.game=g,this.name="TextureManager",this.list={},this._tempCanvas=e.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,g.events.once(l.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(n.LOAD,this.updatePending,this),this.on(n.ERROR,this.updatePending,this);var p=this.game.config;this.addBase64("__DEFAULT",p.defaultImage),this.addBase64("__MISSING",p.missingImage),this.addBase64("__WHITE",p.whiteImage),this.game.events.once(l.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(n.LOAD),this.off(n.ERROR),this.emit(n.READY))},checkKey:function(p){return this.exists(p)?(console.error("Texture key already in use: "+p),!1):!0},remove:function(p){if(typeof p=="string")if(this.exists(p))p=this.get(p);else return console.warn("No texture found matching key: "+p),this;return this.list.hasOwnProperty(p.key)&&(p.destroy(),this.emit(n.REMOVE,p.key)),this},removeKey:function(p){return this.list.hasOwnProperty(p)&&delete this.list[p],this},addBase64:function(p,g){if(this.checkKey(p)){var m=this,x=new Image;x.onerror=function(){m.emit(n.ERROR,p)},x.onload=function(){var y=m.create(p,x);f.Image(y,0),m.emit(n.ADD,p,y),m.emit(n.LOAD,p,y)},x.src=g}return this},getBase64:function(p,g,m,x){m===void 0&&(m="image/png"),x===void 0&&(x=.92);var y="",T=this.getFrame(p,g);if(T&&(T.source.isRenderTexture||T.source.isGLTexture))console.warn("Cannot getBase64 from WebGL Texture");else if(T){var E=T.canvasData,C=e.create2D(this,E.width,E.height),A=C.getContext("2d");A.drawImage(T.source.image,E.x,E.y,E.width,E.height,0,0,E.width,E.height),y=C.toDataURL(m,x),e.remove(C)}return y},addImage:function(p,g,m){var x=null;return this.checkKey(p)&&(x=this.create(p,g),f.Image(x,0),m&&x.setDataSource(m),this.emit(n.ADD,p,x)),x},addGLTexture:function(p,g,m,x){var y=null;return this.checkKey(p)&&(m===void 0&&(m=g.width),x===void 0&&(x=g.height),y=this.create(p,g,m,x),y.add("__BASE",0,0,0,m,x),this.emit(n.ADD,p,y)),y},addRenderTexture:function(p,g){var m=null;return this.checkKey(p)&&(m=this.create(p,g),m.add("__BASE",0,0,0,g.width,g.height),this.emit(n.ADD,p,m)),m},generate:function(p,g){if(this.checkKey(p)){var m=e.create(this,1,1);return g.canvas=m,r(g),this.addCanvas(p,m)}else return null},createCanvas:function(p,g,m){if(g===void 0&&(g=256),m===void 0&&(m=256),this.checkKey(p)){var x=e.create(this,g,m,s.CANVAS,!0);return this.addCanvas(p,x)}return null},addCanvas:function(p,g,m){m===void 0&&(m=!1);var x=null;return m?x=new u(this,p,g,g.width,g.height):this.checkKey(p)&&(x=new u(this,p,g,g.width,g.height),this.list[p]=x,this.emit(n.ADD,p,x)),x},addAtlas:function(p,g,m,x){return Array.isArray(m.textures)||Array.isArray(m.frames)?this.addAtlasJSONArray(p,g,m,x):this.addAtlasJSONHash(p,g,m,x)},addAtlasJSONArray:function(p,g,m,x){var y=null;if(this.checkKey(p)){if(y=this.create(p,g),Array.isArray(m))for(var T=m.length===1,E=0;E<y.source.length;E++){var C=T?m[0]:m[E];f.JSONArray(y,E,C)}else f.JSONArray(y,0,m);x&&y.setDataSource(x),this.emit(n.ADD,p,y)}return y},addAtlasJSONHash:function(p,g,m,x){var y=null;if(this.checkKey(p)){if(y=this.create(p,g),Array.isArray(m))for(var T=0;T<m.length;T++)f.JSONHash(y,T,m[T]);else f.JSONHash(y,0,m);x&&y.setDataSource(x),this.emit(n.ADD,p,y)}return y},addAtlasXML:function(p,g,m,x){var y=null;return this.checkKey(p)&&(y=this.create(p,g),f.AtlasXML(y,0,m),x&&y.setDataSource(x),this.emit(n.ADD,p,y)),y},addUnityAtlas:function(p,g,m,x){var y=null;return this.checkKey(p)&&(y=this.create(p,g),f.UnityYAML(y,0,m),x&&y.setDataSource(x),this.emit(n.ADD,p,y)),y},addSpriteSheet:function(p,g,m){var x=null;if(this.checkKey(p)){x=this.create(p,g);var y=x.source[0].width,T=x.source[0].height;f.SpriteSheet(x,0,0,0,y,T,m),this.emit(n.ADD,p,x)}return x},addSpriteSheetFromAtlas:function(p,g){if(!this.checkKey(p))return null;var m=h(g,"atlas",null),x=h(g,"frame",null);if(!(!m||!x)){var y=this.get(m),T=y.get(x);if(T){var E=this.create(p,T.source.image);return T.trimmed?f.SpriteSheetFromAtlas(E,T,g):f.SpriteSheet(E,0,T.cutX,T.cutY,T.cutWidth,T.cutHeight,g),this.emit(n.ADD,p,E),E}}},create:function(p,g,m,x){var y=null;return this.checkKey(p)&&(y=new v(this,p,g,m,x),this.list[p]=y),y},exists:function(p){return this.list.hasOwnProperty(p)},get:function(p){return p===void 0&&(p="__DEFAULT"),this.list[p]?this.list[p]:p instanceof v?p:this.list.__MISSING},cloneFrame:function(p,g){if(this.list[p])return this.list[p].get(g).clone()},getFrame:function(p,g){if(this.list[p])return this.list[p].get(g)},getTextureKeys:function(){var p=[];for(var g in this.list)g!=="__DEFAULT"&&g!=="__MISSING"&&p.push(g);return p},getPixel:function(p,g,m,x){var y=this.getFrame(m,x);if(y){p-=y.x,g-=y.y;var T=y.data.cut;if(p+=T.x,g+=T.y,p>=T.x&&p<T.r&&g>=T.y&&g<T.b){var E=this._tempContext;E.clearRect(0,0,1,1),E.drawImage(y.source.image,p,g,1,1,0,0,1,1);var C=E.getImageData(0,0,1,1);return new a(C.data[0],C.data[1],C.data[2],C.data[3])}}return null},getPixelAlpha:function(p,g,m,x){var y=this.getFrame(m,x);if(y){p-=y.x,g-=y.y;var T=y.data.cut;if(p+=T.x,g+=T.y,p>=T.x&&p<T.r&&g>=T.y&&g<T.b){var E=this._tempContext;E.clearRect(0,0,1,1),E.drawImage(y.source.image,p,g,1,1,0,0,1,1);var C=E.getImageData(0,0,1,1);return C.data[3]}}return null},setTexture:function(p,g,m){return this.list[g]&&(p.texture=this.list[g],p.frame=p.texture.get(m)),p},renameTexture:function(p,g){var m=this.get(p);return m&&p!==g?(m.key=g,this.list[g]=m,delete this.list[p],!0):!1},each:function(p,g){for(var m=[null],x=1;x<arguments.length;x++)m.push(arguments[x]);for(var y in this.list)m[0]=this.list[y],p.apply(g,m)},destroy:function(){for(var p in this.list)this.list[p].destroy();this.list={},this.game=null,e.remove(this._tempCanvas)}});c.exports=d},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(18),o=t(38),a=t(33),s=t(138),i=t(206),n=new e({Extends:i,initialize:function(r,h,f,v,d){i.call(this,r,h,f,v,d),this.add("__BASE",0,0,0,v,d),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d"),this.width=v,this.height=d,this.imageData=this.context.getImageData(0,0,v,d),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===a.WEBGL&&this.refresh(),this},draw:function(l,r,h){return this.context.drawImage(h,l,r),this.update()},drawFrame:function(l,r,h,f){h===void 0&&(h=0),f===void 0&&(f=0);var v=this.manager.getFrame(l,r);if(v){var d=v.canvasData,p=v.cutWidth,g=v.cutHeight,m=v.source.resolution;return this.context.drawImage(v.source.image,d.x,d.y,p,g,h,f,p/m,g/m),this.update()}else return this},setPixel:function(l,r,h,f,v,d){d===void 0&&(d=255),l=Math.abs(Math.floor(l)),r=Math.abs(Math.floor(r));var p=this.getIndex(l,r);if(p>-1){var g=this.context.getImageData(l,r,1,1);g.data[0]=h,g.data[1]=f,g.data[2]=v,g.data[3]=d,this.context.putImageData(g,l,r)}return this},putData:function(l,r,h,f,v,d,p){return f===void 0&&(f=0),v===void 0&&(v=0),d===void 0&&(d=l.width),p===void 0&&(p=l.height),this.context.putImageData(l,r,h,f,v,d,p),this},getData:function(l,r,h,f){l=u(Math.floor(l),0,this.width-1),r=u(Math.floor(r),0,this.height-1),h=u(h,1,this.width-l),f=u(f,1,this.height-r);var v=this.context.getImageData(l,r,h,f);return v},getPixel:function(l,r,h){h||(h=new o);var f=this.getIndex(l,r);if(f>-1){var v=this.data,d=v[f+0],p=v[f+1],g=v[f+2],m=v[f+3];h.setTo(d,p,g,m)}return h},getPixels:function(l,r,h,f){l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=this.width),f===void 0&&(f=h),l=Math.abs(Math.round(l)),r=Math.abs(Math.round(r));for(var v=u(l,0,this.width),d=u(l+h,0,this.width),p=u(r,0,this.height),g=u(r+f,0,this.height),m=new o,x=[],y=p;y<g;y++){for(var T=[],E=v;E<d;E++)m=this.getPixel(E,y,m),T.push({x:E,y,color:m.color,alpha:m.alphaGL});x.push(T)}return x},getIndex:function(l,r){return l=Math.abs(Math.round(l)),r=Math.abs(Math.round(r)),l<this.width&&r<this.height?(l+r*this.width)*4:-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(l,r,h,f){return l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=this.width),f===void 0&&(f=this.height),this.context.clearRect(l,r,h,f),this.update()},setSize:function(l,r){return r===void 0&&(r=l),(l!==this.width||r!==this.height)&&(this.canvas.width=l,this.canvas.height=r,this._source.width=l,this._source.height=r,this._source.isPowerOf2=s(l,r),this.frames.__BASE.setSize(l,r,0,0),this.width=l,this.height=r,this.refresh()),this},destroy:function(){i.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(31),u=t(0),o=t(138),a=t(168),s=new u({initialize:function(n,l,r,h,f){f===void 0&&(f=!1);var v=n.manager.game;this.renderer=v.renderer,this.texture=n,this.source=l,this.image=l,this.compressionAlgorithm=null,this.resolution=1,this.width=r||l.naturalWidth||l.videoWidth||l.width||0,this.height=h||l.naturalHeight||l.videoHeight||l.height||0,this.scaleMode=a.DEFAULT,this.isCanvas=l instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&l instanceof HTMLVideoElement,this.isRenderTexture=l.type==="RenderTexture",this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&l instanceof WebGLTexture,this.isPowerOf2=o(this.width,this.height),this.glTexture=null,this.glIndex=0,this.glIndexCounter=-1,this.flipY=f,this.init(v)},init:function(i){var n=this.renderer;n&&(n.gl?this.isCanvas?this.glTexture=n.createCanvasTexture(this.image,!1,this.flipY):this.isVideo?this.glTexture=n.createVideoTexture(this.image,!1,this.flipY):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=n.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.isGLTexture?this.glTexture=this.source:this.glTexture=n.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),i.config.antialias||this.setFilter(1)},setFilter:function(i){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,i),this.scaleMode=i},setFlipY:function(i){return i===void 0&&(i=!0),this.flipY=i,this},update:function(){var i=this.renderer.gl;i&&this.isCanvas?this.glTexture=this.renderer.updateCanvasTexture(this.image,this.glTexture,this.flipY):i&&this.isVideo&&(this.glTexture=this.renderer.updateVideoTexture(this.image,this.glTexture,this.flipY))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&e.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={AtlasXML:t(979),Canvas:t(980),Image:t(981),JSONArray:t(982),JSONHash:t(983),SpriteSheet:t(984),SpriteSheetFromAtlas:t(985),UnityYAML:t(986)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(427),u=t(430),o=t(432),a={create:function(s){var i=s.config.audio,n=s.device.audio;return i.noAudio||!n.webAudio&&!n.audioData?new u(s):n.webAudio&&!i.disableWebAudio?new o(s):new e(s)}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(145),u=t(0),o=t(70),a=t(429),s=new u({Extends:e,initialize:function(n){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,e.call(this,n)},add:function(i,n){var l=new a(this,i,n);return this.sounds.push(l),l},unlock:function(){this.locked=!1;var i=this;if(this.game.cache.audio.entries.each(function(h,f){for(var v=0;v<f.length;v++)if(f[v].dataset.locked==="true")return i.locked=!0,!1;return!0}),!!this.locked){var n=!1,l=function(){n=!0},r=function(){if(n){n=!1;return}document.body.removeEventListener("touchmove",l),document.body.removeEventListener("touchend",r);var h=[];if(i.game.cache.audio.entries.each(function(v,d){for(var p=0;p<d.length;p++){var g=d[p];g.dataset.locked==="true"&&h.push(g)}return!0}),h.length!==0){var f=h[h.length-1];f.oncanplaythrough=function(){f.oncanplaythrough=null,h.forEach(function(v){v.dataset.locked="false"}),i.unlocked=!0},h.forEach(function(v){v.load()})}};this.once(o.UNLOCKED,function(){for(this.forEachActiveSound(function(f){f.currentMarker===null&&f.duration===0&&(f.duration=f.tags[0].duration),f.totalDuration=f.tags[0].duration});this.lockedActionsQueue.length;){var h=this.lockedActionsQueue.shift();h.sound[h.prop].apply?h.sound[h.prop].apply(h.sound,h.value||[]):h.sound[h.prop]=h.value}},this),document.body.addEventListener("touchmove",l,!1),document.body.addEventListener("touchend",r,!1)}},onBlur:function(){this.forEachActiveSound(function(i){i.isPlaying&&(this.onBlurPausedSounds.push(i),i.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(i){i.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){e.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(i,n,l){return i.tags[0].dataset.locked==="true"?(this.lockedActionsQueue.push({sound:i,prop:n,value:l}),!0):!1},setMute:function(i){return this.mute=i,this},mute:{get:function(){return this._mute},set:function(i){this._mute=i,this.forEachActiveSound(function(n){n.updateMute()}),this.emit(o.GLOBAL_MUTE,this,i)}},setVolume:function(i){return this.volume=i,this},volume:{get:function(){return this._volume},set:function(i){this._volume=i,this.forEachActiveSound(function(n){n.updateVolume()}),this.emit(o.GLOBAL_VOLUME,this,i)}}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(78),u=function(o,a,s,i,n){if(i===void 0&&(i=0),n===void 0&&(n=o.length),e(o,i,n))for(var l=i;l<n;l++){var r=o[l];if(!a||a&&s===void 0&&r.hasOwnProperty(a)||a&&s!==void 0&&r[a]===s)return r}return null};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(146),u=t(0),o=t(70),a=t(18),s=new u({Extends:e,initialize:function(n,l,r){if(r===void 0&&(r={}),this.tags=n.game.cache.audio.get(l),!this.tags)throw new Error('There is no audio asset with key "'+l+'" in the audio cache');this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,e.call(this,n,l,r)},play:function(i,n){return this.manager.isLocked(this,"play",[i,n])||!e.prototype.play.call(this,i,n)||!this.pickAndPlayAudioTag()?!1:(this.emit(o.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!e.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(o.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!e.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(o.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!e.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(o.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var i=this.currentConfig.seek,n=this.currentConfig.delay,l=(this.currentMarker?this.currentMarker.start:0)+i;return this.previousTime=l,this.audio.currentTime=l,this.applyConfig(),n===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+n*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var i=0;i<this.tags.length;i++){var n=this.tags[i];if(n.dataset.used==="false")return n.dataset.used="true",this.audio=n,!0}if(!this.manager.override)return!1;var l=[];this.manager.forEachActiveSound(function(h){h.key===this.key&&h.audio&&l.push(h)},this),l.sort(function(h,f){return h.loop===f.loop?f.seek/f.duration-h.seek/h.duration:h.loop?1:-1});var r=l[0];return this.audio=r.audio,r.reset(),r.audio=null,r.startTime=0,r.previousTime=0,!0},playCatchPromise:function(){var i=this.audio.play();i&&i.catch(function(n){console.warn(n)})},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){e.prototype.stop.call(this)},onBlur:function(){this.isPlaying=!1,this.isPaused=!0,this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.currentConfig.delay=Math.max(0,(this.startTime-window.performance.now())/1e3),this.stopAndReleaseAudioTag()},onFocus:function(){this.isPlaying=!0,this.isPaused=!1,this.pickAndPlayAudioTag()},update:function(i){if(!!this.isPlaying){if(this.startTime>0){this.startTime<i-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,i-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());return}var n=this.currentMarker?this.currentMarker.start:0,l=n+this.duration,r=this.audio.currentTime;if(this.currentConfig.loop)r>=l-this.manager.loopEndOffset?(this.audio.currentTime=n+Math.max(0,r-l),r=this.audio.currentTime):r<n&&(this.audio.currentTime+=n,r=this.audio.currentTime),r<this.previousTime&&this.emit(o.LOOPED,this);else if(r>=l){this.reset(),this.stopAndReleaseAudioTag(),this.emit(o.COMPLETE,this);return}this.previousTime=r}},destroy:function(){e.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=a(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){e.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(i){this.currentConfig.mute=i,!this.manager.isLocked(this,"mute",i)&&(this.updateMute(),this.emit(o.MUTE,this,i))}},setMute:function(i){return this.mute=i,this},volume:{get:function(){return this.currentConfig.volume},set:function(i){this.currentConfig.volume=i,!this.manager.isLocked(this,"volume",i)&&(this.updateVolume(),this.emit(o.VOLUME,this,i))}},setVolume:function(i){return this.volume=i,this},rate:{get:function(){return this.currentConfig.rate},set:function(i){this.currentConfig.rate=i,!this.manager.isLocked(this,o.RATE,i)&&(this.calculateRate(),this.emit(o.RATE,this,i))}},setRate:function(i){return this.rate=i,this},detune:{get:function(){return this.currentConfig.detune},set:function(i){this.currentConfig.detune=i,!this.manager.isLocked(this,o.DETUNE,i)&&(this.calculateRate(),this.emit(o.DETUNE,this,i))}},setDetune:function(i){return this.detune=i,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(i){this.manager.isLocked(this,"seek",i)||this.startTime>0||(this.isPlaying||this.isPaused)&&(i=Math.min(Math.max(0,i),this.duration),this.isPlaying?(this.previousTime=i,this.audio.currentTime=i):this.isPaused&&(this.currentConfig.seek=i),this.emit(o.SEEK,this,i))}},setSeek:function(i){return this.seek=i,this},loop:{get:function(){return this.currentConfig.loop},set:function(i){this.currentConfig.loop=i,!this.manager.isLocked(this,"loop",i)&&(this.audio&&(this.audio.loop=i),this.emit(o.LOOP,this,i))}},setLoop:function(i){return this.loop=i,this},pan:{get:function(){return this.currentConfig.pan},set:function(i){this.currentConfig.pan=i,this.emit(o.PAN,this,i)}},setPan:function(i){return this.pan=i,this}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(145),u=t(0),o=t(9),a=t(431),s=t(1),i=new u({Extends:o,initialize:function(l){o.call(this),this.game=l,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(n,l){var r=new a(this,n,l);return this.sounds.push(r),r},addAudioSprite:function(n,l){var r=this.add(n,l);return r.spritemap={},r},play:function(n,l){return!1},playAudioSprite:function(n,l,r){return!1},remove:function(n){return e.prototype.remove.call(this,n)},removeByKey:function(n){return e.prototype.removeByKey.call(this,n)},pauseAll:s,resumeAll:s,stopAll:s,update:s,setRate:s,setDetune:s,setMute:s,setVolume:s,forEachActiveSound:function(n,l){e.prototype.forEachActiveSound.call(this,n,l)},destroy:function(){e.prototype.destroy.call(this)}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(146),u=t(0),o=t(9),a=t(17),s=function(){return!1},i=function(){return null},n=function(){return this},l=new u({Extends:o,initialize:function(h,f,v){v===void 0&&(v={}),o.call(this),this.manager=h,this.key=f,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=a({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},v),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:s,updateMarker:s,removeMarker:i,play:s,pause:s,resume:s,stop:s,destroy:function(){e.prototype.destroy.call(this)},setMute:n,setVolume:n,setRate:n,setDetune:n,setSeek:n,setLoop:n,setPan:n});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(433),u=t(145),o=t(0),a=t(70),s=t(22),i=t(434),n=new o({Extends:u,initialize:function(r){this.context=this.createAudioContext(r),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked=this.context.state==="suspended"&&("ontouchstart"in window||"onclick"in window),u.call(this,r),this.locked&&r.isBooted?this.unlock():r.events.once(s.BOOT,this.unlock,this)},createAudioContext:function(l){var r=l.config.audio;if(r.context)return r.context.resume(),r.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(l){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=l,this.masterMuteNode=l.createGain(),this.masterVolumeNode=l.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(l.destination),this.destination=this.masterMuteNode,this},add:function(l,r){var h=new i(this,l,r);return this.sounds.push(h),h},decodeAudio:function(l,r){var h;Array.isArray(l)?h=l:h=[{key:l,data:r}];for(var f=this.game.cache.audio,v=h.length,d=0;d<h.length;d++){var p=h[d],g=p.key,m=p.data;typeof m=="string"&&(m=e(m));var x=function(T,E){f.add(T,E),this.emit(a.DECODED,T),v--,v===0&&this.emit(a.DECODED_ALL)}.bind(this,g),y=function(T,E){console.error("Error decoding audio: "+T+" - ",E?E.message:""),v--,v===0&&this.emit(a.DECODED_ALL)}.bind(this,g);this.context.decodeAudioData(m,x,y)}},unlock:function(){var l=this,r=document.body,h=function f(){if(l.context&&r){var v=r.removeEventListener;l.context.resume().then(function(){v("touchstart",f),v("touchend",f),v("click",f),v("keydown",f),l.unlocked=!0},function(){v("touchstart",f),v("touchend",f),v("click",f),v("keydown",f)})}};r&&(r.addEventListener("touchstart",h,!1),r.addEventListener("touchend",h,!1),r.addEventListener("click",h,!1),r.addEventListener("keydown",h,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var l=this.context;(l.state==="suspended"||l.state==="interrupted")&&!this.locked&&l.resume()},update:function(l,r){u.prototype.update.call(this,l,r);var h=this.context;h&&h.state==="interrupted"&&h.resume()},destroy:function(){if(this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio.context)this.context.suspend();else{var l=this;this.context.close().then(function(){l.context=null})}u.prototype.destroy.call(this)},setMute:function(l){return this.mute=l,this},mute:{get:function(){return this.masterMuteNode.gain.value===0},set:function(l){this.masterMuteNode.gain.setValueAtTime(l?0:1,0),this.emit(a.GLOBAL_MUTE,this,l)}},setVolume:function(l){return this.volume=l,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(l){this.masterVolumeNode.gain.setValueAtTime(l,0),this.emit(a.GLOBAL_VOLUME,this,l)}}});c.exports=n},function(c,S){/**
 * @author       Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),u=0;u<t.length;u++)e[t.charCodeAt(u)]=u;var o=function(a){a=a.substr(a.indexOf(",")+1);var s=a.length,i=s*.75,n=0,l,r,h,f;a[s-1]==="="&&(i--,a[s-2]==="="&&i--);for(var v=new ArrayBuffer(i),d=new Uint8Array(v),p=0;p<s;p+=4)l=e[a.charCodeAt(p)],r=e[a.charCodeAt(p+1)],h=e[a.charCodeAt(p+2)],f=e[a.charCodeAt(p+3)],d[n++]=l<<2|r>>4,d[n++]=(r&15)<<4|h>>2,d[n++]=(h&3)<<6|f&63;return v};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(146),u=t(0),o=t(70),a=new u({Extends:e,initialize:function(i,n,l){if(l===void 0&&(l={}),this.audioBuffer=i.game.cache.audio.get(n),!this.audioBuffer)throw new Error('Audio key "'+n+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=i.context.createGain(),this.volumeNode=i.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),i.context.createStereoPanner?(this.pannerNode=i.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(i.destination)):this.volumeNode.connect(i.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,e.call(this,i,n,l)},play:function(s,i){return e.prototype.play.call(this,s,i)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(o.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime<this.startTime||!e.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(o.PAUSE,this),!0)},resume:function(){return this.manager.context.currentTime<this.startTime||!e.prototype.resume.call(this)?!1:(this.createAndStartBufferSource(),this.emit(o.RESUME,this),!0)},stop:function(){return e.prototype.stop.call(this)?(this.stopAndRemoveBufferSource(),this.emit(o.STOP,this),!0):!1},createAndStartBufferSource:function(){var s=this.currentConfig.seek,i=this.currentConfig.delay,n=this.manager.context.currentTime+i,l=(this.currentMarker?this.currentMarker.start:0)+s,r=this.duration-s;this.playTime=n-s,this.startTime=n,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,n),Math.max(0,l),Math.max(0,r)),this.resetConfig()},createAndStartLoopBufferSource:function(){var s=this.getLoopTime(),i=this.currentMarker?this.currentMarker.start:0,n=this.duration;this.loopTime=s,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,s),Math.max(0,i),Math.max(0,n))},createBufferSource:function(){var s=this,i=this.manager.context.createBufferSource();return i.buffer=this.audioBuffer,i.connect(this.muteNode),i.onended=function(n){n.target===s.source&&(s.currentConfig.loop?s.hasLooped=!0:s.hasEnded=!0)},i},stopAndRemoveBufferSource:function(){this.source&&(this.source.stop(),this.source.disconnect(),this.source=null),this.playTime=0,this.startTime=0,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1}),e.prototype.applyConfig.call(this)},update:function(){this.hasEnded?(this.hasEnded=!1,e.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(o.COMPLETE,this)):this.hasLooped&&(this.hasLooped=!1,this.source=this.loopSource,this.loopSource=null,this.playTime=this.startTime=this.loopTime,this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:this.totalRate}),this.createAndStartLoopBufferSource(),this.emit(o.LOOPED,this))},destroy:function(){e.prototype.destroy.call(this),this.audioBuffer=null,this.stopAndRemoveBufferSource(),this.muteNode.disconnect(),this.muteNode=null,this.volumeNode.disconnect(),this.volumeNode=null,this.pannerNode&&(this.pannerNode.disconnect(),this.pannerNode=null),this.rateUpdates.length=0,this.rateUpdates=null},calculateRate:function(){e.prototype.calculateRate.call(this);var s=this.manager.context.currentTime;this.source&&typeof this.totalRate=="number"&&this.source.playbackRate.setValueAtTime(this.totalRate,s),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,s)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var s=0,i=0;i<this.rateUpdates.length;i++){var n=0;i<this.rateUpdates.length-1?n=this.rateUpdates[i+1].time:n=this.manager.context.currentTime-this.playTime,s+=(n-this.rateUpdates[i].time)*this.rateUpdates[i].rate}return s},getLoopTime:function(){for(var s=0,i=0;i<this.rateUpdates.length-1;i++)s+=(this.rateUpdates[i+1].time-this.rateUpdates[i].time)*this.rateUpdates[i].rate;var n=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+n.time+(this.duration-s)/n.rate},rate:{get:function(){return this.currentConfig.rate},set:function(s){this.currentConfig.rate=s,this.calculateRate(),this.emit(o.RATE,this,s)}},setRate:function(s){return this.rate=s,this},detune:{get:function(){return this.currentConfig.detune},set:function(s){this.currentConfig.detune=s,this.calculateRate(),this.emit(o.DETUNE,this,s)}},setDetune:function(s){return this.detune=s,this},mute:{get:function(){return this.muteNode.gain.value===0},set:function(s){this.currentConfig.mute=s,this.muteNode.gain.setValueAtTime(s?0:1,0),this.emit(o.MUTE,this,s)}},setMute:function(s){return this.mute=s,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(s){this.currentConfig.volume=s,this.volumeNode.gain.setValueAtTime(s,0),this.emit(o.VOLUME,this,s)}},setVolume:function(s){return this.volume=s,this},seek:{get:function(){return this.isPlaying?this.manager.context.currentTime<this.startTime?this.startTime-this.playTime:this.getCurrentTime():this.isPaused?this.currentConfig.seek:0},set:function(s){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(s=Math.min(Math.max(0,s),this.duration),this.currentConfig.seek=s,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(o.SEEK,this,s))}},setSeek:function(s){return this.seek=s,this},loop:{get:function(){return this.currentConfig.loop},set:function(s){this.currentConfig.loop=s,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),s&&this.createAndStartLoopBufferSource()),this.emit(o.LOOP,this,s)}},setLoop:function(s){return this.loop=s,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(s){this.currentConfig.pan=s,this.pannerNode&&this.pannerNode.pan.setValueAtTime(s,this.manager.context.currentTime),this.emit(o.PAN,this,s)}},setPan:function(s){return this.pan=s,this}});c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){for(var u=e.length,o=e[0].length,a=new Array(o),s=0;s<o;s++){a[s]=new Array(u);for(var i=u-1;i>-1;i--)a[s][i]=e[i][s]}return a};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */function t(o,a,s){var i=o[a];o[a]=o[s],o[s]=i}function e(o,a){return o<a?-1:o>a?1:0}var u=function(o,a,s,i,n){for(s===void 0&&(s=0),i===void 0&&(i=o.length-1),n===void 0&&(n=e);i>s;){if(i-s>600){var l=i-s+1,r=a-s+1,h=Math.log(l),f=.5*Math.exp(2*h/3),v=.5*Math.sqrt(h*f*(l-f)/l)*(r-l/2<0?-1:1),d=Math.max(s,Math.floor(a-r*f/l+v)),p=Math.min(i,Math.floor(a+(l-r)*f/l+v));u(o,a,d,p,n)}var g=o[a],m=s,x=i;for(t(o,s,a),n(o[i],g)>0&&t(o,s,i);m<x;){for(t(o,m,x),m++,x--;n(o[m],g)<0;)m++;for(;n(o[x],g)>0;)x--}n(o[s],g)===0?t(o,s,x):(x++,t(o,x,i)),x<=a&&(s=x+1),a<=x&&(i=x-1)}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(6),u=t(131),o=function(s,i,n){for(var l=[],r=0;r<s.length;r++)for(var h=0;h<i.length;h++)for(var f=0;f<n;f++)l.push({a:s[r],b:i[h]});return l},a=function(s,i,n){var l=e(n,"max",0),r=e(n,"qty",1),h=e(n,"random",!1),f=e(n,"randomB",!1),v=e(n,"repeat",0),d=e(n,"yoyo",!1),p=[];if(f&&u(i),v===-1)if(l===0)v=0;else{var g=s.length*i.length*r;d&&(g*=2),v=Math.ceil(l/g)}for(var m=0;m<=v;m++){var x=o(s,i,r);h&&u(x),p=p.concat(x),d&&(x.reverse(),p=p.concat(x))}return l&&p.splice(l),p};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={PROCESS_QUEUE_ADD:t(1041),PROCESS_QUEUE_REMOVE:t(1042)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(13),u=function(o,a){var s=e(a,"anims",null);if(s===null)return o;if(typeof s=="string")o.anims.play(s);else if(typeof s=="object"){var i=o.anims,n=e(s,"key",void 0);if(n){var l=e(s,"startFrame",void 0),r=e(s,"delay",0),h=e(s,"repeat",0),f=e(s,"repeatDelay",0),v=e(s,"yoyo",!1),d=e(s,"play",!1),p=e(s,"delayedPlay",0),g={key:n,delay:r,repeat:h,repeatDelay:f,yoyo:v,startFrame:l};d?i.play(g):p>0?i.playAfterDelay(g,p):i.load(g)}}return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(109),o=new e({initialize:function(s,i,n,l,r){this.parent=s,this.x=i,this.y=n,this.frame=l,this.data={},this.tint=16777215,this._visible=r,this._alpha=1,this.flipX=!1,this.flipY=!1},setFrame:function(a){return a===void 0?this.frame=this.parent.frame:a instanceof u&&a.texture===this.parent.texture?this.frame=a:this.frame=this.parent.texture.get(a),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(a,s,i){return this.x=a,this.y=s,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(a,s){return this.x=a,this.y=s,this},setFlipX:function(a){return this.flipX=a,this},setFlipY:function(a){return this.flipY=a,this},setFlip:function(a,s){return this.flipX=a,this.flipY=s,this},setVisible:function(a){return this.visible=a,this},setAlpha:function(a){return this.alpha=a,this},setTint:function(a){return this.tint=a,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(a){this.parent.dirty|=this._visible!==a,this._visible=a}},alpha:{get:function(){return this._alpha},set:function(a){this.parent.dirty|=this._alpha>0!=a>0,this._alpha=a}}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=function(o,a,s){s===void 0&&(s=new e);var i=Math.min(o.x,a.x),n=Math.min(o.y,a.y),l=Math.max(o.right,a.right)-i,r=Math.max(o.bottom,a.bottom)-n;return s.setTo(i,n,l,r)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(1055),a=t(15),s=t(7),i=t(202),n=t(20),l=t(140),r=new e({Extends:a,Mixins:[u.AlphaSingle,u.BlendMode,u.Depth,u.Origin,u.ScrollFactor,u.Transform,u.Visible,o],initialize:function(f,v,d,p,g,m){a.call(this,f,"DOMElement"),this.parent=f.sys.game.domContainer,this.cache=f.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(v,d),typeof p=="string"?p[0]==="#"?this.setElement(p.substr(1),g,m):this.createElement(p,g,m):p&&this.setElement(p,g,m),f.sys.events.on(n.SLEEP,this.handleSceneEvent,this),f.sys.events.on(n.WAKE,this.handleSceneEvent,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},handleSceneEvent:function(h){var f=this.node,v=f.style;f&&(v.display=h.settings.visible?"block":"none")},setSkew:function(h,f){return h===void 0&&(h=0),f===void 0&&(f=h),this.skewX=h,this.skewY=f,this},setPerspective:function(h){return this.parent.style.perspective=h+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(h){this.parent.style.perspective=h+"px"}},addListener:function(h){if(this.node){h=h.split(" ");for(var f=0;f<h.length;f++)this.node.addEventListener(h[f],this.handler,!1)}return this},removeListener:function(h){if(this.node){h=h.split(" ");for(var f=0;f<h.length;f++)this.node.removeEventListener(h[f],this.handler)}return this},dispatchNativeEvent:function(h){this.emit(h.type,h)},createElement:function(h,f,v){return this.setElement(document.createElement(h),f,v)},setElement:function(h,f,v){this.removeElement();var d;if(typeof h=="string"?(h[0]==="#"&&(h=h.substr(1)),d=document.getElementById(h)):typeof h=="object"&&h.nodeType===1&&(d=h),!d)return this;if(this.node=d,f&&s(f))for(var p in f)d.style[p]=f[p];else typeof f=="string"&&(d.style=f);return d.style.zIndex="0",d.style.display="inline",d.style.position="absolute",d.phaser=this,this.parent&&this.parent.appendChild(d),v&&(d.innerText=v),this.updateSize()},createFromCache:function(h,f){var v=this.cache.get(h);return v&&this.createFromHTML(v,f),this},createFromHTML:function(h,f){f===void 0&&(f="div"),this.removeElement();var v=document.createElement(f);return this.node=v,v.style.zIndex="0",v.style.display="inline",v.style.position="absolute",v.phaser=this,this.parent&&this.parent.appendChild(v),v.innerHTML=h,this.updateSize()},removeElement:function(){return this.node&&(i(this.node),this.node=null),this},updateSize:function(){var h=this.node,f=h.getBoundingClientRect();return this.width=h.clientWidth,this.height=h.clientHeight,this.displayWidth=f.width||0,this.displayHeight=f.height||0,this},getChildByProperty:function(h,f){if(this.node){for(var v=this.node.querySelectorAll("*"),d=0;d<v.length;d++)if(v[d][h]===f)return v[d]}return null},getChildByID:function(h){return this.getChildByProperty("id",h)},getChildByName:function(h){return this.getChildByProperty("name",h)},setClassName:function(h){return this.node&&(this.node.className=h,this.updateSize()),this},setText:function(h){return this.node&&(this.node.innerText=h,this.updateSize()),this},setHTML:function(h){return this.node&&(this.node.innerHTML=h,this.updateSize()),this},preUpdate:function(){var h=this.parentContainer,f=this.node;f&&h&&!h.willRender()&&(f.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(n.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(n.WAKE,this.handleSceneEvent,this)}});c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1056),u=t(15),o=t(25),a=new o,s=new o,i=new o,n=function(l,r,h,f){if(!!r.node){var v=r.node.style,d=r.scene.sys.settings;if(!v||!d.visible||u.RENDER_MASK!==r.renderFlags||r.cameraFilter!==0&&r.cameraFilter&h.id||r.parentContainer&&!r.parentContainer.willRender()){v.display="none";return}var p=r.parentContainer,g=h.alpha*r.alpha;p&&(g*=p.alpha);var m=a,x=s,y=i,T=0,E=0,C="0%",A="0%";f?(T=r.width*r.scaleX*r.originX,E=r.height*r.scaleY*r.originY,x.applyITRS(r.x-T,r.y-E,r.rotation,r.scaleX,r.scaleY),m.copyFrom(h.matrix),m.multiplyWithOffset(f,-h.scrollX*r.scrollFactorX,-h.scrollY*r.scrollFactorY),x.e=r.x-T,x.f=r.y-E,m.multiply(x,y)):(T=r.width*r.originX,E=r.height*r.originY,x.applyITRS(r.x-T,r.y-E,r.rotation,r.scaleX,r.scaleY),m.copyFrom(h.matrix),C=100*r.originX+"%",A=100*r.originY+"%",x.e-=h.scrollX*r.scrollFactorX,x.f-=h.scrollY*r.scrollFactorY,m.multiply(x,y)),r.transformOnly||(v.display="block",v.opacity=g,v.zIndex=r._depth,v.pointerEvents=r.pointerEvents,v.mixBlendMode=e[r._blendMode]),v.transform=y.getCSSMatrix()+" skew("+r.skewX+"rad, "+r.skewY+"rad) rotate3d("+r.rotate3d.x+","+r.rotate3d.y+","+r.rotate3d.z+","+r.rotate3d.w+r.rotate3dAngle+")",v.transformOrigin=C+" "+A}};c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(15),a=t(1060),s=new e({Extends:o,Mixins:[u.Alpha,u.BlendMode,u.Depth,u.Flip,u.Origin,u.ScrollFactor,u.Size,u.Texture,u.Tint,u.Transform,u.Visible,a],initialize:function(n){o.call(this,n,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(218),u=t(98),o=t(14),a=t(4),s=function(i,n,l){l===void 0&&(l=new a);var r=u(n,0,o.PI2);return e(i,r,l)};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(447),u=t(218),o=t(98),a=t(14),s=function(i,n,l,r){r===void 0&&(r=[]),!n&&l>0&&(n=e(i)/l);for(var h=0;h<n;h++){var f=o(h/n,0,a.PI2);r.push(u(i,f))}return r};c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u=e.width/2,o=e.height/2,a=Math.pow(u-o,2)/Math.pow(u+o,2);return Math.PI*(u+o)*(1+3*a/(10+Math.sqrt(4-3*a)))};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(217),u=t(30),o=function(a,s,i,n,l,r){var h=s.commandBuffer,f=h.length,v=l||a.currentContext;if(!(f===0||!u(a,v,s,i,n))){i.addToRenderList(s);var d=1,p=1,g=0,m=0,x=1,y=0,T=0,E=0;v.beginPath();for(var C=0;C<f;++C){var A=h[C];switch(A){case e.ARC:v.arc(h[C+1],h[C+2],h[C+3],h[C+4],h[C+5],h[C+6]),C+=7;break;case e.LINE_STYLE:x=h[C+1],g=h[C+2],d=h[C+3],y=(g&16711680)>>>16,T=(g&65280)>>>8,E=g&255,v.strokeStyle="rgba("+y+","+T+","+E+","+d+")",v.lineWidth=x,C+=3;break;case e.FILL_STYLE:m=h[C+1],p=h[C+2],y=(m&16711680)>>>16,T=(m&65280)>>>8,E=m&255,v.fillStyle="rgba("+y+","+T+","+E+","+p+")",C+=2;break;case e.BEGIN_PATH:v.beginPath();break;case e.CLOSE_PATH:v.closePath();break;case e.FILL_PATH:r||v.fill();break;case e.STROKE_PATH:r||v.stroke();break;case e.FILL_RECT:r?v.rect(h[C+1],h[C+2],h[C+3],h[C+4]):v.fillRect(h[C+1],h[C+2],h[C+3],h[C+4]),C+=4;break;case e.FILL_TRIANGLE:v.beginPath(),v.moveTo(h[C+1],h[C+2]),v.lineTo(h[C+3],h[C+4]),v.lineTo(h[C+5],h[C+6]),v.closePath(),r||v.fill(),C+=6;break;case e.STROKE_TRIANGLE:v.beginPath(),v.moveTo(h[C+1],h[C+2]),v.lineTo(h[C+3],h[C+4]),v.lineTo(h[C+5],h[C+6]),v.closePath(),r||v.stroke(),C+=6;break;case e.LINE_TO:v.lineTo(h[C+1],h[C+2]),C+=2;break;case e.MOVE_TO:v.moveTo(h[C+1],h[C+2]),C+=2;break;case e.LINE_FX_TO:v.lineTo(h[C+1],h[C+2]),C+=5;break;case e.MOVE_FX_TO:v.moveTo(h[C+1],h[C+2]),C+=5;break;case e.SAVE:v.save();break;case e.RESTORE:v.restore();break;case e.TRANSLATE:v.translate(h[C+1],h[C+2]),C+=2;break;case e.SCALE:v.scale(h[C+1],h[C+2]),C+=2;break;case e.ROTATE:v.rotate(h[C+1]),C+=1;break;case e.GRADIENT_FILL_STYLE:C+=5;break;case e.GRADIENT_LINE_STYLE:C+=6;break}}v.restore()}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(137),o=t(80),a=t(2),s=t(68),i=new e({initialize:function(l,r,h,f){f===void 0&&(f=!1),this.propertyKey=r,this.propertyValue=h,this.defaultValue=h,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=f,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(l)},loadConfig:function(n,l){n===void 0&&(n={}),l&&(this.propertyKey=l),this.propertyValue=a(n,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(n){return this.propertyValue=n,this.setMethods()},setMethods:function(){var n=this.propertyValue,l=typeof n;if(this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,l==="number")this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(n))this.onEmit=this.randomStaticValueEmit;else if(l==="function")this.emitOnly?this.onEmit=n:this.onUpdate=n;else if(l==="object"&&this.hasBoth(n,"start","end")){this.start=n.start,this.end=n.end;var r=this.has(n,"random");if(r&&(this.onEmit=this.randomRangedValueEmit),this.has(n,"steps"))this.steps=n.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var h=this.has(n,"ease")?n.ease:"Linear";this.ease=o(h,n.easeParams),r||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else if(l==="object"&&this.hasBoth(n,"min","max"))this.start=n.min,this.end=n.max,this.onEmit=this.randomRangedValueEmit;else if(l==="object"&&this.has(n,"random")){var f=n.random;Array.isArray(f)&&(this.start=f[0],this.end=f[1]),this.onEmit=this.randomRangedValueEmit}else l==="object"&&this.hasEither(n,"onEmit","onUpdate")&&(this.has(n,"onEmit")&&(this.onEmit=n.onEmit),this.has(n,"onUpdate")&&(this.onUpdate=n.onUpdate));return this},has:function(n,l){return n.hasOwnProperty(l)},hasBoth:function(n,l,r){return n.hasOwnProperty(l)&&n.hasOwnProperty(r)},hasEither:function(n,l,r){return n.hasOwnProperty(l)||n.hasOwnProperty(r)},defaultEmit:function(n,l,r){return r},defaultUpdate:function(n,l,r,h){return h},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var n=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[n]},randomRangedValueEmit:function(n,l){var r=u(this.start,this.end);return n&&n.data[l]&&(n.data[l].min=r),r},steppedEmit:function(){var n=this.counter,l=this.counter+(this.end-this.start)/this.steps;return this.counter=s(l,this.start,this.end),n},easedValueEmit:function(n,l){if(n&&n.data[l]){var r=n.data[l];r.min=this.start,r.max=this.end}return this.start},easeValueUpdate:function(n,l,r){var h=n.data[l];return(h.max-h.min)*this.ease(r)+h.min}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(2),o=new e({initialize:function(s,i,n,l,r){if(typeof s=="object"){var h=s;s=u(h,"x",0),i=u(h,"y",0),n=u(h,"power",0),l=u(h,"epsilon",100),r=u(h,"gravity",50)}else s===void 0&&(s=0),i===void 0&&(i=0),n===void 0&&(n=0),l===void 0&&(l=100),r===void 0&&(r=50);this.x=s,this.y=i,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=n,this.epsilon=l},update:function(a,s){var i=this.x-a.x,n=this.y-a.y,l=i*i+n*n;if(l!==0){var r=Math.sqrt(l);l<this._epsilon&&(l=this._epsilon);var h=this._power*s/(l*r)*100;a.velocityX+=i*h,a.velocityY+=n*h}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(a){this._epsilon=a*a}},power:{get:function(){return this._power/this._gravity},set:function(a){this._power=a*this._gravity}},gravity:{get:function(){return this._gravity},set:function(a){var s=this.power;this._gravity=a,this.power=s}}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(36),o=t(50),a=new e({initialize:function(i){this.emitter=i,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},resetPosition:function(){this.x=0,this.y=0},fire:function(s,i){var n=this.emitter;this.frame=n.getFrame(),n.emitZone&&n.emitZone.getPoint(this),s===void 0?this.x+=n.x.onEmit(this,"x"):this.x+=s,i===void 0?this.y+=n.y.onEmit(this,"y"):this.y+=i,this.life=n.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var l=n.speedX.onEmit(this,"speedX"),r=n.speedY?n.speedY.onEmit(this,"speedY"):l;if(n.radial){var h=u(n.angle.onEmit(this,"angle"));this.velocityX=Math.cos(h)*Math.abs(l),this.velocityY=Math.sin(h)*Math.abs(r)}else if(n.moveTo){var f=n.moveToX.onEmit(this,"moveToX"),v=n.moveToY?n.moveToY.onEmit(this,"moveToY"):f,d=Math.atan2(v-this.y,f-this.x),p=o(this.x,this.y,f,v)/(this.life/1e3);this.velocityX=Math.cos(d)*p,this.velocityY=Math.sin(d)*p}else this.velocityX=l,this.velocityY=r;n.acceleration&&(this.accelerationX=n.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=n.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=n.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=n.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=n.delay.onEmit(this,"delay"),this.scaleX=n.scaleX.onEmit(this,"scaleX"),this.scaleY=n.scaleY?n.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=n.rotate.onEmit(this,"rotate"),this.rotation=u(this.angle),this.bounce=n.bounce.onEmit(this,"bounce"),this.alpha=n.alpha.onEmit(this,"alpha"),this.tint=n.tint.onEmit(this,"tint")},computeVelocity:function(s,i,n,l){var r=this.velocityX,h=this.velocityY,f=this.accelerationX,v=this.accelerationY,d=this.maxVelocityX,p=this.maxVelocityY;r+=s.gravityX*n,h+=s.gravityY*n,f&&(r+=f*n),v&&(h+=v*n),r>d?r=d:r<-d&&(r=-d),h>p?h=p:h<-p&&(h=-p),this.velocityX=r,this.velocityY=h;for(var g=0;g<l.length;g++)l[g].update(this,i,n)},checkBounds:function(s){var i=s.bounds,n=-this.bounce;this.x<i.x&&s.collideLeft?(this.x=i.x,this.velocityX*=n):this.x>i.right&&s.collideRight&&(this.x=i.right,this.velocityX*=n),this.y<i.y&&s.collideTop?(this.y=i.y,this.velocityY*=n):this.y>i.bottom&&s.collideBottom&&(this.y=i.bottom,this.velocityY*=n)},update:function(s,i,n){if(this.delayCurrent>0)return this.delayCurrent-=s,!1;var l=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(l,s,i,n),this.x+=this.velocityX*i,this.y+=this.velocityY*i,l.bounds&&this.checkBounds(l),l.deathZone&&l.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=l.scaleX.onUpdate(this,"scaleX",r,this.scaleX),l.scaleY?this.scaleY=l.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=l.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=u(this.angle),this.alpha=l.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=l.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=s,this.lifeCurrent<=0)}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(35),u=t(0),o=t(11),a=t(453),s=t(454),i=t(449),n=t(2),l=t(210),r=t(455),h=t(126),f=t(451),v=t(456),d=t(10),p=t(79),g=t(3),m=t(68),x=new u({Mixins:[o.BlendMode,o.Mask,o.ScrollFactor,o.Visible],initialize:function(T,E){this.manager=T,this.texture=T.texture,this.frames=[T.defaultFrame],this.defaultFrame=T.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new i(E,"x",0,!0),this.y=new i(E,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new i(E,"accelerationX",0,!0),this.accelerationY=new i(E,"accelerationY",0,!0),this.maxVelocityX=new i(E,"maxVelocityX",1e4,!0),this.maxVelocityY=new i(E,"maxVelocityY",1e4,!0),this.speedX=new i(E,"speedX",0,!0),this.speedY=new i(E,"speedY",0,!0),this.moveTo=!1,this.moveToX=new i(E,"moveToX",0,!0),this.moveToY=new i(E,"moveToY",0,!0),this.bounce=new i(E,"bounce",0,!0),this.scaleX=new i(E,"scaleX",1),this.scaleY=new i(E,"scaleY",1),this.tint=new i(E,"tint",16777215),this.alpha=new i(E,"alpha",1),this.lifespan=new i(E,"lifespan",1e3,!0),this.angle=new i(E,"angle",{min:0,max:360},!0),this.rotate=new i(E,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new i(E,"quantity",1,!0),this.delay=new i(E,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=e.NORMAL,this.follow=null,this.followOffset=new g,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,E&&this.fromJSON(E)},fromJSON:function(y){if(!y)return this;var T=0,E="";for(T=0;T<this.configFastMap.length;T++)E=this.configFastMap[T],h(y,E)&&(this[E]=n(y,E));for(T=0;T<this.configOpMap.length;T++)E=this.configOpMap[T],h(y,E)&&this[E].loadConfig(y);if(this.acceleration=this.accelerationX.propertyValue!==0||this.accelerationY.propertyValue!==0,this.moveTo=this.moveToX.propertyValue!==0||this.moveToY.propertyValue!==0,h(y,"speed")&&(this.speedX.loadConfig(y,"speed"),this.speedY=null),(r(y,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),h(y,"scale")&&(this.scaleX.loadConfig(y,"scale"),this.scaleY=null),h(y,"callbackScope")){var C=n(y,"callbackScope",null);this.emitCallbackScope=C,this.deathCallbackScope=C}return h(y,"emitZone")&&this.setEmitZone(y.emitZone),h(y,"deathZone")&&this.setDeathZone(y.deathZone),h(y,"bounds")&&this.setBounds(y.bounds),h(y,"followOffset")&&this.followOffset.setFromObject(n(y,"followOffset",0)),h(y,"frame")&&this.setFrame(y.frame),h(y,"reserve")&&this.reserve(y.reserve),this},toJSON:function(y){y===void 0&&(y={});var T=0,E="";for(T=0;T<this.configFastMap.length;T++)E=this.configFastMap[T],y[E]=this[E];for(T=0;T<this.configOpMap.length;T++)E=this.configOpMap[T],this[E]&&(y[E]=this[E].toJSON());return this.speedY||(delete y.speedX,y.speed=this.speedX.toJSON()),this.scaleY||(delete y.scaleX,y.scale=this.scaleX.toJSON()),y},startFollow:function(y,T,E,C){return T===void 0&&(T=0),E===void 0&&(E=0),C===void 0&&(C=!1),this.follow=y,this.followOffset.set(T,E),this.trackVisible=C,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){if(this.frames.length===1)return this.defaultFrame;if(this.randomFrame)return l(this.frames);var y=this.frames[this.currentFrame];return this._frameCounter++,this._frameCounter===this.frameQuantity&&(this._frameCounter=0,this.currentFrame=m(this.currentFrame+1,0,this._frameLength)),y},setFrame:function(y,T,E){T===void 0&&(T=!0),E===void 0&&(E=1),this.randomFrame=T,this.frameQuantity=E,this.currentFrame=0,this._frameCounter=0;var C=typeof y;if(Array.isArray(y)||C==="string"||C==="number")this.manager.setEmitterFrames(y,this);else if(C==="object"){var A=y;y=n(A,"frames",null),y&&this.manager.setEmitterFrames(y,this);var P=n(A,"cycle",!1);this.randomFrame=!P,this.frameQuantity=n(A,"quantity",E)}return this._frameLength=this.frames.length,this._frameLength===1&&(this.frameQuantity=1,this.randomFrame=!1),this},setRadial:function(y){return y===void 0&&(y=!0),this.radial=y,this},setPosition:function(y,T){return this.x.onChange(y),this.y.onChange(T),this},setBounds:function(y,T,E,C){if(typeof y=="object"){var A=y;y=A.x,T=A.y,E=h(A,"w")?A.w:A.width,C=h(A,"h")?A.h:A.height}return this.bounds?this.bounds.setTo(y,T,E,C):this.bounds=new d(y,T,E,C),this},setSpeedX:function(y){return this.speedX.onChange(y),this.radial=!1,this},setSpeedY:function(y){return this.speedY&&(this.speedY.onChange(y),this.radial=!1),this},setSpeed:function(y){return this.speedX.onChange(y),this.speedY=null,this.radial=!0,this},setScaleX:function(y){return this.scaleX.onChange(y),this},setScaleY:function(y){return this.scaleY.onChange(y),this},setScale:function(y){return this.scaleX.onChange(y),this.scaleY=null,this},setGravityX:function(y){return this.gravityX=y,this},setGravityY:function(y){return this.gravityY=y,this},setGravity:function(y,T){return this.gravityX=y,this.gravityY=T,this},setAlpha:function(y){return this.alpha.onChange(y),this},setTint:function(y){return this.tint.onChange(y),this},setEmitterAngle:function(y){return this.angle.onChange(y),this},setAngle:function(y){return this.angle.onChange(y),this},setLifespan:function(y){return this.lifespan.onChange(y),this},setQuantity:function(y){return this.quantity.onChange(y),this},setFrequency:function(y,T){return this.frequency=y,this._counter=0,T&&this.quantity.onChange(T),this},setEmitZone:function(y){if(y===void 0)this.emitZone=null;else{var T=n(y,"type","random"),E=n(y,"source",null);switch(T){case"random":this.emitZone=new v(E);break;case"edge":var C=n(y,"quantity",1),A=n(y,"stepRate",0),P=n(y,"yoyo",!1),M=n(y,"seamless",!0);this.emitZone=new s(E,C,A,P,M);break}}return this},setDeathZone:function(y){if(y===void 0)this.deathZone=null;else{var T=n(y,"type","onEnter"),E=n(y,"source",null);if(E&&typeof E.contains=="function"){var C=T==="onEnter";this.deathZone=new a(E,C)}}return this},reserve:function(y){for(var T=this.dead,E=0;E<y;E++)T.push(new this.particleClass(this));return this},getAliveParticleCount:function(){return this.alive.length},getDeadParticleCount:function(){return this.dead.length},getParticleCount:function(){return this.getAliveParticleCount()+this.getDeadParticleCount()},atLimit:function(){return this.maxParticles>0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(y,T){return y===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof y=="function"&&(this.emitCallback=y,T&&(this.emitCallbackScope=T)),this},onParticleDeath:function(y,T){return y===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof y=="function"&&(this.deathCallback=y,T&&(this.deathCallbackScope=T)),this},killAll:function(){for(var y=this.dead,T=this.alive;T.length>0;)y.push(T.pop());return this},forEachAlive:function(y,T){for(var E=this.alive,C=E.length,A=0;A<C;++A)y.call(T,E[A],this);return this},forEachDead:function(y,T){for(var E=this.dead,C=E.length,A=0;A<C;++A)y.call(T,E[A],this);return this},start:function(){return this.on=!0,this._counter=0,this},stop:function(){return this.on=!1,this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},remove:function(){return this.manager.removeEmitter(this),this},depthSort:function(){return p(this.alive,this.depthSortCallback),this},flow:function(y,T){return T===void 0&&(T=1),this.frequency=y,this.quantity.onChange(T),this.start()},explode:function(y,T,E){return this.frequency=-1,this.emitParticle(y,T,E)},emitParticleAt:function(y,T,E){return this.emitParticle(E,y,T)},emitParticle:function(y,T,E){if(!this.atLimit()){y===void 0&&(y=this.quantity.onEmit());for(var C=this.dead,A=this.follow?this.follow.x+this.followOffset.x:T,P=this.follow?this.follow.y+this.followOffset.y:E,M=0;M<y;M++){var O=C.pop();if(O||(O=new this.particleClass(this)),O.fire(A,P),this.particleBringToTop?this.alive.push(O):this.alive.unshift(O),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,O,this),this.atLimit())break}return O}},preUpdate:function(y,T){T*=this.timeScale;var E=T/1e3;this.trackVisible&&(this.visible=this.follow.visible);var C=this.manager.getProcessors(),A=this.alive,P=this.dead,M=0,O=[],I=A.length;for(M=0;M<I;M++){var N=A[M];N.update(T,E,C)&&O.push({index:M,particle:N})}if(I=O.length,I>0){var Y=this.deathCallback,X=this.deathCallbackScope;for(M=I-1;M>=0;M--){var W=O[M];A.splice(W.index,1),P.push(W.particle),Y&&Y.call(X,W.particle),W.particle.resetPosition()}}!this.on||(this.frequency===0?this.emitParticle():this.frequency>0&&(this._counter-=T,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(y,T){return y.y-T.y}});c.exports=x},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s){this.source=a,this.killOnEnter=s},willKill:function(o){var a=this.source.contains(o.x,o.y);return a&&this.killOnEnter||!a&&!this.killOnEnter}});c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s,i,n,l){n===void 0&&(n=!1),l===void 0&&(l=!0),this.source=a,this.points=[],this.quantity=s,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=l,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var o=this.points[0],a=this.points[this.points.length-1];o.x===a.x&&o.y===a.y&&this.points.pop()}var s=this._length;return this._length=this.points.length,this._length<s&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(o){return this.source=o,this.updateSource()},getPoint:function(o){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var a=this.points[this.counter];a&&(o.x=a.x,o.y=a.y)}});c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){for(var o=0;o<u.length;o++)if(e.hasOwnProperty(u[o]))return!0;return!1};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(3),o=new e({initialize:function(s){this.source=s,this._tempVec=new u},getPoint:function(a){var s=this._tempVec;this.source.getRandomPoint(s),a.x=s.x,a.y=s.y}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(73),a=new e({Extends:o,Mixins:[u.PathFollower],initialize:function(i,n,l,r,h,f){o.call(this,i,l,r,h,f),this.path=n},preUpdate:function(s,i){this.anims.update(s,i),this.pathUpdate(s)}});c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=e.canvas,s=e.context,i=e.style,n=[],l=0,r=o.length;i.maxLines>0&&i.maxLines<o.length&&(r=i.maxLines),i.syncFont(a,s);for(var h=0;h<r;h++){var f=i.strokeThickness;f+=s.measureText(o[h]).width,i.wordWrap&&(f-=s.measureText(" ").width),n[h]=Math.ceil(f),l=Math.max(l,n[h])}var v=u.fontSize+i.strokeThickness,d=v*r,p=e.lineSpacing;return r>1&&(d+=p*(r-1)),{width:l,height:d,lines:r,lineWidths:n,lineSpacing:p,lineHeight:v}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(13),o=t(6),a=t(460),s={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|M\xC3\u2030qgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},i=new e({initialize:function(l,r){this.parent=l,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(r,!1,!0);var h=o(r,"metrics",!1);h?this.metrics={ascent:o(h,"ascent",0),descent:o(h,"descent",0),fontSize:o(h,"fontSize",0)}:this.metrics=a(this)},setStyle:function(n,l,r){l===void 0&&(l=!0),r===void 0&&(r=!1),n&&n.hasOwnProperty("fontSize")&&typeof n.fontSize=="number"&&(n.fontSize=n.fontSize.toString()+"px");for(var h in s){var f=r?s[h][1]:this[h];h==="wordWrapCallback"||h==="wordWrapCallbackScope"?this[h]=o(n,s[h][0],f):this[h]=u(n,s[h][0],f)}var v=o(n,"font",null);v!==null&&this.setFont(v,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var d=o(n,"fill",null);return d!==null&&(this.color=d),l?this.update(!0):this.parent},syncFont:function(n,l){l.font=this._font},syncStyle:function(n,l){l.textBaseline="alphabetic",l.fillStyle=this.color,l.strokeStyle=this.stroke,l.lineWidth=this.strokeThickness,l.lineCap="round",l.lineJoin="round"},syncShadow:function(n,l){l?(n.shadowOffsetX=this.shadowOffsetX,n.shadowOffsetY=this.shadowOffsetY,n.shadowColor=this.shadowColor,n.shadowBlur=this.shadowBlur):(n.shadowOffsetX=0,n.shadowOffsetY=0,n.shadowColor=0,n.shadowBlur=0)},update:function(n){return n&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=a(this)),this.parent.updateText()},setFont:function(n,l){l===void 0&&(l=!0);var r=n,h="",f="";if(typeof n!="string")r=o(n,"fontFamily","Courier"),h=o(n,"fontSize","16px"),f=o(n,"fontStyle","");else{var v=n.split(" "),d=0;f=v.length>2?v[d++]:"",h=v[d++]||"16px",r=v[d++]||"Courier"}return(r!==this.fontFamily||h!==this.fontSize||f!==this.fontStyle)&&(this.fontFamily=r,this.fontSize=h,this.fontStyle=f,l&&this.update(!0)),this.parent},setFontFamily:function(n){return this.fontFamily!==n&&(this.fontFamily=n,this.update(!0)),this.parent},setFontStyle:function(n){return this.fontStyle!==n&&(this.fontStyle=n,this.update(!0)),this.parent},setFontSize:function(n){return typeof n=="number"&&(n=n.toString()+"px"),this.fontSize!==n&&(this.fontSize=n,this.update(!0)),this.parent},setTestString:function(n){return this.testString=n,this.update(!0)},setFixedSize:function(n,l){return this.fixedWidth=n,this.fixedHeight=l,n&&(this.parent.width=n),l&&(this.parent.height=l),this.update(!1)},setBackgroundColor:function(n){return this.backgroundColor=n,this.update(!1)},setFill:function(n){return this.color=n,this.update(!1)},setColor:function(n){return this.color=n,this.update(!1)},setResolution:function(n){return this.resolution=n,this.update(!1)},setStroke:function(n,l){return l===void 0&&(l=this.strokeThickness),n===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==n||this.strokeThickness!==l)&&(this.stroke=n,this.strokeThickness=l,this.update(!0)),this.parent},setShadow:function(n,l,r,h,f,v){return n===void 0&&(n=0),l===void 0&&(l=0),r===void 0&&(r="#000"),h===void 0&&(h=0),f===void 0&&(f=!1),v===void 0&&(v=!0),this.shadowOffsetX=n,this.shadowOffsetY=l,this.shadowColor=r,this.shadowBlur=h,this.shadowStroke=f,this.shadowFill=v,this.update(!1)},setShadowOffset:function(n,l){return n===void 0&&(n=0),l===void 0&&(l=n),this.shadowOffsetX=n,this.shadowOffsetY=l,this.update(!1)},setShadowColor:function(n){return n===void 0&&(n="#000"),this.shadowColor=n,this.update(!1)},setShadowBlur:function(n){return n===void 0&&(n=0),this.shadowBlur=n,this.update(!1)},setShadowStroke:function(n){return this.shadowStroke=n,this.update(!1)},setShadowFill:function(n){return this.shadowFill=n,this.update(!1)},setWordWrapWidth:function(n,l){return l===void 0&&(l=!1),this.wordWrapWidth=n,this.wordWrapUseAdvanced=l,this.update(!1)},setWordWrapCallback:function(n,l){return l===void 0&&(l=null),this.wordWrapCallback=n,this.wordWrapCallbackScope=l,this.update(!1)},setAlign:function(n){return n===void 0&&(n="left"),this.align=n,this.update(!1)},setMaxLines:function(n){return n===void 0&&(n=0),this.maxLines=n,this.update(!1)},getTextMetrics:function(){var n=this.metrics;return{ascent:n.ascent,descent:n.descent,fontSize:n.fontSize}},toJSON:function(){var n={};for(var l in s)n[l]=this[l];return n.metrics=this.getTextMetrics(),n},destroy:function(){this.parent=void 0}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(31),u=function(o){var a=e.create(this),s=a.getContext("2d");o.syncFont(a,s);var i=s.measureText(o.testString);if("actualBoundingBoxAscent"in i){var n=i.actualBoundingBoxAscent,l=i.actualBoundingBoxDescent;return e.remove(a),{ascent:n,descent:l,fontSize:n+l}}var r=Math.ceil(i.width*o.baselineX),h=r,f=2*h;h=h*o.baselineY|0,a.width=r,a.height=f,s.fillStyle="#f00",s.fillRect(0,0,r,f),s.font=o._font,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o.testString,0,h);var v={ascent:0,descent:0,fontSize:0},d=s.getImageData(0,0,r,f);if(!d)return v.ascent=h,v.descent=h+6,v.fontSize=v.ascent+v.descent,e.remove(a),v;var p=d.data,g=p.length,m=r*4,x,y,T=0,E=!1;for(x=0;x<h;x++){for(y=0;y<m;y+=4)if(p[T+y]!==255){E=!0;break}if(!E)T+=m;else break}for(v.ascent=h-x,T=g-m,E=!1,x=f;x>h;x--){for(y=0;y<m;y+=4)if(p[T+y]!==255){E=!0;break}if(!E)T-=m;else break}return v.descent=x-h,v.fontSize=v.ascent+v.descent,e.remove(a),v};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1097),u=t(0),o=t(36),a=t(59),s=t(65),i=t(14),n=t(34),l=new u({Extends:n,Mixins:[e],initialize:function(h,f,v,d,p,g,m,x,y){f===void 0&&(f=0),v===void 0&&(v=0),d===void 0&&(d=128),p===void 0&&(p=0),g===void 0&&(g=360),m===void 0&&(m=!1),n.call(this,h,"Arc",new s(0,0,d)),this._startAngle=p,this._endAngle=g,this._anticlockwise=m,this._iterations=.01,this.setPosition(f,v);var T=this.geom.radius*2;this.setSize(T,T),x!==void 0&&this.setFillStyle(x,y),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(r){this._iterations=r,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(r){this.geom.radius=r;var h=r*2;this.setSize(h,h),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(r){this._startAngle=r,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(r){this._endAngle=r,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(r){this._anticlockwise=r,this.updateData()}},setRadius:function(r){return this.radius=r,this},setIterations:function(r){return r===void 0&&(r=.01),this.iterations=r,this},setStartAngle:function(r,h){return this._startAngle=r,h!==void 0&&(this._anticlockwise=h),this.updateData()},setEndAngle:function(r,h){return this._endAngle=r,h!==void 0&&(this._anticlockwise=h),this.updateData()},updateData:function(){var r=this._iterations,h=r,f=this.geom.radius,v=o(this._startAngle),d=o(this._endAngle),p=this._anticlockwise,g=f,m=f;d-=v,p?d<-i.PI2?d=-i.PI2:d>0&&(d=-i.PI2+d%i.PI2):d>i.PI2?d=i.PI2:d<0&&(d=i.PI2+d%i.PI2);for(var x=[g+Math.cos(v)*f,m+Math.sin(v)*f],y;h<1;)y=d*h+v,x.push(g+Math.cos(y)*f,m+Math.sin(y)*f),h+=r;return y=d+v,x.push(g+Math.cos(y)*f,m+Math.sin(y)*f),x.push(g+Math.cos(v)*f,m+Math.sin(v)*f),this.pathIndexes=a(x),this.pathData=x,this}});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(1100),o=t(59),a=t(10),s=t(34),i=new e({Extends:s,Mixins:[u],initialize:function(l,r,h,f,v,d){r===void 0&&(r=0),h===void 0&&(h=0),s.call(this,l,"Curve",f),this._smoothness=32,this._curveBounds=new a,this.closePath=!1,this.setPosition(r,h),v!==void 0&&this.setFillStyle(v,d),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(n){this._smoothness=n,this.updateData()}},setSmoothness:function(n){return this._smoothness=n,this.updateData()},updateData:function(){var n=this._curveBounds,l=this._smoothness;this.geom.getBounds(n,l),this.setSize(n.width,n.height),this.updateDisplayOrigin();for(var r=[],h=this.geom.getPoints(l),f=0;f<h.length;f++)r.push(h[f].x,h[f].y);return r.push(h[0].x,h[0].y),this.pathIndexes=o(r),this.pathData=r,this}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(59),o=t(1103),a=t(111),s=t(34),i=new e({Extends:s,Mixins:[o],initialize:function(l,r,h,f,v,d,p){r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=128),v===void 0&&(v=128),s.call(this,l,"Ellipse",new a(f/2,v/2,f,v)),this._smoothness=64,this.setPosition(r,h),this.width=f,this.height=v,d!==void 0&&this.setFillStyle(d,p),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(n){this._smoothness=n,this.updateData()}},setSize:function(n,l){return this.width=n,this.height=l,this.geom.setPosition(n/2,l/2),this.geom.setSize(n,l),this.updateData()},setSmoothness:function(n){return this._smoothness=n,this.updateData()},updateData:function(){for(var n=[],l=this.geom.getPoints(this._smoothness),r=0;r<l.length;r++)n.push(l[r].x,l[r].y);return n.push(l[0].x,l[0].y),this.pathIndexes=u(n),this.pathData=n,this}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(34),o=t(1106),a=new e({Extends:u,Mixins:[o],initialize:function(i,n,l,r,h,f,v,d,p,g,m){n===void 0&&(n=0),l===void 0&&(l=0),r===void 0&&(r=128),h===void 0&&(h=128),f===void 0&&(f=32),v===void 0&&(v=32),u.call(this,i,"Grid",null),this.cellWidth=f,this.cellHeight=v,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(n,l),this.setSize(r,h),this.setFillStyle(d,p),g!==void 0&&this.setOutlineStyle(g,m),this.updateDisplayOrigin()},setFillStyle:function(s,i){return i===void 0&&(i=1),s===void 0?this.showCells=!1:(this.fillColor=s,this.fillAlpha=i,this.showCells=!0),this},setAltFillStyle:function(s,i){return i===void 0&&(i=1),s===void 0?this.showAltCells=!1:(this.altFillColor=s,this.altFillAlpha=i,this.showAltCells=!0),this},setOutlineStyle:function(s,i){return i===void 0&&(i=1),s===void 0?this.showOutline=!1:(this.outlineFillColor=s,this.outlineFillAlpha=i,this.showOutline=!0),this}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1109),u=t(0),o=t(34),a=new u({Extends:o,Mixins:[e],initialize:function(i,n,l,r,h,f,v,d){n===void 0&&(n=0),l===void 0&&(l=0),r===void 0&&(r=48),h===void 0&&(h=32),f===void 0&&(f=15658734),v===void 0&&(v=10066329),d===void 0&&(d=13421772),o.call(this,i,"IsoBox",null),this.projection=4,this.fillTop=f,this.fillLeft=v,this.fillRight=d,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(n,l),this.setSize(r,h),this.updateDisplayOrigin()},setProjection:function(s){return this.projection=s,this},setFaces:function(s,i,n){return s===void 0&&(s=!0),i===void 0&&(i=!0),n===void 0&&(n=!0),this.showTop=s,this.showLeft=i,this.showRight=n,this},setFillStyle:function(s,i,n){return this.fillTop=s,this.fillLeft=i,this.fillRight=n,this.isFilled=!0,this}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(1112),o=t(34),a=new e({Extends:o,Mixins:[u],initialize:function(i,n,l,r,h,f,v,d,p){n===void 0&&(n=0),l===void 0&&(l=0),r===void 0&&(r=48),h===void 0&&(h=32),f===void 0&&(f=!1),v===void 0&&(v=15658734),d===void 0&&(d=10066329),p===void 0&&(p=13421772),o.call(this,i,"IsoTriangle",null),this.projection=4,this.fillTop=v,this.fillLeft=d,this.fillRight=p,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=f,this.isFilled=!0,this.setPosition(n,l),this.setSize(r,h),this.updateDisplayOrigin()},setProjection:function(s){return this.projection=s,this},setReversed:function(s){return this.isReversed=s,this},setFaces:function(s,i,n){return s===void 0&&(s=!0),i===void 0&&(i=!0),n===void 0&&(n=!0),this.showTop=s,this.showLeft=i,this.showRight=n,this},setFillStyle:function(s,i,n){return this.fillTop=s,this.fillLeft=i,this.fillRight=n,this.isFilled=!0,this}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(34),o=t(47),a=t(1115),s=new e({Extends:u,Mixins:[a],initialize:function(n,l,r,h,f,v,d,p,g){l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=128),d===void 0&&(d=0),u.call(this,n,"Line",new o(h,f,v,d));var m=Math.max(1,this.geom.right-this.geom.left),x=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(l,r),this.setSize(m,x),p!==void 0&&this.setStrokeStyle(1,p,g),this.updateDisplayOrigin()},setLineWidth:function(i,n){return n===void 0&&(n=i),this._startWidth=i,this._endWidth=n,this.lineWidth=i,this},setTo:function(i,n,l,r){return this.geom.setTo(i,n,l,r),this}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1118),u=t(0),o=t(59),a=t(469),s=t(227),i=t(34),n=t(472),l=new u({Extends:i,Mixins:[e],initialize:function(h,f,v,d,p,g){f===void 0&&(f=0),v===void 0&&(v=0),i.call(this,h,"Polygon",new s(d));var m=a(this.geom);this.setPosition(f,v),this.setSize(m.width,m.height),p!==void 0&&this.setFillStyle(p,g),this.updateDisplayOrigin(),this.updateData()},smooth:function(r){r===void 0&&(r=1);for(var h=0;h<r;h++)n(this.geom);return this.updateData()},updateData:function(){for(var r=[],h=this.geom.points,f=0;f<h.length;f++)r.push(h[f].x,h[f].y);return r.push(h[0].x,h[0].y),this.pathIndexes=o(r),this.pathData=r,this}});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=function(o,a){a===void 0&&(a=new e);for(var s=1/0,i=1/0,n=-s,l=-i,r,h=0;h<o.points.length;h++)r=o.points[h],s=Math.min(s,r.x),i=Math.min(i,r.y),n=Math.max(n,r.x),l=Math.max(l,r.y);return a.x=s,a.y=i,a.width=n-s,a.height=l-i,a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(67),u=t(47),o=t(471),a=function(s,i,n,l){l===void 0&&(l=[]);var r=s.points,h=o(s);!i&&n>0&&(i=h/n);for(var f=0;f<i;f++)for(var v=h*(f/i),d=0,p=0;p<r.length;p++){var g=r[p],m=r[(p+1)%r.length],x=new u(g.x,g.y,m.x,m.y),y=e(x);if(v<d||v>d+y){d+=y;continue}var T=x.getPoint((v-d)/y);l.push(T);break}return l};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(67),u=t(47),o=function(a){for(var s=a.points,i=0,n=0;n<s.length;n++){var l=s[n],r=s[(n+1)%s.length],h=new u(l.x,l.y,r.x,r.y);i+=e(h)}return i};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Igor Ognichenko <ognichenko.igor@gmail.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(u,o){return u[0]=o[0],u[1]=o[1],u},e=function(u){var o,a=[],s=u.points;for(o=0;o<s.length;o++)a.push([s[o].x,s[o].y]);var i=[];for(a.length>0&&i.push(t([0,0],a[0])),o=0;o<a.length-1;o++){var n=a[o],l=a[o+1],r=n[0],h=n[1],f=l[0],v=l[1];i.push([.85*r+.15*f,.85*h+.15*v]),i.push([.15*r+.85*f,.15*h+.85*v])}return a.length>1&&i.push(t([0,0],a[a.length-1])),u.setTo(i)};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(10),o=t(34),a=t(1121),s=new e({Extends:o,Mixins:[a],initialize:function(n,l,r,h,f,v,d){l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=128),f===void 0&&(f=128),o.call(this,n,"Rectangle",new u(0,0,h,f)),this.setPosition(l,r),this.setSize(h,f),v!==void 0&&this.setFillStyle(v,d),this.updateDisplayOrigin(),this.updateData()},setSize:function(i,n){return this.width=i,this.height=n,this.geom.setSize(i,n),this.updateData(),this},updateData:function(){var i=[],n=this.geom,l=this._tempLine;return n.getLineA(l),i.push(l.x1,l.y1,l.x2,l.y2),n.getLineB(l),i.push(l.x2,l.y2),n.getLineC(l),i.push(l.x2,l.y2),n.getLineD(l),i.push(l.x2,l.y2),this.pathData=i,this}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1124),u=t(0),o=t(59),a=t(34),s=new u({Extends:a,Mixins:[e],initialize:function(n,l,r,h,f,v,d,p){l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=5),f===void 0&&(f=32),v===void 0&&(v=64),a.call(this,n,"Star",null),this._points=h,this._innerRadius=f,this._outerRadius=v,this.setPosition(l,r),this.setSize(v*2,v*2),d!==void 0&&this.setFillStyle(d,p),this.updateDisplayOrigin(),this.updateData()},setPoints:function(i){return this._points=i,this.updateData()},setInnerRadius:function(i){return this._innerRadius=i,this.updateData()},setOuterRadius:function(i){return this._outerRadius=i,this.updateData()},points:{get:function(){return this._points},set:function(i){this._points=i,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(i){this._innerRadius=i,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(i){this._outerRadius=i,this.updateData()}},updateData:function(){var i=[],n=this._points,l=this._innerRadius,r=this._outerRadius,h=Math.PI/2*3,f=Math.PI/n,v=r,d=r;i.push(v,d+-r);for(var p=0;p<n;p++)i.push(v+Math.cos(h)*r,d+Math.sin(h)*r),h+=f,i.push(v+Math.cos(h)*l,d+Math.sin(h)*l),h+=f;return i.push(v,d+-r),this.pathIndexes=o(i),this.pathData=i,this}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(34),o=t(82),a=t(1127),s=new e({Extends:u,Mixins:[a],initialize:function(n,l,r,h,f,v,d,p,g,m,x){l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=128),v===void 0&&(v=64),d===void 0&&(d=0),p===void 0&&(p=128),g===void 0&&(g=128),u.call(this,n,"Triangle",new o(h,f,v,d,p,g));var y=this.geom.right-this.geom.left,T=this.geom.bottom-this.geom.top;this.setPosition(l,r),this.setSize(y,T),m!==void 0&&this.setFillStyle(m,x),this.updateDisplayOrigin(),this.updateData()},setTo:function(i,n,l,r,h,f){return this.geom.setTo(i,n,l,r,h,f),this.updateData()},updateData:function(){var i=[],n=this.geom,l=this._tempLine;return n.getLineA(l),i.push(l.x1,l.y1,l.x2,l.y2),n.getLineB(l),i.push(l.x2,l.y2),n.getLineC(l),i.push(l.x2,l.y2),this.pathData=i,this}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=t(67),o=function(a,s,i){i===void 0&&(i=new e);var n=a.getLineA(),l=a.getLineB(),r=a.getLineC();if(s<=0||s>=1)return i.x=n.x1,i.y=n.y1,i;var h=u(n),f=u(l),v=u(r),d=h+f+v,p=d*s,g=0;return p<h?(g=p/h,i.x=n.x1+(n.x2-n.x1)*g,i.y=n.y1+(n.y2-n.y1)*g):p>h+f?(p-=h+f,g=p/v,i.x=r.x1+(r.x2-r.x1)*g,i.y=r.y1+(r.y2-r.y1)*g):(p-=h,g=p/f,i.x=l.x1+(l.x2-l.x1)*g,i.y=l.y1+(l.y2-l.y1)*g),i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(67),u=t(4),o=function(a,s,i,n){n===void 0&&(n=[]);var l=a.getLineA(),r=a.getLineB(),h=a.getLineC(),f=e(l),v=e(r),d=e(h),p=f+v+d;!s&&i>0&&(s=p/i);for(var g=0;g<s;g++){var m=p*(g/s),x=0,y=new u;m<f?(x=m/f,y.x=l.x1+(l.x2-l.x1)*x,y.y=l.y1+(l.y2-l.y1)*x):m>f+v?(m-=f+v,x=m/d,y.x=h.x1+(h.x2-h.x1)*x,y.y=h.y1+(h.y2-h.y1)*x):(m-=f,x=m/v,y.x=r.x1+(r.x2-r.x1)*x,y.y=r.y1+(r.y2-r.y1)*x),n.push(y)}return n};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(!e||typeof e=="number")return!1;if(e.hasOwnProperty(u))return e[u]=o,!0;if(u.indexOf(".")!==-1){for(var a=u.split("."),s=e,i=e,n=0;n<a.length;n++)if(s.hasOwnProperty(a[n]))i=s,s=s[a[n]];else return!1;return i[a[a.length-1]]=o,!0}return!1};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(116),u=t(117),o=function(a,s,i,n,l,r,h){if(n===void 0&&(n=!1),r===void 0&&(r=16777215),h===void 0&&(h=1),a.length!==s.length){console.warn("GenerateVerts: vertices and uvs count not equal");return}var f={faces:[],vertices:[]},v,d,p,g,m,x,y,T,E,C,A,P=n?3:2,M=Array.isArray(r),O=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(v=0;v<i.length;v++){var I=i[v],N=i[v]*2,Y=i[v]*P;d=a[Y],p=a[Y+1],g=n?a[Y+2]:0,m=s[N],x=s[N+1],y=M?r[I]:r,T=O?h[I]:h,E=0,C=0,A=0,l&&(E=l[Y],C=l[Y+1],A=n?l[Y+2]:0),f.vertices.push(new u(d,p,g,m,x,y,T,E,C,A))}else{var X=0,W=0;for(v=0;v<a.length;v+=P)d=a[v],p=a[v+1],g=n?a[v+2]:0,m=s[X],x=s[X+1],y=M?r[W]:r,T=O?h[W]:h,E=0,C=0,A=0,l&&(E=l[v],C=l[v+1],A=n?l[v+2]:0),f.vertices.push(new u(d,p,g,m,x,y,T,E,C,A)),X+=2,W++}for(v=0;v<f.vertices.length;v+=3){var H=f.vertices[v],D=f.vertices[v+1],L=f.vertices[v+2];f.faces.push(new e(H,D,L))}return f};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(116),u=t(69),o=t(39),a=t(117),s=new o,i=new o,n=new u,l=function(r,h,f,v,d,p,g,m,x,y){f===void 0&&(f=1),v===void 0&&(v=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),m===void 0&&(m=0),x===void 0&&(x=0),y===void 0&&(y=!0);var T={faces:[],verts:[]},E=r.materials;s.set(v,d,p),i.set(g,m,x),n.fromRotationXYTranslation(i,s,y);for(var C=0;C<r.models.length;C++)for(var A=r.models[C],P=A.vertices,M=A.textureCoords,O=A.faces,I=0;I<O.length;I++){var N=O[I],Y=N.vertices[0],X=N.vertices[1],W=N.vertices[2],H=P[Y.vertexIndex],D=P[X.vertexIndex],L=P[W.vertexIndex],B=Y.textureCoordsIndex,G=X.textureCoordsIndex,w=W.textureCoordsIndex,z=B===-1?{u:0,v:1}:M[B],U=G===-1?{u:0,v:0}:M[G],V=w===-1?{u:1,v:1}:M[w],Z=16777215;N.material!==""&&E[N.material]&&(Z=E[N.material]);var $=new a(H.x*f,H.y*f,H.z*f,z.u,z.v,Z).transformMat4(n),Q=new a(D.x*f,D.y*f,D.z*f,U.u,U.v,Z).transformMat4(n),j=new a(L.x*f,L.y*f,L.z*f,V.u,V.v,Z).transformMat4(n);T.verts.push($,Q,j),T.faces.push(new e($,Q,j))}return h&&(h.faces=h.faces.concat(T.faces),h.vertices=h.vertices.concat(T.verts)),T};c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(65),u=t(0),o=t(11),a=t(200),s=t(12),i=new u({Extends:e,Mixins:[o.ScrollFactor,o.Visible],initialize:function(l,r,h,f,v,d,p){e.call(this,l,r,h),this.color=new a(f,v,d),this.intensity=p,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1)},willRender:function(n){return!(i.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&n.id)},setColor:function(n){var l=s.getFloatsFromUintRGB(n);return this.color.set(l[0],l[1],l[2]),this},setIntensity:function(n){return this.intensity=n,this},setRadius:function(n){return this.radius=n,this}});i.RENDER_MASK=15,c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(151),u=t(0),o=t(50),a=t(481),s=t(150),i=t(200),n=t(74),l=t(79),r=t(12),h=new u({initialize:function(){this.lights=[],this.ambientColor=new i(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(f,v,d,p,g,m){return this.systems.displayList.add(new s(this.scene,f,v,d,p,g,m))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(f){for(var v=this.lights,d=f.worldView,p=[],g=0;g<v.length;g++){var m=v[g];m.willRender(f)&&e(m,d)&&p.push({light:m,distance:o(m.x,m.y,d.centerX,d.centerY)})}return p.length>this.maxLights&&(l(p,this.sortByDistance),p=p.slice(0,this.maxLights)),this.visibleLights=p.length,p},sortByDistance:function(f,v){return f.distance>=v.distance},setAmbientColor:function(f){var v=r.getFloatsFromUintRGB(f);return this.ambientColor.set(v[0],v[1],v[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(f,v,d,p,g){f===void 0&&(f=0),v===void 0&&(v=0),d===void 0&&(d=128),p===void 0&&(p=16777215),g===void 0&&(g=1);var m=r.getFloatsFromUintRGB(p),x=new a(f,v,d,m[0],m[1],m[2],g);return this.lights.push(x),x},removeLight:function(f){var v=this.lights.indexOf(f);return v>=0&&n(this.lights,v),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});c.exports=h},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(56),u=t(17),o={Circle:t(1191),Ellipse:t(1201),Intersects:t(484),Line:t(1221),Mesh:t(1243),Point:t(1246),Polygon:t(1260),Rectangle:t(502),Triangle:t(1293)};o=u(!1,o,e),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={CircleToCircle:t(231),CircleToRectangle:t(151),GetCircleToCircle:t(1211),GetCircleToRectangle:t(1212),GetLineToCircle:t(232),GetLineToLine:t(485),GetLineToPoints:t(486),GetLineToPolygon:t(487),GetLineToRectangle:t(234),GetRaysFromPointToPolygon:t(1213),GetRectangleIntersection:t(1214),GetRectangleToRectangle:t(1215),GetRectangleToTriangle:t(1216),GetTriangleToCircle:t(1217),GetTriangleToLine:t(492),GetTriangleToTriangle:t(1218),LineToCircle:t(233),LineToLine:t(96),LineToRectangle:t(488),PointToLine:t(496),PointToLineSegment:t(1219),RectangleToRectangle:t(152),RectangleToTriangle:t(489),RectangleToValues:t(1220),TriangleToCircle:t(491),TriangleToLine:t(493),TriangleToTriangle:t(494)}},function(c,S,t){/**
 * @author       Richard Davey
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(39),u=function(o,a,s){var i=o.x1,n=o.y1,l=o.x2,r=o.y2,h=a.x1,f=a.y1,v=a.x2,d=a.y2,p=l-i,g=r-n,m=v-h,x=d-f,y=x*p-m*g;if(p===0||y===0)return!1;var T=(p*(f-n)+g*(i-h))/(m*g-x*p),E=(h+m*T-i)/p;return E<0||T<0||T>1?null:(s===void 0&&(s=new e),s.set(i+p*E,n+g*E,E))};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(39),u=t(485),o=t(47),a=new o,s=new e,i=function(n,l,r){r===void 0&&(r=new e);var h=!1;r.set(),s.set();for(var f=l[0],v=1;v<l.length;v++){var d=l[v];a.setTo(f.x,f.y,d.x,d.y),f=d,u(n,a,s)&&(!h||s.z<r.z)&&(r.copy(s),h=!0)}return h?r:null};c.exports=i},function(c,S,t){/**
 * @author       Richard Davey
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(39),u=t(140),o=t(486),a=new e,s=function(i,n,l){l===void 0&&(l=new u),Array.isArray(n)||(n=[n]);var r=!1;l.set(),a.set();for(var h=0;h<n.length;h++)o(i,n[h].points,a)&&(!r||a.z<l.z)&&(l.set(a.x,a.y,a.z,h),r=!0);return r?l:null};c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.x1,a=e.y1,s=e.x2,i=e.y2,n=u.x,l=u.y,r=u.right,h=u.bottom,f=0;if(o>=n&&o<=r&&a>=l&&a<=h||s>=n&&s<=r&&i>=l&&i<=h)return!0;if(o<n&&s>=n){if(f=a+(i-a)*(n-o)/(s-o),f>l&&f<=h)return!0}else if(o>r&&s<=r&&(f=a+(i-a)*(r-o)/(s-o),f>=l&&f<=h))return!0;if(a<l&&i>=l){if(f=o+(s-o)*(l-a)/(i-a),f>=n&&f<=r)return!0}else if(a>h&&i<=h&&(f=o+(s-o)*(h-a)/(i-a),f>=n&&f<=r))return!0;return!1};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(96),u=t(57),o=t(235),a=t(490),s=function(i,n){if(n.left>i.right||n.right<i.left||n.top>i.bottom||n.bottom<i.top)return!1;var l=n.getLineA(),r=n.getLineB(),h=n.getLineC();if(u(i,l.x1,l.y1)||u(i,l.x2,l.y2)||u(i,r.x1,r.y1)||u(i,r.x2,r.y2)||u(i,h.x1,h.y1)||u(i,h.x2,h.y2))return!0;var f=i.getLineA(),v=i.getLineB(),d=i.getLineC(),p=i.getLineD();if(e(l,f)||e(l,v)||e(l,d)||e(l,p)||e(r,f)||e(r,v)||e(r,d)||e(r,p)||e(h,f)||e(h,v)||e(h,d)||e(h,p))return!0;var g=a(i),m=o(n,g,!0);return m.length>0};c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===void 0&&(u=[]),u.push({x:e.x,y:e.y}),u.push({x:e.right,y:e.y}),u.push({x:e.right,y:e.bottom}),u.push({x:e.x,y:e.bottom}),u};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(233),u=t(115),o=function(a,s){return a.left>s.right||a.right<s.left||a.top>s.bottom||a.bottom<s.top?!1:!!(u(a,s.x,s.y)||e(a.getLineA(),s)||e(a.getLineB(),s)||e(a.getLineC(),s))};c.exports=o},function(c,S,t){/**
 * @author       Florian Vazelle
 * @author       Geoffrey Glaive
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=t(493),o=t(96),a=function(s,i,n){if(n===void 0&&(n=[]),u(s,i))for(var l=s.getLineA(),r=s.getLineB(),h=s.getLineC(),f=[new e,new e,new e],v=[o(l,i,f[0]),o(r,i,f[1]),o(h,i,f[2])],d=0;d<3;d++)v[d]&&n.push(f[d]);return n};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(96),u=function(o,a){return!!(o.contains(a.x1,a.y1)||o.contains(a.x2,a.y2)||e(o.getLineA(),a)||e(o.getLineB(),a)||e(o.getLineC(),a))};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(235),u=t(495),o=t(96),a=function(s,i){if(s.left>i.right||s.right<i.left||s.top>i.bottom||s.bottom<i.top)return!1;var n=s.getLineA(),l=s.getLineB(),r=s.getLineC(),h=i.getLineA(),f=i.getLineB(),v=i.getLineC();if(o(n,h)||o(n,f)||o(n,v)||o(l,h)||o(l,f)||o(l,v)||o(r,h)||o(r,f)||o(r,v))return!0;var d=u(s),p=e(i,d,!0);return!!(p.length>0||(d=u(i),p=e(s,d,!0),p.length>0))};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===void 0&&(u=[]),u.push({x:e.x1,y:e.y1}),u.push({x:e.x2,y:e.y2}),u.push({x:e.x3,y:e.y3}),u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Florian Mertens
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){o===void 0&&(o=1);var a=u.x1,s=u.y1,i=u.x2,n=u.y2,l=e.x,r=e.y,h=(i-a)*(i-a)+(n-s)*(n-s);if(h===0)return!1;var f=((l-a)*(i-a)+(r-s)*(n-s))/h;if(f<0)return Math.sqrt((a-l)*(a-l)+(s-r)*(s-r))<=o;if(f>=0&&f<=1){var v=((s-r)*(i-a)-(a-l)*(n-s))/h;return Math.abs(v)*Math.sqrt(h)<=o}else return Math.sqrt((i-l)*(i-l)+(n-r)*(n-r))<=o};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=t(68),o=t(97),a=function(s){var i=o(s)-e.TAU;return u(i,-Math.PI,Math.PI)};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=!0,e="untitled",u="",o="";function a(g){var m=g.indexOf("#");return m>-1?g.substring(0,m):g}function s(g){return g.models.length===0&&g.models.push({faces:[],name:e,textureCoords:[],vertexNormals:[],vertices:[]}),u="",g.models[g.models.length-1]}function i(g,m){var x=g.length>=2?g[1]:e;m.models.push({faces:[],name:x,textureCoords:[],vertexNormals:[],vertices:[]}),u=""}function n(g){g.length===2&&(u=g[1])}function l(g,m){var x=g.length,y=x>=2?parseFloat(g[1]):0,T=x>=3?parseFloat(g[2]):0,E=x>=4?parseFloat(g[3]):0;s(m).vertices.push({x:y,y:T,z:E})}function r(g,m){var x=g.length,y=x>=2?parseFloat(g[1]):0,T=x>=3?parseFloat(g[2]):0,E=x>=4?parseFloat(g[3]):0;isNaN(y)&&(y=0),isNaN(T)&&(T=0),isNaN(E)&&(E=0),t&&(T=1-T),s(m).textureCoords.push({u:y,v:T,w:E})}function h(g,m){var x=g.length,y=x>=2?parseFloat(g[1]):0,T=x>=3?parseFloat(g[2]):0,E=x>=4?parseFloat(g[3]):0;s(m).vertexNormals.push({x:y,y:T,z:E})}function f(g,m){var x=g.length-1;if(!(x<3)){for(var y={group:u,material:o,vertices:[]},T=0;T<x;T++){var E=g[T+1],C=E.split("/"),A=C.length;if(!(A<1||A>3)){var P=0,M=0,O=0;P=parseInt(C[0],10),A>1&&C[1]!==""&&(M=parseInt(C[1],10)),A>2&&(O=parseInt(C[2],10)),P!==0&&(P<0&&(P=s(m).vertices.length+1+P),M-=1,P-=1,O-=1,y.vertices.push({textureCoordsIndex:M,vertexIndex:P,vertexNormalIndex:O}))}}s(m).faces.push(y)}}function v(g,m){g.length>=2&&m.materialLibraries.push(g[1])}function d(g){g.length>=2&&(o=g[1])}var p=function(g,m){m===void 0&&(m=!0),t=m;var x={materials:{},materialLibraries:[],models:[]};u="",o="";for(var y=g.split(`
`),T=0;T<y.length;T++){var E=a(y[T]),C=E.replace(/\s\s+/g," ").trim().split(" ");switch(C[0].toLowerCase()){case"o":i(C,x);break;case"g":n(C);break;case"v":l(C,x);break;case"vt":r(C,x);break;case"vn":h(C,x);break;case"f":f(C,x);break;case"mtllib":v(C,x);break;case"usemtl":d(C);break}}return x};c.exports=p},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(103),u=function(o){for(var a={},s=o.split(`
`),i="",n=0;n<s.length;n++){var l=s[n].trim();if(!(l.indexOf("#")===0||l==="")){var r=l.replace(/\s\s+/g," ").trim().split(" ");switch(r[0].toLowerCase()){case"newmtl":{i=r[1];break}case"kd":{var h=Math.floor(r[1]*255),f=r.length>=2?Math.floor(r[2]*255):h,v=r.length>=3?Math.floor(r[3]*255):h;a[i]=e(h,f,v);break}}}}return a};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.x*e.x+e.y*e.y};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10);e.Area=t(1267),e.Ceil=t(1268),e.CeilAll=t(1269),e.CenterOn=t(190),e.Clone=t(1270),e.Contains=t(57),e.ContainsPoint=t(1271),e.ContainsRect=t(503),e.CopyFrom=t(1272),e.Decompose=t(490),e.Equals=t(1273),e.FitInside=t(1274),e.FitOutside=t(1275),e.Floor=t(1276),e.FloorAll=t(1277),e.FromPoints=t(199),e.FromXY=t(1278),e.GetAspectRatio=t(237),e.GetCenter=t(1279),e.GetPoint=t(171),e.GetPoints=t(306),e.GetSize=t(1280),e.Inflate=t(1281),e.Intersection=t(1282),e.MarchingAnts=t(316),e.MergePoints=t(1283),e.MergeRect=t(1284),e.MergeXY=t(1285),e.Offset=t(1286),e.OffsetPoint=t(1287),e.Overlaps=t(1288),e.Perimeter=t(130),e.PerimeterPoint=t(1289),e.Random=t(174),e.RandomOutside=t(1290),e.SameDimensions=t(1291),e.Scale=t(1292),e.Union=t(441),c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u.width*u.height>e.width*e.height?!1:u.x>e.x&&u.x<e.right&&u.right>e.x&&u.right<e.right&&u.y>e.y&&u.y<e.bottom&&u.bottom>e.y&&u.bottom<e.bottom};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){return a===void 0&&(a=new e),a.x=(o.x1+o.x2+o.x3)/3,a.y=(o.y1+o.y2+o.y3)/3,a};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e.x1+=u,e.y1+=o,e.x2+=u,e.y2+=o,e.x3+=u,e.y3+=o,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4);function u(a,s,i,n){var l=a-i,r=s-n,h=l*l+r*r;return Math.sqrt(h)}var o=function(a,s){s===void 0&&(s=new e);var i=a.x1,n=a.y1,l=a.x2,r=a.y2,h=a.x3,f=a.y3,v=u(h,f,l,r),d=u(i,n,h,f),p=u(l,r,i,n),g=v+d+p;return s.x=(i*v+l*d+h*p)/g,s.y=(n*v+r*d+f*p)/g,s};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return function(o,a,s,i){var n=e.getPixelAlpha(a,s,i.texture.key,i.frame.name);return n&&n>=u}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return{gameObject:e,enabled:!0,alwaysEnabled:!1,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:u,hitAreaCallback:o,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s){this.pad=a,this.events=a.events,this.index=s,this.value=0,this.threshold=.1},update:function(o){this.value=o},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(239),o=new e({initialize:function(s,i){this.pad=s,this.events=s.manager,this.index=i,this.value=0,this.threshold=1,this.pressed=!1},update:function(a){this.value=a;var s=this.pad,i=this.index;a>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(u.BUTTON_DOWN,s,this,a),this.pad.emit(u.GAMEPAD_BUTTON_DOWN,i,a,this)):this.pressed&&(this.pressed=!1,this.events.emit(u.BUTTON_UP,s,this,a),this.pad.emit(u.GAMEPAD_BUTTON_UP,i,a,this))},destroy:function(){this.pad=null,this.events=null}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(509),u=t(510),o=t(0),a=t(9),s=t(3),i=new o({Extends:a,initialize:function(l,r){a.call(this),this.manager=l,this.pad=r,this.id=r.id,this.index=r.index;for(var h=[],f=0;f<r.buttons.length;f++)h.push(new u(this,f));this.buttons=h;var v=[];for(f=0;f<r.axes.length;f++)v.push(new e(this,f));this.axes=v,this.vibration=r.vibrationActuator;var d={value:0,pressed:!1};this._LCLeft=h[14]?h[14]:d,this._LCRight=h[15]?h[15]:d,this._LCTop=h[12]?h[12]:d,this._LCBottom=h[13]?h[13]:d,this._RCLeft=h[2]?h[2]:d,this._RCRight=h[1]?h[1]:d,this._RCTop=h[3]?h[3]:d,this._RCBottom=h[0]?h[0]:d,this._FBLeftTop=h[4]?h[4]:d,this._FBLeftBottom=h[6]?h[6]:d,this._FBRightTop=h[5]?h[5]:d,this._FBRightBottom=h[7]?h[7]:d;var p={value:0};this._HAxisLeft=v[0]?v[0]:p,this._VAxisLeft=v[1]?v[1]:p,this._HAxisRight=v[2]?v[2]:p,this._VAxisRight=v[3]?v[3]:p,this.leftStick=new s,this.rightStick=new s,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(n){return this.axes[n].getValue()},setAxisThreshold:function(n){for(var l=0;l<this.axes.length;l++)this.axes[l].threshold=n},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(n){return this.buttons[n].value},isButtonDown:function(n){return this.buttons[n].pressed},update:function(n){if(!(n.timestamp<this._created)){var l,r=this.buttons,h=n.buttons,f=r.length;for(l=0;l<f;l++)r[l].update(h[l].value);var v=this.axes,d=n.axes;for(f=v.length,l=0;l<f;l++)v[l].update(d[l]);f>=2&&(this.leftStick.set(v[0].getValue(),v[1].getValue()),f>=4&&this.rightStick.set(v[2].getValue(),v[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var n;for(n=0;n<this.buttons.length;n++)this.buttons[n].destroy();for(n=0;n<this.axes.length;n++)this.axes[n].destroy();this.buttons=[],this.axes=[]},connected:{get:function(){return this.pad.connected}},timestamp:{get:function(){return this.pad.timestamp}},left:{get:function(){return this._LCLeft.pressed}},right:{get:function(){return this._LCRight.pressed}},up:{get:function(){return this._LCTop.pressed}},down:{get:function(){return this._LCBottom.pressed}},A:{get:function(){return this._RCBottom.pressed}},Y:{get:function(){return this._RCTop.pressed}},X:{get:function(){return this._RCLeft.pressed}},B:{get:function(){return this._RCRight.pressed}},L1:{get:function(){return this._FBLeftTop.value}},L2:{get:function(){return this._FBLeftBottom.value}},R1:{get:function(){return this._FBRightTop.value}},R2:{get:function(){return this._FBRightBottom.value}}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(9),o=t(154),a=new e({Extends:u,initialize:function(i,n){u.call(this),this.plugin=i,this.keyCode=n,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(s){return this.emitOnRepeat=s,this},onDown:function(s){this.originalEvent=s,!!this.enabled&&(this.altKey=s.altKey,this.ctrlKey=s.ctrlKey,this.shiftKey=s.shiftKey,this.metaKey=s.metaKey,this.location=s.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(o.DOWN,this,s):(this.isDown=!0,this.isUp=!1,this.timeDown=s.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(o.DOWN,this,s)))},onUp:function(s){this.originalEvent=s,!!this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=s.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(o.UP,this,s))},reset:function(){return this.preventDefault=!0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(154),o=t(2),a=t(514),s=t(516),i=new e({initialize:function(l,r,h){if(h===void 0&&(h={}),r.length<2)return!1;this.manager=l,this.enabled=!0,this.keyCodes=[];for(var f=0;f<r.length;f++){var v=r[f];typeof v=="string"?this.keyCodes.push(v.toUpperCase().charCodeAt(0)):typeof v=="number"?this.keyCodes.push(v):v.hasOwnProperty("keyCode")&&this.keyCodes.push(v.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=o(h,"resetOnWrongKey",!0),this.maxKeyDelay=o(h,"maxKeyDelay",0),this.resetOnMatch=o(h,"resetOnMatch",!1),this.deleteOnMatch=o(h,"deleteOnMatch",!1);var d=this,p=function(g){if(!(d.matched||!d.enabled)){var m=a(g,d);m&&(d.manager.emit(u.COMBO_MATCH,d,g),d.resetOnMatch?s(d):d.deleteOnMatch&&d.destroy())}};this.onKeyDown=p,this.manager.on(u.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(u.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(515),u=function(o,a){if(a.matched)return!0;var s=!1,i=!1;if(o.keyCode===a.current)if(a.index>0&&a.maxKeyDelay>0){var n=a.timeLastMatched+a.maxKeyDelay;o.timeStamp<=n&&(i=!0,s=e(o,a))}else i=!0,s=e(o,a);return!i&&a.resetOnWrongKey&&(a.index=0,a.current=a.keyCodes[0]),s&&(a.timeLastMatched=o.timeStamp,a.matched=!0,a.timeMatched=o.timeStamp),s};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u.timeLastMatched=e.timeStamp,u.index++,u.index===u.size?!0:(u.current=u.keyCodes[u.index],!1)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.current=e.keyCodes[0],e.index=0,e.timeLastMatched=0,e.matched=!1,e.timeMatched=0,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(240),u=function(o,a){var s=e(a,o.xhrSettings),i=new XMLHttpRequest;if(i.open("GET",o.src,s.async,s.user,s.password),i.responseType=o.xhrSettings.responseType,i.timeout=s.timeout,s.headers)for(var n in s.headers)i.setRequestHeader(n,s.headers[n]);return s.header&&s.headerValue&&i.setRequestHeader(s.header,s.headerValue),s.requestedWith&&i.setRequestHeader("X-Requested-With",s.requestedWith),s.overrideMimeType&&i.overrideMimeType(s.overrideMimeType),s.withCredentials&&(i.withCredentials=!0),i.onload=o.onLoad.bind(o,i),i.onerror=o.onError.bind(o,i),i.onprogress=o.onProgress.bind(o),i.send(),i};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(519),n=t(7),l=new e({Extends:o,initialize:function(h,f,v,d,p){if(n(f)){var g=f;f=s(g,"key"),d=s(g,"xhrSettings"),p=s(g,"context",p)}var m={type:"audio",cache:h.cacheManager.audio,extension:v.type,responseType:"arraybuffer",key:f,url:v.url,xhrSettings:d,config:{context:p}};o.call(this,h,m)},onProcess:function(){this.state=u.FILE_PROCESSING;var r=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(h){r.data=h,r.onProcessComplete()},function(h){console.error("Error decoding audio: "+r.key+" - ",h?h.message:null),r.onProcessError()}),this.config.context=null}});l.create=function(r,h,f,v,d){var p=r.systems.game,g=p.config.audio,m=p.device.audio;n(h)&&(f=s(h,"url",[]),v=s(h,"config",{}));var x=l.getAudioURL(p,f);return x?m.webAudio&&!g.disableWebAudio?new l(r,h,x,d,p.sound.context):new i(r,h,x,v):null},l.getAudioURL=function(r,h){Array.isArray(h)||(h=[h]);for(var f=0;f<h.length;f++){var v=s(h[f],"url",h[f]);if(v.indexOf("blob:")===0||v.indexOf("data:")===0)return{url:v,type:""};var d=v.match(/\.([a-zA-Z0-9]+)($|\?)/);if(d=s(h[f],"type",d?d[1]:"").toLowerCase(),r.device.audio[d])return{url:v,type:d}}return null},a.register("audio",function(r,h,f,v){var d=this.systems.game,p=d.config.audio,g=d.device.audio;if(p.noAudio||!g.webAudio&&!g.audioData)return this;var m;if(Array.isArray(r))for(var x=0;x<r.length;x++)m=l.create(this,r[x]),m&&this.addFile(m);else m=l.create(this,r,h,f,v),m&&this.addFile(m);return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(95),o=t(23),a=t(2),s=t(155),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v){if(i(h)){var d=h;h=a(d,"key"),v=a(d,"config",v)}var p={type:"audio",cache:r.cacheManager.audio,extension:f.type,key:h,url:f.url,config:v};o.call(this,r,p),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var l=0;l<this.data.length;l++){var r=this.data[l];r.oncanplaythrough=null,r.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(l){var r=l.target;r.oncanplaythrough=null,r.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(u.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var l=this.config&&this.config.instances||1;this.filesTotal=l,this.filesLoaded=0,this.percentComplete=0;for(var r=0;r<l;r++){var h=new Audio;h.dataset||(h.dataset={}),h.dataset.name=this.key+("0"+r).slice(-2),h.dataset.used="false",this.locked?h.dataset.locked="true":(h.dataset.locked="false",h.preload="auto",h.oncanplaythrough=this.onProgress.bind(this),h.onerror=this.onError.bind(this)),this.data.push(h)}for(r=0;r<this.data.length;r++)h=this.data[r],h.src=s(this,this.loader.baseURL),this.locked||h.load();this.locked&&setTimeout(this.onLoad.bind(this))}});c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v){var d="js";if(i(h)){var p=h;h=s(p,"key"),f=s(p,"url"),v=s(p,"xhrSettings"),d=s(p,"extension",d)}var g={type:"script",cache:!1,extension:d,responseType:"text",key:h,url:f,xhrSettings:v};o.call(this,r,g)},onProcess:function(){this.state=u.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("script",function(l,r,h){if(Array.isArray(l))for(var f=0;f<l.length;f++)this.addFile(new n(this,l[f]));else this.addFile(new n(this,l,r,h));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(522),u=t(157),o=t(0),a=t(62),s=t(524),i=t(525),n=new o({initialize:function(r){this.world=r,this.scene=r.scene,this.sys=r.scene.sys},collider:function(l,r,h,f,v){return this.world.addCollider(l,r,h,f,v)},overlap:function(l,r,h,f,v){return this.world.addOverlap(l,r,h,f,v)},existing:function(l,r){var h=r?a.STATIC_BODY:a.DYNAMIC_BODY;return this.world.enableBody(l,h),l},staticImage:function(l,r,h,f){var v=new e(this.scene,l,r,h,f);return this.sys.displayList.add(v),this.world.enableBody(v,a.STATIC_BODY),v},image:function(l,r,h,f){var v=new e(this.scene,l,r,h,f);return this.sys.displayList.add(v),this.world.enableBody(v,a.DYNAMIC_BODY),v},staticSprite:function(l,r,h,f){var v=new u(this.scene,l,r,h,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,a.STATIC_BODY),v},sprite:function(l,r,h,f){var v=new u(this.scene,l,r,h,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,a.DYNAMIC_BODY),v},staticGroup:function(l,r){return this.sys.updateList.add(new i(this.world,this.world.scene,l,r))},group:function(l,r){return this.sys.updateList.add(new s(this.world,this.world.scene,l,r))},destroy:function(){this.world=null,this.scene=null,this.sys=null}});c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(243),o=t(125),a=new e({Extends:o,Mixins:[u.Acceleration,u.Angular,u.Bounce,u.Debug,u.Drag,u.Enable,u.Friction,u.Gravity,u.Immovable,u.Mass,u.Pushable,u.Size,u.Velocity],initialize:function(i,n,l,r,h){o.call(this,i,n,l,r,h),this.body=null}});c.exports=a},function(c,S,t){var e=t(244),u=t(65),o=t(231),a=t(151),s=function(i,n,l,r,h,f){var v=e(i,n-r,l-r,2*r,2*r,h,f);if(v.length===0)return v;for(var d=new u(n,l,r),p=new u,g=[],m=0;m<v.length;m++){var x=v[m];x.isCircle?(p.setTo(x.center.x,x.center.y,x.halfWidth),o(d,p)&&g.push(x)):a(d,x)&&g.push(x)}return g};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(157),u=t(0),o=t(62),a=t(2),s=t(113),i=t(7),n=new u({Extends:s,initialize:function(r,h,f,v){if(!f&&!v)v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(i(f))v=f,f=null,v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(f)&&i(f[0])){v=f[0];var d=this;f.forEach(function(p){p.internalCreateCallback=d.createCallbackHandler,p.internalRemoveCallback=d.removeCallbackHandler}),f=null}else v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=r,v.classType=a(v,"classType",e),this.physicsType=o.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:a(v,"collideWorldBounds",!1),setBoundsRectangle:a(v,"customBoundsRectangle",null),setAccelerationX:a(v,"accelerationX",0),setAccelerationY:a(v,"accelerationY",0),setAllowDrag:a(v,"allowDrag",!0),setAllowGravity:a(v,"allowGravity",!0),setAllowRotation:a(v,"allowRotation",!0),setBounceX:a(v,"bounceX",0),setBounceY:a(v,"bounceY",0),setDragX:a(v,"dragX",0),setDragY:a(v,"dragY",0),setEnable:a(v,"enable",!0),setGravityX:a(v,"gravityX",0),setGravityY:a(v,"gravityY",0),setFrictionX:a(v,"frictionX",0),setFrictionY:a(v,"frictionY",0),setMaxVelocityX:a(v,"maxVelocityX",1e4),setMaxVelocityY:a(v,"maxVelocityY",1e4),setVelocityX:a(v,"velocityX",0),setVelocityY:a(v,"velocityY",0),setAngularVelocity:a(v,"angularVelocity",0),setAngularAcceleration:a(v,"angularAcceleration",0),setAngularDrag:a(v,"angularDrag",0),setMass:a(v,"mass",1),setImmovable:a(v,"immovable",!1)},s.call(this,h,f,v),this.type="PhysicsGroup"},createCallbackHandler:function(l){l.body||this.world.enableBody(l,o.DYNAMIC_BODY);var r=l.body;for(var h in this.defaults)r[h](this.defaults[h])},removeCallbackHandler:function(l){l.body&&this.world.disableBody(l)},setVelocity:function(l,r,h){h===void 0&&(h=0);for(var f=this.getChildren(),v=0;v<f.length;v++)f[v].body.velocity.set(l+v*h,r+v*h);return this},setVelocityX:function(l,r){r===void 0&&(r=0);for(var h=this.getChildren(),f=0;f<h.length;f++)h[f].body.velocity.x=l+f*r;return this},setVelocityY:function(l,r){r===void 0&&(r=0);for(var h=this.getChildren(),f=0;f<h.length;f++)h[f].body.velocity.y=l+f*r;return this}});c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(157),u=t(0),o=t(62),a=t(2),s=t(113),i=t(7),n=new u({Extends:s,initialize:function(r,h,f,v){!f&&!v?v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:e}:i(f)?(v=f,f=null,v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler,v.createMultipleCallback=this.createMultipleCallbackHandler,v.classType=a(v,"classType",e)):Array.isArray(f)&&i(f[0])?(v=f,f=null,v.forEach(function(d){d.internalCreateCallback=this.createCallbackHandler,d.internalRemoveCallback=this.removeCallbackHandler,d.createMultipleCallback=this.createMultipleCallbackHandler,d.classType=a(d,"classType",e)})):v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=r,this.physicsType=o.STATIC_BODY,s.call(this,h,f,v),this.type="StaticPhysicsGroup"},createCallbackHandler:function(l){l.body||this.world.enableBody(l,o.STATIC_BODY)},removeCallbackHandler:function(l){l.body&&this.world.disableBody(l)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var l=this.children.entries,r=0;r<l.length;r++)l[r].body.reset();return this}});c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(350),u=t(527),o=t(18),a=t(0),s=t(528),i=t(62),n=t(50),l=t(9),r=t(245),h=t(124),f=t(354),v=t(355),d=t(246),p=t(247),g=t(529),m=t(6),x=t(14),y=t(211),T=t(530),E=t(10),C=t(531),A=t(532),P=t(537),M=t(538),O=t(149),I=t(539),N=t(248),Y=t(25),X=t(3),W=t(68),H=new a({Extends:l,initialize:function(L,B){l.call(this),this.scene=L,this.bodies=new O,this.staticBodies=new O,this.pendingDestroy=new O,this.colliders=new y,this.gravity=new X(m(B,"gravity.x",0),m(B,"gravity.y",0)),this.bounds=new E(m(B,"x",0),m(B,"y",0),m(B,"width",L.sys.scale.width),m(B,"height",L.sys.scale.height)),this.checkCollision={up:m(B,"checkCollision.up",!0),down:m(B,"checkCollision.down",!0),left:m(B,"checkCollision.left",!0),right:m(B,"checkCollision.right",!0)},this.fps=m(B,"fps",60),this.fixedStep=m(B,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=m(B,"timeScale",1),this.OVERLAP_BIAS=m(B,"overlapBias",4),this.TILE_BIAS=m(B,"tileBias",16),this.forceX=m(B,"forceX",!1),this.isPaused=m(B,"isPaused",!1),this._total=0,this.drawDebug=m(B,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:m(B,"debugShowBody",!0),debugShowStaticBody:m(B,"debugShowStaticBody",!0),debugShowVelocity:m(B,"debugShowVelocity",!0),bodyDebugColor:m(B,"debugBodyColor",16711935),staticBodyDebugColor:m(B,"debugStaticBodyColor",255),velocityDebugColor:m(B,"debugVelocityColor",65280)},this.maxEntries=m(B,"maxEntries",16),this.useTree=m(B,"useTree",!0),this.tree=new C(this.maxEntries),this.staticTree=new C(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new Y,this._tempMatrix2=new Y,this.drawDebug&&this.createDebugGraphic()},enable:function(D,L){L===void 0&&(L=i.DYNAMIC_BODY),Array.isArray(D)||(D=[D]);for(var B=0;B<D.length;B++){var G=D[B];if(G.isParent)for(var w=G.getChildren(),z=0;z<w.length;z++){var U=w[z];U.isParent?this.enable(U,L):this.enableBody(U,L)}else this.enableBody(G,L)}},enableBody:function(D,L){return L===void 0&&(L=i.DYNAMIC_BODY),D.body||(L===i.DYNAMIC_BODY?D.body=new u(this,D):L===i.STATIC_BODY&&(D.body=new I(this,D))),this.add(D.body),D},add:function(D){return D.physicsType===i.DYNAMIC_BODY?this.bodies.set(D):D.physicsType===i.STATIC_BODY&&(this.staticBodies.set(D),this.staticTree.insert(D)),D.enable=!0,D},disable:function(D){Array.isArray(D)||(D=[D]);for(var L=0;L<D.length;L++){var B=D[L];if(B.isParent)for(var G=B.getChildren(),w=0;w<G.length;w++){var z=G[w];z.isParent?this.disable(z):this.disableBody(z.body)}else this.disableBody(B.body)}},disableBody:function(D){this.remove(D),D.enable=!1},remove:function(D){D.physicsType===i.DYNAMIC_BODY?(this.tree.remove(D),this.bodies.delete(D)):D.physicsType===i.STATIC_BODY&&(this.staticBodies.delete(D),this.staticTree.remove(D))},createDebugGraphic:function(){var D=this.scene.sys.add.graphics({x:0,y:0});return D.setDepth(Number.MAX_VALUE),this.debugGraphic=D,this.drawDebug=!0,D},setBounds:function(D,L,B,G,w,z,U,V){return this.bounds.setTo(D,L,B,G),w!==void 0&&this.setBoundsCollision(w,z,U,V),this},setBoundsCollision:function(D,L,B,G){return D===void 0&&(D=!0),L===void 0&&(L=!0),B===void 0&&(B=!0),G===void 0&&(G=!0),this.checkCollision.left=D,this.checkCollision.right=L,this.checkCollision.up=B,this.checkCollision.down=G,this},pause:function(){return this.isPaused=!0,this.emit(r.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(r.RESUME),this},addCollider:function(D,L,B,G,w){B===void 0&&(B=null),G===void 0&&(G=null),w===void 0&&(w=B);var z=new s(this,!1,D,L,B,G,w);return this.colliders.add(z),z},addOverlap:function(D,L,B,G,w){B===void 0&&(B=null),G===void 0&&(G=null),w===void 0&&(w=B);var z=new s(this,!0,D,L,B,G,w);return this.colliders.add(z),z},removeCollider:function(D){return this.colliders.remove(D),this},setFPS:function(D){return this.fps=D,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(D,L){if(!(this.isPaused||this.bodies.size===0)){var B,G=this._frameTime,w=this._frameTimeMS*this.timeScale;this._elapsed+=L;var z,U=this.bodies.entries,V=this._elapsed>=w;for(this.fixedStep||(G=L*.001,V=!0,this._elapsed=0),B=0;B<U.length;B++)z=U[B],z.enable&&z.preUpdate(V,G);if(V){this._elapsed-=w,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(U));var Z=this.colliders.update();for(B=0;B<Z.length;B++){var $=Z[B];$.active&&$.update()}this.emit(r.WORLD_STEP,G)}for(;this._elapsed>=w;)this._elapsed-=w,this.step(G)}},step:function(D){var L,B,G=this.bodies.entries,w=G.length;for(L=0;L<w;L++)B=G[L],B.enable&&B.update(D);this.useTree&&(this.tree.clear(),this.tree.load(G));var z=this.colliders.update();for(L=0;L<z.length;L++){var U=z[L];U.active&&U.update()}this.emit(r.WORLD_STEP,D),this.stepsLastFrame++},postUpdate:function(){var D,L,B=this.bodies.entries,G=B.length,w=this.bodies,z=this.staticBodies;if(this.stepsLastFrame)for(this.stepsLastFrame=0,D=0;D<G;D++)L=B[D],L.enable&&L.postUpdate();if(this.drawDebug){var U=this.debugGraphic;for(U.clear(),D=0;D<G;D++)L=B[D],L.willDrawDebug()&&L.drawDebug(U);for(B=z.entries,G=B.length,D=0;D<G;D++)L=B[D],L.willDrawDebug()&&L.drawDebug(U)}var V=this.pendingDestroy;if(V.size>0){var Z=this.tree,$=this.staticTree;for(B=V.entries,G=B.length,D=0;D<G;D++)L=B[D],L.physicsType===i.DYNAMIC_BODY?(Z.remove(L),w.delete(L)):L.physicsType===i.STATIC_BODY&&($.remove(L),z.delete(L)),L.world=void 0,L.gameObject=void 0;V.clear()}},updateMotion:function(D,L){D.allowRotation&&this.computeAngularVelocity(D,L),this.computeVelocity(D,L)},computeAngularVelocity:function(D,L){var B=D.angularVelocity,G=D.angularAcceleration,w=D.angularDrag,z=D.maxAngular;G?B+=G*L:D.allowDrag&&w&&(w*=L,f(B-w,0,.1)?B-=w:v(B+w,0,.1)?B+=w:B=0),B=o(B,-z,z);var U=B-D.angularVelocity;D.angularVelocity+=U,D.rotation+=D.angularVelocity*L},computeVelocity:function(D,L){var B=D.velocity.x,G=D.acceleration.x,w=D.drag.x,z=D.maxVelocity.x,U=D.velocity.y,V=D.acceleration.y,Z=D.drag.y,$=D.maxVelocity.y,Q=D.speed,j=D.maxSpeed,k=D.allowDrag,et=D.useDamping;D.allowGravity&&(B+=(this.gravity.x+D.gravity.x)*L,U+=(this.gravity.y+D.gravity.y)*L),G?B+=G*L:k&&w&&(et?(w=Math.pow(w,L),B*=w,Q=Math.sqrt(B*B+U*U),h(Q,0,.001)&&(B=0)):(w*=L,f(B-w,0,.01)?B-=w:v(B+w,0,.01)?B+=w:B=0)),V?U+=V*L:k&&Z&&(et?(Z=Math.pow(Z,L),U*=Z,Q=Math.sqrt(B*B+U*U),h(Q,0,.001)&&(U=0)):(Z*=L,f(U-Z,0,.01)?U-=Z:v(U+Z,0,.01)?U+=Z:U=0)),B=o(B,-z,z),U=o(U,-$,$),D.velocity.set(B,U),j>-1&&Q>j&&(D.velocity.normalize().scale(j),Q=j),D.speed=Q},separate:function(D,L,B,G,w,z){if(!z&&!D.enable||!L.enable||D.checkCollision.none||L.checkCollision.none||!this.intersects(D,L)||B&&B.call(G,D.gameObject,L.gameObject)===!1)return!1;if(D.isCircle&&L.isCircle)return this.separateCircle(D,L,w);if(D.isCircle!==L.isCircle){var U=D.isCircle?L:D,V=D.isCircle?D:L,Z={x:U.x,y:U.y,right:U.right,bottom:U.bottom},$=V.center;if(($.y<Z.y||$.y>Z.bottom)&&($.x<Z.x||$.x>Z.right))return this.separateCircle(D,L,w)}var Q=!1,j=!1;w?(Q=P(D,L,w,this.OVERLAP_BIAS),j=M(D,L,w,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+D.gravity.y)<Math.abs(this.gravity.x+D.gravity.x)?(Q=P(D,L,w,this.OVERLAP_BIAS),this.intersects(D,L)&&(j=M(D,L,w,this.OVERLAP_BIAS))):(j=M(D,L,w,this.OVERLAP_BIAS),this.intersects(D,L)&&(Q=P(D,L,w,this.OVERLAP_BIAS)));var k=Q||j;return k&&(w?(D.onOverlap||L.onOverlap)&&this.emit(r.OVERLAP,D.gameObject,L.gameObject,D,L):(D.onCollide||L.onCollide)&&this.emit(r.COLLIDE,D.gameObject,L.gameObject,D,L)),k},separateCircle:function(D,L,B,G){d(D,L,!1,G),p(D,L,!1,G);var w=0;if(D.isCircle!==L.isCircle){var z={x:L.isCircle?D.position.x:L.position.x,y:L.isCircle?D.position.y:L.position.y,right:L.isCircle?D.right:L.right,bottom:L.isCircle?D.bottom:L.bottom},U={x:D.isCircle?D.center.x:L.center.x,y:D.isCircle?D.center.y:L.center.y,radius:D.isCircle?D.halfWidth:L.halfWidth};U.y<z.y?U.x<z.x?w=n(U.x,U.y,z.x,z.y)-U.radius:U.x>z.right&&(w=n(U.x,U.y,z.right,z.y)-U.radius):U.y>z.bottom&&(U.x<z.x?w=n(U.x,U.y,z.x,z.bottom)-U.radius:U.x>z.right&&(w=n(U.x,U.y,z.right,z.bottom)-U.radius)),w*=-1}else w=D.halfWidth+L.halfWidth-n(D.center.x,D.center.y,L.center.x,L.center.y);if(D.overlapR=w,L.overlapR=w,B||w===0||D.immovable&&L.immovable||D.customSeparateX||L.customSeparateX)return w!==0&&(D.onOverlap||L.onOverlap)&&this.emit(r.OVERLAP,D.gameObject,L.gameObject,D,L),w!==0;var V=D.center.x-L.center.x,Z=D.center.y-L.center.y,$=Math.sqrt(Math.pow(V,2)+Math.pow(Z,2)),Q=(L.center.x-D.center.x)/$||0,j=(L.center.y-D.center.y)/$||0,k=2*(D.velocity.x*Q+D.velocity.y*j-L.velocity.x*Q-L.velocity.y*j)/(D.mass+L.mass);(D.immovable||L.immovable)&&(k*=2),D.immovable||(D.velocity.x=D.velocity.x-k/D.mass*Q,D.velocity.y=D.velocity.y-k/D.mass*j),L.immovable||(L.velocity.x=L.velocity.x+k/L.mass*Q,L.velocity.y=L.velocity.y+k/L.mass*j),!D.immovable&&!L.immovable&&(w/=2);var et=e(D.center,L.center),_=(w+x.EPSILON)*Math.cos(et),nt=(w+x.EPSILON)*Math.sin(et);return D.immovable||(D.x-=_,D.y-=nt,D.updateCenter()),L.immovable||(L.x+=_,L.y+=nt,L.updateCenter()),D.velocity.x*=D.bounce.x,D.velocity.y*=D.bounce.y,L.velocity.x*=L.bounce.x,L.velocity.y*=L.bounce.y,(D.onCollide||L.onCollide)&&this.emit(r.COLLIDE,D.gameObject,L.gameObject,D,L),!0},intersects:function(D,L){return D===L?!1:!D.isCircle&&!L.isCircle?!(D.right<=L.position.x||D.bottom<=L.position.y||D.position.x>=L.right||D.position.y>=L.bottom):D.isCircle?L.isCircle?n(D.center.x,D.center.y,L.center.x,L.center.y)<=D.halfWidth+L.halfWidth:this.circleBodyIntersects(D,L):this.circleBodyIntersects(L,D)},circleBodyIntersects:function(D,L){var B=o(D.center.x,L.left,L.right),G=o(D.center.y,L.top,L.bottom),w=(D.center.x-B)*(D.center.x-B),z=(D.center.y-G)*(D.center.y-G);return w+z<=D.halfWidth*D.halfWidth},overlap:function(D,L,B,G,w){return B===void 0&&(B=null),G===void 0&&(G=null),w===void 0&&(w=B),this.collideObjects(D,L,B,G,w,!0)},collide:function(D,L,B,G,w){return B===void 0&&(B=null),G===void 0&&(G=null),w===void 0&&(w=B),this.collideObjects(D,L,B,G,w,!1)},collideObjects:function(D,L,B,G,w,z){var U,V;D.isParent&&D.physicsType===void 0&&(D=D.children.entries),L&&L.isParent&&L.physicsType===void 0&&(L=L.children.entries);var Z=Array.isArray(D),$=Array.isArray(L);if(this._total=0,!Z&&!$)this.collideHandler(D,L,B,G,w,z);else if(!Z&&$)for(U=0;U<L.length;U++)this.collideHandler(D,L[U],B,G,w,z);else if(Z&&!$)if(L)for(U=0;U<D.length;U++)this.collideHandler(D[U],L,B,G,w,z);else for(U=0;U<D.length;U++){var Q=D[U];for(V=U+1;V<D.length;V++)U!==V&&this.collideHandler(Q,D[V],B,G,w,z)}else for(U=0;U<D.length;U++)for(V=0;V<L.length;V++)this.collideHandler(D[U],L[V],B,G,w,z);return this._total>0},collideHandler:function(D,L,B,G,w,z){if(L===void 0&&D.isParent)return this.collideGroupVsGroup(D,D,B,G,w,z);if(!D||!L)return!1;if(D.body){if(L.body)return this.collideSpriteVsSprite(D,L,B,G,w,z);if(L.isParent)return this.collideSpriteVsGroup(D,L,B,G,w,z);if(L.isTilemap)return this.collideSpriteVsTilemapLayer(D,L,B,G,w,z)}else if(D.isParent){if(L.body)return this.collideSpriteVsGroup(L,D,B,G,w,z);if(L.isParent)return this.collideGroupVsGroup(D,L,B,G,w,z);if(L.isTilemap)return this.collideGroupVsTilemapLayer(D,L,B,G,w,z)}else if(D.isTilemap){if(L.body)return this.collideSpriteVsTilemapLayer(L,D,B,G,w,z);if(L.isParent)return this.collideGroupVsTilemapLayer(L,D,B,G,w,z)}},collideSpriteVsSprite:function(D,L,B,G,w,z){return!D.body||!L.body?!1:(this.separate(D.body,L.body,G,w,z)&&(B&&B.call(w,D,L),this._total++),!0)},collideSpriteVsGroup:function(D,L,B,G,w,z){var U=D.body;if(!(L.length===0||!U||!U.enable||U.checkCollision.none)){var V,Z,$;if(this.useTree||L.physicsType===i.STATIC_BODY){var Q=this.treeMinMax;Q.minX=U.left,Q.minY=U.top,Q.maxX=U.right,Q.maxY=U.bottom;var j=L.physicsType===i.DYNAMIC_BODY?this.tree.search(Q):this.staticTree.search(Q);for(Z=j.length,V=0;V<Z;V++)$=j[V],!(U===$||!$.enable||$.checkCollision.none||!L.contains($.gameObject))&&this.separate(U,$,G,w,z,!0)&&(B&&B.call(w,U.gameObject,$.gameObject),this._total++)}else{var k=L.getChildren(),et=L.children.entries.indexOf(D);for(Z=k.length,V=0;V<Z;V++)$=k[V].body,!(!$||V===et||!$.enable)&&this.separate(U,$,G,w,z)&&(B&&B.call(w,U.gameObject,$.gameObject),this._total++)}}},collideGroupVsTilemapLayer:function(D,L,B,G,w,z){var U=D.getChildren();if(U.length===0)return!1;for(var V=!1,Z=0;Z<U.length;Z++)U[Z].body&&this.collideSpriteVsTilemapLayer(U[Z],L,B,G,w,z)&&(V=!0);return V},collideTiles:function(D,L,B,G,w){return!D.body.enable||L.length===0?!1:this.collideSpriteVsTilesHandler(D,L,B,G,w,!1,!1)},overlapTiles:function(D,L,B,G,w){return!D.body.enable||L.length===0?!1:this.collideSpriteVsTilesHandler(D,L,B,G,w,!0,!1)},collideSpriteVsTilemapLayer:function(D,L,B,G,w,z){var U=D.body;if(!U.enable||U.checkCollision.none)return!1;var V=U.position.x,Z=U.position.y,$=U.width,Q=U.height,j=L.layer;if(j.tileWidth>j.baseTileWidth){var k=(j.tileWidth-j.baseTileWidth)*L.scaleX;V-=k,$+=k}if(j.tileHeight>j.baseTileHeight){var et=(j.tileHeight-j.baseTileHeight)*L.scaleY;Q+=et}var _=g(V,Z,$,Q,null,L.scene.cameras.main,L.layer);return _.length===0?!1:this.collideSpriteVsTilesHandler(D,_,B,G,w,z,!0)},collideSpriteVsTilesHandler:function(D,L,B,G,w,z,U){for(var V=D.body,Z,$={left:0,right:0,top:0,bottom:0},Q,j=!1,k=0;k<L.length;k++){Z=L[k],Q=Z.tilemapLayer;var et=Q.tileToWorldXY(Z.x,Z.y);$.left=et.x,$.top=et.y,Z.baseHeight!==Z.height&&($.top-=(Z.height-Z.baseHeight)*Q.scaleY),$.right=$.left+Z.width*Q.scaleX,$.bottom=$.top+Z.height*Q.scaleY,N($,V)&&(!G||G.call(w,D,Z))&&T(Z,D)&&(z||A(k,V,Z,$,Q,this.TILE_BIAS,U))&&(this._total++,j=!0,B&&B.call(w,D,Z),z&&V.onOverlap?this.emit(r.TILE_OVERLAP,D,Z,V):V.onCollide&&this.emit(r.TILE_COLLIDE,D,Z,V))}return j},collideGroupVsGroup:function(D,L,B,G,w,z){if(!(D.length===0||L.length===0))for(var U=D.getChildren(),V=0;V<U.length;V++)this.collideSpriteVsGroup(U[V],L,B,G,w,z)},wrap:function(D,L){D.body?this.wrapObject(D,L):D.getChildren?this.wrapArray(D.getChildren(),L):Array.isArray(D)?this.wrapArray(D,L):this.wrapObject(D,L)},wrapArray:function(D,L){for(var B=0;B<D.length;B++)this.wrapObject(D[B],L)},wrapObject:function(D,L){L===void 0&&(L=0),D.x=W(D.x,this.bounds.left-L,this.bounds.right+L),D.y=W(D.y,this.bounds.top-L,this.bounds.bottom+L)},shutdown:function(){this.tree.clear(),this.staticTree.clear(),this.bodies.clear(),this.staticBodies.clear(),this.colliders.destroy(),this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=null}});c.exports=H},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Benjamin D. Richards <benjamindrichards@gmail.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(62),o=t(245),a=t(196),s=t(10),i=t(57),n=t(3),l=new e({initialize:function(h,f){var v=f.displayWidth?f.displayWidth:64,d=f.displayHeight?f.displayHeight:64;this.world=h,this.gameObject=f,this.transform={x:f.x,y:f.y,rotation:f.angle,scaleX:f.scaleX,scaleY:f.scaleY,displayOriginX:f.displayOriginX,displayOriginY:f.displayOriginY},this.debugShowBody=h.defaults.debugShowBody,this.debugShowVelocity=h.defaults.debugShowVelocity,this.debugBodyColor=h.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new n,this.position=new n(f.x-f.scaleX*f.displayOriginX,f.y-f.scaleY*f.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=f.angle,this.preRotation=f.angle,this.width=v,this.height=d,this.sourceWidth=v,this.sourceHeight=d,f.frame&&(this.sourceWidth=f.frame.realWidth,this.sourceHeight=f.frame.realHeight),this.halfWidth=Math.abs(v/2),this.halfHeight=Math.abs(d/2),this.center=new n(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new n,this.newVelocity=new n,this.deltaMax=new n,this.acceleration=new n,this.allowDrag=!0,this.drag=new n,this.allowGravity=!0,this.gravity=new n,this.bounce=new n,this.worldBounce=null,this.customBoundsRectangle=h.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new n(1e4,1e4),this.maxSpeed=-1,this.friction=new n(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=u.FACING_NONE,this.immovable=!1,this.pushable=!0,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=u.DYNAMIC_BODY,this._sx=f.scaleX,this._sy=f.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new s},updateBounds:function(){var r=this.gameObject,h=this.transform;if(r.parentContainer){var f=r.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);h.x=f.tx,h.y=f.ty,h.rotation=a(f.rotation),h.scaleX=f.scaleX,h.scaleY=f.scaleY,h.displayOriginX=r.displayOriginX,h.displayOriginY=r.displayOriginY}else h.x=r.x,h.y=r.y,h.rotation=r.angle,h.scaleX=r.scaleX,h.scaleY=r.scaleY,h.displayOriginX=r.displayOriginX,h.displayOriginY=r.displayOriginY;var v=!1;if(this.syncBounds){var d=r.getBounds(this._bounds);this.width=d.width,this.height=d.height,v=!0}else{var p=Math.abs(h.scaleX),g=Math.abs(h.scaleY);(this._sx!==p||this._sy!==g)&&(this.width=this.sourceWidth*p,this.height=this.sourceHeight*g,this._sx=p,this._sy=g,v=!0)}v&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var r=this.transform;this.position.x=r.x+r.scaleX*(this.offset.x-r.displayOriginX),this.position.y=r.y+r.scaleY*(this.offset.y-r.displayOriginY),this.updateCenter()},resetFlags:function(r){r===void 0&&(r=!1);var h=this.wasTouching,f=this.touching,v=this.blocked;r?(h.none=!0,h.up=!1,h.down=!1,h.left=!1,h.right=!1):(h.none=f.none,h.up=f.up,h.down=f.down,h.left=f.left,h.right=f.right),f.none=!0,f.up=!1,f.down=!1,f.left=!1,f.right=!1,v.none=!0,v.up=!1,v.down=!1,v.left=!1,v.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(r,h){r&&this.resetFlags(),this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),r&&this.update(h)},update:function(r){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,r);var h=this.velocity.x,f=this.velocity.y;this.newVelocity.set(h*r,f*r),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(f,h),this.speed=Math.sqrt(h*h+f*f),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(o.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var r=this.position.x-this.prevFrame.x,h=this.position.y-this.prevFrame.y;if(this.moves){var f=this.deltaMax.x,v=this.deltaMax.y;f!==0&&r!==0&&(r<0&&r<-f?r=-f:r>0&&r>f&&(r=f)),v!==0&&h!==0&&(h<0&&h<-v?h=-v:h>0&&h>v&&(h=v)),this.gameObject.x+=r,this.gameObject.y+=h}r<0?this.facing=u.FACING_LEFT:r>0&&(this.facing=u.FACING_RIGHT),h<0?this.facing=u.FACING_UP:h>0&&(this.facing=u.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=r,this._ty=h},setBoundsRectangle:function(r){return this.customBoundsRectangle=r||this.world.bounds,this},checkWorldBounds:function(){var r=this.position,h=this.customBoundsRectangle,f=this.world.checkCollision,v=this.worldBounce?-this.worldBounce.x:-this.bounce.x,d=this.worldBounce?-this.worldBounce.y:-this.bounce.y,p=!1;return r.x<h.x&&f.left?(r.x=h.x,this.velocity.x*=v,this.blocked.left=!0,p=!0):this.right>h.right&&f.right&&(r.x=h.right-this.width,this.velocity.x*=v,this.blocked.right=!0,p=!0),r.y<h.y&&f.up?(r.y=h.y,this.velocity.y*=d,this.blocked.up=!0,p=!0):this.bottom>h.bottom&&f.down&&(r.y=h.bottom-this.height,this.velocity.y*=d,this.blocked.down=!0,p=!0),p&&(this.blocked.none=!1,this.updateCenter()),p},setOffset:function(r,h){return h===void 0&&(h=r),this.offset.set(r,h),this},setSize:function(r,h,f){f===void 0&&(f=!0);var v=this.gameObject;if(!r&&v.frame&&(r=v.frame.realWidth),!h&&v.frame&&(h=v.frame.realHeight),this.sourceWidth=r,this.sourceHeight=h,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),f&&v.getCenter){var d=(v.width-r)/2,p=(v.height-h)/2;this.offset.set(d,p)}return this.isCircle=!1,this.radius=0,this},setCircle:function(r,h,f){return h===void 0&&(h=this.offset.x),f===void 0&&(f=this.offset.y),r>0?(this.isCircle=!0,this.radius=r,this.sourceWidth=r*2,this.sourceHeight=r*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(h,f),this.updateCenter()):this.isCircle=!1,this},reset:function(r,h){this.stop();var f=this.gameObject;f.setPosition(r,h),f.getTopLeft?f.getTopLeft(this.position):this.position.set(r,h),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=f.angle,this.preRotation=f.angle,this.updateBounds(),this.updateCenter(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(r){return r.x=this.x,r.y=this.y,r.right=this.right,r.bottom=this.bottom,r},hitTest:function(r,h){if(!this.isCircle)return i(this,r,h);if(this.radius>0&&r>=this.left&&r<=this.right&&h>=this.top&&h<=this.bottom){var f=(this.center.x-r)*(this.center.x-r),v=(this.center.y-h)*(this.center.y-h);return f+v<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(r){var h=this.position,f=h.x+this.halfWidth,v=h.y+this.halfHeight;this.debugShowBody&&(r.lineStyle(r.defaultStrokeWidth,this.debugBodyColor),this.isCircle?r.strokeCircle(f,v,this.width/2):(this.checkCollision.up&&r.lineBetween(h.x,h.y,h.x+this.width,h.y),this.checkCollision.right&&r.lineBetween(h.x+this.width,h.y,h.x+this.width,h.y+this.height),this.checkCollision.down&&r.lineBetween(h.x,h.y+this.height,h.x+this.width,h.y+this.height),this.checkCollision.left&&r.lineBetween(h.x,h.y,h.x,h.y+this.height))),this.debugShowVelocity&&(r.lineStyle(r.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),r.lineBetween(f,v,f+this.velocity.x/2,v+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(r,h,f,v){r===void 0&&(r=!0),this.collideWorldBounds=r;var d=h!==void 0,p=f!==void 0;return(d||p)&&(this.worldBounce||(this.worldBounce=new n),d&&(this.worldBounce.x=h),p&&(this.worldBounce.y=f)),v!==void 0&&(this.onWorldBounds=v),this},setVelocity:function(r,h){return this.velocity.set(r,h),r=this.velocity.x,h=this.velocity.y,this.speed=Math.sqrt(r*r+h*h),this},setVelocityX:function(r){this.velocity.x=r;var h=r,f=this.velocity.y;return this.speed=Math.sqrt(h*h+f*f),this},setVelocityY:function(r){this.velocity.y=r;var h=this.velocity.x,f=r;return this.speed=Math.sqrt(h*h+f*f),this},setMaxVelocity:function(r,h){return this.maxVelocity.set(r,h),this},setMaxVelocityX:function(r){return this.maxVelocity.x=r,this},setMaxVelocityY:function(r){return this.maxVelocity.y=r,this},setMaxSpeed:function(r){return this.maxSpeed=r,this},setBounce:function(r,h){return this.bounce.set(r,h),this},setBounceX:function(r){return this.bounce.x=r,this},setBounceY:function(r){return this.bounce.y=r,this},setAcceleration:function(r,h){return this.acceleration.set(r,h),this},setAccelerationX:function(r){return this.acceleration.x=r,this},setAccelerationY:function(r){return this.acceleration.y=r,this},setAllowDrag:function(r){return r===void 0&&(r=!0),this.allowDrag=r,this},setAllowGravity:function(r){return r===void 0&&(r=!0),this.allowGravity=r,this},setAllowRotation:function(r){return r===void 0&&(r=!0),this.allowRotation=r,this},setDrag:function(r,h){return this.drag.set(r,h),this},setDamping:function(r){return this.useDamping=r,this},setDragX:function(r){return this.drag.x=r,this},setDragY:function(r){return this.drag.y=r,this},setGravity:function(r,h){return this.gravity.set(r,h),this},setGravityX:function(r){return this.gravity.x=r,this},setGravityY:function(r){return this.gravity.y=r,this},setFriction:function(r,h){return this.friction.set(r,h),this},setFrictionX:function(r){return this.friction.x=r,this},setFrictionY:function(r){return this.friction.y=r,this},setAngularVelocity:function(r){return this.angularVelocity=r,this},setAngularAcceleration:function(r){return this.angularAcceleration=r,this},setAngularDrag:function(r){return this.angularDrag=r,this},setMass:function(r){return this.mass=r,this},setImmovable:function(r){return r===void 0&&(r=!0),this.immovable=r,this},setEnable:function(r){return r===void 0&&(r=!0),this.enable=r,this},processX:function(r,h,f,v){this.x+=r,this.updateCenter(),h!==null&&(this.velocity.x=h);var d=this.blocked;f&&(d.left=!0),v&&(d.right=!0)},processY:function(r,h,f,v){this.y+=r,this.updateCenter(),h!==null&&(this.velocity.y=h);var d=this.blocked;f&&(d.up=!0),v&&(d.down=!0)},x:{get:function(){return this.position.x},set:function(r){this.position.x=r}},y:{get:function(){return this.position.y},set:function(r){this.position.y=r}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s,i,n,l,r,h){this.world=a,this.name="",this.active=!0,this.overlapOnly=s,this.object1=i,this.object2=n,this.collideCallback=l,this.processCallback=r,this.callbackContext=h},setName:function(o){return this.name=o,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=t(3),o=new u,a=new u,s=function(i,n,l,r,h,f,v){var d=v.tilemapLayer.tilemap._convert.WorldToTileXY;d(i,n,!0,o,f,v);var p=o.x,g=o.y;d(i+l,n+r,!1,a,f,v);var m=Math.ceil(a.x),x=Math.ceil(a.y);return e(p,g,m-p,x-g,h,v)};c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.collisionCallback?!e.collisionCallback.call(e.collisionCallbackContext,u,e):e.layer.callbacks[e.index]?!e.layer.callbacks[e.index].callback.call(e.layer.callbacks[e.index].callbackContext,u,e):!0};c.exports=t},function(c,S,t){/**
 * @author       Vladimir Agafonkin
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(436);function u(x){var y=[".left",".top",".right",".bottom"];if(!(this instanceof u))return new u(x,y);this._maxEntries=Math.max(4,x||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}u.prototype={all:function(){return this._all(this.data,[])},search:function(x){var y=this.data,T=[],E=this.toBBox;if(!p(x,y))return T;for(var C=[],A,P,M,O;y;){for(A=0,P=y.children.length;A<P;A++)M=y.children[A],O=y.leaf?E(M):M,p(x,O)&&(y.leaf?T.push(M):d(x,O)?this._all(M,T):C.push(M));y=C.pop()}return T},collides:function(x){var y=this.data,T=this.toBBox;if(!p(x,y))return!1;for(var E=[],C,A,P,M;y;){for(C=0,A=y.children.length;C<A;C++)if(P=y.children[C],M=y.leaf?T(P):P,p(x,M)){if(y.leaf||d(x,M))return!0;E.push(P)}y=E.pop()}return!1},load:function(x){if(!(x&&x.length))return this;if(x.length<this._minEntries){for(var y=0,T=x.length;y<T;y++)this.insert(x[y]);return this}var E=this._build(x.slice(),0,x.length-1,0);if(!this.data.children.length)this.data=E;else if(this.data.height===E.height)this._splitRoot(this.data,E);else{if(this.data.height<E.height){var C=this.data;this.data=E,E=C}this._insert(E,this.data.height-E.height-1,!0)}return this},insert:function(x){return x&&this._insert(x,this.data.height-1),this},clear:function(){return this.data=g([]),this},remove:function(x,y){if(!x)return this;for(var T=this.data,E=this.toBBox(x),C=[],A=[],P,M,O,I;T||C.length;){if(T||(T=C.pop(),M=C[C.length-1],P=A.pop(),I=!0),T.leaf&&(O=o(x,T.children,y),O!==-1))return T.children.splice(O,1),C.push(T),this._condense(C),this;!I&&!T.leaf&&d(T,E)?(C.push(T),A.push(P),P=0,M=T,T=T.children[0]):M?(P++,T=M.children[P],I=!1):T=null}return this},toBBox:function(x){return x},compareMinX:n,compareMinY:l,toJSON:function(){return this.data},fromJSON:function(x){return this.data=x,this},_all:function(x,y){for(var T=[];x;)x.leaf?y.push.apply(y,x.children):T.push.apply(T,x.children),x=T.pop();return y},_build:function(x,y,T,E){var C=T-y+1,A=this._maxEntries,P;if(C<=A)return P=g(x.slice(y,T+1)),a(P,this.toBBox),P;E||(E=Math.ceil(Math.log(C)/Math.log(A)),A=Math.ceil(C/Math.pow(A,E-1))),P=g([]),P.leaf=!1,P.height=E;var M=Math.ceil(C/A),O=M*Math.ceil(Math.sqrt(A)),I,N,Y,X;for(m(x,y,T,O,this.compareMinX),I=y;I<=T;I+=O)for(Y=Math.min(I+O-1,T),m(x,I,Y,M,this.compareMinY),N=I;N<=Y;N+=M)X=Math.min(N+M-1,Y),P.children.push(this._build(x,N,X,E-1));return a(P,this.toBBox),P},_chooseSubtree:function(x,y,T,E){for(var C,A,P,M,O,I,N,Y;E.push(y),!(y.leaf||E.length-1===T);){for(N=Y=1/0,C=0,A=y.children.length;C<A;C++)P=y.children[C],O=r(P),I=f(x,P)-O,I<Y?(Y=I,N=O<N?O:N,M=P):I===Y&&O<N&&(N=O,M=P);y=M||y.children[0]}return y},_insert:function(x,y,T){var E=this.toBBox,C=T?x:E(x),A=[],P=this._chooseSubtree(C,this.data,y,A);for(P.children.push(x),i(P,C);y>=0&&A[y].children.length>this._maxEntries;)this._split(A,y),y--;this._adjustParentBBoxes(C,A,y)},_split:function(x,y){var T=x[y],E=T.children.length,C=this._minEntries;this._chooseSplitAxis(T,C,E);var A=this._chooseSplitIndex(T,C,E),P=g(T.children.splice(A,T.children.length-A));P.height=T.height,P.leaf=T.leaf,a(T,this.toBBox),a(P,this.toBBox),y?x[y-1].children.push(P):this._splitRoot(T,P)},_splitRoot:function(x,y){this.data=g([x,y]),this.data.height=x.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(x,y,T){var E,C,A,P,M,O,I,N;for(O=I=1/0,E=y;E<=T-y;E++)C=s(x,0,E,this.toBBox),A=s(x,E,T,this.toBBox),P=v(C,A),M=r(C)+r(A),P<O?(O=P,N=E,I=M<I?M:I):P===O&&M<I&&(I=M,N=E);return N},_chooseSplitAxis:function(x,y,T){var E=x.leaf?this.compareMinX:n,C=x.leaf?this.compareMinY:l,A=this._allDistMargin(x,y,T,E),P=this._allDistMargin(x,y,T,C);A<P&&x.children.sort(E)},_allDistMargin:function(x,y,T,E){x.children.sort(E);var C=this.toBBox,A=s(x,0,y,C),P=s(x,T-y,T,C),M=h(A)+h(P),O,I;for(O=y;O<T-y;O++)I=x.children[O],i(A,x.leaf?C(I):I),M+=h(A);for(O=T-y-1;O>=y;O--)I=x.children[O],i(P,x.leaf?C(I):I),M+=h(P);return M},_adjustParentBBoxes:function(x,y,T){for(var E=T;E>=0;E--)i(y[E],x)},_condense:function(x){for(var y=x.length-1,T;y>=0;y--)x[y].children.length===0?y>0?(T=x[y-1].children,T.splice(T.indexOf(x[y]),1)):this.clear():a(x[y],this.toBBox)},compareMinX:function(x,y){return x.left-y.left},compareMinY:function(x,y){return x.top-y.top},toBBox:function(x){return{minX:x.left,minY:x.top,maxX:x.right,maxY:x.bottom}}};function o(x,y,T){if(!T)return y.indexOf(x);for(var E=0;E<y.length;E++)if(T(x,y[E]))return E;return-1}function a(x,y){s(x,0,x.children.length,y,x)}function s(x,y,T,E,C){C||(C=g(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var A=y,P;A<T;A++)P=x.children[A],i(C,x.leaf?E(P):P);return C}function i(x,y){return x.minX=Math.min(x.minX,y.minX),x.minY=Math.min(x.minY,y.minY),x.maxX=Math.max(x.maxX,y.maxX),x.maxY=Math.max(x.maxY,y.maxY),x}function n(x,y){return x.minX-y.minX}function l(x,y){return x.minY-y.minY}function r(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function h(x){return x.maxX-x.minX+(x.maxY-x.minY)}function f(x,y){return(Math.max(y.maxX,x.maxX)-Math.min(y.minX,x.minX))*(Math.max(y.maxY,x.maxY)-Math.min(y.minY,x.minY))}function v(x,y){var T=Math.max(x.minX,y.minX),E=Math.max(x.minY,y.minY),C=Math.min(x.maxX,y.maxX),A=Math.min(x.maxY,y.maxY);return Math.max(0,C-T)*Math.max(0,A-E)}function d(x,y){return x.minX<=y.minX&&x.minY<=y.minY&&y.maxX<=x.maxX&&y.maxY<=x.maxY}function p(x,y){return y.minX<=x.maxX&&y.minY<=x.maxY&&y.maxX>=x.minX&&y.maxY>=x.minY}function g(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(x,y,T,E,C){for(var A=[y,T],P;A.length;)T=A.pop(),y=A.pop(),!(T-y<=E)&&(P=y+Math.ceil((T-y)/E/2)*E,e(x,P,y,T,C),A.push(y,P,P,T))}c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(533),u=t(535),o=t(248),a=function(s,i,n,l,r,h,f){var v=l.left,d=l.top,p=l.right,g=l.bottom,m=n.faceLeft||n.faceRight,x=n.faceTop||n.faceBottom;if(f||(m=!0,x=!0),!m&&!x)return!1;var y=0,T=0,E=0,C=1;if(i.deltaAbsX()>i.deltaAbsY()?E=-1:i.deltaAbsX()<i.deltaAbsY()&&(C=-1),i.deltaX()!==0&&i.deltaY()!==0&&m&&x&&(E=Math.min(Math.abs(i.position.x-p),Math.abs(i.right-v)),C=Math.min(Math.abs(i.position.y-g),Math.abs(i.bottom-d))),E<C){if(m&&(y=e(i,n,v,p,h,f),y!==0&&!o(l,i)))return!0;x&&(T=u(i,n,d,g,h,f))}else{if(x&&(T=u(i,n,d,g,h,f),T!==0&&!o(l,i)))return!0;m&&(y=e(i,n,v,p,h,f))}return y!==0||T!==0};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(534),u=function(o,a,s,i,n,l){var r=0,h=a.faceLeft,f=a.faceRight,v=a.collideLeft,d=a.collideRight;return l||(h=!0,f=!0,v=!0,d=!0),o.deltaX()<0&&d&&o.checkCollision.left?f&&o.x<i&&(r=o.x-i,r<-n&&(r=0)):o.deltaX()>0&&v&&o.checkCollision.right&&h&&o.right>s&&(r=o.right-s,r>n&&(r=0)),r!==0&&(o.customSeparateX?o.overlapX=r:e(o,r)),r};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u<0?(e.blocked.none=!1,e.blocked.left=!0):u>0&&(e.blocked.none=!1,e.blocked.right=!0),e.position.x-=u,e.bounce.x===0?e.velocity.x=0:e.velocity.x=-e.velocity.x*e.bounce.x};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(536),u=function(o,a,s,i,n,l){var r=0,h=a.faceTop,f=a.faceBottom,v=a.collideUp,d=a.collideDown;return l||(h=!0,f=!0,v=!0,d=!0),o.deltaY()<0&&d&&o.checkCollision.up?f&&o.y<i&&(r=o.y-i,r<-n&&(r=0)):o.deltaY()>0&&v&&o.checkCollision.down&&h&&o.bottom>s&&(r=o.bottom-s,r>n&&(r=0)),r!==0&&(o.customSeparateY?o.overlapY=r:e(o,r)),r};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u<0?(e.blocked.none=!1,e.blocked.up=!0):u>0&&(e.blocked.none=!1,e.blocked.down=!0),e.position.y-=u,e.bounce.y===0?e.velocity.y=0:e.velocity.y=-e.velocity.y*e.bounce.y};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(246),u=t(1389),o=function(a,s,i,n){var l=e(a,s,i,n),r=a.immovable,h=s.immovable;if(i||l===0||r&&h||a.customSeparateX||s.customSeparateX)return l!==0||a.embedded&&s.embedded;var f=u.Set(a,s,l);return!r&&!h?f>0?!0:u.Check():(r?u.RunImmovableBody1(f):h&&u.RunImmovableBody2(f),!0)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(247),u=t(1390),o=function(a,s,i,n){var l=e(a,s,i,n),r=a.immovable,h=s.immovable;if(i||l===0||r&&h||a.customSeparateY||s.customSeparateY)return l!==0||a.embedded&&s.embedded;var f=u.Set(a,s,l);return!r&&!h?f>0?!0:u.Check():(r?u.RunImmovableBody1(f):h&&u.RunImmovableBody2(f),!0)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(66),u=t(0),o=t(62),a=t(57),s=t(3),i=new u({initialize:function(l,r){var h=r.displayWidth?r.displayWidth:64,f=r.displayHeight?r.displayHeight:64;this.world=l,this.gameObject=r,this.debugShowBody=l.defaults.debugShowStaticBody,this.debugBodyColor=l.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new s,this.position=new s(r.x-h*r.originX,r.y-f*r.originY),this.width=h,this.height=f,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=s.ZERO,this.allowGravity=!1,this.gravity=s.ZERO,this.bounce=s.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=o.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(n,l){return n&&n!==this.gameObject&&(this.gameObject.body=null,n.body=this,this.gameObject=n),l&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var n=this.gameObject;return n.getTopLeft(this.position),this.width=n.displayWidth,this.height=n.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(n,l){return l===void 0&&(l=n),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n,l),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(n,l,r){r===void 0&&(r=!0);var h=this.gameObject;if(!n&&h.frame&&(n=h.frame.realWidth),!l&&h.frame&&(l=h.frame.realHeight),this.world.staticTree.remove(this),this.width=n,this.height=l,this.halfWidth=Math.floor(n/2),this.halfHeight=Math.floor(l/2),r&&h.getCenter){var f=h.displayWidth/2,v=h.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(f-this.halfWidth,v-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(n,l,r){return l===void 0&&(l=this.offset.x),r===void 0&&(r=this.offset.y),n>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=n,this.width=n*2,this.height=n*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(l,r),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(n,l){var r=this.gameObject;n===void 0&&(n=r.x),l===void 0&&(l=r.y),this.world.staticTree.remove(this),r.setPosition(n,l),r.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(n){return n.x=this.x,n.y=this.y,n.right=this.right,n.bottom=this.bottom,n},hitTest:function(n,l){return this.isCircle?e(this,n,l):a(this,n,l)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(n){var l=this.position,r=l.x+this.halfWidth,h=l.y+this.halfHeight;this.debugShowBody&&(n.lineStyle(n.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?n.strokeCircle(r,h,this.width/2):n.strokeRect(l.x,l.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(n){return n<=0&&(n=.1),this.mass=n,this},x:{get:function(){return this.position.x},set:function(n){this.world.staticTree.remove(this),this.position.x=n,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(n){this.world.staticTree.remove(this),this.position.y=n,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});c.exports=i},function(c,S,t){/**
* @author       Richard Davey <rich@photonstorm.com>
* @copyright    2020 Photon Storm Ltd.
* @license      {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
*/var e=t(0),u=new e({initialize:function(a){this.pluginManager=a,this.game=a.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=new e,o=function(a,s,i,n){var l=i.tilemapLayer,r=l.cullPaddingX,h=l.cullPaddingY,f=l.tilemap.tileToWorldXY(a,s,u,n,l);return f.x>n.worldView.x+l.scaleX*i.tileWidth*(-r-.5)&&f.x<n.worldView.right+l.scaleX*i.tileWidth*(r-.5)&&f.y>n.worldView.y+l.scaleY*i.tileHeight*(-h-1)&&f.y<n.worldView.bottom+l.scaleY*i.tileHeight*(h-.5)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=function(o,a,s,i,n,l,r){for(var h=e(s,i,n,l,null,r),f=0;f<h.length;f++)h[f]&&h[f].index===o&&(h[f].index=a)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=t(139),o=t(76),a=new e,s=function(i,n){var l=i.tilemapLayer.tilemap,r=i.tilemapLayer,h=Math.floor(l.tileWidth*r.scaleX),f=Math.floor(l.tileHeight*r.scaleY),v=o(n.worldView.x-r.x,h,0,!0)-r.cullPaddingX,d=u(n.worldView.right-r.x,h,0,!0)+r.cullPaddingX,p=o(n.worldView.y-r.y,f,0,!0)-r.cullPaddingY,g=u(n.worldView.bottom-r.y,f,0,!0)+r.cullPaddingY;return a.setTo(v,p,d-v,g-p)};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(543),u=t(159),o=function(a,s,i,n){i===void 0&&(i=[]),n===void 0&&(n=0),i.length=0;var l=a.tilemapLayer,r=e(a,s);return(l.skipCull||l.scrollFactorX!==1||l.scrollFactorY!==1)&&(r.left=0,r.right=a.width,r.top=0,r.bottom=a.height),u(a,r,n,i),i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(546),u=t(159),o=function(a,s,i,n){i===void 0&&(i=[]),n===void 0&&(n=0),i.length=0;var l=a.tilemapLayer;if(!l.skipCull&&l.scrollFactorX===1&&l.scrollFactorY===1){var r=e(a,s);u(a,r,n,i)}return i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(139),u=t(76),o=function(a,s){var i=a.tilemapLayer.tilemap,n=a.tilemapLayer,l=Math.floor(i.tileWidth*n.scaleX),r=Math.floor(i.tileHeight*n.scaleY),h=a.hexSideLength,f=(r-h)/2+h,v=u(s.worldView.x-n.x,l,0,!0)-n.cullPaddingX,d=e(s.worldView.right-n.x,l,0,!0)+n.cullPaddingX,p=u(s.worldView.y-n.y,f,0,!0)-n.cullPaddingY,g=e(s.worldView.bottom-n.y,f,0,!0)+n.cullPaddingY;return{left:v,right:d,top:p,bottom:g}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(541),u=function(o,a,s,i){s===void 0&&(s=[]),i===void 0&&(i=0),s.length=0;var n=o.tilemapLayer,l=o.data,r=o.width,h=o.height,f=0,v=r,d=0,p=h;if(!n.skipCull){var g,m,x;if(i===0){for(m=d;m<p;m++)for(g=f;l[m]&&g<v;g++)if(e(g,m,o,a)){if(x=l[m][g],!x||x.index===-1||!x.visible||x.alpha===0)continue;s.push(x)}}else if(i===1){for(m=d;m<p;m++)for(g=v;l[m]&&g>=f;g--)if(e(g,m,o,a)){if(x=l[m][g],!x||x.index===-1||!x.visible||x.alpha===0)continue;s.push(x)}}else if(i===2){for(m=p;m>=d;m--)for(g=f;l[m]&&g<v;g++)if(e(g,m,o,a)){if(x=l[m][g],!x||x.index===-1||!x.visible||x.alpha===0)continue;s.push(x)}}else if(i===3){for(m=p;m>=d;m--)for(g=v;l[m]&&g>=f;g--)if(e(g,m,o,a)){if(x=l[m][g],!x||x.index===-1||!x.visible||x.alpha===0)continue;s.push(x)}}}return n.tilesDrawn=s.length,n.tilesTotal=r*h,s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(549),u=t(159),o=function(a,s,i,n){i===void 0&&(i=[]),n===void 0&&(n=0),i.length=0;var l=a.tilemapLayer;if(!l.skipCull&&l.scrollFactorX===1&&l.scrollFactorY===1){var r=e(a,s);u(a,r,n,i)}return i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(139),u=t(76),o=function(a,s){var i=a.tilemapLayer.tilemap,n=a.tilemapLayer,l=Math.floor(i.tileWidth*n.scaleX),r=Math.floor(i.tileHeight*n.scaleY),h=u(s.worldView.x-n.x,l,0,!0)-n.cullPaddingX,f=e(s.worldView.right-n.x,l,0,!0)+n.cullPaddingX,v=u(s.worldView.y-n.y,r/2,0,!0)-n.cullPaddingY,d=e(s.worldView.bottom-n.y,r/2,0,!0)+n.cullPaddingY;return{left:h,right:f,top:v,bottom:d}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=function(o,a,s,i,n){s||(s=new e);var l=n.baseTileWidth,r=n.baseTileHeight,h=n.tilemapLayer,f=0,v=0;h&&(i||(i=h.scene.cameras.main),f=h.x+i.scrollX*(1-h.scrollFactorX),l*=h.scaleX,v=h.y+i.scrollY*(1-h.scrollFactorY),r*=h.scaleY);var d=n.hexSideLength,p=(r-d)/2+d,g=f+o*l+a%2*(l/2),m=v+a*p;return s.set(g,m)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=function(o,a,s,i,n){s||(s=new e);var l=n.baseTileWidth,r=n.baseTileHeight,h=n.tilemapLayer,f=0,v=0;h&&(i||(i=h.scene.cameras.main),f=h.x+i.scrollX*(1-h.scrollFactorX),l*=h.scaleX,v=h.y+i.scrollY*(1-h.scrollFactorY),r*=h.scaleY);var d=f+(o-a)*(l/2),p=v+(o+a)*(r/2);return s.set(d,p)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=function(o,a,s,i,n){s||(s=new e);var l=n.baseTileWidth,r=n.baseTileHeight,h=n.tilemapLayer,f=0,v=0;h&&(i||(i=h.scene.cameras.main),f=h.x+i.scrollX*(1-h.scrollFactorX),l*=h.scaleX,v=h.y+i.scrollY*(1-h.scrollFactorY),r*=h.scaleY);var d=f+o*l+a%2*(l/2),p=v+a*(r/2);return s.set(d,p)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(253),u=t(254),o=t(3),a=function(s,i,n,l,r){return n||(n=new o(0,0)),n.x=e(s,l,r),n.y=u(i,l,r),n};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=o.baseTileHeight,s=o.tilemapLayer,i=0;s&&(u===void 0&&(u=s.scene.cameras.main),i=s.y+u.scrollY*(1-s.scrollFactorY),a*=s.scaleY);var n=s.tilemap.hexSideLength,l=(a-n)/2+n;return i+e*l};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=o.baseTileHeight,s=o.tilemapLayer,i=0;return s&&(u===void 0&&(u=s.scene.cameras.main),i=s.y+u.scrollY*(1-s.scrollFactorY),a*=s.scaleY),i+e*(a/2)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=function(o,a,s,i,n,l){i||(i=new e);var r=l.baseTileWidth,h=l.baseTileHeight,f=l.tilemapLayer;f&&(n||(n=f.scene.cameras.main),a=a-(f.y+n.scrollY*(1-f.scrollFactorY)),h*=f.scaleY,o=o-(f.x+n.scrollX*(1-f.scrollFactorX)),r*=f.scaleX);var v=l.hexSideLength,d=(h-v)/2+v,p=s?Math.floor(a/d):a/d,g=s?Math.floor((o-p%2*.5*r)/r):(o-p%2*.5*r)/r;return i.set(g,p)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=function(o,a,s,i,n,l){i||(i=new e);var r=l.baseTileWidth,h=l.baseTileHeight,f=l.tilemapLayer;f&&(n||(n=f.scene.cameras.main),a=a-(f.y+n.scrollY*(1-f.scrollFactorY)),h*=f.scaleY,o=o-(f.x+n.scrollX*(1-f.scrollFactorX)),r*=f.scaleX);var v=s?Math.floor((o/(r/2)+a/(h/2))/2):(o/(r/2)+a/(h/2))/2,d=s?Math.floor((a/(h/2)-o/(r/2))/2):(a/(h/2)-o/(r/2))/2;return i.set(v,d)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=function(o,a,s,i,n,l){i||(i=new e);var r=l.baseTileWidth,h=l.baseTileHeight,f=l.tilemapLayer;f&&(n||(n=f.scene.cameras.main),a=a-(f.y+n.scrollY*(1-f.scrollFactorY)),h*=f.scaleY,o=o-(f.x+n.scrollX*(1-f.scrollFactorX)),r*=f.scaleX);var v=s?Math.floor(a/(h/2)):a/(h/2),d=s?Math.floor((o+v%2*.5*r)/r):(o+v%2*.5*r)/r;return i.set(d,v)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(255),u=t(256),o=t(3),a=function(s,i,n,l,r,h){return n===void 0&&(n=!0),l||(l=new o(0,0)),l.x=e(s,n,r,h),l.y=u(i,n,r,h),l};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=a.baseTileHeight,i=a.tilemapLayer;i&&(o||(o=i.scene.cameras.main),e=e-(i.y+o.scrollY*(1-i.scrollFactorY)),s*=i.scaleY);var n=a.hexSideLength,l=(s-n)/2+n;return u?Math.floor(e/l):e/l};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=a.baseTileHeight,i=a.tilemapLayer;return i&&(o||(o=i.scene.cameras.main),e=e-(i.y+o.scrollY*(1-i.scrollFactorY)),s*=i.scaleY),u?Math.floor(e/(s/2)):e/(s/2)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(119),u=function(o,a,s){if(e(o,a,s)){var i=s.data[a][o];return i!==null&&i.index>-1}else return!1};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(85),u=t(119),o=t(252),a=function(s,i,n,l,r){if(n===void 0&&(n=!0),l===void 0&&(l=!0),!u(s,i,r))return null;var h=r.data[i][s];if(h)r.data[i][s]=n?null:new e(r,-1,s,i,r.tileWidth,r.tileHeight);else return null;return l&&h&&h.collides&&o(s,i,r),h};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(40),u=t(259),o=t(565),a=t(566),s=t(577),i=function(n,l,r,h,f,v){var d;switch(l){case e.ARRAY_2D:d=u(n,r,h,f,v);break;case e.CSV:d=o(n,r,h,f,v);break;case e.TILED_JSON:d=a(n,r,v);break;case e.WELTMEISTER:d=s(n,r,v);break;default:console.warn("Unrecognized tilemap data format: "+l),d=null}return d};c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(40),u=t(259),o=function(a,s,i,n,l){var r=s.trim().split(`
`).map(function(f){return f.split(",")}),h=u(a,r,i,n,l);return h.format=e.CSV,h};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(567),u=t(568),o=t(29),a=t(40),s=t(258),i=t(121),n=t(569),l=t(570),r=t(573),h=t(575),f=function(v,d,p){var g=new i({width:d.width,height:d.height,name:v,tileWidth:d.tilewidth,tileHeight:d.tileheight,orientation:s(d.orientation),format:a.TILED_JSON,version:d.version,properties:d.properties,renderOrder:d.renderorder,infinite:d.infinite});g.orientation===o.HEXAGONAL&&(g.hexSideLength=d.hexsidelength),g.layers=r(d,p),g.images=n(d);var m=h(d);return g.tilesets=m.tilesets,g.imageCollections=m.imageCollections,g.objects=l(d),g.tiles=u(g),e(g),g};c.exports=f},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(17),u=function(o){for(var a,s,i,n,l,r=0;r<o.layers.length;r++){a=o.layers[r],n=null;for(var h=0;h<a.data.length;h++){l=a.data[h];for(var f=0;f<l.length;f++)s=l[f],!(s===null||s.index<0)&&(i=o.tiles[s.index][2],n=o.tilesets[i],s.width=n.tileWidth,s.height=n.tileHeight,n.tileProperties&&n.tileProperties[s.index-n.firstgid]&&(s.properties=e(s.properties,n.tileProperties[s.index-n.firstgid])))}}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(122),u=function(o){var a,s,i=[];for(a=0;a<o.imageCollections.length;a++)for(var n=o.imageCollections[a],l=n.images,r=0;r<l.length;r++){var h=l[r];s=new e(h.image,h.gid,n.imageWidth,n.imageHeight,0,0),s.updateTileData(n.imageWidth,n.imageHeight),o.tilesets.push(s)}for(a=0;a<o.tilesets.length;a++){s=o.tilesets[a];for(var f=s.tileMargin,v=s.tileMargin,d=0,p=0,g=0,m=s.firstgid;m<s.firstgid+s.total&&(i[m]=[f,v,a],f+=s.tileWidth+s.tileSpacing,d++,!(d===s.total||(p++,p===s.columns&&(f=s.tileMargin,v+=s.tileHeight+s.tileSpacing,p=0,g++,g===s.rows))));m++);}return i};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(2),u=t(161),o=function(a){for(var s=[],i=[],n=u(a);n.i<n.layers.length||i.length>0;){if(n.i>=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop();continue}var l=n.layers[n.i];if(n.i++,l.type!=="imagelayer"){if(l.type==="group"){var r=u(a,l,n);i.push(n),n=r}continue}var h=e(l,"offsetx",0)+e(l,"startx",0),f=e(l,"offsety",0)+e(l,"starty",0);s.push({name:n.name+l.name,image:l.image,x:n.x+h+l.x,y:n.y+f+l.y,alpha:n.opacity*l.opacity,visible:n.visible&&l.visible,properties:e(l,"properties",{})})}return s};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(2),u=t(260),o=t(572),a=t(161),s=function(i){for(var n=[],l=[],r=a(i);r.i<r.layers.length||l.length>0;){if(r.i>=r.layers.length){if(l.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=l.pop();continue}var h=r.layers[r.i];if(r.i++,h.opacity*=r.opacity,h.visible=r.visible&&h.visible,h.type!=="objectgroup"){if(h.type==="group"){var f=a(i,h,r);l.push(r),r=f}continue}h.name=r.name+h.name;for(var v=r.x+e(h,"startx",0)+e(h,"offsetx",0),d=r.y+e(h,"starty",0)+e(h,"offsety",0),p=[],g=0;g<h.objects.length;g++){var m=u(h.objects[g],v,d);p.push(m)}var x=new o(h);x.objects=p,n.push(x)}return n};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(126),u=function(o,a){for(var s={},i=0;i<a.length;i++){var n=a[i];e(o,n)&&(s[n]=o[n])}return s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(2),o=new e({initialize:function(s){s===void 0&&(s={}),this.name=u(s,"name","object layer"),this.opacity=u(s,"opacity",1),this.properties=u(s,"properties",{}),this.propertyTypes=u(s,"propertytypes",{}),this.type=u(s,"type","objectgroup"),this.visible=u(s,"visible",!0),this.objects=u(s,"objects",[])}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(574),u=t(29),o=t(161),a=t(258),s=t(2),i=t(120),n=t(261),l=t(85),r=function(h,f){for(var v=s(h,"infinite",!1),d=[],p=[],g=o(h);g.i<g.layers.length||p.length>0;){if(g.i>=g.layers.length){if(p.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}g=p.pop();continue}var m=g.layers[g.i];if(g.i++,m.type!=="tilelayer"){if(m.type==="group"){var x=o(h,m,g);p.push(g),g=x}continue}if(m.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+m.name+"'");continue}else if(m.encoding&&m.encoding==="base64"){if(m.chunks)for(var y=0;y<m.chunks.length;y++)m.chunks[y].data=e(m.chunks[y].data);m.data&&(m.data=e(m.data)),delete m.encoding}var T,E,C,A,P=[],M=0;if(v){var O=s(m,"startx",0)+m.x,I=s(m,"starty",0)+m.y;T=new i({name:g.name+m.name,x:g.x+s(m,"offsetx",0)+O*h.tilewidth,y:g.y+s(m,"offsety",0)+I*h.tileheight,width:m.width,height:m.height,tileWidth:h.tilewidth,tileHeight:h.tileheight,alpha:g.opacity*m.opacity,visible:g.visible&&m.visible,properties:s(m,"properties",[]),orientation:a(h.orientation)}),T.orientation===u.HEXAGONAL&&(T.hexSideLength=h.hexsidelength);for(var N=0;N<m.height;N++){P.push([null]);for(var Y=0;Y<m.width;Y++)P[N][Y]=null}for(N=0,V=m.chunks.length;N<V;N++)for(var X=m.chunks[N],W=X.x-O,H=X.y-I,D=0,L=0,B=X.data.length;L<B;L++){var G=M+W,w=D+H;E=n(X.data[L]),E.gid>0?(C=new l(T,E.gid,G,w,h.tilewidth,h.tileheight),C.rotation=E.rotation,C.flipX=E.flipped,P[w][G]=C):(A=f?null:new l(T,-1,G,w,h.tilewidth,h.tileheight),P[w][G]=A),M++,M===X.width&&(D++,M=0)}}else{T=new i({name:g.name+m.name,x:g.x+s(m,"offsetx",0)+m.x,y:g.y+s(m,"offsety",0)+m.y,width:m.width,height:m.height,tileWidth:h.tilewidth,tileHeight:h.tileheight,alpha:g.opacity*m.opacity,visible:g.visible&&m.visible,properties:s(m,"properties",[]),orientation:a(h.orientation)}),T.orientation===u.HEXAGONAL&&(T.hexSideLength=h.hexsidelength);for(var z=[],U=0,V=m.data.length;U<V;U++)E=n(m.data[U]),E.gid>0?(C=new l(T,E.gid,M,P.length,h.tilewidth,h.tileheight),C.rotation=E.rotation,C.flipX=E.flipped,z.push(C)):(A=f?null:new l(T,-1,M,P.length,h.tilewidth,h.tileheight),z.push(A)),M++,M===m.width&&(P.push(z),M=0,z=[])}T.data=P,d.push(T)}return d};c.exports=r},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){for(var u=window.atob(e),o=u.length,a=new Array(o/4),s=0;s<o;s+=4)a[s/4]=(u.charCodeAt(s)|u.charCodeAt(s+1)<<8|u.charCodeAt(s+2)<<16|u.charCodeAt(s+3)<<24)>>>0;return a};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(122),u=t(576),o=t(260),a=t(1453),s=function(i){for(var n=[],l=[],r=null,h,f=0;f<i.tilesets.length;f++){var v=i.tilesets[f];if(v.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(v.image){var d=new e(v.name,v.firstgid,v.tilewidth,v.tileheight,v.margin,v.spacing);if(i.version>1){var p=void 0,g=void 0;if(Array.isArray(v.tiles)){p=p||{},g=g||{};for(var m=0;m<v.tiles.length;m++){var x=v.tiles[m];if(x.properties){var y={};x.properties.forEach(function(N){y[N.name]=N.value}),g[x.id]=y}if(x.objectgroup&&((p[x.id]||(p[x.id]={})).objectgroup=x.objectgroup,x.objectgroup.objects)){var T=x.objectgroup.objects.map(function(N){return o(N)});p[x.id].objectgroup.objects=T}x.animation&&((p[x.id]||(p[x.id]={})).animation=x.animation),x.type&&((p[x.id]||(p[x.id]={})).type=x.type)}}Array.isArray(v.wangsets)&&(p=p||{},g=g||{},a(v.wangsets,p)),p&&(d.tileData=p,d.tileProperties=g)}else if(v.tileproperties&&(d.tileProperties=v.tileproperties),v.tiles){d.tileData=v.tiles;for(h in d.tileData){var E=d.tileData[h].objectgroup;if(E&&E.objects){var C=E.objects.map(function(N){return o(N)});d.tileData[h].objectgroup.objects=C}}}d.updateTileData(v.imagewidth,v.imageheight),n.push(d)}else{var A=new u(v.name,v.firstgid,v.tilewidth,v.tileheight,v.margin,v.spacing,v.properties),P=0;for(m=0;m<v.tiles.length;m++){x=v.tiles[m];var M=x.image,O=parseInt(x.id,10),I=v.firstgid+O;A.addImage(I,M),P=Math.max(O,P)}A.maxId=P,l.push(A)}r&&(r.lastgid=v.firstgid-1),r=v}return{tilesets:n,imageCollections:l}};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a,s,i,n,l,r,h){(i===void 0||i<=0)&&(i=32),(n===void 0||n<=0)&&(n=32),l===void 0&&(l=0),r===void 0&&(r=0),this.name=a,this.firstgid=s|0,this.imageWidth=i|0,this.imageHeight=n|0,this.imageMargin=l|0,this.imageSpacing=r|0,this.properties=h||{},this.images=[],this.total=0},containsImageIndex:function(o){return o>=this.firstgid&&o<this.firstgid+this.total},addImage:function(o,a){return this.images.push({gid:o,image:a}),this.total++,this}});c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(40),u=t(121),o=t(578),a=t(579),s=function(i,n,l){if(n.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+i),null;for(var r=0,h=0,f=0;f<n.layer.length;f++)n.layer[f].width>r&&(r=n.layer[f].width),n.layer[f].height>h&&(h=n.layer[f].height);var v=new u({width:r,height:h,name:i,tileWidth:n.layer[0].tilesize,tileHeight:n.layer[0].tilesize,format:e.WELTMEISTER});return v.layers=o(n,l),v.tilesets=a(n),v};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(120),u=t(85),o=function(a,s){for(var i=[],n=0;n<a.layer.length;n++){for(var l=a.layer[n],r=new e({name:l.name,width:l.width,height:l.height,tileWidth:l.tilesize,tileHeight:l.tilesize,visible:l.visible===1}),h=[],f=[],v=0;v<l.data.length;v++){for(var d=0;d<l.data[v].length;d++){var p=l.data[v][d]-1,g;p>-1?g=new u(r,p,d,v,l.tilesize,l.tilesize):g=s?null:new u(r,-1,d,v,l.tilesize,l.tilesize),h.push(g)}f.push(h),h=[]}r.data=f,i.push(r)}return i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(122),u=function(o){for(var a=[],s=[],i=0;i<o.layer.length;i++){var n=o.layer[i],l=n.tilesetName;l!==""&&s.indexOf(l)===-1&&(s.push(l),a.push(new e(l,0,n.tilesize,n.tilesize,0,0)))}return a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(36),o=t(40),a=t(2),s=t(120),i=t(29),n=t(362),l=t(74),r=t(73),h=t(85),f=t(251),v=t(581),d=t(122),p=new e({initialize:function(m,x){this.scene=m,this.tileWidth=x.tileWidth,this.tileHeight=x.tileHeight,this.width=x.width,this.height=x.height,this.orientation=x.orientation,this.renderOrder=x.renderOrder,this.format=x.format,this.version=x.version,this.properties=x.properties,this.widthInPixels=x.widthInPixels,this.heightInPixels=x.heightInPixels,this.imageCollections=x.imageCollections,this.images=x.images,this.layers=x.layers,this.tilesets=x.tilesets,this.objects=x.objects,this.currentLayerIndex=0,this.hexSideLength=x.hexSideLength;var y=this.orientation;this._convert={WorldToTileXY:f.GetWorldToTileXYFunction(y),WorldToTileX:f.GetWorldToTileXFunction(y),WorldToTileY:f.GetWorldToTileYFunction(y),TileToWorldXY:f.GetTileToWorldXYFunction(y),TileToWorldX:f.GetTileToWorldXFunction(y),TileToWorldY:f.GetTileToWorldYFunction(y)}},createBlankDynamicLayer:function(g,m,x,y,T,E,C,A){return console.warn("createBlankDynamicLayer is deprecated. Use createBlankLayer"),this.createBlankLayer(g,m,x,y,T,E,C,A)},createDynamicLayer:function(g,m,x,y){return console.warn("createDynamicLayer is deprecated. Use createLayer"),this.createLayer(g,m,x,y)},createStaticLayer:function(g,m,x,y){return console.warn("createStaticLayer is deprecated. Use createLayer"),this.createLayer(g,m,x,y)},setRenderOrder:function(g){var m=["right-down","left-down","right-up","left-up"];return typeof g=="number"&&(g=m[g]),m.indexOf(g)>-1&&(this.renderOrder=g),this},addTilesetImage:function(g,m,x,y,T,E,C){if(g===void 0)return null;if(m==null&&(m=g),!this.scene.sys.textures.exists(m))return console.warn("Invalid Tileset Image: "+m),null;var A=this.scene.sys.textures.get(m),P=this.getTilesetIndex(g);if(P===null&&this.format===o.TILED_JSON)return console.warn("No data found for Tileset: "+g),null;var M=this.tilesets[P];return M?(M.setTileSize(x,y),M.setSpacing(T,E),M.setImage(A),M):(x===void 0&&(x=this.tileWidth),y===void 0&&(y=this.tileHeight),T===void 0&&(T=0),E===void 0&&(E=0),C===void 0&&(C=0),M=new d(g,C,x,y,T,E),M.setImage(A),this.tilesets.push(M),M)},copy:function(g,m,x,y,T,E,C,A){return A=this.getLayer(A),A!==null?(f.Copy(g,m,x,y,T,E,C,A),this):null},createBlankLayer:function(g,m,x,y,T,E,C,A){x===void 0&&(x=0),y===void 0&&(y=0),T===void 0&&(T=this.width),E===void 0&&(E=this.height),C===void 0&&(C=this.tileWidth),A===void 0&&(A=this.tileHeight);var P=this.getLayerIndex(g);if(P!==null)return console.warn("Invalid Tilemap Layer ID: "+g),null;for(var M=new s({name:g,tileWidth:C,tileHeight:A,width:T,height:E,orientation:this.orientation}),O,I=0;I<E;I++){O=[];for(var N=0;N<T;N++)O.push(new h(M,-1,N,I,C,A,this.tileWidth,this.tileHeight));M.data.push(O)}this.layers.push(M),this.currentLayerIndex=this.layers.length-1;var Y=new v(this.scene,this,this.currentLayerIndex,m,x,y);return Y.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(Y),Y},createLayer:function(g,m,x,y){var T=this.getLayerIndex(g);if(T===null)return console.warn("Invalid Tilemap Layer ID: "+g),typeof g=="string"&&console.warn(`Valid tilelayer names:
	`+this.getTileLayerNames().join(`,
	`)),null;var E=this.layers[T];if(E.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+g),null;this.currentLayerIndex=T,x===void 0&&(x=E.x),y===void 0&&(y=E.y);var C=new v(this.scene,this,T,m,x,y);return C.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(C),C},createFromObjects:function(g,m){var x=[],y=this.getObjectLayer(g);if(!y)return console.warn("createFromObjects: Invalid objectLayerName given: "+g),x;Array.isArray(m)||(m=[m]);for(var T=y.objects,E=0;E<m.length;E++){for(var C=m[E],A=a(C,"id",null),P=a(C,"gid",null),M=a(C,"name",null),O,I=[],N=0;N<T.length;N++)O=T[N],(A===null&&P===null&&M===null||A!==null&&O.id===A||P!==null&&O.gid===P||M!==null&&O.name===M)&&I.push(O);for(var Y=a(C,"classType",r),X=a(C,"scene",this.scene),W=a(C,"container",null),H=a(C,"key",null),D=a(C,"frame",null),L=0;L<I.length;L++){O=I[L];var B=new Y(X);B.setName(O.name),B.setPosition(O.x,O.y),B.setTexture(H,D),O.width&&(B.displayWidth=O.width),O.height&&(B.displayHeight=O.height);var G={x:B.originX*O.width,y:(B.originY-1)*O.height};if(O.rotation){var w=u(O.rotation);n(G,w),B.rotation=w}if(B.x+=G.x,B.y+=G.y,(O.flippedHorizontal!==void 0||O.flippedVertical!==void 0)&&B.setFlip(O.flippedHorizontal,O.flippedVertical),O.visible||(B.visible=!1),Array.isArray(O.properties))O.properties.forEach(function(U){var V=U.name;B[V]!==void 0?B[V]=U.value:B.setData(V,U.value)});else for(var z in O.properties)B[z]!==void 0?B[z]=O.properties[z]:B.setData(z,O.properties[z]);W?W.add(B):X.add.existing(B),x.push(B)}}return x},createFromTiles:function(g,m,x,y,T,E){return E=this.getLayer(E),E===null?null:f.CreateFromTiles(g,m,x,y,T,E)},fill:function(g,m,x,y,T,E,C){return E===void 0&&(E=!0),C=this.getLayer(C),C===null?null:(f.Fill(g,m,x,y,T,E,C),this)},filterObjects:function(g,m,x){if(typeof g=="string"){var y=g;if(g=this.getObjectLayer(g),!g)return console.warn("No object layer found with the name: "+y),null}return g.objects.filter(m,x)},filterTiles:function(g,m,x,y,T,E,C,A){return A=this.getLayer(A),A===null?null:f.FilterTiles(g,m,x,y,T,E,C,A)},findByIndex:function(g,m,x,y){return y=this.getLayer(y),y===null?null:f.FindByIndex(g,m,x,y)},findObject:function(g,m,x){if(typeof g=="string"){var y=g;if(g=this.getObjectLayer(g),!g)return console.warn("No object layer found with the name: "+y),null}return g.objects.find(m,x)||null},findTile:function(g,m,x,y,T,E,C,A){return A=this.getLayer(A),A===null?null:f.FindTile(g,m,x,y,T,E,C,A)},forEachTile:function(g,m,x,y,T,E,C,A){return A=this.getLayer(A),A===null?null:(f.ForEachTile(g,m,x,y,T,E,C,A),this)},getImageIndex:function(g){return this.getIndex(this.images,g)},getImageLayerNames:function(){return!this.images||!Array.isArray(this.images)?[]:this.images.map(function(g){return g.name})},getIndex:function(g,m){for(var x=0;x<g.length;x++)if(g[x].name===m)return x;return null},getLayer:function(g){var m=this.getLayerIndex(g);return m!==null?this.layers[m]:null},getObjectLayer:function(g){var m=this.getIndex(this.objects,g);return m!==null?this.objects[m]:null},getObjectLayerNames:function(){return!this.objects||!Array.isArray(this.objects)?[]:this.objects.map(function(g){return g.name})},getLayerIndex:function(g){return g===void 0?this.currentLayerIndex:typeof g=="string"?this.getLayerIndexByName(g):typeof g=="number"&&g<this.layers.length?g:g instanceof v?g.layerIndex:null},getLayerIndexByName:function(g){return this.getIndex(this.layers,g)},getTileAt:function(g,m,x,y){return y=this.getLayer(y),y===null?null:f.GetTileAt(g,m,x,y)},getTileAtWorldXY:function(g,m,x,y,T){return T=this.getLayer(T),T===null?null:f.GetTileAtWorldXY(g,m,x,y,T)},getTileLayerNames:function(){return!this.layers||!Array.isArray(this.layers)?[]:this.layers.map(function(g){return g.name})},getTilesWithin:function(g,m,x,y,T,E){return E=this.getLayer(E),E===null?null:f.GetTilesWithin(g,m,x,y,T,E)},getTilesWithinShape:function(g,m,x,y){return y=this.getLayer(y),y===null?null:f.GetTilesWithinShape(g,m,x,y)},getTilesWithinWorldXY:function(g,m,x,y,T,E,C){return C=this.getLayer(C),C===null?null:f.GetTilesWithinWorldXY(g,m,x,y,T,E,C)},getTileset:function(g){var m=this.getIndex(this.tilesets,g);return m!==null?this.tilesets[m]:null},getTilesetIndex:function(g){return this.getIndex(this.tilesets,g)},hasTileAt:function(g,m,x){return x=this.getLayer(x),x===null?null:f.HasTileAt(g,m,x)},hasTileAtWorldXY:function(g,m,x,y){return y=this.getLayer(y),y===null?null:f.HasTileAtWorldXY(g,m,x,y)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(g){this.setLayer(g)}},putTileAt:function(g,m,x,y,T){return y===void 0&&(y=!0),T=this.getLayer(T),T===null?null:f.PutTileAt(g,m,x,y,T)},putTileAtWorldXY:function(g,m,x,y,T,E){return y===void 0&&(y=!0),E=this.getLayer(E),E===null?null:f.PutTileAtWorldXY(g,m,x,y,T,E)},putTilesAt:function(g,m,x,y,T){return y===void 0&&(y=!0),T=this.getLayer(T),T===null?null:(f.PutTilesAt(g,m,x,y,T),this)},randomize:function(g,m,x,y,T,E){return E=this.getLayer(E),E===null?null:(f.Randomize(g,m,x,y,T,E),this)},calculateFacesAt:function(g,m,x){return x=this.getLayer(x),x===null?null:(f.CalculateFacesAt(g,m,x),this)},calculateFacesWithin:function(g,m,x,y,T){return T=this.getLayer(T),T===null?null:(f.CalculateFacesWithin(g,m,x,y,T),this)},removeLayer:function(g){var m=this.getLayerIndex(g);if(m!==null){l(this.layers,m);for(var x=m;x<this.layers.length;x++)this.layers[x].tilemapLayer&&this.layers[x].tilemapLayer.layerIndex--;return this.currentLayerIndex===m&&(this.currentLayerIndex=0),this}else return null},destroyLayer:function(g){var m=this.getLayerIndex(g);return m!==null?(g=this.layers[m],g.destroy(),l(this.layers,m),this.currentLayerIndex===m&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var g=this.layers,m=0;m<g.length;m++)g[m].tilemapLayer&&g[m].tilemapLayer.destroy(!1);return g.length=0,this.currentLayerIndex=0,this},removeTile:function(g,m,x){m===void 0&&(m=-1),x===void 0&&(x=!0);var y=[];Array.isArray(g)||(g=[g]);for(var T=0;T<g.length;T++){var E=g[T];y.push(this.removeTileAt(E.x,E.y,!0,x,E.tilemapLayer)),m>-1&&this.putTileAt(m,E.x,E.y,x,E.tilemapLayer)}return y},removeTileAt:function(g,m,x,y,T){return x===void 0&&(x=!0),y===void 0&&(y=!0),T=this.getLayer(T),T===null?null:f.RemoveTileAt(g,m,x,y,T)},removeTileAtWorldXY:function(g,m,x,y,T,E){return x===void 0&&(x=!0),y===void 0&&(y=!0),E=this.getLayer(E),E===null?null:f.RemoveTileAtWorldXY(g,m,x,y,T,E)},renderDebug:function(g,m,x){return x=this.getLayer(x),x===null?null:(this.orientation===i.ORTHOGONAL&&f.RenderDebug(g,m,x),this)},renderDebugFull:function(g,m){for(var x=this.layers,y=0;y<x.length;y++)f.RenderDebug(g,m,x[y]);return this},replaceByIndex:function(g,m,x,y,T,E,C){return C=this.getLayer(C),C===null?null:(f.ReplaceByIndex(g,m,x,y,T,E,C),this)},setCollision:function(g,m,x,y,T){return m===void 0&&(m=!0),x===void 0&&(x=!0),T===void 0&&(T=!0),y=this.getLayer(y),y===null?null:(f.SetCollision(g,m,x,y,T),this)},setCollisionBetween:function(g,m,x,y,T){return x===void 0&&(x=!0),y===void 0&&(y=!0),T=this.getLayer(T),T===null?null:(f.SetCollisionBetween(g,m,x,y,T),this)},setCollisionByProperty:function(g,m,x,y){return m===void 0&&(m=!0),x===void 0&&(x=!0),y=this.getLayer(y),y===null?null:(f.SetCollisionByProperty(g,m,x,y),this)},setCollisionByExclusion:function(g,m,x,y){return m===void 0&&(m=!0),x===void 0&&(x=!0),y=this.getLayer(y),y===null?null:(f.SetCollisionByExclusion(g,m,x,y),this)},setCollisionFromCollisionGroup:function(g,m,x){return g===void 0&&(g=!0),m===void 0&&(m=!0),x=this.getLayer(x),x===null?null:(f.SetCollisionFromCollisionGroup(g,m,x),this)},setTileIndexCallback:function(g,m,x,y){return y=this.getLayer(y),y===null?null:(f.SetTileIndexCallback(g,m,x,y),this)},setTileLocationCallback:function(g,m,x,y,T,E,C){return C=this.getLayer(C),C===null?null:(f.SetTileLocationCallback(g,m,x,y,T,E,C),this)},setLayer:function(g){var m=this.getLayerIndex(g);return m!==null&&(this.currentLayerIndex=m),this},setBaseTileSize:function(g,m){this.tileWidth=g,this.tileHeight=m,this.widthInPixels=this.width*g,this.heightInPixels=this.height*m;for(var x=0;x<this.layers.length;x++){this.layers[x].baseTileWidth=g,this.layers[x].baseTileHeight=m;for(var y=this.layers[x].data,T=this.layers[x].width,E=this.layers[x].height,C=0;C<E;C++)for(var A=0;A<T;A++){var P=y[C][A];P!==null&&P.setSize(void 0,void 0,g,m)}}return this},setLayerTileSize:function(g,m,x){if(x=this.getLayer(x),x===null)return this;x.tileWidth=g,x.tileHeight=m;for(var y=x.data,T=x.width,E=x.height,C=0;C<E;C++)for(var A=0;A<T;A++){var P=y[C][A];P!==null&&P.setSize(g,m)}return this},shuffle:function(g,m,x,y,T){return T=this.getLayer(T),T===null?null:(f.Shuffle(g,m,x,y,T),this)},swapByIndex:function(g,m,x,y,T,E,C){return C=this.getLayer(C),C===null?null:(f.SwapByIndex(g,m,x,y,T,E,C),this)},tileToWorldX:function(g,m,x){return x=this.getLayer(x),x===null?null:this._convert.TileToWorldX(g,m,x)},tileToWorldY:function(g,m,x){return x=this.getLayer(x),x===null?null:this._convert.TileToWorldY(g,m,x)},tileToWorldXY:function(g,m,x,y,T){return T=this.getLayer(T),T===null?null:this._convert.TileToWorldXY(g,m,x,y,T)},weightedRandomize:function(g,m,x,y,T,E){return E=this.getLayer(E),E===null?null:(f.WeightedRandomize(m,x,y,T,g,E),this)},worldToTileX:function(g,m,x,y){return y=this.getLayer(y),y===null?null:this._convert.WorldToTileX(g,m,x,y)},worldToTileY:function(g,m,x,y){return y=this.getLayer(y),y===null?null:this._convert.WorldToTileY(g,m,x,y)},worldToTileXY:function(g,m,x,y,T,E){return E=this.getLayer(E),E===null?null:this._convert.WorldToTileXY(g,m,x,y,T,E)},destroy:function(){this.removeAllLayers(),this.tilesets.length=0,this.objects.length=0,this.scene=null}});c.exports=p},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(11),o=t(15),a=t(251),s=t(1456),i=new e({Extends:o,Mixins:[u.Alpha,u.BlendMode,u.ComputedSize,u.Depth,u.Flip,u.GetBounds,u.Origin,u.Pipeline,u.Transform,u.Visible,u.ScrollFactor,s],initialize:function(l,r,h,f,v,d){o.call(this,l,"TilemapLayer"),this.isTilemap=!0,this.tilemap=r,this.layerIndex=h,this.layer=r.layers[h],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.setTilesets(f),this.setAlpha(this.layer.alpha),this.setPosition(v,d),this.setOrigin(),this.setSize(r.tileWidth*this.layer.width,r.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(n){var l=[],r=[],h=this.tilemap;Array.isArray(n)||(n=[n]);for(var f=0;f<n.length;f++){var v=n[f];if(typeof v=="string"&&(v=h.getTileset(v)),v){r.push(v);for(var d=v.firstgid,p=0;p<v.total;p++)l[d+p]=v}}this.gidMap=l,this.tileset=r},setRenderOrder:function(n){var l=["right-down","left-down","right-up","left-up"];return typeof n=="string"&&(n=l.indexOf(n)),n>=0&&n<4&&(this._renderOrder=n),this},calculateFacesAt:function(n,l){return a.CalculateFacesAt(n,l,this.layer),this},calculateFacesWithin:function(n,l,r,h){return a.CalculateFacesWithin(n,l,r,h,this.layer),this},createFromTiles:function(n,l,r,h,f){return a.CreateFromTiles(n,l,r,h,f,this.layer)},cull:function(n){return this.cullCallback(this.layer,n,this.culledTiles,this._renderOrder)},copy:function(n,l,r,h,f,v,d){return a.Copy(n,l,r,h,f,v,d,this.layer),this},fill:function(n,l,r,h,f,v){return a.Fill(n,l,r,h,f,v,this.layer),this},filterTiles:function(n,l,r,h,f,v,d){return a.FilterTiles(n,l,r,h,f,v,d,this.layer)},findByIndex:function(n,l,r){return a.FindByIndex(n,l,r,this.layer)},findTile:function(n,l,r,h,f,v,d){return a.FindTile(n,l,r,h,f,v,d,this.layer)},forEachTile:function(n,l,r,h,f,v,d){return a.ForEachTile(n,l,r,h,f,v,d,this.layer),this},getTileAt:function(n,l,r){return a.GetTileAt(n,l,r,this.layer)},getTileAtWorldXY:function(n,l,r,h){return a.GetTileAtWorldXY(n,l,r,h,this.layer)},getTilesWithin:function(n,l,r,h,f){return a.GetTilesWithin(n,l,r,h,f,this.layer)},getTilesWithinShape:function(n,l,r){return a.GetTilesWithinShape(n,l,r,this.layer)},getTilesWithinWorldXY:function(n,l,r,h,f,v){return a.GetTilesWithinWorldXY(n,l,r,h,f,v,this.layer)},hasTileAt:function(n,l){return a.HasTileAt(n,l,this.layer)},hasTileAtWorldXY:function(n,l,r){return a.HasTileAtWorldXY(n,l,r,this.layer)},putTileAt:function(n,l,r,h){return a.PutTileAt(n,l,r,h,this.layer)},putTileAtWorldXY:function(n,l,r,h,f){return a.PutTileAtWorldXY(n,l,r,h,f,this.layer)},putTilesAt:function(n,l,r,h){return a.PutTilesAt(n,l,r,h,this.layer),this},randomize:function(n,l,r,h,f){return a.Randomize(n,l,r,h,f,this.layer),this},removeTileAt:function(n,l,r,h){return a.RemoveTileAt(n,l,r,h,this.layer)},removeTileAtWorldXY:function(n,l,r,h,f){return a.RemoveTileAtWorldXY(n,l,r,h,f,this.layer)},renderDebug:function(n,l){return a.RenderDebug(n,l,this.layer),this},replaceByIndex:function(n,l,r,h,f,v){return a.ReplaceByIndex(n,l,r,h,f,v,this.layer),this},setSkipCull:function(n){return n===void 0&&(n=!0),this.skipCull=n,this},setCullPadding:function(n,l){return n===void 0&&(n=1),l===void 0&&(l=1),this.cullPaddingX=n,this.cullPaddingY=l,this},setCollision:function(n,l,r,h){return a.SetCollision(n,l,r,this.layer,h),this},setCollisionBetween:function(n,l,r,h){return a.SetCollisionBetween(n,l,r,h,this.layer),this},setCollisionByProperty:function(n,l,r){return a.SetCollisionByProperty(n,l,r,this.layer),this},setCollisionByExclusion:function(n,l,r){return a.SetCollisionByExclusion(n,l,r,this.layer),this},setCollisionFromCollisionGroup:function(n,l){return a.SetCollisionFromCollisionGroup(n,l,this.layer),this},setTileIndexCallback:function(n,l,r){return a.SetTileIndexCallback(n,l,r,this.layer),this},setTileLocationCallback:function(n,l,r,h,f,v){return a.SetTileLocationCallback(n,l,r,h,f,v,this.layer),this},shuffle:function(n,l,r,h){return a.Shuffle(n,l,r,h,this.layer),this},swapByIndex:function(n,l,r,h,f,v){return a.SwapByIndex(n,l,r,h,f,v,this.layer),this},tileToWorldX:function(n,l){return this.tilemap.tileToWorldX(n,l,this)},tileToWorldY:function(n,l){return this.tilemap.tileToWorldY(n,l,this)},tileToWorldXY:function(n,l,r,h){return this.tilemap.tileToWorldXY(n,l,r,h,this)},weightedRandomize:function(n,l,r,h,f){return a.WeightedRandomize(l,r,h,f,n,this.layer),this},worldToTileX:function(n,l,r){return this.tilemap.worldToTileX(n,l,r,this)},worldToTileY:function(n,l,r){return this.tilemap.worldToTileY(n,l,r,this)},worldToTileXY:function(n,l,r,h,f){return this.tilemap.worldToTileXY(n,l,r,h,f,this)},destroy:function(n){n===void 0&&(n=!0),!!this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),n&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))}});c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(2),o=new e({initialize:function(s){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(s)},reset:function(a){return this.delay=u(a,"delay",0),this.repeat=u(a,"repeat",0),this.loop=u(a,"loop",!1),this.callback=u(a,"callback",void 0),this.callbackScope=u(a,"callbackScope",this.callback),this.args=u(a,"args",[]),this.timeScale=u(a,"timeScale",1),this.startAt=u(a,"startAt",0),this.paused=u(a,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var a=this.delay+this.delay*this.repeat,s=this.elapsed+this.delay*(this.repeat-this.repeatCount);return s/a}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(a){a===void 0&&(a=!1),this.elapsed=this.delay,this.hasDispatched=!a,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1465),u=function(o){var a,s=[];if(o.hasOwnProperty("props"))for(a in o.props)a.substr(0,1)!=="_"&&s.push({key:a,value:o.props[a]});else for(a in o)e.indexOf(a)===-1&&a.substr(0,1)!=="_"&&s.push({key:a,value:o[a]});return s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(6),u=function(o){var a=e(o,"tweens",null);return a===null?[]:(typeof a=="function"&&(a=a.call()),Array.isArray(a)||(a=[a]),a)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(265),u=t(13),o=t(99),a=t(80),s=t(162),i=t(6),n=t(264),l=t(266),r=t(268),h=function(f,v,d){d===void 0&&(d=e);var p=i(v,"from",0),g=i(v,"to",1),m=[{value:p}],x=s(v,"delay",d.delay),y=s(v,"duration",d.duration),T=i(v,"easeParams",d.easeParams),E=a(i(v,"ease",d.ease),T),C=s(v,"hold",d.hold),A=s(v,"repeat",d.repeat),P=s(v,"repeatDelay",d.repeatDelay),M=o(v,"yoyo",d.yoyo),O=[],I=n("value",g),N=r(m[0],0,"value",I.getEnd,I.getStart,I.getActive,E,x,y,M,C,A,P,!1,!1);N.start=p,N.current=p,N.to=g,O.push(N);var Y=new l(f,O,m);Y.offset=u(v,"offset",null),Y.completeDelay=u(v,"completeDelay",0),Y.loop=Math.round(u(v,"loop",0)),Y.loopDelay=Math.round(u(v,"loopDelay",0)),Y.paused=o(v,"paused",!1),Y.useFrames=o(v,"useFrames",!1);for(var X=i(v,"callbackScope",Y),W=[Y,null],H=l.TYPES,D=0;D<H.length;D++){var L=H[D],B=i(v,L,!1);if(B){var G=i(v,L+"Scope",X),w=i(v,L+"Params",[]);Y.setCallback(L,B,W.concat(w),G)}}return Y};c.exports=h},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(80),u=t(6),o=t(14),a=function(s,i){i===void 0&&(i={});var n,l=u(i,"start",0),r=u(i,"ease",null),h=u(i,"grid",null),f=u(i,"from",0),v=f==="first",d=f==="center",p=f==="last",g=typeof f=="number",m=Array.isArray(s),x=parseFloat(m?s[0]:s),y=m?parseFloat(s[1]):0,T=Math.max(x,y);if(m&&(l+=x),h){var E=h[0],C=h[1],A=0,P=0,M=0,O=0,I=[];p?(A=E-1,P=C-1):g?(A=f%E,P=Math.floor(f/E)):d&&(A=(E-1)/2,P=(C-1)/2);for(var N=o.MIN_SAFE_INTEGER,Y=0;Y<C;Y++){I[Y]=[];for(var X=0;X<E;X++){M=A-X,O=P-Y;var W=Math.sqrt(M*M+O*O);W>N&&(N=W),I[Y][X]=W}}}var H=r?e(r):null;return h?n=function(D,L,B,G){var w=0,z=G%E,U=Math.floor(G/E);z>=0&&z<E&&U>=0&&U<C&&(w=I[U][z]);var V;if(m){var Z=y-x;H?V=w/N*Z*H(w/N):V=w/N*Z}else H?V=w*x*H(w/N):V=w*x;return V+l}:n=function(D,L,B,G,w){w--;var z;v?z=G:d?z=Math.abs(w/2-G):p?z=w-G:g&&(z=Math.abs(f-G));var U;if(m){var V;d?V=(y-x)/w*(z*2):V=(y-x)/w*z,H?U=V*H(z/w):U=V}else H?U=w*T*H(z/w):U=z*x;return U+l},n};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(77),u=t(265),o=t(13),a=t(99),s=t(80),i=t(162),n=t(263),l=t(584),r=t(6),h=t(588),f=t(163),v=function(d,p){var g=new h(d);g.completeDelay=o(p,"completeDelay",0),g.loop=Math.round(o(p,"loop",0)),g.loopDelay=Math.round(o(p,"loopDelay",0)),g.paused=a(p,"paused",!1),g.useFrames=a(p,"useFrames",!1);var m=r(p,"callbackScope",g),x=[g],y=r(p,"onStart",!1);if(y){var T=r(p,"onStartScope",m),E=r(p,"onStartParams",[]);g.setCallback("onStart",y,x.concat(E),T)}var C=r(p,"onUpdate",!1);if(C){var A=r(p,"onUpdateScope",m),P=r(p,"onUpdateParams",[]);g.setCallback("onUpdate",C,x.concat(P),A)}var M=r(p,"onLoop",!1);if(M){var O=r(p,"onLoopScope",m),I=r(p,"onLoopParams",[]);g.setCallback("onLoop",M,x.concat(I),O)}var N=r(p,"onYoyo",!1);if(N){var Y=r(p,"onYoyoScope",m),X=r(p,"onYoyoParams",[]);g.setCallback("onYoyo",N,x.concat(null,X),Y)}var W=r(p,"onComplete",!1);if(W){var H=r(p,"onCompleteScope",m),D=r(p,"onCompleteParams",[]);g.setCallback("onComplete",W,x.concat(D),H)}var L=l(p);if(L.length===0)return g.paused=!0,g;var B=e(u);B.targets=n(p);var G=o(p,"totalDuration",0);G>0?B.duration=Math.floor(G/L.length):B.duration=i(p,"duration",B.duration),B.delay=i(p,"delay",B.delay),B.easeParams=r(p,"easeParams",B.easeParams),B.ease=s(r(p,"ease",B.ease),B.easeParams),B.hold=i(p,"hold",B.hold),B.repeat=i(p,"repeat",B.repeat),B.repeatDelay=i(p,"repeatDelay",B.repeatDelay),B.yoyo=a(p,"yoyo",B.yoyo),B.flipX=a(p,"flipX",B.flipX),B.flipY=a(p,"flipY",B.flipY);for(var w=0;w<L.length;w++)g.queue(f(g,L[w],B));return g};c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(9),o=t(267),a=t(163),s=t(100),i=new e({Extends:u,initialize:function(l){u.call(this),this.manager=l,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=s.PENDING_ADD,this._pausedState=s.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},dispatchTimelineEvent:function(n,l){this.emit(n,this),l&&l.func.apply(l.scope,l.params)},setTimeScale:function(n){return this.timeScale=n,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===s.ACTIVE},add:function(n){return this.queue(a(this,n))},queue:function(n){return this.isPlaying()||(n.parent=this,n.parentIsTimeline=!0,this.data.push(n),this.totalData=this.data.length),this},hasOffset:function(n){return n.offset!==null},isOffsetAbsolute:function(n){return typeof n=="number"},isOffsetRelative:function(n){var l=typeof n;if(l==="string"){var r=n[0];if(r==="-"||r==="+")return!0}return!1},getRelativeOffset:function(n,l){var r=n[0],h=parseFloat(n.substr(2)),f=l;switch(r){case"+":f+=h;break;case"-":f-=h;break}return Math.max(0,f)},calcDuration:function(){for(var n=0,l=0,r=0,h=0;h<this.totalData;h++){var f=this.data[h];f.init(),this.hasOffset(f)?this.isOffsetAbsolute(f.offset)?(f.calculatedOffset=f.offset,f.offset===0&&(r=0)):this.isOffsetRelative(f.offset)&&(f.calculatedOffset=this.getRelativeOffset(f.offset,n)):f.calculatedOffset=r,n=f.totalDuration+f.calculatedOffset,l+=f.totalDuration,r+=f.totalDuration}this.duration=l,this.loopCounter=this.loop===-1?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,this.paused?(this.state=s.PAUSED,!1):!0},resetTweens:function(n){for(var l=0;l<this.totalData;l++){var r=this.data[l];r.play(n)}},setCallback:function(n,l,r,h){return i.TYPES.indexOf(n)!==-1&&(this.callbacks[n]={func:l,scope:h,params:r}),this},makeActive:function(n){return this.manager.makeActive(n)},play:function(){if(this.state!==s.ACTIVE){if(this.paused){this.paused=!1,this.manager.makeActive(this);return}else this.resetTweens(!1),this.state=s.ACTIVE;this.dispatchTimelineEvent(o.TIMELINE_START,this.callbacks.onStart)}},nextState:function(){this.loopCounter>0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=s.LOOP_DELAY):(this.state=s.ACTIVE,this.dispatchTimelineEvent(o.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=s.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=s.PENDING_REMOVE,this.dispatchTimelineEvent(o.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(n,l){if(this.state!==s.PAUSED){switch(this.useFrames&&(l=1*this.manager.timeScale),l*=this.timeScale,this.elapsed+=l,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=l,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case s.ACTIVE:for(var r=this.totalData,h=0;h<this.totalData;h++){var f=this.data[h];f.update(n,l)&&r--}this.dispatchTimelineEvent(o.TIMELINE_UPDATE,this.callbacks.onUpdate),r===0&&this.nextState();break;case s.LOOP_DELAY:this.countdown-=l,this.countdown<=0&&(this.state=s.ACTIVE,this.dispatchTimelineEvent(o.TIMELINE_LOOP,this.callbacks.onLoop));break;case s.COMPLETE_DELAY:this.countdown-=l,this.countdown<=0&&(this.state=s.PENDING_REMOVE,this.dispatchTimelineEvent(o.TIMELINE_COMPLETE,this.callbacks.onComplete));break}return this.state===s.PENDING_REMOVE}},stop:function(){this.state=s.PENDING_REMOVE},pause:function(){if(this.state!==s.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=s.PAUSED,this.emit(o.TIMELINE_PAUSE,this),this},resume:function(){return this.state===s.PAUSED&&(this.paused=!1,this.state=this._pausedState,this.emit(o.TIMELINE_RESUME,this)),this},hasTarget:function(n){for(var l=0;l<this.data.length;l++)if(this.data[l].hasTarget(n))return!0;return!1},destroy:function(){for(var n=0;n<this.data.length;n++)this.data[n].stop()}});i.TYPES=["onStart","onUpdate","onLoop","onComplete","onYoyo"],c.exports=i},function(c,S,t){/**
 * @author       Joachim Grill <joachim@codeandweb.com>
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2018 CodeAndWeb GmbH
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(86),u=t(41),o=t(32),a=t(2),s=t(64),i={parseBody:function(n,l,r,h){h===void 0&&(h={});for(var f=a(r,"fixtures",[]),v=[],d=0;d<f.length;d++)for(var p=this.parseFixture(f[d]),g=0;g<p.length;g++)v.push(p[g]);var m=o.clone(r,!0);o.extend(m,h,!0),delete m.fixtures,delete m.type;var x=u.create(m);return u.setParts(x,v),u.setPosition(x,{x:n,y:l}),x},parseFixture:function(n){var l=o.extend({},!1,n);delete l.circle,delete l.vertices;var r;if(n.circle){var h=a(n.circle,"x"),f=a(n.circle,"y"),v=a(n.circle,"radius");r=[e.circle(h,f,v,l)]}else n.vertices&&(r=this.parseVertices(n.vertices,l));return r},parseVertices:function(n,l){l===void 0&&(l={});for(var r=[],h=0;h<n.length;h++)s.clockwiseSort(n[h]),r.push(u.create(o.extend({position:s.centre(n[h]),vertices:n[h]},l)));return e.flagCoincidentParts(r)}};c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(86),u=t(41),o={parseBody:function(a,s,i,n){n===void 0&&(n={});var l,r=i.vertices;if(r.length===1)n.vertices=r[0],l=u.create(n),e.flagCoincidentParts(l.parts);else{for(var h=[],f=0;f<r.length;f++){var v=u.create({vertices:r[f]});h.push(v)}e.flagCoincidentParts(h),n.parts=h,l=u.create(n)}return l.label=i.label,u.setPosition(l,{x:a,y:s}),l}};c.exports=o},function(c,S,t){var e={};c.exports=e;var u=t(118),o=t(128),a=t(32),s=t(41),i=t(86);(function(){e.stack=function(n,l,r,h,f,v,d){for(var p=u.create({label:"Stack"}),g=n,m=l,x,y=0,T=0;T<h;T++){for(var E=0,C=0;C<r;C++){var A=d(g,m,C,T,x,y);if(A){var P=A.bounds.max.y-A.bounds.min.y,M=A.bounds.max.x-A.bounds.min.x;P>E&&(E=P),s.translate(A,{x:M*.5,y:P*.5}),g=A.bounds.max.x+f,u.addBody(p,A),x=A,y+=1}else g+=f}m+=E+v,g=n}return p},e.chain=function(n,l,r,h,f,v){for(var d=n.bodies,p=1;p<d.length;p++){var g=d[p-1],m=d[p],x=g.bounds.max.y-g.bounds.min.y,y=g.bounds.max.x-g.bounds.min.x,T=m.bounds.max.y-m.bounds.min.y,E=m.bounds.max.x-m.bounds.min.x,C={bodyA:g,pointA:{x:y*l,y:x*r},bodyB:m,pointB:{x:E*h,y:T*f}},A=a.extend(C,v);u.addConstraint(n,o.create(A))}return n.label+=" Chain",n},e.mesh=function(n,l,r,h,f){var v=n.bodies,d,p,g,m,x;for(d=0;d<r;d++){for(p=1;p<l;p++)g=v[p-1+d*l],m=v[p+d*l],u.addConstraint(n,o.create(a.extend({bodyA:g,bodyB:m},f)));if(d>0)for(p=0;p<l;p++)g=v[p+(d-1)*l],m=v[p+d*l],u.addConstraint(n,o.create(a.extend({bodyA:g,bodyB:m},f))),h&&p>0&&(x=v[p-1+(d-1)*l],u.addConstraint(n,o.create(a.extend({bodyA:x,bodyB:m},f)))),h&&p<l-1&&(x=v[p+1+(d-1)*l],u.addConstraint(n,o.create(a.extend({bodyA:x,bodyB:m},f))))}return n.label+=" Mesh",n},e.pyramid=function(n,l,r,h,f,v,d){return e.stack(n,l,r,h,f,v,function(p,g,m,x,y,T){var E=Math.min(h,Math.ceil(r/2)),C=y?y.bounds.max.x-y.bounds.min.x:0;if(!(x>E)){x=E-x;var A=x,P=r-1-x;if(!(m<A||m>P)){T===1&&s.translate(y,{x:(m+(r%2==1?1:-1))*C,y:0});var M=y?m*C:0;return d(n+M+m*f,g,m,x,y,T)}}})},e.newtonsCradle=function(n,l,r,h,f){for(var v=u.create({label:"Newtons Cradle"}),d=0;d<r;d++){var p=1.9,g=i.circle(n+d*(h*p),l+f,h,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),m=o.create({pointA:{x:n+d*(h*p),y:l},bodyB:g});u.addBody(v,g),u.addConstraint(v,m)}return v},e.car=function(n,l,r,h,f){var v=s.nextGroup(!0),d=20,p=-r*.5+d,g=r*.5-d,m=0,x=u.create({label:"Car"}),y=i.rectangle(n,l,r,h,{collisionFilter:{group:v},chamfer:{radius:h*.5},density:2e-4}),T=i.circle(n+p,l+m,f,{collisionFilter:{group:v},friction:.8}),E=i.circle(n+g,l+m,f,{collisionFilter:{group:v},friction:.8}),C=o.create({bodyB:y,pointB:{x:p,y:m},bodyA:T,stiffness:1,length:0}),A=o.create({bodyB:y,pointB:{x:g,y:m},bodyA:E,stiffness:1,length:0});return u.addBody(x,y),u.addBody(x,T),u.addBody(x,E),u.addConstraint(x,C),u.addConstraint(x,A),x},e.softBody=function(n,l,r,h,f,v,d,p,g,m){g=a.extend({inertia:1/0},g),m=a.extend({stiffness:.2,render:{type:"line",anchors:!1}},m);var x=e.stack(n,l,r,h,f,v,function(y,T){return i.circle(y,T,p,g)});return e.mesh(x,r,h,d,m),x.label="Soft Body",x}})()},function(c,S,t){var e={};c.exports=e,t(84);var u=t(32);(function(){e.pathToVertices=function(o,a){typeof window!="undefined"&&!("SVGPathSeg"in window)&&u.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var s,i,n,l,r,h,f,v,d,p,g=[],m,x,y=0,T=0,E=0;a=a||15;var C=function(P,M,O){var I=O%2==1&&O>1;if(!d||P!=d.x||M!=d.y){d&&I?(m=d.x,x=d.y):(m=0,x=0);var N={x:m+P,y:x+M};(I||!d)&&(d=N),g.push(N),T=m+P,E=x+M}},A=function(P){var M=P.pathSegTypeAsLetter.toUpperCase();if(M!=="Z"){switch(M){case"M":case"L":case"T":case"C":case"S":case"Q":T=P.x,E=P.y;break;case"H":T=P.x;break;case"V":E=P.y;break}C(T,E,P.pathSegType)}};for(e._svgPathToAbsolute(o),n=o.getTotalLength(),h=[],s=0;s<o.pathSegList.numberOfItems;s+=1)h.push(o.pathSegList.getItem(s));for(f=h.concat();y<n;){if(p=o.getPathSegAtLength(y),r=h[p],r!=v){for(;f.length&&f[0]!=r;)A(f.shift());v=r}switch(r.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":l=o.getPointAtLength(y),C(l.x,l.y,0);break}y+=a}for(s=0,i=f.length;s<i;++s)A(f[s]);return g},e._svgPathToAbsolute=function(o){for(var a,s,i,n,l,r,h=o.pathSegList,f=0,v=0,d=h.numberOfItems,p=0;p<d;++p){var g=h.getItem(p),m=g.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(m))"x"in g&&(f=g.x),"y"in g&&(v=g.y);else switch("x1"in g&&(i=f+g.x1),"x2"in g&&(l=f+g.x2),"y1"in g&&(n=v+g.y1),"y2"in g&&(r=v+g.y2),"x"in g&&(f+=g.x),"y"in g&&(v+=g.y),m){case"m":h.replaceItem(o.createSVGPathSegMovetoAbs(f,v),p);break;case"l":h.replaceItem(o.createSVGPathSegLinetoAbs(f,v),p);break;case"h":h.replaceItem(o.createSVGPathSegLinetoHorizontalAbs(f),p);break;case"v":h.replaceItem(o.createSVGPathSegLinetoVerticalAbs(v),p);break;case"c":h.replaceItem(o.createSVGPathSegCurvetoCubicAbs(f,v,i,n,l,r),p);break;case"s":h.replaceItem(o.createSVGPathSegCurvetoCubicSmoothAbs(f,v,l,r),p);break;case"q":h.replaceItem(o.createSVGPathSegCurvetoQuadraticAbs(f,v,i,n),p);break;case"t":h.replaceItem(o.createSVGPathSegCurvetoQuadraticSmoothAbs(f,v),p);break;case"a":h.replaceItem(o.createSVGPathSegArcAbs(f,v,g.r1,g.r2,g.angle,g.largeArcFlag,g.sweepFlag),p);break;case"z":case"Z":f=a,v=s;break}(m=="M"||m=="m")&&(a=f,s=v)}}})()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(86),u=t(41),o=t(0),a=t(249),s=t(9),i=t(2),n=t(126),l=t(64),r=new o({Extends:s,Mixins:[a.Bounce,a.Collision,a.Friction,a.Gravity,a.Mass,a.Sensor,a.Sleep,a.Static],initialize:function(f,v,d){s.call(this),this.tile=v,this.world=f,v.physics.matterBody&&v.physics.matterBody.destroy(),v.physics.matterBody=this;var p=i(d,"body",null),g=i(d,"addToWorld",!0);if(p)this.setBody(p,g);else{var m=v.getCollisionGroup(),x=i(m,"objects",[]);x.length>0?this.setFromTileCollision(d):this.setFromTileRectangle(d)}},setFromTileRectangle:function(h){h===void 0&&(h={}),n(h,"isStatic")||(h.isStatic=!0),n(h,"addToWorld")||(h.addToWorld=!0);var f=this.tile.getBounds(),v=f.x+f.width/2,d=f.y+f.height/2,p=e.rectangle(v,d,f.width,f.height,h);return this.setBody(p,h.addToWorld),this},setFromTileCollision:function(h){h===void 0&&(h={}),n(h,"isStatic")||(h.isStatic=!0),n(h,"addToWorld")||(h.addToWorld=!0);for(var f=this.tile.tilemapLayer.scaleX,v=this.tile.tilemapLayer.scaleY,d=this.tile.getLeft(),p=this.tile.getTop(),g=this.tile.getCollisionGroup(),m=i(g,"objects",[]),x=[],y=0;y<m.length;y++){var T=m[y],E=d+T.x*f,C=p+T.y*v,A=T.width*f,P=T.height*v,M=null;if(T.rectangle)M=e.rectangle(E+A/2,C+P/2,A,P,h);else if(T.ellipse)M=e.circle(E+A/2,C+P/2,A/2,h);else if(T.polygon||T.polyline){var O=T.polygon?T.polygon:T.polyline,I=O.map(function(X){return{x:X.x*f,y:X.y*v}}),N=l.create(I),Y=l.centre(N);E+=Y.x,C+=Y.y,M=e.fromVertices(E,C,N,h)}M&&x.push(M)}return x.length===1?this.setBody(x[0],h.addToWorld):x.length>1&&(h.parts=x,this.setBody(u.create(h),h.addToWorld)),this},setBody:function(h,f){return f===void 0&&(f=!0),this.body&&this.removeBody(),this.body=h,this.body.gameObject=this,f&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1399);e.Body=t(41),e.Composite=t(118),e.World=t(596),e.Detector=t(273),e.Grid=t(597),e.Pairs=t(598),e.Pair=t(250),e.Query=t(1400),e.Resolver=t(599),e.SAT=t(274),e.Constraint=t(128),e.Common=t(32),e.Engine=t(1401),e.Events=t(166),e.Sleeping=t(165),e.Plugin=t(595),e.Bodies=t(86),e.Composites=t(591),e.Axes=t(271),e.Bounds=t(84),e.Svg=t(592),e.Vector=t(83),e.Vertices=t(64),e.World.add=e.Composite.add,e.World.remove=e.Composite.remove,e.World.addComposite=e.Composite.addComposite,e.World.addBody=e.Composite.addBody,e.World.addConstraint=e.Composite.addConstraint,e.World.clear=e.Composite.clear,c.exports=e},function(c,S,t){var e={};c.exports=e;var u=t(32);(function(){e._registry={},e.register=function(o){if(e.isPlugin(o)||u.warn("Plugin.register:",e.toString(o),"does not implement all required fields."),o.name in e._registry){var a=e._registry[o.name],s=e.versionParse(o.version).number,i=e.versionParse(a.version).number;s>i?(u.warn("Plugin.register:",e.toString(a),"was upgraded to",e.toString(o)),e._registry[o.name]=o):s<i?u.warn("Plugin.register:",e.toString(a),"can not be downgraded to",e.toString(o)):o!==a&&u.warn("Plugin.register:",e.toString(o),"is already registered to different plugin object")}else e._registry[o.name]=o;return o},e.resolve=function(o){return e._registry[e.dependencyParse(o).name]},e.toString=function(o){return typeof o=="string"?o:(o.name||"anonymous")+"@"+(o.version||o.range||"0.0.0")},e.isPlugin=function(o){return o&&o.name&&o.version&&o.install},e.isUsed=function(o,a){return o.used.indexOf(a)>-1},e.isFor=function(o,a){var s=o.for&&e.dependencyParse(o.for);return!o.for||a.name===s.name&&e.versionSatisfies(a.version,s.range)},e.use=function(o,a){if(o.uses=(o.uses||[]).concat(a||[]),o.uses.length===0){u.warn("Plugin.use:",e.toString(o),"does not specify any dependencies to install.");return}for(var s=e.dependencies(o),i=u.topologicalSort(s),n=[],l=0;l<i.length;l+=1)if(i[l]!==o.name){var r=e.resolve(i[l]);if(!r){n.push("\u274C "+i[l]);continue}e.isUsed(o,r.name)||(e.isFor(r,o)||(u.warn("Plugin.use:",e.toString(r),"is for",r.for,"but installed on",e.toString(o)+"."),r._warned=!0),r.install?r.install(o):(u.warn("Plugin.use:",e.toString(r),"does not specify an install function."),r._warned=!0),r._warned?(n.push("\u{1F536} "+e.toString(r)),delete r._warned):n.push("\u2705 "+e.toString(r)),o.used.push(r.name))}n.length>0&&!r.silent&&u.info(n.join("  "))},e.dependencies=function(o,a){var s=e.dependencyParse(o),i=s.name;if(a=a||{},!(i in a)){o=e.resolve(o)||o,a[i]=u.map(o.uses||[],function(l){e.isPlugin(l)&&e.register(l);var r=e.dependencyParse(l),h=e.resolve(l);return h&&!e.versionSatisfies(h.version,r.range)?(u.warn("Plugin.dependencies:",e.toString(h),"does not satisfy",e.toString(r),"used by",e.toString(s)+"."),h._warned=!0,o._warned=!0):h||(u.warn("Plugin.dependencies:",e.toString(l),"used by",e.toString(s),"could not be resolved."),o._warned=!0),r.name});for(var n=0;n<a[i].length;n+=1)e.dependencies(a[i][n],a);return a}},e.dependencyParse=function(o){if(u.isString(o)){var a=/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/;return a.test(o)||u.warn("Plugin.dependencyParse:",o,"is not a valid dependency string."),{name:o.split("@")[0],range:o.split("@")[1]||"*"}}return{name:o.name,range:o.range||o.version}},e.versionParse=function(o){var a=/^\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?$/;a.test(o)||u.warn("Plugin.versionParse:",o,"is not a valid version or range.");var s=o.split("-");o=s[0];var i=isNaN(Number(o[0])),n=i?o.substr(1):o,l=u.map(n.split("."),function(r){return Number(r)});return{isRange:i,version:n,range:o,operator:i?o[0]:"",parts:l,prerelease:s[1],number:l[0]*1e8+l[1]*1e4+l[2]}},e.versionSatisfies=function(o,a){a=a||"*";var s=e.versionParse(a),i=s.parts,n=e.versionParse(o),l=n.parts;if(s.isRange){if(s.operator==="*"||o==="*")return!0;if(s.operator==="~")return l[0]===i[0]&&l[1]===i[1]&&l[2]>=i[2];if(s.operator==="^")return i[0]>0?l[0]===i[0]&&n.number>=s.number:i[1]>0?l[1]===i[1]&&l[2]>=i[2]:l[2]===i[2]}return o===a||o==="*"}})()},function(c,S,t){var e={};c.exports=e;var u=t(118);t(128);var o=t(32);(function(){e.create=function(a){var s=u.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return o.extend(s,i,a)}})()},function(c,S,t){var e={};c.exports=e;var u=t(250),o=t(273),a=t(32);(function(){e.create=function(s){var i={controller:e,detector:o.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return a.extend(i,s)},e.update=function(s,i,n,l){var r,h,f,v=n.world,d=s.buckets,p,g,m=!1,x=n.metrics;for(x.broadphaseTests=0,r=0;r<i.length;r++){var y=i[r];if(!(y.isSleeping&&!l)&&!(y.bounds.max.x<v.bounds.min.x||y.bounds.min.x>v.bounds.max.x||y.bounds.max.y<v.bounds.min.y||y.bounds.min.y>v.bounds.max.y)){var T=e._getRegion(s,y);if(!y.region||T.id!==y.region.id||l){x.broadphaseTests+=1,(!y.region||l)&&(y.region=T);var E=e._regionUnion(T,y.region);for(h=E.startCol;h<=E.endCol;h++)for(f=E.startRow;f<=E.endRow;f++){g=e._getBucketId(h,f),p=d[g];var C=h>=T.startCol&&h<=T.endCol&&f>=T.startRow&&f<=T.endRow,A=h>=y.region.startCol&&h<=y.region.endCol&&f>=y.region.startRow&&f<=y.region.endRow;!C&&A&&A&&p&&e._bucketRemoveBody(s,p,y),(y.region===T||C&&!A||l)&&(p||(p=e._createBucket(d,g)),e._bucketAddBody(s,p,y))}y.region=T,m=!0}}}m&&(s.pairsList=e._createActivePairsList(s))},e.clear=function(s){s.buckets={},s.pairs={},s.pairsList=[]},e._regionUnion=function(s,i){var n=Math.min(s.startCol,i.startCol),l=Math.max(s.endCol,i.endCol),r=Math.min(s.startRow,i.startRow),h=Math.max(s.endRow,i.endRow);return e._createRegion(n,l,r,h)},e._getRegion=function(s,i){var n=i.bounds,l=Math.floor(n.min.x/s.bucketWidth),r=Math.floor(n.max.x/s.bucketWidth),h=Math.floor(n.min.y/s.bucketHeight),f=Math.floor(n.max.y/s.bucketHeight);return e._createRegion(l,r,h,f)},e._createRegion=function(s,i,n,l){return{id:s+","+i+","+n+","+l,startCol:s,endCol:i,startRow:n,endRow:l}},e._getBucketId=function(s,i){return"C"+s+"R"+i},e._createBucket=function(s,i){var n=s[i]=[];return n},e._bucketAddBody=function(s,i,n){for(var l=0;l<i.length;l++){var r=i[l];if(!(n.id===r.id||n.isStatic&&r.isStatic)){var h=u.id(n,r),f=s.pairs[h];f?f[2]+=1:s.pairs[h]=[n,r,1]}}i.push(n)},e._bucketRemoveBody=function(s,i,n){i.splice(i.indexOf(n),1);for(var l=0;l<i.length;l++){var r=i[l],h=u.id(n,r),f=s.pairs[h];f&&(f[2]-=1)}},e._createActivePairsList=function(s){var i,n,l=[];i=a.keys(s.pairs);for(var r=0;r<i.length;r++)n=s.pairs[i[r]],n[2]>0?l.push(n):delete s.pairs[i[r]];return l}})()},function(c,S,t){var e={};c.exports=e;var u=t(250),o=t(32);(function(){e._pairMaxIdleLife=1e3,e.create=function(a){return o.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},a)},e.update=function(a,s,i){var n=a.list,l=a.table,r=a.collisionStart,h=a.collisionEnd,f=a.collisionActive,v,d,p,g;for(r.length=0,h.length=0,f.length=0,g=0;g<n.length;g++)n[g].confirmedActive=!1;for(g=0;g<s.length;g++)v=s[g],v.collided&&(d=u.id(v.bodyA,v.bodyB),p=l[d],p?(p.isActive?f.push(p):r.push(p),u.update(p,v,i),p.confirmedActive=!0):(p=u.create(v,i),l[d]=p,r.push(p),n.push(p)));for(g=0;g<n.length;g++)p=n[g],p.isActive&&!p.confirmedActive&&(u.setActive(p,!1,i),h.push(p))},e.removeOld=function(a,s){var i=a.list,n=a.table,l=[],r,h,f,v;for(v=0;v<i.length;v++){if(r=i[v],h=r.collision,h.bodyA.isSleeping||h.bodyB.isSleeping){r.timeUpdated=s;continue}s-r.timeUpdated>e._pairMaxIdleLife&&l.push(v)}for(v=0;v<l.length;v++)f=l[v]-v,r=i[f],delete n[r.id],i.splice(f,1)},e.clear=function(a){return a.table={},a.list.length=0,a.collisionStart.length=0,a.collisionActive.length=0,a.collisionEnd.length=0,a}})()},function(c,S,t){var e={};c.exports=e;var u=t(64),o=t(83),a=t(32),s=t(84);(function(){e._restingThresh=4,e._restingThreshTangent=6,e._positionDampen=.9,e._positionWarming=.8,e._frictionNormalMultiplier=5,e.preSolvePosition=function(i){var n,l,r;for(n=0;n<i.length;n++)l=i[n],!!l.isActive&&(r=l.activeContacts.length,l.collision.parentA.totalContacts+=r,l.collision.parentB.totalContacts+=r)},e.solvePosition=function(i,n,l){var r,h,f,v,d,p,g,m,x,y,T,E,C,A,P,M,O=l*e._positionDampen;for(r=0;r<n.length;r++){var I=n[r];I.previousPositionImpulse.x=I.positionImpulse.x,I.previousPositionImpulse.y=I.positionImpulse.y}for(r=0;r<i.length;r++)v=i[r],!(!v.isActive||v.isSensor)&&(d=v.collision,p=d.parentA,g=d.parentB,m=d.normal,T=p.previousPositionImpulse,E=g.previousPositionImpulse,y=d.penetration,A=E.x-T.x+y.x,P=E.y-T.y+y.y,h=m.x,f=m.y,x=h*A+f*P,v.separation=x,M=(x-v.slop)*O,(p.isStatic||g.isStatic)&&(M*=2),p.isStatic||p.isSleeping||(C=M/p.totalContacts,p.positionImpulse.x+=h*C,p.positionImpulse.y+=f*C),g.isStatic||g.isSleeping||(C=M/g.totalContacts,g.positionImpulse.x-=h*C,g.positionImpulse.y-=f*C))},e.postSolvePosition=function(i){for(var n=0;n<i.length;n++){var l=i[n];if(l.totalContacts=0,l.positionImpulse.x!==0||l.positionImpulse.y!==0){for(var r=0;r<l.parts.length;r++){var h=l.parts[r];u.translate(h.vertices,l.positionImpulse),s.update(h.bounds,h.vertices,l.velocity),h.position.x+=l.positionImpulse.x,h.position.y+=l.positionImpulse.y}l.positionPrev.x+=l.positionImpulse.x,l.positionPrev.y+=l.positionImpulse.y,o.dot(l.positionImpulse,l.velocity)<0?(l.positionImpulse.x=0,l.positionImpulse.y=0):(l.positionImpulse.x*=e._positionWarming,l.positionImpulse.y*=e._positionWarming)}}},e.preSolveVelocity=function(i){var n,l,r,h,f,v,d,p,g,m,x,y,T,E,C=o._temp[0],A=o._temp[1];for(n=0;n<i.length;n++)if(r=i[n],!(!r.isActive||r.isSensor))for(h=r.activeContacts,f=r.collision,v=f.parentA,d=f.parentB,p=f.normal,g=f.tangent,l=0;l<h.length;l++)m=h[l],x=m.vertex,y=m.normalImpulse,T=m.tangentImpulse,(y!==0||T!==0)&&(C.x=p.x*y+g.x*T,C.y=p.y*y+g.y*T,v.isStatic||v.isSleeping||(E=o.sub(x,v.position,A),v.positionPrev.x+=C.x*v.inverseMass,v.positionPrev.y+=C.y*v.inverseMass,v.anglePrev+=o.cross(E,C)*v.inverseInertia),d.isStatic||d.isSleeping||(E=o.sub(x,d.position,A),d.positionPrev.x-=C.x*d.inverseMass,d.positionPrev.y-=C.y*d.inverseMass,d.anglePrev-=o.cross(E,C)*d.inverseInertia))},e.solveVelocity=function(i,n){for(var l=n*n,r=o._temp[0],h=o._temp[1],f=o._temp[2],v=o._temp[3],d=o._temp[4],p=o._temp[5],g=0;g<i.length;g++){var m=i[g];if(!(!m.isActive||m.isSensor)){var x=m.collision,y=x.parentA,T=x.parentB,E=x.normal,C=x.tangent,A=m.activeContacts,P=1/A.length;y.velocity.x=y.position.x-y.positionPrev.x,y.velocity.y=y.position.y-y.positionPrev.y,T.velocity.x=T.position.x-T.positionPrev.x,T.velocity.y=T.position.y-T.positionPrev.y,y.angularVelocity=y.angle-y.anglePrev,T.angularVelocity=T.angle-T.anglePrev;for(var M=0;M<A.length;M++){var O=A[M],I=O.vertex,N=o.sub(I,y.position,h),Y=o.sub(I,T.position,f),X=o.add(y.velocity,o.mult(o.perp(N),y.angularVelocity),v),W=o.add(T.velocity,o.mult(o.perp(Y),T.angularVelocity),d),H=o.sub(X,W,p),D=o.dot(E,H),L=o.dot(C,H),B=Math.abs(L),G=a.sign(L),w=(1+m.restitution)*D,z=a.clamp(m.separation+D,0,1)*e._frictionNormalMultiplier,U=L,V=1/0;B>m.friction*m.frictionStatic*z*l&&(V=B,U=a.clamp(m.friction*G*l,-V,V));var Z=o.cross(N,E),$=o.cross(Y,E),Q=P/(y.inverseMass+T.inverseMass+y.inverseInertia*Z*Z+T.inverseInertia*$*$);if(w*=Q,U*=Q,D<0&&D*D>e._restingThresh*l)O.normalImpulse=0;else{var j=O.normalImpulse;O.normalImpulse=Math.min(O.normalImpulse+w,0),w=O.normalImpulse-j}if(L*L>e._restingThreshTangent*l)O.tangentImpulse=0;else{var k=O.tangentImpulse;O.tangentImpulse=a.clamp(O.tangentImpulse+U,-V,V),U=O.tangentImpulse-k}r.x=E.x*w+C.x*U,r.y=E.y*w+C.y*U,y.isStatic||y.isSleeping||(y.positionPrev.x+=r.x*y.inverseMass,y.positionPrev.y+=r.y*y.inverseMass,y.anglePrev+=o.cross(N,r)*y.inverseInertia),T.isStatic||T.isSleeping||(T.positionPrev.x-=r.x*T.inverseMass,T.positionPrev.y-=r.y*T.inverseMass,T.anglePrev-=o.cross(Y,r)*T.inverseInertia)}}}}})()},function(c,S){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch{typeof window=="object"&&(t=window)}c.exports=t},function(c,S,t){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(276),u=function(o,a,s,i){for(var n=o[0],l=1;l<o.length;l++){var r=o[l];e(r,n,a,s,i),n=r}return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(46),u=function(o,a,s,i,n){return e(o,"angle",a,s,i,n)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){for(var a=0;a<e.length;a++){var s=e[a];u.call(o,s)}return e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){o===void 0&&(o=0);for(var a=o;a<e.length;a++){var s=e[a],i=!0;for(var n in u)s[n]!==u[n]&&(i=!1);if(i)return s}return null};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){o===void 0&&(o=0);for(var a=o;a<e.length;a++){var s=e[a],i=!0;for(var n in u)s[n]!==u[n]&&(i=!1);if(i)return s}return null};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(289),u=t(123),o=t(2),a=t(1),s=t(129),i=new s({sys:{queueDepthSort:a,events:{once:a}}},0,0,1,1),n=function(l,r){r===void 0&&(r={});var h=r.hasOwnProperty("width"),f=r.hasOwnProperty("height"),v=o(r,"width",-1),d=o(r,"height",-1),p=o(r,"cellWidth",1),g=o(r,"cellHeight",p),m=o(r,"position",u.TOP_LEFT),x=o(r,"x",0),y=o(r,"y",0),T=0,E=0,C=v*p,A=d*g;i.setPosition(x,y),i.setSize(p,g);for(var P=0;P<l.length;P++)if(e(l[P],i,m),h&&v===-1)i.x+=p;else if(f&&d===-1)i.y+=g;else if(f&&!h){if(E+=g,i.y+=g,E===A&&(E=0,T+=p,i.y=y,i.x+=p,T===C))break}else if(T+=p,i.x+=p,T===C&&(T=0,E+=g,i.x=x,i.y+=g,E===A))break;return l};c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=2,o={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(a,s,i,n){return a===void 0&&(a=1),s===void 0?this.alpha=a:(this._alphaTL=e(a,0,1),this._alphaTR=e(s,0,1),this._alphaBL=e(i,0,1),this._alphaBR=e(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(a){var s=e(a,0,1);this._alpha=s,this._alphaTL=s,this._alphaTR=s,this._alphaBL=s,this._alphaBR=s,s===0?this.renderFlags&=~u:this.renderFlags|=u}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(a){var s=e(a,0,1);this._alphaTL=s,s!==0&&(this.renderFlags|=u)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(a){var s=e(a,0,1);this._alphaTR=s,s!==0&&(this.renderFlags|=u)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(a){var s=e(a,0,1);this._alphaBL=s,s!==0&&(this.renderFlags|=u)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(a){var s=e(a,0,1);this._alphaBR=s,s!==0&&(this.renderFlags|=u)}}};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}},setSize:function(e,u){return this.width=e,this.height=u,this},setDisplaySize:function(e,u){return this.displayWidth=e,this.displayHeight=u,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={texture:null,frame:null,isCropped:!1,setCrop:function(e,u,o,a){if(e===void 0)this.isCropped=!1;else if(this.frame){if(typeof e=="number")this.frame.setCropUVs(this._crop,e,u,o,a,this.flipX,this.flipY);else{var s=e;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(e){return this.flipX=e,this},setFlipY:function(e){return this.flipY=e,this},setFlip:function(e,u){return this.flipX=e,this.flipY=u,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=t(308),o=t(3),a={prepareBoundsOutput:function(s,i){if(i===void 0&&(i=!1),this.rotation!==0&&u(s,this.x,this.y,this.rotation),i&&this.parentContainer){var n=this.parentContainer.getBoundsTransformMatrix();n.transformPoint(s.x,s.y,s)}return s},getCenter:function(s){return s===void 0&&(s=new o),s.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,s.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,s},getTopLeft:function(s,i){return s||(s=new o),s.x=this.x-this.displayWidth*this.originX,s.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(s,i)},getTopCenter:function(s,i){return s||(s=new o),s.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,s.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(s,i)},getTopRight:function(s,i){return s||(s=new o),s.x=this.x-this.displayWidth*this.originX+this.displayWidth,s.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(s,i)},getLeftCenter:function(s,i){return s||(s=new o),s.x=this.x-this.displayWidth*this.originX,s.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(s,i)},getRightCenter:function(s,i){return s||(s=new o),s.x=this.x-this.displayWidth*this.originX+this.displayWidth,s.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(s,i)},getBottomLeft:function(s,i){return s||(s=new o),s.x=this.x-this.displayWidth*this.originX,s.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(s,i)},getBottomCenter:function(s,i){return s||(s=new o),s.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,s.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(s,i)},getBottomRight:function(s,i){return s||(s=new o),s.x=this.x-this.displayWidth*this.originX+this.displayWidth,s.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(s,i)},getBounds:function(s){s===void 0&&(s=new e);var i,n,l,r,h,f,v,d;if(this.parentContainer){var p=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(s),p.transformPoint(s.x,s.y,s),i=s.x,n=s.y,this.getTopRight(s),p.transformPoint(s.x,s.y,s),l=s.x,r=s.y,this.getBottomLeft(s),p.transformPoint(s.x,s.y,s),h=s.x,f=s.y,this.getBottomRight(s),p.transformPoint(s.x,s.y,s),v=s.x,d=s.y}else this.getTopLeft(s),i=s.x,n=s.y,this.getTopRight(s),l=s.x,r=s.y,this.getBottomLeft(s),h=s.x,f=s.y,this.getBottomRight(s),v=s.x,d=s.y;return s.x=Math.min(i,l,h,v),s.y=Math.min(n,r,f,d),s.width=Math.max(i,l,h,v)-s.x,s.height=Math.max(n,r,f,d)-s.y,s}};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="blur"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="boot"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="contextlost"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="contextrestored"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="destroy"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="focus"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="hidden"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pause"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="postrender"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="poststep"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="prerender"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="prestep"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="ready"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resume"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="step"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="visible"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="postrender"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="prerender"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="render"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resize"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(e){this._displayOriginX=e,this.originX=e/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(e){this._displayOriginY=e,this.originY=e/this.height}},setOrigin:function(e,u){return e===void 0&&(e=.5),u===void 0&&(u=e),this.originX=e,this.originY=u,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(e,u){return e===void 0&&(e=0),u===void 0&&(u=e),this.displayOriginX=e,this.displayOriginY=u,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(36),u=t(99),o=t(6),a=t(100),s=t(3),i={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(n,l){l===void 0&&(l=this.pathConfig);var r=this.pathTween;return r&&r.isPlaying()&&r.stop(),this.path=n,l&&this.startFollow(l),this},setRotateToPath:function(n,l){return l===void 0&&(l=0),this.rotateToPath=n,this.pathRotationOffset=l,this},isFollowing:function(){var n=this.pathTween;return n&&n.isPlaying()},startFollow:function(n,l){n===void 0&&(n={}),l===void 0&&(l=0);var r=this.pathTween;r&&r.isPlaying()&&r.stop(),typeof n=="number"&&(n={duration:n}),n.from=o(n,"from",0),n.to=o(n,"to",1);var h=u(n,"positionOnPath",!1);this.rotateToPath=u(n,"rotateToPath",!1),this.pathRotationOffset=o(n,"rotationOffset",0);var f=o(n,"startAt",l);if(f&&(n.onStart=function(d){var p=d.data[0];p.progress=f,p.elapsed=p.duration*f;var g=p.ease(p.progress);p.current=p.start+(p.end-p.start)*g,p.target[p.key]=p.current}),this.pathOffset||(this.pathOffset=new s(this.x,this.y)),this.pathVector||(this.pathVector=new s),this.pathDelta||(this.pathDelta=new s),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(n),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var v=this.path.getPoint(.1);this.rotation=Math.atan2(v.y-this.y,v.x-this.x)+e(this.pathRotationOffset)}return this.pathConfig=n,this},pauseFollow:function(){var n=this.pathTween;return n&&n.isPlaying()&&n.pause(),this},resumeFollow:function(){var n=this.pathTween;return n&&n.isPaused()&&n.resume(),this},stopFollow:function(){var n=this.pathTween;return n&&n.isPlaying()&&n.stop(),this},pathUpdate:function(){var n=this.pathTween;if(n){var l=n.data[0],r=this.pathDelta,h=this.pathVector;if(r.copy(h).negate(),l.state===a.COMPLETE){this.path.getPoint(1,h),r.add(h),h.add(this.pathOffset),this.setPosition(h.x,h.y);return}else if(l.state!==a.PLAYING_FORWARD&&l.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(n.getValue(),h),r.add(h),h.add(this.pathOffset);var f=this.x,v=this.y;this.setPosition(h.x,h.y);var d=this.x-f,p=this.y-v;if(d===0&&p===0)return;if(l.state!==this._prevDirection){this._prevDirection=l.state;return}this.rotateToPath&&(this.rotation=Math.atan2(p,d)+e(this.pathRotationOffset))}}};c.exports=i},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(e){this.scaleX=e/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(e){this.scaleY=e/this.frame.realHeight}},setSizeToFrame:function(e){return e===void 0&&(e=this.frame),this.width=e.realWidth,this.height=e.realHeight,this},setSize:function(e,u){return this.width=e,this.height=u,this},setDisplaySize:function(e,u){return this.displayWidth=e,this.displayHeight=u,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=8,e={texture:null,frame:null,isCropped:!1,setTexture:function(u,o){return this.texture=this.scene.sys.textures.get(u),this.setFrame(o)},setFrame:function(u,o,a){return o===void 0&&(o=!0),a===void 0&&(a=!0),this.frame=this.texture.get(u),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~t:this.renderFlags|=t,this._sizeComponent&&o&&this.setSizeToFrame(),this._originComponent&&a&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=8,e={texture:null,frame:null,isCropped:!1,setCrop:function(u,o,a,s){if(u===void 0)this.isCropped=!1;else if(this.frame){if(typeof u=="number")this.frame.setCropUVs(this._crop,u,o,a,s,this.flipX,this.flipY);else{var i=u;this.frame.setCropUVs(this._crop,i.x,i.y,i.width,i.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(u,o){return this.texture=this.scene.sys.textures.get(u),this.setFrame(o)},setFrame:function(u,o,a){return o===void 0&&(o=!0),a===void 0&&(a=!0),this.frame=this.texture.get(u),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~t:this.renderFlags|=t,this._sizeComponent&&o&&this.setSizeToFrame(),this._originComponent&&a&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(e,u,o,a){return e===void 0&&(e=16777215),u===void 0&&(u=e,o=e,a=e),this.tintTopLeft=e,this.tintTopRight=u,this.tintBottomLeft=o,this.tintBottomRight=a,this.tintFill=!1,this},setTintFill:function(e,u,o,a){return this.setTint(e,u,o,a),this.tintFill=!0,this},tint:{set:function(e){this.setTint(e,e,e,e)}},isTinted:{get:function(){var e=16777215;return this.tintFill||this.tintTopLeft!==e||this.tintTopRight!==e||this.tintBottomLeft!==e||this.tintBottomRight!==e}}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="changedata"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="changedata-"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="destroy"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="removedata"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="setdata"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="addedtoscene"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="destroy"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="removedfromscene"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="complete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="created"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="error"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="loop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="play"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="seeked"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="seeking"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="stop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="timeout"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="unlocked"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="addedtoscene"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="boot"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="create"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="destroy"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pause"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="postupdate"},function(c,S){/**
 * @author       samme
 * @copyright    2021 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="prerender"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="preupdate"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="ready"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="removedfromscene"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="render"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resume"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="shutdown"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="sleep"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="start"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="transitioncomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="transitioninit"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="transitionout"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="transitionstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="transitionwake"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="update"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="wake"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(46),u=function(o,a,s,i,n){return e(o,"alpha",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(46),u=function(o,a,s,i,n){return e(o,"x",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(46),u=function(o,a,s,i,n,l,r){return s==null&&(s=a),e(o,"x",a,i,l,r),e(o,"y",s,n,l,r)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(46),u=function(o,a,s,i,n){return e(o,"y",a,s,i,n)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o===void 0&&(o=0),a===void 0&&(a=6.28);for(var s=o,i=(a-o)/e.length,n=0;n<e.length;n++)e[n].x=u.x+u.radius*Math.cos(s),e[n].y=u.y+u.radius*Math.sin(s),s+=i;return e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o===void 0&&(o=0),a===void 0&&(a=6.28);for(var s=o,i=(a-o)/e.length,n=u.width/2,l=u.height/2,r=0;r<e.length;r++)e[r].x=u.x+n*Math.cos(s),e[r].y=u.y+l*Math.sin(s),s+=i;return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(172),u=function(o,a){for(var s=e(a,o.length),i=0;i<o.length;i++){var n=o[i],l=s[i];n.x=l.x,n.y=l.y}return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(316),u=t(178),o=t(179),a=function(s,i,n){n===void 0&&(n=0);var l=e(i,!1,s.length);n>0?u(l,n):n<0&&o(l,Math.abs(n));for(var r=0;r<s.length;r++)s[r].x=l[r].x,s[r].y=l[r].y;return s};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(317),u=function(o,a,s){var i=e({x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},s),n=e({x1:a.x2,y1:a.y2,x2:a.x3,y2:a.y3},s),l=e({x1:a.x3,y1:a.y3,x2:a.x1,y2:a.y1},s);i.pop(),n.pop(),l.pop(),i=i.concat(n,l);for(var r=i.length/o.length,h=0,f=0;f<o.length;f++){var v=o[f],d=i[Math.floor(h)];v.x=d.x,v.y=d.y,h+=r}return o};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){for(var a=0;a<e.length;a++){var s=e[a];s.anims&&s.anims.play(u,o)}return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(170),u=function(o,a){for(var s=0;s<o.length;s++)e(a,o[s]);return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(180),u=function(o,a){for(var s=0;s<o.length;s++)e(a,o[s]);return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(173),u=function(o,a){for(var s=0;s<o.length;s++)e(a,o[s]);return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(174),u=function(o,a){for(var s=0;s<o.length;s++)e(a,o[s]);return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(181),u=function(o,a){for(var s=0;s<o.length;s++)e(a,o[s]);return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(46),u=function(o,a,s,i,n){return e(o,"rotation",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(182),u=t(50),o=function(a,s,i){for(var n=s.x,l=s.y,r=0;r<a.length;r++){var h=a[r];e(h,n,l,i,Math.max(1,u(h.x,h.y,n,l)))}return a};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(182),u=function(o,a,s,i){var n=a.x,l=a.y;if(i===0)return o;for(var r=0;r<o.length;r++)e(o[r],n,l,s,i);return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(46),u=function(o,a,s,i,n){return e(o,"scaleX",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(46),u=function(o,a,s,i,n,l,r){return s==null&&(s=a),e(o,"scaleX",a,i,l,r),e(o,"scaleY",s,n,l,r)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(46),u=function(o,a,s,i,n){return e(o,"scaleY",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n){return e(o,"alpha",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i){return e(o,"blendMode",a,0,s,i)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n){return e(o,"depth",a,s,i,n)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){for(var a=0;a<e.length;a++)e[a].setInteractive(u,o);return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n,l,r){return s==null&&(s=a),e(o,"originX",a,i,l,r),e(o,"originY",s,n,l,r),o.forEach(function(h){h.updateDisplayOrigin()}),o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n){return e(o,"rotation",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n,l,r){return s==null&&(s=a),e(o,"scaleX",a,i,l,r),e(o,"scaleY",s,n,l,r)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n){return e(o,"scaleX",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n){return e(o,"scaleY",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n,l,r){return s==null&&(s=a),e(o,"scrollFactorX",a,i,l,r),e(o,"scrollFactorY",s,n,l,r)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n){return e(o,"scrollFactorX",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n){return e(o,"scrollFactorY",a,s,i,n)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s){for(var i=0;i<e.length;i++)e[i].setTint(u,o,a,s);return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i){return e(o,"visible",a,0,s,i)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n){return e(o,"x",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n,l,r){return s==null&&(s=a),e(o,"x",a,i,l,r),e(o,"y",s,n,l,r)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(27),u=function(o,a,s,i,n){return e(o,"y",a,s,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=function(o,a,s,i,n){i===void 0&&(i=0),n===void 0&&(n=new e);var l,r;if(o.length>1){var h,f,v,d;if(i===0){var p=o.length-1;for(l=o[p].x,r=o[p].y,h=p-1;h>=0;h--)d=o[h],f=d.x,v=d.y,d.x=l,d.y=r,l=f,r=v;o[p].x=a,o[p].y=s}else{for(l=o[0].x,r=o[0].y,h=1;h<o.length;h++)d=o[h],f=d.x,v=d.y,d.x=l,d.y=r,l=f,r=v;o[0].x=a,o[0].y=s}}else l=o[0].x,r=o[0].y,o[0].x=a,o[0].y=s;return n.x=l,n.y=r,n};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(131),u=function(o){return e(o)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(183),u=function(o,a,s,i,n){n===void 0&&(n=!1);var l=Math.abs(i-s)/o.length,r;if(n)for(r=0;r<o.length;r++)o[r][a]+=e(r*l,s,i);else for(r=0;r<o.length;r++)o[r][a]=e(r*l,s,i);return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(184),u=function(o,a,s,i,n){n===void 0&&(n=!1);var l=Math.abs(i-s)/o.length,r;if(n)for(r=0;r<o.length;r++)o[r][a]+=e(r*l,s,i);else for(r=0;r<o.length;r++)o[r][a]=e(r*l,s,i);return o};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s){s===void 0&&(s=!1);var i=Math.abs(a-o)/e.length,n;if(s)for(n=0;n<e.length;n++)e[n][u]+=n*i+o;else for(n=0;n<e.length;n++)e[n][u]=n*i+o;return e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){for(var u=0;u<e.length;u++)e[u].visible=!e[u].visible;return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       samme <samme.npm@gmail.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(68),u=function(o,a,s){s===void 0&&(s=0);for(var i=0;i<o.length;i++){var n=o[i];n.x=e(n.x,a.left-s,a.right+s),n.y=e(n.y,a.top-s,a.bottom+s)}return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Animation:t(185),AnimationFrame:t(319),AnimationManager:t(321),AnimationState:t(164),Events:t(132)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="add"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="animationcomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="animationcomplete-"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="animationrepeat"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="animationrestart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="animationstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="animationstop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="animationupdate"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pauseall"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="remove"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resumeall"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={BaseCache:t(323),CacheManager:t(325),Events:t(324)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="add"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="remove"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Controls:t(739),Scene2D:t(742)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={FixedKeyControl:t(740),SmoothedKeyControl:t(741)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(6),o=new e({initialize:function(s){this.camera=u(s,"camera",null),this.left=u(s,"left",null),this.right=u(s,"right",null),this.up=u(s,"up",null),this.down=u(s,"down",null),this.zoomIn=u(s,"zoomIn",null),this.zoomOut=u(s,"zoomOut",null),this.zoomSpeed=u(s,"zoomSpeed",.01),this.minZoom=u(s,"minZoom",.001),this.maxZoom=u(s,"maxZoom",1e3),this.speedX=0,this.speedY=0;var i=u(s,"speed",null);typeof i=="number"?(this.speedX=i,this.speedY=i):(this.speedX=u(s,"speed.x",0),this.speedY=u(s,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(a){return this.camera=a,this},update:function(a){if(!!this.active){a===void 0&&(a=1);var s=this.camera;this.up&&this.up.isDown?s.scrollY-=this.speedY*a|0:this.down&&this.down.isDown&&(s.scrollY+=this.speedY*a|0),this.left&&this.left.isDown?s.scrollX-=this.speedX*a|0:this.right&&this.right.isDown&&(s.scrollX+=this.speedX*a|0),this.zoomIn&&this.zoomIn.isDown?(s.zoom-=this.zoomSpeed,s.zoom<this.minZoom&&(s.zoom=this.minZoom)):this.zoomOut&&this.zoomOut.isDown&&(s.zoom+=this.zoomSpeed,s.zoom>this.maxZoom&&(s.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(6),o=new e({initialize:function(s){this.camera=u(s,"camera",null),this.left=u(s,"left",null),this.right=u(s,"right",null),this.up=u(s,"up",null),this.down=u(s,"down",null),this.zoomIn=u(s,"zoomIn",null),this.zoomOut=u(s,"zoomOut",null),this.zoomSpeed=u(s,"zoomSpeed",.01),this.minZoom=u(s,"minZoom",.001),this.maxZoom=u(s,"maxZoom",1e3),this.accelX=0,this.accelY=0;var i=u(s,"acceleration",null);typeof i=="number"?(this.accelX=i,this.accelY=i):(this.accelX=u(s,"acceleration.x",0),this.accelY=u(s,"acceleration.y",0)),this.dragX=0,this.dragY=0;var n=u(s,"drag",null);typeof n=="number"?(this.dragX=n,this.dragY=n):(this.dragX=u(s,"drag.x",0),this.dragY=u(s,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var l=u(s,"maxSpeed",null);typeof l=="number"?(this.maxSpeedX=l,this.maxSpeedY=l):(this.maxSpeedX=u(s,"maxSpeed.x",0),this.maxSpeedY=u(s,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(a){return this.camera=a,this},update:function(a){if(!!this.active){a===void 0&&(a=1);var s=this.camera;this._speedX>0?(this._speedX-=this.dragX*a,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*a,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*a,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*a,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(s.scrollX-=this._speedX*a|0),this._speedY!==0&&(s.scrollY-=this._speedY*a|0),this._zoom!==0&&(s.zoom+=this._zoom,s.zoom<this.minZoom?s.zoom=this.minZoom:s.zoom>this.maxZoom&&(s.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Camera:t(326),BaseCamera:t(133),CameraManager:t(799),Effects:t(333),Events:t(37)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="cameradestroy"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerafadeincomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerafadeinstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerafadeoutcomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerafadeoutstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="cameraflashcomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="cameraflashstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="followupdate"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerapancomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerapanstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="postrender"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="prerender"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerarotatecomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerarotatestart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerashakecomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerashakestart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerazoomcomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="camerazoomstart"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=t(0),o=t(37),a=new u({initialize:function(i){this.camera=i,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(s,i,n,l,r,h,f,v){if(s===void 0&&(s=!0),i===void 0&&(i=1e3),n===void 0&&(n=0),l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=!1),f===void 0&&(f=null),v===void 0&&(v=this.camera.scene),!h&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=i,this.direction=s,this.progress=0,this.red=n,this.green=l,this.blue=r,this.alpha=s?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=f,this._onUpdateScope=v;var d=s?o.FADE_OUT_START:o.FADE_IN_START;return this.camera.emit(d,this.camera,this,i,n,l,r),this.camera},update:function(s,i){!this.isRunning||(this._elapsed+=i,this.progress=e(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this.direction?this.progress:1-this.progress:(this.alpha=this.direction?1:0,this.effectComplete()))},postRenderCanvas:function(s){if(!this.isRunning&&!this.isComplete)return!1;var i=this.camera;return s.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",s.fillRect(i.x,i.y,i.width,i.height),!0},postRenderWebGL:function(s,i){if(!this.isRunning&&!this.isComplete)return!1;var n=this.camera,l=this.red/255,r=this.green/255,h=this.blue/255;return s.drawFillRect(n.x,n.y,n.width,n.height,i(h,r,l,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var s=this.direction?o.FADE_OUT_COMPLETE:o.FADE_IN_COMPLETE;this.camera.emit(s,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=t(0),o=t(37),a=new u({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(s,i,n,l,r,h,f){return s===void 0&&(s=250),i===void 0&&(i=255),n===void 0&&(n=255),l===void 0&&(l=255),r===void 0&&(r=!1),h===void 0&&(h=null),f===void 0&&(f=this.camera.scene),!r&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=s,this.progress=0,this.red=i,this.green=n,this.blue=l,this.alpha=1,this._elapsed=0,this._onUpdate=h,this._onUpdateScope=f,this.camera.emit(o.FLASH_START,this.camera,this,s,i,n,l),this.camera)},update:function(s,i){!this.isRunning||(this._elapsed+=i,this.progress=e(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=1-this.progress:this.effectComplete())},postRenderCanvas:function(s){if(!this.isRunning)return!1;var i=this.camera;return s.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",s.fillRect(i.x,i.y,i.width,i.height),!0},postRenderWebGL:function(s,i){if(!this.isRunning)return!1;var n=this.camera,l=this.red/255,r=this.green/255,h=this.blue/255;return s.drawFillRect(n.x,n.y,n.width,n.height,i(h,r,l,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=t(0),o=t(134),a=t(37),s=t(3),i=new u({initialize:function(l){this.camera=l,this.isRunning=!1,this.duration=0,this.source=new s,this.current=new s,this.destination=new s,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(n,l,r,h,f,v,d){r===void 0&&(r=1e3),h===void 0&&(h=o.Linear),f===void 0&&(f=!1),v===void 0&&(v=null),d===void 0&&(d=this.camera.scene);var p=this.camera;return!f&&this.isRunning||(this.isRunning=!0,this.duration=r,this.progress=0,this.source.set(p.scrollX,p.scrollY),this.destination.set(n,l),p.getScroll(n,l,this.current),typeof h=="string"&&o.hasOwnProperty(h)?this.ease=o[h]:typeof h=="function"&&(this.ease=h),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=d,this.camera.emit(a.PAN_START,this.camera,this,r,n,l)),p},update:function(n,l){if(!!this.isRunning){this._elapsed+=l;var r=e(this._elapsed/this.duration,0,1);this.progress=r;var h=this.camera;if(this._elapsed<this.duration){var f=this.ease(r);h.getScroll(this.destination.x,this.destination.y,this.current);var v=this.source.x+(this.current.x-this.source.x)*f,d=this.source.y+(this.current.y-this.source.y)*f;h.setScroll(v,d),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,h,r,v,d)}else h.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,h,r,h.scrollX,h.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.PAN_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});c.exports=i},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===void 0&&(u=1.70158),e*e*((u+1)*e-u)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===void 0&&(u=1.70158),--e*e*((u+1)*e+u)+1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u===void 0&&(u=1.70158);var o=u*1.525;return(e*=2)<1?.5*(e*e*((o+1)*e-o)):.5*((e-=2)*e*((o+1)*e+o)+2)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e=1-e,e<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u=!1;return e<.5?(e=1-e*2,u=!0):e=e*2-1,e<1/2.75?e=7.5625*e*e:e<2/2.75?e=7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?e=7.5625*(e-=2.25/2.75)*e+.9375:e=7.5625*(e-=2.625/2.75)*e+.984375,u?(1-e)*.5:e*.5+.5};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return 1-Math.sqrt(1-e*e)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return Math.sqrt(1- --e*e)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e*e*e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return--e*e*e+1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(u===void 0&&(u=.1),o===void 0&&(o=.1),e===0)return 0;if(e===1)return 1;var a=o/4;return u<1?u=1:a=o*Math.asin(1/u)/(2*Math.PI),-(u*Math.pow(2,10*(e-=1))*Math.sin((e-a)*(2*Math.PI)/o))};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(u===void 0&&(u=.1),o===void 0&&(o=.1),e===0)return 0;if(e===1)return 1;var a=o/4;return u<1?u=1:a=o*Math.asin(1/u)/(2*Math.PI),u*Math.pow(2,-10*e)*Math.sin((e-a)*(2*Math.PI)/o)+1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(u===void 0&&(u=.1),o===void 0&&(o=.1),e===0)return 0;if(e===1)return 1;var a=o/4;return u<1?u=1:a=o*Math.asin(1/u)/(2*Math.PI),(e*=2)<1?-.5*(u*Math.pow(2,10*(e-=1))*Math.sin((e-a)*(2*Math.PI)/o)):u*Math.pow(2,-10*(e-=1))*Math.sin((e-a)*(2*Math.PI)/o)*.5+1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return Math.pow(2,10*(e-1))-.001};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return 1-Math.pow(2,-10*e)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e*e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e*(2-e)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e*e*e*e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return 1- --e*e*e*e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e*e*e*e*e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return--e*e*e*e*e+1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e===0?0:e===1?1:1-Math.cos(e*Math.PI/2)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e===0?0:e===1?1:Math.sin(e*Math.PI/2)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e===0?0:e===1?1:.5*(1-Math.cos(Math.PI*e))};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===void 0&&(u=1),e<=0?0:e>=1?1:((u*e|0)+1)*(1/u)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=t(0),o=t(37),a=t(3),s=new u({initialize:function(n){this.camera=n,this.isRunning=!1,this.duration=0,this.intensity=new a,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(i,n,l,r,h){return i===void 0&&(i=100),n===void 0&&(n=.05),l===void 0&&(l=!1),r===void 0&&(r=null),h===void 0&&(h=this.camera.scene),!l&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=i,this.progress=0,typeof n=="number"?this.intensity.set(n):this.intensity.set(n.x,n.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=r,this._onUpdateScope=h,this.camera.emit(o.SHAKE_START,this.camera,this,i,n),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(i,n){if(!!this.isRunning)if(this._elapsed+=n,this.progress=e(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var l=this.intensity,r=this.camera.width,h=this.camera.height,f=this.camera.zoom;this._offsetX=(Math.random()*l.x*r*2-l.x*r)*f,this._offsetY=(Math.random()*l.y*h*2-l.y*h)*f,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))}else this.effectComplete()},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.SHAKE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.intensity=null}});c.exports=s},function(c,S,t){/**
 * @author       Jason Nicholls <nicholls.jason@gmail.com>
 * @copyright    2018 Photon Storm Ltd.
 * @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
 */var e=t(18),u=t(0),o=t(37),a=t(134),s=new u({initialize:function(n){this.camera=n,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(i,n,l,r,h,f,v){l===void 0&&(l=1e3),r===void 0&&(r=a.Linear),h===void 0&&(h=!1),f===void 0&&(f=null),v===void 0&&(v=this.camera.scene),n===void 0&&(n=!1),this.shortestPath=n;var d=i;i<0?(d=-1*i,this.clockwise=!1):this.clockwise=!0;var p=360*Math.PI/180;d=d-Math.floor(d/p)*p;var g=this.camera;if(!h&&this.isRunning)return g;if(this.isRunning=!0,this.duration=l,this.progress=0,this.source=g.rotation,this.destination=d,typeof r=="string"&&a.hasOwnProperty(r)?this.ease=a[r]:typeof r=="function"&&(this.ease=r),this._elapsed=0,this._onUpdate=f,this._onUpdateScope=v,this.shortestPath){var m=0,x=0;this.destination>this.source?m=Math.abs(this.destination-this.source):m=Math.abs(this.destination+p)-this.source,this.source>this.destination?x=Math.abs(this.source-this.destination):x=Math.abs(this.source+p)-this.destination,m<x?this.clockwise=!0:m>x&&(this.clockwise=!1)}return this.camera.emit(o.ROTATE_START,this.camera,this,l,d),g},update:function(i,n){if(!!this.isRunning){this._elapsed+=n;var l=e(this._elapsed/this.duration,0,1);this.progress=l;var r=this.camera;if(this._elapsed<this.duration){var h=this.ease(l);this.current=r.rotation;var f=0,v=360*Math.PI/180,d=this.destination,p=this.current;this.clockwise===!1&&(d=this.current,p=this.destination),d>=p?f=Math.abs(d-p):f=Math.abs(d+v)-p;var g=0;this.clockwise?g=r.rotation+f*h:g=r.rotation-f*h,r.rotation=g,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,l,g)}else r.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,l,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=t(0),o=t(134),a=t(37),s=new u({initialize:function(n){this.camera=n,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(i,n,l,r,h,f){n===void 0&&(n=1e3),l===void 0&&(l=o.Linear),r===void 0&&(r=!1),h===void 0&&(h=null),f===void 0&&(f=this.camera.scene);var v=this.camera;return!r&&this.isRunning||(this.isRunning=!0,this.duration=n,this.progress=0,this.source=v.zoom,this.destination=i,typeof l=="string"&&o.hasOwnProperty(l)?this.ease=o[l]:typeof l=="function"&&(this.ease=l),this._elapsed=0,this._onUpdate=h,this._onUpdateScope=f,this.camera.emit(a.ZOOM_START,this.camera,this,n,i)),v},update:function(i,n){!this.isRunning||(this._elapsed+=n,this.progress=e(this._elapsed/this.duration,0,1),this._elapsed<this.duration?(this.camera.zoom=this.source+(this.destination-this.source)*this.ease(this.progress),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.camera.zoom)):(this.camera.zoom=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.destination),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(326),u=t(0),o=t(2),a=t(24),s=t(57),i=t(104),n=t(20),l=new u({initialize:function(h){this.scene=h,this.systems=h.sys,this.roundPixels=h.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,h.sys.events.once(n.BOOT,this.boot,this),h.sys.events.on(n.START,this.start,this)},boot:function(){var r=this.systems;r.settings.cameras?this.fromJSON(r.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new e(0,0,r.scale.width,r.scale.height).setScene(this.scene),r.game.scale.on(i.RESIZE,this.onResize,this),this.systems.events.once(n.DESTROY,this.destroy,this)},start:function(){if(!this.main){var r=this.systems;r.settings.cameras?this.fromJSON(r.settings.cameras):this.add(),this.main=this.cameras[0]}var h=this.systems.events;h.on(n.UPDATE,this.update,this),h.once(n.SHUTDOWN,this.shutdown,this)},add:function(r,h,f,v,d,p){r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=this.scene.sys.scale.width),v===void 0&&(v=this.scene.sys.scale.height),d===void 0&&(d=!1),p===void 0&&(p="");var g=new e(r,h,f,v);return g.setName(p),g.setScene(this.scene),g.setRoundPixels(this.roundPixels),g.id=this.getNextID(),this.cameras.push(g),d&&(this.main=g),g},addExisting:function(r,h){h===void 0&&(h=!1);var f=this.cameras.indexOf(r);return f===-1?(r.id=this.getNextID(),r.setRoundPixels(this.roundPixels),this.cameras.push(r),h&&(this.main=r),r):null},getNextID:function(){for(var r=this.cameras,h=1,f=0;f<32;f++){for(var v=!1,d=0;d<r.length;d++){var p=r[d];if(p&&p.id===h){v=!0;continue}}if(v)h=h<<1;else return h}return 0},getTotal:function(r){r===void 0&&(r=!1);for(var h=0,f=this.cameras,v=0;v<f.length;v++){var d=f[v];(!r||r&&d.visible)&&h++}return h},fromJSON:function(r){Array.isArray(r)||(r=[r]);for(var h=this.scene.sys.scale.width,f=this.scene.sys.scale.height,v=0;v<r.length;v++){var d=r[v],p=o(d,"x",0),g=o(d,"y",0),m=o(d,"width",h),x=o(d,"height",f),y=this.add(p,g,m,x);y.name=o(d,"name",""),y.zoom=o(d,"zoom",1),y.rotation=o(d,"rotation",0),y.scrollX=o(d,"scrollX",0),y.scrollY=o(d,"scrollY",0),y.roundPixels=o(d,"roundPixels",!1),y.visible=o(d,"visible",!0);var T=o(d,"backgroundColor",!1);T&&y.setBackgroundColor(T);var E=o(d,"bounds",null);if(E){var C=o(E,"x",0),A=o(E,"y",0),P=o(E,"width",h),M=o(E,"height",f);y.setBounds(C,A,P,M)}}return this},getCamera:function(r){for(var h=this.cameras,f=0;f<h.length;f++)if(h[f].name===r)return h[f];return null},getCamerasBelowPointer:function(r){for(var h=this.cameras,f=r.x,v=r.y,d=[],p=0;p<h.length;p++){var g=h[p];g.visible&&g.inputEnabled&&s(g,f,v)&&d.unshift(g)}return d},remove:function(r,h){h===void 0&&(h=!0),Array.isArray(r)||(r=[r]);for(var f=0,v=this.cameras,d=0;d<r.length;d++){var p=v.indexOf(r[d]);p!==-1&&(h?v[p].destroy():v[p].renderList=[],v.splice(p,1),f++)}return!this.main&&v[0]&&(this.main=v[0]),f},render:function(r,h){for(var f=this.scene,v=this.cameras,d=0;d<this.cameras.length;d++){var p=v[d];if(p.visible&&p.alpha>0){p.preRender();var g=this.getVisibleChildren(h.getChildren(),p);r.render(f,g,p)}}},getVisibleChildren:function(r,h){for(var f=[],v=0;v<r.length;v++){var d=r[v];d.willRender(h)&&f.push(d)}return f},resetAll:function(){for(var r=0;r<this.cameras.length;r++)this.cameras[r].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(r,h){for(var f=0;f<this.cameras.length;f++)this.cameras[f].update(r,h)},onResize:function(r,h,f,v,d){for(var p=0;p<this.cameras.length;p++){var g=this.cameras[p];g._x===0&&g._y===0&&g._width===v&&g._height===d&&g.setSize(h.width,h.height)}},resize:function(r,h){for(var f=0;f<this.cameras.length;f++)this.cameras[f].setSize(r,h)},shutdown:function(){this.main=void 0;for(var r=0;r<this.cameras.length;r++)this.cameras[r].destroy();this.cameras=[];var h=this.systems.events;h.off(n.UPDATE,this.update,this),h.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.scene.sys.events.off(n.START,this.start,this),this.scene=null,this.systems=null}});a.register("CameraManager",l,"cameras"),c.exports=l},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="enterfullscreen"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="fullscreenfailed"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="fullscreenunsupported"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="leavefullscreen"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="orientationchange"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resize"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Config:t(346),CreateRenderer:t(366),DebugHeader:t(384),Events:t(22),TimeStep:t(385),VisibilityHandler:t(387)}},function(c,S){var t=c.exports={},e,u;function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=o}catch{e=o}try{typeof clearTimeout=="function"?u=clearTimeout:u=a}catch{u=a}})();function s(g){if(e===setTimeout)return setTimeout(g,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(g,0);try{return e(g,0)}catch{try{return e.call(null,g,0)}catch{return e.call(this,g,0)}}}function i(g){if(u===clearTimeout)return clearTimeout(g);if((u===a||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(g);try{return u(g)}catch{try{return u.call(null,g)}catch{return u.call(this,g)}}}var n=[],l=!1,r,h=-1;function f(){!l||!r||(l=!1,r.length?n=r.concat(n):h=-1,n.length&&v())}function v(){if(!l){var g=s(f);l=!0;for(var m=n.length;m;){for(r=n,n=[];++h<m;)r&&r[h].run();h=-1,m=n.length}r=null,l=!1,i(g)}}t.nextTick=function(g){var m=new Array(arguments.length-1);if(arguments.length>1)for(var x=1;x<arguments.length;x++)m[x-1]=arguments[x];n.push(new d(g,m)),n.length===1&&!l&&s(v)};function d(g,m){this.fun=g,this.array=m}d.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function p(){}t.on=p,t.addListener=p,t.once=p,t.off=p,t.removeListener=p,t.removeAllListeners=p,t.emit=p,t.prependListener=p,t.prependOnceListener=p,t.listeners=function(g){return[]},t.binding=function(g){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(g){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(136),u={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function o(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(u.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(u.mspointer=!0),navigator.getGamepads&&(u.gamepads=!0),"onwheel"in window||e.ie&&"WheelEvent"in window?u.wheelEvent="wheel":"onmousewheel"in window?u.wheelEvent="mousewheel":e.firefox&&"MouseScrollEvent"in window&&(u.wheelEvent="DOMMouseScroll")),u}c.exports=o()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(136),u={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function o(){if(typeof importScripts=="function")return u;u.audioData=!!window.Audio,u.webAudio=!!(window.AudioContext||window.webkitAudioContext);var a=document.createElement("audio"),s=!!a.canPlayType;try{if(s&&(a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(u.ogg=!0),(a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||a.canPlayType("audio/opus;").replace(/^no$/,""))&&(u.opus=!0),a.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(u.mp3=!0),a.canPlayType("audio/wav").replace(/^no$/,"")&&(u.wav=!0),(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;").replace(/^no$/,""))&&(u.m4a=!0),a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(u.webm=!0),a.canPlayType('audio/mp4;codecs="ec-3"')!=="")){if(e.edge)u.dolby=!0;else if(e.safari&&e.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),n=parseInt(RegExp.$2,10);(i===10&&n>=11||i>10)&&(u.dolby=!0)}}}catch{}return u}c.exports=o()},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};function e(){if(typeof importScripts=="function")return t;var u=document.createElement("video"),o=!!u.canPlayType;try{o&&(u.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(t.ogg=!0),u.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(t.h264=!0,t.mp4=!0),u.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(t.webm=!0),u.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(t.vp9=!0),u.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(t.hls=!0))}catch{}return t}c.exports=e()},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={available:!1,cancel:"",keyboard:!1,request:""};function e(){if(typeof importScripts=="function")return t;var u,o="Fullscreen",a="FullScreen",s=["request"+o,"request"+a,"webkitRequest"+o,"webkitRequest"+a,"msRequest"+o,"msRequest"+a,"mozRequest"+a,"mozRequest"+o];for(u=0;u<s.length;u++)if(document.documentElement[s[u]]){t.available=!0,t.request=s[u];break}var i=["cancel"+a,"exit"+o,"webkitCancel"+a,"webkitExit"+o,"msCancel"+a,"msExit"+o,"mozCancel"+a,"mozExit"+o];if(t.available){for(u=0;u<i.length;u++)if(document[i[u]]){t.cancel=i[u];break}}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(t.keyboard=!0),Object.defineProperty(t,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),t}c.exports=e()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Between:t(349),BetweenPoints:t(350),BetweenPointsY:t(813),BetweenY:t(814),CounterClockwise:t(815),Normalize:t(351),Random:t(816),RandomDegrees:t(817),Reverse:t(818),RotateTo:t(819),ShortestBetween:t(820),Wrap:t(269),WrapDegrees:t(270)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return Math.atan2(u.x-e.x,u.y-e.y)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){return Math.atan2(o-e,a-u)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=function(o){return o>Math.PI&&(o-=e.PI2),Math.abs(((o+e.TAU)%e.PI2-e.PI2)%e.PI2)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       @samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(137),u=function(){return e(-Math.PI,Math.PI)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       @samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(137),u=function(){return e(-180,180)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(351),u=function(o){return e(o+Math.PI)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=function(o,a,s){return s===void 0&&(s=.05),o===a||(Math.abs(a-o)<=s||Math.abs(a-o)>=e.PI2-s?o=a:(Math.abs(a-o)>Math.PI&&(a<o?a+=e.PI2:a-=e.PI2),a>o?o+=s:a<o&&(o-=s))),o};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=u-e;if(o===0)return 0;var a=Math.floor((o- -180)/360);return o-a*360};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Between:t(50),BetweenPoints:t(352),BetweenPointsSquared:t(822),Chebyshev:t(823),Power:t(824),Snake:t(825),Squared:t(353)}},function(c,S){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.x-u.x,a=e.y-u.y;return o*o+a*a};c.exports=t},function(c,S){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){return Math.max(Math.abs(e-o),Math.abs(u-a))};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s){return s===void 0&&(s=2),Math.sqrt(Math.pow(o-e,s)+Math.pow(a-u,s))};c.exports=t},function(c,S){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){return Math.abs(e-o)+Math.abs(u-a)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Back:t(334),Bounce:t(335),Circular:t(336),Cubic:t(337),Elastic:t(338),Expo:t(339),Linear:t(340),Quadratic:t(341),Quartic:t(342),Quintic:t(343),Sine:t(344),Stepped:t(345)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Ceil:t(828),Equal:t(124),Floor:t(829),GreaterThan:t(354),LessThan:t(355)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===void 0&&(u=1e-4),Math.ceil(e-u)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===void 0&&(u=1e-4),Math.floor(e+u)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Bezier:t(831),CatmullRom:t(832),CubicBezier:t(358),Linear:t(833),QuadraticBezier:t(359),SmoothStep:t(360),SmootherStep:t(834)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(356),u=function(o,a){for(var s=0,i=o.length-1,n=0;n<=i;n++)s+=Math.pow(1-a,i-n)*Math.pow(a,n)*o[n]*e(i,n);return s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(194),u=function(o,a){var s=o.length-1,i=s*a,n=Math.floor(i);return o[0]===o[s]?(a<0&&(n=Math.floor(i=s*(1+a))),e(i-n,o[(n-1+s)%s],o[n],o[(n+1)%s],o[(n+2)%s])):a<0?o[0]-(e(-i,o[0],o[0],o[1],o[1])-o[0]):a>1?o[s]-(e(i-s,o[s],o[s],o[s-1],o[s-1])-o[s]):e(i-n,o[n?n-1:0],o[n],o[s<n+1?s:n+1],o[s<n+2?s:n+2])};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(135),u=function(o,a){var s=o.length-1,i=s*a,n=Math.floor(i);return a<0?e(o[0],o[1],i):a>1?e(o[s],o[s-1],s-i):e(o[n],o[n+1>s?s:n+1],i-n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(183),u=function(o,a,s){return a+(s-a)*e(o,0,1)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={GetNext:t(361),IsSize:t(138),IsValue:t(836)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e>0&&(e&e-1)==0};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Ceil:t(139),Floor:t(76),To:t(838)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){return o===void 0&&(o=0),u===0?e:(e-=o,e=u*Math.round(e/u),a?(o+e)/u:o+e)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=new e({initialize:function(a){a===void 0&&(a=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],a&&this.init(a)},rnd:function(){var o=2091639*this.s0+this.c*23283064365386963e-26;return this.c=o|0,this.s0=this.s1,this.s1=this.s2,this.s2=o-this.c,this.s2},hash:function(o){var a,s=this.n;o=o.toString();for(var i=0;i<o.length;i++)s+=o.charCodeAt(i),a=.02519603282416938*s,s=a>>>0,a-=s,a*=s,s=a>>>0,a-=s,s+=a*4294967296;return this.n=s,(s>>>0)*23283064365386963e-26},init:function(o){typeof o=="string"?this.state(o):this.sow(o)},sow:function(o){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!o)for(var a=0;a<o.length&&o[a]!=null;a++){var s=o[a];this.s0-=this.hash(s),this.s0+=~~(this.s0<0),this.s1-=this.hash(s),this.s1+=~~(this.s1<0),this.s2-=this.hash(s),this.s2+=~~(this.s2<0)}},integer:function(){return this.rnd()*4294967296},frac:function(){return this.rnd()+(this.rnd()*2097152|0)*11102230246251565e-32},real:function(){return this.integer()+this.frac()},integerInRange:function(o,a){return Math.floor(this.realInRange(0,a-o+1)+o)},between:function(o,a){return Math.floor(this.realInRange(0,a-o+1)+o)},realInRange:function(o,a){return this.frac()*(a-o)+o},normal:function(){return 1-2*this.frac()},uuid:function(){var o="",a="";for(a=o="";o++<36;a+=~o%5|o*3&4?(o^15?8^this.frac()*(o^20?16:4):4).toString(16):"-");return a},pick:function(o){return o[this.integerInRange(0,o.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(o){return o[~~(Math.pow(this.frac(),2)*(o.length-1)+.5)]},timestamp:function(o,a){return this.realInRange(o||9466848e5,a||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(o){return typeof o=="string"&&o.match(/^!rnd/)&&(o=o.split(","),this.c=parseFloat(o[1]),this.s0=parseFloat(o[2]),this.s1=parseFloat(o[3]),this.s2=parseFloat(o[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(o){for(var a=o.length-1,s=a;s>0;s--){var i=Math.floor(this.frac()*(s+1)),n=o[i];o[i]=o[s],o[s]=n}return o}});c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){for(var u=0,o=0;o<e.length;o++)u+=+e[o];return u/e.length};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){u===void 0&&(u=0),o===void 0&&(o=10);var a=Math.pow(o,-u);return Math.ceil(e*a)/a};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return Math.abs(e-u)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=t(0),o=t(69),a=t(1),s=new o,i=new u({initialize:function n(l,r,h,f){l===void 0&&(l=0),r===void 0&&(r=0),h===void 0&&(h=0),f===void 0&&(f=n.DefaultOrder),this._x=l,this._y=r,this._z=h,this._order=f,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(n){this._x=n,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(n){this._y=n,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(n){this._z=n,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(n){this._order=n,this.onChangeCallback(this)}},set:function(n,l,r,h){return h===void 0&&(h=this._order),this._x=n,this._y=l,this._z=r,this._order=h,this.onChangeCallback(this),this},copy:function(n){return this.set(n.x,n.y,n.z,n.order)},setFromQuaternion:function(n,l,r){return l===void 0&&(l=this._order),r===void 0&&(r=!1),s.fromQuat(n),this.setFromRotationMatrix(s,l,r)},setFromRotationMatrix:function(n,l,r){l===void 0&&(l=this._order),r===void 0&&(r=!1);var h=n.val,f=h[0],v=h[4],d=h[8],p=h[1],g=h[5],m=h[9],x=h[2],y=h[6],T=h[10],E=0,C=0,A=0,P=.99999;switch(l){case"XYZ":{C=Math.asin(e(d,-1,1)),Math.abs(d)<P?(E=Math.atan2(-m,T),A=Math.atan2(-v,f)):E=Math.atan2(y,g);break}case"YXZ":{E=Math.asin(-e(m,-1,1)),Math.abs(m)<P?(C=Math.atan2(d,T),A=Math.atan2(p,g)):C=Math.atan2(-x,f);break}case"ZXY":{E=Math.asin(e(y,-1,1)),Math.abs(y)<P?(C=Math.atan2(-x,T),A=Math.atan2(-v,g)):A=Math.atan2(p,f);break}case"ZYX":{C=Math.asin(-e(x,-1,1)),Math.abs(x)<P?(E=Math.atan2(y,T),A=Math.atan2(p,f)):A=Math.atan2(-v,g);break}case"YZX":{A=Math.asin(e(p,-1,1)),Math.abs(p)<P?(E=Math.atan2(-m,g),C=Math.atan2(-x,f)):C=Math.atan2(d,T);break}case"XZY":{A=Math.asin(-e(v,-1,1)),Math.abs(v)<P?(E=Math.atan2(y,g),C=Math.atan2(d,f)):E=Math.atan2(-m,T);break}}return this._x=E,this._y=C,this._z=A,this._order=l,r&&this.onChangeCallback(this),this}});i.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],i.DefaultOrder="XYZ",c.exports=i},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){u===void 0&&(u=0),o===void 0&&(o=10);var a=Math.pow(o,-u);return Math.floor(e*a)/a};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e/u/1e3};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e==parseFloat(e)?!(e%2):void 0};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e===parseFloat(e)?!(e%2):void 0};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return Math.min(e+u,o)};c.exports=t},function(c,S){/**
 * @author       Vladislav Forsh <vlad@robowhale.com>
 * @copyright    2021 RoboWhale
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u=e.length;if(u===0)return 0;e.sort(function(a,s){return a-s});var o=Math.floor(u/2);return u%2==0?(e[o]+e[o-1])/2:e[o]};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return Math.max(e-u,o)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o===void 0&&(o=u+1);var s=(e-u)/(o-u);return s>1?a!==void 0?(s=(a-e)/(a-o),s<0&&(s=0)):s=1:s<0&&(s=0),s};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u===void 0&&(u=1);var o=Math.random()*2*Math.PI;return e.x=Math.cos(o)*u,e.y=Math.sin(o)*u,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u===void 0&&(u=1);var o=Math.random()*2*Math.PI,a=Math.random()*2-1,s=Math.sqrt(1-a*a)*u;return e.x=Math.cos(o)*s,e.y=Math.sin(o)*s,e.z=a*u,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===void 0&&(u=1),e.x=(Math.random()*2-1)*u,e.y=(Math.random()*2-1)*u,e.z=(Math.random()*2-1)*u,e.w=(Math.random()*2-1)*u,e};c.exports=t},function(c,S){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s){return e.x=u+s*Math.cos(a),e.y=o+s*Math.sin(a),e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){u===void 0&&(u=0),o===void 0&&(o=10);var a=Math.pow(o,-u);return Math.round(e*a)/a};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){u===void 0&&(u=1),o===void 0&&(o=1),a===void 0&&(a=1),a*=Math.PI/e;for(var s=[],i=[],n=0;n<e;n++)o-=u*a,u+=o*a,s[n]=o,i[n]=u;return{sin:i,cos:s,length:e}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3),u=function(o,a,s,i){i===void 0&&(i=new e);var n=0,l=0,r=a*s;return o>0&&o<=r&&(o>a-1?(l=Math.floor(o/a),n=o-l*a):n=o),i.set(n,l)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return Math.abs(e-u)<=o};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(39),u=t(69),o=t(365),a=new u,s=new o,i=new e,n=function(l,r,h){return s.setAxisAngle(r,h),a.fromRotationTranslation(s,i.set(0,0,0)),l.transformMat4(a)};c.exports=n},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="addtexture"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="onerror"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="onload"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="ready"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="removetexture"},function(c,S){c.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{","    vec2 uv = gl_FragCoord.xy / uResolution;","    vec4 mainColor = texture2D(uMainSampler, uv);","    vec4 maskColor = texture2D(uMaskSampler, uv);","    float alpha = mainColor.a;","","    if (!uInvertMaskAlpha)","    {","        alpha *= (maskColor.a);","    }","    else","    {","        alpha *= (1.0 - maskColor.a);","    }","","    gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{","    gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join(`
`)},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pipelineafterflush"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pipelinebeforeflush"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pipelinebind"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pipelineboot"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pipelinedestroy"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pipelinerebind"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pipelineresize"},function(c,S){c.exports=["#define SHADER_NAME PHASER_GRAPHICS_FS","","precision mediump float;","","varying vec4 outColor;","","void main ()","{","    gl_FragColor = vec4(outColor.bgr * outColor.a, outColor.a);","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_GRAPHICS_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec4 inColor;","","varying vec4 outColor;","","void main ()","{","    gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","","    outColor = inColor;","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{","    vec2 position;","    vec3 color;","    float intensity;","    float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{","    vec3 finalColor = vec3(0.0, 0.0, 0.0);","    vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.bgr * outTint.a, outTint.a);","    vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;","    vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));","    vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;","","    for (int index = 0; index < kMaxLights; ++index)","    {","        Light light = uLights[index];","        vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);","        vec3 lightNormal = normalize(lightDir);","        float distToSurf = length(lightDir) * uCamera.w;","        float diffuseFactor = max(dot(normal, lightNormal), 0.0);","        float radius = (light.radius / res.x * uCamera.w) * uCamera.w;","        float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);","        vec3 diffuse = light.color * diffuseFactor;","        finalColor += (attenuation * diffuse) * light.intensity;","    }","","    vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);","","    gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_MULTI_FS","","precision mediump float;","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{","    vec4 texture;","","    %forloop%","","    vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);","","    //  Multiply texture tint","    vec4 color = texture * texel;","","    if (outTintEffect == 1.0)","    {","        //  Solid color + texture alpha","        color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);","    }","    else if (outTintEffect == 2.0)","    {","        //  Solid color, no texture","        color = texel;","    }","","    gl_FragColor = color;","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_MULTI_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{","    gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","","    outTexCoord = inTexCoord;","    outTexId = inTexId;","    outTint = inTint;","    outTintEffect = inTintEffect;","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{","    vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);","","    float distToSurf = length(center - gl_FragCoord.xy);","","    float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);","","    float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);","","    vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;","","    gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{","    lightColor = inLightColor;","    lightRadius = inLightRadius;","    lightAttenuation = inLightAttenuation;","    lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);","","    gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{","    vec4 texture = texture2D(uMainSampler, outTexCoord);","    vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);","","    //  Multiply texture tint","    vec4 color = texture * texel;","","    if (outTintEffect == 1.0)","    {","        //  Solid color + texture alpha","        color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);","    }","    else if (outTintEffect == 2.0)","    {","        //  Solid color, no texture","        color = texel;","    }","","    gl_FragColor = color;","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{","    gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","","    outTexCoord = inTexCoord;","    outTint = inTint;","    outTintEffect = inTintEffect;","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{","    vec4 frame1 = texture2D(uMainSampler1, outTexCoord);","    vec4 frame2 = texture2D(uMainSampler2, outTexCoord);","","    gl_FragColor = frame1 + frame2 * uStrength;","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{","    vec4 c = texture2D(uMainSampler, outTexCoord);","","    if (uAlpha == 0.0)","    {","        gl_FragColor = c;","","        return;","    }","","    if (c.a > 0.0)","    {","        c.rgb /= c.a;","    }","","    vec4 result;","","    result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];","    result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];","    result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];","    result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];","","    vec3 rgb = mix(c.rgb, result.rgb, uAlpha);","","    rgb *= result.a;","","    gl_FragColor = vec4(rgb, result.a);","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{","    gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join(`
`)},function(c,S){c.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{","    vec4 frame1 = texture2D(uMainSampler1, outTexCoord);","    vec4 frame2 = texture2D(uMainSampler2, outTexCoord);","","    gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join(`
`)},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={GenerateTexture:t(388),Palettes:t(889)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ARNE16:t(389),C64:t(890),CGA:t(891),JMP:t(892),MSX:t(893)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Path:t(895),MoveTo:t(393),CubicBezier:t(390),Curve:t(94),Ellipse:t(391),Line:t(392),QuadraticBezier:t(394),Spline:t(395)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(390),o=t(391),a=t(5),s=t(392),i=t(393),n=t(394),l=t(10),r=t(395),h=t(3),f=t(14),v=new e({initialize:function(p,g){p===void 0&&(p=0),g===void 0&&(g=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new h,this._tmpVec2A=new h,this._tmpVec2B=new h,typeof p=="object"?this.fromJSON(p):this.startPoint.set(p,g)},add:function(d){return this.curves.push(d),this},circleTo:function(d,p,g){return p===void 0&&(p=!1),this.ellipseTo(d,d,0,360,p,g)},closePath:function(){var d=this.curves[0].getPoint(0),p=this.curves[this.curves.length-1].getPoint(1);return d.equals(p)||this.curves.push(new s(p,d)),this},cubicBezierTo:function(d,p,g,m,x,y){var T=this.getEndPoint(),E,C,A;return d instanceof h?(E=d,C=p,A=g):(E=new h(g,m),C=new h(x,y),A=new h(d,p)),this.add(new u(T,E,C,A))},quadraticBezierTo:function(d,p,g,m){var x=this.getEndPoint(),y,T;return d instanceof h?(y=d,T=p):(y=new h(g,m),T=new h(d,p)),this.add(new n(x,y,T))},draw:function(d,p){for(var g=0;g<this.curves.length;g++){var m=this.curves[g];!m.active||m.draw(d,p)}return d},ellipseTo:function(d,p,g,m,x,y){var T=new o(0,0,d,p,g,m,x,y),E=this.getEndPoint(this._tmpVec2A),C=T.getStartPoint(this._tmpVec2B);return E.subtract(C),T.x=E.x,T.y=E.y,this.add(T)},fromJSON:function(d){this.curves=[],this.cacheLengths=[],this.startPoint.set(d.x,d.y),this.autoClose=d.autoClose;for(var p=0;p<d.curves.length;p++){var g=d.curves[p];switch(g.type){case"LineCurve":this.add(s.fromJSON(g));break;case"EllipseCurve":this.add(o.fromJSON(g));break;case"SplineCurve":this.add(r.fromJSON(g));break;case"CubicBezierCurve":this.add(u.fromJSON(g));break;case"QuadraticBezierCurve":this.add(n.fromJSON(g));break}}return this},getBounds:function(d,p){d===void 0&&(d=new l),p===void 0&&(p=16),d.x=Number.MAX_VALUE,d.y=Number.MAX_VALUE;for(var g=new l,m=f.MIN_SAFE_INTEGER,x=f.MIN_SAFE_INTEGER,y=0;y<this.curves.length;y++){var T=this.curves[y];!T.active||(T.getBounds(g,p),d.x=Math.min(d.x,g.x),d.y=Math.min(d.y,g.y),m=Math.max(m,g.right),x=Math.max(x,g.bottom))}return d.right=m,d.bottom=x,d},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var d=[],p=0,g=0;g<this.curves.length;g++)p+=this.curves[g].getLength(),d.push(p);return this.cacheLengths=d,d},getEndPoint:function(d){return d===void 0&&(d=new h),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,d):d.copy(this.startPoint),d},getLength:function(){var d=this.getCurveLengths();return d[d.length-1]},getPoint:function(d,p){p===void 0&&(p=new h);for(var g=d*this.getLength(),m=this.getCurveLengths(),x=0;x<m.length;){if(m[x]>=g){var y=m[x]-g,T=this.curves[x],E=T.getLength(),C=E===0?0:1-y/E;return T.getPointAt(C,p)}x++}return null},getPoints:function(d){d===void 0&&(d=12);for(var p=[],g,m=0;m<this.curves.length;m++){var x=this.curves[m];if(!!x.active)for(var y=x.getResolution(d),T=x.getPoints(y),E=0;E<T.length;E++){var C=T[E];g&&g.equals(C)||(p.push(C),g=C)}}return this.autoClose&&p.length>1&&!p[p.length-1].equals(p[0])&&p.push(p[0]),p},getRandomPoint:function(d){return d===void 0&&(d=new h),this.getPoint(Math.random(),d)},getSpacedPoints:function(d){d===void 0&&(d=40);for(var p=[],g=0;g<=d;g++)p.push(this.getPoint(g/d));return this.autoClose&&p.push(p[0]),p},getStartPoint:function(d){return d===void 0&&(d=new h),d.copy(this.startPoint)},getTangent:function(d,p){p===void 0&&(p=new h);for(var g=d*this.getLength(),m=this.getCurveLengths(),x=0;x<m.length;){if(m[x]>=g){var y=m[x]-g,T=this.curves[x],E=T.getLength(),C=E===0?0:1-y/E;return T.getTangentAt(C,p)}x++}return null},lineTo:function(d,p){d instanceof h?this._tmpVec2B.copy(d):this._tmpVec2B.set(d,p);var g=this.getEndPoint(this._tmpVec2A);return this.add(new s([g.x,g.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(d){return d.unshift(this.getEndPoint()),this.add(new r(d))},moveTo:function(d,p){return d instanceof h?this.add(new i(d.x,d.y)):this.add(new i(d,p))},toJSON:function(){for(var d=[],p=0;p<this.curves.length;p++)d.push(this.curves[p].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:d}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});a.register("path",function(d,p){return new v(d,p)}),c.exports=v},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={DataManager:t(101),DataManagerPlugin:t(897),Events:t(315)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(101),o=t(24),a=t(20),s=new e({Extends:u,initialize:function(n){u.call(this,n,n.sys.events),this.scene=n,this.systems=n.sys,n.sys.events.once(a.BOOT,this.boot,this),n.sys.events.on(a.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){u.prototype.destroy.call(this),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});o.register("DataManagerPlugin",s,"data"),c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Align:t(899),BaseShader:t(396),Bounds:t(902),Canvas:t(906),Color:t(397),ColorMatrix:t(198),Masks:t(916),RGB:t(200)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(123),u=t(17),o={In:t(900),To:t(901)};o=u(!1,o,e),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={BottomCenter:t(290),BottomLeft:t(291),BottomRight:t(292),Center:t(293),LeftCenter:t(295),QuickSet:t(289),RightCenter:t(296),TopCenter:t(297),TopLeft:t(298),TopRight:t(299)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={BottomCenter:t(277),BottomLeft:t(278),BottomRight:t(279),LeftBottom:t(280),LeftCenter:t(281),LeftTop:t(282),QuickSet:t(276),RightBottom:t(283),RightCenter:t(284),RightTop:t(285),TopCenter:t(286),TopLeft:t(287),TopRight:t(288)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={CenterOn:t(294),GetBottom:t(42),GetBounds:t(903),GetCenterX:t(87),GetCenterY:t(89),GetLeft:t(43),GetOffsetX:t(904),GetOffsetY:t(905),GetRight:t(44),GetTop:t(45),SetBottom:t(55),SetCenterX:t(88),SetCenterY:t(90),SetLeft:t(53),SetRight:t(54),SetTop:t(52)}},function(c,S,t){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(42),u=t(43),o=t(44),a=t(45),s=function(i,n){n===void 0&&(n={});var l=u(i),r=a(i);return n.x=l,n.y=r,n.width=o(i)-l,n.height=e(i)-r,n};c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.width*e.originX};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.height*e.originY};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={CanvasInterpolation:t(367),CanvasPool:t(31),Smoothing:t(192),TouchAction:t(907),UserSelect:t(908)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===void 0&&(u="none"),e.style.msTouchAction=u,e.style["ms-touch-action"]=u,e.style["touch-action"]=u,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u===void 0&&(u="none");var o=["-webkit-","-khtml-","-moz-","-ms-",""];return o.forEach(function(a){e.style[a+"user-select"]=u}),e.style["-webkit-touch-callout"]=u,e.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(103),u=function(o){o===void 0&&(o=1024);var a=[],s=255,i,n=255,l=0,r=0;for(i=0;i<=s;i++)a.push({r:n,g:i,b:r,color:e(n,i,r)});for(l=255,i=s;i>=0;i--)a.push({r:i,g:l,b:r,color:e(i,l,r)});for(n=0,i=0;i<=s;i++,l--)a.push({r:n,g:l,b:i,color:e(n,l,i)});for(l=0,r=255,i=0;i<=s;i++,r--,n++)a.push({r:n,g:l,b:r,color:e(n,l,r)});if(o===1024)return a;var h=[],f=0,v=1024/o;for(i=0;i<o;i++)h.push(a[Math.floor(f)]),f+=v;return h};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u={r:e>>16&255,g:e>>8&255,b:e&255,a:255};return e>16777215&&(u.a=e>>>24),u};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(38),u=t(399),o=function(a,s,i){var n=i,l=i,r=i;if(s!==0){var h=i<.5?i*(1+s):i+s-i*s,f=2*i-h;n=u(f,h,a+1/3),l=u(f,h,a),r=u(f,h,a-1/3)}var v=new e;return v.setGLTo(n,l,r,1)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(188),u=function(o,a){o===void 0&&(o=1),a===void 0&&(a=1);for(var s=[],i=0;i<=359;i++)s.push(e(i/359,o,a));return s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(135),u=function(s,i,n,l,r,h,f,v){f===void 0&&(f=100),v===void 0&&(v=0);var d=v/f;return{r:e(s,l,d),g:e(i,r,d),b:e(n,h,d)}},o=function(s,i,n,l){return n===void 0&&(n=100),l===void 0&&(l=0),u(s.r,s.g,s.b,i.r,i.g,i.b,n,l)},a=function(s,i,n,l,r,h){return r===void 0&&(r=100),h===void 0&&(h=0),u(s.r,s.g,s.b,i,n,l,r,h)};c.exports={RGBWithRGB:u,ColorWithRGB:a,ColorWithColor:o}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(195),u=t(38),o=function(a,s){return a===void 0&&(a=0),s===void 0&&(s=255),new u(e(a,s),e(a,s),e(a,s))};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(398),u=function(o,a,s,i,n){return i===void 0&&(i=255),n===void 0&&(n="#"),n==="#"?"#"+((1<<24)+(o<<16)+(a<<8)+s).toString(16).slice(1,7):"0x"+e(i)+e(o)+e(a)+e(s)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={BitmapMask:t(310),GeometryMask:t(311)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e={AddToDOM:t(142),DOMContentLoaded:t(400),GetInnerHeight:t(401),GetScreenOrientation:t(402),GetTarget:t(407),ParseXML:t(408),RemoveFromDOM:t(202),RequestAnimationFrame:t(386)};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={EventEmitter:t(919)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(9),o=t(24),a=new e({Extends:u,initialize:function(){u.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});o.register("EventEmitter",a,"events"),c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(142),u=t(321),o=t(325),a=t(31),s=t(0),i=t(346),n=t(921),l=t(366),r=t(101),h=t(384),f=t(347),v=t(400),d=t(9),p=t(22),g=t(409),m=t(24),x=t(414),y=t(415),T=t(417),E=t(106),C=t(422),A=t(385),P=t(387),M=t(426),O=new s({initialize:function(N){this.config=new i(N),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new d,this.anims=new u(this),this.textures=new C(this),this.cache=new o(this),this.registry=new r(this),this.input=new g(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=f,this.scale=new y(this,this.config),this.sound=null,this.sound=M.create(this),this.loop=new A(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,v(this.boot.bind(this))},boot:function(){if(!m.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),l(this),n(this),h(this),e(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(p.BOOT)},texturesReady:function(){this.events.emit(p.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),P(this);var I=this.events;I.on(p.HIDDEN,this.onHidden,this),I.on(p.VISIBLE,this.onVisible,this),I.on(p.BLUR,this.onBlur,this),I.on(p.FOCUS,this.onFocus,this)},step:function(I,N){if(this.pendingDestroy)return this.runDestroy();var Y=this.events;Y.emit(p.PRE_STEP,I,N),Y.emit(p.STEP,I,N),this.scene.update(I,N),Y.emit(p.POST_STEP,I,N);var X=this.renderer;X.preRender(),Y.emit(p.PRE_RENDER,X,I,N),this.scene.render(X),X.postRender(),Y.emit(p.POST_RENDER,X,I,N)},headlessStep:function(I,N){if(this.pendingDestroy)return this.runDestroy();var Y=this.events;Y.emit(p.PRE_STEP,I,N),Y.emit(p.STEP,I,N),this.scene.update(I,N),Y.emit(p.POST_STEP,I,N),Y.emit(p.PRE_RENDER),Y.emit(p.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(p.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(p.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(I,N){N===void 0&&(N=!1),this.pendingDestroy=!0,this.removeCanvas=I,this.noReturn=N},runDestroy:function(){this.scene.destroy(),this.events.emit(p.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(a.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});c.exports=O},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(142),u=function(o){var a=o.config;if(!(!a.parent||!a.domCreateContainer)){var s=document.createElement("div");s.style.cssText=["display: block;","width: "+o.scale.width+"px;","height: "+o.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+a.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),o.domContainer=s,e(s,a.parent)}};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="boot"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="destroy"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragend"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragenter"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="drag"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragleave"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragover"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="drop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="gameout"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="gameover"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="gameobjectdown"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragend"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragenter"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="drag"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragleave"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragover"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="drop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="gameobjectmove"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="gameobjectout"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="gameobjectover"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerdown"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointermove"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerout"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerover"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerup"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="wheel"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="gameobjectup"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="gameobjectwheel"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="boot"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="process"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="update"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerdown"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerdownoutside"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointermove"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerout"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerover"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerup"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerupoutside"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="wheel"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pointerlockchange"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="preupdate"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="shutdown"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="start"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="update"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="addfile"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="complete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="filecomplete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="filecomplete-"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="loaderror"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="load"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="fileprogress"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="postprocess"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="progress"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="start"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(!o.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var a=e.source[u];e.add("__BASE",u,0,0,a.width,a.height);for(var s=o.getElementsByTagName("SubTexture"),i,n=0;n<s.length;n++){var l=s[n].attributes,r=l.name.value,h=parseInt(l.x.value,10),f=parseInt(l.y.value,10),v=parseInt(l.width.value,10),d=parseInt(l.height.value,10);if(i=e.add(r,u,h,f,v,d),l.frameX){var p=Math.abs(parseInt(l.frameX.value,10)),g=Math.abs(parseInt(l.frameY.value,10)),m=parseInt(l.frameWidth.value,10),x=parseInt(l.frameHeight.value,10);i.setTrim(v,d,p,g,m,x)}}return e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.source[u];return e.add("__BASE",u,0,0,o.width,o.height),e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.source[u];return e.add("__BASE",u,0,0,o.width,o.height),e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(77),u=function(o,a,s){if(!s.frames&&!s.textures){console.warn("Invalid Texture Atlas JSON Array");return}var i=o.source[a];o.add("__BASE",a,0,0,i.width,i.height);for(var n=Array.isArray(s.textures)?s.textures[a].frames:s.frames,l,r=0;r<n.length;r++){var h=n[r];l=o.add(h.filename,a,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&l.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(l.rotated=!0,l.updateUVsInverted());var f=h.anchor||h.pivot;f&&(l.customPivot=!0,l.pivotX=f.x,l.pivotY=f.y),l.customData=e(h)}for(var v in s)v!=="frames"&&(Array.isArray(s[v])?o.customData[v]=s[v].slice(0):o.customData[v]=s[v]);return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(77),u=function(o,a,s){if(!s.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var i=o.source[a];o.add("__BASE",a,0,0,i.width,i.height);var n=s.frames,l;for(var r in n)if(!!n.hasOwnProperty(r)){var h=n[r];l=o.add(r,a,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&l.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(l.rotated=!0,l.updateUVsInverted());var f=h.anchor||h.pivot;f&&(l.customPivot=!0,l.pivotX=f.x,l.pivotY=f.y),l.customData=e(h)}for(var v in s)v!=="frames"&&(Array.isArray(s[v])?o.customData[v]=s[v].slice(0):o.customData[v]=s[v]);return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(2),u=function(o,a,s,i,n,l,r){var h=e(r,"frameWidth",null),f=e(r,"frameHeight",h);if(h===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var v=o.source[a];o.add("__BASE",a,0,0,v.width,v.height);var d=e(r,"startFrame",0),p=e(r,"endFrame",-1),g=e(r,"margin",0),m=e(r,"spacing",0),x=Math.floor((n-g+m)/(h+m)),y=Math.floor((l-g+m)/(f+m)),T=x*y;T===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",o.key),(d>T||d<-T)&&(d=0),d<0&&(d=T+d),p!==-1&&(T=d+(p+1));for(var E=g,C=g,A=0,P=0,M=0;M<T;M++){A=0,P=0;var O=E+h,I=C+f;O>n&&(A=O-n),I>l&&(P=I-l),o.add(M,a,s+E,i+C,h-A,f-P),E+=h+m,E+h>n&&(E=g,C+=f+m)}return o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(2),u=function(o,a,s){var i=e(s,"frameWidth",null),n=e(s,"frameHeight",i);if(!i)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var l=o.source[0];o.add("__BASE",0,0,0,l.width,l.height),e(s,"startFrame",0),e(s,"endFrame",-1);for(var r=e(s,"margin",0),h=e(s,"spacing",0),f=a.cutX,v=a.cutY,d=a.cutWidth,p=a.cutHeight,g=a.realWidth,m=a.realHeight,x=Math.floor((g-r+h)/(i+h)),y=Math.floor((m-r+h)/(n+h)),T=a.x,E=i-T,C=i-(g-d-T),A=a.y,P=n-A,M=n-(m-p-A),O,I=r,N=r,Y=0,X=a.sourceIndex,W=0;W<y;W++){for(var H=W===0,D=W===y-1,L=0;L<x;L++){var B=L===0,G=L===x-1;if(O=o.add(Y,X,f+I,v+N,i,n),B||H||G||D){var w=B?T:0,z=H?A:0,U=0,V=0;B&&(U+=i-E),G&&(U+=i-C),H&&(V+=n-P),D&&(V+=n-M);var Z=i-U,$=n-V;O.cutWidth=Z,O.cutHeight=$,O.setTrim(i,n,w,z,Z,$)}I+=h,B?I+=E:G?I+=C:I+=i,Y++}I=r,N+=h,H?N+=P:D?N+=M:N+=n}return o};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=0,e=function(o,a,s,i){var n=t-i.y-i.height;o.add(s,a,i.x,n,i.width,i.height)},u=function(o,a,s){var i=o.source[a];o.add("__BASE",a,0,0,i.width,i.height),t=i.height;for(var n=s.split(`
`),l=/^[ ]*(- )*(\w+)+[: ]+(.*)/,r="",h="",f={x:0,y:0,width:0,height:0},v=0;v<n.length;v++){var d=n[v].match(l);if(!!d){var p=d[1]==="- ",g=d[2],m=d[3];if(p&&(h!==r&&(e(o,a,h,f),r=h),f={x:0,y:0,width:0,height:0}),g==="name"){h=m;continue}switch(g){case"x":case"y":case"width":case"height":f[g]=parseInt(m,10);break}}}return h!==r&&e(o,a,h,f),o};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="complete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="decoded"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="decodedall"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="destroy"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="detune"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="detune"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="mute"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="rate"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="volume"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="loop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="looped"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="mute"},function(c,S){/**
 * @author       pi-kei
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pan"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pauseall"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pause"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="play"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="rate"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resumeall"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resume"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="seek"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="stopall"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="stop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="unlocked"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="volume"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e={Events:t(75),DisplayList:t(1012),GameObjectCreator:t(16),GameObjectFactory:t(5),UpdateList:t(1040),Components:t(11),GetCalcMatrix:t(19),BuildGameObject:t(28),BuildGameObjectAnimation:t(439),GameObject:t(15),BitmapText:t(148),Blitter:t(213),Bob:t(440),Container:t(214),DOMElement:t(442),DynamicBitmapText:t(215),Extern:t(444),Graphics:t(216),Group:t(113),Image:t(125),Layer:t(219),Particles:t(1074),PathFollower:t(457),RenderTexture:t(221),RetroFont:t(1082),Rope:t(223),Sprite:t(73),Text:t(224),GetTextSize:t(458),MeasureText:t(460),TextStyle:t(459),TileSprite:t(225),Zone:t(129),Video:t(226),Shape:t(34),Arc:t(461),Curve:t(462),Ellipse:t(463),Grid:t(464),IsoBox:t(465),IsoTriangle:t(466),Line:t(467),Polygon:t(468),Rectangle:t(473),Star:t(474),Triangle:t(475),Factories:{Blitter:t(1130),Container:t(1131),DOMElement:t(1132),DynamicBitmapText:t(1133),Extern:t(1134),Graphics:t(1135),Group:t(1136),Image:t(1137),Layer:t(1138),Particles:t(1139),PathFollower:t(1140),RenderTexture:t(1141),Rope:t(1142),Sprite:t(1143),StaticBitmapText:t(1144),Text:t(1145),TileSprite:t(1146),Zone:t(1147),Video:t(1148),Arc:t(1149),Curve:t(1150),Ellipse:t(1151),Grid:t(1152),IsoBox:t(1153),IsoTriangle:t(1154),Line:t(1155),Polygon:t(1156),Rectangle:t(1157),Star:t(1158),Triangle:t(1159)},Creators:{Blitter:t(1160),Container:t(1161),DynamicBitmapText:t(1162),Graphics:t(1163),Group:t(1164),Image:t(1165),Layer:t(1166),Particles:t(1167),RenderTexture:t(1168),Rope:t(1169),Sprite:t(1170),StaticBitmapText:t(1171),Text:t(1172),TileSprite:t(1173),Zone:t(1174),Video:t(1175)}};e.Shader=t(229),e.Mesh=t(230),e.PointLight=t(150),e.Factories.Shader=t(1184),e.Factories.Mesh=t(1185),e.Factories.PointLight=t(1186),e.Creators.Shader=t(1187),e.Creators.Mesh=t(1188),e.Creators.PointLight=t(1189),e.Light=t(481),e.LightsManager=t(482),e.LightsPlugin=t(1190),c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(110),o=t(24),a=t(75),s=t(20),i=t(79),n=new e({Extends:u,initialize:function(r){u.call(this,r),this.sortChildrenFlag=!1,this.scene=r,this.systems=r.sys,this.events=r.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.events.once(s.DESTROY,this.destroy,this)},addChildCallback:function(l){l.displayList&&l.displayList!==this&&l.removeFromDisplayList(),l.displayList||(this.queueDepthSort(),l.displayList=this,l.emit(a.ADDED_TO_SCENE,l,this.scene),this.events.emit(s.ADDED_TO_SCENE,l,this.scene))},removeChildCallback:function(l){this.queueDepthSort(),l.displayList=null,l.emit(a.REMOVED_FROM_SCENE,l,this.scene),this.events.emit(s.REMOVED_FROM_SCENE,l,this.scene)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(i(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(l,r){return l._depth-r._depth},getChildren:function(){return this.list},shutdown:function(){for(var l=this.list,r=l.length;r--;)l[r].destroy(!0);l.length=0,this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});o.register("DisplayList",n,"displayList"),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={CheckMatrix:t(209),MatrixToString:t(1014),ReverseColumns:t(1015),ReverseRows:t(1016),Rotate180:t(1017),RotateLeft:t(1018),RotateMatrix:t(147),RotateRight:t(1019),Translate:t(1020),TransposeMatrix:t(435)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(186),u=t(209),o=function(a){var s="";if(!u(a))return s;for(var i=0;i<a.length;i++){for(var n=0;n<a[i].length;n++){var l=a[i][n].toString();l!=="undefined"?s+=e(l,2):s+="?",n<a[i].length-1&&(s+=" |")}if(i<a.length-1){s+=`
`;for(var r=0;r<a[i].length;r++)s+="---",r<a[i].length-1&&(s+="+");s+=`
`}}return s};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.reverse()};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){for(var u=0;u<e.length;u++)e[u].reverse();return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(147),u=function(o){return e(o,180)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(147),u=function(o){return e(o,90)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(147),u=function(o){return e(o,-90)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(178),u=t(179),o=function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),i!==0&&(i<0?e(a,Math.abs(i)):u(a,i)),s!==0)for(var n=0;n<a.length;n++){var l=a[n];s<0?e(l,Math.abs(s)):u(l,s)}return a};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s){if(s===void 0&&(s=e),o>0){var i=o-e.length;if(i<=0)return null}if(!Array.isArray(u))return e.indexOf(u)===-1?(e.push(u),a&&a.call(s,u),u):null;for(var n=u.length-1;n>=0;)e.indexOf(u[n])!==-1&&u.splice(n,1),n--;if(n=u.length,n===0)return null;o>0&&n>i&&(u.splice(i),n=i);for(var l=0;l<n;l++){var r=u[l];e.push(r),a&&a.call(s,r)}return u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s,i){if(o===void 0&&(o=0),i===void 0&&(i=e),a>0){var n=a-e.length;if(n<=0)return null}if(!Array.isArray(u))return e.indexOf(u)===-1?(e.splice(o,0,u),s&&s.call(i,u),u):null;for(var l=u.length-1;l>=0;)e.indexOf(u[l])!==-1&&u.pop(),l--;if(l=u.length,l===0)return null;a>0&&l>n&&(u.splice(n),l=n);for(var r=l-1;r>=0;r--){var h=u[r];e.splice(o,0,h),s&&s.call(i,h)}return u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.indexOf(u);return o!==-1&&o<e.length&&(e.splice(o,1),e.push(u)),u};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(78),u=function(o,a,s,i,n){i===void 0&&(i=0),n===void 0&&(n=o.length);var l=0;if(e(o,i,n))for(var r=i;r<n;r++){var h=o[r];h[a]===s&&l++}return l};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a,s=[null];for(a=3;a<arguments.length;a++)s.push(arguments[a]);for(a=0;a<e.length;a++)s[0]=e[a],u.apply(o,s);return e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(78),u=function(o,a,s,i,n){if(i===void 0&&(i=0),n===void 0&&(n=o.length),e(o,i,n)){var l,r=[null];for(l=5;l<arguments.length;l++)r.push(arguments[l]);for(l=i;l<n;l++)r[0]=o[l],a.apply(s,r)}return o};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.indexOf(u);if(o>0){var a=e[o-1],s=e.indexOf(a);e[o]=a,e[s]=u}return e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=e.indexOf(u);if(a===-1||o<0||o>=e.length)throw new Error("Supplied index out of bounds");return a!==o&&(e.splice(a,1),e.splice(o,0,u)),u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.indexOf(u);if(o!==-1&&o<e.length-1){var a=e[o+1],s=e.indexOf(a);e[o]=a,e[s]=u}return e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(u===o)return e;var a=e.indexOf(u),s=e.indexOf(o);if(a<0||s<0)throw new Error("Supplied items must be elements of the same array");return a>s||(e.splice(a,1),s===e.length-1?e.push(u):e.splice(s,0,u)),e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(u===o)return e;var a=e.indexOf(u),s=e.indexOf(o);if(a<0||s<0)throw new Error("Supplied items must be elements of the same array");return a<s||(e.splice(a,1),s===0?e.unshift(u):e.splice(s,0,u)),e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(363),u=function(o,a,s){o===void 0&&(o=0),a===void 0&&(a=null),s===void 0&&(s=1),a===null&&(a=o,o=0);for(var i=[],n=Math.max(e((a-o)/(s||1)),0),l=0;l<n;l++)i.push(o),o+=s;return i};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(74),u=function(o,a,s,i){if(i===void 0&&(i=o),a<0||a>o.length-1)throw new Error("Index out of bounds");var n=e(o,a);return s&&s.call(i,n),n};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(78),u=function(o,a,s,i,n){if(a===void 0&&(a=0),s===void 0&&(s=o.length),n===void 0&&(n=o),e(o,a,s)){var l=s-a,r=o.splice(a,l);if(i)for(var h=0;h<r.length;h++){var f=r[h];i.call(n,f)}return r}else return[]};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(74),u=function(o,a,s){a===void 0&&(a=0),s===void 0&&(s=o.length);var i=a+Math.floor(Math.random()*s);return e(o,i)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=e.indexOf(u),s=e.indexOf(o);return a!==-1&&s===-1?(e[a]=o,!0):!1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.indexOf(u);return o!==-1&&o>0&&(e.splice(o,1),e.unshift(u)),u};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(78),u=function(o,a,s,i,n){if(i===void 0&&(i=0),n===void 0&&(n=o.length),e(o,i,n))for(var l=i;l<n;l++){var r=o[l];r.hasOwnProperty(a)&&(r[a]=s)}return o};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){if(u===o)return e;var a=e.indexOf(u),s=e.indexOf(o);if(a<0||s<0)throw new Error("Supplied items must be elements of the same array");return e[a]=o,e[s]=u,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(211),o=t(24),a=t(20),s=new e({Extends:u,initialize:function(n){u.call(this),this.checkQueue=!0,this.scene=n,this.systems=n.sys,n.sys.events.once(a.BOOT,this.boot,this),n.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var i=this.systems.events;i.on(a.PRE_UPDATE,this.update,this),i.on(a.UPDATE,this.sceneUpdate,this),i.once(a.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(i,n){for(var l=this._active,r=l.length,h=0;h<r;h++){var f=l[h];f.active&&f.preUpdate.call(f,i,n)}},shutdown:function(){for(var i=this._active.length;i--;)this._active[i].destroy(!0);for(i=this._pending.length;i--;)this._pending[i].destroy(!0);for(i=this._destroy.length;i--;)this._destroy[i].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var n=this.systems.events;n.off(a.PRE_UPDATE,this.update,this),n.off(a.UPDATE,this.sceneUpdate,this),n.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});o.register("UpdateList",s,"updateList"),c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="add"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="remove"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){if(o===void 0&&(o=!1),a===void 0)return a={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},a;var s=e.text,i=s.length,n=e.maxWidth,l=e.wordWrapCharCode,r=Number.MAX_VALUE,h=Number.MAX_VALUE,f=0,v=0,d=e.fontData.chars,p=e.fontData.lineHeight,g=e.letterSpacing,m=0,x=0,y=0,T=null,E=e._align,C=0,A=0,P=e.fontSize/e.fontData.size,M=P*e.scaleX,O=P*e.scaleY,I=null,N=0,Y=[],X=Number.MAX_VALUE,W=0,H=0,D=0,L,B=[],G=[],w=null;if(n>0){for(L=0;L<i;L++){if(y=s.charCodeAt(L),y===10){w!==null&&(B.push({word:w.word,i:w.i,x:w.x*M,y:w.y*O,w:w.w*M,h:w.h*O,cr:!0}),w=null),m=0,x+=p,I=null;continue}if(T=d[y],!!T){if(I!==null)var z=T.kerning[N];y===l?w!==null&&(B.push({word:w.word,i:w.i,x:w.x*M,y:w.y*O,w:w.w*M,h:w.h*O,cr:!1}),w=null):(w===null&&(w={word:"",i:L,x:m,y:x,w:0,h:p,cr:!1}),w.word=w.word.concat(s[L]),w.w+=T.xOffset+T.xAdvance+(z!==void 0?z:0)),m+=T.xAdvance+g,I=T,N=y}}w!==null&&B.push({word:w.word,i:w.i,x:w.x*M,y:w.y*O,w:w.w*M,h:w.h*O,cr:!1}),m=0,x=0,I=null,N=0;var U,V=0,Z=[];for(L=0;L<B.length;L++){var $=B[L],Q=$.x,j=$.x+$.w;if(U){var k=Q-(U.x+U.w);V=Q-(k+U.w),U=null}var et=Q-V,_=j-V;et>n||_>n?(Z.push($.i-1),$.cr?(Z.push($.i+$.word.length),V=0,U=null):U=$):$.cr&&(Z.push($.i+$.word.length),V=0,U=null)}var nt=function(xt,mt,yt){return xt.substr(0,mt)+yt+xt.substr(mt+1)};for(L=Z.length-1;L>=0;L--)s=nt(s,Z[L],`
`);a.wrappedText=s,i=s.length,B=[],w=null}var ut=0;for(L=0;L<i;L++){if(y=s.charCodeAt(L),y===10){w!==null&&(B.push({word:w.word,i:w.i,x:w.x*M,y:w.y*O,w:w.w*M,h:w.h*O}),w=null),m=0,x+=p,I=null,Y[H]=D,D>W&&(W=D),D<X&&(X=D),H++,D=0;continue}if(T=d[y],!!T){if(C=m,A=x,I!==null){var ht=T.kerning[N];C+=ht!==void 0?ht:0}r>C&&(r=C),h>A&&(h=A);var at=C+T.xAdvance,tt=A+p;f<at&&(f=at),v<tt&&(v=tt);var dt=T.xOffset+T.xAdvance+(ht!==void 0?ht:0);y===l?w!==null&&(B.push({word:w.word,i:w.i,x:w.x*M,y:w.y*O,w:w.w*M,h:w.h*O}),w=null):(w===null&&(w={word:"",i:ut,x:m,y:x,w:0,h:p}),w.word=w.word.concat(s[L]),w.w+=dt),G.push({i:ut,char:s[L],code:y,x:(T.xOffset+m)*P,y:(T.yOffset+x)*P,w:T.width*P,h:T.height*P,t:x*P,r:at*P,b:p*P,line:H,glyph:T}),m+=T.xAdvance+g,I=T,N=y,D=at*P,ut++}}if(w!==null&&B.push({word:w.word,i:w.i,x:w.x*M,y:w.y*O,w:w.w*M,h:w.h*O}),Y[H]=D,D>W&&(W=D),D<X&&(X=D),E>0)for(var rt=0;rt<G.length;rt++){var lt=G[rt];if(E===1){var Pt=(W-Y[lt.line])/2;lt.x+=Pt,lt.r+=Pt}else if(E===2){var At=W-Y[lt.line];lt.x+=At,lt.r+=At}}var gt=a.local,vt=a.global,Tt=a.lines;return gt.x=r*P,gt.y=h*P,gt.width=f*P,gt.height=v*P,vt.x=e.x-e._displayOriginX+r*M,vt.y=e.y-e._displayOriginY+h*O,vt.width=f*M,vt.height=v*O,Tt.shortest=X,Tt.longest=W,Tt.lengths=Y,u&&(gt.x=Math.ceil(gt.x),gt.y=Math.ceil(gt.y),gt.width=Math.ceil(gt.width),gt.height=Math.ceil(gt.height),vt.x=Math.ceil(vt.x),vt.y=Math.ceil(vt.y),vt.width=Math.ceil(vt.width),vt.height=Math.ceil(vt.height),Tt.shortest=Math.ceil(X),Tt.longest=Math.ceil(W)),o&&(e._displayOriginX=e.originX*gt.width,e._displayOriginY=e.originY*gt.height,vt.x=e.x-e._displayOriginX*e.scaleX,vt.y=e.y-e._displayOriginY*e.scaleY,u&&(vt.x=Math.ceil(vt.x),vt.y=Math.ceil(vt.y))),a.words=B,a.characters=G,a.lines.height=p,a.scale=P,a.scaleX=e.scaleX,a.scaleY=e.scaleY,a};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(212),u=function(o,a,s,i,n,l,r){var h=o.sys.textures.get(s),f=h.get(i),v=o.sys.cache.xml.get(n);if(f&&v){var d=e(v,f,l,r,h);return o.sys.cache.bitmapFont.add(a,{data:d,texture:s,frame:i,fromAtlas:!0}),!0}else return!1};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1046),u=t(1048),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1047),u=t(19),o=t(12),a=function(s,i,n,l){var r=i._text,h=r.length;if(h!==0){n.addToRenderList(i);var f=s.pipelines.set(i.pipeline,i),v=u(i,n,l).calc,d=n.roundPixels,p=n.alpha,g=i.charColors,m=i.tintFill,x=o.getTintAppendFloatAlpha,y=x(i.tintTopLeft,p*i._alphaTL),T=x(i.tintTopRight,p*i._alphaTR),E=x(i.tintBottomLeft,p*i._alphaBL),C=x(i.tintBottomRight,p*i._alphaBR),A=i.frame.glTexture,P=f.setGameObject(i),M=i.getTextBounds(!1),O,I,N,Y=M.characters,X=i.dropShadowX,W=i.dropShadowY,H=X!==0||W!==0;if(s.pipelines.preBatch(i),H){var D=i.dropShadowColor,L=i.dropShadowAlpha,B=x(D,p*L*i._alphaTL),G=x(D,p*L*i._alphaTR),w=x(D,p*L*i._alphaBL),z=x(D,p*L*i._alphaBR);for(O=0;O<Y.length;O++)I=Y[O],N=I.glyph,!(I.code===32||N.width===0||N.height===0)&&e(f,i,I,N,X,W,v,d,B,G,w,z,1,A,P)}for(O=0;O<Y.length;O++)if(I=Y[O],N=I.glyph,!(I.code===32||N.width===0||N.height===0))if(g[I.i]){var U=g[I.i],V=U.tintEffect,Z=x(U.tintTL,p*i._alphaTL),$=x(U.tintTR,p*i._alphaTR),Q=x(U.tintBL,p*i._alphaBL),j=x(U.tintBR,p*i._alphaBR);e(f,i,I,N,0,0,v,d,Z,$,Q,j,V,A,P)}else e(f,i,I,N,0,0,v,d,y,T,E,C,m,A,P);s.pipelines.postBatch(i)}};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s,i,n,l,r,h,f,v,d,p,g){var m=o.x-u.displayOriginX+s,x=o.y-u.displayOriginY+i,y=m+o.w,T=x+o.h,E=n.getXRound(m,x,l),C=n.getYRound(m,x,l),A=n.getXRound(m,T,l),P=n.getYRound(m,T,l),M=n.getXRound(y,T,l),O=n.getYRound(y,T,l),I=n.getXRound(y,x,l),N=n.getYRound(y,x,l);e.batchQuad(u,E,C,A,P,M,O,I,N,a.u0,a.v0,a.u1,a.v1,r,h,f,v,d,p,g)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(30),u=function(o,a,s,i){var n=a._text,l=n.length,r=o.currentContext;if(!(l===0||!e(o,r,a,s,i))){s.addToRenderList(a);var h=a.fromAtlas?a.frame:a.texture.frames.__BASE,f=a.fontData.chars,v=a.fontData.lineHeight,d=a._letterSpacing,p=0,g=0,m=0,x=null,y=0,T=0,E=0,C=0,A=0,P=0,M=null,O=0,I=h.source.image,N=h.cutX,Y=h.cutY,X=a._fontSize/a.fontData.size,W=a._align,H=0,D=0,L=a.getTextBounds(!1);a.maxWidth>0&&(n=L.wrappedText,l=n.length);var B=a._bounds.lines;W===1?D=(B.longest-B.lengths[0])/2:W===2&&(D=B.longest-B.lengths[0]),r.translate(-a.displayOriginX,-a.displayOriginY);for(var G=s.roundPixels,w=0;w<l;w++){if(m=n.charCodeAt(w),m===10){H++,W===1?D=(B.longest-B.lengths[H])/2:W===2&&(D=B.longest-B.lengths[H]),p=0,g+=v,M=null;continue}if(x=f[m],!!x){if(y=N+x.x,T=Y+x.y,E=x.width,C=x.height,A=x.xOffset+p,P=x.yOffset+g,M!==null){var z=x.kerning[O];A+=z!==void 0?z:0}A*=X,P*=X,A+=D,p+=x.xAdvance+d,M=x,O=m,!(E===0||C===0||m===32)&&(G&&(A=Math.round(A),P=Math.round(P)),r.save(),r.translate(A,P),r.scale(X,X),r.drawImage(I,y,T,E,C,0,0,E,C),r.restore())}}r.restore()}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1050),u=t(1051),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(25),u=t(12),o=new e,a=function(s,i,n,l){var r=i.getRenderList();if(r.length!==0){var h=n.alpha*i.alpha;if(h!==0){n.addToRenderList(i);var f=s.pipelines.set(this.pipeline,i),v=n.scrollX*i.scrollFactorX,d=n.scrollY*i.scrollFactorY,p=o.copyFrom(n.matrix);l&&(p.multiplyWithOffset(l,-v,-d),v=0,d=0);var g=i.x-v,m=i.y-d,x=-1,y=!1,T=n.roundPixels;s.pipelines.preBatch(i);for(var E=0;E<r.length;E++){var C=r[E],A=C.frame,P=C.alpha*h;if(P!==0){var M=A.width,O=A.height,I=g+C.x+A.x,N=m+C.y+A.y;C.flipX&&(M*=-1,I+=A.width),C.flipY&&(O*=-1,N+=A.height);var Y=I+M,X=N+O,W=p.getX(I,N),H=p.getY(I,N),D=p.getX(Y,X),L=p.getY(Y,X),B=u.getTintAppendFloatAlpha(C.tint,P);if(A.sourceIndex!==x){var G=f.setGameObject(i,A);x=A.sourceIndex}T&&(W=Math.round(W),H=Math.round(H),D=Math.round(D),L=Math.round(L)),f.batchQuad(i,W,H,W,L,D,L,D,H,A.u0,A.v0,A.u1,A.v1,B,B,B,B,y,A.glTexture,G)&&(x=-1)}}s.pipelines.postBatch(i)}}};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s=u.getRenderList();if(s.length!==0){var i=e.currentContext,n=o.alpha*u.alpha;if(n!==0){o.addToRenderList(u),i.globalCompositeOperation=e.blendModes[u.blendMode],i.imageSmoothingEnabled=!(!e.antialias||u.frame.source.scaleMode);var l=u.x-o.scrollX*u.scrollFactorX,r=u.y-o.scrollY*u.scrollFactorY;i.save(),a&&a.copyToContext(i);for(var h=o.roundPixels,f=0;f<s.length;f++){var v=s[f],d=v.flipX||v.flipY,p=v.frame,g=p.canvasData,m=p.x,x=p.y,y=1,T=1,E=v.alpha*n;E!==0&&(i.globalAlpha=E,d?(v.flipX&&(y=-1,m-=g.width),v.flipY&&(T=-1,x-=g.height),i.save(),i.translate(v.x+l,v.y+r),i.scale(y,T),i.drawImage(p.source.image,g.x,g.y,g.width,g.height,m,x,g.width,g.height),i.restore()):(h&&(m=Math.round(m),x=Math.round(x)),i.drawImage(p.source.image,g.x,g.y,g.width,g.height,m+v.x+l,x+v.y+r,g.width,g.height)))}i.restore()}}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1053),u=t(1054),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o.addToRenderList(u);var s=u.list,i=s.length;if(i!==0){var n=u.localTransform;a?(n.loadIdentity(),n.multiply(a),n.translate(u.x,u.y),n.rotate(u.rotation),n.scale(u.scaleX,u.scaleY)):n.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),e.pipelines.preBatch(u);var l=u.blendMode!==-1;l||e.setBlendMode(0);for(var r=u.alpha,h=u.scrollFactorX,f=u.scrollFactorY,v=0;v<i;v++){var d=s[v];if(!!d.willRender(o)){var p,g,m,x;if(d.alphaTopLeft!==void 0)p=d.alphaTopLeft,g=d.alphaTopRight,m=d.alphaBottomLeft,x=d.alphaBottomRight;else{var y=d.alpha;p=y,g=y,m=y,x=y}var T=d.scrollFactorX,E=d.scrollFactorY;!l&&d.blendMode!==e.currentBlendMode&&e.setBlendMode(d.blendMode);var C=d.mask;C&&C.preRenderWebGL(e,d,o);var A=d.type;A!==e.currentType&&(e.newType=!0,e.currentType=A),e.nextTypeMatch=v<i-1?s[v+1].type===e.currentType:!1,d.setScrollFactor(T*h,E*f),d.setAlpha(p*r,g*r,m*r,x*r),d.renderWebGL(e,d,o,n),d.setAlpha(p,g,m,x),d.setScrollFactor(T,E),C&&C.postRenderWebGL(e,o),e.newType=!1}}e.pipelines.postBatch(u)}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o.addToRenderList(u);var s=u.list;if(s.length!==0){var i=u.localTransform;a?(i.loadIdentity(),i.multiply(a),i.translate(u.x,u.y),i.rotate(u.rotation),i.scale(u.scaleX,u.scaleY)):i.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY);var n=u.blendMode!==-1;n||e.setBlendMode(0);var l=u._alpha,r=u.scrollFactorX,h=u.scrollFactorY;u.mask&&u.mask.preRenderCanvas(e,null,o);for(var f=0;f<s.length;f++){var v=s[f];if(!!v.willRender(o)){var d=v.alpha,p=v.scrollFactorX,g=v.scrollFactorY;!n&&v.blendMode!==e.currentBlendMode&&e.setBlendMode(v.blendMode),v.setScrollFactor(p*r,g*h),v.setAlpha(d*l),v.renderCanvas(e,v,o,i),v.setAlpha(d),v.setScrollFactor(p,g)}}u.mask&&u.mask.postRenderCanvas(e)}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(443),u=t(443),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1058),u=t(1059),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=t(25),o=t(12),a=new u,s=function(i,n,l,r){var h=n.text,f=h.length;if(f!==0){l.addToRenderList(n);var v=i.pipelines.set(n.pipeline,n),d=e(n,l,r),p=d.sprite,g=d.calc,m=a,x=n.cropWidth>0||n.cropHeight>0;x&&(v.flush(),i.pushScissor(g.tx,g.ty,n.cropWidth*g.scaleX,n.cropHeight*g.scaleY));var y=n.frame,T=y.glTexture,E=n.tintFill,C=o.getTintAppendFloatAlpha(n.tintTopLeft,l.alpha*n._alphaTL),A=o.getTintAppendFloatAlpha(n.tintTopRight,l.alpha*n._alphaTR),P=o.getTintAppendFloatAlpha(n.tintBottomLeft,l.alpha*n._alphaBL),M=o.getTintAppendFloatAlpha(n.tintBottomRight,l.alpha*n._alphaBR),O=v.setGameObject(n),I=0,N=0,Y=0,X=0,W=n.letterSpacing,H,D=0,L=0,B,G=n.scrollX,w=n.scrollY,z=n.fontData,U=z.chars,V=z.lineHeight,Z=n.fontSize/z.size,$=0,Q=n._align,j=0,k=0,et=n.getTextBounds(!1);n.maxWidth>0&&(h=et.wrappedText,f=h.length);var _=n._bounds.lines;Q===1?k=(_.longest-_.lengths[0])/2:Q===2&&(k=_.longest-_.lengths[0]);var nt=l.roundPixels,ut=n.displayCallback,ht=n.callbackData;i.pipelines.preBatch(n);for(var at=0;at<f;at++){if(Y=h.charCodeAt(at),Y===10){j++,Q===1?k=(_.longest-_.lengths[j])/2:Q===2&&(k=_.longest-_.lengths[j]),I=0,N+=V,B=null;continue}if(H=U[Y],!!H){D=H.width,L=H.height;var tt=H.xOffset+I-G,dt=H.yOffset+N-w;if(B!==null){var rt=H.kerning[X];tt+=rt!==void 0?rt:0}if(I+=H.xAdvance+W,B=H,X=Y,!(D===0||L===0||Y===32)){if(Z=n.fontSize/n.fontData.size,$=0,ut){ht.color=0,ht.tint.topLeft=C,ht.tint.topRight=A,ht.tint.bottomLeft=P,ht.tint.bottomRight=M,ht.index=at,ht.charCode=Y,ht.x=tt,ht.y=dt,ht.scale=Z,ht.rotation=$,ht.data=H.data;var lt=ut(ht);tt=lt.x,dt=lt.y,Z=lt.scale,$=lt.rotation,lt.color?(C=lt.color,A=lt.color,P=lt.color,M=lt.color):(C=lt.tint.topLeft,A=lt.tint.topRight,P=lt.tint.bottomLeft,M=lt.tint.bottomRight),C=o.getTintAppendFloatAlpha(C,l.alpha*n._alphaTL),A=o.getTintAppendFloatAlpha(A,l.alpha*n._alphaTR),P=o.getTintAppendFloatAlpha(P,l.alpha*n._alphaBL),M=o.getTintAppendFloatAlpha(M,l.alpha*n._alphaBR)}tt*=Z,dt*=Z,tt-=n.displayOriginX,dt-=n.displayOriginY,tt+=k,m.applyITRS(tt,dt,$,Z,Z),g.multiply(m,p);var Pt=H.u0,At=H.v0,gt=H.u1,vt=H.v1,Tt=D,xt=L,mt=p.e,yt=p.f,Ft=xt*p.c+p.e,K=xt*p.d+p.f,J=Tt*p.a+xt*p.c+p.e,q=Tt*p.b+xt*p.d+p.f,b=Tt*p.a+p.e,it=Tt*p.b+p.f;nt&&(mt=Math.round(mt),yt=Math.round(yt),Ft=Math.round(Ft),K=Math.round(K),J=Math.round(J),q=Math.round(q),b=Math.round(b),it=Math.round(it)),v.batchQuad(n,mt,yt,Ft,K,J,q,b,it,Pt,At,gt,vt,C,A,P,M,E,T,O)}}}x&&(v.flush(),i.popScissor()),i.pipelines.postBatch(n)}};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(30),u=function(o,a,s,i){var n=a._text,l=n.length,r=o.currentContext;if(!(l===0||!e(o,r,a,s,i))){s.addToRenderList(a);var h=a.fromAtlas?a.frame:a.texture.frames.__BASE,f=a.displayCallback,v=a.callbackData,d=a.fontData.chars,p=a.fontData.lineHeight,g=a._letterSpacing,m=0,x=0,y=0,T=null,E=0,C=0,A=0,P=0,M=0,O=0,I=null,N=0,Y=a.frame.source.image,X=h.cutX,W=h.cutY,H=0,D=0,L=a._fontSize/a.fontData.size,B=a._align,G=0,w=0;a.getTextBounds(!1);var z=a._bounds.lines;B===1?w=(z.longest-z.lengths[0])/2:B===2&&(w=z.longest-z.lengths[0]),r.translate(-a.displayOriginX,-a.displayOriginY);var U=s.roundPixels;a.cropWidth>0&&a.cropHeight>0&&(r.beginPath(),r.rect(0,0,a.cropWidth,a.cropHeight),r.clip());for(var V=0;V<l;V++){if(D=L,H=0,y=n.charCodeAt(V),y===10){G++,B===1?w=(z.longest-z.lengths[G])/2:B===2&&(w=z.longest-z.lengths[G]),m=0,x+=p,I=null;continue}if(T=d[y],!!T){if(E=X+T.x,C=W+T.y,A=T.width,P=T.height,M=T.xOffset+m-a.scrollX,O=T.yOffset+x-a.scrollY,I!==null){var Z=T.kerning[N];M+=Z!==void 0?Z:0}if(f){v.index=V,v.charCode=y,v.x=M,v.y=O,v.scale=D,v.rotation=H,v.data=T.data;var $=f(v);M=$.x,O=$.y,D=$.scale,H=$.rotation}M*=D,O*=D,M+=w,m+=T.xAdvance+g,I=T,N=y,!(A===0||P===0||y===32)&&(U&&(M=Math.round(M),O=Math.round(O)),r.save(),r.translate(M,O),r.rotate(H),r.scale(D,D),r.drawImage(Y,E,C,A,P,0,0,A,P),r.restore())}}r.restore()}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1061),u=t(1062),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=function(o,a,s,i){o.pipelines.clear();var n=e(a,s,i).calc;a.render.call(a,o,s,n),o.pipelines.rebind()};c.exports=u},function(c,S){},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1064),u=t(448),u=t(448),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(217),u=t(19),o=t(25),a=t(12),s=function(h,f,v){this.x=h,this.y=f,this.width=v},i=function(h,f,v){this.points=[],this.pointsLength=1,this.points[0]=new s(h,f,v)},n=[],l=new o,r=function(h,f,v,d){if(f.commandBuffer.length!==0){v.addToRenderList(f);var p=h.pipelines.set(f.pipeline,f);h.pipelines.preBatch(f);for(var g=u(f,v,d).calc,m=l.loadIdentity(),x=f.commandBuffer,y=v.alpha*f.alpha,T=1,E=p.fillTint,C=p.strokeTint,A=0,P=0,M=0,O=.01,I=Math.PI*2,N,Y=[],X=0,W=!0,H=null,D=a.getTintAppendFloatAlpha,L=0;L<x.length;L++)switch(N=x[L],N){case e.BEGIN_PATH:{Y.length=0,H=null,W=!0;break}case e.CLOSE_PATH:{W=!1,H&&H.points.length&&H.points.push(H.points[0]);break}case e.FILL_PATH:{for(X=0;X<Y.length;X++)p.batchFillPath(Y[X].points,m,g);break}case e.STROKE_PATH:{for(X=0;X<Y.length;X++)p.batchStrokePath(Y[X].points,T,W,m,g);break}case e.LINE_STYLE:{T=x[++L];var B=x[++L],G=x[++L]*y,w=D(B,G);C.TL=w,C.TR=w,C.BL=w,C.BR=w;break}case e.FILL_STYLE:{var z=x[++L],U=x[++L]*y,V=D(z,U);E.TL=V,E.TR=V,E.BL=V,E.BR=V;break}case e.GRADIENT_FILL_STYLE:{var Z=x[++L]*y,$=x[++L]*y,Q=x[++L]*y,j=x[++L]*y;E.TL=D(x[++L],Z),E.TR=D(x[++L],$),E.BL=D(x[++L],Q),E.BR=D(x[++L],j);break}case e.GRADIENT_LINE_STYLE:{T=x[++L];var k=x[++L]*y;C.TL=D(x[++L],k),C.TR=D(x[++L],k),C.BL=D(x[++L],k),C.BR=D(x[++L],k);break}case e.ARC:{var et=0,_=x[++L],nt=x[++L],ut=x[++L],ht=x[++L],at=x[++L],tt=x[++L],dt=x[++L];for(at-=ht,tt?at<-I?at=-I:at>0&&(at=-I+at%I):at>I?at=I:at<0&&(at=I+at%I),H===null&&(H=new i(_+Math.cos(ht)*ut,nt+Math.sin(ht)*ut,T),Y.push(H),et+=O);et<1+dt;)M=at*et+ht,A=_+Math.cos(M)*ut,P=nt+Math.sin(M)*ut,H.points.push(new s(A,P,T)),et+=O;M=at+ht,A=_+Math.cos(M)*ut,P=nt+Math.sin(M)*ut,H.points.push(new s(A,P,T));break}case e.FILL_RECT:{p.batchFillRect(x[++L],x[++L],x[++L],x[++L],m,g);break}case e.FILL_TRIANGLE:{p.batchFillTriangle(x[++L],x[++L],x[++L],x[++L],x[++L],x[++L],m,g);break}case e.STROKE_TRIANGLE:{p.batchStrokeTriangle(x[++L],x[++L],x[++L],x[++L],x[++L],x[++L],T,m,g);break}case e.LINE_TO:{H!==null?H.points.push(new s(x[++L],x[++L],T)):(H=new i(x[++L],x[++L],T),Y.push(H));break}case e.MOVE_TO:{H=new i(x[++L],x[++L],T),Y.push(H);break}case e.SAVE:{n.push(m.copyToArray());break}case e.RESTORE:{m.copyFromArray(n.pop());break}case e.TRANSLATE:{_=x[++L],nt=x[++L],m.translate(_,nt);break}case e.SCALE:{_=x[++L],nt=x[++L],m.scale(_,nt);break}case e.ROTATE:{m.rotate(x[++L]);break}}h.pipelines.postBatch(f)}};c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1066),u=t(1067),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o.addToRenderList(u),u.pipeline.batchSprite(u,o,a)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o.addToRenderList(u),e.batchSprite(u,u.frame,o,a)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1069),u=t(1070),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o.addToRenderList(u),this.pipeline.batchSprite(u,o,a)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o.addToRenderList(u),e.batchSprite(u,u.frame,o,a)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1072),u=t(1073),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=u.list,s=a.length;if(s!==0){u.depthSort(),e.pipelines.preBatch(u);var i=u.blendMode!==-1;i||e.setBlendMode(0);for(var n=u.alpha,l=0;l<s;l++){var r=a[l];if(!!r.willRender(o)){var h,f,v,d;if(r.alphaTopLeft!==void 0)h=r.alphaTopLeft,f=r.alphaTopRight,v=r.alphaBottomLeft,d=r.alphaBottomRight;else{var p=r.alpha;h=p,f=p,v=p,d=p}!i&&r.blendMode!==e.currentBlendMode&&e.setBlendMode(r.blendMode);var g=r.mask;g&&g.preRenderWebGL(e,r,o);var m=r.type;m!==e.currentType&&(e.newType=!0,e.currentType=m),e.nextTypeMatch=l<s-1?a[l+1].type===e.currentType:!1,r.setAlpha(h*n,f*n,v*n,d*n),r.renderWebGL(e,r,o),r.setAlpha(h,f,v,d),g&&g.postRenderWebGL(e,o),e.newType=!1}}e.pipelines.postBatch(u)}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=u.list;if(a.length!==0){u.depthSort();var s=u.blendMode!==-1;s||e.setBlendMode(0);var i=u._alpha;u.mask&&u.mask.preRenderCanvas(e,null,o);for(var n=0;n<a.length;n++){var l=a[n];if(!!l.willRender(o)){var r=l.alpha;!s&&l.blendMode!==e.currentBlendMode&&e.setBlendMode(l.blendMode),l.setAlpha(r*i),l.renderCanvas(e,l,o),l.setAlpha(r)}}u.mask&&u.mask.postRenderCanvas(e)}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={EmitterOp:t(449),GravityWell:t(450),Particle:t(451),ParticleEmitter:t(452),ParticleEmitterManager:t(220),Zones:t(1078)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1076),u=t(1077),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(25),u=t(12),o=new e,a=new e,s=new e,i=new e,n=function(l,r,h,f){var v=r.emitters.list,d=v.length;if(d!==0){var p=l.pipelines.set(r.pipeline),g=o,m=a,x=s,y=i;f?(y.loadIdentity(),y.multiply(f),y.translate(r.x,r.y),y.rotate(r.rotation),y.scale(r.scaleX,r.scaleY)):y.applyITRS(r.x,r.y,r.rotation,r.scaleX,r.scaleY);var T=h.roundPixels,E=r.defaultFrame.glTexture,C=u.getTintAppendFloatAlpha,A=p.setGameObject(r,r.defaultFrame);l.pipelines.preBatch(r);for(var P=0;P<d;P++){var M=v[P],O=M.alive,I=O.length;if(!(!M.visible||I===0)){h.addToRenderList(M);var N=M.scrollFactorX,Y=M.scrollFactorY;l.setBlendMode(M.blendMode),M.mask&&(M.mask.preRenderWebGL(l,M,h),l.pipelines.set(r.pipeline));for(var X=0,W=0;W<I;W++){var H=O[W],D=H.alpha*h.alpha;if(!(D<=0)){x.applyITRS(H.x,H.y,H.rotation,H.scaleX,H.scaleY),g.copyFrom(h.matrix),g.multiplyWithOffset(y,-h.scrollX*N,-h.scrollY*Y),x.e=H.x,x.f=H.y,g.multiply(x,m);var L=H.frame,B=-L.halfWidth,G=-L.halfHeight,w=B+L.width,z=G+L.height,U=m.getXRound(B,G,T),V=m.getYRound(B,G,T),Z=m.getXRound(B,z,T),$=m.getYRound(B,z,T),Q=m.getXRound(w,z,T),j=m.getYRound(w,z,T),k=m.getXRound(w,G,T),et=m.getYRound(w,G,T),_=C(H.tint,D);p.batchQuad(M,U,V,Z,$,Q,j,k,et,L.u0,L.v0,L.u1,L.v1,_,_,_,_,X,E,A)}}M.mask&&M.mask.postRenderWebGL(l,h)}}l.pipelines.postBatch(r)}};c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(25),u=new e,o=new e,a=new e,s=new e,i=function(n,l,r,h){var f=l.emitters.list,v=f.length;if(v!==0){var d=u.copyFrom(r.matrix),p=o,g=a,m=s;h?(m.loadIdentity(),m.multiply(h),m.translate(l.x,l.y),m.rotate(l.rotation),m.scale(l.scaleX,l.scaleY)):m.applyITRS(l.x,l.y,l.rotation,l.scaleX,l.scaleY);for(var x=n.currentContext,y=r.roundPixels,T=0;T<v;T++){var E=f[T],C=E.alive,A=C.length;if(!(!E.visible||A===0)){r.addToRenderList(E);var P=E.scrollFactorX,M=E.scrollFactorY;x.save(),x.globalCompositeOperation=n.blendModes[E.blendMode];for(var O=0;O<A;O++){var I=C[O],N=I.alpha*r.alpha;if(!(N<=0)){g.applyITRS(I.x,I.y,I.rotation,I.scaleX,I.scaleY),d.copyFrom(r.matrix),d.multiplyWithOffset(m,-r.scrollX*P,-r.scrollY*M),g.e=I.x,g.f=I.y,d.multiply(g,p);var Y=I.frame,X=Y.canvasData,W=-Y.halfWidth,H=-Y.halfHeight;x.globalAlpha=N,x.save(),p.setToContext(x),y&&(W=Math.round(W),H=Math.round(H)),x.imageSmoothingEnabled=!(!n.antialias||Y.source.scaleMode),x.drawImage(Y.source.image,X.x,X.y,X.width,X.height,W,H,X.width,X.height),x.restore()}}x.restore()}}}};c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={DeathZone:t(453),EdgeZone:t(454),RandomZone:t(456)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1080),u=t(1081),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(12),u=function(o,a,s,i){s.addToRenderList(a);var n=s.alpha,l=a.renderTarget,r=l.width,h=l.height,f=e.getTintAppendFloatAlpha,v=o.pipelines.set(a.pipeline),d=v.setTexture2D(l.texture);o.pipelines.preBatch(a),v.batchTexture(a,l.texture,r,h,a.x,a.y,r,h,a.scaleX,a.scaleY,a.rotation,a.flipX,!a.flipY,a.scrollFactorX,a.scrollFactorY,a.displayOriginX,a.displayOriginY,0,0,r,h,f(a.tintTopLeft,n*a._alphaTL),f(a.tintTopRight,n*a._alphaTR),f(a.tintBottomLeft,n*a._alphaBL),f(a.tintBottomRight,n*a._alphaBR),a.tintFill,0,0,s,i,!0,d),o.resetTextures(),o.pipelines.postBatch(a)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){o.addToRenderList(u),e.batchSprite(u,u.frame,o,a)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1083),u=t(17),o={Parse:t(1084)};o=u(!1,o,e),c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(6),u=function(o,a){var s=a.width,i=a.height,n=Math.floor(s/2),l=Math.floor(i/2),r=e(a,"chars","");if(r!==""){var h=e(a,"image",""),f=o.sys.textures.getFrame(h),v=f.cutX,d=f.cutY,p=f.source.width,g=f.source.height,m=e(a,"offset.x",0),x=e(a,"offset.y",0),y=e(a,"spacing.x",0),T=e(a,"spacing.y",0),E=e(a,"lineSpacing",0),C=e(a,"charsPerRow",null);C===null&&(C=p/s,C>r.length&&(C=r.length));for(var A=m,P=x,M={retroFont:!0,font:h,size:s,lineHeight:i+E,chars:{}},O=0,I=0;I<r.length;I++){var N=r.charCodeAt(I),Y=(v+A)/p,X=(d+P)/g,W=(v+A+s)/p,H=(d+P+i)/g;M.chars[N]={x:A,y:P,width:s,height:i,centerX:n,centerY:l,xOffset:0,yOffset:0,xAdvance:s,data:{},kerning:{},u0:Y,v0:X,u1:W,v1:H},O++,O===C?(O=0,A=m,P+=i+T):A+=s+y}var D={data:M,frame:null,texture:h};return D}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1086),u=t(1087),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=t(12),o=function(a,s,i,n){i.addToRenderList(s);var l=a.pipelines.set(s.pipeline,s),r=e(s,i,n).calc,h=s.vertices,f=s.uv,v=s.colors,d=s.alphas,p=s.alpha,g=u.getTintAppendFloatAlpha,m=i.roundPixels,x=h.length,y=Math.floor(x*.5);l.flush(),a.pipelines.preBatch(s);var T=l.setGameObject(s),E=l.vertexViewF32,C=l.vertexViewU32,A=l.vertexCount*l.currentShader.vertexComponentCount-1,P=0,M=s.tintFill;s.dirty&&s.updateVertices();for(var O=s.debugCallback,I=[],N=0;N<x;N+=2){var Y=h[N+0],X=h[N+1],W=Y*r.a+X*r.c+r.e,H=Y*r.b+X*r.d+r.f;m&&(W=Math.round(W),H=Math.round(H)),E[++A]=W,E[++A]=H,E[++A]=f[N+0],E[++A]=f[N+1],E[++A]=T,E[++A]=M,C[++A]=g(v[P],i.alpha*(d[P]*p)),P++,O&&(I[N+0]=W,I[N+1]=H)}O&&O.call(s,s,x,I),l.vertexCount+=y,a.pipelines.postBatch(s)};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(){};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1089),u=t(1090),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(12),u=function(o,a,s,i){if(!(a.width===0||a.height===0)){s.addToRenderList(a);var n=a.frame,l=n.width,r=n.height,h=e.getTintAppendFloatAlpha,f=o.pipelines.set(a.pipeline,a),v=f.setTexture2D(n.glTexture,a);o.pipelines.preBatch(a),f.batchTexture(a,n.glTexture,l,r,a.x,a.y,l/a.style.resolution,r/a.style.resolution,a.scaleX,a.scaleY,a.rotation,a.flipX,a.flipY,a.scrollFactorX,a.scrollFactorY,a.displayOriginX,a.displayOriginY,0,0,l,r,h(a.tintTopLeft,s.alpha*a._alphaTL),h(a.tintTopRight,s.alpha*a._alphaTR),h(a.tintBottomLeft,s.alpha*a._alphaBL),h(a.tintBottomRight,s.alpha*a._alphaBR),a.tintFill,0,0,s,i,!1,v),o.pipelines.postBatch(a)}};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){u.width===0||u.height===0||(o.addToRenderList(u),e.batchSprite(u,u.frame,o,a))};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1092),u=t(1093),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(12),u=function(o,a,s,i){a.updateCanvas();var n=a.width,l=a.height;if(!(n===0||l===0)){s.addToRenderList(a),o.pipelines.preBatch(a);var r=e.getTintAppendFloatAlpha,h=o.pipelines.set(a.pipeline,a),f=h.setTexture2D(a.fillPattern,a);h.batchTexture(a,a.fillPattern,a.displayFrame.width*a.tileScaleX,a.displayFrame.height*a.tileScaleY,a.x,a.y,n,l,a.scaleX,a.scaleY,a.rotation,a.flipX,a.flipY,a.scrollFactorX,a.scrollFactorY,a.originX*n,a.originY*l,0,0,n,l,r(a.tintTopLeft,s.alpha*a._alphaTL),r(a.tintTopRight,s.alpha*a._alphaTR),r(a.tintBottomLeft,s.alpha*a._alphaBL),r(a.tintBottomRight,s.alpha*a._alphaBR),a.tintFill,a.tilePositionX%a.displayFrame.width/a.displayFrame.width,a.tilePositionY%a.displayFrame.height/a.displayFrame.height,s,i,!1,f),o.pipelines.postBatch(a)}};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){u.updateCanvas(),o.addToRenderList(u),e.batchSprite(u,u.frame,o,a)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1095),u=t(1096),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){u.videoTexture&&(o.addToRenderList(u),u.pipeline.batchSprite(u,o,a))};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){u.videoTexture&&(o.addToRenderList(u),e.batchSprite(u,u.frame,o,a))};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1098),u=t(1099),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=t(114),o=t(81),a=function(s,i,n,l){n.addToRenderList(i);var r=s.pipelines.set(i.pipeline),h=e(i,n,l),f=r.calcMatrix.copyFrom(h.calc),v=i._displayOriginX,d=i._displayOriginY,p=n.alpha*i.alpha;s.pipelines.preBatch(i),i.isFilled&&u(r,f,i,p,v,d),i.isStroked&&o(r,i,p,v,d),s.pipelines.postBatch(i)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(36),u=t(48),o=t(60),a=t(30),s=function(i,n,l,r){l.addToRenderList(n);var h=i.currentContext;if(a(i,h,n,l,r)){var f=n.radius;h.beginPath(),h.arc(f-n.originX*(f*2),f-n.originY*(f*2),f,e(n._startAngle),e(n._endAngle),n.anticlockwise),n.closePath&&h.closePath(),n.isFilled&&(u(h,n),h.fill()),n.isStroked&&(o(h,n),h.stroke()),h.restore()}};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1101),u=t(1102),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(114),u=t(19),o=t(81),a=function(s,i,n,l){n.addToRenderList(i);var r=s.pipelines.set(i.pipeline),h=u(i,n,l),f=r.calcMatrix.copyFrom(h.calc),v=i._displayOriginX+i._curveBounds.x,d=i._displayOriginY+i._curveBounds.y,p=n.alpha*i.alpha;s.pipelines.preBatch(i),i.isFilled&&e(r,f,i,p,v,d),i.isStroked&&o(r,i,p,v,d),s.pipelines.postBatch(i)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(48),u=t(60),o=t(30),a=function(s,i,n,l){n.addToRenderList(i);var r=s.currentContext;if(o(s,r,i,n,l)){var h=i._displayOriginX+i._curveBounds.x,f=i._displayOriginY+i._curveBounds.y,v=i.pathData,d=v.length-1,p=v[0]-h,g=v[1]-f;r.beginPath(),r.moveTo(p,g),i.closePath||(d-=2);for(var m=2;m<d;m+=2){var x=v[m]-h,y=v[m+1]-f;r.lineTo(x,y)}i.closePath&&r.closePath(),i.isFilled&&(e(r,i),r.fill()),i.isStroked&&(u(r,i),r.stroke()),r.restore()}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1104),u=t(1105),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(114),u=t(19),o=t(81),a=function(s,i,n,l){n.addToRenderList(i);var r=s.pipelines.set(i.pipeline),h=u(i,n,l),f=r.calcMatrix.copyFrom(h.calc),v=i._displayOriginX,d=i._displayOriginY,p=n.alpha*i.alpha;s.pipelines.preBatch(i),i.isFilled&&e(r,f,i,p,v,d),i.isStroked&&o(r,i,p,v,d),s.pipelines.postBatch(i)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(48),u=t(60),o=t(30),a=function(s,i,n,l){n.addToRenderList(i);var r=s.currentContext;if(o(s,r,i,n,l)){var h=i._displayOriginX,f=i._displayOriginY,v=i.pathData,d=v.length-1,p=v[0]-h,g=v[1]-f;r.beginPath(),r.moveTo(p,g),i.closePath||(d-=2);for(var m=2;m<d;m+=2){var x=v[m]-h,y=v[m+1]-f;r.lineTo(x,y)}r.closePath(),i.isFilled&&(e(r,i),r.fill()),i.isStroked&&(u(r,i),r.stroke()),r.restore()}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1107),u=t(1108),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=t(12),o=function(a,s,i,n){i.addToRenderList(s);var l=a.pipelines.set(s.pipeline),r=e(s,i,n),h=l.calcMatrix.copyFrom(r.calc);h.translate(-s._displayOriginX,-s._displayOriginY);var f=i.alpha*s.alpha,v=s.width,d=s.height,p=s.cellWidth,g=s.cellHeight,m=Math.ceil(v/p),x=Math.ceil(d/g),y=p,T=g,E=p-(m*p-v),C=g-(x*g-d),A,P,M=s.showCells,O=s.showAltCells,I=s.showOutline,N=0,Y=0,X=0,W=0,H=0;if(I&&(y--,T--,E===p&&E--,C===g&&C--),a.pipelines.preBatch(s),M&&s.fillAlpha>0)for(A=l.fillTint,P=u.getTintAppendFloatAlpha(s.fillColor,s.fillAlpha*f),A.TL=P,A.TR=P,A.BL=P,A.BR=P,Y=0;Y<x;Y++)for(O&&(X=Y%2),N=0;N<m;N++){if(O&&X){X=0;continue}X++,W=N<m-1?y:E,H=Y<x-1?T:C,l.batchFillRect(N*p,Y*g,W,H)}if(O&&s.altFillAlpha>0)for(A=l.fillTint,P=u.getTintAppendFloatAlpha(s.altFillColor,s.altFillAlpha*f),A.TL=P,A.TR=P,A.BL=P,A.BR=P,Y=0;Y<x;Y++)for(O&&(X=Y%2),N=0;N<m;N++){if(O&&!X){X=1;continue}X=0,W=N<m-1?y:E,H=Y<x-1?T:C,l.batchFillRect(N*p,Y*g,W,H)}if(I&&s.outlineFillAlpha>0){var D=l.strokeTint,L=u.getTintAppendFloatAlpha(s.outlineFillColor,s.outlineFillAlpha*f);for(D.TL=L,D.TR=L,D.BL=L,D.BR=L,N=1;N<m;N++){var B=N*p;l.batchLine(B,0,B,d,1,1,1,0,!1)}for(Y=1;Y<x;Y++){var G=Y*g;l.batchLine(0,G,v,G,1,1,1,0,!1)}}a.pipelines.postBatch(s)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(48),u=t(60),o=t(30),a=function(s,i,n,l){n.addToRenderList(i);var r=s.currentContext;if(o(s,r,i,n,l)){var h=-i._displayOriginX,f=-i._displayOriginY,v=n.alpha*i.alpha,d=i.width,p=i.height,g=i.cellWidth,m=i.cellHeight,x=Math.ceil(d/g),y=Math.ceil(p/m),T=g,E=m,C=g-(x*g-d),A=m-(y*m-p),P=i.showCells,M=i.showAltCells,O=i.showOutline,I=0,N=0,Y=0,X=0,W=0;if(O&&(T--,E--,C===g&&C--,A===m&&A--),P&&i.fillAlpha>0)for(e(r,i),N=0;N<y;N++)for(M&&(Y=N%2),I=0;I<x;I++){if(M&&Y){Y=0;continue}Y++,X=I<x-1?T:C,W=N<y-1?E:A,r.fillRect(h+I*g,f+N*m,X,W)}if(M&&i.altFillAlpha>0)for(e(r,i,i.altFillColor,i.altFillAlpha*v),N=0;N<y;N++)for(M&&(Y=N%2),I=0;I<x;I++){if(M&&!Y){Y=1;continue}Y=0,X=I<x-1?T:C,W=N<y-1?E:A,r.fillRect(h+I*g,f+N*m,X,W)}if(O&&i.outlineFillAlpha>0){for(u(r,i,i.outlineFillColor,i.outlineFillAlpha*v),I=1;I<x;I++){var H=I*g;r.beginPath(),r.moveTo(H+h,f),r.lineTo(H+h,p+f),r.stroke()}for(N=1;N<y;N++){var D=N*m;r.beginPath(),r.moveTo(h,D+f),r.lineTo(h+d,D+f),r.stroke()}}r.restore()}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1110),u=t(1111),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=t(12),o=function(a,s,i,n){i.addToRenderList(s);var l=a.pipelines.set(s.pipeline),r=e(s,i,n),h=l.calcMatrix.copyFrom(r.calc),f=s.width,v=s.height,d=f/2,p=f/s.projection,g=i.alpha*s.alpha;if(!!s.isFilled){var m,x,y,T,E,C,A,P,M;a.pipelines.preBatch(s),s.showTop&&(m=u.getTintAppendFloatAlpha(s.fillTop,g),x=h.getX(-d,-v),y=h.getY(-d,-v),T=h.getX(0,-p-v),E=h.getY(0,-p-v),C=h.getX(d,-v),A=h.getY(d,-v),P=h.getX(0,p-v),M=h.getY(0,p-v),l.batchQuad(s,x,y,T,E,C,A,P,M,0,0,1,1,m,m,m,m,2)),s.showLeft&&(m=u.getTintAppendFloatAlpha(s.fillLeft,g),x=h.getX(-d,0),y=h.getY(-d,0),T=h.getX(0,p),E=h.getY(0,p),C=h.getX(0,p-v),A=h.getY(0,p-v),P=h.getX(-d,-v),M=h.getY(-d,-v),l.batchQuad(s,x,y,T,E,C,A,P,M,0,0,1,1,m,m,m,m,2)),s.showRight&&(m=u.getTintAppendFloatAlpha(s.fillRight,g),x=h.getX(d,0),y=h.getY(d,0),T=h.getX(0,p),E=h.getY(0,p),C=h.getX(0,p-v),A=h.getY(0,p-v),P=h.getX(d,-v),M=h.getY(d,-v),l.batchQuad(s,x,y,T,E,C,A,P,M,0,0,1,1,m,m,m,m,2)),a.pipelines.postBatch(s)}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(48),u=t(30),o=function(a,s,i,n){i.addToRenderList(s);var l=a.currentContext;if(u(a,l,s,i,n)&&s.isFilled){var r=s.width,h=s.height,f=r/2,v=r/s.projection;s.showTop&&(e(l,s,s.fillTop),l.beginPath(),l.moveTo(-f,-h),l.lineTo(0,-v-h),l.lineTo(f,-h),l.lineTo(f,-1),l.lineTo(0,v-1),l.lineTo(-f,-1),l.lineTo(-f,-h),l.fill()),s.showLeft&&(e(l,s,s.fillLeft),l.beginPath(),l.moveTo(-f,0),l.lineTo(0,v),l.lineTo(0,v-h),l.lineTo(-f,-h),l.lineTo(-f,0),l.fill()),s.showRight&&(e(l,s,s.fillRight),l.beginPath(),l.moveTo(f,0),l.lineTo(0,v),l.lineTo(0,v-h),l.lineTo(f,-h),l.lineTo(f,0),l.fill()),l.restore()}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1113),u=t(1114),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=t(12),o=function(a,s,i,n){i.addToRenderList(s);var l=a.pipelines.set(s.pipeline),r=e(s,i,n),h=l.calcMatrix.copyFrom(r.calc),f=s.width,v=s.height,d=f/2,p=f/s.projection,g=s.isReversed,m=i.alpha*s.alpha;if(!!s.isFilled){a.pipelines.preBatch(s);var x,y,T,E,C,A,P;if(s.showTop&&g){x=u.getTintAppendFloatAlpha(s.fillTop,m),y=h.getX(-d,-v),T=h.getY(-d,-v),E=h.getX(0,-p-v),C=h.getY(0,-p-v),A=h.getX(d,-v),P=h.getY(d,-v);var M=h.getX(0,p-v),O=h.getY(0,p-v);l.batchQuad(s,y,T,E,C,A,P,M,O,0,0,1,1,x,x,x,x,2)}s.showLeft&&(x=u.getTintAppendFloatAlpha(s.fillLeft,m),g?(y=h.getX(-d,-v),T=h.getY(-d,-v),E=h.getX(0,p),C=h.getY(0,p),A=h.getX(0,p-v),P=h.getY(0,p-v)):(y=h.getX(-d,0),T=h.getY(-d,0),E=h.getX(0,p),C=h.getY(0,p),A=h.getX(0,p-v),P=h.getY(0,p-v)),l.batchTri(s,y,T,E,C,A,P,0,0,1,1,x,x,x,2)),s.showRight&&(x=u.getTintAppendFloatAlpha(s.fillRight,m),g?(y=h.getX(d,-v),T=h.getY(d,-v),E=h.getX(0,p),C=h.getY(0,p),A=h.getX(0,p-v),P=h.getY(0,p-v)):(y=h.getX(d,0),T=h.getY(d,0),E=h.getX(0,p),C=h.getY(0,p),A=h.getX(0,p-v),P=h.getY(0,p-v)),l.batchTri(s,y,T,E,C,A,P,0,0,1,1,x,x,x,2)),a.pipelines.postBatch(s)}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(48),u=t(30),o=function(a,s,i,n){i.addToRenderList(s);var l=a.currentContext;if(u(a,l,s,i,n)&&s.isFilled){var r=s.width,h=s.height,f=r/2,v=r/s.projection,d=s.isReversed;s.showTop&&d&&(e(l,s,s.fillTop),l.beginPath(),l.moveTo(-f,-h),l.lineTo(0,-v-h),l.lineTo(f,-h),l.lineTo(0,v-h),l.fill()),s.showLeft&&(e(l,s,s.fillLeft),l.beginPath(),d?(l.moveTo(-f,-h),l.lineTo(0,v),l.lineTo(0,v-h)):(l.moveTo(-f,0),l.lineTo(0,v),l.lineTo(0,v-h)),l.fill()),s.showRight&&(e(l,s,s.fillRight),l.beginPath(),d?(l.moveTo(f,-h),l.lineTo(0,v),l.lineTo(0,v-h)):(l.moveTo(f,0),l.lineTo(0,v),l.lineTo(0,v-h)),l.fill()),l.restore()}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1116),u=t(1117),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=t(12),o=function(a,s,i,n){i.addToRenderList(s);var l=a.pipelines.set(s.pipeline),r=e(s,i,n);l.calcMatrix.copyFrom(r.calc);var h=s._displayOriginX,f=s._displayOriginY,v=i.alpha*s.alpha;if(a.pipelines.preBatch(s),s.isStroked){var d=l.strokeTint,p=u.getTintAppendFloatAlpha(s.strokeColor,s.strokeAlpha*v);d.TL=p,d.TR=p,d.BL=p,d.BR=p;var g=s._startWidth,m=s._endWidth;l.batchLine(s.geom.x1-h,s.geom.y1-f,s.geom.x2-h,s.geom.y2-f,g,m,1,0,!1,r.sprite,r.camera)}a.pipelines.postBatch(s)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(60),u=t(30),o=function(a,s,i,n){i.addToRenderList(s);var l=a.currentContext;if(u(a,l,s,i,n)){var r=s._displayOriginX,h=s._displayOriginY;s.isStroked&&(e(l,s),l.beginPath(),l.moveTo(s.geom.x1-r,s.geom.y1-h),l.lineTo(s.geom.x2-r,s.geom.y2-h),l.stroke()),l.restore()}};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1119),u=t(1120),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(114),u=t(19),o=t(81),a=function(s,i,n,l){n.addToRenderList(i);var r=s.pipelines.set(i.pipeline),h=u(i,n,l),f=r.calcMatrix.copyFrom(h.calc),v=i._displayOriginX,d=i._displayOriginY,p=n.alpha*i.alpha;s.pipelines.preBatch(i),i.isFilled&&e(r,f,i,p,v,d),i.isStroked&&o(r,i,p,v,d),s.pipelines.postBatch(i)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(48),u=t(60),o=t(30),a=function(s,i,n,l){n.addToRenderList(i);var r=s.currentContext;if(o(s,r,i,n,l)){var h=i._displayOriginX,f=i._displayOriginY,v=i.pathData,d=v.length-1,p=v[0]-h,g=v[1]-f;r.beginPath(),r.moveTo(p,g),i.closePath||(d-=2);for(var m=2;m<d;m+=2){var x=v[m]-h,y=v[m+1]-f;r.lineTo(x,y)}r.closePath(),i.isFilled&&(e(r,i),r.fill()),i.isStroked&&(u(r,i),r.stroke()),r.restore()}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1122),u=t(1123),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=t(81),o=t(12),a=function(s,i,n,l){n.addToRenderList(i);var r=s.pipelines.set(i.pipeline),h=e(i,n,l);r.calcMatrix.copyFrom(h.calc);var f=i._displayOriginX,v=i._displayOriginY,d=n.alpha*i.alpha;if(s.pipelines.preBatch(i),i.isFilled){var p=r.fillTint,g=o.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g,r.batchFillRect(-f,-v,i.width,i.height)}i.isStroked&&u(r,i,d,f,v),s.pipelines.postBatch(i)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(48),u=t(60),o=t(30),a=function(s,i,n,l){n.addToRenderList(i);var r=s.currentContext;if(o(s,r,i,n,l)){var h=i._displayOriginX,f=i._displayOriginY;i.isFilled&&(e(r,i),r.fillRect(-h,-f,i.width,i.height)),i.isStroked&&(u(r,i),r.beginPath(),r.rect(-h,-f,i.width,i.height),r.stroke()),r.restore()}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1125),u=t(1126),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(114),u=t(19),o=t(81),a=function(s,i,n,l){n.addToRenderList(i);var r=s.pipelines.set(i.pipeline),h=u(i,n,l),f=r.calcMatrix.copyFrom(h.calc),v=i._displayOriginX,d=i._displayOriginY,p=n.alpha*i.alpha;s.pipelines.preBatch(i),i.isFilled&&e(r,f,i,p,v,d),i.isStroked&&o(r,i,p,v,d),s.pipelines.postBatch(i)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(48),u=t(60),o=t(30),a=function(s,i,n,l){n.addToRenderList(i);var r=s.currentContext;if(o(s,r,i,n,l)){var h=i._displayOriginX,f=i._displayOriginY,v=i.pathData,d=v.length-1,p=v[0]-h,g=v[1]-f;r.beginPath(),r.moveTo(p,g),i.closePath||(d-=2);for(var m=2;m<d;m+=2){var x=v[m]-h,y=v[m+1]-f;r.lineTo(x,y)}r.closePath(),i.isFilled&&(e(r,i),r.fill()),i.isStroked&&(u(r,i),r.stroke()),r.restore()}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1128),u=t(1129),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=t(81),o=t(12),a=function(s,i,n,l){n.addToRenderList(i);var r=s.pipelines.set(i.pipeline),h=e(i,n,l);r.calcMatrix.copyFrom(h.calc);var f=i._displayOriginX,v=i._displayOriginY,d=n.alpha*i.alpha;if(s.pipelines.preBatch(i),i.isFilled){var p=r.fillTint,g=o.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g;var m=i.geom.x1-f,x=i.geom.y1-v,y=i.geom.x2-f,T=i.geom.y2-v,E=i.geom.x3-f,C=i.geom.y3-v;r.batchFillTriangle(m,x,y,T,E,C,h.sprite,h.camera)}i.isStroked&&u(r,i,d,f,v),s.pipelines.postBatch(i)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(48),u=t(60),o=t(30),a=function(s,i,n,l){n.addToRenderList(i);var r=s.currentContext;if(o(s,r,i,n,l)){var h=i._displayOriginX,f=i._displayOriginY,v=i.geom.x1-h,d=i.geom.y1-f,p=i.geom.x2-h,g=i.geom.y2-f,m=i.geom.x3-h,x=i.geom.y3-f;r.beginPath(),r.moveTo(v,d),r.lineTo(p,g),r.lineTo(m,x),r.closePath(),i.isFilled&&(e(r,i),r.fill()),i.isStroked&&(u(r,i),r.stroke()),r.restore()}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(213),u=t(5);u.register("blitter",function(o,a,s,i){return this.displayList.add(new e(this.scene,o,a,s,i))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(214),u=t(5);u.register("container",function(o,a,s){return this.displayList.add(new e(this.scene,o,a,s))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(442),u=t(5);u.register("dom",function(o,a,s,i,n){var l=new e(this.scene,o,a,s,i,n);return this.displayList.add(l),l})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(215),u=t(5);u.register("dynamicBitmapText",function(o,a,s,i,n){return this.displayList.add(new e(this.scene,o,a,s,i,n))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(444),u=t(5);u.register("extern",function(){var o=new e(this.scene);return this.displayList.add(o),o})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(216),u=t(5);u.register("graphics",function(o){return this.displayList.add(new e(this.scene,o))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(113),u=t(5);u.register("group",function(o,a){return this.updateList.add(new e(this.scene,o,a))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(125),u=t(5);u.register("image",function(o,a,s,i){return this.displayList.add(new e(this.scene,o,a,s,i))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(219),u=t(5);u.register("layer",function(o){return this.displayList.add(new e(this.scene,o))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(220);e.register("particles",function(o,a,s){return this.displayList.add(new u(this.scene,o,a,s))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(457);e.register("follower",function(o,a,s,i,n){var l=new u(this.scene,o,a,s,i,n);return this.displayList.add(l),this.updateList.add(l),l})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(221);e.register("renderTexture",function(o,a,s,i,n,l){return this.displayList.add(new u(this.scene,o,a,s,i,n,l))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(223),u=t(5);u.register("rope",function(o,a,s,i,n,l,r,h){return this.displayList.add(new e(this.scene,o,a,s,i,n,l,r,h))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(73);e.register("sprite",function(o,a,s,i){var n=new u(this.scene,o,a,s,i);return this.displayList.add(n),n})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(148),u=t(5);u.register("bitmapText",function(o,a,s,i,n,l){return this.displayList.add(new e(this.scene,o,a,s,i,n,l))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(224),u=t(5);u.register("text",function(o,a,s,i){return this.displayList.add(new e(this.scene,o,a,s,i))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(225),u=t(5);u.register("tileSprite",function(o,a,s,i,n,l){return this.displayList.add(new e(this.scene,o,a,s,i,n,l))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(129),u=t(5);u.register("zone",function(o,a,s,i){return this.displayList.add(new e(this.scene,o,a,s,i))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(226),u=t(5);u.register("video",function(o,a,s){return this.displayList.add(new e(this.scene,o,a,s))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(461),u=t(5);u.register("arc",function(o,a,s,i,n,l,r,h){return this.displayList.add(new e(this.scene,o,a,s,i,n,l,r,h))}),u.register("circle",function(o,a,s,i,n){return this.displayList.add(new e(this.scene,o,a,s,0,360,!1,i,n))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(462);e.register("curve",function(o,a,s,i,n){return this.displayList.add(new u(this.scene,o,a,s,i,n))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(463),u=t(5);u.register("ellipse",function(o,a,s,i,n,l){return this.displayList.add(new e(this.scene,o,a,s,i,n,l))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(464);e.register("grid",function(o,a,s,i,n,l,r,h,f,v){return this.displayList.add(new u(this.scene,o,a,s,i,n,l,r,h,f,v))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(465);e.register("isobox",function(o,a,s,i,n,l,r){return this.displayList.add(new u(this.scene,o,a,s,i,n,l,r))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(466);e.register("isotriangle",function(o,a,s,i,n,l,r,h){return this.displayList.add(new u(this.scene,o,a,s,i,n,l,r,h))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(467);e.register("line",function(o,a,s,i,n,l,r,h){return this.displayList.add(new u(this.scene,o,a,s,i,n,l,r,h))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(468);e.register("polygon",function(o,a,s,i,n){return this.displayList.add(new u(this.scene,o,a,s,i,n))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(473);e.register("rectangle",function(o,a,s,i,n,l){return this.displayList.add(new u(this.scene,o,a,s,i,n,l))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(474),u=t(5);u.register("star",function(o,a,s,i,n,l,r){return this.displayList.add(new e(this.scene,o,a,s,i,n,l,r))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(475);e.register("triangle",function(o,a,s,i,n,l,r,h,f,v){return this.displayList.add(new u(this.scene,o,a,s,i,n,l,r,h,f,v))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(213),u=t(28),o=t(16),a=t(13);o.register("blitter",function(s,i){s===void 0&&(s={});var n=a(s,"key",null),l=a(s,"frame",null),r=new e(this.scene,0,0,n,l);return i!==void 0&&(s.add=i),u(this.scene,r,s),r})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Felipe Alfonso <@bitnenfer>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(214),o=t(16),a=t(13);o.register("container",function(s,i){s===void 0&&(s={});var n=a(s,"x",0),l=a(s,"y",0),r=a(s,"children",null),h=new u(this.scene,n,l,r);return i!==void 0&&(s.add=i),e(this.scene,h,s),h})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(215),u=t(28),o=t(16),a=t(13);o.register("dynamicBitmapText",function(s,i){s===void 0&&(s={});var n=a(s,"font",""),l=a(s,"text",""),r=a(s,"size",!1),h=new e(this.scene,0,0,n,l,r);return i!==void 0&&(s.add=i),u(this.scene,h,s),h})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(16),u=t(216);e.register("graphics",function(o,a){o===void 0&&(o={}),a!==void 0&&(o.add=a);var s=new u(this.scene,o);return o.add&&this.scene.sys.displayList.add(s),s})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(16),u=t(113);e.register("group",function(o){return new u(this.scene,null,o)})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(16),o=t(13),a=t(125);u.register("image",function(s,i){s===void 0&&(s={});var n=o(s,"key",null),l=o(s,"frame",null),r=new a(this.scene,0,0,n,l);return i!==void 0&&(s.add=i),e(this.scene,r,s),r})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(219),o=t(16),a=t(13);o.register("layer",function(s,i){s===void 0&&(s={});var n=a(s,"children",null),l=new u(this.scene,n);return i!==void 0&&(s.add=i),e(this.scene,l,s),l})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(16),u=t(13),o=t(2),a=t(220);e.register("particles",function(s,i){s===void 0&&(s={});var n=u(s,"key",null),l=u(s,"frame",null),r=o(s,"emitters",null),h=new a(this.scene,n,l,r);i!==void 0&&(s.add=i);var f=o(s,"add",!1);return f?this.displayList.add(h):this.updateList.add(h),h})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(16),o=t(13),a=t(221);u.register("renderTexture",function(s,i){s===void 0&&(s={});var n=o(s,"x",0),l=o(s,"y",0),r=o(s,"width",32),h=o(s,"height",32),f=o(s,"key",void 0),v=o(s,"frame",void 0),d=new a(this.scene,n,l,r,h,f,v);return i!==void 0&&(s.add=i),e(this.scene,d,s),d})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(16),o=t(13),a=t(6),s=t(223);u.register("rope",function(i,n){i===void 0&&(i={});var l=o(i,"key",null),r=o(i,"frame",null),h=o(i,"horizontal",!0),f=a(i,"points",void 0),v=a(i,"colors",void 0),d=a(i,"alphas",void 0),p=new s(this.scene,0,0,l,r,f,h,v,d);return n!==void 0&&(i.add=n),e(this.scene,p,i),i.add||this.updateList.add(p),p})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(439),o=t(16),a=t(13),s=t(73);o.register("sprite",function(i,n){i===void 0&&(i={});var l=a(i,"key",null),r=a(i,"frame",null),h=new s(this.scene,0,0,l,r);return n!==void 0&&(i.add=n),e(this.scene,h,i),u(h,i),h})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(148),u=t(28),o=t(16),a=t(13),s=t(6);o.register("bitmapText",function(i,n){i===void 0&&(i={});var l=s(i,"font",""),r=a(i,"text",""),h=a(i,"size",!1),f=s(i,"align",0),v=new e(this.scene,0,0,l,r,h,f);return n!==void 0&&(i.add=n),u(this.scene,v,i),v})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(16),o=t(13),a=t(224);u.register("text",function(s,i){s===void 0&&(s={});var n=o(s,"text",""),l=o(s,"style",null),r=o(s,"padding",null);r!==null&&(l.padding=r);var h=new a(this.scene,0,0,n,l);return i!==void 0&&(s.add=i),e(this.scene,h,s),h.autoRound=o(s,"autoRound",!0),h.resolution=o(s,"resolution",1),h})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(16),o=t(13),a=t(225);u.register("tileSprite",function(s,i){s===void 0&&(s={});var n=o(s,"x",0),l=o(s,"y",0),r=o(s,"width",512),h=o(s,"height",512),f=o(s,"key",""),v=o(s,"frame",""),d=new a(this.scene,n,l,r,h,f,v);return i!==void 0&&(s.add=i),e(this.scene,d,s),d})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(16),u=t(13),o=t(129);e.register("zone",function(a){var s=u(a,"x",0),i=u(a,"y",0),n=u(a,"width",1),l=u(a,"height",n);return new o(this.scene,s,i,n,l)})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(16),o=t(13),a=t(226);u.register("video",function(s,i){s===void 0&&(s={});var n=o(s,"key",null),l=new a(this.scene,0,0,n);return i!==void 0&&(s.add=i),e(this.scene,l,s),s.add||this.updateList.add(l),l})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1177),u=t(1178),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=function(o,a,s,i){if(!!a.shader){if(s.addToRenderList(a),o.pipelines.clear(),a.renderToTexture)a.load(),a.flush();else{var n=e(a,s,i).calc;(o.width!==a._rendererWidth||o.height!==a._rendererHeight)&&a.projOrtho(0,o.width,o.height,0),a.load(n.matrix),a.flush()}o.pipelines.rebind()}};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(){};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1180),u=t(1181),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=function(o,a,s,i){var n=a.faces,l=n.length;if(l!==0){s.addToRenderList(a);var r=o.pipelines.set(a.pipeline,a),h=e(a,s,i).calc,f=r.setGameObject(a),v=r.vertexViewF32,d=r.vertexViewU32,p=r.vertexCount*r.currentShader.vertexComponentCount-1,g=a.tintFill,m=[],x=a.debugCallback,y=h.a,T=h.b,E=h.c,C=h.d,A=h.e,P=h.f,M=a.viewPosition.z,O=a.hideCCW,I=s.roundPixels,N=s.alpha*a.alpha,Y=0;o.pipelines.preBatch(a);for(var X=0;X<l;X++){var W=n[X];!W.isInView(s,O,M,N,y,T,E,C,A,P,I)||(r.shouldFlush(3)&&(r.flush(),p=0),p=W.load(v,d,p,f,g),Y++,r.vertexCount+=3,x&&m.push(W))}a.totalFrame+=Y,x&&x.call(a,a,m),o.pipelines.postBatch(a)}};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(){};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1183),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(19),u=function(o,a,s,i){s.addToRenderList(a);var n=o.pipelines.set(a.pipeline),l=e(a,s,i).calc,r=a.width,h=a.height,f=-a._radius,v=-a._radius,d=f+r,p=v+h,g=l.getX(0,0),m=l.getY(0,0),x=l.getX(f,v),y=l.getY(f,v),T=l.getX(f,p),E=l.getY(f,p),C=l.getX(d,p),A=l.getY(d,p),P=l.getX(d,v),M=l.getY(d,v);o.pipelines.preBatch(a),n.batchPointLight(a,s,x,y,T,E,C,A,P,M,g,m),o.pipelines.postBatch(a)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(229),u=t(5);u.register("shader",function(o,a,s,i,n,l,r){return this.displayList.add(new e(this.scene,o,a,s,i,n,l,r))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(230),u=t(5);u.register("mesh",function(o,a,s,i,n,l,r,h,f,v,d){return this.displayList.add(new e(this.scene,o,a,s,i,n,l,r,h,f,v,d))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(150);e.register("pointlight",function(o,a,s,i,n,l){return this.displayList.add(new u(this.scene,o,a,s,i,n,l))})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(16),o=t(13),a=t(229);u.register("shader",function(s,i){s===void 0&&(s={});var n=o(s,"key",null),l=o(s,"x",0),r=o(s,"y",0),h=o(s,"width",128),f=o(s,"height",128),v=new a(this.scene,n,l,r,h,f);return i!==void 0&&(s.add=i),e(this.scene,v,s),v})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(16),o=t(13),a=t(6),s=t(230);u.register("mesh",function(i,n){i===void 0&&(i={});var l=o(i,"key",null),r=o(i,"frame",null),h=a(i,"vertices",[]),f=a(i,"uvs",[]),v=a(i,"indicies",[]),d=a(i,"containsZ",!1),p=a(i,"normals",[]),g=a(i,"colors",16777215),m=a(i,"alphas",1),x=new s(this.scene,0,0,l,r,h,f,v,d,p,g,m);return n!==void 0&&(i.add=n),e(this.scene,x,i),x})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(28),u=t(16),o=t(13),a=t(150);u.register("pointlight",function(s,i){s===void 0&&(s={});var n=o(s,"color",16777215),l=o(s,"radius",128),r=o(s,"intensity",1),h=o(s,"attenuation",.1),f=new a(this.scene,0,0,n,l,r,h);return i!==void 0&&(s.add=i),e(this.scene,f,s),f})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(482),o=t(24),a=t(20),s=new e({Extends:u,initialize:function(n){this.scene=n,this.systems=n.sys,n.sys.settings.isBooted||n.sys.events.once(a.BOOT,this.boot,this),u.call(this)},boot:function(){var i=this.systems.events;i.on(a.SHUTDOWN,this.shutdown,this),i.on(a.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});o.register("LightsPlugin",s,"lights"),c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(65);e.Area=t(1192),e.Circumference=t(302),e.CircumferencePoint=t(169),e.Clone=t(1193),e.Contains=t(66),e.ContainsPoint=t(1194),e.ContainsRect=t(1195),e.CopyFrom=t(1196),e.Equals=t(1197),e.GetBounds=t(1198),e.GetPoint=t(300),e.GetPoints=t(301),e.Offset=t(1199),e.OffsetPoint=t(1200),e.Random=t(170),c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.radius>0?Math.PI*e.radius*e.radius:0};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(65),u=function(o){return new e(o.x,o.y,o.radius)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(66),u=function(o,a){return e(o,a.x,a.y)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(66),u=function(o,a){return e(o,a.x,a.y)&&e(o,a.right,a.y)&&e(o,a.x,a.bottom)&&e(o,a.right,a.bottom)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u.setTo(e.x,e.y,e.radius)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x===u.x&&e.y===u.y&&e.radius===u.radius};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=function(o,a){return a===void 0&&(a=new e),a.x=o.left,a.y=o.top,a.width=o.diameter,a.height=o.diameter,a};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e.x+=u,e.y+=o,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x+=u.x,e.y+=u.y,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(111);e.Area=t(1202),e.Circumference=t(447),e.CircumferencePoint=t(218),e.Clone=t(1203),e.Contains=t(112),e.ContainsPoint=t(1204),e.ContainsRect=t(1205),e.CopyFrom=t(1206),e.Equals=t(1207),e.GetBounds=t(1208),e.GetPoint=t(445),e.GetPoints=t(446),e.Offset=t(1209),e.OffsetPoint=t(1210),e.Random=t(180),c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.isEmpty()?0:e.getMajorRadius()*e.getMinorRadius()*Math.PI};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(111),u=function(o){return new e(o.x,o.y,o.width,o.height)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(112),u=function(o,a){return e(o,a.x,a.y)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(112),u=function(o,a){return e(o,a.x,a.y)&&e(o,a.right,a.y)&&e(o,a.x,a.bottom)&&e(o,a.right,a.bottom)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u.setTo(e.x,e.y,e.width,e.height)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x===u.x&&e.y===u.y&&e.width===u.width&&e.height===u.height};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=function(o,a){return a===void 0&&(a=new e),a.x=o.left,a.y=o.top,a.width=o.width,a.height=o.height,a};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e.x+=u,e.y+=o,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x+=u.x,e.y+=u.y,e};c.exports=t},function(c,S,t){/**
 * @author       Florian Vazelle
 * @author       Geoffrey Glaive
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=t(231),o=function(a,s,i){if(i===void 0&&(i=[]),u(a,s)){var n=a.x,l=a.y,r=a.radius,h=s.x,f=s.y,v=s.radius,d,p,g,m,x;if(l===f)x=(v*v-r*r-h*h+n*n)/(2*(n-h)),d=1,p=-2*f,g=h*h+x*x-2*h*x+f*f-v*v,m=p*p-4*d*g,m===0?i.push(new e(x,-p/(2*d))):m>0&&(i.push(new e(x,(-p+Math.sqrt(m))/(2*d))),i.push(new e(x,(-p-Math.sqrt(m))/(2*d))));else{var y=(n-h)/(l-f),T=(v*v-r*r-h*h+n*n-f*f+l*l)/(2*(l-f));d=y*y+1,p=2*l*y-2*T*y-2*n,g=n*n+l*l+T*T-r*r-2*l*T,m=p*p-4*d*g,m===0?(x=-p/(2*d),i.push(new e(x,T-x*y))):m>0&&(x=(-p+Math.sqrt(m))/(2*d),i.push(new e(x,T-x*y)),x=(-p-Math.sqrt(m))/(2*d),i.push(new e(x,T-x*y)))}}return i};c.exports=o},function(c,S,t){/**
 * @author       Florian Vazelle
 * @author       Geoffrey Glaive
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(232),u=t(151),o=function(a,s,i){if(i===void 0&&(i=[]),u(a,s)){var n=s.getLineA(),l=s.getLineB(),r=s.getLineC(),h=s.getLineD();e(n,a,i),e(l,a,i),e(r,a,i),e(h,a,i)}return i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(140),u=t(487),o=t(47),a=new o;function s(l,r,h,f,v){var d=Math.cos(l),p=Math.sin(l);a.setTo(r,h,r+d,h+p);var g=u(a,f);g&&v.push(new e(g.x,g.y,l,g.w))}function i(l,r){return l.z-r.z}var n=function(l,r,h){Array.isArray(h)||(h=[h]);for(var f=[],v=[],d=0;d<h.length;d++)for(var p=h[d].points,g=0;g<p.length;g++){var m=Math.atan2(p[g].y-r,p[g].x-l);v.indexOf(m)===-1&&(s(m,l,r,h,f),s(m-1e-5,l,r,h,f),s(m+1e-5,l,r,h,f),v.push(m))}return f.sort(i)};c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=t(152),o=function(a,s,i){return i===void 0&&(i=new e),u(a,s)&&(i.x=Math.max(a.x,s.x),i.y=Math.max(a.y,s.y),i.width=Math.min(a.right,s.right)-i.x,i.height=Math.min(a.bottom,s.bottom)-i.y),i};c.exports=o},function(c,S,t){/**
 * @author       Florian Vazelle
 * @author       Geoffrey Glaive
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(234),u=t(152),o=function(a,s,i){if(i===void 0&&(i=[]),u(a,s)){var n=a.getLineA(),l=a.getLineB(),r=a.getLineC(),h=a.getLineD();e(n,s,i),e(l,s,i),e(r,s,i),e(h,s,i)}return i};c.exports=o},function(c,S,t){/**
 * @author       Florian Vazelle
 * @author       Geoffrey Glaive
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(489),u=t(234),o=function(a,s,i){if(i===void 0&&(i=[]),e(a,s)){var n=s.getLineA(),l=s.getLineB(),r=s.getLineC();u(n,a,i),u(l,a,i),u(r,a,i)}return i};c.exports=o},function(c,S,t){/**
 * @author       Florian Vazelle
 * @author       Geoffrey Glaive
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(232),u=t(491),o=function(a,s,i){if(i===void 0&&(i=[]),u(a,s)){var n=a.getLineA(),l=a.getLineB(),r=a.getLineC();e(n,s,i),e(l,s,i),e(r,s,i)}return i};c.exports=o},function(c,S,t){/**
 * @author       Florian Vazelle
 * @author       Geoffrey Glaive
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(494),u=t(492),o=function(a,s,i){if(i===void 0&&(i=[]),e(a,s)){var n=s.getLineA(),l=s.getLineB(),r=s.getLineC();u(a,n,i),u(a,l,i),u(a,r,i)}return i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(496),u=function(o,a){if(!e(o,a))return!1;var s=Math.min(a.x1,a.x2),i=Math.max(a.x1,a.x2),n=Math.min(a.y1,a.y2),l=Math.max(a.y1,a.y2);return o.x>=s&&o.x<=i&&o.y>=n&&o.y<=l};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s,i){return i===void 0&&(i=0),!(u>e.right+i||o<e.left-i||a>e.bottom+i||s<e.top-i)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(47);e.Angle=t(97),e.BresenhamPoints=t(317),e.CenterOn=t(1222),e.Clone=t(1223),e.CopyFrom=t(1224),e.Equals=t(1225),e.Extend=t(1226),e.GetEasedPoints=t(1227),e.GetMidPoint=t(1228),e.GetNearestPoint=t(1229),e.GetNormal=t(1230),e.GetPoint=t(307),e.GetPoints=t(172),e.GetShortestDistance=t(1231),e.Height=t(1232),e.Length=t(67),e.NormalAngle=t(497),e.NormalX=t(1233),e.NormalY=t(1234),e.Offset=t(1235),e.PerpSlope=t(1236),e.Random=t(173),e.ReflectAngle=t(1237),e.Rotate=t(1238),e.RotateAroundPoint=t(1239),e.RotateAroundXY=t(236),e.SetToAngle=t(1240),e.Slope=t(1241),e.Width=t(1242),c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=u-(e.x1+e.x2)/2,s=o-(e.y1+e.y2)/2;return e.x1+=a,e.y1+=s,e.x2+=a,e.y2+=s,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(47),u=function(o){return new e(o.x1,o.y1,o.x2,o.y2)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u.setTo(e.x1,e.y1,e.x2,e.y2)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x1===u.x1&&e.y1===u.y1&&e.x2===u.x2&&e.y2===u.y2};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(67),u=function(o,a,s){s===void 0&&(s=a);var i=e(o),n=o.x2-o.x1,l=o.y2-o.y1;return a&&(o.x1=o.x1-n/i*a,o.y1=o.y1-l/i*a),s&&(o.x2=o.x2+n/i*s,o.y2=o.y2+l/i*s),o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(352),u=t(80),o=t(4),a=function(s,i,n,l,r){l===void 0&&(l=0),r===void 0&&(r=[]);var h=[],f=s.x1,v=s.y1,d=s.x2-f,p=s.y2-v,g=u(i,r),m,x,y=n-1;for(m=0;m<y;m++)x=g(m/y),h.push(new o(f+d*x,v+p*x));if(x=g(1),h.push(new o(f+d*x,v+p*x)),l>0){var T=h[0],E=[T];for(m=1;m<h.length-1;m++){var C=h[m];e(T,C)>=l&&(E.push(C),T=C)}var A=h[h.length-1];return e(T,A)<l&&E.pop(),E.push(A),E}else return h};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){return a===void 0&&(a=new e),a.x=(o.x1+o.x2)/2,a.y=(o.y1+o.y2)/2,a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Florian Mertens
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a,s){s===void 0&&(s=new e);var i=o.x1,n=o.y1,l=o.x2,r=o.y2,h=(l-i)*(l-i)+(r-n)*(r-n);if(h===0)return s;var f=((a.x-i)*(l-i)+(a.y-n)*(r-n))/h;return s.x=i+f*(l-i),s.y=n+f*(r-n),s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=t(97),o=t(4),a=function(s,i){i===void 0&&(i=new o);var n=u(s)-e.TAU;return i.x=Math.cos(n),i.y=Math.sin(n),i};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Florian Mertens
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=e.x1,a=e.y1,s=e.x2,i=e.y2,n=(s-o)*(s-o)+(i-a)*(i-a);if(n===0)return!1;var l=((a-u.y)*(s-o)-(o-u.x)*(i-a))/n;return Math.abs(l)*Math.sqrt(n)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return Math.abs(e.y1-e.y2)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=t(97),o=function(a){return Math.cos(u(a)-e.TAU)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(14),u=t(97),o=function(a){return Math.sin(u(a)-e.TAU)};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e.x1+=u,e.y1+=o,e.x2+=u,e.y2+=o,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return-((e.x2-e.x1)/(e.y2-e.y1))};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(97),u=t(497),o=function(a,s){return 2*u(s)-Math.PI-e(a)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(236),u=function(o,a){var s=(o.x1+o.x2)/2,i=(o.y1+o.y2)/2;return e(o,s,i,a)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(236),u=function(o,a,s){return e(o,a.x,a.y,s)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a,s){return e.x1=u,e.y1=o,e.x2=u+Math.cos(a)*s,e.y2=o+Math.sin(a)*s,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return(e.y2-e.y1)/(e.x2-e.x1)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return Math.abs(e.x1-e.x2)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e={Face:t(116),GenerateGridVerts:t(1244),GenerateObjVerts:t(480),GenerateVerts:t(479),ParseObj:t(498),ParseObjMaterial:t(499),RotateFace:t(1245),Vertex:t(117)};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(116),u=t(2),o=t(69),a=t(39),s=t(117),i=new a,n=new a,l=new o,r=function(h){var f=u(h,"mesh"),v=u(h,"texture",null),d=u(h,"frame"),p=u(h,"width",1),g=u(h,"height",p),m=u(h,"widthSegments",1),x=u(h,"heightSegments",m),y=u(h,"x",0),T=u(h,"y",0),E=u(h,"z",0),C=u(h,"rotateX",0),A=u(h,"rotateY",0),P=u(h,"rotateZ",0),M=u(h,"zIsUp",!0),O=u(h,"isOrtho",f?f.dirtyCache[11]:!1),I=u(h,"colors",[16777215]),N=u(h,"alphas",[1]),Y=u(h,"tile",!1),X=u(h,"flipY",!1),W=u(h,"width",null),H={faces:[],verts:[]};if(i.set(y,T,E),n.set(C,A,P),l.fromRotationXYTranslation(n,i,M),!v&&f)v=f.texture;else if(f&&typeof v=="string")v=f.scene.sys.textures.get(v);else return H;var D=v.get(d);!W&&O&&v&&f&&(p=D.width/f.height,g=D.height/f.height);var L=p/2,B=g/2,G=Math.floor(m),w=Math.floor(x),z=G+1,U=w+1,V=p/G,Z=g/w,$=[],Q=[],j,k,et=0,_=1,nt=0,ut=1;D&&(et=D.u0,_=D.u1,X?(nt=D.v1,ut=D.v0):(nt=D.v0,ut=D.v1));var ht=_-et,at=ut-nt;for(k=0;k<U;k++){var tt=k*Z-B;for(j=0;j<z;j++){var dt=j*V-L;Q.push(dt,-tt);var rt=et+ht*(j/G),lt=nt+at*(k/w);$.push(rt,lt)}}Array.isArray(I)||(I=[I]),Array.isArray(N)||(N=[N]);var Pt=0,At=0;for(k=0;k<w;k++)for(j=0;j<G;j++){var gt=(j+z*k)*2,vt=(j+z*(k+1))*2,Tt=(j+1+z*(k+1))*2,xt=(j+1+z*k)*2,mt=I[At],yt=N[Pt],Ft=new s(Q[gt],Q[gt+1],0,$[gt],$[gt+1],mt,yt).transformMat4(l),K=new s(Q[vt],Q[vt+1],0,$[vt],$[vt+1],mt,yt).transformMat4(l),J=new s(Q[xt],Q[xt+1],0,$[xt],$[xt+1],mt,yt).transformMat4(l),q=new s(Q[vt],Q[vt+1],0,$[vt],$[vt+1],mt,yt).transformMat4(l),b=new s(Q[Tt],Q[Tt+1],0,$[Tt],$[Tt+1],mt,yt).transformMat4(l),it=new s(Q[xt],Q[xt+1],0,$[xt],$[xt+1],mt,yt).transformMat4(l);Y&&(Ft.setUVs(et,ut),K.setUVs(et,nt),J.setUVs(_,ut),q.setUVs(et,nt),b.setUVs(_,nt),it.setUVs(_,ut)),At++,At===I.length&&(At=0),Pt++,Pt===N.length&&(Pt=0),H.verts.push(Ft,K,J,q,b,it),H.faces.push(new e(Ft,K,J),new e(q,b,it))}return f&&(f.faces=f.faces.concat(H.faces),f.vertices=f.vertices.concat(H.verts)),H};c.exports=r},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){var s,i;if(o===void 0&&a===void 0){var n=e.getInCenter();s=n.x,i=n.y}var l=Math.cos(u),r=Math.sin(u),h=e.vertex1,f=e.vertex2,v=e.vertex3,d=h.x-s,p=h.y-i;h.set(d*l-p*r+s,d*r+p*l+i),d=f.x-s,p=f.y-i,f.set(d*l-p*r+s,d*r+p*l+i),d=v.x-s,p=v.y-i,v.set(d*l-p*r+s,d*r+p*l+i)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4);e.Ceil=t(1247),e.Clone=t(1248),e.CopyFrom=t(1249),e.Equals=t(1250),e.Floor=t(1251),e.GetCentroid=t(1252),e.GetMagnitude=t(500),e.GetMagnitudeSq=t(501),e.GetRectangleFromPoints=t(1253),e.Interpolate=t(1254),e.Invert=t(1255),e.Negative=t(1256),e.Project=t(1257),e.ProjectUnit=t(1258),e.SetMagnitude=t(1259),c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.setTo(Math.ceil(e.x),Math.ceil(e.y))};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o){return new e(o.x,o.y)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u.setTo(e.x,e.y)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x===u.x&&e.y===u.y};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.setTo(Math.floor(e.x),Math.floor(e.y))};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){if(a===void 0&&(a=new e),!Array.isArray(o))throw new Error("GetCentroid points argument must be an array");var s=o.length;if(s<1)throw new Error("GetCentroid points array must not be empty");if(s===1)a.x=o[0].x,a.y=o[0].y;else{for(var i=0;i<s;i++)a.x+=o[i].x,a.y+=o[i].y;a.x/=s,a.y/=s}return a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=function(o,a){a===void 0&&(a=new e);for(var s=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,r=0;r<o.length;r++){var h=o[r];h.x>s&&(s=h.x),h.x<i&&(i=h.x),h.y>n&&(n=h.y),h.y<l&&(l=h.y)}return a.x=i,a.y=l,a.width=s-i,a.height=n-l,a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a,s,i){return s===void 0&&(s=0),i===void 0&&(i=new e),i.x=o.x+(a.x-o.x)*s,i.y=o.y+(a.y-o.y)*s,i};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.setTo(e.y,e.x)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){return a===void 0&&(a=new e),a.setTo(-o.x,-o.y)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=t(501),o=function(a,s,i){i===void 0&&(i=new e);var n=a.x*s.x+a.y*s.y,l=n/u(s);return l!==0&&(i.x=l*s.x,i.y=l*s.y),i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a,s){s===void 0&&(s=new e);var i=o.x*a.x+o.y*a.y;return i!==0&&(s.x=i*a.x,s.y=i*a.y),s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(500),u=function(o,a){if(o.x!==0||o.y!==0){var s=e(o);o.x/=s,o.y/=s}return o.x*=a,o.y*=a,o};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(227);e.Clone=t(1261),e.Contains=t(228),e.ContainsPoint=t(1262),e.Earcut=t(59),e.GetAABB=t(469),e.GetNumberArray=t(1263),e.GetPoints=t(470),e.Perimeter=t(471),e.Reverse=t(1264),e.Simplify=t(1265),e.Smooth=t(472),e.Translate=t(1266),c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(227),u=function(o){return new e(o.points)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(228),u=function(o,a){return e(o,a.x,a.y)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u===void 0&&(u=[]);for(var o=0;o<e.points.length;o++)u.push(e.points[o].x),u.push(e.points[o].y);return u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.points.reverse(),e};c.exports=t},function(c,S){function t(i,n){var l=i.x-n.x,r=i.y-n.y;return l*l+r*r}function e(i,n,l){var r=n.x,h=n.y,f=l.x-r,v=l.y-h;if(f!==0||v!==0){var d=((i.x-r)*f+(i.y-h)*v)/(f*f+v*v);d>1?(r=l.x,h=l.y):d>0&&(r+=f*d,h+=v*d)}return f=i.x-r,v=i.y-h,f*f+v*v}function u(i,n){for(var l=i[0],r=[l],h,f=1,v=i.length;f<v;f++)h=i[f],t(h,l)>n&&(r.push(h),l=h);return l!==h&&r.push(h),r}function o(i,n,l,r,h){for(var f=r,v,d=n+1;d<l;d++){var p=e(i[d],i[n],i[l]);p>f&&(v=d,f=p)}f>r&&(v-n>1&&o(i,n,v,r,h),h.push(i[v]),l-v>1&&o(i,v,l,r,h))}function a(i,n){var l=i.length-1,r=[i[0]];return o(i,0,l,n,r),r.push(i[l]),r}var s=function(i,n,l){n===void 0&&(n=1),l===void 0&&(l=!1);var r=i.points;if(r.length>2){var h=n*n;l||(r=u(r,h)),i.setTo(a(r,h))}return i};c.exports=s},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){for(var a=e.points,s=0;s<a.length;s++)a[s].x+=u,a[s].y+=o;return e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.width*e.height};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.x=Math.ceil(e.x),e.y=Math.ceil(e.y),e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.x=Math.ceil(e.x),e.y=Math.ceil(e.y),e.width=Math.ceil(e.width),e.height=Math.ceil(e.height),e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=function(o){return new e(o.x,o.y,o.width,o.height)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(57),u=function(o,a){return e(o,a.x,a.y)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u.setTo(e.x,e.y,e.width,e.height)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x===u.x&&e.y===u.y&&e.width===u.width&&e.height===u.height};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(237),u=function(o,a){var s=e(o);return s<e(a)?o.setSize(a.height*s,a.height):o.setSize(a.width,a.width/s),o.setPosition(a.centerX-o.width/2,a.centerY-o.height/2)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(237),u=function(o,a){var s=e(o);return s>e(a)?o.setSize(a.height*s,a.height):o.setSize(a.width,a.width/s),o.setPosition(a.centerX-o.width/2,a.centerY-o.height/2)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.x=Math.floor(e.x),e.y=Math.floor(e.y),e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height),e};c.exports=t},function(c,S,t){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=function(o,a,s,i,n){return n===void 0&&(n=new e),n.setTo(Math.min(o,s),Math.min(a,i),Math.abs(o-s),Math.abs(a-i))};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){return a===void 0&&(a=new e),a.x=o.centerX,a.y=o.centerY,a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=function(o,a){return a===void 0&&(a=new e),a.x=o.width,a.y=o.height,a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(190),u=function(o,a,s){var i=o.centerX,n=o.centerY;return o.setSize(o.width+a*2,o.height+s*2),e(o,i,n)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(10),u=t(152),o=function(a,s,i){return i===void 0&&(i=new e),u(a,s)?(i.x=Math.max(a.x,s.x),i.y=Math.max(a.y,s.y),i.width=Math.min(a.right,s.right)-i.x,i.height=Math.min(a.bottom,s.bottom)-i.y):i.setEmpty(),i};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){for(var o=e.x,a=e.right,s=e.y,i=e.bottom,n=0;n<u.length;n++)o=Math.min(o,u[n].x),a=Math.max(a,u[n].x),s=Math.min(s,u[n].y),i=Math.max(i,u[n].y);return e.x=o,e.y=s,e.width=a-o,e.height=i-s,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){var o=Math.min(e.x,u.x),a=Math.max(e.right,u.right);e.x=o,e.width=a-o;var s=Math.min(e.y,u.y),i=Math.max(e.bottom,u.bottom);return e.y=s,e.height=i-s,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){var a=Math.min(e.x,u),s=Math.max(e.right,u);e.x=a,e.width=s-a;var i=Math.min(e.y,o),n=Math.max(e.bottom,o);return e.y=i,e.height=n-i,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return e.x+=u,e.y+=o,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x+=u.x,e.y+=u.y,e};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x<u.right&&e.right>u.x&&e.y<u.bottom&&e.bottom>u.y};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(4),u=t(36),o=function(a,s,i){i===void 0&&(i=new e),s=u(s);var n=Math.sin(s),l=Math.cos(s),r=l>0?a.width/2:a.width/-2,h=n>0?a.height/2:a.height/-2;return Math.abs(r*n)<Math.abs(h*l)?h=r*n/l:r=h*l/n,i.x=r+a.centerX,i.y=h+a.centerY,i};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(195),u=t(503),o=t(4),a=function(s,i,n){if(n===void 0&&(n=new o),u(s,i))switch(e(0,3)){case 0:n.x=s.x+Math.random()*(i.right-s.x),n.y=s.y+Math.random()*(i.top-s.y);break;case 1:n.x=i.x+Math.random()*(s.right-i.x),n.y=i.bottom+Math.random()*(s.bottom-i.bottom);break;case 2:n.x=s.x+Math.random()*(i.x-s.x),n.y=i.y+Math.random()*(s.bottom-i.y);break;case 3:n.x=i.right+Math.random()*(s.right-i.right),n.y=s.y+Math.random()*(i.bottom-s.y);break}return n};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.width===u.width&&e.height===u.height};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o){return o===void 0&&(o=u),e.width*=u,e.height*=o,e};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(82);e.Area=t(1294),e.BuildEquilateral=t(1295),e.BuildFromPolygon=t(1296),e.BuildRight=t(1297),e.CenterOn=t(1298),e.Centroid=t(504),e.CircumCenter=t(1299),e.CircumCircle=t(1300),e.Clone=t(1301),e.Contains=t(115),e.ContainsArray=t(235),e.ContainsPoint=t(1302),e.CopyFrom=t(1303),e.Decompose=t(495),e.Equals=t(1304),e.GetPoint=t(476),e.GetPoints=t(477),e.InCenter=t(506),e.Perimeter=t(1305),e.Offset=t(505),e.Random=t(181),e.Rotate=t(1306),e.RotateAroundPoint=t(1307),e.RotateAroundXY=t(238),c.exports=e},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){var u=e.x1,o=e.y1,a=e.x2,s=e.y2,i=e.x3,n=e.y3;return Math.abs(((i-u)*(s-o)-(a-u)*(n-o))/2)};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(82),u=function(o,a,s){var i=s*(Math.sqrt(3)/2),n=o,l=a,r=o+s/2,h=a+i,f=o-s/2,v=a+i;return new e(n,l,r,h,f,v)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(59),u=t(82),o=function(a,s,i,n,l){s===void 0&&(s=null),i===void 0&&(i=1),n===void 0&&(n=1),l===void 0&&(l=[]);for(var r=e(a,s),h,f,v,d,p,g,m,x,y,T=0;T<r.length;T+=3)h=r[T],f=r[T+1],v=r[T+2],d=a[h*2]*i,p=a[h*2+1]*n,g=a[f*2]*i,m=a[f*2+1]*n,x=a[v*2]*i,y=a[v*2+1]*n,l.push(new u(d,p,g,m,x,y));return l};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(82),u=function(o,a,s,i){i===void 0&&(i=s);var n=o,l=a,r=o,h=a-i,f=o+s,v=a;return new e(n,l,r,h,f,v)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(504),u=t(505),o=function(a,s,i,n){n===void 0&&(n=e);var l=n(a),r=s-l.x,h=i-l.y;return u(a,r,h)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(3);function u(a,s,i,n){return a*n-s*i}var o=function(a,s){s===void 0&&(s=new e);var i=a.x3,n=a.y3,l=a.x1-i,r=a.y1-n,h=a.x2-i,f=a.y2-n,v=2*u(l,r,h,f),d=u(r,l*l+r*r,f,h*h+f*f),p=u(l,l*l+r*r,h,h*h+f*f);return s.x=i-d/v,s.y=n+p/v,s};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(65),u=function(o,a){a===void 0&&(a=new e);var s=o.x1,i=o.y1,n=o.x2,l=o.y2,r=o.x3,h=o.y3,f=n-s,v=l-i,d=r-s,p=h-i,g=f*(s+n)+v*(i+l),m=d*(s+r)+p*(i+h),x=2*(f*(h-l)-v*(r-n)),y,T;if(Math.abs(x)<1e-6){var E=Math.min(s,n,r),C=Math.min(i,l,h);y=(Math.max(s,n,r)-E)*.5,T=(Math.max(i,l,h)-C)*.5,a.x=E+y,a.y=C+T,a.radius=Math.sqrt(y*y+T*T)}else a.x=(p*g-v*m)/x,a.y=(f*m-d*g)/x,y=a.x-s,T=a.y-i,a.radius=Math.sqrt(y*y+T*T);return a};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(82),u=function(o){return new e(o.x1,o.y1,o.x2,o.y2,o.x3,o.y3)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(115),u=function(o,a){return e(o,a.x,a.y)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u.setTo(e.x1,e.y1,e.x2,e.y2,e.x3,e.y3)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.x1===u.x1&&e.y1===u.y1&&e.x2===u.x2&&e.y2===u.y2&&e.x3===u.x3&&e.y3===u.y3};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(67),u=function(o){var a=o.getLineA(),s=o.getLineB(),i=o.getLineC();return e(a)+e(s)+e(i)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(238),u=t(506),o=function(a,s){var i=u(a);return e(a,i.x,i.y,s)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(238),u=function(o,a,s){return e(o,a.x,a.y,s)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(203),u=t(17),o={CreatePixelPerfectHandler:t(507),CreateInteractiveObject:t(508),Events:t(51),Gamepad:t(1309),InputManager:t(409),InputPlugin:t(1321),InputPluginCache:t(153),Keyboard:t(1322),Mouse:t(1336),Pointer:t(412),Touch:t(1337)};o=u(!1,o,e),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Axis:t(509),Button:t(510),Events:t(239),Gamepad:t(511),GamepadPlugin:t(1316),Configs:t(1317)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="down"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="up"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="connected"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="disconnected"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="down"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="up"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(9),o=t(239),a=t(511),s=t(6),i=t(153),n=t(51),l=new e({Extends:u,initialize:function(h){u.call(this),this.scene=h.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=h,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,h.pluginEvents.once(n.BOOT,this.boot,this),h.pluginEvents.on(n.START,this.start,this)},boot:function(){var r=this.scene.sys.game,h=this.settings.input,f=r.config;this.enabled=s(h,"gamepad",f.inputGamepad)&&r.device.input.gamepads,this.target=s(h,"gamepad.target",f.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(n.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(n.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var r=this,h=this.target,f=function(v){v.defaultPrevented||!r.isActive()||(r.refreshPads(),r.queue.push(v))};this.onGamepadHandler=f,h.addEventListener("gamepadconnected",f,!1),h.addEventListener("gamepaddisconnected",f,!1),this.sceneInputPlugin.pluginEvents.on(n.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(n.UPDATE,this.update);for(var r=0;r<this.gamepads.length;r++)this.gamepads[r].removeAllListeners()},disconnectAll:function(){for(var r=0;r<this.gamepads.length;r++)this.gamepads[r].pad.connected=!1},refreshPads:function(){var r=navigator.getGamepads();if(!r)this.disconnectAll();else for(var h=this.gamepads,f=0;f<r.length;f++){var v=r[f];if(!!v){var d=v.id,p=v.index,g=h[p];if(g)g.id!==d?(g.destroy(),h[p]=new a(this,v)):g.update(v);else{var m=new a(this,v);h[p]=m,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=m):this._pad3=m:this._pad2=m:this._pad1=m}}}},getAll:function(){for(var r=[],h=this.gamepads,f=0;f<h.length;f++)h[f]&&r.push(h[f]);return r},getPad:function(r){for(var h=this.gamepads,f=0;f<h.length;f++)if(h[f]&&h[f].index===r)return h[f]},update:function(){if(!!this.enabled){this.refreshPads();var r=this.queue.length;if(r!==0)for(var h=this.queue.splice(0,r),f=0;f<r;f++){var v=h[f],d=this.getPad(v.gamepad.index);v.type==="gamepadconnected"?this.emit(o.CONNECTED,d,v):v.type==="gamepaddisconnected"&&this.emit(o.DISCONNECTED,d,v)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var r=0;r<this.gamepads.length;r++)this.gamepads[r]&&this.gamepads[r].destroy();this.gamepads=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.target=null},total:{get:function(){return this.gamepads.length}},pad1:{get:function(){return this._pad1}},pad2:{get:function(){return this._pad2}},pad3:{get:function(){return this._pad3}},pad4:{get:function(){return this._pad4}}});i.register("GamepadPlugin",l,"gamepad","gamepad","inputGamepad"),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={DUALSHOCK_4:t(1318),SNES_USB:t(1319),XBOX_360:t(1320)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(65),u=t(66),o=t(0),a=t(203),s=t(508),i=t(507),n=t(50),l=t(111),r=t(112),h=t(51),f=t(9),v=t(2),d=t(56),p=t(153),g=t(7),m=t(24),x=t(10),y=t(57),T=t(20),E=t(82),C=t(115),A=new o({Extends:f,initialize:function(M){f.call(this),this.scene=M,this.systems=M.sys,this.settings=M.sys.settings,this.manager=M.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,p.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var O={cancelled:!1};this._eventContainer={stopPropagation:function(){O.cancelled=!0}},this._eventData=O,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,M.sys.events.once(T.BOOT,this.boot,this),M.sys.events.on(T.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(T.DESTROY,this.destroy,this),this.pluginEvents.emit(h.BOOT)},start:function(){var P=this.systems.events;P.on(T.TRANSITION_START,this.transitionIn,this),P.on(T.TRANSITION_OUT,this.transitionOut,this),P.on(T.TRANSITION_COMPLETE,this.transitionComplete,this),P.on(T.PRE_UPDATE,this.preUpdate,this),P.once(T.SHUTDOWN,this.shutdown,this),this.manager.events.on(h.GAME_OUT,this.onGameOut,this),this.manager.events.on(h.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(h.START)},onGameOver:function(P){this.isActive()&&this.emit(h.GAME_OVER,P.timeStamp,P)},onGameOut:function(P){this.isActive()&&this.emit(h.GAME_OUT,P.timeStamp,P)},preUpdate:function(){this.pluginEvents.emit(h.PRE_UPDATE);var P=this._pendingRemoval,M=this._pendingInsertion,O=P.length,I=M.length;if(!(O===0&&I===0)){for(var N=this._list,Y=0;Y<O;Y++){var X=P[Y],W=N.indexOf(X);W>-1&&(N.splice(W,1),this.clear(X,!0))}P.length=0,this._pendingRemoval.length=0,this._list=N.concat(M.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(P,M){if(!this.isActive())return!1;if(this.pluginEvents.emit(h.UPDATE,P,M),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var O,I=this.manager,N=I.pointers,Y=I.pointersTotal;for(O=0;O<Y;O++)N[O].updateMotion();if(this._list.length===0)return!1;var X=this.pollRate;if(X===-1)return!1;if(X>0)if(this._pollTimer-=M,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var W=!1;for(O=0;O<Y;O++){var H=0,D=N[O];this._tempZones=[],this._temp=this.hitTestPointer(D),this.sortGameObjects(this._temp,D),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),H+=this.processOverOutEvents(D),this.getDragState(D)===2&&this.processDragThresholdEvent(D,P),H>0&&(W=!0)}return W},update:function(P,M){if(!this.isActive())return!1;for(var O=M.length,I=!1,N=0;N<O;N++){var Y=0,X=M[N];switch(this._tempZones=[],this._temp=this.hitTestPointer(X),this.sortGameObjects(this._temp,X),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),P){case a.MOUSE_DOWN:Y+=this.processDragDownEvent(X),Y+=this.processDownEvents(X),Y+=this.processOverOutEvents(X);break;case a.MOUSE_UP:Y+=this.processDragUpEvent(X),Y+=this.processUpEvents(X),Y+=this.processOverOutEvents(X);break;case a.TOUCH_START:Y+=this.processDragDownEvent(X),Y+=this.processDownEvents(X),Y+=this.processOverEvents(X);break;case a.TOUCH_END:case a.TOUCH_CANCEL:Y+=this.processDragUpEvent(X),Y+=this.processUpEvents(X),Y+=this.processOutEvents(X);break;case a.MOUSE_MOVE:case a.TOUCH_MOVE:Y+=this.processDragMoveEvent(X),Y+=this.processMoveEvents(X),Y+=this.processOverOutEvents(X);break;case a.MOUSE_WHEEL:Y+=this.processWheelEvent(X);break}Y>0&&(I=!0)}return this._updatedThisFrame=!0,I},clear:function(P,M){M===void 0&&(M=!1);var O=P.input;if(!!O){M||this.queueForRemoval(P),O.gameObject=void 0,O.target=void 0,O.hitArea=void 0,O.hitAreaCallback=void 0,O.callbackContext=void 0,P.input=null;var I=this._draggable.indexOf(P);return I>-1&&this._draggable.splice(I,1),I=this._drag[0].indexOf(P),I>-1&&this._drag[0].splice(I,1),I=this._over[0].indexOf(P),I>-1&&(this._over[0].splice(I,1),this.manager.resetCursor(O)),P}},disable:function(P){P.input.enabled=!1},enable:function(P,M,O,I){return I===void 0&&(I=!1),P.input?P.input.enabled=!0:this.setHitArea(P,M,O),P.input&&I&&!P.input.dropZone&&(P.input.dropZone=I),this},hitTestPointer:function(P){for(var M=this.cameras.getCamerasBelowPointer(P),O=0;O<M.length;O++){for(var I=M[O],N=this.manager.hitTest(P,this._list,I),Y=0;Y<N.length;Y++){var X=N[Y];X.input.dropZone&&this._tempZones.push(X)}if(N.length>0)return P.camera=I,N}return P.camera=M[0],[]},processDownEvents:function(P){var M=0,O=this._temp,I=this._eventData,N=this._eventContainer;I.cancelled=!1;for(var Y=!1,X=0;X<O.length;X++){var W=O[X];if(!!W.input){if(M++,W.emit(h.GAMEOBJECT_POINTER_DOWN,P,W.input.localX,W.input.localY,N),I.cancelled||!W.input){Y=!0;break}if(this.emit(h.GAMEOBJECT_DOWN,P,W,N),I.cancelled||!W.input){Y=!0;break}}}return!Y&&this.manager&&(P.downElement===this.manager.game.canvas?this.emit(h.POINTER_DOWN,P,O):this.emit(h.POINTER_DOWN_OUTSIDE,P)),M},getDragState:function(P){return this._dragState[P.id]},setDragState:function(P,M){this._dragState[P.id]=M},processDragThresholdEvent:function(P,M){var O=!1,I=this.dragTimeThreshold,N=this.dragDistanceThreshold;if((N>0&&n(P.x,P.y,P.downX,P.downY)>=N||I>0&&M>=P.downTime+I)&&(O=!0),O)return this.setDragState(P,3),this.processDragStartList(P)},processDragStartList:function(P){if(this.getDragState(P)!==3)return 0;for(var M=this._drag[P.id],O=0;O<M.length;O++){var I=M[O],N=I.input;N.dragState=2,N.dragStartX=I.x,N.dragStartY=I.y,N.dragStartXGlobal=P.worldX,N.dragStartYGlobal=P.worldY,N.dragX=N.dragStartXGlobal-N.dragStartX,N.dragY=N.dragStartYGlobal-N.dragStartY,I.emit(h.GAMEOBJECT_DRAG_START,P,N.dragX,N.dragY),this.emit(h.DRAG_START,P,I)}return this.setDragState(P,4),M.length},processDragDownEvent:function(P){var M=this._temp;if(this._draggable.length===0||M.length===0||!P.primaryDown||this.getDragState(P)!==0)return 0;this.setDragState(P,1);for(var O=[],I=0;I<M.length;I++){var N=M[I];N.input.draggable&&N.input.dragState===0&&O.push(N)}return O.length===0?(this.setDragState(P,0),0):(O.length>1&&(this.sortGameObjects(O,P),this.topOnly&&O.splice(1)),this._drag[P.id]=O,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(P,3),this.processDragStartList(P)):(this.setDragState(P,2),0))},processDragMoveEvent:function(P){if(this.getDragState(P)===2&&this.processDragThresholdEvent(P,this.manager.game.loop.now),this.getDragState(P)!==4)return 0;for(var M=this._tempZones,O=this._drag[P.id],I=0;I<O.length;I++){var N=O[I],Y=N.input,X=Y.target;if(X){var W=M.indexOf(X);W===0?(N.emit(h.GAMEOBJECT_DRAG_OVER,P,X),this.emit(h.DRAG_OVER,P,N,X)):W>0?(N.emit(h.GAMEOBJECT_DRAG_LEAVE,P,X),this.emit(h.DRAG_LEAVE,P,N,X),Y.target=M[0],X=Y.target,N.emit(h.GAMEOBJECT_DRAG_ENTER,P,X),this.emit(h.DRAG_ENTER,P,N,X)):(N.emit(h.GAMEOBJECT_DRAG_LEAVE,P,X),this.emit(h.DRAG_LEAVE,P,N,X),M[0]?(Y.target=M[0],X=Y.target,N.emit(h.GAMEOBJECT_DRAG_ENTER,P,X),this.emit(h.DRAG_ENTER,P,N,X)):Y.target=null)}else!X&&M[0]&&(Y.target=M[0],X=Y.target,N.emit(h.GAMEOBJECT_DRAG_ENTER,P,X),this.emit(h.DRAG_ENTER,P,N,X));var H,D;if(!N.parentContainer)H=P.worldX-Y.dragX,D=P.worldY-Y.dragY;else{var L=P.worldX-Y.dragStartXGlobal,B=P.worldY-Y.dragStartYGlobal,G=N.getParentRotation(),w=L*Math.cos(G)+B*Math.sin(G),z=B*Math.cos(G)-L*Math.sin(G);w*=1/N.parentContainer.scaleX,z*=1/N.parentContainer.scaleY,H=w+Y.dragStartX,D=z+Y.dragStartY}N.emit(h.GAMEOBJECT_DRAG,P,H,D),this.emit(h.DRAG,P,N,H,D)}return O.length},processDragUpEvent:function(P){for(var M=this._drag[P.id],O=0;O<M.length;O++){var I=M[O],N=I.input;if(N&&N.dragState===2){N.dragState=0,N.dragX=N.localX-I.displayOriginX,N.dragY=N.localY-I.displayOriginY;var Y=!1,X=N.target;X&&(I.emit(h.GAMEOBJECT_DROP,P,X),this.emit(h.DROP,P,I,X),N.target=null,Y=!0),I.input&&(I.emit(h.GAMEOBJECT_DRAG_END,P,N.dragX,N.dragY,Y),this.emit(h.DRAG_END,P,I,Y))}}return this.setDragState(P,0),M.splice(0),0},processMoveEvents:function(P){var M=0,O=this._temp,I=this._eventData,N=this._eventContainer;I.cancelled=!1;for(var Y=!1,X=0;X<O.length;X++){var W=O[X];if(!!W.input){if(M++,W.emit(h.GAMEOBJECT_POINTER_MOVE,P,W.input.localX,W.input.localY,N),I.cancelled||!W.input){Y=!0;break}if(this.emit(h.GAMEOBJECT_MOVE,P,W,N),I.cancelled||!W.input){Y=!0;break}if(this.topOnly)break}}return Y||this.emit(h.POINTER_MOVE,P,O),M},processWheelEvent:function(P){var M=0,O=this._temp,I=this._eventData,N=this._eventContainer;I.cancelled=!1;for(var Y=!1,X=P.deltaX,W=P.deltaY,H=P.deltaZ,D=0;D<O.length;D++){var L=O[D];if(!!L.input){if(M++,L.emit(h.GAMEOBJECT_POINTER_WHEEL,P,X,W,H,N),I.cancelled||!L.input){Y=!0;break}if(this.emit(h.GAMEOBJECT_WHEEL,P,L,X,W,H,N),I.cancelled||!L.input){Y=!0;break}}}return Y||this.emit(h.POINTER_WHEEL,P,O,X,W,H),M},processOverEvents:function(P){var M=this._temp,O=0,I=M.length,N=[];if(I>0){var Y=this.manager,X=this._eventData,W=this._eventContainer;X.cancelled=!1;for(var H=!1,D=0;D<I;D++){var L=M[D];if(!!L.input){if(N.push(L),Y.setCursor(L.input),L.emit(h.GAMEOBJECT_POINTER_OVER,P,L.input.localX,L.input.localY,W),O++,X.cancelled||!L.input){H=!0;break}if(this.emit(h.GAMEOBJECT_OVER,P,L,W),X.cancelled||!L.input){H=!0;break}}}H||this.emit(h.POINTER_OVER,P,N)}return this._over[P.id]=N,O},processOutEvents:function(P){var M=this._over[P.id],O=0,I=M.length;if(I>0){var N=this.manager,Y=this._eventData,X=this._eventContainer;Y.cancelled=!1;var W=!1;this.sortGameObjects(M,P);for(var H=0;H<I;H++){var D=M[H];if(D=M[H],!!D.input){if(N.resetCursor(D.input),D.emit(h.GAMEOBJECT_POINTER_OUT,P,X),O++,Y.cancelled||!D.input){W=!0;break}if(this.emit(h.GAMEOBJECT_OUT,P,D,X),Y.cancelled||!D.input){W=!0;break}W||this.emit(h.POINTER_OUT,P,M)}}this._over[P.id]=[]}return O},processOverOutEvents:function(P){var M=this._temp,O,I,N=[],Y=[],X=[],W=this._over[P.id],H=this._drag[P.id],D=this.manager;for(O=0;O<W.length;O++)I=W[O],M.indexOf(I)===-1&&H.indexOf(I)===-1?N.push(I):X.push(I);for(O=0;O<M.length;O++)I=M[O],W.indexOf(I)===-1&&Y.push(I);var L=N.length,B=0,G=this._eventData,w=this._eventContainer;G.cancelled=!1;var z=!1;if(L>0){for(this.sortGameObjects(N,P),O=0;O<L;O++)if(I=N[O],!!I.input){if(D.resetCursor(I.input),I.emit(h.GAMEOBJECT_POINTER_OUT,P,w),B++,G.cancelled||!I.input){z=!0;break}if(this.emit(h.GAMEOBJECT_OUT,P,I,w),G.cancelled||!I.input){z=!0;break}}z||this.emit(h.POINTER_OUT,P,N)}if(L=Y.length,G.cancelled=!1,z=!1,L>0){for(this.sortGameObjects(Y,P),O=0;O<L;O++)if(I=Y[O],!!I.input){if(D.setCursor(I.input),I.emit(h.GAMEOBJECT_POINTER_OVER,P,I.input.localX,I.input.localY,w),B++,G.cancelled||!I.input){z=!0;break}if(this.emit(h.GAMEOBJECT_OVER,P,I,w),G.cancelled||!I.input){z=!0;break}}z||this.emit(h.POINTER_OVER,P,Y)}return W=X.concat(Y),this._over[P.id]=this.sortGameObjects(W,P),B},processUpEvents:function(P){var M=this._temp,O=this._eventData,I=this._eventContainer;O.cancelled=!1;for(var N=!1,Y=0;Y<M.length;Y++){var X=M[Y];if(!!X.input){if(X.emit(h.GAMEOBJECT_POINTER_UP,P,X.input.localX,X.input.localY,I),O.cancelled||!X.input){N=!0;break}if(this.emit(h.GAMEOBJECT_UP,P,X,I),O.cancelled||!X.input){N=!0;break}}}return!N&&this.manager&&(P.upElement===this.manager.game.canvas?this.emit(h.POINTER_UP,P,M):this.emit(h.POINTER_UP_OUTSIDE,P)),M.length},queueForInsertion:function(P){return this._pendingInsertion.indexOf(P)===-1&&this._list.indexOf(P)===-1&&this._pendingInsertion.push(P),this},queueForRemoval:function(P){return this._pendingRemoval.push(P),this},setDraggable:function(P,M){M===void 0&&(M=!0),Array.isArray(P)||(P=[P]);for(var O=0;O<P.length;O++){var I=P[O];I.input.draggable=M;var N=this._draggable.indexOf(I);M&&N===-1?this._draggable.push(I):!M&&N>-1&&this._draggable.splice(N,1)}return this},makePixelPerfect:function(P){P===void 0&&(P=1);var M=this.systems.textures;return i(M,P)},setHitArea:function(P,M,O){if(M===void 0)return this.setHitAreaFromTexture(P);Array.isArray(P)||(P=[P]);var I=!1,N=!1,Y=!1,X=!1,W=!1,H=!0;if(g(M)){var D=M;M=v(D,"hitArea",null),O=v(D,"hitAreaCallback",null),I=v(D,"draggable",!1),N=v(D,"dropZone",!1),Y=v(D,"cursor",!1),X=v(D,"useHandCursor",!1),W=v(D,"pixelPerfect",!1);var L=v(D,"alphaTolerance",1);W&&(M={},O=this.makePixelPerfect(L)),(!M||!O)&&(this.setHitAreaFromTexture(P),H=!1)}else typeof M=="function"&&!O&&(O=M,M={});for(var B=0;B<P.length;B++){var G=P[B];if(W&&G.type==="Container"){console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");continue}var w=G.input?G.input:s(G,M,O);w.customHitArea=H,w.dropZone=N,w.cursor=X?"pointer":Y,G.input=w,I&&this.setDraggable(G),this.queueForInsertion(G)}return this},setHitAreaCircle:function(P,M,O,I,N){N===void 0&&(N=u);var Y=new e(M,O,I);return this.setHitArea(P,Y,N)},setHitAreaEllipse:function(P,M,O,I,N,Y){Y===void 0&&(Y=r);var X=new l(M,O,I,N);return this.setHitArea(P,X,Y)},setHitAreaFromTexture:function(P,M){M===void 0&&(M=y),Array.isArray(P)||(P=[P]);for(var O=0;O<P.length;O++){var I=P[O],N=I.frame,Y=0,X=0;if(I.width?(Y=I.width,X=I.height):N&&(Y=N.realWidth,X=N.realHeight),I.type==="Container"&&(Y===0||X===0)){console.warn("Container.setInteractive must specify a Shape or call setSize() first");continue}Y!==0&&X!==0&&(I.input=s(I,new x(0,0,Y,X),M),this.queueForInsertion(I))}return this},setHitAreaRectangle:function(P,M,O,I,N,Y){Y===void 0&&(Y=y);var X=new x(M,O,I,N);return this.setHitArea(P,X,Y)},setHitAreaTriangle:function(P,M,O,I,N,Y,X,W){W===void 0&&(W=C);var H=new E(M,O,I,N,Y,X);return this.setHitArea(P,H,W)},enableDebug:function(P,M){M===void 0&&(M=65280);var O=P.input;if(!O||!O.hitArea)return this;var I=O.hitArea,N=I.type,Y=O.hitAreaDebug,X=this.systems.add,W=this.systems.updateList;Y&&(W.remove(Y),Y.destroy(),Y=null);var H=0,D=0;switch(N){case d.CIRCLE:Y=X.arc(0,0,I.radius),H=I.x-I.radius,D=I.y-I.radius;break;case d.ELLIPSE:Y=X.ellipse(0,0,I.width,I.height),H=I.x-I.width/2,D=I.y-I.height/2;break;case d.LINE:Y=X.line(0,0,I.x1,I.y1,I.x2,I.y2);break;case d.POLYGON:Y=X.polygon(0,0,I.points);break;case d.RECTANGLE:Y=X.rectangle(0,0,I.width,I.height),H=I.x,D=I.y;break;case d.TRIANGLE:Y=X.triangle(0,0,I.x1,I.y1,I.x2,I.y2,I.x3,I.y3);break}return Y&&(Y.isFilled=!1,Y.preUpdate=function(){Y.setStrokeStyle(1/P.scale,M),Y.setDisplayOrigin(P.displayOriginX,P.displayOriginY);var L=P.x,B=P.y,G=P.rotation,w=P.scaleX,z=P.scaleY;if(P.parentContainer){var U=P.getWorldTransformMatrix();L=U.tx,B=U.ty,G=U.rotation,w=U.scaleX,z=U.scaleY}Y.setRotation(G),Y.setScale(w,z),Y.setPosition(L+H,B+D),Y.setScrollFactor(P.scrollFactorX,P.scrollFactorY),Y.setDepth(P.depth)},W.add(Y),O.hitAreaDebug=Y),this},removeDebug:function(P){var M=P.input;if(M&&M.hitAreaDebug){var O=M.hitAreaDebug;this.systems.updateList.remove(O),O.destroy(),M.hitAreaDebug=null}return this},setPollAlways:function(){return this.setPollRate(0)},setPollOnMove:function(){return this.setPollRate(-1)},setPollRate:function(P){return this.pollRate=P,this._pollTimer=0,this},setGlobalTopOnly:function(P){return this.manager.globalTopOnly=P,this},setTopOnly:function(P){return this.topOnly=P,this},sortGameObjects:function(P,M){if(P.length<2)return P;var O=M.camera.renderList;return P.sort(function(I,N){return O.indexOf(N)-O.indexOf(I)})},sortDropZones:function(P){return P.length<2?P:(this.scene.sys.depthSort(),P.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(P,M){if(!P.parentContainer&&!M.parentContainer)return this.displayList.getIndex(M)-this.displayList.getIndex(P);if(P.parentContainer===M.parentContainer)return M.parentContainer.getIndex(M)-P.parentContainer.getIndex(P);if(P.parentContainer===M)return-1;if(M.parentContainer===P)return 1;for(var O=P.getIndexList(),I=M.getIndexList(),N=Math.min(O.length,I.length),Y=0;Y<N;Y++){var X=O[Y],W=I[Y];if(X!==W)return W-X}return I.length-O.length},stopPropagation:function(){return this.manager._tempSkip=!0,this},addPointer:function(P){return this.manager.addPointer(P)},setDefaultCursor:function(P){return this.manager.setDefaultCursor(P),this},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this.pluginEvents.emit(h.SHUTDOWN),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0,this._dragState.length=0;for(var P=0;P<10;P++)this._drag[P]=[],this._over[P]=[];this.removeAllListeners();var M=this.manager;M.canvas.style.cursor=M.defaultCursor;var O=this.systems.events;O.off(T.TRANSITION_START,this.transitionIn,this),O.off(T.TRANSITION_OUT,this.transitionOut,this),O.off(T.TRANSITION_COMPLETE,this.transitionComplete,this),O.off(T.PRE_UPDATE,this.preUpdate,this),M.events.off(h.GAME_OUT,this.onGameOut,this),M.events.off(h.GAME_OVER,this.onGameOver,this),O.off(T.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.pluginEvents.emit(h.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(T.START,this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.mouse=null},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}},isOver:{get:function(){return this.manager.isOver}},mousePointer:{get:function(){return this.manager.mousePointer}},activePointer:{get:function(){return this.manager.activePointer}},pointer1:{get:function(){return this.manager.pointers[1]}},pointer2:{get:function(){return this.manager.pointers[2]}},pointer3:{get:function(){return this.manager.pointers[3]}},pointer4:{get:function(){return this.manager.pointers[4]}},pointer5:{get:function(){return this.manager.pointers[5]}},pointer6:{get:function(){return this.manager.pointers[6]}},pointer7:{get:function(){return this.manager.pointers[7]}},pointer8:{get:function(){return this.manager.pointers[8]}},pointer9:{get:function(){return this.manager.pointers[9]}},pointer10:{get:function(){return this.manager.pointers[10]}}});m.register("InputPlugin",A,"input"),c.exports=A},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Events:t(154),KeyboardManager:t(410),KeyboardPlugin:t(1330),Key:t(512),KeyCodes:t(143),KeyCombo:t(513),AdvanceKeyCombo:t(515),ProcessKeyCombo:t(514),ResetKeyCombo:t(516),JustDown:t(1332),JustUp:t(1333),DownDuration:t(1334),UpDuration:t(1335)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="keydown"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="keyup"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="keycombomatch"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="down"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="keydown-"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="keyup-"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="up"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(9),o=t(154),a=t(22),s=t(6),i=t(51),n=t(153),l=t(512),r=t(143),h=t(513),f=t(1331),v=t(20),d=t(76),p=new e({Extends:u,initialize:function(m){u.call(this),this.game=m.systems.game,this.scene=m.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=m,this.manager=m.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,m.pluginEvents.once(i.BOOT,this.boot,this),m.pluginEvents.on(i.START,this.start,this)},boot:function(){var g=this.settings.input;this.enabled=s(g,"keyboard",!0);var m=s(g,"keyboard.capture",null);m&&this.addCaptures(m),this.sceneInputPlugin.pluginEvents.once(i.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(i.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(i.SHUTDOWN,this.shutdown,this),this.game.events.on(a.BLUR,this.resetKeys,this),this.scene.sys.events.on(v.PAUSE,this.resetKeys,this),this.scene.sys.events.on(v.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(g){return this.manager.addCapture(g),this},removeCapture:function(g){return this.manager.removeCapture(g),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:r.UP,down:r.DOWN,left:r.LEFT,right:r.RIGHT,space:r.SPACE,shift:r.SHIFT})},addKeys:function(g,m,x){m===void 0&&(m=!0),x===void 0&&(x=!1);var y={};if(typeof g=="string"){g=g.split(",");for(var T=0;T<g.length;T++){var E=g[T].trim();E&&(y[E]=this.addKey(E,m,x))}}else for(var C in g)y[C]=this.addKey(g[C],m,x);return y},addKey:function(g,m,x){m===void 0&&(m=!0),x===void 0&&(x=!1);var y=this.keys;if(g instanceof l){var T=y.indexOf(g);return T>-1?y[T]=g:y[g.keyCode]=g,m&&this.addCapture(g.keyCode),g.setEmitOnRepeat(x),g}return typeof g=="string"&&(g=r[g.toUpperCase()]),y[g]||(y[g]=new l(this,g),m&&this.addCapture(g),y[g].setEmitOnRepeat(x)),y[g]},removeKey:function(g,m){m===void 0&&(m=!1);var x=this.keys,y;if(g instanceof l){var T=x.indexOf(g);T>-1&&(y=this.keys[T],this.keys[T]=void 0)}else typeof g=="string"&&(g=r[g.toUpperCase()]);return x[g]&&(y=x[g],x[g]=void 0),y&&(y.plugin=null,m&&y.destroy()),this},removeAllKeys:function(g){for(var m=this.keys,x=0;x<m.length;x++){var y=m[x];y&&(m[x]=void 0,g&&y.destroy())}return this},createCombo:function(g,m){return new h(this,g,m)},checkDown:function(g,m){if(m===void 0&&(m=0),this.enabled&&g.isDown){var x=d(this.time-g.timeDown,m);if(x>g._tick)return g._tick=x,!0}return!1},update:function(){var g=this.manager.queue,m=g.length;if(!(!this.isActive()||m===0))for(var x=this.keys,y=0;y<m;y++){var T=g[y],E=T.keyCode,C=x[E],A=!1;T.cancelled===void 0&&(T.cancelled=0,T.stopImmediatePropagation=function(){T.cancelled=1},T.stopPropagation=function(){T.cancelled=-1}),T.cancelled!==-1&&(E===this.prevCode&&T.timeStamp===this.prevTime&&T.type===this.prevType||(this.prevCode=E,this.prevTime=T.timeStamp,this.prevType=T.type,T.type==="keydown"?(C&&(A=C.isDown,C.onDown(T)),!T.cancelled&&(!C||!A)&&(f[E]&&this.emit(o.KEY_DOWN+f[E],T),T.cancelled||this.emit(o.ANY_KEY_DOWN,T))):(C&&C.onUp(T),T.cancelled||(f[E]&&this.emit(o.KEY_UP+f[E],T),T.cancelled||this.emit(o.ANY_KEY_UP,T))),T.cancelled===1&&(T.cancelled=0)))}},resetKeys:function(){for(var g=this.keys,m=0;m<g.length;m++)g[m]&&g[m].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(i.MANAGER_PROCESS,this.update,this),this.game.events.off(a.BLUR,this.resetKeys),this.scene.sys.events.off(v.PAUSE,this.resetKeys,this),this.scene.sys.events.off(v.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var g=this.keys,m=0;m<g.length;m++)g[m]&&g[m].destroy();this.keys=[],this.combos=[],this.queue=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.manager=null},time:{get:function(){return this.sceneInputPlugin.manager.time}}});n.register("KeyboardPlugin",p,"keyboard","keyboard","inputKeyboard"),c.exports=p},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(143),u={};for(var o in e)u[e[o]]=o;c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e._justDown?(e._justDown=!1,!0):!1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e._justUp?(e._justUp=!1,!0):!1};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u===void 0&&(u=50);var o=e.plugin.game.loop.time-e.timeDown;return e.isDown&&o<u};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){u===void 0&&(u=50);var o=e.plugin.game.loop.time-e.timeUp;return e.isUp&&o<u};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={MouseManager:t(411)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={TouchManager:t(413)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(21),u=t(17),o={Events:t(95),FileTypes:t(1339),File:t(23),FileTypesManager:t(8),GetURL:t(155),LoaderPlugin:t(1365),MergeXHRSettings:t(240),MultiFile:t(49),XHRLoader:t(517),XHRSettings:t(156)};o=u(!1,o,e),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={AnimationJSONFile:t(1340),AsepriteFile:t(1341),AtlasJSONFile:t(1342),AtlasXMLFile:t(1343),AudioFile:t(518),AudioSpriteFile:t(1344),BinaryFile:t(1345),BitmapFontFile:t(1346),CSSFile:t(1347),GLSLFile:t(1348),HTML5AudioFile:t(519),HTMLFile:t(1349),HTMLTextureFile:t(1350),ImageFile:t(71),JSONFile:t(61),MultiAtlasFile:t(1351),MultiScriptFile:t(1352),OBJFile:t(1353),PackFile:t(1354),PluginFile:t(1355),SceneFile:t(1356),ScenePluginFile:t(1357),ScriptFile:t(520),SpriteSheetFile:t(1358),SVGFile:t(1359),TextFile:t(242),TilemapCSVFile:t(1360),TilemapImpactFile:t(1361),TilemapJSONFile:t(1362),UnityAtlasFile:t(1363),VideoFile:t(1364),XMLFile:t(241)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(61),a=t(95),s=new e({Extends:o,initialize:function(n,l,r,h,f){o.call(this,n,l,r,h,f),this.type="animationJSON"},onProcess:function(){this.loader.once(a.POST_PROCESS,this.onLoadComplete,this),o.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});u.register("animation",function(i,n,l,r){if(Array.isArray(i))for(var h=0;h<i.length;h++)this.addFile(new s(this,i[h]));else this.addFile(new s(this,i,n,r,l));return this}),c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(2),a=t(71),s=t(7),i=t(61),n=t(49),l=new e({Extends:n,initialize:function(h,f,v,d,p,g){var m,x;if(s(f)){var y=f;f=o(y,"key"),m=new a(h,{key:f,url:o(y,"textureURL"),extension:o(y,"textureExtension","png"),normalMap:o(y,"normalMap"),xhrSettings:o(y,"textureXhrSettings")}),x=new i(h,{key:f,url:o(y,"atlasURL"),extension:o(y,"atlasExtension","json"),xhrSettings:o(y,"atlasXhrSettings")})}else m=new a(h,f,v,p),x=new i(h,f,d,g);m.linkFile?n.call(this,h,"atlasjson",f,[m,x,m.linkFile]):n.call(this,h,"atlasjson",f,[m,x])},addToCache:function(){if(this.isReadyToProcess()){var r=this.files[0],h=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(r.key,r.data,h.data,f),h.addToCache(),this.complete=!0}}});u.register("aseprite",function(r,h,f,v,d){var p;if(Array.isArray(r))for(var g=0;g<r.length;g++)p=new l(this,r[g]),this.addFile(p.files);else p=new l(this,r,h,f,v,d),this.addFile(p.files);return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(2),a=t(71),s=t(7),i=t(61),n=t(49),l=new e({Extends:n,initialize:function(h,f,v,d,p,g){var m,x;if(s(f)){var y=f;f=o(y,"key"),m=new a(h,{key:f,url:o(y,"textureURL"),extension:o(y,"textureExtension","png"),normalMap:o(y,"normalMap"),xhrSettings:o(y,"textureXhrSettings")}),x=new i(h,{key:f,url:o(y,"atlasURL"),extension:o(y,"atlasExtension","json"),xhrSettings:o(y,"atlasXhrSettings")})}else m=new a(h,f,v,p),x=new i(h,f,d,g);m.linkFile?n.call(this,h,"atlasjson",f,[m,x,m.linkFile]):n.call(this,h,"atlasjson",f,[m,x])},addToCache:function(){if(this.isReadyToProcess()){var r=this.files[0],h=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(r.key,r.data,h.data,f),h.pendingDestroy(),this.complete=!0}}});u.register("atlas",function(r,h,f,v,d){var p;if(Array.isArray(r))for(var g=0;g<r.length;g++)p=new l(this,r[g]),this.addFile(p.files);else p=new l(this,r,h,f,v,d),this.addFile(p.files);return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(2),a=t(71),s=t(7),i=t(49),n=t(241),l=new e({Extends:i,initialize:function(h,f,v,d,p,g){var m,x;if(s(f)){var y=f;f=o(y,"key"),m=new a(h,{key:f,url:o(y,"textureURL"),extension:o(y,"textureExtension","png"),normalMap:o(y,"normalMap"),xhrSettings:o(y,"textureXhrSettings")}),x=new n(h,{key:f,url:o(y,"atlasURL"),extension:o(y,"atlasExtension","xml"),xhrSettings:o(y,"atlasXhrSettings")})}else m=new a(h,f,v,p),x=new n(h,f,d,g);m.linkFile?i.call(this,h,"atlasxml",f,[m,x,m.linkFile]):i.call(this,h,"atlasxml",f,[m,x])},addToCache:function(){if(this.isReadyToProcess()){var r=this.files[0],h=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(r.key,r.data,h.data,f),h.pendingDestroy(),this.complete=!0}}});u.register("atlasXML",function(r,h,f,v,d){var p;if(Array.isArray(r))for(var g=0;g<r.length;g++)p=new l(this,r[g]),this.addFile(p.files);else p=new l(this,r,h,f,v,d),this.addFile(p.files);return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(518),u=t(0),o=t(8),a=t(2),s=t(7),i=t(61),n=t(49),l=new u({Extends:n,initialize:function(h,f,v,d,p,g,m){if(s(f)){var x=f;f=a(x,"key"),v=a(x,"jsonURL"),d=a(x,"audioURL"),p=a(x,"audioConfig"),g=a(x,"audioXhrSettings"),m=a(x,"jsonXhrSettings")}var y;if(!d)y=new i(h,f,v,m),n.call(this,h,"audiosprite",f,[y]),this.config.resourceLoad=!0,this.config.audioConfig=p,this.config.audioXhrSettings=g;else{var T=e.create(h,f,d,p,g);T&&(y=new i(h,f,v,m),n.call(this,h,"audiosprite",f,[T,y]),this.config.resourceLoad=!1)}},onFileComplete:function(r){var h=this.files.indexOf(r);if(h!==-1&&(this.pending--,this.config.resourceLoad&&r.type==="json"&&r.data.hasOwnProperty("resources"))){var f=r.data.resources,v=a(this.config,"audioConfig"),d=a(this.config,"audioXhrSettings"),p=e.create(this.loader,r.key,f,v,d);p&&(this.addToMultiFile(p),this.loader.addFile(p))}},addToCache:function(){if(this.isReadyToProcess()){var r=this.files[0],h=this.files[1];r.addToCache(),h.addToCache(),this.complete=!0}}});o.register("audioSprite",function(r,h,f,v,d,p){var g=this.systems.game,m=g.config.audio,x=g.device.audio;if(m&&m.noAudio||!x.webAudio&&!x.audioData)return this;var y;if(Array.isArray(r))for(var T=0;T<r.length;T++)y=new l(this,r[T]),y.files&&this.addFile(y.files);else y=new l(this,r,h,f,v,d,p),y.files&&this.addFile(y.files);return this})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v,d){var p="bin";if(i(h)){var g=h;h=s(g,"key"),f=s(g,"url"),v=s(g,"xhrSettings"),p=s(g,"extension",p),d=s(g,"dataType",d)}var m={type:"binary",cache:r.cacheManager.binary,extension:p,responseType:"arraybuffer",key:h,url:f,xhrSettings:v,config:{dataType:d}};o.call(this,r,m)},onProcess:function(){this.state=u.FILE_PROCESSING;var l=this.config.dataType;this.data=l?new l(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});a.register("binary",function(l,r,h,f){if(Array.isArray(l))for(var v=0;v<l.length;v++)this.addFile(new n(this,l[v]));else this.addFile(new n(this,l,r,f,h));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(2),a=t(71),s=t(7),i=t(49),n=t(212),l=t(241),r=new e({Extends:i,initialize:function(f,v,d,p,g,m){var x,y;if(s(v)){var T=v;v=o(T,"key"),x=new a(f,{key:v,url:o(T,"textureURL"),extension:o(T,"textureExtension","png"),normalMap:o(T,"normalMap"),xhrSettings:o(T,"textureXhrSettings")}),y=new l(f,{key:v,url:o(T,"fontDataURL"),extension:o(T,"fontDataExtension","xml"),xhrSettings:o(T,"fontDataXhrSettings")})}else x=new a(f,v,d,g),y=new l(f,v,p,m);x.linkFile?i.call(this,f,"bitmapfont",v,[x,y,x.linkFile]):i.call(this,f,"bitmapfont",v,[x,y])},addToCache:function(){if(this.isReadyToProcess()){var h=this.files[0],f=this.files[1];h.addToCache(),f.pendingDestroy();var v=h.cache.get(h.key),d=n(f.data,h.cache.getFrame(h.key),0,0,v);this.loader.cacheManager.bitmapFont.add(h.key,{data:d,texture:h.key,frame:null}),this.complete=!0}}});u.register("bitmapFont",function(h,f,v,d,p){var g;if(Array.isArray(h))for(var m=0;m<h.length;m++)g=new r(this,h[m]),this.addFile(g.files);else g=new r(this,h,f,v,d,p),this.addFile(g.files);return this}),c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v){var d="css";if(i(h)){var p=h;h=s(p,"key"),f=s(p,"url"),v=s(p,"xhrSettings"),d=s(p,"extension",d)}var g={type:"script",cache:!1,extension:d,responseType:"text",key:h,url:f,xhrSettings:v};o.call(this,r,g)},onProcess:function(){this.state=u.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("css",function(l,r,h){if(Array.isArray(l))for(var f=0;f<l.length;f++)this.addFile(new n(this,l[f]));else this.addFile(new n(this,l,r,h));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=t(396),l=new e({Extends:o,initialize:function(h,f,v,d,p){var g="glsl";if(i(f)){var m=f;f=s(m,"key"),v=s(m,"url"),d=s(m,"shaderType","fragment"),p=s(m,"xhrSettings"),g=s(m,"extension",g)}else d===void 0&&(d="fragment");var x={type:"glsl",cache:h.cacheManager.shader,extension:g,responseType:"text",key:f,url:v,config:{shaderType:d},xhrSettings:p};o.call(this,h,x)},onProcess:function(){this.state=u.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var r=this.data.split(`
`),h=this.extractBlock(r,0);if(h)for(;h;){var f=this.getShaderName(h.header),v=this.getShaderType(h.header),d=this.getShaderUniforms(h.header),p=h.shader;if(this.cache.has(f)){var g=this.cache.get(f);v==="fragment"?g.fragmentSrc=p:g.vertexSrc=p,g.uniforms||(g.uniforms=d)}else v==="fragment"?this.cache.add(f,new n(f,p,"",d)):this.cache.add(f,new n(f,"",p,d));h=this.extractBlock(r,h.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new n(this.key,this.data)):this.cache.add(this.key,new n(this.key,"",this.data));this.pendingDestroy()},getShaderName:function(r){for(var h=0;h<r.length;h++){var f=r[h].trim();if(f.substring(0,5)==="name:")return f.substring(5).trim()}return this.key},getShaderType:function(r){for(var h=0;h<r.length;h++){var f=r[h].trim();if(f.substring(0,5)==="type:")return f.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(r){for(var h={},f=0;f<r.length;f++){var v=r[f].trim();if(v.substring(0,8)==="uniform."){var d=v.indexOf(":");if(d){var p=v.substring(8,d);try{h[p]=JSON.parse(v.substring(d+1))}catch{console.warn("Invalid uniform JSON: "+p)}}}}return h},extractBlock:function(r,h){for(var f=-1,v=-1,d=-1,p=!1,g=!1,m=[],x=[],y=h;y<r.length;y++){var T=r[y].trim();if(T==="---")if(f===-1)f=y,p=!0;else if(p)v=y,p=!1,g=!0;else{g=!1;break}else p?m.push(T):g&&(x.push(T),d=y)}return!p&&v!==-1?{header:m,shader:x.join(`
`),offset:d}:null}});a.register("glsl",function(r,h,f,v){if(Array.isArray(r))for(var d=0;d<r.length;d++)this.addFile(new l(this,r[d]));else this.addFile(new l(this,r,h,f,v));return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v){var d="html";if(i(h)){var p=h;h=s(p,"key"),f=s(p,"url"),v=s(p,"xhrSettings"),d=s(p,"extension",d)}var g={type:"text",cache:r.cacheManager.html,extension:d,responseType:"text",key:h,url:f,xhrSettings:v};o.call(this,r,g)},onProcess:function(){this.state=u.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("html",function(l,r,h){if(Array.isArray(l))for(var f=0;f<l.length;f++)this.addFile(new n(this,l[f]));else this.addFile(new n(this,l,r,h));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v,d,p){v===void 0&&(v=512),d===void 0&&(d=512);var g="html";if(i(h)){var m=h;h=s(m,"key"),f=s(m,"url"),p=s(m,"xhrSettings"),g=s(m,"extension",g),v=s(m,"width",v),d=s(m,"height",d)}var x={type:"html",cache:r.textureManager,extension:g,responseType:"text",key:h,url:f,xhrSettings:p,config:{width:v,height:d}};o.call(this,r,x)},onProcess:function(){this.state=u.FILE_PROCESSING;var l=this.config.width,r=this.config.height,h=[];h.push('<svg width="'+l+'px" height="'+r+'px" viewBox="0 0 '+l+" "+r+'" xmlns="http://www.w3.org/2000/svg">'),h.push('<foreignObject width="100%" height="100%">'),h.push('<body xmlns="http://www.w3.org/1999/xhtml">'),h.push(this.xhrLoader.responseText),h.push("</body>"),h.push("</foreignObject>"),h.push("</svg>");var f=[h.join(`
`)],v=this;try{var d=new window.Blob(f,{type:"image/svg+xml;charset=utf-8"})}catch{v.state=u.FILE_ERRORED,v.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){o.revokeObjectURL(v.data),v.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(v.data),v.onProcessError()},o.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){var l=this.cache.addImage(this.key,this.data);this.pendingDestroy(l)}});a.register("htmlTexture",function(l,r,h,f,v){if(Array.isArray(l))for(var d=0;d<l.length;d++)this.addFile(new n(this,l[d]));else this.addFile(new n(this,l,r,h,f,v));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(2),a=t(71),s=t(7),i=t(61),n=t(49),l=new e({Extends:n,initialize:function(h,f,v,d,p,g,m){if(s(f)){var x=f;f=o(x,"key"),o(x,"url",!1)?v=o(x,"url"):v=o(x,"atlasURL"),g=o(x,"xhrSettings"),d=o(x,"path"),p=o(x,"baseURL"),m=o(x,"textureXhrSettings")}var y=new i(h,f,v,g);n.call(this,h,"multiatlas",f,[y]),this.config.path=d,this.config.baseURL=p,this.config.textureXhrSettings=m},onFileComplete:function(r){var h=this.files.indexOf(r);if(h!==-1&&(this.pending--,r.type==="json"&&r.data.hasOwnProperty("textures"))){var f=r.data.textures,v=this.config,d=this.loader,p=d.baseURL,g=d.path,m=d.prefix,x=o(v,"baseURL",this.baseURL),y=o(v,"path",this.path),T=o(v,"prefix",this.prefix),E=o(v,"textureXhrSettings");d.setBaseURL(x),d.setPath(y),d.setPrefix(T);for(var C=0;C<f.length;C++){var A=f[C].image,P="MA"+this.multiKeyIndex+"_"+A,M=new a(d,P,A,E);if(this.addToMultiFile(M),d.addFile(M),f[C].normalMap){var O=new a(d,P,f[C].normalMap,E);O.type="normalMap",M.setLink(O),this.addToMultiFile(O),d.addFile(O)}}d.setBaseURL(p),d.setPath(g),d.setPrefix(m)}},addToCache:function(){if(this.isReadyToProcess()){for(var r=this.files[0],h=[],f=[],v=[],d=1;d<this.files.length;d++){var p=this.files[d];if(p.type!=="normalMap")for(var g=p.key.indexOf("_"),m=p.key.substr(g+1),x=p.data,y=0;y<r.data.textures.length;y++){var T=r.data.textures[y];if(T.image===m){f.push(x),h.push(T),p.linkFile&&v.push(p.linkFile.data);break}}}for(v.length===0&&(v=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,f,h,v),this.complete=!0,d=0;d<this.files.length;d++)this.files[d].pendingDestroy()}}});u.register("multiatlas",function(r,h,f,v,d){var p;if(Array.isArray(r))for(var g=0;g<r.length;g++)p=new l(this,r[g]),this.addFile(p.files);else p=new l(this,r,h,f,v,d),this.addFile(p.files);return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(2),a=t(7),s=t(49),i=t(520),n=new e({Extends:s,initialize:function(r,h,f,v){var d="js",p=[];if(a(h)){var g=h;h=o(g,"key"),f=o(g,"url"),v=o(g,"xhrSettings"),d=o(g,"extension",d)}Array.isArray(f)||(f=[f]);for(var m=0;m<f.length;m++){var x=new i(r,{key:h+"_"+m.toString(),url:f[m],extension:d,xhrSettings:v});x.onProcess=function(){this.onProcessComplete()},p.push(x)}s.call(this,r,"scripts",h,p)},addToCache:function(){if(this.isReadyToProcess()){for(var l=0;l<this.files.length;l++){var r=this.files[l];r.data=document.createElement("script"),r.data.language="javascript",r.data.type="text/javascript",r.data.defer=!1,r.data.text=r.xhrLoader.responseText,document.head.appendChild(r.data)}this.complete=!0}}});u.register("scripts",function(l,r,h){var f;if(Array.isArray(l))for(var v=0;v<l.length;v++)f=new n(this,l[v]),this.addFile(f.files);else f=new n(this,l,r,h),this.addFile(f.files);return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(2),a=t(7),s=t(49),i=t(498),n=t(499),l=t(242),r=new e({Extends:s,initialize:function(f,v,d,p,g,m){var x,y,T=f.cacheManager.obj;if(a(v)){var E=v;v=o(E,"key"),x=new l(f,{key:v,type:"obj",cache:T,url:o(E,"url"),extension:o(E,"extension","obj"),xhrSettings:o(E,"xhrSettings"),config:{flipUV:o(E,"flipUV",g)}}),p=o(E,"matURL"),p&&(y=new l(f,{key:v,type:"mat",cache:T,url:p,extension:o(E,"matExtension","mat"),xhrSettings:o(E,"xhrSettings")}))}else x=new l(f,{key:v,url:d,type:"obj",cache:T,extension:"obj",xhrSettings:m,config:{flipUV:g}}),p&&(y=new l(f,{key:v,url:p,type:"mat",cache:T,extension:"mat",xhrSettings:m}));s.call(this,f,"obj",v,[x,y])},addToCache:function(){if(this.isReadyToProcess()){var h=this.files[0],f=this.files[1],v=i(h.data,h.config.flipUV);f&&(v.materials=n(f.data)),h.cache.add(h.key,v),this.complete=!0}}});u.register("obj",function(h,f,v,d,p){var g;if(Array.isArray(h))for(var m=0;m<h.length;m++)g=new r(this,h[m]),this.addFile(g.files);else g=new r(this,h,f,v,d,p),this.addFile(g.files);return this}),c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(8),a=t(61),s=new e({Extends:a,initialize:function(n,l,r,h,f){a.call(this,n,l,r,h,f),this.type="packfile"},onProcess:function(){this.state!==u.FILE_POPULATED&&(this.state=u.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.loader.addPack(this.data,this.config),this.onProcessComplete()}});o.register("pack",function(i,n,l,r){if(Array.isArray(i))for(var h=0;h<i.length;h++)this.addFile(new s(this,i[h]));else this.addFile(new s(this,i,n,r,l));return this}),c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v,d,p){var g="js";if(i(h)){var m=h;h=s(m,"key"),f=s(m,"url"),p=s(m,"xhrSettings"),g=s(m,"extension",g),v=s(m,"start"),d=s(m,"mapping")}var x={type:"plugin",cache:!1,extension:g,responseType:"text",key:h,url:f,xhrSettings:p,config:{start:v,mapping:d}};o.call(this,r,x),typeof f=="function"&&(this.data=f,this.state=u.FILE_POPULATED)},onProcess:function(){var l=this.loader.systems.plugins,r=this.config,h=s(r,"start",!1),f=s(r,"mapping",null);if(this.state===u.FILE_POPULATED)l.install(this.key,this.data,h,f);else{this.state=u.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var v=l.install(this.key,window[this.key],h,f);(h||f)&&(this.loader.systems[f]=v,this.loader.scene[f]=v)}this.onProcessComplete()}});a.register("plugin",function(l,r,h,f,v){if(Array.isArray(l))for(var d=0;d<l.length;d++)this.addFile(new n(this,l[d]));else this.addFile(new n(this,l,r,h,f,v));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v){var d="js";if(i(h)){var p=h;h=s(p,"key"),f=s(p,"url"),v=s(p,"xhrSettings"),d=s(p,"extension",d)}var g={type:"text",extension:d,responseType:"text",key:h,url:f,xhrSettings:v};o.call(this,r,g)},onProcess:function(){this.state=u.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var l=this.data.concat(`(function(){
return new `+this.key+`();
}).call(this);`),r=eval;this.loader.sceneManager.add(this.key,r(l)),this.complete=!0}});a.register("sceneFile",function(l,r,h){if(Array.isArray(l))for(var f=0;f<l.length;f++)this.addFile(new n(this,l[f]));else this.addFile(new n(this,l,r,h));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v,d,p){var g="js";if(i(h)){var m=h;h=s(m,"key"),f=s(m,"url"),p=s(m,"xhrSettings"),g=s(m,"extension",g),v=s(m,"systemKey"),d=s(m,"sceneKey")}var x={type:"scenePlugin",cache:!1,extension:g,responseType:"text",key:h,url:f,xhrSettings:p,config:{systemKey:v,sceneKey:d}};o.call(this,r,x),typeof f=="function"&&(this.data=f,this.state=u.FILE_POPULATED)},onProcess:function(){var l=this.loader.systems.plugins,r=this.config,h=this.key,f=s(r,"systemKey",h),v=s(r,"sceneKey",h);this.state===u.FILE_POPULATED?l.installScenePlugin(f,this.data,v,this.loader.scene,!0):(this.state=u.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),l.installScenePlugin(f,window[this.key],v,this.loader.scene,!0)),this.onProcessComplete()}});a.register("scenePlugin",function(l,r,h,f,v){if(Array.isArray(l))for(var d=0;d<l.length;d++)this.addFile(new n(this,l[d]));else this.addFile(new n(this,l,r,h,f,v));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(71),a=new e({Extends:o,initialize:function(i,n,l,r,h){o.call(this,i,n,l,h,r),this.type="spritesheet"},addToCache:function(){var s=this.cache.addSpriteSheet(this.key,this.data,this.config);this.pendingDestroy(s)}});u.register("spritesheet",function(s,i,n,l){if(Array.isArray(s))for(var r=0;r<s.length;r++)this.addFile(new a(this,s[r]));else this.addFile(new a(this,s,i,n,l));return this}),c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=new e({Extends:o,initialize:function(r,h,f,v,d){var p="svg";if(i(h)){var g=h;h=s(g,"key"),f=s(g,"url"),v=s(g,"svgConfig",{}),d=s(g,"xhrSettings"),p=s(g,"extension",p)}var m={type:"svg",cache:r.textureManager,extension:p,responseType:"text",key:h,url:f,xhrSettings:d,config:{width:s(v,"width"),height:s(v,"height"),scale:s(v,"scale")}};o.call(this,r,m)},onProcess:function(){this.state=u.FILE_PROCESSING;var l=this.xhrLoader.responseText,r=[l],h=this.config.width,f=this.config.height,v=this.config.scale;t:if(h&&f||v){var d=null,p=new DOMParser;d=p.parseFromString(l,"text/xml");var g=d.getElementsByTagName("svg")[0],m=g.hasAttribute("viewBox"),x=parseFloat(g.getAttribute("width")),y=parseFloat(g.getAttribute("height"));if(!m&&x&&y)g.setAttribute("viewBox","0  0 "+x+" "+y);else if(m&&!x&&!y){var T=g.getAttribute("viewBox").split(/\s+|,/);x=T[2],y=T[3]}if(v)if(x&&y)h=x*v,f=y*v;else break t;g.setAttribute("width",h.toString()+"px"),g.setAttribute("height",f.toString()+"px"),r=[new XMLSerializer().serializeToString(g)]}try{var E=new window.Blob(r,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var C=this,A=!1;this.data.onload=function(){A||o.revokeObjectURL(C.data),C.onProcessComplete()},this.data.onerror=function(){A?C.onProcessError():(A=!0,o.revokeObjectURL(C.data),C.data.src="data:image/svg+xml,"+encodeURIComponent(r.join("")))},o.createObjectURL(this.data,E,"image/svg+xml")},addToCache:function(){var l=this.cache.addImage(this.key,this.data);this.pendingDestroy(l)}});a.register("svg",function(l,r,h,f){if(Array.isArray(l))for(var v=0;v<l.length;v++)this.addFile(new n(this,l[v]));else this.addFile(new n(this,l,r,h,f));return this}),c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(2),i=t(7),n=t(40),l=new e({Extends:o,initialize:function(h,f,v,d){var p="csv";if(i(f)){var g=f;f=s(g,"key"),v=s(g,"url"),d=s(g,"xhrSettings"),p=s(g,"extension",p)}var m={type:"tilemapCSV",cache:h.cacheManager.tilemap,extension:p,responseType:"text",key:f,url:v,xhrSettings:d};o.call(this,h,m),this.tilemapFormat=n.CSV},onProcess:function(){this.state=u.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var r={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,r),this.pendingDestroy(r)}});a.register("tilemapCSV",function(r,h,f){if(Array.isArray(r))for(var v=0;v<r.length;v++)this.addFile(new l(this,r[v]));else this.addFile(new l(this,r,h,f));return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(61),a=t(40),s=new e({Extends:o,initialize:function(n,l,r,h){o.call(this,n,l,r,h),this.type="tilemapJSON",this.cache=n.cacheManager.tilemap},addToCache:function(){var i={format:a.WELTMEISTER,data:this.data};this.cache.add(this.key,i),this.pendingDestroy(i)}});u.register("tilemapImpact",function(i,n,l){if(Array.isArray(i))for(var r=0;r<i.length;r++)this.addFile(new s(this,i[r]));else this.addFile(new s(this,i,n,l));return this}),c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(61),a=t(40),s=new e({Extends:o,initialize:function(n,l,r,h){o.call(this,n,l,r,h),this.type="tilemapJSON",this.cache=n.cacheManager.tilemap},addToCache:function(){var i={format:a.TILED_JSON,data:this.data};this.cache.add(this.key,i),this.pendingDestroy(i)}});u.register("tilemapTiledJSON",function(i,n,l){if(Array.isArray(i))for(var r=0;r<i.length;r++)this.addFile(new s(this,i[r]));else this.addFile(new s(this,i,n,l));return this}),c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(8),o=t(2),a=t(71),s=t(7),i=t(49),n=t(242),l=new e({Extends:i,initialize:function(h,f,v,d,p,g){var m,x;if(s(f)){var y=f;f=o(y,"key"),m=new a(h,{key:f,url:o(y,"textureURL"),extension:o(y,"textureExtension","png"),normalMap:o(y,"normalMap"),xhrSettings:o(y,"textureXhrSettings")}),x=new n(h,{key:f,url:o(y,"atlasURL"),extension:o(y,"atlasExtension","txt"),xhrSettings:o(y,"atlasXhrSettings")})}else m=new a(h,f,v,p),x=new n(h,f,d,g);m.linkFile?i.call(this,h,"unityatlas",f,[m,x,m.linkFile]):i.call(this,h,"unityatlas",f,[m,x])},addToCache:function(){if(this.isReadyToProcess()){var r=this.files[0],h=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(r.key,r.data,h.data,f),h.pendingDestroy(),this.complete=!0}}});u.register("unityAtlas",function(r,h,f,v,d){var p;if(Array.isArray(r))for(var g=0;g<r.length;g++)p=new l(this,r[g]),this.addFile(p.files);else p=new l(this,r,h,f,v,d),this.addFile(p.files);return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(23),a=t(8),s=t(155),i=t(2),n=t(7),l=new e({Extends:o,initialize:function(h,f,v,d,p,g,m){d===void 0&&(d="loadeddata"),p===void 0&&(p=!1),g===void 0&&(g=!1),d!=="loadeddata"&&d!=="canplay"&&d!=="canplaythrough"&&(d="loadeddata");var x={type:"video",cache:h.cacheManager.video,extension:v.type,responseType:"blob",key:f,url:v.url,xhrSettings:m,config:{loadEvent:d,asBlob:p,noAudio:g}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),o.call(this,h,x)},onProcess:function(){if(this.state=u.FILE_PROCESSING,!this.config.asBlob){this.onProcessComplete();return}var r=this.createVideoElement();this.data=r;var h=this;this.data.onloadeddata=function(){h.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(h.data),h.onProcessError()},o.createObjectURL(r,this.xhrLoader.response,""),r.load()},createVideoElement:function(){var r=document.createElement("video");return r.controls=!1,r.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(r.muted=!0,r.defaultMuted=!0,r.setAttribute("autoplay","autoplay")),r.setAttribute("playsinline","playsinline"),r.setAttribute("preload","auto"),r},onVideoLoadHandler:function(r){var h=r.target;h.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),h.removeEventListener("error",this.onErrorCallback,!0),this.data=h,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(r){var h=r.target;h&&(h.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),h.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var r=this.config.loadEvent;if(this.config.asBlob)o.prototype.load.call(this);else{this.percentComplete=0;var h=this.createVideoElement();h.addEventListener(r,this.onLoadCallback,!0),h.addEventListener("error",this.onErrorCallback,!0),h.src=s(this,this.loader.baseURL),h.load()}}});l.create=function(r,h,f,v,d,p,g){var m=r.systems.game;n(h)&&(f=i(h,"url",[]),v=i(h,"loadEvent","loadeddata"),d=i(h,"asBlob",!1),p=i(h,"noAudio",!1),g=i(h,"xhrSettings"),h=i(h,"key"));var x=l.getVideoURL(m,f);if(x)return new l(r,h,x,v,d,p,g)},l.getVideoURL=function(r,h){Array.isArray(h)||(h=[h]);for(var f=0;f<h.length;f++){var v=i(h[f],"url",h[f]);if(v.indexOf("blob:")===0)return{url:v,type:""};var d;if(v.indexOf("data:")===0?d=v.split(",")[0].match(/\/(.*?);/):d=v.match(/\.([a-zA-Z0-9]+)($|\?)/),d=i(h[f],"type",d?d[1]:"").toLowerCase(),r.device.video[d])return{url:v,type:d}}return null},a.register("video",function(r,h,f,v,d,p){var g;if(Array.isArray(r))for(var m=0;m<r.length;m++)g=l.create(this,r[m]),g&&this.addFile(g);else g=l.create(this,r,h,f,v,d,p),g&&this.addFile(g);return this}),c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(21),o=t(149),a=t(9),s=t(95),i=t(8),n=t(2),l=t(24),r=t(20),h=t(156),f=new e({Extends:a,initialize:function(d){a.call(this);var p=d.sys.game.config,g=d.sys.settings.loader;this.scene=d,this.systems=d.sys,this.cacheManager=d.sys.cache,this.textureManager=d.sys.textures,this.sceneManager=d.sys.game.scene,i.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(n(g,"baseURL",p.loaderBaseURL)),this.setPath(n(g,"path",p.loaderPath)),this.setPrefix(n(g,"prefix",p.loaderPrefix)),this.maxParallelDownloads=n(g,"maxParallelDownloads",p.loaderMaxParallelDownloads),this.xhr=h(n(g,"responseType",p.loaderResponseType),n(g,"async",p.loaderAsync),n(g,"user",p.loaderUser),n(g,"password",p.loaderPassword),n(g,"timeout",p.loaderTimeout),n(g,"withCredentials",p.loaderWithCredentials)),this.crossOrigin=n(g,"crossOrigin",p.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new o,this.inflight=new o,this.queue=new o,this._deleteQueue=new o,this.totalFailed=0,this.totalComplete=0,this.state=u.LOADER_IDLE,this.multiKeyIndex=0,d.sys.events.once(r.BOOT,this.boot,this),d.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},setBaseURL:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.baseURL=v,this},setPath:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.path=v,this},setPrefix:function(v){return v===void 0&&(v=""),this.prefix=v,this},setCORS:function(v){return this.crossOrigin=v,this},addFile:function(v){Array.isArray(v)||(v=[v]);for(var d=0;d<v.length;d++){var p=v[d];this.keyExists(p)||(this.list.set(p),this.emit(s.ADD,p.key,p.type,this,p),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(v){var d=v.hasCacheConflict();return d||this.list.iterate(function(p){if(p.type===v.type&&p.key===v.key)return d=!0,!1}),!d&&this.isLoading()&&(this.inflight.iterate(function(p){if(p.type===v.type&&p.key===v.key)return d=!0,!1}),this.queue.iterate(function(p){if(p.type===v.type&&p.key===v.key)return d=!0,!1})),d},addPack:function(v,d){d&&v.hasOwnProperty(d)&&(v={packKey:v[d]});var p=0,g=this.baseURL,m=this.path,x=this.prefix;for(var y in v)if(!!Object.prototype.hasOwnProperty.call(v,y)){var T=v[y],E=n(T,"baseURL",g),C=n(T,"path",m),A=n(T,"prefix",x),P=n(T,"files",null),M=n(T,"defaultType","void");if(Array.isArray(P)){this.setBaseURL(E),this.setPath(C),this.setPrefix(A);for(var O=0;O<P.length;O++){var I=P[O],N=I.hasOwnProperty("type")?I.type:M;this[N]&&(this[N](I),p++)}}}return this.setBaseURL(g),this.setPath(m),this.setPrefix(x),p>0},isLoading:function(){return this.state===u.LOADER_LOADING||this.state===u.LOADER_PROCESSING},isReady:function(){return this.state===u.LOADER_IDLE||this.state===u.LOADER_COMPLETE},start:function(){!this.isReady()||(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(s.START,this),this.list.size===0?this.loadComplete():(this.state=u.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(r.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(s.PROGRESS,this.progress)},update:function(){this.state===u.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each(function(v){if((v.state===u.FILE_POPULATED||v.state===u.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(v),this.list.delete(v),v.crossOrigin||(v.crossOrigin=this.crossOrigin),v.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(v,d){!this.inflight||(this.inflight.delete(v),this.updateProgress(),d?(this.totalComplete++,this.queue.set(v),this.emit(s.FILE_LOAD,v),v.onProcess()):(this.totalFailed++,this._deleteQueue.set(v),this.emit(s.FILE_LOAD_ERROR,v),this.fileProcessComplete(v)))},fileProcessComplete:function(v){!this.scene||!this.systems||!this.systems.game||this.systems.game.pendingDestroy||(v.state===u.FILE_ERRORED?v.multiFile&&v.multiFile.onFileFailed(v):v.state===u.FILE_COMPLETE&&(v.multiFile?v.multiFile.isReadyToProcess()&&v.multiFile.addToCache():v.addToCache()),this.queue.delete(v),this.list.size===0&&this.inflight.size===0&&this.queue.size===0&&this.loadComplete())},loadComplete:function(){this.emit(s.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=u.LOADER_COMPLETE,this.systems.events.off(r.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(s.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(v){this._deleteQueue.set(v)},saveJSON:function(v,d){return this.save(JSON.stringify(v),d)},save:function(v,d,p){d===void 0&&(d="file.json"),p===void 0&&(p="application/json");var g=new Blob([v],{type:p}),m=URL.createObjectURL(g),x=document.createElement("a");return x.download=d,x.textContent="Download "+d,x.href=m,x.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var v=this.systems.game.config,d=this.systems.settings.loader;this.setBaseURL(n(d,"baseURL",v.loaderBaseURL)),this.setPath(n(d,"path",v.loaderPath)),this.setPrefix(n(d,"prefix",v.loaderPrefix)),this.state=u.LOADER_IDLE},shutdown:function(){this.reset(),this.state=u.LOADER_SHUTDOWN,this.systems.events.off(r.UPDATE,this.update,this),this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=u.LOADER_DESTROYED,this.systems.events.off(r.UPDATE,this.update,this),this.systems.events.off(r.START,this.pluginStart,this),this.list=null,this.inflight=null,this.queue=null,this.scene=null,this.systems=null,this.textureManager=null,this.cacheManager=null,this.sceneManager=null}});l.register("Loader",f,"load"),c.exports=f},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(62),u=t(17),o={ArcadePhysics:t(1367),Body:t(527),Collider:t(528),Components:t(243),Events:t(245),Factory:t(521),GetOverlapX:t(246),GetOverlapY:t(247),SeparateX:t(537),SeparateY:t(538),Group:t(524),Image:t(522),Sprite:t(157),StaticBody:t(539),StaticGroup:t(525),Tilemap:t(1391),World:t(526)};o=u(!1,o,e),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(36),o=t(50),a=t(353),s=t(521),i=t(2),n=t(127),l=t(523),r=t(244),h=t(24),f=t(20),v=t(3),d=t(526),p=new e({initialize:function(m){this.scene=m,this.systems=m.sys,this.config=this.getConfig(),this.world,this.add,m.sys.events.once(f.BOOT,this.boot,this),m.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new d(this.scene,this.config),this.add=new s(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new d(this.scene,this.config),this.add=new s(this.world));var g=this.systems.events;i(this.config,"customUpdate",!1)||g.on(f.UPDATE,this.world.update,this.world),g.on(f.POST_UPDATE,this.world.postUpdate,this.world),g.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var g=this.systems.game.config.physics,m=this.systems.settings.physics,x=n(i(m,"arcade",{}),i(g,"arcade",{}));return x},overlap:function(g,m,x,y,T){return x===void 0&&(x=null),y===void 0&&(y=null),T===void 0&&(T=x),this.world.collideObjects(g,m,x,y,T,!0)},collide:function(g,m,x,y,T){return x===void 0&&(x=null),y===void 0&&(y=null),T===void 0&&(T=x),this.world.collideObjects(g,m,x,y,T,!1)},collideTiles:function(g,m,x,y,T){return this.world.collideTiles(g,m,x,y,T)},overlapTiles:function(g,m,x,y,T){return this.world.overlapTiles(g,m,x,y,T)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(g,m,x,y,T,E){y===void 0&&(y=60);var C=Math.atan2(x-g.y,m-g.x);return g.body.acceleration.setToPolar(C,y),T!==void 0&&E!==void 0&&g.body.maxVelocity.set(T,E),C},accelerateToObject:function(g,m,x,y,T){return this.accelerateTo(g,m.x,m.y,x,y,T)},closest:function(g,m){m||(m=this.world.bodies.entries);for(var x=Number.MAX_VALUE,y=null,T=g.x,E=g.y,C=m.length,A=0;A<C;A++){var P=m[A],M=P.body||P;if(!(g===P||g===M||g===M.gameObject||g===M.center)){var O=a(T,E,M.center.x,M.center.y);O<x&&(y=P,x=O)}}return y},furthest:function(g,m){m||(m=this.world.bodies.entries);for(var x=-1,y=null,T=g.x,E=g.y,C=m.length,A=0;A<C;A++){var P=m[A],M=P.body||P;if(!(g===P||g===M||g===M.gameObject||g===M.center)){var O=a(T,E,M.center.x,M.center.y);O>x&&(y=P,x=O)}}return y},moveTo:function(g,m,x,y,T){y===void 0&&(y=60),T===void 0&&(T=0);var E=Math.atan2(x-g.y,m-g.x);return T>0&&(y=o(g.x,g.y,m,x)/(T/1e3)),g.body.velocity.setToPolar(E,y),E},moveToObject:function(g,m,x,y){return this.moveTo(g,m.x,m.y,x,y)},velocityFromAngle:function(g,m,x){return m===void 0&&(m=60),x===void 0&&(x=new v),x.setToPolar(u(g),m)},velocityFromRotation:function(g,m,x){return m===void 0&&(m=60),x===void 0&&(x=new v),x.setToPolar(g,m)},overlapRect:function(g,m,x,y,T,E){return r(this.world,g,m,x,y,T,E)},overlapCirc:function(g,m,x,y,T){return l(this.world,g,m,x,y,T)},shutdown:function(){if(!!this.world){var g=this.systems.events;g.off(f.UPDATE,this.world.update,this.world),g.off(f.POST_UPDATE,this.world.postUpdate,this.world),g.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});h.register("ArcadePhysics",p,"arcadePhysics"),c.exports=p},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setAcceleration:function(e,u){return this.body.acceleration.set(e,u),this},setAccelerationX:function(e){return this.body.acceleration.x=e,this},setAccelerationY:function(e){return this.body.acceleration.y=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setAngularVelocity:function(e){return this.body.angularVelocity=e,this},setAngularAcceleration:function(e){return this.body.angularAcceleration=e,this},setAngularDrag:function(e){return this.body.angularDrag=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setBounce:function(e,u){return this.body.bounce.set(e,u),this},setBounceX:function(e){return this.body.bounce.x=e,this},setBounceY:function(e){return this.body.bounce.y=e,this},setCollideWorldBounds:function(e,u,o){return this.body.setCollideWorldBounds(e,u,o),this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setDebug:function(e,u,o){return this.debugShowBody=e,this.debugShowVelocity=u,this.debugBodyColor=o,this},setDebugBodyColor:function(e){return this.body.debugBodyColor=e,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(e){this.body.debugShowBody=e}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(e){this.body.debugShowVelocity=e}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(e){this.body.debugBodyColor=e}}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setDrag:function(e,u){return this.body.drag.set(e,u),this},setDragX:function(e){return this.body.drag.x=e,this},setDragY:function(e){return this.body.drag.y=e,this},setDamping:function(e){return this.body.useDamping=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={enableBody:function(e,u,o,a,s){return e&&this.body.reset(u,o),a&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(e,u){return e===void 0&&(e=!1),u===void 0&&(u=!1),this.body.stop(),this.body.enable=!1,e&&(this.body.gameObject.active=!1),u&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setFriction:function(e,u){return this.body.friction.set(e,u),this},setFrictionX:function(e){return this.body.friction.x=e,this},setFrictionY:function(e){return this.body.friction.y=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setGravity:function(e,u){return this.body.gravity.set(e,u),this},setGravityX:function(e){return this.body.gravity.x=e,this},setGravityY:function(e){return this.body.gravity.y=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setImmovable:function(e){return e===void 0&&(e=!0),this.body.immovable=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setMass:function(e){return this.body.mass=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setPushable:function(e){return e===void 0&&(e=!0),this.body.pushable=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setOffset:function(e,u){return this.body.setOffset(e,u),this},setSize:function(e,u,o){return this.body.setSize(e,u,o),this},setBodySize:function(e,u,o){return this.body.setSize(e,u,o),this},setCircle:function(e,u,o){return this.body.setCircle(e,u,o),this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setVelocity:function(e,u){return this.body.setVelocity(e,u),this},setVelocityX:function(e){return this.body.setVelocityX(e),this},setVelocityY:function(e){return this.body.setVelocityY(e),this},setMaxVelocity:function(e,u){return this.body.maxVelocity.set(e,u),this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="collide"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="overlap"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pause"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resume"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="tilecollide"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="tileoverlap"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="worldbounds"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="worldstep"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t,e,u,o,a,s,i,n,l,r,h,f,v,d,p,g,m,x=function(P,M,O){t=P,e=M;var I=t.velocity.x,N=e.velocity.x;return u=t.pushable,l=t._dx<0,r=t._dx>0,h=t._dx===0,p=Math.abs(t.right-e.x)<=Math.abs(e.right-t.x),i=N-I*t.bounce.x,o=e.pushable,f=e._dx<0,v=e._dx>0,d=e._dx===0,g=!p,n=I-N*e.bounce.x,m=Math.abs(O),y()},y=function(){return r&&p&&e.blocked.right?(t.processX(-m,i,!1,!0),1):l&&g&&e.blocked.left?(t.processX(m,i,!0),1):v&&g&&t.blocked.right?(e.processX(-m,n,!1,!0),2):f&&p&&t.blocked.left?(e.processX(m,n,!0),2):0},T=function(){var P=t.velocity.x,M=e.velocity.x,O=Math.sqrt(M*M*e.mass/t.mass)*(M>0?1:-1),I=Math.sqrt(P*P*t.mass/e.mass)*(P>0?1:-1),N=(O+I)*.5;return O-=N,I-=N,a=N+O*t.bounce.x,s=N+I*e.bounce.x,l&&g?E(0):f&&p?E(1):r&&p?E(2):v&&g?E(3):!1},E=function(P){if(u&&o)m*=.5,P===0||P===3?(t.processX(m,a),e.processX(-m,s)):(t.processX(-m,a),e.processX(m,s));else if(u&&!o)P===0||P===3?t.processX(m,i,!0):t.processX(-m,i,!1,!0);else if(!u&&o)P===0||P===3?e.processX(-m,n,!1,!0):e.processX(m,n,!0);else{var M=m*.5;P===0?d?(t.processX(m,0,!0),e.processX(0,null,!1,!0)):v?(t.processX(M,0,!0),e.processX(-M,0,!1,!0)):(t.processX(M,e.velocity.x,!0),e.processX(-M,null,!1,!0)):P===1?h?(t.processX(0,null,!1,!0),e.processX(m,0,!0)):r?(t.processX(-M,0,!1,!0),e.processX(M,0,!0)):(t.processX(-M,null,!1,!0),e.processX(M,t.velocity.x,!0)):P===2?d?(t.processX(-m,0,!1,!0),e.processX(0,null,!0)):f?(t.processX(-M,0,!1,!0),e.processX(M,0,!0)):(t.processX(-M,e.velocity.x,!1,!0),e.processX(M,null,!0)):P===3&&(h?(t.processX(0,null,!0),e.processX(-m,0,!1,!0)):l?(t.processX(M,0,!0),e.processX(-M,0,!1,!0)):(t.processX(M,e.velocity.y,!0),e.processX(-M,null,!1,!0)))}return!0},C=function(P){P===1?e.velocity.x=0:p?e.processX(m,n,!0):e.processX(-m,n,!1,!0),t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y,e._dy=e.y-e.prev.y)},A=function(P){P===2?t.velocity.x=0:g?t.processX(m,i,!0):t.processX(-m,i,!1,!0),e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y,t._dy=t.y-t.prev.y)};c.exports={BlockCheck:y,Check:T,Set:x,Run:E,RunImmovableBody1:C,RunImmovableBody2:A}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t,e,u,o,a,s,i,n,l,r,h,f,v,d,p,g,m,x=function(P,M,O){t=P,e=M;var I=t.velocity.y,N=e.velocity.y;return u=t.pushable,l=t._dy<0,r=t._dy>0,h=t._dy===0,p=Math.abs(t.bottom-e.y)<=Math.abs(e.bottom-t.y),i=N-I*t.bounce.y,o=e.pushable,f=e._dy<0,v=e._dy>0,d=e._dy===0,g=!p,n=I-N*e.bounce.y,m=Math.abs(O),y()},y=function(){return r&&p&&e.blocked.down?(t.processY(-m,i,!1,!0),1):l&&g&&e.blocked.up?(t.processY(m,i,!0),1):v&&g&&t.blocked.down?(e.processY(-m,n,!1,!0),2):f&&p&&t.blocked.up?(e.processY(m,n,!0),2):0},T=function(){var P=t.velocity.y,M=e.velocity.y,O=Math.sqrt(M*M*e.mass/t.mass)*(M>0?1:-1),I=Math.sqrt(P*P*t.mass/e.mass)*(P>0?1:-1),N=(O+I)*.5;return O-=N,I-=N,a=N+O*t.bounce.y,s=N+I*e.bounce.y,l&&g?E(0):f&&p?E(1):r&&p?E(2):v&&g?E(3):!1},E=function(P){if(u&&o)m*=.5,P===0||P===3?(t.processY(m,a),e.processY(-m,s)):(t.processY(-m,a),e.processY(m,s));else if(u&&!o)P===0||P===3?t.processY(m,i,!0):t.processY(-m,i,!1,!0);else if(!u&&o)P===0||P===3?e.processY(-m,n,!1,!0):e.processY(m,n,!0);else{var M=m*.5;P===0?d?(t.processY(m,0,!0),e.processY(0,null,!1,!0)):v?(t.processY(M,0,!0),e.processY(-M,0,!1,!0)):(t.processY(M,e.velocity.y,!0),e.processY(-M,null,!1,!0)):P===1?h?(t.processY(0,null,!1,!0),e.processY(m,0,!0)):r?(t.processY(-M,0,!1,!0),e.processY(M,0,!0)):(t.processY(-M,null,!1,!0),e.processY(M,t.velocity.y,!0)):P===2?d?(t.processY(-m,0,!1,!0),e.processY(0,null,!0)):f?(t.processY(-M,0,!1,!0),e.processY(M,0,!0)):(t.processY(-M,e.velocity.y,!1,!0),e.processY(M,null,!0)):P===3&&(h?(t.processY(0,null,!0),e.processY(-m,0,!1,!0)):l?(t.processY(M,0,!0),e.processY(-M,0,!1,!0)):(t.processY(M,e.velocity.y,!0),e.processY(-M,null,!1,!0)))}return!0},C=function(P){P===1?e.velocity.y=0:p?e.processY(m,n,!0):e.processY(-m,n,!1,!0),t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x,e._dx=e.x-e.prev.x)},A=function(P){P===2?t.velocity.y=0:g?t.processY(m,i,!0):t.processY(-m,i,!1,!0),e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x,t._dx=t.x-t.prev.x)};c.exports={BlockCheck:y,Check:T,Set:x,Run:E,RunImmovableBody1:C,RunImmovableBody2:A}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e={ProcessTileCallbacks:t(530),ProcessTileSeparationX:t(534),ProcessTileSeparationY:t(536),SeparateTile:t(532),TileCheckX:t(533),TileCheckY:t(535),TileIntersectsBody:t(248)};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(3),o=new e({initialize:function(){this.boundsCenter=new u,this.centerDiff=new u},parseBody:function(a){if(a=a.hasOwnProperty("body")?a.body:a,!a.hasOwnProperty("bounds")||!a.hasOwnProperty("centerOfMass"))return!1;var s=this.boundsCenter,i=this.centerDiff,n=a.bounds.max.x-a.bounds.min.x,l=a.bounds.max.y-a.bounds.min.y,r=n*a.centerOfMass.x,h=l*a.centerOfMass.y;return s.set(n/2,l/2),i.set(r-s.x,h-s.y),!0},getTopLeft:function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),this.parseBody(a)){var n=this.boundsCenter,l=this.centerDiff;return new u(s+n.x+l.x,i+n.y+l.y)}return!1},getTopCenter:function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),this.parseBody(a)){var n=this.boundsCenter,l=this.centerDiff;return new u(s+l.x,i+n.y+l.y)}return!1},getTopRight:function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),this.parseBody(a)){var n=this.boundsCenter,l=this.centerDiff;return new u(s-(n.x-l.x),i+n.y+l.y)}return!1},getLeftCenter:function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),this.parseBody(a)){var n=this.boundsCenter,l=this.centerDiff;return new u(s+n.x+l.x,i+l.y)}return!1},getCenter:function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),this.parseBody(a)){var n=this.centerDiff;return new u(s+n.x,i+n.y)}return!1},getRightCenter:function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),this.parseBody(a)){var n=this.boundsCenter,l=this.centerDiff;return new u(s-(n.x-l.x),i+l.y)}return!1},getBottomLeft:function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),this.parseBody(a)){var n=this.boundsCenter,l=this.centerDiff;return new u(s+n.x+l.x,i-(n.y-l.y))}return!1},getBottomCenter:function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),this.parseBody(a)){var n=this.boundsCenter,l=this.centerDiff;return new u(s+l.x,i-(n.y-l.y))}return!1},getBottomRight:function(a,s,i){if(s===void 0&&(s=0),i===void 0&&(i=0),this.parseBody(a)){var n=this.boundsCenter,l=this.centerDiff;return new u(s-(n.x-l.x),i-(n.y-l.y))}return!1}});c.exports=o},function(c,S){/**
 * @author       Stefan Hedman <schteppe@gmail.com> (http://steffe.se)
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={decomp:P,quickDecomp:N,isSimple:O,removeCollinearPoints:Y,removeDuplicatePoints:X,makeCCW:p};function t(D,L,B){B=B||0;var G=[0,0],w,z,U,V,Z,$,Q;return w=D[1][1]-D[0][1],z=D[0][0]-D[1][0],U=w*D[0][0]+z*D[0][1],V=L[1][1]-L[0][1],Z=L[0][0]-L[1][0],$=V*L[0][0]+Z*L[0][1],Q=w*Z-V*z,W(Q,0,B)||(G[0]=(Z*U-z*$)/Q,G[1]=(w*$-V*U)/Q),G}function e(D,L,B,G){var w=L[0]-D[0],z=L[1]-D[1],U=G[0]-B[0],V=G[1]-B[1];if(U*z-V*w==0)return!1;var Z=(w*(B[1]-D[1])+z*(D[0]-B[0]))/(U*z-V*w),$=(U*(D[1]-B[1])+V*(B[0]-D[0]))/(V*w-U*z);return Z>=0&&Z<=1&&$>=0&&$<=1}function u(D,L,B){return(L[0]-D[0])*(B[1]-D[1])-(B[0]-D[0])*(L[1]-D[1])}function o(D,L,B){return u(D,L,B)>0}function a(D,L,B){return u(D,L,B)>=0}function s(D,L,B){return u(D,L,B)<0}function i(D,L,B){return u(D,L,B)<=0}var n=[],l=[];function r(D,L,B,G){if(G){var w=n,z=l;w[0]=L[0]-D[0],w[1]=L[1]-D[1],z[0]=B[0]-L[0],z[1]=B[1]-L[1];var U=w[0]*z[0]+w[1]*z[1],V=Math.sqrt(w[0]*w[0]+w[1]*w[1]),Z=Math.sqrt(z[0]*z[0]+z[1]*z[1]),$=Math.acos(U/(V*Z));return $<G}else return u(D,L,B)===0}function h(D,L){var B=L[0]-D[0],G=L[1]-D[1];return B*B+G*G}function f(D,L){var B=D.length;return D[L<0?L%B+B:L%B]}function v(D){D.length=0}function d(D,L,B,G){for(var w=B;w<G;w++)D.push(L[w])}function p(D){for(var L=0,B=D,G=1;G<D.length;++G)(B[G][1]<B[L][1]||B[G][1]===B[L][1]&&B[G][0]>B[L][0])&&(L=G);return o(f(D,L-1),f(D,L),f(D,L+1))?!1:(g(D),!0)}function g(D){for(var L=[],B=D.length,G=0;G!==B;G++)L.push(D.pop());for(var G=0;G!==B;G++)D[G]=L[G]}function m(D,L){return s(f(D,L-1),f(D,L),f(D,L+1))}var x=[],y=[];function T(D,L,B){var G,w,z=x,U=y;if(a(f(D,L+1),f(D,L),f(D,B))&&i(f(D,L-1),f(D,L),f(D,B)))return!1;w=h(f(D,L),f(D,B));for(var V=0;V!==D.length;++V)if(!((V+1)%D.length===L||V===L)&&a(f(D,L),f(D,B),f(D,V+1))&&i(f(D,L),f(D,B),f(D,V))&&(z[0]=f(D,L),z[1]=f(D,B),U[0]=f(D,V),U[1]=f(D,V+1),G=t(z,U),h(f(D,L),G)<w))return!1;return!0}function E(D,L,B){for(var G=0;G!==D.length;++G)if(!(G===L||G===B||(G+1)%D.length===L||(G+1)%D.length===B)&&e(f(D,L),f(D,B),f(D,G),f(D,G+1)))return!1;return!0}function C(D,L,B,G){var w=G||[];if(v(w),L<B)for(var z=L;z<=B;z++)w.push(D[z]);else{for(var z=0;z<=B;z++)w.push(D[z]);for(var z=L;z<D.length;z++)w.push(D[z])}return w}function A(D){for(var L=[],B=[],G=[],w=[],z=Number.MAX_VALUE,U=0;U<D.length;++U)if(m(D,U)){for(var V=0;V<D.length;++V)if(T(D,U,V)){B=A(C(D,U,V,w)),G=A(C(D,V,U,w));for(var Z=0;Z<G.length;Z++)B.push(G[Z]);B.length<z&&(L=B,z=B.length,L.push([f(D,U),f(D,V)]))}}return L}function P(D){var L=A(D);return L.length>0?M(D,L):[D]}function M(D,L){if(L.length===0)return[D];if(L instanceof Array&&L.length&&L[0]instanceof Array&&L[0].length===2&&L[0][0]instanceof Array){for(var B=[D],G=0;G<L.length;G++)for(var w=L[G],z=0;z<B.length;z++){var U=B[z],V=M(U,w);if(V){B.splice(z,1),B.push(V[0],V[1]);break}}return B}else{var w=L,G=D.indexOf(w[0]),z=D.indexOf(w[1]);return G!==-1&&z!==-1?[C(D,G,z),C(D,z,G)]:!1}}function O(D){var L=D,B;for(B=0;B<L.length-1;B++)for(var G=0;G<B-1;G++)if(e(L[B],L[B+1],L[G],L[G+1]))return!1;for(B=1;B<L.length-2;B++)if(e(L[0],L[L.length-1],L[B],L[B+1]))return!1;return!0}function I(D,L,B,G,w){w=w||0;var z=L[1]-D[1],U=D[0]-L[0],V=z*D[0]+U*D[1],Z=G[1]-B[1],$=B[0]-G[0],Q=Z*B[0]+$*B[1],j=z*$-Z*U;return W(j,0,w)?[0,0]:[($*V-U*Q)/j,(z*Q-Z*V)/j]}function N(D,L,B,G,w,z,U){z=z||100,U=U||0,w=w||25,L=typeof L!="undefined"?L:[],B=B||[],G=G||[];var V=[0,0],Z=[0,0],$=[0,0],Q=0,j=0,k=0,et=0,_=0,nt=0,ut=0,ht=[],at=[],tt=D,dt=D;if(dt.length<3)return L;if(U++,U>z)return console.warn("quickDecomp: max level ("+z+") reached."),L;for(var rt=0;rt<D.length;++rt)if(m(tt,rt)){B.push(tt[rt]),Q=j=Number.MAX_VALUE;for(var lt=0;lt<D.length;++lt)o(f(tt,rt-1),f(tt,rt),f(tt,lt))&&i(f(tt,rt-1),f(tt,rt),f(tt,lt-1))&&($=I(f(tt,rt-1),f(tt,rt),f(tt,lt),f(tt,lt-1)),s(f(tt,rt+1),f(tt,rt),$)&&(k=h(tt[rt],$),k<j&&(j=k,Z=$,nt=lt))),o(f(tt,rt+1),f(tt,rt),f(tt,lt+1))&&i(f(tt,rt+1),f(tt,rt),f(tt,lt))&&($=I(f(tt,rt+1),f(tt,rt),f(tt,lt),f(tt,lt+1)),o(f(tt,rt-1),f(tt,rt),$)&&(k=h(tt[rt],$),k<Q&&(Q=k,V=$,_=lt)));if(nt===(_+1)%D.length)$[0]=(Z[0]+V[0])/2,$[1]=(Z[1]+V[1])/2,G.push($),rt<_?(d(ht,tt,rt,_+1),ht.push($),at.push($),nt!==0&&d(at,tt,nt,tt.length),d(at,tt,0,rt+1)):(rt!==0&&d(ht,tt,rt,tt.length),d(ht,tt,0,_+1),ht.push($),at.push($),d(at,tt,nt,rt+1));else{if(nt>_&&(_+=D.length),et=Number.MAX_VALUE,_<nt)return L;for(var lt=nt;lt<=_;++lt)a(f(tt,rt-1),f(tt,rt),f(tt,lt))&&i(f(tt,rt+1),f(tt,rt),f(tt,lt))&&(k=h(f(tt,rt),f(tt,lt)),k<et&&E(tt,rt,lt)&&(et=k,ut=lt%D.length));rt<ut?(d(ht,tt,rt,ut+1),ut!==0&&d(at,tt,ut,dt.length),d(at,tt,0,rt+1)):(rt!==0&&d(ht,tt,rt,dt.length),d(ht,tt,0,ut+1),d(at,tt,ut,rt+1))}return ht.length<at.length?(N(ht,L,B,G,w,z,U),N(at,L,B,G,w,z,U)):(N(at,L,B,G,w,z,U),N(ht,L,B,G,w,z,U)),L}return L.push(D),L}function Y(D,L){for(var B=0,G=D.length-1;D.length>3&&G>=0;--G)r(f(D,G-1),f(D,G),f(D,G+1),L)&&(D.splice(G%D.length,1),B++);return B}function X(D,L){for(var B=D.length-1;B>=1;--B)for(var G=D[B],w=B-1;w>=0;--w)if(H(G,D[w],L)){D.splice(B,1);continue}}function W(D,L,B){return B=B||0,Math.abs(D-L)<=B}function H(D,L,B){return W(D[0],L[0],B)&&W(D[1],L[1],B)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(86),u=t(0),o=t(591),a=t(128),s=t(592),i=t(1395),n=t(1396),l=t(1397),r=t(593),h=t(589),f=t(590),v=t(1398),d=t(64),p=new u({initialize:function(m){this.world=m,this.scene=m.scene,this.sys=m.scene.sys},rectangle:function(g,m,x,y,T){var E=e.rectangle(g,m,x,y,T);return this.world.add(E),E},trapezoid:function(g,m,x,y,T,E){var C=e.trapezoid(g,m,x,y,T,E);return this.world.add(C),C},circle:function(g,m,x,y,T){var E=e.circle(g,m,x,y,T);return this.world.add(E),E},polygon:function(g,m,x,y,T){var E=e.polygon(g,m,x,y,T);return this.world.add(E),E},fromVertices:function(g,m,x,y,T,E,C){typeof x=="string"&&(x=d.fromPath(x));var A=e.fromVertices(g,m,x,y,T,E,C);return this.world.add(A),A},fromPhysicsEditor:function(g,m,x,y,T){T===void 0&&(T=!0);var E=h.parseBody(g,m,x,y);return T&&!this.world.has(E)&&this.world.add(E),E},fromSVG:function(g,m,x,y,T,E){y===void 0&&(y=1),T===void 0&&(T={}),E===void 0&&(E=!0);for(var C=x.getElementsByTagName("path"),A=[],P=0;P<C.length;P++){var M=s.pathToVertices(C[P],30);y!==1&&d.scale(M,y,y),A.push(M)}var O=e.fromVertices(g,m,A,T);return E&&this.world.add(O),O},fromJSON:function(g,m,x,y,T){y===void 0&&(y={}),T===void 0&&(T=!0);var E=f.parseBody(g,m,x,y);return E&&T&&this.world.add(E),E},imageStack:function(g,m,x,y,T,E,C,A,P){C===void 0&&(C=0),A===void 0&&(A=0),P===void 0&&(P={});var M=this.world,O=this.sys.displayList;P.addToWorld=!1;var I=o.stack(x,y,T,E,C,A,function(N,Y){var X=new n(M,N,Y,g,m,P);return O.add(X),X.body});return M.add(I),I},stack:function(g,m,x,y,T,E,C){var A=o.stack(g,m,x,y,T,E,C);return this.world.add(A),A},pyramid:function(g,m,x,y,T,E,C){var A=o.pyramid(g,m,x,y,T,E,C);return this.world.add(A),A},chain:function(g,m,x,y,T,E){return o.chain(g,m,x,y,T,E)},mesh:function(g,m,x,y,T){return o.mesh(g,m,x,y,T)},newtonsCradle:function(g,m,x,y,T){var E=o.newtonsCradle(g,m,x,y,T);return this.world.add(E),E},car:function(g,m,x,y,T){var E=o.car(g,m,x,y,T);return this.world.add(E),E},softBody:function(g,m,x,y,T,E,C,A,P,M){var O=o.softBody(g,m,x,y,T,E,C,A,P,M);return this.world.add(O),O},joint:function(g,m,x,y,T){return this.constraint(g,m,x,y,T)},spring:function(g,m,x,y,T){return this.constraint(g,m,x,y,T)},constraint:function(g,m,x,y,T){y===void 0&&(y=1),T===void 0&&(T={}),T.bodyA=g.type==="body"?g:g.body,T.bodyB=m.type==="body"?m:m.body,isNaN(x)||(T.length=x),T.stiffness=y;var E=a.create(T);return this.world.add(E),E},worldConstraint:function(g,m,x,y){x===void 0&&(x=1),y===void 0&&(y={}),y.bodyB=g.type==="body"?g:g.body,isNaN(m)||(y.length=m),y.stiffness=x;var T=a.create(y);return this.world.add(T),T},mouseSpring:function(g){return this.pointerConstraint(g)},pointerConstraint:function(g){g===void 0&&(g={}),g.hasOwnProperty("render")||(g.render={visible:!1});var m=new v(this.scene,this.world,g);return this.world.add(m.constraint),m},image:function(g,m,x,y,T){var E=new n(this.world,g,m,x,y,T);return this.sys.displayList.add(E),E},tileBody:function(g,m){return new r(this.world,g,m)},sprite:function(g,m,x,y,T){var E=new l(this.world,g,m,x,y,T);return this.sys.displayList.add(E),this.sys.updateList.add(E),E},gameObject:function(g,m,x){return i(this.world,g,m,x)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});c.exports=p},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(249),u=t(2),o=t(3);function a(i){return!!i.get&&typeof i.get=="function"||!!i.set&&typeof i.set=="function"}var s=function(i,n,l,r){l===void 0&&(l={}),r===void 0&&(r=!0);var h=n.x,f=n.y;n.body={temp:!0,position:{x:h,y:f}};var v=[e.Bounce,e.Collision,e.Force,e.Friction,e.Gravity,e.Mass,e.Sensor,e.SetBody,e.Sleep,e.Static,e.Transform,e.Velocity];if(v.forEach(function(p){for(var g in p)a(p[g])?Object.defineProperty(n,g,{get:p[g].get,set:p[g].set}):Object.defineProperty(n,g,{value:p[g]})}),n.world=i,n._tempVec2=new o(h,f),l.hasOwnProperty("type")&&l.type==="body")n.setExistingBody(l,r);else{var d=u(l,"shape",null);d||(d="rectangle"),l.addToWorld=r,n.setBody(d,l)}return n};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(249),o=t(15),a=t(2),s=t(125),i=t(167),n=t(3),l=new e({Extends:s,Mixins:[u.Bounce,u.Collision,u.Force,u.Friction,u.Gravity,u.Mass,u.Sensor,u.SetBody,u.Sleep,u.Static,u.Transform,u.Velocity,i],initialize:function(h,f,v,d,p,g){o.call(this,h.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(d,p),this.setSizeToFrame(),this.setOrigin(),this.world=h,this._tempVec2=new n(f,v);var m=a(g,"shape",null);m?this.setBody(m,g):this.setRectangle(this.width,this.height,g),this.setPosition(f,v),this.initPipeline()}});c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(164),u=t(0),o=t(249),a=t(15),s=t(2),i=t(167),n=t(73),l=t(3),r=new u({Extends:n,Mixins:[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity,i],initialize:function(f,v,d,p,g,m){a.call(this,f.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new e(this),this.setTexture(p,g),this.setSizeToFrame(),this.setOrigin(),this.world=f,this._tempVec2=new l(v,d);var x=s(m,"shape",null);x?this.setBody(x,m):this.setRectangle(this.width,this.height,m),this.setPosition(v,d),this.initPipeline()}});c.exports=r},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(84),u=t(0),o=t(118),a=t(128),s=t(273),i=t(272),n=t(51),l=t(127),r=t(165),h=t(3),f=t(64),v=new u({initialize:function(p,g,m){m===void 0&&(m={});var x={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=p,this.world=g,this.camera=null,this.pointer=null,this.active=!0,this.position=new h,this.body=null,this.part=null,this.constraint=a.create(l(m,x)),this.world.on(i.BEFORE_UPDATE,this.update,this),p.sys.input.on(n.POINTER_DOWN,this.onDown,this),p.sys.input.on(n.POINTER_UP,this.onUp,this)},onDown:function(d){this.pointer||(this.pointer=d,this.camera=d.camera)},onUp:function(d){d===this.pointer&&(this.pointer=null)},getBody:function(d){var p=this.position,g=this.constraint;this.camera.getWorldPoint(d.x,d.y,p);for(var m=o.allBodies(this.world.localWorld),x=0;x<m.length;x++){var y=m[x];if(!y.ignorePointer&&e.contains(y.bounds,p)&&s.canCollide(y.collisionFilter,g.collisionFilter)&&this.hitTestBody(y,p))return this.world.emit(i.DRAG_START,y,this.part,this),!0}return!1},hitTestBody:function(d,p){for(var g=this.constraint,m=d.parts.length,x=m>1?1:0,y=x;y<m;y++){var T=d.parts[y];if(f.contains(T.vertices,p))return g.pointA=p,g.pointB={x:p.x-d.position.x,y:p.y-d.position.y},g.bodyB=d,g.angleB=d.angle,r.set(d,!1),this.part=T,this.body=d,!0}return!1},update:function(){var d=this.pointer,p=this.body;if(!this.active||!d){p&&this.stopDrag();return}if(!d.isDown&&p){this.stopDrag();return}else if(d.isDown){if(!p&&!this.getBody(d))return;p=this.body;var g=this.position,m=this.constraint;this.camera.getWorldPoint(d.x,d.y,g),m.pointA.x=g.x,m.pointA.y=g.y,r.set(p,!1),this.world.emit(i.DRAG,p,this)}},stopDrag:function(){var d=this.body,p=this.constraint;p.bodyB=null,p.pointB=null,this.pointer=null,this.body=null,this.part=null,d&&this.world.emit(i.DRAG_END,d,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(i.BEFORE_UPDATE,this.update),this.scene.sys.input.off(n.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(n.POINTER_UP,this.onUp,this)}});c.exports=v},function(c,S,t){var e={};c.exports=e;var u=t(595),o=t(32);(function(){e.name="matter-js",e.version="0.14.2",e.uses=[],e.used=[],e.use=function(){u.use(e,Array.prototype.slice.call(arguments))},e.before=function(a,s){return a=a.replace(/^Matter./,""),o.chainPathBefore(e,a,s)},e.after=function(a,s){return a=a.replace(/^Matter./,""),o.chainPathAfter(e,a,s)}})()},function(c,S,t){var e={};c.exports=e;var u=t(83),o=t(274),a=t(84),s=t(86),i=t(64);(function(){e.collides=function(n,l){for(var r=[],h=0;h<l.length;h++){var f=l[h];if(n!==f&&a.overlaps(f.bounds,n.bounds))for(var v=f.parts.length===1?0:1;v<f.parts.length;v++){var d=f.parts[v];if(a.overlaps(d.bounds,n.bounds)){var p=o.collides(d,n);if(p.collided){r.push(p);break}}}}return r},e.ray=function(n,l,r,h){h=h||1e-100;for(var f=u.angle(l,r),v=u.magnitude(u.sub(l,r)),d=(r.x+l.x)*.5,p=(r.y+l.y)*.5,g=s.rectangle(d,p,v,h,{angle:f}),m=e.collides(g,n),x=0;x<m.length;x+=1){var y=m[x];y.body=y.bodyB=y.bodyA}return m},e.region=function(n,l,r){for(var h=[],f=0;f<n.length;f++){var v=n[f],d=a.overlaps(v.bounds,l);(d&&!r||!d&&r)&&h.push(v)}return h},e.point=function(n,l){for(var r=[],h=0;h<n.length;h++){var f=n[h];if(a.contains(f.bounds,l))for(var v=f.parts.length===1?0:1;v<f.parts.length;v++){var d=f.parts[v];if(a.contains(d.bounds,l)&&i.contains(d.vertices,l)){r.push(f);break}}}return r}})()},function(c,S,t){var e={};c.exports=e;var u=t(596),o=t(165),a=t(599),s=t(598),i=t(1523),n=t(597),l=t(166),r=t(118),h=t(128),f=t(32),v=t(41);(function(){e.create=function(d,p){p=f.isElement(d)?p:d,d=f.isElement(d)?d:null,p=p||{},(d||p.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var g={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:n}},m=f.extend(g,p);return m.world=p.world||u.create(m.world),m.pairs=s.create(),m.broadphase=m.broadphase.controller.create(m.broadphase),m.metrics=m.metrics||{extended:!1},m.metrics=i.create(m.metrics),m},e.update=function(d,p,g){p=p||1e3/60,g=g||1;var m=d.world,x=d.timing,y=d.broadphase,T=[],E;x.timestamp+=p*x.timeScale;var C={timestamp:x.timestamp};l.trigger(d,"beforeUpdate",C);var A=r.allBodies(m),P=r.allConstraints(m);for(i.reset(d.metrics),d.enableSleeping&&o.update(A,x.timeScale),e._bodiesApplyGravity(A,m.gravity),e._bodiesUpdate(A,p,x.timeScale,g,m.bounds),h.preSolveAll(A),E=0;E<d.constraintIterations;E++)h.solveAll(P,x.timeScale);h.postSolveAll(A),y.controller?(m.isModified&&y.controller.clear(y),y.controller.update(y,A,d,m.isModified),T=y.pairsList):T=A,m.isModified&&r.setModified(m,!1,!1,!0);var M=y.detector(T,d),O=d.pairs,I=x.timestamp;for(s.update(O,M,I),s.removeOld(O,I),d.enableSleeping&&o.afterCollisions(O.list,x.timeScale),O.collisionStart.length>0&&l.trigger(d,"collisionStart",{pairs:O.collisionStart}),a.preSolvePosition(O.list),E=0;E<d.positionIterations;E++)a.solvePosition(O.list,A,x.timeScale);for(a.postSolvePosition(A),h.preSolveAll(A),E=0;E<d.constraintIterations;E++)h.solveAll(P,x.timeScale);for(h.postSolveAll(A),a.preSolveVelocity(O.list),E=0;E<d.velocityIterations;E++)a.solveVelocity(O.list,x.timeScale);return O.collisionActive.length>0&&l.trigger(d,"collisionActive",{pairs:O.collisionActive}),O.collisionEnd.length>0&&l.trigger(d,"collisionEnd",{pairs:O.collisionEnd}),i.update(d.metrics,d),e._bodiesClearForces(A),l.trigger(d,"afterUpdate",C),d},e.merge=function(d,p){if(f.extend(d,p),p.world){d.world=p.world,e.clear(d);for(var g=r.allBodies(d.world),m=0;m<g.length;m++){var x=g[m];o.set(x,!1),x.id=f.nextId()}}},e.clear=function(d){var p=d.world;s.clear(d.pairs);var g=d.broadphase;if(g.controller){var m=r.allBodies(p);g.controller.clear(g),g.controller.update(g,m,d,!0)}},e._bodiesClearForces=function(d){for(var p=0;p<d.length;p++){var g=d[p];g.force.x=0,g.force.y=0,g.torque=0}},e._bodiesApplyGravity=function(d,p){var g=typeof p.scale!="undefined"?p.scale:.001;if(!(p.x===0&&p.y===0||g===0))for(var m=0;m<d.length;m++){var x=d[m];x.ignoreGravity||x.isStatic||x.isSleeping||(x.force.x+=x.mass*p.x*g*x.gravityScale.x,x.force.y+=x.mass*p.y*g*x.gravityScale.y)}},e._bodiesUpdate=function(d,p,g,m,x){for(var y=0;y<d.length;y++){var T=d[y];T.isStatic||T.isSleeping||v.update(T,p,g,m)}}})()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(86),u=t(41),o=t(0),a=t(32),s=t(118),i=t(1401),n=t(9),l=t(272),r=t(2),h=t(6),f=t(41),v=t(166),d=t(593),p=t(596),g=t(83),m=new o({Extends:n,initialize:function(y,T){n.call(this),this.scene=y,this.engine=i.create(T),this.localWorld=this.engine.world;var E=h(T,"gravity",null);E?this.setGravity(E.x,E.y,E.scale):E===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=h(T,"enabled",!0),this.correction=h(T,"correction",1),this.getDelta=h(T,"getDelta",this.update60Hz);var C=r(T,"runner",{}),A=r(C,"fps",!1),P=r(C,"fps",60),M=r(C,"delta",1e3/P),O=r(C,"deltaMin",1e3/P),I=r(C,"deltaMax",1e3/(P*.5));A||(P=1e3/M),this.runner={fps:P,correction:r(C,"correction",1),deltaSampleSize:r(C,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:r(C,"isFixed",!1),delta:M,deltaMin:O,deltaMax:I},this.autoUpdate=h(T,"autoUpdate",!0);var N=h(T,"debug",!1);if(this.drawDebug=typeof N=="object"?!0:N,this.debugGraphic,this.debugConfig={showAxes:r(N,"showAxes",!1),showAngleIndicator:r(N,"showAngleIndicator",!1),angleColor:r(N,"angleColor",15208787),showBroadphase:r(N,"showBroadphase",!1),broadphaseColor:r(N,"broadphaseColor",16757760),showBounds:r(N,"showBounds",!1),boundsColor:r(N,"boundsColor",16777215),showVelocity:r(N,"showVelocity",!1),velocityColor:r(N,"velocityColor",44783),showCollisions:r(N,"showCollisions",!1),collisionColor:r(N,"collisionColor",16094476),showSeparations:r(N,"showSeparations",!1),separationColor:r(N,"separationColor",16753920),showBody:r(N,"showBody",!0),showStaticBody:r(N,"showStaticBody",!0),showInternalEdges:r(N,"showInternalEdges",!1),renderFill:r(N,"renderFill",!1),renderLine:r(N,"renderLine",!0),fillColor:r(N,"fillColor",1075465),fillOpacity:r(N,"fillOpacity",1),lineColor:r(N,"lineColor",2678297),lineOpacity:r(N,"lineOpacity",1),lineThickness:r(N,"lineThickness",1),staticFillColor:r(N,"staticFillColor",857979),staticLineColor:r(N,"staticLineColor",1255396),showSleeping:r(N,"showSleeping",!1),staticBodySleepOpacity:r(N,"staticBodySleepOpacity",.7),sleepFillColor:r(N,"sleepFillColor",4605510),sleepLineColor:r(N,"sleepLineColor",10066585),showSensors:r(N,"showSensors",!0),sensorFillColor:r(N,"sensorFillColor",857979),sensorLineColor:r(N,"sensorLineColor",1255396),showPositions:r(N,"showPositions",!0),positionSize:r(N,"positionSize",4),positionColor:r(N,"positionColor",14697178),showJoint:r(N,"showJoint",!0),jointColor:r(N,"jointColor",14737474),jointLineOpacity:r(N,"jointLineOpacity",1),jointLineThickness:r(N,"jointLineThickness",2),pinSize:r(N,"pinSize",4),pinColor:r(N,"pinColor",4382944),springColor:r(N,"springColor",14697184),anchorColor:r(N,"anchorColor",15724527),anchorSize:r(N,"anchorSize",4),showConvexHulls:r(N,"showConvexHulls",!1),hullColor:r(N,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),r(T,"setBounds",!1)){var Y=T.setBounds;if(typeof Y=="boolean")this.setBounds();else{var X=r(Y,"x",0),W=r(Y,"y",0),H=r(Y,"width",y.sys.scale.width),D=r(Y,"height",y.sys.scale.height),L=r(Y,"thickness",64),B=r(Y,"left",!0),G=r(Y,"right",!0),w=r(Y,"top",!0),z=r(Y,"bottom",!0);this.setBounds(X,W,H,D,L,B,G,w,z)}}},setCompositeRenderStyle:function(x){var y=x.bodies,T=x.constraints,E=x.composites,C,A,P;for(C=0;C<y.length;C++)A=y[C],P=A.render,this.setBodyRenderStyle(A,P.lineColor,P.lineOpacity,P.lineThickness,P.fillColor,P.fillOpacity);for(C=0;C<T.length;C++)A=T[C],P=A.render,this.setConstraintRenderStyle(A,P.lineColor,P.lineOpacity,P.lineThickness,P.pinSize,P.anchorColor,P.anchorSize);for(C=0;C<E.length;C++)A=E[C],this.setCompositeRenderStyle(A);return this},setBodyRenderStyle:function(x,y,T,E,C,A){var P=x.render,M=this.debugConfig;return P?(y==null&&(y=x.isStatic?M.staticLineColor:M.lineColor),T==null&&(T=M.lineOpacity),E==null&&(E=M.lineThickness),C==null&&(C=x.isStatic?M.staticFillColor:M.fillColor),A==null&&(A=M.fillOpacity),y!==!1&&(P.lineColor=y),T!==!1&&(P.lineOpacity=T),E!==!1&&(P.lineThickness=E),C!==!1&&(P.fillColor=C),A!==!1&&(P.fillOpacity=A),this):this},setConstraintRenderStyle:function(x,y,T,E,C,A,P){var M=x.render,O=this.debugConfig;if(!M)return this;if(y==null){var I=M.type;I==="line"?y=O.jointColor:I==="pin"?y=O.pinColor:I==="spring"&&(y=O.springColor)}return T==null&&(T=O.jointLineOpacity),E==null&&(E=O.jointLineThickness),C==null&&(C=O.pinSize),A==null&&(A=O.anchorColor),P==null&&(P=O.anchorSize),y!==!1&&(M.lineColor=y),T!==!1&&(M.lineOpacity=T),E!==!1&&(M.lineThickness=E),C!==!1&&(M.pinSize=C),A!==!1&&(M.anchorColor=A),P!==!1&&(M.anchorSize=P),this},setEventsProxy:function(){var x=this,y=this.engine,T=this.localWorld;this.drawDebug&&(v.on(T,"compositeModified",function(E){x.setCompositeRenderStyle(E)}),v.on(T,"beforeAdd",function(E){for(var C=[].concat(E.object),A=0;A<C.length;A++){var P=C[A],M=P.render;P.type==="body"?x.setBodyRenderStyle(P,M.lineColor,M.lineOpacity,M.lineThickness,M.fillColor,M.fillOpacity):P.type==="composite"?x.setCompositeRenderStyle(P):P.type==="constraint"&&x.setConstraintRenderStyle(P,M.lineColor,M.lineOpacity,M.lineThickness,M.pinSize,M.anchorColor,M.anchorSize)}})),v.on(T,"beforeAdd",function(E){x.emit(l.BEFORE_ADD,E)}),v.on(T,"afterAdd",function(E){x.emit(l.AFTER_ADD,E)}),v.on(T,"beforeRemove",function(E){x.emit(l.BEFORE_REMOVE,E)}),v.on(T,"afterRemove",function(E){x.emit(l.AFTER_REMOVE,E)}),v.on(y,"beforeUpdate",function(E){x.emit(l.BEFORE_UPDATE,E)}),v.on(y,"afterUpdate",function(E){x.emit(l.AFTER_UPDATE,E)}),v.on(y,"collisionStart",function(E){var C=E.pairs,A,P;C.length>0&&(A=C[0].bodyA,P=C[0].bodyB),x.emit(l.COLLISION_START,E,A,P)}),v.on(y,"collisionActive",function(E){var C=E.pairs,A,P;C.length>0&&(A=C[0].bodyA,P=C[0].bodyB),x.emit(l.COLLISION_ACTIVE,E,A,P)}),v.on(y,"collisionEnd",function(E){var C=E.pairs,A,P;C.length>0&&(A=C[0].bodyA,P=C[0].bodyB),x.emit(l.COLLISION_END,E,A,P)})},setBounds:function(x,y,T,E,C,A,P,M,O){return x===void 0&&(x=0),y===void 0&&(y=0),T===void 0&&(T=this.scene.sys.scale.width),E===void 0&&(E=this.scene.sys.scale.height),C===void 0&&(C=64),A===void 0&&(A=!0),P===void 0&&(P=!0),M===void 0&&(M=!0),O===void 0&&(O=!0),this.updateWall(A,"left",x-C,y-C,C,E+C*2),this.updateWall(P,"right",x+T,y-C,C,E+C*2),this.updateWall(M,"top",x,y-C,T,C),this.updateWall(O,"bottom",x,y+E,T,C),this},updateWall:function(x,y,T,E,C,A){var P=this.walls[y];x?(P&&p.remove(this.localWorld,P),T+=C/2,E+=A/2,this.walls[y]=this.create(T,E,C,A,{isStatic:!0,friction:0,frictionStatic:0})):(P&&p.remove(this.localWorld,P),this.walls[y]=null)},createDebugGraphic:function(){var x=this.scene.sys.add.graphics({x:0,y:0});return x.setDepth(Number.MAX_VALUE),this.debugGraphic=x,this.drawDebug=!0,x},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(x,y,T){return x===void 0&&(x=0),y===void 0&&(y=1),this.localWorld.gravity.x=x,this.localWorld.gravity.y=y,T!==void 0&&(this.localWorld.gravity.scale=T),this},create:function(x,y,T,E,C){var A=e.rectangle(x,y,T,E,C);return p.add(this.localWorld,A),A},add:function(x){return p.add(this.localWorld,x),this},remove:function(x,y){Array.isArray(x)||(x=[x]);for(var T=0;T<x.length;T++){var E=x[T],C=E.body?E.body:E;s.remove(this.localWorld,C,y)}return this},removeConstraint:function(x,y){return s.remove(this.localWorld,x,y),this},convertTilemapLayer:function(x,y){var T=x.layer,E=x.getTilesWithin(0,0,T.width,T.height,{isColliding:!0});return this.convertTiles(E,y),this},convertTiles:function(x,y){if(x.length===0)return this;for(var T=0;T<x.length;T++)new d(this,x[T],y);return this},nextGroup:function(x){return f.nextGroup(x)},nextCategory:function(){return f.nextCategory()},pause:function(){return this.enabled=!1,this.emit(l.PAUSE),this},resume:function(){return this.enabled=!0,this.emit(l.RESUME),this},update:function(x,y){if(!(!this.enabled||!this.autoUpdate)){var T=this.engine,E=this.runner,C=T.timing,A=this.correction;E.isFixed?y=this.getDelta(x,y):(y=x-E.timePrev||E.delta,E.timePrev=x,E.deltaHistory.push(y),E.deltaHistory=E.deltaHistory.slice(-E.deltaSampleSize),y=Math.min.apply(null,E.deltaHistory),y=y<E.deltaMin?E.deltaMin:y,y=y>E.deltaMax?E.deltaMax:y,A=y/E.delta,E.delta=y),E.timeScalePrev!==0&&(A*=C.timeScale/E.timeScalePrev),C.timeScale===0&&(A=0),E.timeScalePrev=C.timeScale,E.correction=A,E.frameCounter+=1,x-E.counterTimestamp>=1e3&&(E.fps=E.frameCounter*((x-E.counterTimestamp)/1e3),E.counterTimestamp=x,E.frameCounter=0),i.update(T,y,A)}},step:function(x,y){i.update(this.engine,x,y)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(x){var y=x.hasOwnProperty("body")?x.body:x;return s.get(this.localWorld,y.id,y.type)!==null},getAllBodies:function(){return s.allBodies(this.localWorld)},getAllConstraints:function(){return s.allConstraints(this.localWorld)},getAllComposites:function(){return s.allComposites(this.localWorld)},postUpdate:function(){if(!!this.drawDebug){var x=this.debugConfig,y=this.engine,T=this.debugGraphic,E=s.allBodies(this.localWorld);this.debugGraphic.clear(),x.showBroadphase&&y.broadphase.controller&&this.renderGrid(y.broadphase,T,x.broadphaseColor,.5),x.showBounds&&this.renderBodyBounds(E,T,x.boundsColor,.5),(x.showBody||x.showStaticBody)&&this.renderBodies(E),x.showJoint&&this.renderJoints(),(x.showAxes||x.showAngleIndicator)&&this.renderBodyAxes(E,T,x.showAxes,x.angleColor,.5),x.showVelocity&&this.renderBodyVelocity(E,T,x.velocityColor,1,2),x.showSeparations&&this.renderSeparations(y.pairs.list,T,x.separationColor),x.showCollisions&&this.renderCollisions(y.pairs.list,T,x.collisionColor)}},renderGrid:function(x,y,T,E){y.lineStyle(1,T,E);for(var C=a.keys(x.buckets),A=0;A<C.length;A++){var P=C[A];if(!(x.buckets[P].length<2)){var M=P.split(/C|R/);y.strokeRect(parseInt(M[1],10)*x.bucketWidth,parseInt(M[2],10)*x.bucketHeight,x.bucketWidth,x.bucketHeight)}}return this},renderSeparations:function(x,y,T){y.lineStyle(1,T,1);for(var E=0;E<x.length;E++){var C=x[E];if(!!C.isActive){var A=C.collision,P=A.bodyA,M=A.bodyB,O=P.position,I=M.position,N=A.penetration,Y=!P.isStatic&&!M.isStatic?4:1;M.isStatic&&(Y=0),y.lineBetween(I.x,I.y,I.x-N.x*Y,I.y-N.y*Y),Y=!P.isStatic&&!M.isStatic?4:1,P.isStatic&&(Y=0),y.lineBetween(O.x,O.y,O.x-N.x*Y,O.y-N.y*Y)}}return this},renderCollisions:function(x,y,T){y.lineStyle(1,T,.5),y.fillStyle(T,1);var E,C;for(E=0;E<x.length;E++)if(C=x[E],!!C.isActive)for(var A=0;A<C.activeContacts.length;A++){var P=C.activeContacts[A],M=P.vertex;y.fillRect(M.x-2,M.y-2,5,5)}for(E=0;E<x.length;E++)if(C=x[E],!!C.isActive){var O=C.collision,I=C.activeContacts;if(I.length>0){var N=I[0].vertex.x,Y=I[0].vertex.y;I.length===2&&(N=(I[0].vertex.x+I[1].vertex.x)/2,Y=(I[0].vertex.y+I[1].vertex.y)/2),O.bodyB===O.supports[0].body||O.bodyA.isStatic?y.lineBetween(N-O.normal.x*8,Y-O.normal.y*8,N,Y):y.lineBetween(N+O.normal.x*8,Y+O.normal.y*8,N,Y)}}return this},renderBodyBounds:function(x,y,T,E){y.lineStyle(1,T,E);for(var C=0;C<x.length;C++){var A=x[C];if(!!A.render.visible){var P=A.bounds;if(P)y.strokeRect(P.min.x,P.min.y,P.max.x-P.min.x,P.max.y-P.min.y);else for(var M=A.parts,O=M.length>1?1:0;O<M.length;O++){var I=M[O];y.strokeRect(I.bounds.min.x,I.bounds.min.y,I.bounds.max.x-I.bounds.min.x,I.bounds.max.y-I.bounds.min.y)}}}return this},renderBodyAxes:function(x,y,T,E,C){y.lineStyle(1,E,C);for(var A=0;A<x.length;A++){var P=x[A],M=P.parts;if(!!P.render.visible){var O,I,N;if(T)for(I=M.length>1?1:0;I<M.length;I++)for(O=M[I],N=0;N<O.axes.length;N++){var Y=O.axes[N];y.lineBetween(O.position.x,O.position.y,O.position.x+Y.x*20,O.position.y+Y.y*20)}else for(I=M.length>1?1:0;I<M.length;I++)for(O=M[I],N=0;N<O.axes.length;N++)y.lineBetween(O.position.x,O.position.y,(O.vertices[0].x+O.vertices[O.vertices.length-1].x)/2,(O.vertices[0].y+O.vertices[O.vertices.length-1].y)/2)}}return this},renderBodyVelocity:function(x,y,T,E,C){y.lineStyle(C,T,E);for(var A=0;A<x.length;A++){var P=x[A];!P.render.visible||y.lineBetween(P.position.x,P.position.y,P.position.x+(P.position.x-P.positionPrev.x)*2,P.position.y+(P.position.y-P.positionPrev.y)*2)}return this},renderBodies:function(x){for(var y=this.debugGraphic,T=this.debugConfig,E=T.showBody,C=T.showStaticBody,A=T.showSleeping,P=T.showInternalEdges,M=T.showConvexHulls,O=T.renderFill,I=T.renderLine,N=T.staticBodySleepOpacity,Y=T.sleepFillColor,X=T.sleepLineColor,W=T.hullColor,H=0;H<x.length;H++){var D=x[H];if(!!D.render.visible&&!(!C&&D.isStatic||!E&&!D.isStatic)){var L=D.render.lineColor,B=D.render.lineOpacity,G=D.render.lineThickness,w=D.render.fillColor,z=D.render.fillOpacity;A&&D.isSleeping&&(D.isStatic?(B*=N,z*=N):(L=X,w=Y)),O||(w=null),I||(L=null),this.renderBody(D,y,P,L,B,G,w,z);var U=D.parts.length;M&&U>1&&this.renderConvexHull(D,y,W,G)}}},renderBody:function(x,y,T,E,C,A,P,M){E===void 0&&(E=null),C===void 0&&(C=null),A===void 0&&(A=1),P===void 0&&(P=null),M===void 0&&(M=null);for(var O=this.debugConfig,I=O.sensorFillColor,N=O.sensorLineColor,Y=x.parts,X=Y.length,W=X>1?1:0;W<X;W++){var H=Y[W],D=H.render,L=D.opacity;if(!(!D.visible||L===0||H.isSensor&&!O.showSensors)){var B=H.circleRadius;if(y.beginPath(),H.isSensor?(P!==null&&y.fillStyle(I,M*L),E!==null&&y.lineStyle(A,N,C*L)):(P!==null&&y.fillStyle(P,M*L),E!==null&&y.lineStyle(A,E,C*L)),B)y.arc(H.position.x,H.position.y,B,0,2*Math.PI);else{var G=H.vertices,w=G.length;y.moveTo(G[0].x,G[0].y);for(var z=1;z<w;z++){var U=G[z];if(!G[z-1].isInternal||T?y.lineTo(U.x,U.y):y.moveTo(U.x,U.y),z<w&&U.isInternal&&!T){var V=(z+1)%w;y.moveTo(G[V].x,G[V].y)}}y.closePath()}P!==null&&y.fillPath(),E!==null&&y.strokePath()}}if(O.showPositions&&!x.isStatic){var Z=x.position.x,$=x.position.y,Q=Math.ceil(O.positionSize/2);y.fillStyle(O.positionColor,1),y.fillRect(Z-Q,$-Q,O.positionSize,O.positionSize)}return this},renderConvexHull:function(x,y,T,E){E===void 0&&(E=1);var C=x.parts,A=C.length;if(A>1){var P=x.vertices;y.lineStyle(E,T),y.beginPath(),y.moveTo(P[0].x,P[0].y);for(var M=1;M<P.length;M++)y.lineTo(P[M].x,P[M].y);y.lineTo(P[0].x,P[0].y),y.strokePath()}return this},renderJoints:function(){for(var x=this.debugGraphic,y=s.allConstraints(this.localWorld),T=0;T<y.length;T++){var E=y[T].render,C=E.lineColor,A=E.lineOpacity,P=E.lineThickness,M=E.pinSize,O=E.anchorColor,I=E.anchorSize;this.renderConstraint(y[T],x,C,A,P,M,O,I)}},renderConstraint:function(x,y,T,E,C,A,P,M){var O=x.render;if(!O.visible||!x.pointA||!x.pointB)return this;y.lineStyle(C,T,E);var I=x.bodyA,N=x.bodyB,Y,X;if(I?Y=g.add(I.position,x.pointA):Y=x.pointA,O.type==="pin")y.strokeCircle(Y.x,Y.y,A);else{if(N?X=g.add(N.position,x.pointB):X=x.pointB,y.beginPath(),y.moveTo(Y.x,Y.y),O.type==="spring")for(var W=g.sub(X,Y),H=g.perp(g.normalise(W)),D=Math.ceil(a.clamp(x.length/5,12,20)),L,B=1;B<D;B+=1)L=B%2==0?1:-1,y.lineTo(Y.x+W.x*(B/D)+H.x*L*4,Y.y+W.y*(B/D)+H.y*L*4);y.lineTo(X.x,X.y)}return y.strokePath(),O.anchors&&M>0&&(y.fillStyle(P),y.fillCircle(Y.x,Y.y,M),y.fillCircle(X.x,X.y,M)),this},resetCollisionIDs:function(){return u._nextCollidingGroupId=1,u._nextNonCollidingGroupId=-1,u._nextCategory=1,this},shutdown:function(){v.off(this.engine),this.removeAllListeners(),p.clear(this.localWorld,!1),i.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});c.exports=m},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={BasePlugin:t(540),DefaultPlugins:t(197),PluginCache:t(24),PluginManager:t(414),ScenePlugin:t(1404)}},function(c,S,t){/**
* @author       Richard Davey <rich@photonstorm.com>
* @copyright    2020 Photon Storm Ltd.
* @license      {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
*/var e=t(540),u=t(0),o=t(20),a=new u({Extends:e,initialize:function(i,n,l){e.call(this,n),this.scene=i,this.systems=i.sys,this.pluginKey=l,i.sys.events.once(o.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Canvas:t(1406),Events:t(91),Snapshot:t(1407),WebGL:t(1408)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={CanvasRenderer:t(368),GetBlendModes:t(370),SetTransform:t(30)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Canvas:t(369),WebGL:t(383)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(107),u=t(17),o={PipelineManager:t(372),Pipelines:t(1409),RenderTarget:t(141),Utils:t(12),WebGLPipeline:t(58),WebGLRenderer:t(371),WebGLShader:t(375)};o=u(!1,o,e),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(92),u=t(17),o={BitmapMaskPipeline:t(373),Events:t(374),GraphicsPipeline:t(376),LightPipeline:t(377),MultiPipeline:t(108),PointLightPipeline:t(378),PostFXPipeline:t(1410),RopePipeline:t(379),SinglePipeline:t(380),UtilityPipeline:t(381)};o=u(!1,o,e),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(198),o=t(2),a=t(1411),s=t(382),i=t(58),n=new e({Extends:i,initialize:function(r){r.renderTarget=o(r,"renderTarget",1),r.fragShader=o(r,"fragShader",a),r.vertShader=o(r,"vertShader",s),r.attributes=o(r,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),r.batchSize=1,r.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],i.call(this,r),this.isPostFX=!0,this.gameObject,this.colorMatrix=new u,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){i.prototype.boot.call(this);var l=this.manager.UTILITY_PIPELINE;this.fullFrame1=l.fullFrame1,this.fullFrame2=l.fullFrame2,this.halfFrame1=l.halfFrame1,this.halfFrame2=l.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(l){this.bindAndDraw(l)},copyFrame:function(l,r,h,f,v){this.manager.copyFrame(l,r,h,f,v)},copyToGame:function(l){this.manager.copyToGame(l)},drawFrame:function(l,r,h){this.manager.drawFrame(l,r,h,this.colorMatrix)},blendFrames:function(l,r,h,f,v){this.manager.blendFrames(l,r,h,f,v)},blendFramesAdditive:function(l,r,h,f,v){this.manager.blendFramesAdditive(l,r,h,f,v)},clearFrame:function(l,r){this.manager.clearFrame(l,r)},blitFrame:function(l,r,h,f,v,d){this.manager.blitFrame(l,r,h,f,v,d)},copyFrameRect:function(l,r,h,f,v,d,p,g){this.manager.copyFrameRect(l,r,h,f,v,d,p,g)},bindAndDraw:function(l,r,h,f,v){h===void 0&&(h=!0),f===void 0&&(f=!0);var d=this.gl,p=this.renderer;this.bind(v),this.set1i("uMainSampler",0),r?(d.viewport(0,0,r.width,r.height),d.bindFramebuffer(d.FRAMEBUFFER,r.framebuffer),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,r.texture,0),h&&(f?d.clearColor(0,0,0,0):d.clearColor(0,0,0,1),d.clear(d.COLOR_BUFFER_BIT))):(p.popFramebuffer(!1,!1,!1),p.currentFramebuffer||d.viewport(0,0,p.width,p.height)),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,l.texture),d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.STATIC_DRAW),d.drawArrays(d.TRIANGLES,0,6),r?(d.bindTexture(d.TEXTURE_2D,null),d.bindFramebuffer(d.FRAMEBUFFER,null)):p.resetTextures()}});c.exports=n},function(c,S){c.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{","    gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join(`
`)},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(17),u=t(201),o={Center:t(403),Events:t(104),Orientation:t(404),ScaleManager:t(415),ScaleModes:t(405),Zoom:t(406)};o=e(!1,o,u.CENTER),o=e(!1,o,u.ORIENTATION),o=e(!1,o,u.SCALE_MODE),o=e(!1,o,u.ZOOM),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(144),u=t(17),o={Events:t(20),GetPhysicsPlugins:t(419),GetScenePlugins:t(420),SceneManager:t(417),ScenePlugin:t(1414),Settings:t(421),Systems:t(204)};o=u(!1,o,e),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(18),u=t(0),o=t(20),a=t(2),s=t(24),i=new u({initialize:function(l){this.scene=l,this.systems=l.sys,this.settings=l.sys.settings,this.key=l.sys.settings.key,this.manager=l.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,l.sys.events.once(o.BOOT,this.boot,this),l.sys.events.on(o.START,this.pluginStart,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(o.SHUTDOWN,this.shutdown,this)},start:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",n,l),this},restart:function(n){var l=this.key;return this.manager.queueOp("stop",l),this.manager.queueOp("start",l,n),this},transition:function(n){n===void 0&&(n={});var l=a(n,"target",!1),r=this.manager.getScene(l);if(!l||!this.checkValidTransition(r))return!1;var h=a(n,"duration",1e3);this._elapsed=0,this._target=r,this._duration=h,this._willSleep=a(n,"sleep",!1),this._willRemove=a(n,"remove",!1);var f=a(n,"onUpdate",null);f&&(this._onUpdate=f,this._onUpdateScope=a(n,"onUpdateScope",this.scene));var v=a(n,"allowInput",!1);this.settings.transitionAllowInput=v;var d=r.sys.settings;return d.isTransition=!0,d.transitionFrom=this.scene,d.transitionDuration=h,d.transitionAllowInput=v,a(n,"moveAbove",!1)?this.manager.moveAbove(this.key,l):a(n,"moveBelow",!1)&&this.manager.moveBelow(this.key,l),r.sys.isSleeping()?r.sys.wake(a(n,"data")):this.manager.start(l,a(n,"data")),this.systems.events.emit(o.TRANSITION_OUT,r,h),this.systems.events.on(o.UPDATE,this.step,this),!0},checkValidTransition:function(n){return!(!n||n.sys.isActive()||n.sys.isTransitioning()||n===this.scene||this.systems.isTransitioning())},step:function(n,l){this._elapsed+=l,this.transitionProgress=e(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var n=this._target.sys,l=this._target.sys.settings;this.systems.events.off(o.UPDATE,this.step,this),n.events.emit(o.TRANSITION_COMPLETE,this.scene),l.isTransition=!1,l.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(n,l,r,h){return this.manager.add(n,l,r,h)},launch:function(n,l){return n&&n!==this.key&&this.manager.queueOp("start",n,l),this},run:function(n,l){return n&&n!==this.key&&this.manager.queueOp("run",n,l),this},pause:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("pause",n,l),this},resume:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("resume",n,l),this},sleep:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("sleep",n,l),this},wake:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("wake",n,l),this},switch:function(n){return n!==this.key&&this.manager.queueOp("switch",this.key,n),this},stop:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("stop",n,l),this},setActive:function(n,l,r){l===void 0&&(l=this.key);var h=this.manager.getScene(l);return h&&h.sys.setActive(n,r),this},setVisible:function(n,l){l===void 0&&(l=this.key);var r=this.manager.getScene(l);return r&&r.sys.setVisible(n),this},isSleeping:function(n){return n===void 0&&(n=this.key),this.manager.isSleeping(n)},isActive:function(n){return n===void 0&&(n=this.key),this.manager.isActive(n)},isPaused:function(n){return n===void 0&&(n=this.key),this.manager.isPaused(n)},isVisible:function(n){return n===void 0&&(n=this.key),this.manager.isVisible(n)},swapPosition:function(n,l){return l===void 0&&(l=this.key),n!==l&&this.manager.swapPosition(n,l),this},moveAbove:function(n,l){return l===void 0&&(l=this.key),n!==l&&this.manager.moveAbove(n,l),this},moveBelow:function(n,l){return l===void 0&&(l=this.key),n!==l&&this.manager.moveBelow(n,l),this},remove:function(n){return n===void 0&&(n=this.key),this.manager.remove(n),this},moveUp:function(n){return n===void 0&&(n=this.key),this.manager.moveUp(n),this},moveDown:function(n){return n===void 0&&(n=this.key),this.manager.moveDown(n),this},bringToTop:function(n){return n===void 0&&(n=this.key),this.manager.bringToTop(n),this},sendToBack:function(n){return n===void 0&&(n=this.key),this.manager.sendToBack(n),this},get:function(n){return this.manager.getScene(n)},getIndex:function(n){return n===void 0&&(n=this.key),this.manager.getIndex(n)},shutdown:function(){var n=this.systems.events;n.off(o.SHUTDOWN,this.shutdown,this),n.off(o.POST_UPDATE,this.step,this),n.off(o.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});s.register("ScenePlugin",i,"scenePlugin"),c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Events:t(438),List:t(110),Map:t(102),ProcessQueue:t(211),RTree:t(531),Set:t(149),Size:t(416)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(17),u=t(1417),o={CanvasTexture:t(423),Events:t(106),FilterMode:u,Frame:t(109),Parsers:t(425),Texture:t(206),TextureManager:t(422),TextureSource:t(424)};o=e(!1,o,u),c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={LINEAR:0,NEAREST:1};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(17),u=t(1419),o={Components:t(251),Parsers:t(1452),Formats:t(40),ImageCollection:t(576),ParseToTilemap:t(262),Tile:t(85),Tilemap:t(580),TilemapCreator:t(1459),TilemapFactory:t(1460),Tileset:t(122),TilemapLayer:t(581),Orientation:t(29),LayerData:t(120),MapData:t(121),ObjectLayer:t(572)};o=e(!1,o,u.ORIENTATION),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e={ORIENTATION:t(29)};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=t(63),o=function(a,s,i,n,l,r,h,f){h===void 0&&(h=!0),a<0&&(a=0),s<0&&(s=0);for(var v=e(a,s,i,n,null,f),d=l-a,p=r-s,g=0;g<v.length;g++){var m=v[g].x+d,x=v[g].y+p;m>=0&&m<f.width&&x>=0&&x<f.height&&f.data[x][m]&&f.data[x][m].copy(v[g])}h&&u(l-1,r-1,i+2,n+2,f)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=t(542),o=function(a,s,i,n,l,r){i||(i={}),Array.isArray(a)||(a=[a]);var h=r.tilemapLayer;n||(n=h.scene),l||(l=n.cameras.main);var f=e(0,0,r.width,r.height,null,r),v=[],d;for(d=0;d<f.length;d++){var p=f[d];if(a.indexOf(p.index)!==-1){var g=h.tileToWorldXY(p.x,p.y,void 0,l,r);i.x=g.x,i.y=g.y,v.push(n.make.sprite(i))}}if(typeof s=="number")for(d=0;d<a.length;d++)u(a[d],s,0,0,r.width,r.height,r);else if(Array.isArray(s))for(d=0;d<a.length;d++)u(a[d],s[d],0,0,r.width,r.height,r);return v};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=t(63),o=t(72),a=function(s,i,n,l,r,h,f){for(var v=f.collideIndexes.indexOf(s)!==-1,d=e(i,n,l,r,null,f),p=0;p<d.length;p++)d[p].index=s,o(d[p],v);h&&u(i-1,n-1,l+2,r+2,f)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=function(o,a,s,i,n,l,r,h){var f=e(s,i,n,l,r,h);return f.filter(o,a)};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){u===void 0&&(u=0),o===void 0&&(o=!1);var s=0,i,n,l;if(o){for(n=a.height-1;n>=0;n--)for(i=a.width-1;i>=0;i--)if(l=a.data[n][i],l&&l.index===e){if(s===u)return l;s+=1}}else for(n=0;n<a.height;n++)for(i=0;i<a.width;i++)if(l=a.data[n][i],l&&l.index===e){if(s===u)return l;s+=1}return null};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=function(o,a,s,i,n,l,r,h){var f=e(s,i,n,l,r,h);return f.find(o,a)||null};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=function(o,a,s,i,n,l,r,h){var f=e(s,i,n,l,r,h);f.forEach(o,a)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(29),u=t(544),o=t(545),a=t(547),s=t(1),i=t(548),n=function(l){return l===e.ORTHOGONAL?u:l===e.HEXAGONAL?o:l===e.STAGGERED?i:l===e.ISOMETRIC?a:s};c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(158),u=t(3),o=new u,a=function(s,i,n,l,r){return r.tilemapLayer.worldToTileXY(s,i,!0,o,l),e(o.x,o.y,n,r)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(483),u=t(26),o=t(484),a=t(1),s=t(3),i=function(f,v){return o.RectangleToTriangle(v,f)},n=new s,l=new s,r=new s,h=function(f,v,d,p){if(f===void 0)return[];var g=a;f instanceof e.Circle?g=o.CircleToRectangle:f instanceof e.Rectangle?g=o.RectangleToRectangle:f instanceof e.Triangle?g=i:f instanceof e.Line&&(g=o.LineToRectangle),p.tilemapLayer.worldToTileXY(f.left,f.top,!0,l,d);var m=l.x,x=l.y;p.tilemapLayer.worldToTileXY(f.right,f.bottom,!0,r,d);var y=Math.ceil(r.x),T=Math.ceil(r.y),E=Math.max(y-m,1),C=Math.max(T-x,1),A=u(m,x,E,C,v,p),P=p.tileWidth,M=p.tileHeight;p.tilemapLayer&&(P*=p.tilemapLayer.scaleX,M*=p.tilemapLayer.scaleY);for(var O=[],I=new e.Rectangle(0,0,P,M),N=0;N<A.length;N++){var Y=A[N];p.tilemapLayer.tileToWorldXY(Y.x,Y.y,n,d),I.x=n.x,I.y=n.y,g(f,I)&&O.push(Y)}return O};c.exports=h},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(29),u=t(1),o=t(253),a=function(s){return s===e.ORTHOGONAL?o:u};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(29),u=t(550),o=t(551),a=t(1),s=t(552),i=t(553),n=function(l){return l===e.ORTHOGONAL?i:l===e.ISOMETRIC?o:l===e.HEXAGONAL?u:l===e.STAGGERED?s:a};c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(29),u=t(554),o=t(1),a=t(555),s=t(254),i=function(n){return n===e.ORTHOGONAL?s:n===e.HEXAGONAL?u:n===e.STAGGERED?a:o};c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(29),u=t(1),o=t(255),a=function(s){return s===e.ORTHOGONAL?o:u};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(29),u=t(556),o=t(557),a=t(1),s=t(558),i=t(559),n=function(l){return l===e.ORTHOGONAL?i:l===e.ISOMETRIC?o:l===e.HEXAGONAL?u:l===e.STAGGERED?s:a};c.exports=n},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(29),u=t(560),o=t(1),a=t(561),s=t(256),i=function(n){return n===e.ORTHOGONAL?s:n===e.HEXAGONAL?u:n===e.STAGGERED?a:o};c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(562),u=t(3),o=new u,a=function(s,i,n,l){l.tilemapLayer.worldToTileXY(s,i,!0,o,n);var r=o.x,h=o.y;return e(r,h,l)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(257),u=t(3),o=new u,a=function(s,i,n,l,r,h){return h.tilemapLayer.worldToTileXY(i,n,!0,o,r,h),e(s,o.x,o.y,l,h)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(63),u=t(257),o=function(a,s,i,n,l){if(n===void 0&&(n=!0),!Array.isArray(a))return null;Array.isArray(a[0])||(a=[a]);for(var r=a.length,h=a[0].length,f=0;f<r;f++)for(var v=0;v<h;v++){var d=a[f][v];u(d,s+v,i+f,!1,l)}n&&e(s-1,i-1,h+2,r+2,l)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=t(210),o=function(a,s,i,n,l,r){var h,f=e(a,s,i,n,{},r);if(!l)for(l=[],h=0;h<f.length;h++)l.indexOf(f[h].index)===-1&&l.push(f[h].index);for(h=0;h<f.length;h++)f[h].index=u(l)};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(563),u=t(3),o=new u,a=function(s,i,n,l,r,h){return h.tilemapLayer.worldToTileXY(s,i,!0,o,r,h),e(o.x,o.y,n,l,h)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=t(397),o=new u(105,210,231,150),a=new u(243,134,48,200),s=new u(40,39,37,150),i=function(n,l,r){l===void 0&&(l={});var h=l.tileColor!==void 0?l.tileColor:o,f=l.collidingTileColor!==void 0?l.collidingTileColor:a,v=l.faceColor!==void 0?l.faceColor:s,d=e(0,0,r.width,r.height,null,r);n.translateCanvas(r.tilemapLayer.x,r.tilemapLayer.y),n.scaleCanvas(r.tilemapLayer.scaleX,r.tilemapLayer.scaleY);for(var p=0;p<d.length;p++){var g=d[p],m=g.width,x=g.height,y=g.pixelX,T=g.pixelY,E=g.collides?f:h;E!==null&&(n.fillStyle(E.color,E.alpha/255),n.fillRect(y,T,m,x)),y+=1,T+=1,m-=2,x-=2,v!==null&&(n.lineStyle(1,v.color,v.alpha/255),g.faceTop&&n.lineBetween(y,T,y+m,T),g.faceRight&&n.lineBetween(y+m,T,y+m,T+x),g.faceBottom&&n.lineBetween(y,T+x,y+m,T+x),g.faceLeft&&n.lineBetween(y,T,y,T+x))}};c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(72),u=t(63),o=t(160),a=function(s,i,n,l,r){i===void 0&&(i=!0),n===void 0&&(n=!0),r===void 0&&(r=!0),Array.isArray(s)||(s=[s]);for(var h=0;h<s.length;h++)o(s[h],i,l);if(r)for(var f=0;f<l.height;f++)for(var v=0;v<l.width;v++){var d=l.data[f][v];d&&s.indexOf(d.index)!==-1&&e(d,i)}n&&u(0,0,l.width,l.height,l)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(72),u=t(63),o=t(160),a=function(s,i,n,l,r,h){if(n===void 0&&(n=!0),l===void 0&&(l=!0),h===void 0&&(h=!0),!(s>i)){for(var f=s;f<=i;f++)o(f,n,r);if(h)for(var v=0;v<r.height;v++)for(var d=0;d<r.width;d++){var p=r.data[v][d];p&&p.index>=s&&p.index<=i&&e(p,n)}l&&u(0,0,r.width,r.height,r)}};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(72),u=t(63),o=t(160),a=function(s,i,n,l){i===void 0&&(i=!0),n===void 0&&(n=!0),Array.isArray(s)||(s=[s]);for(var r=0;r<l.height;r++)for(var h=0;h<l.width;h++){var f=l.data[r][h];f&&s.indexOf(f.index)===-1&&(e(f,i),o(f.index,i,l))}n&&u(0,0,l.width,l.height,l)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(72),u=t(63),o=t(126),a=function(s,i,n,l){i===void 0&&(i=!0),n===void 0&&(n=!0);for(var r=0;r<l.height;r++)for(var h=0;h<l.width;h++){var f=l.data[r][h];if(!!f){for(var v in s)if(!!o(f.properties,v)){var d=s[v];Array.isArray(d)||(d=[d]);for(var p=0;p<d.length;p++)f.properties[v]===d[p]&&e(f,i)}}}n&&u(0,0,l.width,l.height,l)};c.exports=a},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(72),u=t(63),o=function(a,s,i){a===void 0&&(a=!0),s===void 0&&(s=!0);for(var n=0;n<i.height;n++)for(var l=0;l<i.width;l++){var r=i.data[n][l];if(!!r){var h=r.getCollisionGroup();h&&h.objects&&h.objects.length>0&&e(r,a)}}s&&u(0,0,i.width,i.height,i)};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u,o,a){if(typeof e=="number")a.callbacks[e]=u!==null?{callback:u,callbackContext:o}:void 0;else for(var s=0,i=e.length;s<i;s++)a.callbacks[e[s]]=u!==null?{callback:u,callbackContext:o}:void 0};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=function(o,a,s,i,n,l,r){for(var h=e(o,a,s,i,null,r),f=0;f<h.length;f++)h[f].setCollisionCallback(n,l)};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=t(131),o=function(a,s,i,n,l){var r=e(a,s,i,n,null,l),h=r.map(function(v){return v.index});u(h);for(var f=0;f<r.length;f++)r[f].index=h[f]};c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=function(o,a,s,i,n,l,r){for(var h=e(s,i,n,l,null,r),f=0;f<h.length;f++)h[f]&&(h[f].index===o?h[f].index=a:h[f].index===a&&(h[f].index=o))};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(26),u=function(o,a,s,i,n,l){if(!!n){var r,h=e(o,a,s,i,null,l),f=0;for(r=0;r<n.length;r++)f+=n[r].weight;if(!(f<=0))for(r=0;r<h.length;r++){for(var v=Math.random()*f,d=0,p=-1,g=0;g<n.length;g++)if(d+=n[g].weight,v<=d){var m=n[g].index;p=Array.isArray(m)?m[Math.floor(Math.random()*m.length)]:m;break}h[r].index=p}}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={FromOrientationString:t(258),Parse:t(564),Parse2DArray:t(259),ParseCSV:t(565),Impact:t(1454),Tiled:t(1455)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){for(var o=0;o<e.length;o++){var a=e[o],s=o;if(a.name&&a.name!==""&&(s=a.name),Array.isArray(a.wangtiles)&&a.wangtiles.length>0){var i={},n={},l,r,h;if(Array.isArray(a.edgecolors))for(l=0;l<a.edgecolors.length;l++)h=1+l,r=a.edgecolors[l],r.name!==""&&(i[h]=r.name);if(Array.isArray(a.cornercolors))for(l=0;l<a.cornercolors.length;l++)h=1+l,r=a.cornercolors[l],r.name!==""&&(n[h]=r.name);if(Array.isArray(a.colors))for(l=0;l<a.colors.length;l++)r=a.colors[l],h=1+l,r.name!==""&&(i[h]=n[h]=r.name);for(var f=[i,n,i,n,i,n,i,n],v=0;v<a.wangtiles.length;v++){var d=a.wangtiles[v],p=u[d.tileid]||(u[d.tileid]={});p=p.wangid||(p.wangid={});for(var g=[],m=0;m<Math.min(f.length,d.wangid.length);m++){if(r=d.wangid[m],r===0){g.push(void 0);continue}var x=f[m][r];if(x!==void 0){g.push(x);continue}g.push(r)}p[s]=g}}}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ParseTileLayers:t(578),ParseTilesets:t(579),ParseWeltmeister:t(577)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={AssignTileProperties:t(567),Base64Decode:t(574),BuildTilesetIndex:t(568),CreateGroupLayer:t(161),ParseGID:t(261),ParseImageLayers:t(569),ParseJSONTiled:t(566),ParseObject:t(260),ParseObjectLayers:t(570),ParseTileLayers:t(573),ParseTilesets:t(575)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(1),u=t(1);e=t(1457),u=t(1458),c.exports={renderWebGL:e,renderCanvas:u}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(12),u=function(o,a,s){var i=a.cull(s),n=i.length,l=s.alpha*a.alpha;if(!(n===0||l<=0)){var r=a.gidMap,h=o.pipelines.set(a.pipeline,a),f=e.getTintAppendFloatAlpha,v=a.scrollFactorX,d=a.scrollFactorY,p=a.x,g=a.y,m=a.scaleX,x=a.scaleY;o.pipelines.preBatch(a);for(var y=0;y<n;y++){var T=i[y],E=r[T.index];if(!!E){var C=E.getTileTextureCoordinates(T.index);if(C!==null){var A=E.glTexture,P=h.setTexture2D(A,a),M=E.tileWidth,O=E.tileHeight,I=C.x,N=C.y,Y=E.tileWidth*.5,X=E.tileHeight*.5,W=f(T.tint,l*T.alpha);h.batchTexture(a,A,A.width,A.height,p+(Y+T.pixelX)*m,g+(X+T.pixelY)*x,T.width,T.height,m,x,T.rotation,T.flipX,T.flipY,v,d,Y,X,I,N,M,O,W,W,W,W,!1,0,0,s,null,!0,P)}}}o.pipelines.postBatch(a)}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(25),u=new e,o=new e,a=new e,s=function(i,n,l,r){var h=n.cull(l),f=h.length,v=l.alpha*n.alpha;if(!(f===0||v<=0)){var d=u,p=o,g=a;p.applyITRS(n.x,n.y,n.rotation,n.scaleX,n.scaleY),d.copyFrom(l.matrix);var m=i.currentContext,x=n.gidMap;m.save(),r?(d.multiplyWithOffset(r,-l.scrollX*n.scrollFactorX,-l.scrollY*n.scrollFactorY),p.e=n.x,p.f=n.y,d.multiply(p,g),g.copyToContext(m)):(p.e-=l.scrollX*n.scrollFactorX,p.f-=l.scrollY*n.scrollFactorY,p.copyToContext(m)),(!i.antialias||n.scaleX>1||n.scaleY>1)&&(m.imageSmoothingEnabled=!1);for(var y=0;y<f;y++){var T=h[y],E=x[T.index];if(!!E){var C=E.image.getSourceImage(),A=E.getTileTextureCoordinates(T.index);if(A!==null){var P=E.tileWidth,M=E.tileHeight,O=P*.5,I=M*.5;m.save(),m.translate(T.pixelX+O,T.pixelY+I),T.rotation!==0&&m.rotate(T.rotation),(T.flipX||T.flipY)&&m.scale(T.flipX?-1:1,T.flipY?-1:1),m.globalAlpha=v*T.alpha,m.drawImage(C,A.x,A.y,P,M,-O,-I,P,M),m.restore()}}}m.restore()}};c.exports=s},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(16),u=t(262);e.register("tilemap",function(o){var a=o!==void 0?o:{};return u(this.scene,a.key,a.tileWidth,a.tileHeight,a.width,a.height,a.data,a.insertNull)})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(5),u=t(262);e.register("tilemap",function(o,a,s,i,n,l,r){return o===null&&(o=void 0),a===null&&(a=void 0),s===null&&(s=void 0),i===null&&(i=void 0),n===null&&(n=void 0),u(this.scene,o,a,s,i,n,l,r)})},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Clock:t(1462),TimerEvent:t(582)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(0),u=t(24),o=t(20),a=t(582),s=t(93),i=new e({initialize:function(l){this.scene=l,this.systems=l.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],l.sys.events.once(o.BOOT,this.boot,this),l.sys.events.on(o.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var n=this.systems.events;n.on(o.PRE_UPDATE,this.preUpdate,this),n.on(o.UPDATE,this.update,this),n.once(o.SHUTDOWN,this.shutdown,this)},addEvent:function(n){var l;return n instanceof a?(l=n,this.removeEvent(l),l.elapsed=l.startAt,l.hasDispatched=!1,l.repeatCount=l.repeat===-1||l.loop?999999999999:l.repeat):l=new a(n),this._pendingInsertion.push(l),l},delayedCall:function(n,l,r,h){return this.addEvent({delay:n,callback:l,args:r,callbackScope:h})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(n){Array.isArray(n)||(n=[n]);for(var l=0;l<n.length;l++){var r=n[l];s(this._pendingRemoval,r),s(this._pendingInsertion,r),s(this._active,r)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var n=this._pendingRemoval.length,l=this._pendingInsertion.length;if(!(n===0&&l===0)){var r,h;for(r=0;r<n;r++){h=this._pendingRemoval[r];var f=this._active.indexOf(h);f>-1&&this._active.splice(f,1),h.destroy()}for(r=0;r<l;r++)h=this._pendingInsertion[r],this._active.push(h);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(n,l){if(this.now=n,!this.paused){l*=this.timeScale;for(var r=0;r<this._active.length;r++){var h=this._active[r];if(!h.paused&&(h.elapsed+=l*h.timeScale,h.elapsed>=h.delay)){var f=h.elapsed-h.delay;h.elapsed=h.delay,!h.hasDispatched&&h.callback&&(h.hasDispatched=!0,h.callback.apply(h.callbackScope,h.args)),h.repeatCount>0?(h.repeatCount--,h.elapsed=f,h.hasDispatched=!1):this._pendingRemoval.push(h)}}}},shutdown:function(){var n;for(n=0;n<this._pendingInsertion.length;n++)this._pendingInsertion[n].destroy();for(n=0;n<this._active.length;n++)this._active[n].destroy();for(n=0;n<this._pendingRemoval.length;n++)this._pendingRemoval[n].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var l=this.systems.events;l.off(o.PRE_UPDATE,this.preUpdate,this),l.off(o.UPDATE,this.update,this),l.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});u.register("Clock",i,"time"),c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(100),u=t(17),o={Builders:t(1464),Events:t(267),TweenManager:t(1480),Tween:t(266),TweenData:t(268),Timeline:t(588)};o=u(!1,o,e),c.exports=o},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={GetBoolean:t(99),GetEaseFunction:t(80),GetNewValue:t(162),GetProps:t(583),GetTargets:t(263),GetTweens:t(584),GetValueOp:t(264),NumberTweenBuilder:t(585),StaggerBuilder:t(586),TimelineBuilder:t(587),TweenBuilder:t(163)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","loop","loopDelay","offset","onActive","onActiveParams","onActiveScope","onComplete","onCompleteParams","onCompleteScope","onLoop","onLoopParams","onLoopScope","onRepeat","onRepeatParams","onRepeatScope","onStart","onStartParams","onStartScope","onStop","onStopParams","onStopScope","onUpdate","onUpdateParams","onUpdateScope","onYoyo","onYoyoParams","onYoyoScope","paused","props","repeat","repeatDelay","targets","useFrames","yoyo"]},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="complete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="loop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pause"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resume"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="start"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="update"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="active"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="complete"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="loop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="repeat"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="start"},function(c,S){/**
 * @author       samme
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="stop"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="update"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="yoyo"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(93),u=t(0),o=t(585),a=t(24),s=t(20),i=t(586),n=t(587),l=t(100),r=t(163),h=new u({initialize:function(v){this.scene=v,this.systems=v.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,v.sys.events.once(s.BOOT,this.boot,this),v.sys.events.on(s.START,this.start,this)},boot:function(){this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){var f=this.systems.events;f.on(s.PRE_UPDATE,this.preUpdate,this),f.on(s.UPDATE,this.update,this),f.once(s.SHUTDOWN,this.shutdown,this),this.timeScale=1},createTimeline:function(f){return n(this,f)},timeline:function(f){var v=n(this,f);return v.paused||(this._add.push(v),this._toProcess++),v},create:function(f){return r(this,f)},add:function(f){var v=r(this,f);return this._add.push(v),this._toProcess++,v},existing:function(f){return this._add.push(f),this._toProcess++,this},addCounter:function(f){var v=o(this,f);return this._add.push(v),this._toProcess++,v},stagger:function(f,v){return i(f,v)},preUpdate:function(){if(this._toProcess!==0){var f=this._destroy,v=this._active,d=this._pending,p,g;for(p=0;p<f.length;p++){g=f[p];var m=v.indexOf(g);m===-1?(m=d.indexOf(g),m>-1&&(g.state=l.REMOVED,d.splice(m,1))):(g.state=l.REMOVED,v.splice(m,1))}for(f.length=0,f=this._add,p=0;p<f.length;p++)g=f[p],g.state===l.PENDING_ADD&&(g.init()?(g.play(),this._active.push(g)):this._pending.push(g));f.length=0,this._toProcess=0}},update:function(f,v){var d=this._active,p;v*=this.timeScale;for(var g=0;g<d.length;g++)p=d[g],p.update(f,v)&&(this._destroy.push(p),this._toProcess++)},remove:function(f){return e(this._add,f),e(this._pending,f),e(this._active,f),e(this._destroy,f),f.state=l.REMOVED,this},makeActive:function(f){if(this._add.indexOf(f)!==-1||this._active.indexOf(f)!==-1)return this;var v=this._pending.indexOf(f);return v!==-1&&this._pending.splice(v,1),this._add.push(f),f.state=l.PENDING_ADD,this._toProcess++,this},each:function(f,v){for(var d=[null],p=1;p<arguments.length;p++)d.push(arguments[p]);for(var g in this.list)d[0]=this.list[g],f.apply(v,d)},getAllTweens:function(){for(var f=this._active,v=[],d=0;d<f.length;d++)v.push(f[d]);return v},getGlobalTimeScale:function(){return this.timeScale},getTweensOf:function(f,v){v===void 0&&(v=!1);var d=this._active,p,g=[],m,x;for(Array.isArray(f)||(f=[f]),m=0;m<d.length;m++)for(p=d[m],x=0;x<f.length;x++)p.hasTarget(f[x])&&g.push(p);if(v)for(d=this._pending,m=0;m<d.length;m++)for(p=d[m],x=0;x<f.length;x++)p.hasTarget(f[x])&&g.push(p);return g},isTweening:function(f){for(var v=this._active,d,p=0;p<v.length;p++)if(d=v[p],d.hasTarget(f)&&d.isPlaying())return!0;return!1},killAll:function(){for(var f=this.getAllTweens(),v=0;v<f.length;v++)f[v].stop();return this},killTweensOf:function(f){for(var v=this.getTweensOf(f),d=0;d<v.length;d++)v[d].stop();return this},pauseAll:function(){for(var f=this._active,v=0;v<f.length;v++)f[v].pause();return this},resumeAll:function(){for(var f=this._active,v=0;v<f.length;v++)f[v].resume();return this},setGlobalTimeScale:function(f){return this.timeScale=f,this},shutdown:function(){this.killAll(),this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0;var f=this.systems.events;f.off(s.PRE_UPDATE,this.preUpdate,this),f.off(s.UPDATE,this.update,this),f.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(s.START,this.start,this),this.scene=null,this.systems=null}});a.register("TweenManager",h,"tweens"),c.exports=h},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Array:t(208),Base64:t(1482),Objects:t(1484),String:t(1488),NOOP:t(1)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={ArrayBufferToBase64:t(1483),Base64ToArrayBuffer:t(433)}},function(c,S){/**
 * @author       Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=function(u,o){for(var a=new Uint8Array(u),s=a.length,i=o?"data:"+o+";base64,":"",n=0;n<s;n+=3)i+=t[a[n]>>2],i+=t[(a[n]&3)<<4|a[n+1]>>4],i+=t[(a[n+1]&15)<<2|a[n+2]>>6],i+=t[a[n+2]&63];return s%3==2?i=i.substring(0,i.length-1)+"=":s%3==1&&(i=i.substring(0,i.length-2)+"=="),i};c.exports=e},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Clone:t(77),DeepCopy:t(175),Extend:t(17),GetAdvancedValue:t(13),GetFastValue:t(2),GetMinMaxValue:t(1485),GetValue:t(6),HasAll:t(1486),HasAny:t(455),HasValue:t(126),IsPlainObject:t(7),Merge:t(127),MergeRight:t(1487),Pick:t(571),SetValue:t(478)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(6),u=t(18),o=function(a,s,i,n,l){l===void 0&&(l=i);var r=e(a,s,l);return u(r,i,n)};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){for(var o=0;o<u.length;o++)if(!e.hasOwnProperty(u[o]))return!1;return!0};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(77),u=function(o,a){var s=e(o);for(var i in a)s.hasOwnProperty(i)&&(s[i]=a[i]);return s};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Format:t(1489),Pad:t(186),RemoveAt:t(1490),Reverse:t(1491),UppercaseFirst:t(205),UUID:t(222)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return e.replace(/%([0-9]+)/g,function(o,a){return u[Number(a)-1]})};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e,u){return u===0?e.slice(1):e.slice(0,u-1)+e.slice(u)};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t=function(e){return e.split("").reverse().join("")};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @author       Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={SoundManagerCreator:t(426),Events:t(70),BaseSound:t(146),BaseSoundManager:t(145),WebAudioSound:t(434),WebAudioSoundManager:t(432),HTML5AudioSound:t(429),HTML5AudioSoundManager:t(427),NoAudioSound:t(431),NoAudioSoundManager:t(430)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={Arcade:t(1366),Matter:t(1494)}},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports={BodyBounds:t(1392),Components:t(249),Events:t(272),Factory:t(1394),MatterGameObject:t(1395),Image:t(1396),Matter:t(594),MatterPhysics:t(1524),PolyDecomp:t(1393),Sprite:t(1397),TileBody:t(593),PhysicsEditorParser:t(589),PhysicsJSONParser:t(590),PointerConstraint:t(1398),World:t(1402)}},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setBounce:function(e){return this.body.restitution=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setCollisionCategory:function(e){return this.body.collisionFilter.category=e,this},setCollisionGroup:function(e){return this.body.collisionFilter.group=e,this},setCollidesWith:function(e){var u=0;if(!Array.isArray(e))u=e;else for(var o=0;o<e.length;o++)u|=e[o];return this.body.collisionFilter.mask=u,this},setOnCollide:function(e){return this.body.onCollideCallback=e,this},setOnCollideEnd:function(e){return this.body.onCollideEndCallback=e,this},setOnCollideActive:function(e){return this.body.onCollideActiveCallback=e,this},setOnCollideWith:function(e,u){Array.isArray(e)||(e=[e]);for(var o=0;o<e.length;o++){var a=e[o].hasOwnProperty("body")?e[o].body:e[o];this.body.setOnCollideWith(a,u)}return this}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(41),u={applyForce:function(o){return this._tempVec2.set(this.body.position.x,this.body.position.y),e.applyForce(this.body,this._tempVec2,o),this},applyForceFrom:function(o,a){return e.applyForce(this.body,o,a),this},thrust:function(o){var a=this.body.angle;return this._tempVec2.set(o*Math.cos(a),o*Math.sin(a)),e.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(o){var a=this.body.angle-Math.PI/2;return this._tempVec2.set(o*Math.cos(a),o*Math.sin(a)),e.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(o){var a=this.body.angle+Math.PI/2;return this._tempVec2.set(o*Math.cos(a),o*Math.sin(a)),e.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(o){var a=this.body.angle-Math.PI;return this._tempVec2.set(o*Math.cos(a),o*Math.sin(a)),e.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};c.exports=u},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setFriction:function(e,u,o){return this.body.friction=e,u!==void 0&&(this.body.frictionAir=u),o!==void 0&&(this.body.frictionStatic=o),this},setFrictionAir:function(e){return this.body.frictionAir=e,this},setFrictionStatic:function(e){return this.body.frictionStatic=e,this}};c.exports=t},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setIgnoreGravity:function(e){return this.body.ignoreGravity=e,this}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(41),u=t(3),o={setMass:function(a){return e.setMass(this.body,a),this},setDensity:function(a){return e.setDensity(this.body,a),this},centerOfMass:{get:function(){return new u(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};c.exports=o},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={setSensor:function(e){return this.body.isSensor=e,this},isSensor:function(){return this.body.isSensor}};c.exports=t},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(86),u=t(41),o=t(124),a=t(2),s=t(589),i=t(590),n=t(64),l={setRectangle:function(r,h,f){return this.setBody({type:"rectangle",width:r,height:h},f)},setCircle:function(r,h){return this.setBody({type:"circle",radius:r},h)},setPolygon:function(r,h,f){return this.setBody({type:"polygon",sides:h,radius:r},f)},setTrapezoid:function(r,h,f,v){return this.setBody({type:"trapezoid",width:r,height:h,slope:f},v)},setExistingBody:function(r,h){h===void 0&&(h=!0),this.body&&this.world.remove(this.body,!0),this.body=r;for(var f=0;f<r.parts.length;f++)r.parts[f].gameObject=this;var v=this;if(r.destroy=function(){v.world.remove(v.body,!0),v.body.gameObject=null},h&&(this.world.has(r)&&this.world.remove(r,!0),this.world.add(r)),this._originComponent){var d=r.render.sprite.xOffset,p=r.render.sprite.yOffset,g=r.centerOfMass.x,m=r.centerOfMass.y;if(o(g,.5)&&o(m,.5))this.setOrigin(d+.5,p+.5);else{var x=r.centerOffset.x,y=r.centerOffset.y;this.setOrigin(d+x/this.displayWidth,p+y/this.displayHeight)}}return this},setBody:function(r,h){if(!r)return this;var f;typeof r=="string"&&(r={type:r});var v=a(r,"type","rectangle"),d=a(r,"x",this._tempVec2.x),p=a(r,"y",this._tempVec2.y),g=a(r,"width",this.width),m=a(r,"height",this.height);switch(v){case"rectangle":f=e.rectangle(d,p,g,m,h);break;case"circle":var x=a(r,"radius",Math.max(g,m)/2),y=a(r,"maxSides",25);f=e.circle(d,p,x,h,y);break;case"trapezoid":var T=a(r,"slope",.5);f=e.trapezoid(d,p,g,m,T,h);break;case"polygon":var E=a(r,"sides",5),C=a(r,"radius",Math.max(g,m)/2);f=e.polygon(d,p,E,C,h);break;case"fromVertices":case"fromVerts":var A=a(r,"verts",null);if(A)if(typeof A=="string"&&(A=n.fromPath(A)),this.body&&!this.body.hasOwnProperty("temp"))u.setVertices(this.body,A),f=this.body;else{var P=a(r,"flagInternal",!1),M=a(r,"removeCollinear",.01),O=a(r,"minimumArea",10);f=e.fromVertices(d,p,A,h,P,M,O)}break;case"fromPhysicsEditor":f=s.parseBody(d,p,r,h);break;case"fromPhysicsTracer":f=i.parseBody(d,p,r,h);break}return f&&this.setExistingBody(f,r.addToWorld),this}};c.exports=l},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(272),u=t(165),o=t(166),a={setToSleep:function(){return u.set(this.body,!0),this},setAwake:function(){return u.set(this.body,!1),this},setSleepThreshold:function(s){return s===void 0&&(s=60),this.body.sleepThreshold=s,this},setSleepEvents:function(s,i){return this.setSleepStartEvent(s),this.setSleepEndEvent(i),this},setSleepStartEvent:function(s){if(s){var i=this.world;o.on(this.body,"sleepStart",function(n){i.emit(e.SLEEP_START,n,this)})}else o.off(this.body,"sleepStart");return this},setSleepEndEvent:function(s){if(s){var i=this.world;o.on(this.body,"sleepEnd",function(n){i.emit(e.SLEEP_END,n,this)})}else o.off(this.body,"sleepEnd");return this}};c.exports=a},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="afteradd"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="afterremove"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="afterupdate"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="beforeadd"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="beforeremove"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="beforeupdate"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="collisionactive"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="collisionend"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="collisionstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragend"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="drag"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="dragstart"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="pause"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="resume"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="sleepend"},function(c,S){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */c.exports="sleepstart"},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(41),u={setStatic:function(o){return e.setStatic(this.body,o),this},isStatic:function(){return this.body.isStatic}};c.exports=u},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(41),u=t(14),o=t(269),a=t(270),s=4,i={x:{get:function(){return this.body.position.x},set:function(n){this._tempVec2.set(n,this.y),e.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(n){this._tempVec2.set(this.x,n),e.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(n){var l=1/this._scaleX,r=1/this._scaleY;this._scaleX=n,this._scaleX===0?this.renderFlags&=~s:this.renderFlags|=s,e.scale(this.body,l,r),e.scale(this.body,n,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(n){var l=1/this._scaleX,r=1/this._scaleY;this._scaleY=n,this._scaleY===0?this.renderFlags&=~s:this.renderFlags|=s,e.scale(this.body,l,r),e.scale(this.body,this._scaleX,n)}},angle:{get:function(){return a(this.body.angle*u.RAD_TO_DEG)},set:function(n){this.rotation=a(n)*u.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(n){this._rotation=o(n),e.setAngle(this.body,this._rotation)}},setPosition:function(n,l){return n===void 0&&(n=0),l===void 0&&(l=n),this._tempVec2.set(n,l),e.setPosition(this.body,this._tempVec2),this},setRotation:function(n){return n===void 0&&(n=0),this._rotation=o(n),e.setAngle(this.body,n),this},setFixedRotation:function(){return e.setInertia(this.body,1/0),this},setAngle:function(n){return n===void 0&&(n=0),this.angle=n,e.setAngle(this.body,this.rotation),this},setScale:function(n,l,r){n===void 0&&(n=1),l===void 0&&(l=n);var h=1/this._scaleX,f=1/this._scaleY;return this._scaleX=n,this._scaleY=l,e.scale(this.body,h,f,r),e.scale(this.body,n,l,r),this}};c.exports=i},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(41),u={setAngularVelocity:function(o){return e.setAngularVelocity(this.body,o),this},setVelocityX:function(o){return this._tempVec2.set(o,this.body.velocity.y),e.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(o){return this._tempVec2.set(this.body.velocity.x,o),e.setVelocity(this.body,this._tempVec2),this},setVelocity:function(o,a){return this._tempVec2.set(o,a),e.setVelocity(this.body,this._tempVec2),this}};c.exports=u},function(c,S,t){var e={};c.exports=e;var u=t(118),o=t(32);(function(){e.create=function(a){var s={extended:!1,narrowDetections:0,narrowphaseTests:0,narrowReuse:0,narrowReuseCount:0,midphaseTests:0,broadphaseTests:0,narrowEff:1e-4,midEff:1e-4,broadEff:1e-4,collisions:0,buckets:0,bodies:0,pairs:0};return o.extend(s,!1,a)},e.reset=function(a){a.extended&&(a.narrowDetections=0,a.narrowphaseTests=0,a.narrowReuse=0,a.narrowReuseCount=0,a.midphaseTests=0,a.broadphaseTests=0,a.narrowEff=0,a.midEff=0,a.broadEff=0,a.collisions=0,a.buckets=0,a.pairs=0,a.bodies=0)},e.update=function(a,s){if(a.extended){var i=s.world,n=u.allBodies(i);a.collisions=a.narrowDetections,a.pairs=s.pairs.list.length,a.bodies=n.length,a.midEff=(a.narrowDetections/(a.midphaseTests||1)).toFixed(2),a.narrowEff=(a.narrowDetections/(a.narrowphaseTests||1)).toFixed(2),a.broadEff=(1-a.broadphaseTests/(n.length||1)).toFixed(2),a.narrowReuse=(a.narrowReuseCount/(a.narrowphaseTests||1)).toFixed(2)}}})()},function(c,S,t){/**
 * @author       Richard Davey <rich@photonstorm.com>
 * @copyright    2020 Photon Storm Ltd.
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var e=t(123),u=t(271),o=t(86),a=t(41),s=t(1392),i=t(84),n=t(0),l=t(118),r=t(591),h=t(128),f=t(273),v=t(50),d=t(1394),p=t(2),g=t(6),m=t(597),x=t(1525),y=t(1526),T=t(1399),E=t(1527),C=t(127),A=t(250),P=t(598),M=t(595),O=t(24),I=t(1400),N=t(599),Y=t(274),X=t(20),W=t(592),H=t(83),D=t(64),L=t(1402),B=new n({initialize:function(w){this.scene=w,this.systems=w.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=a,this.composite=l,this.detector=f,this.grid=m,this.pair=A,this.pairs=P,this.query=I,this.resolver=N,this.sat=Y,this.constraint=h,this.bodies=o,this.composites=r,this.axes=u,this.bounds=i,this.svg=W,this.vector=H,this.vertices=D,this.verts=D,this._tempVec2=H.create(),g(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),g(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),g(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),N._restingThresh=g(this.config,"restingThresh",4),N._restingThreshTangent=g(this.config,"restingThreshTangent",6),N._positionDampen=g(this.config,"positionDampen",.9),N._positionWarming=g(this.config,"positionWarming",.8),N._frictionNormalMultiplier=g(this.config,"frictionNormalMultiplier",5),w.sys.events.once(X.BOOT,this.boot,this),w.sys.events.on(X.START,this.start,this)},boot:function(){this.world=new L(this.scene,this.config),this.add=new d(this.world),this.bodyBounds=new s,this.systems.events.once(X.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new L(this.scene,this.config),this.add=new d(this.world));var G=this.systems.events;G.on(X.UPDATE,this.world.update,this.world),G.on(X.POST_UPDATE,this.world.postUpdate,this.world),G.once(X.SHUTDOWN,this.shutdown,this)},getConfig:function(){var G=this.systems.game.config.physics,w=this.systems.settings.physics,z=C(p(w,"matter",{}),p(G,"matter",{}));return z},enableAttractorPlugin:function(){return M.register(x),M.use(T,x),this},enableWrapPlugin:function(){return M.register(E),M.use(T,E),this},enableCollisionEventsPlugin:function(){return M.register(y),M.use(T,y),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(G,w){this.world.step(G,w)},containsPoint:function(G,w,z){G=this.getMatterBodies(G);var U=H.create(w,z),V=I.point(G,U);return V.length>0},intersectPoint:function(G,w,z){z=this.getMatterBodies(z);var U=H.create(G,w),V=[],Z=I.point(z,U);return Z.forEach(function($){V.indexOf($)===-1&&V.push($)}),V},intersectRect:function(G,w,z,U,V,Z){V===void 0&&(V=!1),Z=this.getMatterBodies(Z);var $={min:{x:G,y:w},max:{x:G+z,y:w+U}},Q=[],j=I.region(Z,$,V);return j.forEach(function(k){Q.indexOf(k)===-1&&Q.push(k)}),Q},intersectRay:function(G,w,z,U,V,Z){V===void 0&&(V=1),Z=this.getMatterBodies(Z);for(var $=[],Q=I.ray(Z,H.create(G,w),H.create(z,U),V),j=0;j<Q.length;j++)$.push(Q[j].body);return $},intersectBody:function(G,w){w=this.getMatterBodies(w);for(var z=[],U=I.collides(G,w),V=0;V<U.length;V++){var Z=U[V];Z.bodyA===G?z.push(Z.bodyB):z.push(Z.bodyA)}return z},overlap:function(G,w,z,U,V){z===void 0&&(z=null),U===void 0&&(U=null),V===void 0&&(V=z),Array.isArray(G)||(G=[G]),G=this.getMatterBodies(G),w=this.getMatterBodies(w);for(var Z=!1,$=0;$<G.length;$++)for(var Q=G[$],j=I.collides(Q,w),k=0;k<j.length;k++){var et=j[k],_=et.bodyA.id===Q.id?et.bodyB:et.bodyA;if(!U||U.call(V,Q,_,et)){if(Z=!0,z)z.call(V,Q,_,et);else if(!U)return!0}}return Z},setCollisionCategory:function(G,w){return G=this.getMatterBodies(G),G.forEach(function(z){z.collisionFilter.category=w}),this},setCollisionGroup:function(G,w){return G=this.getMatterBodies(G),G.forEach(function(z){z.collisionFilter.group=w}),this},setCollidesWith:function(G,w){G=this.getMatterBodies(G);var z=0;if(!Array.isArray(w))z=w;else for(var U=0;U<w.length;U++)z|=w[U];return G.forEach(function(V){V.collisionFilter.mask=z}),this},getMatterBodies:function(G){if(!G)return this.world.getAllBodies();Array.isArray(G)||(G=[G]);for(var w=[],z=0;z<G.length;z++){var U=G[z].hasOwnProperty("body")?G[z].body:G[z];w.push(U)}return w},setVelocity:function(G,w,z){G=this.getMatterBodies(G);var U=this._tempVec2;return U.x=w,U.y=z,G.forEach(function(V){a.setVelocity(V,U)}),this},setVelocityX:function(G,w){G=this.getMatterBodies(G);var z=this._tempVec2;return z.x=w,G.forEach(function(U){z.y=U.velocity.y,a.setVelocity(U,z)}),this},setVelocityY:function(G,w){G=this.getMatterBodies(G);var z=this._tempVec2;return z.y=w,G.forEach(function(U){z.x=U.velocity.x,a.setVelocity(U,z)}),this},setAngularVelocity:function(G,w){return G=this.getMatterBodies(G),G.forEach(function(z){a.setAngularVelocity(z,w)}),this},applyForce:function(G,w){G=this.getMatterBodies(G);var z=this._tempVec2;return G.forEach(function(U){z.x=U.position.x,z.y=U.position.y,a.applyForce(U,z,w)}),this},applyForceFromPosition:function(G,w,z,U){G=this.getMatterBodies(G);var V=this._tempVec2;return G.forEach(function(Z){U===void 0&&(U=Z.angle),V.x=z*Math.cos(U),V.y=z*Math.sin(U),a.applyForce(Z,w,V)}),this},applyForceFromAngle:function(G,w,z){G=this.getMatterBodies(G);var U=this._tempVec2;return G.forEach(function(V){z===void 0&&(z=V.angle),U.x=w*Math.cos(z),U.y=w*Math.sin(z),a.applyForce(V,{x:V.position.x,y:V.position.y},U)}),this},getConstraintLength:function(G){var w=G.pointA.x,z=G.pointA.y,U=G.pointB.x,V=G.pointB.y;return G.bodyA&&(w+=G.bodyA.position.x,z+=G.bodyA.position.y),G.bodyB&&(U+=G.bodyB.position.x,V+=G.bodyB.position.y),v(w,z,U,V)},alignBody:function(G,w,z,U){G=G.hasOwnProperty("body")?G.body:G;var V;switch(U){case e.TOP_LEFT:case e.LEFT_TOP:V=this.bodyBounds.getTopLeft(G,w,z);break;case e.TOP_CENTER:V=this.bodyBounds.getTopCenter(G,w,z);break;case e.TOP_RIGHT:case e.RIGHT_TOP:V=this.bodyBounds.getTopRight(G,w,z);break;case e.LEFT_CENTER:V=this.bodyBounds.getLeftCenter(G,w,z);break;case e.CENTER:V=this.bodyBounds.getCenter(G,w,z);break;case e.RIGHT_CENTER:V=this.bodyBounds.getRightCenter(G,w,z);break;case e.LEFT_BOTTOM:case e.BOTTOM_LEFT:V=this.bodyBounds.getBottomLeft(G,w,z);break;case e.BOTTOM_CENTER:V=this.bodyBounds.getBottomCenter(G,w,z);break;case e.BOTTOM_RIGHT:case e.RIGHT_BOTTOM:V=this.bodyBounds.getBottomRight(G,w,z);break}return V&&a.setPosition(G,V),this},shutdown:function(){var G=this.systems.events;this.world&&(G.off(X.UPDATE,this.world.update,this.world),G.off(X.POST_UPDATE,this.world.postUpdate,this.world)),G.off(X.SHUTDOWN,this.shutdown,this),this.add&&this.add.destroy(),this.world&&this.world.destroy(),this.add=null,this.world=null},destroy:function(){this.shutdown(),this.scene.sys.events.off(X.START,this.start,this),this.scene=null,this.systems=null}});O.register("MatterPhysics",B,"matterPhysics"),c.exports=B},function(c,S,t){var e=t(594),u={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.14.2",silent:!0,install:function(o){o.after("Body.create",function(){u.Body.init(this)}),o.before("Engine.update",function(a){u.Engine.update(a)})},Body:{init:function(o){o.plugin.attractors=o.plugin.attractors||[]}},Engine:{update:function(o){for(var a=e.Composite.allBodies(o.world),s=0;s<a.length;s++){var i=a[s],n=i.plugin.attractors;if(n&&n.length>0)for(var l=0;l<a.length;l++){var r=a[l];if(s!==l)for(var h=0;h<n.length;h++){var f=n[h],v=f;e.Common.isFunction(f)&&(v=f(i,r)),v&&e.Body.applyForce(r,r.position,v)}}}}},Attractors:{gravityConstant:.001,gravity:function(o,a){var s=e.Vector.sub(a.position,o.position),i=e.Vector.magnitudeSquared(s)||1e-4,n=e.Vector.normalise(s),l=-u.Attractors.gravityConstant*(o.mass*a.mass/i),r=e.Vector.mult(n,l);e.Body.applyForce(o,o.position,e.Vector.neg(r)),e.Body.applyForce(a,a.position,r)}}};c.exports=u},function(c,S){/**
 * @author       @dxu https://github.com/dxu/matter-collision-events
 * @author       Richard Davey <rich@photonstorm.com>
 * @license      {@link https://opensource.org/licenses/MIT|MIT License}
 */var t={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.14.2",silent:!0,install:function(e){e.after("Engine.create",function(){e.Events.on(this,"collisionStart",function(u){u.pairs.map(function(o){var a=o.bodyA,s=o.bodyB;a.gameObject&&a.gameObject.emit("collide",a,s,o),s.gameObject&&s.gameObject.emit("collide",s,a,o),e.Events.trigger(a,"onCollide",{pair:o}),e.Events.trigger(s,"onCollide",{pair:o}),a.onCollideCallback&&a.onCollideCallback(o),s.onCollideCallback&&s.onCollideCallback(o),a.onCollideWith[s.id]&&a.onCollideWith[s.id](s,o),s.onCollideWith[a.id]&&s.onCollideWith[a.id](a,o)})}),e.Events.on(this,"collisionActive",function(u){u.pairs.map(function(o){var a=o.bodyA,s=o.bodyB;a.gameObject&&a.gameObject.emit("collideActive",a,s,o),s.gameObject&&s.gameObject.emit("collideActive",s,a,o),e.Events.trigger(a,"onCollideActive",{pair:o}),e.Events.trigger(s,"onCollideActive",{pair:o}),a.onCollideActiveCallback&&a.onCollideActiveCallback(o),s.onCollideActiveCallback&&s.onCollideActiveCallback(o)})}),e.Events.on(this,"collisionEnd",function(u){u.pairs.map(function(o){var a=o.bodyA,s=o.bodyB;a.gameObject&&a.gameObject.emit("collideEnd",a,s,o),s.gameObject&&s.gameObject.emit("collideEnd",s,a,o),e.Events.trigger(a,"onCollideEnd",{pair:o}),e.Events.trigger(s,"onCollideEnd",{pair:o}),a.onCollideEndCallback&&a.onCollideEndCallback(o),s.onCollideEndCallback&&s.onCollideEndCallback(o)})})})}};c.exports=t},function(c,S,t){var e=t(594),u={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.14.2",silent:!0,install:function(o){o.after("Engine.update",function(){u.Engine.update(this)})},Engine:{update:function(o){for(var a=o.world,s=e.Composite.allBodies(a),i=e.Composite.allComposites(a),n=0;n<s.length;n+=1){var l=s[n];l.plugin.wrap&&u.Body.wrap(l,l.plugin.wrap)}for(n=0;n<i.length;n+=1){var r=i[n];r.plugin.wrap&&u.Composite.wrap(r,r.plugin.wrap)}}},Bounds:{wrap:function(o,a){var s=null,i=null;if(typeof a.min.x!="undefined"&&typeof a.max.x!="undefined"&&(o.min.x>a.max.x?s=a.min.x-o.max.x:o.max.x<a.min.x&&(s=a.max.x-o.min.x)),typeof a.min.y!="undefined"&&typeof a.max.y!="undefined"&&(o.min.y>a.max.y?i=a.min.y-o.max.y:o.max.y<a.min.y&&(i=a.max.y-o.min.y)),s!==null||i!==null)return{x:s||0,y:i||0}}},Body:{wrap:function(o,a){var s=u.Bounds.wrap(o.bounds,a);return s&&e.Body.translate(o,s),s}},Composite:{bounds:function(o){for(var a=e.Composite.allBodies(o),s=[],i=0;i<a.length;i+=1){var n=a[i];s.push(n.bounds.min,n.bounds.max)}return e.Bounds.create(s)},wrap:function(o,a){var s=u.Bounds.wrap(u.Composite.bounds(o),a);return s&&e.Composite.translate(o,s),s}}};c.exports=u},function(c,S,t){(function(e){/**
* @author       Richard Davey <rich@photonstorm.com>
* @copyright    2020 Photon Storm Ltd.
* @license      {@link https://opensource.org/licenses/MIT|MIT License}
*/var u=t(33),o=t(17),a={Actions:t(275),Animations:t(723),BlendModes:t(35),Cache:t(735),Cameras:t(738),Core:t(806),Class:t(0),Create:t(888),Curves:t(894),Data:t(896),Display:t(898),DOM:t(917),Events:t(918),Game:t(920),GameObjects:t(1011),Geom:t(483),Input:t(1308),Loader:t(1338),Math:t(193),Physics:t(1493),Plugins:t(1403),Renderer:t(1405),Scale:t(1412),ScaleModes:t(168),Scene:t(418),Scenes:t(1413),Structs:t(1415),Textures:t(1416),Tilemaps:t(1418),Time:t(1461),Tweens:t(1463),Utils:t(1481)};a.Sound=t(1492),a=o(!1,a,u),c.exports=a,e.Phaser=a}).call(this,t(600))}])})})(se);var $n=Le(se.exports),re={exports:{}};(function(F){(function(){function R(K,J,q){return K.call.apply(K.bind,arguments)}function c(K,J,q){if(!K)throw Error();if(2<arguments.length){var b=Array.prototype.slice.call(arguments,2);return function(){var it=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(it,b),K.apply(J,it)}}return function(){return K.apply(J,arguments)}}function S(K,J,q){return S=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?R:c,S.apply(null,arguments)}var t=Date.now||function(){return+new Date};function e(K,J){this.a=K,this.o=J||K,this.c=this.o.document}var u=!!window.FontFace;function o(K,J,q,b){if(J=K.c.createElement(J),q)for(var it in q)q.hasOwnProperty(it)&&(it=="style"?J.style.cssText=q[it]:J.setAttribute(it,q[it]));return b&&J.appendChild(K.c.createTextNode(b)),J}function a(K,J,q){K=K.c.getElementsByTagName(J)[0],K||(K=document.documentElement),K.insertBefore(q,K.lastChild)}function s(K){K.parentNode&&K.parentNode.removeChild(K)}function i(K,J,q){J=J||[],q=q||[];for(var b=K.className.split(/\s+/),it=0;it<J.length;it+=1){for(var ot=!1,ft=0;ft<b.length;ft+=1)if(J[it]===b[ft]){ot=!0;break}ot||b.push(J[it])}for(J=[],it=0;it<b.length;it+=1){for(ot=!1,ft=0;ft<q.length;ft+=1)if(b[it]===q[ft]){ot=!0;break}ot||J.push(b[it])}K.className=J.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function n(K,J){for(var q=K.className.split(/\s+/),b=0,it=q.length;b<it;b++)if(q[b]==J)return!0;return!1}function l(K){return K.o.location.hostname||K.a.location.hostname}function r(K,J,q){function b(){ct&&it&&ot&&(ct(ft),ct=null)}J=o(K,"link",{rel:"stylesheet",href:J,media:"all"});var it=!1,ot=!0,ft=null,ct=q||null;u?(J.onload=function(){it=!0,b()},J.onerror=function(){it=!0,ft=Error("Stylesheet failed to load"),b()}):setTimeout(function(){it=!0,b()},0),a(K,"head",J)}function h(K,J,q,b){var it=K.c.getElementsByTagName("head")[0];if(it){var ot=o(K,"script",{src:J}),ft=!1;return ot.onload=ot.onreadystatechange=function(){ft||this.readyState&&this.readyState!="loaded"&&this.readyState!="complete"||(ft=!0,q&&q(null),ot.onload=ot.onreadystatechange=null,ot.parentNode.tagName=="HEAD"&&it.removeChild(ot))},it.appendChild(ot),setTimeout(function(){ft||(ft=!0,q&&q(Error("Script load timeout")))},b||5e3),ot}return null}function f(){this.a=0,this.c=null}function v(K){return K.a++,function(){K.a--,p(K)}}function d(K,J){K.c=J,p(K)}function p(K){K.a==0&&K.c&&(K.c(),K.c=null)}function g(K){this.a=K||"-"}g.prototype.c=function(K){for(var J=[],q=0;q<arguments.length;q++)J.push(arguments[q].replace(/[\W_]+/g,"").toLowerCase());return J.join(this.a)};function m(K,J){this.c=K,this.f=4,this.a="n";var q=(J||"n4").match(/^([nio])([1-9])$/i);q&&(this.a=q[1],this.f=parseInt(q[2],10))}function x(K){return E(K)+" "+(K.f+"00")+" 300px "+y(K.c)}function y(K){var J=[];K=K.split(/,\s*/);for(var q=0;q<K.length;q++){var b=K[q].replace(/['"]/g,"");b.indexOf(" ")!=-1||/^\d/.test(b)?J.push("'"+b+"'"):J.push(b)}return J.join(",")}function T(K){return K.a+K.f}function E(K){var J="normal";return K.a==="o"?J="oblique":K.a==="i"&&(J="italic"),J}function C(K){var J=4,q="n",b=null;return K&&((b=K.match(/(normal|oblique|italic)/i))&&b[1]&&(q=b[1].substr(0,1).toLowerCase()),(b=K.match(/([1-9]00|normal|bold)/i))&&b[1]&&(/bold/i.test(b[1])?J=7:/[1-9]00/.test(b[1])&&(J=parseInt(b[1].substr(0,1),10)))),q+J}function A(K,J){this.c=K,this.f=K.o.document.documentElement,this.h=J,this.a=new g("-"),this.j=J.events!==!1,this.g=J.classes!==!1}function P(K){K.g&&i(K.f,[K.a.c("wf","loading")]),O(K,"loading")}function M(K){if(K.g){var J=n(K.f,K.a.c("wf","active")),q=[],b=[K.a.c("wf","loading")];J||q.push(K.a.c("wf","inactive")),i(K.f,q,b)}O(K,"inactive")}function O(K,J,q){K.j&&K.h[J]&&(q?K.h[J](q.c,T(q)):K.h[J]())}function I(){this.c={}}function N(K,J,q){var b=[],it;for(it in J)if(J.hasOwnProperty(it)){var ot=K.c[it];ot&&b.push(ot(J[it],q))}return b}function Y(K,J){this.c=K,this.f=J,this.a=o(this.c,"span",{"aria-hidden":"true"},this.f)}function X(K){a(K.c,"body",K.a)}function W(K){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+y(K.c)+";"+("font-style:"+E(K)+";font-weight:"+(K.f+"00")+";")}function H(K,J,q,b,it,ot){this.g=K,this.j=J,this.a=b,this.c=q,this.f=it||3e3,this.h=ot||void 0}H.prototype.start=function(){var K=this.c.o.document,J=this,q=t(),b=new Promise(function(ft,ct){function pt(){t()-q>=J.f?ct():K.fonts.load(x(J.a),J.h).then(function(St){1<=St.length?ft():setTimeout(pt,25)},function(){ct()})}pt()}),it=null,ot=new Promise(function(ft,ct){it=setTimeout(ct,J.f)});Promise.race([ot,b]).then(function(){it&&(clearTimeout(it),it=null),J.g(J.a)},function(){J.j(J.a)})};function D(K,J,q,b,it,ot,ft){this.v=K,this.B=J,this.c=q,this.a=b,this.s=ft||"BESbswy",this.f={},this.w=it||3e3,this.u=ot||null,this.m=this.j=this.h=this.g=null,this.g=new Y(this.c,this.s),this.h=new Y(this.c,this.s),this.j=new Y(this.c,this.s),this.m=new Y(this.c,this.s),K=new m(this.a.c+",serif",T(this.a)),K=W(K),this.g.a.style.cssText=K,K=new m(this.a.c+",sans-serif",T(this.a)),K=W(K),this.h.a.style.cssText=K,K=new m("serif",T(this.a)),K=W(K),this.j.a.style.cssText=K,K=new m("sans-serif",T(this.a)),K=W(K),this.m.a.style.cssText=K,X(this.g),X(this.h),X(this.j),X(this.m)}var L={D:"serif",C:"sans-serif"},B=null;function G(){if(B===null){var K=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);B=!!K&&(536>parseInt(K[1],10)||parseInt(K[1],10)===536&&11>=parseInt(K[2],10))}return B}D.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=t(),z(this)};function w(K,J,q){for(var b in L)if(L.hasOwnProperty(b)&&J===K.f[L[b]]&&q===K.f[L[b]])return!0;return!1}function z(K){var J=K.g.a.offsetWidth,q=K.h.a.offsetWidth,b;(b=J===K.f.serif&&q===K.f["sans-serif"])||(b=G()&&w(K,J,q)),b?t()-K.A>=K.w?G()&&w(K,J,q)&&(K.u===null||K.u.hasOwnProperty(K.a.c))?V(K,K.v):V(K,K.B):U(K):V(K,K.v)}function U(K){setTimeout(S(function(){z(this)},K),50)}function V(K,J){setTimeout(S(function(){s(this.g.a),s(this.h.a),s(this.j.a),s(this.m.a),J(this.a)},K),0)}function Z(K,J,q){this.c=K,this.a=J,this.f=0,this.m=this.j=!1,this.s=q}var $=null;Z.prototype.g=function(K){var J=this.a;J.g&&i(J.f,[J.a.c("wf",K.c,T(K).toString(),"active")],[J.a.c("wf",K.c,T(K).toString(),"loading"),J.a.c("wf",K.c,T(K).toString(),"inactive")]),O(J,"fontactive",K),this.m=!0,Q(this)},Z.prototype.h=function(K){var J=this.a;if(J.g){var q=n(J.f,J.a.c("wf",K.c,T(K).toString(),"active")),b=[],it=[J.a.c("wf",K.c,T(K).toString(),"loading")];q||b.push(J.a.c("wf",K.c,T(K).toString(),"inactive")),i(J.f,b,it)}O(J,"fontinactive",K),Q(this)};function Q(K){--K.f==0&&K.j&&(K.m?(K=K.a,K.g&&i(K.f,[K.a.c("wf","active")],[K.a.c("wf","loading"),K.a.c("wf","inactive")]),O(K,"active")):M(K.a))}function j(K){this.j=K,this.a=new I,this.h=0,this.f=this.g=!0}j.prototype.load=function(K){this.c=new e(this.j,K.context||this.j),this.g=K.events!==!1,this.f=K.classes!==!1,et(this,new A(this.c,K),K)};function k(K,J,q,b,it){var ot=--K.h==0;(K.f||K.g)&&setTimeout(function(){var ft=it||null,ct=b||null||{};if(q.length===0&&ot)M(J.a);else{J.f+=q.length,ot&&(J.j=ot);var pt,St=[];for(pt=0;pt<q.length;pt++){var Et=q[pt],Mt=ct[Et.c],It=J.a,wt=Et;if(It.g&&i(It.f,[It.a.c("wf",wt.c,T(wt).toString(),"loading")]),O(It,"fontloading",wt),It=null,$===null)if(window.FontFace){var wt=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),Me=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);$=wt?42<parseInt(wt[1],10):!Me}else $=!1;$?It=new H(S(J.g,J),S(J.h,J),J.c,Et,J.s,Mt):It=new D(S(J.g,J),S(J.h,J),J.c,Et,J.s,ft,Mt),St.push(It)}for(pt=0;pt<St.length;pt++)St[pt].start()}},0)}function et(K,J,q){var b=[],it=q.timeout;P(J);var b=N(K.a,q,K.c),ot=new Z(K.c,J,it);for(K.h=b.length,J=0,q=b.length;J<q;J++)b[J].load(function(ft,ct,pt){k(K,ot,ft,ct,pt)})}function _(K,J){this.c=K,this.a=J}_.prototype.load=function(K){function J(){if(ot["__mti_fntLst"+b]){var ft=ot["__mti_fntLst"+b](),ct=[],pt;if(ft)for(var St=0;St<ft.length;St++){var Et=ft[St].fontfamily;ft[St].fontStyle!=null&&ft[St].fontWeight!=null?(pt=ft[St].fontStyle+ft[St].fontWeight,ct.push(new m(Et,pt))):ct.push(new m(Et))}K(ct)}else setTimeout(function(){J()},50)}var q=this,b=q.a.projectId,it=q.a.version;if(b){var ot=q.c.o;h(this.c,(q.a.api||"https://fast.fonts.net/jsapi")+"/"+b+".js"+(it?"?v="+it:""),function(ft){ft?K([]):(ot["__MonotypeConfiguration__"+b]=function(){return q.a},J())}).id="__MonotypeAPIScript__"+b}else K([])};function nt(K,J){this.c=K,this.a=J}nt.prototype.load=function(K){var J,q,b=this.a.urls||[],it=this.a.families||[],ot=this.a.testStrings||{},ft=new f;for(J=0,q=b.length;J<q;J++)r(this.c,b[J],v(ft));var ct=[];for(J=0,q=it.length;J<q;J++)if(b=it[J].split(":"),b[1])for(var pt=b[1].split(","),St=0;St<pt.length;St+=1)ct.push(new m(b[0],pt[St]));else ct.push(new m(b[0]));d(ft,function(){K(ct,ot)})};function ut(K,J){K?this.c=K:this.c=ht,this.a=[],this.f=[],this.g=J||""}var ht="https://fonts.googleapis.com/css";function at(K,J){for(var q=J.length,b=0;b<q;b++){var it=J[b].split(":");it.length==3&&K.f.push(it.pop());var ot="";it.length==2&&it[1]!=""&&(ot=":"),K.a.push(it.join(ot))}}function tt(K){if(K.a.length==0)throw Error("No fonts to load!");if(K.c.indexOf("kit=")!=-1)return K.c;for(var J=K.a.length,q=[],b=0;b<J;b++)q.push(K.a[b].replace(/ /g,"+"));return J=K.c+"?family="+q.join("%7C"),0<K.f.length&&(J+="&subset="+K.f.join(",")),0<K.g.length&&(J+="&text="+encodeURIComponent(K.g)),J}function dt(K){this.f=K,this.a=[],this.c={}}var rt={latin:"BESbswy","latin-ext":"\xE7\xF6\xFC\u011F\u015F",cyrillic:"\u0439\u044F\u0416",greek:"\u03B1\u03B2\u03A3",khmer:"\u1780\u1781\u1782",Hanuman:"\u1780\u1781\u1782"},lt={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Pt={i:"i",italic:"i",n:"n",normal:"n"},At=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function gt(K){for(var J=K.f.length,q=0;q<J;q++){var b=K.f[q].split(":"),it=b[0].replace(/\+/g," "),ot=["n4"];if(2<=b.length){var ft,ct=b[1];if(ft=[],ct)for(var ct=ct.split(","),pt=ct.length,St=0;St<pt;St++){var Et;if(Et=ct[St],Et.match(/^[\w-]+$/)){var Mt=At.exec(Et.toLowerCase());if(Mt==null)Et="";else{if(Et=Mt[2],Et=Et==null||Et==""?"n":Pt[Et],Mt=Mt[1],Mt==null||Mt=="")Mt="4";else var It=lt[Mt],Mt=It||(isNaN(Mt)?"4":Mt.substr(0,1));Et=[Et,Mt].join("")}}else Et="";Et&&ft.push(Et)}0<ft.length&&(ot=ft),b.length==3&&(b=b[2],ft=[],b=b?b.split(","):ft,0<b.length&&(b=rt[b[0]])&&(K.c[it]=b))}for(K.c[it]||(b=rt[it])&&(K.c[it]=b),b=0;b<ot.length;b+=1)K.a.push(new m(it,ot[b]))}}function vt(K,J){this.c=K,this.a=J}var Tt={Arimo:!0,Cousine:!0,Tinos:!0};vt.prototype.load=function(K){var J=new f,q=this.c,b=new ut(this.a.api,this.a.text),it=this.a.families;at(b,it);var ot=new dt(it);gt(ot),r(q,tt(b),v(J)),d(J,function(){K(ot.a,ot.c,Tt)})};function xt(K,J){this.c=K,this.a=J}xt.prototype.load=function(K){var J=this.a.id,q=this.c.o;J?h(this.c,(this.a.api||"https://use.typekit.net")+"/"+J+".js",function(b){if(b)K([]);else if(q.Typekit&&q.Typekit.config&&q.Typekit.config.fn){b=q.Typekit.config.fn;for(var it=[],ot=0;ot<b.length;ot+=2)for(var ft=b[ot],ct=b[ot+1],pt=0;pt<ct.length;pt++)it.push(new m(ft,ct[pt]));try{q.Typekit.load({events:!1,classes:!1,async:!0})}catch{}K(it)}},2e3):K([])};function mt(K,J){this.c=K,this.f=J,this.a=[]}mt.prototype.load=function(K){var J=this.f.id,q=this.c.o,b=this;J?(q.__webfontfontdeckmodule__||(q.__webfontfontdeckmodule__={}),q.__webfontfontdeckmodule__[J]=function(it,ot){for(var ft=0,ct=ot.fonts.length;ft<ct;++ft){var pt=ot.fonts[ft];b.a.push(new m(pt.name,C("font-weight:"+pt.weight+";font-style:"+pt.style)))}K(b.a)},h(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+l(this.c)+"/"+J+".js",function(it){it&&K([])})):K([])};var yt=new j(window);yt.a.c.custom=function(K,J){return new nt(J,K)},yt.a.c.fontdeck=function(K,J){return new mt(J,K)},yt.a.c.monotype=function(K,J){return new _(J,K)},yt.a.c.typekit=function(K,J){return new xt(J,K)},yt.a.c.google=function(K,J){return new vt(J,K)};var Ft={load:S(yt.load,yt)};F.exports?F.exports=Ft:(window.WebFont=Ft,window.WebFontConfig&&yt.load(window.WebFontConfig))})()})(re);var Jn=re.exports;/*! @vimeo/player v2.16.3 | (c) 2022 Vimeo | MIT License | https://github.com/vimeo/player.js */function Oe(F,R){if(!(F instanceof R))throw new TypeError("Cannot call a class as a function")}function ae(F,R){for(var c=0;c<R.length;c++){var S=R[c];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(F,S.key,S)}}function Fe(F,R,c){return R&&ae(F.prototype,R),c&&ae(F,c),F}var oe=typeof global!="undefined"&&{}.toString.call(global)==="[object global]";function he(F,R){return F.indexOf(R.toLowerCase())===0?F:"".concat(R.toLowerCase()).concat(F.substr(0,1).toUpperCase()).concat(F.substr(1))}function Ie(F){return Boolean(F&&F.nodeType===1&&"nodeName"in F&&F.ownerDocument&&F.ownerDocument.defaultView)}function De(F){return!isNaN(parseFloat(F))&&isFinite(F)&&Math.floor(F)==F}function Xt(F){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(F)}function le(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=F.id,c=F.url,S=R||c;if(!S)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(De(S))return"https://vimeo.com/".concat(S);if(Xt(S))return S.replace("http:","https:");throw R?new TypeError("\u201C".concat(R,"\u201D is not a valid video id.")):new TypeError("\u201C".concat(S,"\u201D is not a vimeo.com url."))}var Be=typeof Array.prototype.indexOf!="undefined",Ge=typeof window!="undefined"&&typeof window.postMessage!="undefined";if(!oe&&(!Be||!Ge))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var Yt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ne(F,R){return R={exports:{}},F(R,R.exports),R.exports}/*!
 * weakmap-polyfill v2.0.1 - ECMAScript6 WeakMap polyfill
 * https://github.com/polygonplanet/weakmap-polyfill
 * Copyright (c) 2015-2020 Polygon Planet <polygon.planet.aqua@gmail.com>
 * @license MIT
 */(function(F){if(F.WeakMap)return;var R=Object.prototype.hasOwnProperty,c=function(t,e,u){Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,writable:!0,value:u}):t[e]=u};F.WeakMap=function(){function t(){if(this===void 0)throw new TypeError("Constructor WeakMap requires 'new'");if(c(this,"_id",u("_WeakMap")),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}c(t.prototype,"delete",function(a){if(e(this,"delete"),!S(a))return!1;var s=a[this._id];return s&&s[0]===a?(delete a[this._id],!0):!1}),c(t.prototype,"get",function(a){if(e(this,"get"),!!S(a)){var s=a[this._id];if(s&&s[0]===a)return s[1]}}),c(t.prototype,"has",function(a){if(e(this,"has"),!S(a))return!1;var s=a[this._id];return!!(s&&s[0]===a)}),c(t.prototype,"set",function(a,s){if(e(this,"set"),!S(a))throw new TypeError("Invalid value used as weak map key");var i=a[this._id];return i&&i[0]===a?(i[1]=s,this):(c(a,this._id,[a,s]),this)});function e(a,s){if(!S(a)||!R.call(a,"_id"))throw new TypeError(s+" method called on incompatible receiver "+typeof a)}function u(a){return a+"_"+o()+"."+o()}function o(){return Math.random().toString().substring(2)}return c(t,"_polyfill",!0),t}();function S(t){return Object(t)===t}})(typeof self!="undefined"?self:typeof window!="undefined"?window:Yt);var Gt=Ne(function(F){/*! Native Promise Only
    v0.8.1 (c) Kyle Simpson
    MIT License: http://getify.mit-license.org
*/(function(c,S,t){S[c]=S[c]||t(),F.exports&&(F.exports=S[c])})("Promise",Yt,function(){var c,S,t,e=Object.prototype.toString,u=typeof setImmediate!="undefined"?function(g){return setImmediate(g)}:setTimeout;try{Object.defineProperty({},"x",{}),c=function(g,m,x,y){return Object.defineProperty(g,m,{value:x,writable:!0,configurable:y!==!1})}}catch{c=function(m,x,y){return m[x]=y,m}}t=function(){var g,m,x;function y(T,E){this.fn=T,this.self=E,this.next=void 0}return{add:function(E,C){x=new y(E,C),m?m.next=x:g=x,m=x,x=void 0},drain:function(){var E=g;for(g=m=S=void 0;E;)E.fn.call(E.self),E=E.next}}}();function o(p,g){t.add(p,g),S||(S=u(t.drain))}function a(p){var g,m=typeof p;return p!=null&&(m=="object"||m=="function")&&(g=p.then),typeof g=="function"?g:!1}function s(){for(var p=0;p<this.chain.length;p++)i(this,this.state===1?this.chain[p].success:this.chain[p].failure,this.chain[p]);this.chain.length=0}function i(p,g,m){var x,y;try{g===!1?m.reject(p.msg):(g===!0?x=p.msg:x=g.call(void 0,p.msg),x===m.promise?m.reject(TypeError("Promise-chain cycle")):(y=a(x))?y.call(x,m.resolve,m.reject):m.resolve(x))}catch(T){m.reject(T)}}function n(p){var g,m=this;if(!m.triggered){m.triggered=!0,m.def&&(m=m.def);try{(g=a(p))?o(function(){var x=new h(m);try{g.call(p,function(){n.apply(x,arguments)},function(){l.apply(x,arguments)})}catch(y){l.call(x,y)}}):(m.msg=p,m.state=1,m.chain.length>0&&o(s,m))}catch(x){l.call(new h(m),x)}}}function l(p){var g=this;g.triggered||(g.triggered=!0,g.def&&(g=g.def),g.msg=p,g.state=2,g.chain.length>0&&o(s,g))}function r(p,g,m,x){for(var y=0;y<g.length;y++)(function(E){p.resolve(g[E]).then(function(A){m(E,A)},x)})(y)}function h(p){this.def=p,this.triggered=!1}function f(p){this.promise=p,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function v(p){if(typeof p!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var g=new f(this);this.then=function(x,y){var T={success:typeof x=="function"?x:!0,failure:typeof y=="function"?y:!1};return T.promise=new this.constructor(function(C,A){if(typeof C!="function"||typeof A!="function")throw TypeError("Not a function");T.resolve=C,T.reject=A}),g.chain.push(T),g.state!==0&&o(s,g),T.promise},this.catch=function(x){return this.then(void 0,x)};try{p.call(void 0,function(x){n.call(g,x)},function(x){l.call(g,x)})}catch(m){l.call(g,m)}}var d=c({},"constructor",v,!1);return v.prototype=d,c(d,"__NPO__",0,!1),c(v,"resolve",function(g){var m=this;return g&&typeof g=="object"&&g.__NPO__===1?g:new m(function(y,T){if(typeof y!="function"||typeof T!="function")throw TypeError("Not a function");y(g)})}),c(v,"reject",function(g){return new this(function(x,y){if(typeof x!="function"||typeof y!="function")throw TypeError("Not a function");y(g)})}),c(v,"all",function(g){var m=this;return e.call(g)!="[object Array]"?m.reject(TypeError("Not an array")):g.length===0?m.resolve([]):new m(function(y,T){if(typeof y!="function"||typeof T!="function")throw TypeError("Not a function");var E=g.length,C=Array(E),A=0;r(m,g,function(M,O){C[M]=O,++A===E&&y(C)},T)})}),c(v,"race",function(g){var m=this;return e.call(g)!="[object Array]"?m.reject(TypeError("Not an array")):new m(function(y,T){if(typeof y!="function"||typeof T!="function")throw TypeError("Not a function");r(m,g,function(C,A){y(A)},T)})}),v})}),Bt=new WeakMap;function Vt(F,R,c){var S=Bt.get(F.element)||{};R in S||(S[R]=[]),S[R].push(c),Bt.set(F.element,S)}function Zt(F,R){var c=Bt.get(F.element)||{};return c[R]||[]}function $t(F,R,c){var S=Bt.get(F.element)||{};if(!S[R])return!0;if(!c)return S[R]=[],Bt.set(F.element,S),!0;var t=S[R].indexOf(c);return t!==-1&&S[R].splice(t,1),Bt.set(F.element,S),S[R]&&S[R].length===0}function we(F,R){var c=Zt(F,R);if(c.length<1)return!1;var S=c.shift();return $t(F,R,S),S}function Ye(F,R){var c=Bt.get(F);Bt.set(R,c),Bt.delete(F)}var ze=["autopause","autoplay","background","byline","color","controls","dnt","height","id","interactiveparams","keyboard","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function fe(F){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ze.reduce(function(c,S){var t=F.getAttribute("data-vimeo-".concat(S));return(t||t==="")&&(c[S]=t===""?1:t),c},R)}function bt(F,R){var c=F.html;if(!R)throw new TypeError("An element must be provided");if(R.getAttribute("data-vimeo-initialized")!==null)return R.querySelector("iframe");var S=document.createElement("div");return S.innerHTML=c,R.appendChild(S.firstChild),R.setAttribute("data-vimeo-initialized","true"),R.querySelector("iframe")}function ue(F){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2?arguments[2]:void 0;return new Promise(function(S,t){if(!Xt(F))throw new TypeError("\u201C".concat(F,"\u201D is not a vimeo.com url."));var e="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(F));for(var u in R)R.hasOwnProperty(u)&&(e+="&".concat(u,"=").concat(encodeURIComponent(R[u])));var o="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;o.open("GET",e,!0),o.onload=function(){if(o.status===404){t(new Error("\u201C".concat(F,"\u201D was not found.")));return}if(o.status===403){t(new Error("\u201C".concat(F,"\u201D is not embeddable.")));return}try{var a=JSON.parse(o.responseText);if(a.domain_status_code===403){bt(a,c),t(new Error("\u201C".concat(F,"\u201D is not embeddable.")));return}S(a)}catch(s){t(s)}},o.onerror=function(){var a=o.status?" (".concat(o.status,")"):"";t(new Error("There was an error fetching the embed code from Vimeo".concat(a,".")))},o.send()})}function Ue(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,R=[].slice.call(F.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),c=function(t){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(t))};R.forEach(function(S){try{if(S.getAttribute("data-vimeo-defer")!==null)return;var t=fe(S),e=le(t);ue(e,t,S).then(function(u){return bt(u,S)}).catch(c)}catch(u){c(u)}})}function Xe(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;var R=function(S){if(!!Xt(S.origin)&&!(!S.data||S.data.event!=="spacechange")){for(var t=F.querySelectorAll("iframe"),e=0;e<t.length;e++)if(t[e].contentWindow===S.source){var u=t[e].parentElement;u.style.paddingBottom="".concat(S.data.data[0].bottom,"px");break}}};window.addEventListener("message",R)}}function de(F){if(typeof F=="string")try{F=JSON.parse(F)}catch(R){return console.warn(R),{}}return F}function Wt(F,R,c){if(!(!F.element.contentWindow||!F.element.contentWindow.postMessage)){var S={method:R};c!==void 0&&(S.value=c);var t=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));t>=8&&t<10&&(S=JSON.stringify(S)),F.element.contentWindow.postMessage(S,F.origin)}}function Ve(F,R){R=de(R);var c=[],S;if(R.event){if(R.event==="error"){var t=Zt(F,R.data.method);t.forEach(function(u){var o=new Error(R.data.message);o.name=R.data.name,u.reject(o),$t(F,R.data.method,u)})}c=Zt(F,"event:".concat(R.event)),S=R.data}else if(R.method){var e=we(F,R.method);e&&(c.push(e),S=R.value)}c.forEach(function(u){try{if(typeof u=="function"){u.call(F,S);return}u.resolve(S)}catch{}})}function We(){var F=function(){for(var S,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e=0,u=t.length,o={};e<u;e++)if(S=t[e],S&&S[1]in document){for(e=0;e<S.length;e++)o[t[0][e]]=S[e];return o}return!1}(),R={fullscreenchange:F.fullscreenchange,fullscreenerror:F.fullscreenerror},c={request:function(t){return new Promise(function(e,u){var o=function s(){c.off("fullscreenchange",s),e()};c.on("fullscreenchange",o),t=t||document.documentElement;var a=t[F.requestFullscreen]();a instanceof Promise&&a.then(o).catch(u)})},exit:function(){return new Promise(function(t,e){if(!c.isFullscreen){t();return}var u=function a(){c.off("fullscreenchange",a),t()};c.on("fullscreenchange",u);var o=document[F.exitFullscreen]();o instanceof Promise&&o.then(u).catch(e)})},on:function(t,e){var u=R[t];u&&document.addEventListener(u,e)},off:function(t,e){var u=R[t];u&&document.removeEventListener(u,e)}};return Object.defineProperties(c,{isFullscreen:{get:function(){return Boolean(document[F.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[F.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[F.fullscreenEnabled])}}}),c}var zt=new WeakMap,jt=new WeakMap,Rt={},Qn=function(){function F(R){var c=this,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Oe(this,F),window.jQuery&&R instanceof jQuery&&(R.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),R=R[0]),typeof document!="undefined"&&typeof R=="string"&&(R=document.getElementById(R)),!Ie(R))throw new TypeError("You must pass either a valid element or a valid id.");if(R.nodeName!=="IFRAME"){var t=R.querySelector("iframe");t&&(R=t)}if(R.nodeName==="IFRAME"&&!Xt(R.getAttribute("src")||""))throw new Error("The player element passed isn\u2019t a Vimeo embed.");if(zt.has(R))return zt.get(R);this._window=R.ownerDocument.defaultView,this.element=R,this.origin="*";var e=new Gt(function(o,a){if(c._onMessage=function(n){if(!(!Xt(n.origin)||c.element.contentWindow!==n.source)){c.origin==="*"&&(c.origin=n.origin);var l=de(n.data),r=l&&l.event==="error",h=r&&l.data&&l.data.method==="ready";if(h){var f=new Error(l.data.message);f.name=l.data.name,a(f);return}var v=l&&l.event==="ready",d=l&&l.method==="ping";if(v||d){c.element.setAttribute("data-ready","true"),o();return}Ve(c,l)}},c._window.addEventListener("message",c._onMessage),c.element.nodeName!=="IFRAME"){var s=fe(R,S),i=le(s);ue(i,s,R).then(function(n){var l=bt(n,R);return c.element=l,c._originalElement=R,Ye(R,l),zt.set(c.element,c),n}).catch(a)}});if(jt.set(this,e),zt.set(this.element,this),this.element.nodeName==="IFRAME"&&Wt(this,"ping"),Rt.isEnabled){var u=function(){return Rt.exit()};this.fullscreenchangeHandler=function(){Rt.isFullscreen?Vt(c,"event:exitFullscreen",u):$t(c,"event:exitFullscreen",u),c.ready().then(function(){Wt(c,"fullscreenchange",Rt.isFullscreen)})},Rt.on("fullscreenchange",this.fullscreenchangeHandler)}return this}return Fe(F,[{key:"callMethod",value:function(c){var S=this,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Gt(function(e,u){return S.ready().then(function(){Vt(S,c,{resolve:e,reject:u}),Wt(S,c,t)}).catch(u)})}},{key:"get",value:function(c){var S=this;return new Gt(function(t,e){return c=he(c,"get"),S.ready().then(function(){Vt(S,c,{resolve:t,reject:e}),Wt(S,c)}).catch(e)})}},{key:"set",value:function(c,S){var t=this;return new Gt(function(e,u){if(c=he(c,"set"),S==null)throw new TypeError("There must be a value to set.");return t.ready().then(function(){Vt(t,c,{resolve:e,reject:u}),Wt(t,c,S)}).catch(u)})}},{key:"on",value:function(c,S){if(!c)throw new TypeError("You must pass an event name.");if(!S)throw new TypeError("You must pass a callback function.");if(typeof S!="function")throw new TypeError("The callback must be a function.");var t=Zt(this,"event:".concat(c));t.length===0&&this.callMethod("addEventListener",c).catch(function(){}),Vt(this,"event:".concat(c),S)}},{key:"off",value:function(c,S){if(!c)throw new TypeError("You must pass an event name.");if(S&&typeof S!="function")throw new TypeError("The callback must be a function.");var t=$t(this,"event:".concat(c),S);t&&this.callMethod("removeEventListener",c).catch(function(e){})}},{key:"loadVideo",value:function(c){return this.callMethod("loadVideo",c)}},{key:"ready",value:function(){var c=jt.get(this)||new Gt(function(S,t){t(new Error("Unknown player. Probably unloaded."))});return Gt.resolve(c)}},{key:"addCuePoint",value:function(c){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.callMethod("addCuePoint",{time:c,data:S})}},{key:"removeCuePoint",value:function(c){return this.callMethod("removeCuePoint",c)}},{key:"enableTextTrack",value:function(c,S){if(!c)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:c,kind:S})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return Rt.isEnabled?Rt.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return Rt.isEnabled?Rt.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return Rt.isEnabled?Gt.resolve(Rt.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var c=this;return new Gt(function(S){if(jt.delete(c),zt.delete(c.element),c._originalElement&&(zt.delete(c._originalElement),c._originalElement.removeAttribute("data-vimeo-initialized")),c.element&&c.element.nodeName==="IFRAME"&&c.element.parentNode&&(c.element.parentNode.parentNode&&c._originalElement&&c._originalElement!==c.element.parentNode?c.element.parentNode.parentNode.removeChild(c.element.parentNode):c.element.parentNode.removeChild(c.element)),c.element&&c.element.nodeName==="DIV"&&c.element.parentNode){c.element.removeAttribute("data-vimeo-initialized");var t=c.element.querySelector("iframe");t&&t.parentNode&&(t.parentNode.parentNode&&c._originalElement&&c._originalElement!==t.parentNode?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t))}c._window.removeEventListener("message",c._onMessage),Rt.isEnabled&&Rt.off("fullscreenchange",c.fullscreenchangeHandler),S()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(c){return this.set("autopause",c)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(c){return this.set("cameraProps",c)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(c){return this.set("color",c)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(c){return this.set("currentTime",c)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(c){return this.set("loop",c)}},{key:"setMuted",value:function(c){return this.set("muted",c)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(c){return this.set("playbackRate",c)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(c){return this.set("quality",c)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(c){return this.set("volume",c)}}]),F}();oe||(Rt=We(),Ue(),Xe());function ve(F){return F!==null&&typeof F=="object"&&"constructor"in F&&F.constructor===Object}function kt(F={},R={}){Object.keys(R).forEach(c=>{typeof F[c]=="undefined"?F[c]=R[c]:ve(R[c])&&ve(F[c])&&Object.keys(R[c]).length>0&&kt(F[c],R[c])})}const ce={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Lt(){const F=typeof document!="undefined"?document:{};return kt(F,ce),F}const He={document:ce,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(F){return typeof setTimeout=="undefined"?(F(),null):setTimeout(F,0)},cancelAnimationFrame(F){typeof setTimeout!="undefined"&&clearTimeout(F)}};function Ct(){const F=typeof window!="undefined"?window:{};return kt(F,He),F}function Ke(F){const R=F.__proto__;Object.defineProperty(F,"__proto__",{get(){return R},set(c){R.__proto__=c}})}class Nt extends Array{constructor(R){if(typeof R=="number")super(R);else{super(...R||[]);Ke(this)}}}function Ht(F=[]){const R=[];return F.forEach(c=>{Array.isArray(c)?R.push(...Ht(c)):R.push(c)}),R}function pe(F,R){return Array.prototype.filter.call(F,R)}function Ze(F){const R=[];for(let c=0;c<F.length;c+=1)R.indexOf(F[c])===-1&&R.push(F[c]);return R}function $e(F,R){if(typeof F!="string")return[F];const c=[],S=R.querySelectorAll(F);for(let t=0;t<S.length;t+=1)c.push(S[t]);return c}function st(F,R){const c=Ct(),S=Lt();let t=[];if(!R&&F instanceof Nt)return F;if(!F)return new Nt(t);if(typeof F=="string"){const e=F.trim();if(e.indexOf("<")>=0&&e.indexOf(">")>=0){let u="div";e.indexOf("<li")===0&&(u="ul"),e.indexOf("<tr")===0&&(u="tbody"),(e.indexOf("<td")===0||e.indexOf("<th")===0)&&(u="tr"),e.indexOf("<tbody")===0&&(u="table"),e.indexOf("<option")===0&&(u="select");const o=S.createElement(u);o.innerHTML=e;for(let a=0;a<o.childNodes.length;a+=1)t.push(o.childNodes[a])}else t=$e(F.trim(),R||S)}else if(F.nodeType||F===c||F===S)t.push(F);else if(Array.isArray(F)){if(F instanceof Nt)return F;t=F}return new Nt(Ze(t))}st.fn=Nt.prototype;function Je(...F){const R=Ht(F.map(c=>c.split(" ")));return this.forEach(c=>{c.classList.add(...R)}),this}function Qe(...F){const R=Ht(F.map(c=>c.split(" ")));return this.forEach(c=>{c.classList.remove(...R)}),this}function be(...F){const R=Ht(F.map(c=>c.split(" ")));this.forEach(c=>{R.forEach(S=>{c.classList.toggle(S)})})}function je(...F){const R=Ht(F.map(c=>c.split(" ")));return pe(this,c=>R.filter(S=>c.classList.contains(S)).length>0).length>0}function ke(F,R){if(arguments.length===1&&typeof F=="string")return this[0]?this[0].getAttribute(F):void 0;for(let c=0;c<this.length;c+=1)if(arguments.length===2)this[c].setAttribute(F,R);else for(const S in F)this[c][S]=F[S],this[c].setAttribute(S,F[S]);return this}function qe(F){for(let R=0;R<this.length;R+=1)this[R].removeAttribute(F);return this}function _e(F){for(let R=0;R<this.length;R+=1)this[R].style.transform=F;return this}function ti(F){for(let R=0;R<this.length;R+=1)this[R].style.transitionDuration=typeof F!="string"?`${F}ms`:F;return this}function ei(...F){let[R,c,S,t]=F;typeof F[1]=="function"&&([R,S,t]=F,c=void 0),t||(t=!1);function e(s){const i=s.target;if(!i)return;const n=s.target.dom7EventData||[];if(n.indexOf(s)<0&&n.unshift(s),st(i).is(c))S.apply(i,n);else{const l=st(i).parents();for(let r=0;r<l.length;r+=1)st(l[r]).is(c)&&S.apply(l[r],n)}}function u(s){const i=s&&s.target?s.target.dom7EventData||[]:[];i.indexOf(s)<0&&i.unshift(s),S.apply(this,i)}const o=R.split(" ");let a;for(let s=0;s<this.length;s+=1){const i=this[s];if(c)for(a=0;a<o.length;a+=1){const n=o[a];i.dom7LiveListeners||(i.dom7LiveListeners={}),i.dom7LiveListeners[n]||(i.dom7LiveListeners[n]=[]),i.dom7LiveListeners[n].push({listener:S,proxyListener:e}),i.addEventListener(n,e,t)}else for(a=0;a<o.length;a+=1){const n=o[a];i.dom7Listeners||(i.dom7Listeners={}),i.dom7Listeners[n]||(i.dom7Listeners[n]=[]),i.dom7Listeners[n].push({listener:S,proxyListener:u}),i.addEventListener(n,u,t)}}return this}function ii(...F){let[R,c,S,t]=F;typeof F[1]=="function"&&([R,S,t]=F,c=void 0),t||(t=!1);const e=R.split(" ");for(let u=0;u<e.length;u+=1){const o=e[u];for(let a=0;a<this.length;a+=1){const s=this[a];let i;if(!c&&s.dom7Listeners?i=s.dom7Listeners[o]:c&&s.dom7LiveListeners&&(i=s.dom7LiveListeners[o]),i&&i.length)for(let n=i.length-1;n>=0;n-=1){const l=i[n];S&&l.listener===S||S&&l.listener&&l.listener.dom7proxy&&l.listener.dom7proxy===S?(s.removeEventListener(o,l.proxyListener,t),i.splice(n,1)):S||(s.removeEventListener(o,l.proxyListener,t),i.splice(n,1))}}}return this}function ni(...F){const R=Ct(),c=F[0].split(" "),S=F[1];for(let t=0;t<c.length;t+=1){const e=c[t];for(let u=0;u<this.length;u+=1){const o=this[u];if(R.CustomEvent){const a=new R.CustomEvent(e,{detail:S,bubbles:!0,cancelable:!0});o.dom7EventData=F.filter((s,i)=>i>0),o.dispatchEvent(a),o.dom7EventData=[],delete o.dom7EventData}}}return this}function si(F){const R=this;function c(S){S.target===this&&(F.call(this,S),R.off("transitionend",c))}return F&&R.on("transitionend",c),this}function ri(F){if(this.length>0){if(F){const R=this.styles();return this[0].offsetWidth+parseFloat(R.getPropertyValue("margin-right"))+parseFloat(R.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function ai(F){if(this.length>0){if(F){const R=this.styles();return this[0].offsetHeight+parseFloat(R.getPropertyValue("margin-top"))+parseFloat(R.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function oi(){if(this.length>0){const F=Ct(),R=Lt(),c=this[0],S=c.getBoundingClientRect(),t=R.body,e=c.clientTop||t.clientTop||0,u=c.clientLeft||t.clientLeft||0,o=c===F?F.scrollY:c.scrollTop,a=c===F?F.scrollX:c.scrollLeft;return{top:S.top+o-e,left:S.left+a-u}}return null}function hi(){const F=Ct();return this[0]?F.getComputedStyle(this[0],null):{}}function li(F,R){const c=Ct();let S;if(arguments.length===1)if(typeof F=="string"){if(this[0])return c.getComputedStyle(this[0],null).getPropertyValue(F)}else{for(S=0;S<this.length;S+=1)for(const t in F)this[S].style[t]=F[t];return this}if(arguments.length===2&&typeof F=="string"){for(S=0;S<this.length;S+=1)this[S].style[F]=R;return this}return this}function fi(F){return F?(this.forEach((R,c)=>{F.apply(R,[R,c])}),this):this}function ui(F){const R=pe(this,F);return st(R)}function di(F){if(typeof F=="undefined")return this[0]?this[0].innerHTML:null;for(let R=0;R<this.length;R+=1)this[R].innerHTML=F;return this}function vi(F){if(typeof F=="undefined")return this[0]?this[0].textContent.trim():null;for(let R=0;R<this.length;R+=1)this[R].textContent=F;return this}function ci(F){const R=Ct(),c=Lt(),S=this[0];let t,e;if(!S||typeof F=="undefined")return!1;if(typeof F=="string"){if(S.matches)return S.matches(F);if(S.webkitMatchesSelector)return S.webkitMatchesSelector(F);if(S.msMatchesSelector)return S.msMatchesSelector(F);for(t=st(F),e=0;e<t.length;e+=1)if(t[e]===S)return!0;return!1}if(F===c)return S===c;if(F===R)return S===R;if(F.nodeType||F instanceof Nt){for(t=F.nodeType?[F]:F,e=0;e<t.length;e+=1)if(t[e]===S)return!0;return!1}return!1}function pi(){let F=this[0],R;if(F){for(R=0;(F=F.previousSibling)!==null;)F.nodeType===1&&(R+=1);return R}}function gi(F){if(typeof F=="undefined")return this;const R=this.length;if(F>R-1)return st([]);if(F<0){const c=R+F;return c<0?st([]):st([this[c]])}return st([this[F]])}function mi(...F){let R;const c=Lt();for(let S=0;S<F.length;S+=1){R=F[S];for(let t=0;t<this.length;t+=1)if(typeof R=="string"){const e=c.createElement("div");for(e.innerHTML=R;e.firstChild;)this[t].appendChild(e.firstChild)}else if(R instanceof Nt)for(let e=0;e<R.length;e+=1)this[t].appendChild(R[e]);else this[t].appendChild(R)}return this}function xi(F){const R=Lt();let c,S;for(c=0;c<this.length;c+=1)if(typeof F=="string"){const t=R.createElement("div");for(t.innerHTML=F,S=t.childNodes.length-1;S>=0;S-=1)this[c].insertBefore(t.childNodes[S],this[c].childNodes[0])}else if(F instanceof Nt)for(S=0;S<F.length;S+=1)this[c].insertBefore(F[S],this[c].childNodes[0]);else this[c].insertBefore(F,this[c].childNodes[0]);return this}function yi(F){return this.length>0?F?this[0].nextElementSibling&&st(this[0].nextElementSibling).is(F)?st([this[0].nextElementSibling]):st([]):this[0].nextElementSibling?st([this[0].nextElementSibling]):st([]):st([])}function Ti(F){const R=[];let c=this[0];if(!c)return st([]);for(;c.nextElementSibling;){const S=c.nextElementSibling;F?st(S).is(F)&&R.push(S):R.push(S),c=S}return st(R)}function Si(F){if(this.length>0){const R=this[0];return F?R.previousElementSibling&&st(R.previousElementSibling).is(F)?st([R.previousElementSibling]):st([]):R.previousElementSibling?st([R.previousElementSibling]):st([])}return st([])}function Ei(F){const R=[];let c=this[0];if(!c)return st([]);for(;c.previousElementSibling;){const S=c.previousElementSibling;F?st(S).is(F)&&R.push(S):R.push(S),c=S}return st(R)}function Ci(F){const R=[];for(let c=0;c<this.length;c+=1)this[c].parentNode!==null&&(F?st(this[c].parentNode).is(F)&&R.push(this[c].parentNode):R.push(this[c].parentNode));return st(R)}function Pi(F){const R=[];for(let c=0;c<this.length;c+=1){let S=this[c].parentNode;for(;S;)F?st(S).is(F)&&R.push(S):R.push(S),S=S.parentNode}return st(R)}function Ai(F){let R=this;return typeof F=="undefined"?st([]):(R.is(F)||(R=R.parents(F).eq(0)),R)}function Mi(F){const R=[];for(let c=0;c<this.length;c+=1){const S=this[c].querySelectorAll(F);for(let t=0;t<S.length;t+=1)R.push(S[t])}return st(R)}function Ri(F){const R=[];for(let c=0;c<this.length;c+=1){const S=this[c].children;for(let t=0;t<S.length;t+=1)(!F||st(S[t]).is(F))&&R.push(S[t])}return st(R)}function Li(){for(let F=0;F<this.length;F+=1)this[F].parentNode&&this[F].parentNode.removeChild(this[F]);return this}const ge={addClass:Je,removeClass:Qe,hasClass:je,toggleClass:be,attr:ke,removeAttr:qe,transform:_e,transition:ti,on:ei,off:ii,trigger:ni,transitionEnd:si,outerWidth:ri,outerHeight:ai,styles:hi,offset:oi,css:li,each:fi,html:di,text:vi,is:ci,index:pi,eq:gi,append:mi,prepend:xi,next:yi,nextAll:Ti,prev:Si,prevAll:Ei,parent:Ci,parents:Pi,closest:Ai,find:Mi,children:Ri,filter:ui,remove:Li};Object.keys(ge).forEach(F=>{Object.defineProperty(st.fn,F,{value:ge[F],writable:!0})});function Oi(F){const R=F;Object.keys(R).forEach(c=>{try{R[c]=null}catch{}try{delete R[c]}catch{}})}function qt(F,R){return R===void 0&&(R=0),setTimeout(F,R)}function Kt(){return Date.now()}function Fi(F){const R=Ct();let c;return R.getComputedStyle&&(c=R.getComputedStyle(F,null)),!c&&F.currentStyle&&(c=F.currentStyle),c||(c=F.style),c}function Ii(F,R){R===void 0&&(R="x");const c=Ct();let S,t,e;const u=Fi(F);return c.WebKitCSSMatrix?(t=u.transform||u.webkitTransform,t.split(",").length>6&&(t=t.split(", ").map(o=>o.replace(",",".")).join(", ")),e=new c.WebKitCSSMatrix(t==="none"?"":t)):(e=u.MozTransform||u.OTransform||u.MsTransform||u.msTransform||u.transform||u.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),S=e.toString().split(",")),R==="x"&&(c.WebKitCSSMatrix?t=e.m41:S.length===16?t=parseFloat(S[12]):t=parseFloat(S[4])),R==="y"&&(c.WebKitCSSMatrix?t=e.m42:S.length===16?t=parseFloat(S[13]):t=parseFloat(S[5])),t||0}function Jt(F){return typeof F=="object"&&F!==null&&F.constructor&&Object.prototype.toString.call(F).slice(8,-1)==="Object"}function Di(F){return typeof window!="undefined"&&typeof window.HTMLElement!="undefined"?F instanceof HTMLElement:F&&(F.nodeType===1||F.nodeType===11)}function Ot(){const F=Object(arguments.length<=0?void 0:arguments[0]),R=["__proto__","constructor","prototype"];for(let c=1;c<arguments.length;c+=1){const S=c<0||arguments.length<=c?void 0:arguments[c];if(S!=null&&!Di(S)){const t=Object.keys(Object(S)).filter(e=>R.indexOf(e)<0);for(let e=0,u=t.length;e<u;e+=1){const o=t[e],a=Object.getOwnPropertyDescriptor(S,o);a!==void 0&&a.enumerable&&(Jt(F[o])&&Jt(S[o])?S[o].__swiper__?F[o]=S[o]:Ot(F[o],S[o]):!Jt(F[o])&&Jt(S[o])?(F[o]={},S[o].__swiper__?F[o]=S[o]:Ot(F[o],S[o])):F[o]=S[o])}}}return F}function Qt(F,R,c){F.style.setProperty(R,c)}function me(F){let{swiper:R,targetPosition:c,side:S}=F;const t=Ct(),e=-R.translate;let u=null,o;const a=R.params.speed;R.wrapperEl.style.scrollSnapType="none",t.cancelAnimationFrame(R.cssModeFrameID);const s=c>e?"next":"prev",i=(l,r)=>s==="next"&&l>=r||s==="prev"&&l<=r,n=()=>{o=new Date().getTime(),u===null&&(u=o);const l=Math.max(Math.min((o-u)/a,1),0),r=.5-Math.cos(l*Math.PI)/2;let h=e+r*(c-e);if(i(h,c)&&(h=c),R.wrapperEl.scrollTo({[S]:h}),i(h,c)){R.wrapperEl.style.overflow="hidden",R.wrapperEl.style.scrollSnapType="",setTimeout(()=>{R.wrapperEl.style.overflow="",R.wrapperEl.scrollTo({[S]:h})}),t.cancelAnimationFrame(R.cssModeFrameID);return}R.cssModeFrameID=t.requestAnimationFrame(n)};n()}let _t;function Bi(){const F=Ct(),R=Lt();return{smoothScroll:R.documentElement&&"scrollBehavior"in R.documentElement.style,touch:!!("ontouchstart"in F||F.DocumentTouch&&R instanceof F.DocumentTouch),passiveListener:function(){let S=!1;try{const t=Object.defineProperty({},"passive",{get(){S=!0}});F.addEventListener("testPassiveListener",null,t)}catch{}return S}(),gestures:function(){return"ongesturestart"in F}()}}function xe(){return _t||(_t=Bi()),_t}let te;function Gi(F){let{userAgent:R}=F===void 0?{}:F;const c=xe(),S=Ct(),t=S.navigator.platform,e=R||S.navigator.userAgent,u={ios:!1,android:!1},o=S.screen.width,a=S.screen.height,s=e.match(/(Android);?[\s\/]+([\d.]+)?/);let i=e.match(/(iPad).*OS\s([\d_]+)/);const n=e.match(/(iPod)(.*OS\s([\d_]+))?/),l=!i&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/),r=t==="Win32";let h=t==="MacIntel";const f=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!i&&h&&c.touch&&f.indexOf(`${o}x${a}`)>=0&&(i=e.match(/(Version)\/([\d.]+)/),i||(i=[0,1,"13_0_0"]),h=!1),s&&!r&&(u.os="android",u.android=!0),(i||l||n)&&(u.os="ios",u.ios=!0),u}function Ni(F){return F===void 0&&(F={}),te||(te=Gi(F)),te}let ee;function wi(){const F=Ct();function R(){const c=F.navigator.userAgent.toLowerCase();return c.indexOf("safari")>=0&&c.indexOf("chrome")<0&&c.indexOf("android")<0}return{isSafari:R(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(F.navigator.userAgent)}}function Yi(){return ee||(ee=wi()),ee}function zi(F){let{swiper:R,on:c,emit:S}=F;const t=Ct();let e=null;const u=()=>{!R||R.destroyed||!R.initialized||(S("beforeResize"),S("resize"))},o=()=>{!R||R.destroyed||!R.initialized||(e=new ResizeObserver(i=>{const{width:n,height:l}=R;let r=n,h=l;i.forEach(f=>{let{contentBoxSize:v,contentRect:d,target:p}=f;p&&p!==R.el||(r=d?d.width:(v[0]||v).inlineSize,h=d?d.height:(v[0]||v).blockSize)}),(r!==n||h!==l)&&u()}),e.observe(R.el))},a=()=>{e&&e.unobserve&&R.el&&(e.unobserve(R.el),e=null)},s=()=>{!R||R.destroyed||!R.initialized||S("orientationchange")};c("init",()=>{if(R.params.resizeObserver&&typeof t.ResizeObserver!="undefined"){o();return}t.addEventListener("resize",u),t.addEventListener("orientationchange",s)}),c("destroy",()=>{a(),t.removeEventListener("resize",u),t.removeEventListener("orientationchange",s)})}function Ui(F){let{swiper:R,extendParams:c,on:S,emit:t}=F;const e=[],u=Ct(),o=function(i,n){n===void 0&&(n={});const l=u.MutationObserver||u.WebkitMutationObserver,r=new l(h=>{if(h.length===1){t("observerUpdate",h[0]);return}const f=function(){t("observerUpdate",h[0])};u.requestAnimationFrame?u.requestAnimationFrame(f):u.setTimeout(f,0)});r.observe(i,{attributes:typeof n.attributes=="undefined"?!0:n.attributes,childList:typeof n.childList=="undefined"?!0:n.childList,characterData:typeof n.characterData=="undefined"?!0:n.characterData}),e.push(r)},a=()=>{if(!!R.params.observer){if(R.params.observeParents){const i=R.$el.parents();for(let n=0;n<i.length;n+=1)o(i[n])}o(R.$el[0],{childList:R.params.observeSlideChildren}),o(R.$wrapperEl[0],{attributes:!1})}},s=()=>{e.forEach(i=>{i.disconnect()}),e.splice(0,e.length)};c({observer:!1,observeParents:!1,observeSlideChildren:!1}),S("init",a),S("destroy",s)}var Xi={on(F,R,c){const S=this;if(typeof R!="function")return S;const t=c?"unshift":"push";return F.split(" ").forEach(e=>{S.eventsListeners[e]||(S.eventsListeners[e]=[]),S.eventsListeners[e][t](R)}),S},once(F,R,c){const S=this;if(typeof R!="function")return S;function t(){S.off(F,t),t.__emitterProxy&&delete t.__emitterProxy;for(var e=arguments.length,u=new Array(e),o=0;o<e;o++)u[o]=arguments[o];R.apply(S,u)}return t.__emitterProxy=R,S.on(F,t,c)},onAny(F,R){const c=this;if(typeof F!="function")return c;const S=R?"unshift":"push";return c.eventsAnyListeners.indexOf(F)<0&&c.eventsAnyListeners[S](F),c},offAny(F){const R=this;if(!R.eventsAnyListeners)return R;const c=R.eventsAnyListeners.indexOf(F);return c>=0&&R.eventsAnyListeners.splice(c,1),R},off(F,R){const c=this;return c.eventsListeners&&F.split(" ").forEach(S=>{typeof R=="undefined"?c.eventsListeners[S]=[]:c.eventsListeners[S]&&c.eventsListeners[S].forEach((t,e)=>{(t===R||t.__emitterProxy&&t.__emitterProxy===R)&&c.eventsListeners[S].splice(e,1)})}),c},emit(){const F=this;if(!F.eventsListeners)return F;let R,c,S;for(var t=arguments.length,e=new Array(t),u=0;u<t;u++)e[u]=arguments[u];return typeof e[0]=="string"||Array.isArray(e[0])?(R=e[0],c=e.slice(1,e.length),S=F):(R=e[0].events,c=e[0].data,S=e[0].context||F),c.unshift(S),(Array.isArray(R)?R:R.split(" ")).forEach(a=>{F.eventsAnyListeners&&F.eventsAnyListeners.length&&F.eventsAnyListeners.forEach(s=>{s.apply(S,[a,...c])}),F.eventsListeners&&F.eventsListeners[a]&&F.eventsListeners[a].forEach(s=>{s.apply(S,c)})}),F}};function Vi(){const F=this;let R,c;const S=F.$el;typeof F.params.width!="undefined"&&F.params.width!==null?R=F.params.width:R=S[0].clientWidth,typeof F.params.height!="undefined"&&F.params.height!==null?c=F.params.height:c=S[0].clientHeight,!(R===0&&F.isHorizontal()||c===0&&F.isVertical())&&(R=R-parseInt(S.css("padding-left")||0,10)-parseInt(S.css("padding-right")||0,10),c=c-parseInt(S.css("padding-top")||0,10)-parseInt(S.css("padding-bottom")||0,10),Number.isNaN(R)&&(R=0),Number.isNaN(c)&&(c=0),Object.assign(F,{width:R,height:c,size:F.isHorizontal()?R:c}))}function Wi(){const F=this;function R(A){return F.isHorizontal()?A:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[A]}function c(A,P){return parseFloat(A.getPropertyValue(R(P))||0)}const S=F.params,{$wrapperEl:t,size:e,rtlTranslate:u,wrongRTL:o}=F,a=F.virtual&&S.virtual.enabled,s=a?F.virtual.slides.length:F.slides.length,i=t.children(`.${F.params.slideClass}`),n=a?F.virtual.slides.length:i.length;let l=[];const r=[],h=[];let f=S.slidesOffsetBefore;typeof f=="function"&&(f=S.slidesOffsetBefore.call(F));let v=S.slidesOffsetAfter;typeof v=="function"&&(v=S.slidesOffsetAfter.call(F));const d=F.snapGrid.length,p=F.slidesGrid.length;let g=S.spaceBetween,m=-f,x=0,y=0;if(typeof e=="undefined")return;typeof g=="string"&&g.indexOf("%")>=0&&(g=parseFloat(g.replace("%",""))/100*e),F.virtualSize=-g,u?i.css({marginLeft:"",marginBottom:"",marginTop:""}):i.css({marginRight:"",marginBottom:"",marginTop:""}),S.centeredSlides&&S.cssMode&&(Qt(F.wrapperEl,"--swiper-centered-offset-before",""),Qt(F.wrapperEl,"--swiper-centered-offset-after",""));const T=S.grid&&S.grid.rows>1&&F.grid;T&&F.grid.initSlides(n);let E;const C=S.slidesPerView==="auto"&&S.breakpoints&&Object.keys(S.breakpoints).filter(A=>typeof S.breakpoints[A].slidesPerView!="undefined").length>0;for(let A=0;A<n;A+=1){E=0;const P=i.eq(A);if(T&&F.grid.updateSlide(A,P,n,R),P.css("display")!=="none"){if(S.slidesPerView==="auto"){C&&(i[A].style[R("width")]="");const M=getComputedStyle(P[0]),O=P[0].style.transform,I=P[0].style.webkitTransform;if(O&&(P[0].style.transform="none"),I&&(P[0].style.webkitTransform="none"),S.roundLengths)E=F.isHorizontal()?P.outerWidth(!0):P.outerHeight(!0);else{const N=c(M,"width"),Y=c(M,"padding-left"),X=c(M,"padding-right"),W=c(M,"margin-left"),H=c(M,"margin-right"),D=M.getPropertyValue("box-sizing");if(D&&D==="border-box")E=N+W+H;else{const{clientWidth:L,offsetWidth:B}=P[0];E=N+Y+X+W+H+(B-L)}}O&&(P[0].style.transform=O),I&&(P[0].style.webkitTransform=I),S.roundLengths&&(E=Math.floor(E))}else E=(e-(S.slidesPerView-1)*g)/S.slidesPerView,S.roundLengths&&(E=Math.floor(E)),i[A]&&(i[A].style[R("width")]=`${E}px`);i[A]&&(i[A].swiperSlideSize=E),h.push(E),S.centeredSlides?(m=m+E/2+x/2+g,x===0&&A!==0&&(m=m-e/2-g),A===0&&(m=m-e/2-g),Math.abs(m)<1/1e3&&(m=0),S.roundLengths&&(m=Math.floor(m)),y%S.slidesPerGroup==0&&l.push(m),r.push(m)):(S.roundLengths&&(m=Math.floor(m)),(y-Math.min(F.params.slidesPerGroupSkip,y))%F.params.slidesPerGroup==0&&l.push(m),r.push(m),m=m+E+g),F.virtualSize+=E+g,x=E,y+=1}}if(F.virtualSize=Math.max(F.virtualSize,e)+v,u&&o&&(S.effect==="slide"||S.effect==="coverflow")&&t.css({width:`${F.virtualSize+S.spaceBetween}px`}),S.setWrapperSize&&t.css({[R("width")]:`${F.virtualSize+S.spaceBetween}px`}),T&&F.grid.updateWrapperSize(E,l,R),!S.centeredSlides){const A=[];for(let P=0;P<l.length;P+=1){let M=l[P];S.roundLengths&&(M=Math.floor(M)),l[P]<=F.virtualSize-e&&A.push(M)}l=A,Math.floor(F.virtualSize-e)-Math.floor(l[l.length-1])>1&&l.push(F.virtualSize-e)}if(l.length===0&&(l=[0]),S.spaceBetween!==0){const A=F.isHorizontal()&&u?"marginLeft":R("marginRight");i.filter((P,M)=>S.cssMode?M!==i.length-1:!0).css({[A]:`${g}px`})}if(S.centeredSlides&&S.centeredSlidesBounds){let A=0;h.forEach(M=>{A+=M+(S.spaceBetween?S.spaceBetween:0)}),A-=S.spaceBetween;const P=A-e;l=l.map(M=>M<0?-f:M>P?P+v:M)}if(S.centerInsufficientSlides){let A=0;if(h.forEach(P=>{A+=P+(S.spaceBetween?S.spaceBetween:0)}),A-=S.spaceBetween,A<e){const P=(e-A)/2;l.forEach((M,O)=>{l[O]=M-P}),r.forEach((M,O)=>{r[O]=M+P})}}if(Object.assign(F,{slides:i,snapGrid:l,slidesGrid:r,slidesSizesGrid:h}),S.centeredSlides&&S.cssMode&&!S.centeredSlidesBounds){Qt(F.wrapperEl,"--swiper-centered-offset-before",`${-l[0]}px`),Qt(F.wrapperEl,"--swiper-centered-offset-after",`${F.size/2-h[h.length-1]/2}px`);const A=-F.snapGrid[0],P=-F.slidesGrid[0];F.snapGrid=F.snapGrid.map(M=>M+A),F.slidesGrid=F.slidesGrid.map(M=>M+P)}if(n!==s&&F.emit("slidesLengthChange"),l.length!==d&&(F.params.watchOverflow&&F.checkOverflow(),F.emit("snapGridLengthChange")),r.length!==p&&F.emit("slidesGridLengthChange"),S.watchSlidesProgress&&F.updateSlidesOffset(),!a&&!S.cssMode&&(S.effect==="slide"||S.effect==="fade")){const A=`${S.containerModifierClass}backface-hidden`,P=F.$el.hasClass(A);n<=S.maxBackfaceHiddenSlides?P||F.$el.addClass(A):P&&F.$el.removeClass(A)}}function Hi(F){const R=this,c=[],S=R.virtual&&R.params.virtual.enabled;let t=0,e;typeof F=="number"?R.setTransition(F):F===!0&&R.setTransition(R.params.speed);const u=o=>S?R.slides.filter(a=>parseInt(a.getAttribute("data-swiper-slide-index"),10)===o)[0]:R.slides.eq(o)[0];if(R.params.slidesPerView!=="auto"&&R.params.slidesPerView>1)if(R.params.centeredSlides)R.visibleSlides.each(o=>{c.push(o)});else for(e=0;e<Math.ceil(R.params.slidesPerView);e+=1){const o=R.activeIndex+e;if(o>R.slides.length&&!S)break;c.push(u(o))}else c.push(u(R.activeIndex));for(e=0;e<c.length;e+=1)if(typeof c[e]!="undefined"){const o=c[e].offsetHeight;t=o>t?o:t}(t||t===0)&&R.$wrapperEl.css("height",`${t}px`)}function Ki(){const F=this,R=F.slides;for(let c=0;c<R.length;c+=1)R[c].swiperSlideOffset=F.isHorizontal()?R[c].offsetLeft:R[c].offsetTop}function Zi(F){F===void 0&&(F=this&&this.translate||0);const R=this,c=R.params,{slides:S,rtlTranslate:t,snapGrid:e}=R;if(S.length===0)return;typeof S[0].swiperSlideOffset=="undefined"&&R.updateSlidesOffset();let u=-F;t&&(u=F),S.removeClass(c.slideVisibleClass),R.visibleSlidesIndexes=[],R.visibleSlides=[];for(let o=0;o<S.length;o+=1){const a=S[o];let s=a.swiperSlideOffset;c.cssMode&&c.centeredSlides&&(s-=S[0].swiperSlideOffset);const i=(u+(c.centeredSlides?R.minTranslate():0)-s)/(a.swiperSlideSize+c.spaceBetween),n=(u-e[0]+(c.centeredSlides?R.minTranslate():0)-s)/(a.swiperSlideSize+c.spaceBetween),l=-(u-s),r=l+R.slidesSizesGrid[o];(l>=0&&l<R.size-1||r>1&&r<=R.size||l<=0&&r>=R.size)&&(R.visibleSlides.push(a),R.visibleSlidesIndexes.push(o),S.eq(o).addClass(c.slideVisibleClass)),a.progress=t?-i:i,a.originalProgress=t?-n:n}R.visibleSlides=st(R.visibleSlides)}function $i(F){const R=this;if(typeof F=="undefined"){const s=R.rtlTranslate?-1:1;F=R&&R.translate&&R.translate*s||0}const c=R.params,S=R.maxTranslate()-R.minTranslate();let{progress:t,isBeginning:e,isEnd:u}=R;const o=e,a=u;S===0?(t=0,e=!0,u=!0):(t=(F-R.minTranslate())/S,e=t<=0,u=t>=1),Object.assign(R,{progress:t,isBeginning:e,isEnd:u}),(c.watchSlidesProgress||c.centeredSlides&&c.autoHeight)&&R.updateSlidesProgress(F),e&&!o&&R.emit("reachBeginning toEdge"),u&&!a&&R.emit("reachEnd toEdge"),(o&&!e||a&&!u)&&R.emit("fromEdge"),R.emit("progress",t)}function Ji(){const F=this,{slides:R,params:c,$wrapperEl:S,activeIndex:t,realIndex:e}=F,u=F.virtual&&c.virtual.enabled;R.removeClass(`${c.slideActiveClass} ${c.slideNextClass} ${c.slidePrevClass} ${c.slideDuplicateActiveClass} ${c.slideDuplicateNextClass} ${c.slideDuplicatePrevClass}`);let o;u?o=F.$wrapperEl.find(`.${c.slideClass}[data-swiper-slide-index="${t}"]`):o=R.eq(t),o.addClass(c.slideActiveClass),c.loop&&(o.hasClass(c.slideDuplicateClass)?S.children(`.${c.slideClass}:not(.${c.slideDuplicateClass})[data-swiper-slide-index="${e}"]`).addClass(c.slideDuplicateActiveClass):S.children(`.${c.slideClass}.${c.slideDuplicateClass}[data-swiper-slide-index="${e}"]`).addClass(c.slideDuplicateActiveClass));let a=o.nextAll(`.${c.slideClass}`).eq(0).addClass(c.slideNextClass);c.loop&&a.length===0&&(a=R.eq(0),a.addClass(c.slideNextClass));let s=o.prevAll(`.${c.slideClass}`).eq(0).addClass(c.slidePrevClass);c.loop&&s.length===0&&(s=R.eq(-1),s.addClass(c.slidePrevClass)),c.loop&&(a.hasClass(c.slideDuplicateClass)?S.children(`.${c.slideClass}:not(.${c.slideDuplicateClass})[data-swiper-slide-index="${a.attr("data-swiper-slide-index")}"]`).addClass(c.slideDuplicateNextClass):S.children(`.${c.slideClass}.${c.slideDuplicateClass}[data-swiper-slide-index="${a.attr("data-swiper-slide-index")}"]`).addClass(c.slideDuplicateNextClass),s.hasClass(c.slideDuplicateClass)?S.children(`.${c.slideClass}:not(.${c.slideDuplicateClass})[data-swiper-slide-index="${s.attr("data-swiper-slide-index")}"]`).addClass(c.slideDuplicatePrevClass):S.children(`.${c.slideClass}.${c.slideDuplicateClass}[data-swiper-slide-index="${s.attr("data-swiper-slide-index")}"]`).addClass(c.slideDuplicatePrevClass)),F.emitSlidesClasses()}function Qi(F){const R=this,c=R.rtlTranslate?R.translate:-R.translate,{slidesGrid:S,snapGrid:t,params:e,activeIndex:u,realIndex:o,snapIndex:a}=R;let s=F,i;if(typeof s=="undefined"){for(let l=0;l<S.length;l+=1)typeof S[l+1]!="undefined"?c>=S[l]&&c<S[l+1]-(S[l+1]-S[l])/2?s=l:c>=S[l]&&c<S[l+1]&&(s=l+1):c>=S[l]&&(s=l);e.normalizeSlideIndex&&(s<0||typeof s=="undefined")&&(s=0)}if(t.indexOf(c)>=0)i=t.indexOf(c);else{const l=Math.min(e.slidesPerGroupSkip,s);i=l+Math.floor((s-l)/e.slidesPerGroup)}if(i>=t.length&&(i=t.length-1),s===u){i!==a&&(R.snapIndex=i,R.emit("snapIndexChange"));return}const n=parseInt(R.slides.eq(s).attr("data-swiper-slide-index")||s,10);Object.assign(R,{snapIndex:i,realIndex:n,previousIndex:u,activeIndex:s}),R.emit("activeIndexChange"),R.emit("snapIndexChange"),o!==n&&R.emit("realIndexChange"),(R.initialized||R.params.runCallbacksOnInit)&&R.emit("slideChange")}function bi(F){const R=this,c=R.params,S=st(F).closest(`.${c.slideClass}`)[0];let t=!1,e;if(S){for(let u=0;u<R.slides.length;u+=1)if(R.slides[u]===S){t=!0,e=u;break}}if(S&&t)R.clickedSlide=S,R.virtual&&R.params.virtual.enabled?R.clickedIndex=parseInt(st(S).attr("data-swiper-slide-index"),10):R.clickedIndex=e;else{R.clickedSlide=void 0,R.clickedIndex=void 0;return}c.slideToClickedSlide&&R.clickedIndex!==void 0&&R.clickedIndex!==R.activeIndex&&R.slideToClickedSlide()}var ji={updateSize:Vi,updateSlides:Wi,updateAutoHeight:Hi,updateSlidesOffset:Ki,updateSlidesProgress:Zi,updateProgress:$i,updateSlidesClasses:Ji,updateActiveIndex:Qi,updateClickedSlide:bi};function ki(F){F===void 0&&(F=this.isHorizontal()?"x":"y");const R=this,{params:c,rtlTranslate:S,translate:t,$wrapperEl:e}=R;if(c.virtualTranslate)return S?-t:t;if(c.cssMode)return t;let u=Ii(e[0],F);return S&&(u=-u),u||0}function qi(F,R){const c=this,{rtlTranslate:S,params:t,$wrapperEl:e,wrapperEl:u,progress:o}=c;let a=0,s=0;const i=0;c.isHorizontal()?a=S?-F:F:s=F,t.roundLengths&&(a=Math.floor(a),s=Math.floor(s)),t.cssMode?u[c.isHorizontal()?"scrollLeft":"scrollTop"]=c.isHorizontal()?-a:-s:t.virtualTranslate||e.transform(`translate3d(${a}px, ${s}px, ${i}px)`),c.previousTranslate=c.translate,c.translate=c.isHorizontal()?a:s;let n;const l=c.maxTranslate()-c.minTranslate();l===0?n=0:n=(F-c.minTranslate())/l,n!==o&&c.updateProgress(F),c.emit("setTranslate",c.translate,R)}function _i(){return-this.snapGrid[0]}function tn(){return-this.snapGrid[this.snapGrid.length-1]}function en(F,R,c,S,t){F===void 0&&(F=0),R===void 0&&(R=this.params.speed),c===void 0&&(c=!0),S===void 0&&(S=!0);const e=this,{params:u,wrapperEl:o}=e;if(e.animating&&u.preventInteractionOnTransition)return!1;const a=e.minTranslate(),s=e.maxTranslate();let i;if(S&&F>a?i=a:S&&F<s?i=s:i=F,e.updateProgress(i),u.cssMode){const n=e.isHorizontal();if(R===0)o[n?"scrollLeft":"scrollTop"]=-i;else{if(!e.support.smoothScroll)return me({swiper:e,targetPosition:-i,side:n?"left":"top"}),!0;o.scrollTo({[n?"left":"top"]:-i,behavior:"smooth"})}return!0}return R===0?(e.setTransition(0),e.setTranslate(i),c&&(e.emit("beforeTransitionStart",R,t),e.emit("transitionEnd"))):(e.setTransition(R),e.setTranslate(i),c&&(e.emit("beforeTransitionStart",R,t),e.emit("transitionStart")),e.animating||(e.animating=!0,e.onTranslateToWrapperTransitionEnd||(e.onTranslateToWrapperTransitionEnd=function(l){!e||e.destroyed||l.target===this&&(e.$wrapperEl[0].removeEventListener("transitionend",e.onTranslateToWrapperTransitionEnd),e.$wrapperEl[0].removeEventListener("webkitTransitionEnd",e.onTranslateToWrapperTransitionEnd),e.onTranslateToWrapperTransitionEnd=null,delete e.onTranslateToWrapperTransitionEnd,c&&e.emit("transitionEnd"))}),e.$wrapperEl[0].addEventListener("transitionend",e.onTranslateToWrapperTransitionEnd),e.$wrapperEl[0].addEventListener("webkitTransitionEnd",e.onTranslateToWrapperTransitionEnd))),!0}var nn={getTranslate:ki,setTranslate:qi,minTranslate:_i,maxTranslate:tn,translateTo:en};function sn(F,R){const c=this;c.params.cssMode||c.$wrapperEl.transition(F),c.emit("setTransition",F,R)}function ye(F){let{swiper:R,runCallbacks:c,direction:S,step:t}=F;const{activeIndex:e,previousIndex:u}=R;let o=S;if(o||(e>u?o="next":e<u?o="prev":o="reset"),R.emit(`transition${t}`),c&&e!==u){if(o==="reset"){R.emit(`slideResetTransition${t}`);return}R.emit(`slideChangeTransition${t}`),o==="next"?R.emit(`slideNextTransition${t}`):R.emit(`slidePrevTransition${t}`)}}function rn(F,R){F===void 0&&(F=!0);const c=this,{params:S}=c;S.cssMode||(S.autoHeight&&c.updateAutoHeight(),ye({swiper:c,runCallbacks:F,direction:R,step:"Start"}))}function an(F,R){F===void 0&&(F=!0);const c=this,{params:S}=c;c.animating=!1,!S.cssMode&&(c.setTransition(0),ye({swiper:c,runCallbacks:F,direction:R,step:"End"}))}var on={setTransition:sn,transitionStart:rn,transitionEnd:an};function hn(F,R,c,S,t){if(F===void 0&&(F=0),R===void 0&&(R=this.params.speed),c===void 0&&(c=!0),typeof F!="number"&&typeof F!="string")throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof F}] given.`);if(typeof F=="string"){const g=parseInt(F,10);if(!isFinite(g))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${F}] given.`);F=g}const e=this;let u=F;u<0&&(u=0);const{params:o,snapGrid:a,slidesGrid:s,previousIndex:i,activeIndex:n,rtlTranslate:l,wrapperEl:r,enabled:h}=e;if(e.animating&&o.preventInteractionOnTransition||!h&&!S&&!t)return!1;const f=Math.min(e.params.slidesPerGroupSkip,u);let v=f+Math.floor((u-f)/e.params.slidesPerGroup);v>=a.length&&(v=a.length-1),(n||o.initialSlide||0)===(i||0)&&c&&e.emit("beforeSlideChangeStart");const d=-a[v];if(e.updateProgress(d),o.normalizeSlideIndex)for(let g=0;g<s.length;g+=1){const m=-Math.floor(d*100),x=Math.floor(s[g]*100),y=Math.floor(s[g+1]*100);typeof s[g+1]!="undefined"?m>=x&&m<y-(y-x)/2?u=g:m>=x&&m<y&&(u=g+1):m>=x&&(u=g)}if(e.initialized&&u!==n&&(!e.allowSlideNext&&d<e.translate&&d<e.minTranslate()||!e.allowSlidePrev&&d>e.translate&&d>e.maxTranslate()&&(n||0)!==u))return!1;let p;if(u>n?p="next":u<n?p="prev":p="reset",l&&-d===e.translate||!l&&d===e.translate)return e.updateActiveIndex(u),o.autoHeight&&e.updateAutoHeight(),e.updateSlidesClasses(),o.effect!=="slide"&&e.setTranslate(d),p!=="reset"&&(e.transitionStart(c,p),e.transitionEnd(c,p)),!1;if(o.cssMode){const g=e.isHorizontal(),m=l?d:-d;if(R===0){const x=e.virtual&&e.params.virtual.enabled;x&&(e.wrapperEl.style.scrollSnapType="none",e._immediateVirtual=!0),r[g?"scrollLeft":"scrollTop"]=m,x&&requestAnimationFrame(()=>{e.wrapperEl.style.scrollSnapType="",e._swiperImmediateVirtual=!1})}else{if(!e.support.smoothScroll)return me({swiper:e,targetPosition:m,side:g?"left":"top"}),!0;r.scrollTo({[g?"left":"top"]:m,behavior:"smooth"})}return!0}return e.setTransition(R),e.setTranslate(d),e.updateActiveIndex(u),e.updateSlidesClasses(),e.emit("beforeTransitionStart",R,S),e.transitionStart(c,p),R===0?e.transitionEnd(c,p):e.animating||(e.animating=!0,e.onSlideToWrapperTransitionEnd||(e.onSlideToWrapperTransitionEnd=function(m){!e||e.destroyed||m.target===this&&(e.$wrapperEl[0].removeEventListener("transitionend",e.onSlideToWrapperTransitionEnd),e.$wrapperEl[0].removeEventListener("webkitTransitionEnd",e.onSlideToWrapperTransitionEnd),e.onSlideToWrapperTransitionEnd=null,delete e.onSlideToWrapperTransitionEnd,e.transitionEnd(c,p))}),e.$wrapperEl[0].addEventListener("transitionend",e.onSlideToWrapperTransitionEnd),e.$wrapperEl[0].addEventListener("webkitTransitionEnd",e.onSlideToWrapperTransitionEnd)),!0}function ln(F,R,c,S){F===void 0&&(F=0),R===void 0&&(R=this.params.speed),c===void 0&&(c=!0);const t=this;let e=F;return t.params.loop&&(e+=t.loopedSlides),t.slideTo(e,R,c,S)}function fn(F,R,c){F===void 0&&(F=this.params.speed),R===void 0&&(R=!0);const S=this,{animating:t,enabled:e,params:u}=S;if(!e)return S;let o=u.slidesPerGroup;u.slidesPerView==="auto"&&u.slidesPerGroup===1&&u.slidesPerGroupAuto&&(o=Math.max(S.slidesPerViewDynamic("current",!0),1));const a=S.activeIndex<u.slidesPerGroupSkip?1:o;if(u.loop){if(t&&u.loopPreventsSlide)return!1;S.loopFix(),S._clientLeft=S.$wrapperEl[0].clientLeft}return u.rewind&&S.isEnd?S.slideTo(0,F,R,c):S.slideTo(S.activeIndex+a,F,R,c)}function un(F,R,c){F===void 0&&(F=this.params.speed),R===void 0&&(R=!0);const S=this,{params:t,animating:e,snapGrid:u,slidesGrid:o,rtlTranslate:a,enabled:s}=S;if(!s)return S;if(t.loop){if(e&&t.loopPreventsSlide)return!1;S.loopFix(),S._clientLeft=S.$wrapperEl[0].clientLeft}const i=a?S.translate:-S.translate;function n(v){return v<0?-Math.floor(Math.abs(v)):Math.floor(v)}const l=n(i),r=u.map(v=>n(v));let h=u[r.indexOf(l)-1];if(typeof h=="undefined"&&t.cssMode){let v;u.forEach((d,p)=>{l>=d&&(v=p)}),typeof v!="undefined"&&(h=u[v>0?v-1:v])}let f=0;if(typeof h!="undefined"&&(f=o.indexOf(h),f<0&&(f=S.activeIndex-1),t.slidesPerView==="auto"&&t.slidesPerGroup===1&&t.slidesPerGroupAuto&&(f=f-S.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),t.rewind&&S.isBeginning){const v=S.params.virtual&&S.params.virtual.enabled&&S.virtual?S.virtual.slides.length-1:S.slides.length-1;return S.slideTo(v,F,R,c)}return S.slideTo(f,F,R,c)}function dn(F,R,c){F===void 0&&(F=this.params.speed),R===void 0&&(R=!0);const S=this;return S.slideTo(S.activeIndex,F,R,c)}function vn(F,R,c,S){F===void 0&&(F=this.params.speed),R===void 0&&(R=!0),S===void 0&&(S=.5);const t=this;let e=t.activeIndex;const u=Math.min(t.params.slidesPerGroupSkip,e),o=u+Math.floor((e-u)/t.params.slidesPerGroup),a=t.rtlTranslate?t.translate:-t.translate;if(a>=t.snapGrid[o]){const s=t.snapGrid[o],i=t.snapGrid[o+1];a-s>(i-s)*S&&(e+=t.params.slidesPerGroup)}else{const s=t.snapGrid[o-1],i=t.snapGrid[o];a-s<=(i-s)*S&&(e-=t.params.slidesPerGroup)}return e=Math.max(e,0),e=Math.min(e,t.slidesGrid.length-1),t.slideTo(e,F,R,c)}function cn(){const F=this,{params:R,$wrapperEl:c}=F,S=R.slidesPerView==="auto"?F.slidesPerViewDynamic():R.slidesPerView;let t=F.clickedIndex,e;if(R.loop){if(F.animating)return;e=parseInt(st(F.clickedSlide).attr("data-swiper-slide-index"),10),R.centeredSlides?t<F.loopedSlides-S/2||t>F.slides.length-F.loopedSlides+S/2?(F.loopFix(),t=c.children(`.${R.slideClass}[data-swiper-slide-index="${e}"]:not(.${R.slideDuplicateClass})`).eq(0).index(),qt(()=>{F.slideTo(t)})):F.slideTo(t):t>F.slides.length-S?(F.loopFix(),t=c.children(`.${R.slideClass}[data-swiper-slide-index="${e}"]:not(.${R.slideDuplicateClass})`).eq(0).index(),qt(()=>{F.slideTo(t)})):F.slideTo(t)}else F.slideTo(t)}var pn={slideTo:hn,slideToLoop:ln,slideNext:fn,slidePrev:un,slideReset:dn,slideToClosest:vn,slideToClickedSlide:cn};function gn(){const F=this,R=Lt(),{params:c,$wrapperEl:S}=F,t=S.children().length>0?st(S.children()[0].parentNode):S;t.children(`.${c.slideClass}.${c.slideDuplicateClass}`).remove();let e=t.children(`.${c.slideClass}`);if(c.loopFillGroupWithBlank){const a=c.slidesPerGroup-e.length%c.slidesPerGroup;if(a!==c.slidesPerGroup){for(let s=0;s<a;s+=1){const i=st(R.createElement("div")).addClass(`${c.slideClass} ${c.slideBlankClass}`);t.append(i)}e=t.children(`.${c.slideClass}`)}}c.slidesPerView==="auto"&&!c.loopedSlides&&(c.loopedSlides=e.length),F.loopedSlides=Math.ceil(parseFloat(c.loopedSlides||c.slidesPerView,10)),F.loopedSlides+=c.loopAdditionalSlides,F.loopedSlides>e.length&&(F.loopedSlides=e.length);const u=[],o=[];e.each((a,s)=>{const i=st(a);s<F.loopedSlides&&o.push(a),s<e.length&&s>=e.length-F.loopedSlides&&u.push(a),i.attr("data-swiper-slide-index",s)});for(let a=0;a<o.length;a+=1)t.append(st(o[a].cloneNode(!0)).addClass(c.slideDuplicateClass));for(let a=u.length-1;a>=0;a-=1)t.prepend(st(u[a].cloneNode(!0)).addClass(c.slideDuplicateClass))}function mn(){const F=this;F.emit("beforeLoopFix");const{activeIndex:R,slides:c,loopedSlides:S,allowSlidePrev:t,allowSlideNext:e,snapGrid:u,rtlTranslate:o}=F;let a;F.allowSlidePrev=!0,F.allowSlideNext=!0;const i=-u[R]-F.getTranslate();R<S?(a=c.length-S*3+R,a+=S,F.slideTo(a,0,!1,!0)&&i!==0&&F.setTranslate((o?-F.translate:F.translate)-i)):R>=c.length-S&&(a=-c.length+R+S,a+=S,F.slideTo(a,0,!1,!0)&&i!==0&&F.setTranslate((o?-F.translate:F.translate)-i)),F.allowSlidePrev=t,F.allowSlideNext=e,F.emit("loopFix")}function xn(){const F=this,{$wrapperEl:R,params:c,slides:S}=F;R.children(`.${c.slideClass}.${c.slideDuplicateClass},.${c.slideClass}.${c.slideBlankClass}`).remove(),S.removeAttr("data-swiper-slide-index")}var yn={loopCreate:gn,loopFix:mn,loopDestroy:xn};function Tn(F){const R=this;if(R.support.touch||!R.params.simulateTouch||R.params.watchOverflow&&R.isLocked||R.params.cssMode)return;const c=R.params.touchEventsTarget==="container"?R.el:R.wrapperEl;c.style.cursor="move",c.style.cursor=F?"-webkit-grabbing":"-webkit-grab",c.style.cursor=F?"-moz-grabbin":"-moz-grab",c.style.cursor=F?"grabbing":"grab"}function Sn(){const F=this;F.support.touch||F.params.watchOverflow&&F.isLocked||F.params.cssMode||(F[F.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="")}var En={setGrabCursor:Tn,unsetGrabCursor:Sn};function Cn(F,R){R===void 0&&(R=this);function c(S){return!S||S===Lt()||S===Ct()?null:(S.assignedSlot&&(S=S.assignedSlot),S.closest(F)||c(S.getRootNode().host))}return c(R)}function Pn(F){const R=this,c=Lt(),S=Ct(),t=R.touchEventsData,{params:e,touches:u,enabled:o}=R;if(!o||R.animating&&e.preventInteractionOnTransition)return;!R.animating&&e.cssMode&&e.loop&&R.loopFix();let a=F;a.originalEvent&&(a=a.originalEvent);let s=st(a.target);if(e.touchEventsTarget==="wrapper"&&!s.closest(R.wrapperEl).length||(t.isTouchEvent=a.type==="touchstart",!t.isTouchEvent&&"which"in a&&a.which===3)||!t.isTouchEvent&&"button"in a&&a.button>0||t.isTouched&&t.isMoved)return;!!e.noSwipingClass&&e.noSwipingClass!==""&&a.target&&a.target.shadowRoot&&F.path&&F.path[0]&&(s=st(F.path[0]));const n=e.noSwipingSelector?e.noSwipingSelector:`.${e.noSwipingClass}`,l=!!(a.target&&a.target.shadowRoot);if(e.noSwiping&&(l?Cn(n,a.target):s.closest(n)[0])){R.allowClick=!0;return}if(e.swipeHandler&&!s.closest(e.swipeHandler)[0])return;u.currentX=a.type==="touchstart"?a.targetTouches[0].pageX:a.pageX,u.currentY=a.type==="touchstart"?a.targetTouches[0].pageY:a.pageY;const r=u.currentX,h=u.currentY,f=e.edgeSwipeDetection||e.iOSEdgeSwipeDetection,v=e.edgeSwipeThreshold||e.iOSEdgeSwipeThreshold;if(f&&(r<=v||r>=S.innerWidth-v))if(f==="prevent")F.preventDefault();else return;if(Object.assign(t,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),u.startX=r,u.startY=h,t.touchStartTime=Kt(),R.allowClick=!0,R.updateSize(),R.swipeDirection=void 0,e.threshold>0&&(t.allowThresholdMove=!1),a.type!=="touchstart"){let d=!0;s.is(t.focusableElements)&&(d=!1,s[0].nodeName==="SELECT"&&(t.isTouched=!1)),c.activeElement&&st(c.activeElement).is(t.focusableElements)&&c.activeElement!==s[0]&&c.activeElement.blur();const p=d&&R.allowTouchMove&&e.touchStartPreventDefault;(e.touchStartForcePreventDefault||p)&&!s[0].isContentEditable&&a.preventDefault()}R.params.freeMode&&R.params.freeMode.enabled&&R.freeMode&&R.animating&&!e.cssMode&&R.freeMode.onTouchStart(),R.emit("touchStart",a)}function An(F){const R=Lt(),c=this,S=c.touchEventsData,{params:t,touches:e,rtlTranslate:u,enabled:o}=c;if(!o)return;let a=F;if(a.originalEvent&&(a=a.originalEvent),!S.isTouched){S.startMoving&&S.isScrolling&&c.emit("touchMoveOpposite",a);return}if(S.isTouchEvent&&a.type!=="touchmove")return;const s=a.type==="touchmove"&&a.targetTouches&&(a.targetTouches[0]||a.changedTouches[0]),i=a.type==="touchmove"?s.pageX:a.pageX,n=a.type==="touchmove"?s.pageY:a.pageY;if(a.preventedByNestedSwiper){e.startX=i,e.startY=n;return}if(!c.allowTouchMove){st(a.target).is(S.focusableElements)||(c.allowClick=!1),S.isTouched&&(Object.assign(e,{startX:i,startY:n,currentX:i,currentY:n}),S.touchStartTime=Kt());return}if(S.isTouchEvent&&t.touchReleaseOnEdges&&!t.loop){if(c.isVertical()){if(n<e.startY&&c.translate<=c.maxTranslate()||n>e.startY&&c.translate>=c.minTranslate()){S.isTouched=!1,S.isMoved=!1;return}}else if(i<e.startX&&c.translate<=c.maxTranslate()||i>e.startX&&c.translate>=c.minTranslate())return}if(S.isTouchEvent&&R.activeElement&&a.target===R.activeElement&&st(a.target).is(S.focusableElements)){S.isMoved=!0,c.allowClick=!1;return}if(S.allowTouchCallbacks&&c.emit("touchMove",a),a.targetTouches&&a.targetTouches.length>1)return;e.currentX=i,e.currentY=n;const l=e.currentX-e.startX,r=e.currentY-e.startY;if(c.params.threshold&&Math.sqrt(l**2+r**2)<c.params.threshold)return;if(typeof S.isScrolling=="undefined"){let d;c.isHorizontal()&&e.currentY===e.startY||c.isVertical()&&e.currentX===e.startX?S.isScrolling=!1:l*l+r*r>=25&&(d=Math.atan2(Math.abs(r),Math.abs(l))*180/Math.PI,S.isScrolling=c.isHorizontal()?d>t.touchAngle:90-d>t.touchAngle)}if(S.isScrolling&&c.emit("touchMoveOpposite",a),typeof S.startMoving=="undefined"&&(e.currentX!==e.startX||e.currentY!==e.startY)&&(S.startMoving=!0),S.isScrolling){S.isTouched=!1;return}if(!S.startMoving)return;c.allowClick=!1,!t.cssMode&&a.cancelable&&a.preventDefault(),t.touchMoveStopPropagation&&!t.nested&&a.stopPropagation(),S.isMoved||(t.loop&&!t.cssMode&&c.loopFix(),S.startTranslate=c.getTranslate(),c.setTransition(0),c.animating&&c.$wrapperEl.trigger("webkitTransitionEnd transitionend"),S.allowMomentumBounce=!1,t.grabCursor&&(c.allowSlideNext===!0||c.allowSlidePrev===!0)&&c.setGrabCursor(!0),c.emit("sliderFirstMove",a)),c.emit("sliderMove",a),S.isMoved=!0;let h=c.isHorizontal()?l:r;e.diff=h,h*=t.touchRatio,u&&(h=-h),c.swipeDirection=h>0?"prev":"next",S.currentTranslate=h+S.startTranslate;let f=!0,v=t.resistanceRatio;if(t.touchReleaseOnEdges&&(v=0),h>0&&S.currentTranslate>c.minTranslate()?(f=!1,t.resistance&&(S.currentTranslate=c.minTranslate()-1+(-c.minTranslate()+S.startTranslate+h)**v)):h<0&&S.currentTranslate<c.maxTranslate()&&(f=!1,t.resistance&&(S.currentTranslate=c.maxTranslate()+1-(c.maxTranslate()-S.startTranslate-h)**v)),f&&(a.preventedByNestedSwiper=!0),!c.allowSlideNext&&c.swipeDirection==="next"&&S.currentTranslate<S.startTranslate&&(S.currentTranslate=S.startTranslate),!c.allowSlidePrev&&c.swipeDirection==="prev"&&S.currentTranslate>S.startTranslate&&(S.currentTranslate=S.startTranslate),!c.allowSlidePrev&&!c.allowSlideNext&&(S.currentTranslate=S.startTranslate),t.threshold>0)if(Math.abs(h)>t.threshold||S.allowThresholdMove){if(!S.allowThresholdMove){S.allowThresholdMove=!0,e.startX=e.currentX,e.startY=e.currentY,S.currentTranslate=S.startTranslate,e.diff=c.isHorizontal()?e.currentX-e.startX:e.currentY-e.startY;return}}else{S.currentTranslate=S.startTranslate;return}!t.followFinger||t.cssMode||((t.freeMode&&t.freeMode.enabled&&c.freeMode||t.watchSlidesProgress)&&(c.updateActiveIndex(),c.updateSlidesClasses()),c.params.freeMode&&t.freeMode.enabled&&c.freeMode&&c.freeMode.onTouchMove(),c.updateProgress(S.currentTranslate),c.setTranslate(S.currentTranslate))}function Mn(F){const R=this,c=R.touchEventsData,{params:S,touches:t,rtlTranslate:e,slidesGrid:u,enabled:o}=R;if(!o)return;let a=F;if(a.originalEvent&&(a=a.originalEvent),c.allowTouchCallbacks&&R.emit("touchEnd",a),c.allowTouchCallbacks=!1,!c.isTouched){c.isMoved&&S.grabCursor&&R.setGrabCursor(!1),c.isMoved=!1,c.startMoving=!1;return}S.grabCursor&&c.isMoved&&c.isTouched&&(R.allowSlideNext===!0||R.allowSlidePrev===!0)&&R.setGrabCursor(!1);const s=Kt(),i=s-c.touchStartTime;if(R.allowClick){const v=a.path||a.composedPath&&a.composedPath();R.updateClickedSlide(v&&v[0]||a.target),R.emit("tap click",a),i<300&&s-c.lastClickTime<300&&R.emit("doubleTap doubleClick",a)}if(c.lastClickTime=Kt(),qt(()=>{R.destroyed||(R.allowClick=!0)}),!c.isTouched||!c.isMoved||!R.swipeDirection||t.diff===0||c.currentTranslate===c.startTranslate){c.isTouched=!1,c.isMoved=!1,c.startMoving=!1;return}c.isTouched=!1,c.isMoved=!1,c.startMoving=!1;let n;if(S.followFinger?n=e?R.translate:-R.translate:n=-c.currentTranslate,S.cssMode)return;if(R.params.freeMode&&S.freeMode.enabled){R.freeMode.onTouchEnd({currentPos:n});return}let l=0,r=R.slidesSizesGrid[0];for(let v=0;v<u.length;v+=v<S.slidesPerGroupSkip?1:S.slidesPerGroup){const d=v<S.slidesPerGroupSkip-1?1:S.slidesPerGroup;typeof u[v+d]!="undefined"?n>=u[v]&&n<u[v+d]&&(l=v,r=u[v+d]-u[v]):n>=u[v]&&(l=v,r=u[u.length-1]-u[u.length-2])}const h=(n-u[l])/r,f=l<S.slidesPerGroupSkip-1?1:S.slidesPerGroup;if(i>S.longSwipesMs){if(!S.longSwipes){R.slideTo(R.activeIndex);return}R.swipeDirection==="next"&&(h>=S.longSwipesRatio?R.slideTo(l+f):R.slideTo(l)),R.swipeDirection==="prev"&&(h>1-S.longSwipesRatio?R.slideTo(l+f):R.slideTo(l))}else{if(!S.shortSwipes){R.slideTo(R.activeIndex);return}R.navigation&&(a.target===R.navigation.nextEl||a.target===R.navigation.prevEl)?a.target===R.navigation.nextEl?R.slideTo(l+f):R.slideTo(l):(R.swipeDirection==="next"&&R.slideTo(l+f),R.swipeDirection==="prev"&&R.slideTo(l))}}function Te(){const F=this,{params:R,el:c}=F;if(c&&c.offsetWidth===0)return;R.breakpoints&&F.setBreakpoint();const{allowSlideNext:S,allowSlidePrev:t,snapGrid:e}=F;F.allowSlideNext=!0,F.allowSlidePrev=!0,F.updateSize(),F.updateSlides(),F.updateSlidesClasses(),(R.slidesPerView==="auto"||R.slidesPerView>1)&&F.isEnd&&!F.isBeginning&&!F.params.centeredSlides?F.slideTo(F.slides.length-1,0,!1,!0):F.slideTo(F.activeIndex,0,!1,!0),F.autoplay&&F.autoplay.running&&F.autoplay.paused&&F.autoplay.run(),F.allowSlidePrev=t,F.allowSlideNext=S,F.params.watchOverflow&&e!==F.snapGrid&&F.checkOverflow()}function Rn(F){const R=this;!R.enabled||R.allowClick||(R.params.preventClicks&&F.preventDefault(),R.params.preventClicksPropagation&&R.animating&&(F.stopPropagation(),F.stopImmediatePropagation()))}function Ln(){const F=this,{wrapperEl:R,rtlTranslate:c,enabled:S}=F;if(!S)return;F.previousTranslate=F.translate,F.isHorizontal()?F.translate=-R.scrollLeft:F.translate=-R.scrollTop,F.translate===-0&&(F.translate=0),F.updateActiveIndex(),F.updateSlidesClasses();let t;const e=F.maxTranslate()-F.minTranslate();e===0?t=0:t=(F.translate-F.minTranslate())/e,t!==F.progress&&F.updateProgress(c?-F.translate:F.translate),F.emit("setTranslate",F.translate,!1)}let Se=!1;function On(){}const Ee=(F,R)=>{const c=Lt(),{params:S,touchEvents:t,el:e,wrapperEl:u,device:o,support:a}=F,s=!!S.nested,i=R==="on"?"addEventListener":"removeEventListener",n=R;if(!a.touch)e[i](t.start,F.onTouchStart,!1),c[i](t.move,F.onTouchMove,s),c[i](t.end,F.onTouchEnd,!1);else{const l=t.start==="touchstart"&&a.passiveListener&&S.passiveListeners?{passive:!0,capture:!1}:!1;e[i](t.start,F.onTouchStart,l),e[i](t.move,F.onTouchMove,a.passiveListener?{passive:!1,capture:s}:s),e[i](t.end,F.onTouchEnd,l),t.cancel&&e[i](t.cancel,F.onTouchEnd,l)}(S.preventClicks||S.preventClicksPropagation)&&e[i]("click",F.onClick,!0),S.cssMode&&u[i]("scroll",F.onScroll),S.updateOnWindowResize?F[n](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",Te,!0):F[n]("observerUpdate",Te,!0)};function Fn(){const F=this,R=Lt(),{params:c,support:S}=F;F.onTouchStart=Pn.bind(F),F.onTouchMove=An.bind(F),F.onTouchEnd=Mn.bind(F),c.cssMode&&(F.onScroll=Ln.bind(F)),F.onClick=Rn.bind(F),S.touch&&!Se&&(R.addEventListener("touchstart",On),Se=!0),Ee(F,"on")}function In(){Ee(this,"off")}var Dn={attachEvents:Fn,detachEvents:In};const Ce=(F,R)=>F.grid&&R.grid&&R.grid.rows>1;function Bn(){const F=this,{activeIndex:R,initialized:c,loopedSlides:S=0,params:t,$el:e}=F,u=t.breakpoints;if(!u||u&&Object.keys(u).length===0)return;const o=F.getBreakpoint(u,F.params.breakpointsBase,F.el);if(!o||F.currentBreakpoint===o)return;const s=(o in u?u[o]:void 0)||F.originalParams,i=Ce(F,t),n=Ce(F,s),l=t.enabled;i&&!n?(e.removeClass(`${t.containerModifierClass}grid ${t.containerModifierClass}grid-column`),F.emitContainerClasses()):!i&&n&&(e.addClass(`${t.containerModifierClass}grid`),(s.grid.fill&&s.grid.fill==="column"||!s.grid.fill&&t.grid.fill==="column")&&e.addClass(`${t.containerModifierClass}grid-column`),F.emitContainerClasses());const r=s.direction&&s.direction!==t.direction,h=t.loop&&(s.slidesPerView!==t.slidesPerView||r);r&&c&&F.changeDirection(),Ot(F.params,s);const f=F.params.enabled;Object.assign(F,{allowTouchMove:F.params.allowTouchMove,allowSlideNext:F.params.allowSlideNext,allowSlidePrev:F.params.allowSlidePrev}),l&&!f?F.disable():!l&&f&&F.enable(),F.currentBreakpoint=o,F.emit("_beforeBreakpoint",s),h&&c&&(F.loopDestroy(),F.loopCreate(),F.updateSlides(),F.slideTo(R-S+F.loopedSlides,0,!1)),F.emit("breakpoint",s)}function Gn(F,R,c){if(R===void 0&&(R="window"),!F||R==="container"&&!c)return;let S=!1;const t=Ct(),e=R==="window"?t.innerHeight:c.clientHeight,u=Object.keys(F).map(o=>{if(typeof o=="string"&&o.indexOf("@")===0){const a=parseFloat(o.substr(1));return{value:e*a,point:o}}return{value:o,point:o}});u.sort((o,a)=>parseInt(o.value,10)-parseInt(a.value,10));for(let o=0;o<u.length;o+=1){const{point:a,value:s}=u[o];R==="window"?t.matchMedia(`(min-width: ${s}px)`).matches&&(S=a):s<=c.clientWidth&&(S=a)}return S||"max"}var Nn={setBreakpoint:Bn,getBreakpoint:Gn};function wn(F,R){const c=[];return F.forEach(S=>{typeof S=="object"?Object.keys(S).forEach(t=>{S[t]&&c.push(R+t)}):typeof S=="string"&&c.push(R+S)}),c}function Yn(){const F=this,{classNames:R,params:c,rtl:S,$el:t,device:e,support:u}=F,o=wn(["initialized",c.direction,{"pointer-events":!u.touch},{"free-mode":F.params.freeMode&&c.freeMode.enabled},{autoheight:c.autoHeight},{rtl:S},{grid:c.grid&&c.grid.rows>1},{"grid-column":c.grid&&c.grid.rows>1&&c.grid.fill==="column"},{android:e.android},{ios:e.ios},{"css-mode":c.cssMode},{centered:c.cssMode&&c.centeredSlides}],c.containerModifierClass);R.push(...o),t.addClass([...R].join(" ")),F.emitContainerClasses()}function zn(){const F=this,{$el:R,classNames:c}=F;R.removeClass(c.join(" ")),F.emitContainerClasses()}var Un={addClasses:Yn,removeClasses:zn};function Xn(F,R,c,S,t,e){const u=Ct();let o;function a(){e&&e()}!st(F).parent("picture")[0]&&(!F.complete||!t)&&R?(o=new u.Image,o.onload=a,o.onerror=a,S&&(o.sizes=S),c&&(o.srcset=c),R&&(o.src=R)):a()}function Vn(){const F=this;F.imagesToLoad=F.$el.find("img");function R(){typeof F=="undefined"||F===null||!F||F.destroyed||(F.imagesLoaded!==void 0&&(F.imagesLoaded+=1),F.imagesLoaded===F.imagesToLoad.length&&(F.params.updateOnImagesReady&&F.update(),F.emit("imagesReady")))}for(let c=0;c<F.imagesToLoad.length;c+=1){const S=F.imagesToLoad[c];F.loadImage(S,S.currentSrc||S.getAttribute("src"),S.srcset||S.getAttribute("srcset"),S.sizes||S.getAttribute("sizes"),!0,R)}}var Wn={loadImage:Xn,preloadImages:Vn};function Hn(){const F=this,{isLocked:R,params:c}=F,{slidesOffsetBefore:S}=c;if(S){const t=F.slides.length-1,e=F.slidesGrid[t]+F.slidesSizesGrid[t]+S*2;F.isLocked=F.size>e}else F.isLocked=F.snapGrid.length===1;c.allowSlideNext===!0&&(F.allowSlideNext=!F.isLocked),c.allowSlidePrev===!0&&(F.allowSlidePrev=!F.isLocked),R&&R!==F.isLocked&&(F.isEnd=!1),R!==F.isLocked&&F.emit(F.isLocked?"lock":"unlock")}var Kn={checkOverflow:Hn},Pe={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function Zn(F,R){return function(S){S===void 0&&(S={});const t=Object.keys(S)[0],e=S[t];if(typeof e!="object"||e===null){Ot(R,S);return}if(["navigation","pagination","scrollbar"].indexOf(t)>=0&&F[t]===!0&&(F[t]={auto:!0}),!(t in F&&"enabled"in e)){Ot(R,S);return}F[t]===!0&&(F[t]={enabled:!0}),typeof F[t]=="object"&&!("enabled"in F[t])&&(F[t].enabled=!0),F[t]||(F[t]={enabled:!1}),Ot(R,S)}}const ie={eventsEmitter:Xi,update:ji,translate:nn,transition:on,slide:pn,loop:yn,grabCursor:En,events:Dn,breakpoints:Nn,checkOverflow:Kn,classes:Un,images:Wn},ne={};class Dt{constructor(){let R,c;for(var S=arguments.length,t=new Array(S),e=0;e<S;e++)t[e]=arguments[e];if(t.length===1&&t[0].constructor&&Object.prototype.toString.call(t[0]).slice(8,-1)==="Object"?c=t[0]:[R,c]=t,c||(c={}),c=Ot({},c),R&&!c.el&&(c.el=R),c.el&&st(c.el).length>1){const s=[];return st(c.el).each(i=>{const n=Ot({},c,{el:i});s.push(new Dt(n))}),s}const u=this;u.__swiper__=!0,u.support=xe(),u.device=Ni({userAgent:c.userAgent}),u.browser=Yi(),u.eventsListeners={},u.eventsAnyListeners=[],u.modules=[...u.__modules__],c.modules&&Array.isArray(c.modules)&&u.modules.push(...c.modules);const o={};u.modules.forEach(s=>{s({swiper:u,extendParams:Zn(c,o),on:u.on.bind(u),once:u.once.bind(u),off:u.off.bind(u),emit:u.emit.bind(u)})});const a=Ot({},Pe,o);return u.params=Ot({},a,ne,c),u.originalParams=Ot({},u.params),u.passedParams=Ot({},c),u.params&&u.params.on&&Object.keys(u.params.on).forEach(s=>{u.on(s,u.params.on[s])}),u.params&&u.params.onAny&&u.onAny(u.params.onAny),u.$=st,Object.assign(u,{enabled:u.params.enabled,el:R,classNames:[],slides:st(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return u.params.direction==="horizontal"},isVertical(){return u.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:u.params.allowSlideNext,allowSlidePrev:u.params.allowSlidePrev,touchEvents:function(){const i=["touchstart","touchmove","touchend","touchcancel"],n=["pointerdown","pointermove","pointerup"];return u.touchEventsTouch={start:i[0],move:i[1],end:i[2],cancel:i[3]},u.touchEventsDesktop={start:n[0],move:n[1],end:n[2]},u.support.touch||!u.params.simulateTouch?u.touchEventsTouch:u.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:u.params.focusableElements,lastClickTime:Kt(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:u.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),u.emit("_swiper"),u.params.init&&u.init(),u}enable(){const R=this;R.enabled||(R.enabled=!0,R.params.grabCursor&&R.setGrabCursor(),R.emit("enable"))}disable(){const R=this;!R.enabled||(R.enabled=!1,R.params.grabCursor&&R.unsetGrabCursor(),R.emit("disable"))}setProgress(R,c){const S=this;R=Math.min(Math.max(R,0),1);const t=S.minTranslate(),u=(S.maxTranslate()-t)*R+t;S.translateTo(u,typeof c=="undefined"?0:c),S.updateActiveIndex(),S.updateSlidesClasses()}emitContainerClasses(){const R=this;if(!R.params._emitClasses||!R.el)return;const c=R.el.className.split(" ").filter(S=>S.indexOf("swiper")===0||S.indexOf(R.params.containerModifierClass)===0);R.emit("_containerClasses",c.join(" "))}getSlideClasses(R){const c=this;return R.className.split(" ").filter(S=>S.indexOf("swiper-slide")===0||S.indexOf(c.params.slideClass)===0).join(" ")}emitSlidesClasses(){const R=this;if(!R.params._emitClasses||!R.el)return;const c=[];R.slides.each(S=>{const t=R.getSlideClasses(S);c.push({slideEl:S,classNames:t}),R.emit("_slideClass",S,t)}),R.emit("_slideClasses",c)}slidesPerViewDynamic(R,c){R===void 0&&(R="current"),c===void 0&&(c=!1);const S=this,{params:t,slides:e,slidesGrid:u,slidesSizesGrid:o,size:a,activeIndex:s}=S;let i=1;if(t.centeredSlides){let n=e[s].swiperSlideSize,l;for(let r=s+1;r<e.length;r+=1)e[r]&&!l&&(n+=e[r].swiperSlideSize,i+=1,n>a&&(l=!0));for(let r=s-1;r>=0;r-=1)e[r]&&!l&&(n+=e[r].swiperSlideSize,i+=1,n>a&&(l=!0))}else if(R==="current")for(let n=s+1;n<e.length;n+=1)(c?u[n]+o[n]-u[s]<a:u[n]-u[s]<a)&&(i+=1);else for(let n=s-1;n>=0;n-=1)u[s]-u[n]<a&&(i+=1);return i}update(){const R=this;if(!R||R.destroyed)return;const{snapGrid:c,params:S}=R;S.breakpoints&&R.setBreakpoint(),R.updateSize(),R.updateSlides(),R.updateProgress(),R.updateSlidesClasses();function t(){const u=R.rtlTranslate?R.translate*-1:R.translate,o=Math.min(Math.max(u,R.maxTranslate()),R.minTranslate());R.setTranslate(o),R.updateActiveIndex(),R.updateSlidesClasses()}let e;R.params.freeMode&&R.params.freeMode.enabled?(t(),R.params.autoHeight&&R.updateAutoHeight()):((R.params.slidesPerView==="auto"||R.params.slidesPerView>1)&&R.isEnd&&!R.params.centeredSlides?e=R.slideTo(R.slides.length-1,0,!1,!0):e=R.slideTo(R.activeIndex,0,!1,!0),e||t()),S.watchOverflow&&c!==R.snapGrid&&R.checkOverflow(),R.emit("update")}changeDirection(R,c){c===void 0&&(c=!0);const S=this,t=S.params.direction;return R||(R=t==="horizontal"?"vertical":"horizontal"),R===t||R!=="horizontal"&&R!=="vertical"||(S.$el.removeClass(`${S.params.containerModifierClass}${t}`).addClass(`${S.params.containerModifierClass}${R}`),S.emitContainerClasses(),S.params.direction=R,S.slides.each(e=>{R==="vertical"?e.style.width="":e.style.height=""}),S.emit("changeDirection"),c&&S.update()),S}mount(R){const c=this;if(c.mounted)return!0;const S=st(R||c.params.el);if(R=S[0],!R)return!1;R.swiper=c;const t=()=>`.${(c.params.wrapperClass||"").trim().split(" ").join(".")}`;let u=(()=>{if(R&&R.shadowRoot&&R.shadowRoot.querySelector){const o=st(R.shadowRoot.querySelector(t()));return o.children=a=>S.children(a),o}return S.children(t())})();if(u.length===0&&c.params.createElements){const a=Lt().createElement("div");u=st(a),a.className=c.params.wrapperClass,S.append(a),S.children(`.${c.params.slideClass}`).each(s=>{u.append(s)})}return Object.assign(c,{$el:S,el:R,$wrapperEl:u,wrapperEl:u[0],mounted:!0,rtl:R.dir.toLowerCase()==="rtl"||S.css("direction")==="rtl",rtlTranslate:c.params.direction==="horizontal"&&(R.dir.toLowerCase()==="rtl"||S.css("direction")==="rtl"),wrongRTL:u.css("display")==="-webkit-box"}),!0}init(R){const c=this;return c.initialized||c.mount(R)===!1||(c.emit("beforeInit"),c.params.breakpoints&&c.setBreakpoint(),c.addClasses(),c.params.loop&&c.loopCreate(),c.updateSize(),c.updateSlides(),c.params.watchOverflow&&c.checkOverflow(),c.params.grabCursor&&c.enabled&&c.setGrabCursor(),c.params.preloadImages&&c.preloadImages(),c.params.loop?c.slideTo(c.params.initialSlide+c.loopedSlides,0,c.params.runCallbacksOnInit,!1,!0):c.slideTo(c.params.initialSlide,0,c.params.runCallbacksOnInit,!1,!0),c.attachEvents(),c.initialized=!0,c.emit("init"),c.emit("afterInit")),c}destroy(R,c){R===void 0&&(R=!0),c===void 0&&(c=!0);const S=this,{params:t,$el:e,$wrapperEl:u,slides:o}=S;return typeof S.params=="undefined"||S.destroyed||(S.emit("beforeDestroy"),S.initialized=!1,S.detachEvents(),t.loop&&S.loopDestroy(),c&&(S.removeClasses(),e.removeAttr("style"),u.removeAttr("style"),o&&o.length&&o.removeClass([t.slideVisibleClass,t.slideActiveClass,t.slideNextClass,t.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),S.emit("destroy"),Object.keys(S.eventsListeners).forEach(a=>{S.off(a)}),R!==!1&&(S.$el[0].swiper=null,Oi(S)),S.destroyed=!0),null}static extendDefaults(R){Ot(ne,R)}static get extendedDefaults(){return ne}static get defaults(){return Pe}static installModule(R){Dt.prototype.__modules__||(Dt.prototype.__modules__=[]);const c=Dt.prototype.__modules__;typeof R=="function"&&c.indexOf(R)<0&&c.push(R)}static use(R){return Array.isArray(R)?(R.forEach(c=>Dt.installModule(c)),Dt):(Dt.installModule(R),Dt)}}Object.keys(ie).forEach(F=>{Object.keys(ie[F]).forEach(R=>{Dt.prototype[R]=ie[F][R]})});Dt.use([zi,Ui]);function Ae(F,R,c,S){const t=Lt();return F.params.createElements&&Object.keys(S).forEach(e=>{if(!c[e]&&c.auto===!0){let u=F.$el.children(`.${S[e]}`)[0];u||(u=t.createElement("div"),u.className=S[e],F.$el.append(u)),c[e]=u,R[e]=u}}),c}function bn(F){let{swiper:R,extendParams:c,on:S,emit:t}=F;c({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}}),R.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null};function e(l){let r;return l&&(r=st(l),R.params.uniqueNavElements&&typeof l=="string"&&r.length>1&&R.$el.find(l).length===1&&(r=R.$el.find(l))),r}function u(l,r){const h=R.params.navigation;l&&l.length>0&&(l[r?"addClass":"removeClass"](h.disabledClass),l[0]&&l[0].tagName==="BUTTON"&&(l[0].disabled=r),R.params.watchOverflow&&R.enabled&&l[R.isLocked?"addClass":"removeClass"](h.lockClass))}function o(){if(R.params.loop)return;const{$nextEl:l,$prevEl:r}=R.navigation;u(r,R.isBeginning&&!R.params.rewind),u(l,R.isEnd&&!R.params.rewind)}function a(l){l.preventDefault(),!(R.isBeginning&&!R.params.loop&&!R.params.rewind)&&R.slidePrev()}function s(l){l.preventDefault(),!(R.isEnd&&!R.params.loop&&!R.params.rewind)&&R.slideNext()}function i(){const l=R.params.navigation;if(R.params.navigation=Ae(R,R.originalParams.navigation,R.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(l.nextEl||l.prevEl))return;const r=e(l.nextEl),h=e(l.prevEl);r&&r.length>0&&r.on("click",s),h&&h.length>0&&h.on("click",a),Object.assign(R.navigation,{$nextEl:r,nextEl:r&&r[0],$prevEl:h,prevEl:h&&h[0]}),R.enabled||(r&&r.addClass(l.lockClass),h&&h.addClass(l.lockClass))}function n(){const{$nextEl:l,$prevEl:r}=R.navigation;l&&l.length&&(l.off("click",s),l.removeClass(R.params.navigation.disabledClass)),r&&r.length&&(r.off("click",a),r.removeClass(R.params.navigation.disabledClass))}S("init",()=>{i(),o()}),S("toEdge fromEdge lock unlock",()=>{o()}),S("destroy",()=>{n()}),S("enable disable",()=>{const{$nextEl:l,$prevEl:r}=R.navigation;l&&l[R.enabled?"removeClass":"addClass"](R.params.navigation.lockClass),r&&r[R.enabled?"removeClass":"addClass"](R.params.navigation.lockClass)}),S("click",(l,r)=>{const{$nextEl:h,$prevEl:f}=R.navigation,v=r.target;if(R.params.navigation.hideOnClick&&!st(v).is(f)&&!st(v).is(h)){if(R.pagination&&R.params.pagination&&R.params.pagination.clickable&&(R.pagination.el===v||R.pagination.el.contains(v)))return;let d;h?d=h.hasClass(R.params.navigation.hiddenClass):f&&(d=f.hasClass(R.params.navigation.hiddenClass)),t(d===!0?"navigationShow":"navigationHide"),h&&h.toggleClass(R.params.navigation.hiddenClass),f&&f.toggleClass(R.params.navigation.hiddenClass)}}),Object.assign(R.navigation,{update:o,init:i,destroy:n})}function Ut(F){return F===void 0&&(F=""),`.${F.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}`}function jn(F){let{swiper:R,extendParams:c,on:S,emit:t}=F;const e="swiper-pagination";c({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:h=>h,formatFractionTotal:h=>h,bulletClass:`${e}-bullet`,bulletActiveClass:`${e}-bullet-active`,modifierClass:`${e}-`,currentClass:`${e}-current`,totalClass:`${e}-total`,hiddenClass:`${e}-hidden`,progressbarFillClass:`${e}-progressbar-fill`,progressbarOppositeClass:`${e}-progressbar-opposite`,clickableClass:`${e}-clickable`,lockClass:`${e}-lock`,horizontalClass:`${e}-horizontal`,verticalClass:`${e}-vertical`}}),R.pagination={el:null,$el:null,bullets:[]};let u,o=0;function a(){return!R.params.pagination.el||!R.pagination.el||!R.pagination.$el||R.pagination.$el.length===0}function s(h,f){const{bulletActiveClass:v}=R.params.pagination;h[f]().addClass(`${v}-${f}`)[f]().addClass(`${v}-${f}-${f}`)}function i(){const h=R.rtl,f=R.params.pagination;if(a())return;const v=R.virtual&&R.params.virtual.enabled?R.virtual.slides.length:R.slides.length,d=R.pagination.$el;let p;const g=R.params.loop?Math.ceil((v-R.loopedSlides*2)/R.params.slidesPerGroup):R.snapGrid.length;if(R.params.loop?(p=Math.ceil((R.activeIndex-R.loopedSlides)/R.params.slidesPerGroup),p>v-1-R.loopedSlides*2&&(p-=v-R.loopedSlides*2),p>g-1&&(p-=g),p<0&&R.params.paginationType!=="bullets"&&(p=g+p)):typeof R.snapIndex!="undefined"?p=R.snapIndex:p=R.activeIndex||0,f.type==="bullets"&&R.pagination.bullets&&R.pagination.bullets.length>0){const m=R.pagination.bullets;let x,y,T;if(f.dynamicBullets&&(u=m.eq(0)[R.isHorizontal()?"outerWidth":"outerHeight"](!0),d.css(R.isHorizontal()?"width":"height",`${u*(f.dynamicMainBullets+4)}px`),f.dynamicMainBullets>1&&R.previousIndex!==void 0&&(o+=p-(R.previousIndex-R.loopedSlides||0),o>f.dynamicMainBullets-1?o=f.dynamicMainBullets-1:o<0&&(o=0)),x=Math.max(p-o,0),y=x+(Math.min(m.length,f.dynamicMainBullets)-1),T=(y+x)/2),m.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map(E=>`${f.bulletActiveClass}${E}`).join(" ")),d.length>1)m.each(E=>{const C=st(E),A=C.index();A===p&&C.addClass(f.bulletActiveClass),f.dynamicBullets&&(A>=x&&A<=y&&C.addClass(`${f.bulletActiveClass}-main`),A===x&&s(C,"prev"),A===y&&s(C,"next"))});else{const E=m.eq(p),C=E.index();if(E.addClass(f.bulletActiveClass),f.dynamicBullets){const A=m.eq(x),P=m.eq(y);for(let M=x;M<=y;M+=1)m.eq(M).addClass(`${f.bulletActiveClass}-main`);if(R.params.loop)if(C>=m.length){for(let M=f.dynamicMainBullets;M>=0;M-=1)m.eq(m.length-M).addClass(`${f.bulletActiveClass}-main`);m.eq(m.length-f.dynamicMainBullets-1).addClass(`${f.bulletActiveClass}-prev`)}else s(A,"prev"),s(P,"next");else s(A,"prev"),s(P,"next")}}if(f.dynamicBullets){const E=Math.min(m.length,f.dynamicMainBullets+4),C=(u*E-u)/2-T*u,A=h?"right":"left";m.css(R.isHorizontal()?A:"top",`${C}px`)}}if(f.type==="fraction"&&(d.find(Ut(f.currentClass)).text(f.formatFractionCurrent(p+1)),d.find(Ut(f.totalClass)).text(f.formatFractionTotal(g))),f.type==="progressbar"){let m;f.progressbarOpposite?m=R.isHorizontal()?"vertical":"horizontal":m=R.isHorizontal()?"horizontal":"vertical";const x=(p+1)/g;let y=1,T=1;m==="horizontal"?y=x:T=x,d.find(Ut(f.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${y}) scaleY(${T})`).transition(R.params.speed)}f.type==="custom"&&f.renderCustom?(d.html(f.renderCustom(R,p+1,g)),t("paginationRender",d[0])):t("paginationUpdate",d[0]),R.params.watchOverflow&&R.enabled&&d[R.isLocked?"addClass":"removeClass"](f.lockClass)}function n(){const h=R.params.pagination;if(a())return;const f=R.virtual&&R.params.virtual.enabled?R.virtual.slides.length:R.slides.length,v=R.pagination.$el;let d="";if(h.type==="bullets"){let p=R.params.loop?Math.ceil((f-R.loopedSlides*2)/R.params.slidesPerGroup):R.snapGrid.length;R.params.freeMode&&R.params.freeMode.enabled&&!R.params.loop&&p>f&&(p=f);for(let g=0;g<p;g+=1)h.renderBullet?d+=h.renderBullet.call(R,g,h.bulletClass):d+=`<${h.bulletElement} class="${h.bulletClass}"></${h.bulletElement}>`;v.html(d),R.pagination.bullets=v.find(Ut(h.bulletClass))}h.type==="fraction"&&(h.renderFraction?d=h.renderFraction.call(R,h.currentClass,h.totalClass):d=`<span class="${h.currentClass}"></span> / <span class="${h.totalClass}"></span>`,v.html(d)),h.type==="progressbar"&&(h.renderProgressbar?d=h.renderProgressbar.call(R,h.progressbarFillClass):d=`<span class="${h.progressbarFillClass}"></span>`,v.html(d)),h.type!=="custom"&&t("paginationRender",R.pagination.$el[0])}function l(){R.params.pagination=Ae(R,R.originalParams.pagination,R.params.pagination,{el:"swiper-pagination"});const h=R.params.pagination;if(!h.el)return;let f=st(h.el);f.length!==0&&(R.params.uniqueNavElements&&typeof h.el=="string"&&f.length>1&&(f=R.$el.find(h.el),f.length>1&&(f=f.filter(v=>st(v).parents(".swiper")[0]===R.el))),h.type==="bullets"&&h.clickable&&f.addClass(h.clickableClass),f.addClass(h.modifierClass+h.type),f.addClass(h.modifierClass+R.params.direction),h.type==="bullets"&&h.dynamicBullets&&(f.addClass(`${h.modifierClass}${h.type}-dynamic`),o=0,h.dynamicMainBullets<1&&(h.dynamicMainBullets=1)),h.type==="progressbar"&&h.progressbarOpposite&&f.addClass(h.progressbarOppositeClass),h.clickable&&f.on("click",Ut(h.bulletClass),function(d){d.preventDefault();let p=st(this).index()*R.params.slidesPerGroup;R.params.loop&&(p+=R.loopedSlides),R.slideTo(p)}),Object.assign(R.pagination,{$el:f,el:f[0]}),R.enabled||f.addClass(h.lockClass))}function r(){const h=R.params.pagination;if(a())return;const f=R.pagination.$el;f.removeClass(h.hiddenClass),f.removeClass(h.modifierClass+h.type),f.removeClass(h.modifierClass+R.params.direction),R.pagination.bullets&&R.pagination.bullets.removeClass&&R.pagination.bullets.removeClass(h.bulletActiveClass),h.clickable&&f.off("click",Ut(h.bulletClass))}S("init",()=>{l(),n(),i()}),S("activeIndexChange",()=>{(R.params.loop||typeof R.snapIndex=="undefined")&&i()}),S("snapIndexChange",()=>{R.params.loop||i()}),S("slidesLengthChange",()=>{R.params.loop&&(n(),i())}),S("snapGridLengthChange",()=>{R.params.loop||(n(),i())}),S("destroy",()=>{r()}),S("enable disable",()=>{const{$el:h}=R.pagination;h&&h[R.enabled?"removeClass":"addClass"](R.params.pagination.lockClass)}),S("lock unlock",()=>{i()}),S("click",(h,f)=>{const v=f.target,{$el:d}=R.pagination;if(R.params.pagination.el&&R.params.pagination.hideOnClick&&d.length>0&&!st(v).hasClass(R.params.pagination.bulletClass)){if(R.navigation&&(R.navigation.nextEl&&v===R.navigation.nextEl||R.navigation.prevEl&&v===R.navigation.prevEl))return;const p=d.hasClass(R.params.pagination.hiddenClass);t(p===!0?"paginationShow":"paginationHide"),d.toggleClass(R.params.pagination.hiddenClass)}}),Object.assign(R.pagination,{render:n,update:i,init:l,destroy:r})}export{bn as N,$n as P,Dt as S,Jn as W,Qn as a,jn as b,se as p};
