mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
1 line
No EOL
391 KiB
JavaScript
1 line
No EOL
391 KiB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(window,function(){return function(t){var e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1030)}([function(t,e){function i(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function s(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function n(t,e,n,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,n);if(!1!==h){if(s((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)n(t,e[i].prototype||e[i])}}function o(t){var e,i;if(t||(t={}),t.initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");e=t.initialize,delete t.initialize}else if(t.Extends){var s=t.Extends;e=function(){s.apply(this,arguments)}}else e=function(){};t.Extends?(e.prototype=Object.create(t.Extends.prototype),e.prototype.constructor=e,i=t.Extends,delete t.Extends):e.prototype.constructor=e;var o=null;return t.Mixins&&(o=t.Mixins,delete t.Mixins),r(e,o),n(e,t,!0,i),e}o.extend=n,o.mixin=r,o.ignoreFinals=!1,t.exports=o},function(t,e){t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},function(t,e,i){var s=i(0),n=i(17),r=i(81),o=i(9),a=new s({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,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,t.sys.queueDepthSort(),t.sys.events.once("shutdown",this.destroy,this)},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),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},update:function(){},toJSON:function(){return n.ToJSON(this)},willRender:function(){return a.RENDER_MASK===this.renderFlags},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(){if(this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit("destroy",this);var t=this.scene.sys;t.displayList.remove(this),t.updateList.remove(this),this.input&&(t.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),t.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});a.RENDER_MASK=15,t.exports=a},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(e.indexOf(".")){for(var s=e.split("."),n=t,r=i,o=0;o<s.length;o++){if(!n.hasOwnProperty(s[o])){r=i;break}r=n[s[o]],n=n[s[o]]}return r}return i}return i}},function(t,e,i){var s=new(i(0))({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=s},function(t,e,i){var s=new(i(0))({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this}});s.ZERO=new s,t.exports=s},function(t,e){var i={},s={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=s},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){"use strict";var s=Object.prototype.hasOwnProperty,n="~";function r(){}function o(t,e,i,s,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,s||t,r),a=n?n+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function h(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)s.call(t,e)&&i.push(n?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=n?n+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,r=i.length,o=new Array(r);s<r;s++)o[s]=i[s].fn;return o},h.prototype.listenerCount=function(t){var e=n?n+t:t,i=this._events[e];return i?i.fn?1:i.length:0},h.prototype.emit=function(t,e,i,s,r,o){var a=n?n+t:t;if(!this._events[a])return!1;var h,u,l=this._events[a],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,i),!0;case 4:return l.fn.call(l.context,e,i,s),!0;case 5:return l.fn.call(l.context,e,i,s,r),!0;case 6:return l.fn.call(l.context,e,i,s,r,o),!0}for(u=1,h=new Array(c-1);u<c;u++)h[u-1]=arguments[u];l.fn.apply(l.context,h)}else{var d,f=l.length;for(u=0;u<f;u++)switch(l[u].once&&this.removeListener(t,l[u].fn,void 0,!0),c){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,e);break;case 3:l[u].fn.call(l[u].context,e,i);break;case 4:l[u].fn.call(l[u].context,e,i,s);break;default:if(!h)for(d=1,h=new Array(c-1);d<c;d++)h[d-1]=arguments[d];l[u].fn.apply(l[u].context,h)}}return!0},h.prototype.on=function(t,e,i){return o(this,t,e,i,!1)},h.prototype.once=function(t,e,i){return o(this,t,e,i,!0)},h.prototype.removeListener=function(t,e,i,s){var r=n?n+t:t;if(!this._events[r])return this;if(!e)return a(this,r),this;var o=this._events[r];if(o.fn)o.fn!==e||s&&!o.once||i&&o.context!==i||a(this,r);else{for(var h=0,u=[],l=o.length;h<l;h++)(o[h].fn!==e||s&&!o[h].once||i&&o[h].context!==i)&&u.push(o[h]);u.length?this._events[r]=1===u.length?u[0]:u:a(this,r)}return this},h.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=n,h.EventEmitter=h,t.exports=h},function(t,e,i){var s=i(15),n=i(4);t.exports=function(t,e,i){var r=n(t,e,null);if(null===r)return i;if(Array.isArray(r))return s.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return s.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return s.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var s=i(0),n=i(12),r=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once("destroy",this.destroy,this)},start:function(){this.systems.events.once("shutdown",this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},n.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e){var i={},s={},n={register:function(t,e,s,n){void 0===n&&(n=!1),i[t]={plugin:e,mapping:s,custom:n}},registerCustom:function(t,e,i){s[t]={plugin:e,mapping:i}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return s.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return s[t]},getCustomClass:function(t){return s.hasOwnProperty(t)?s[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=n},function(t,e,i){var s=i(0),n=i(31),r=i(136),o=i(299),a=i(96),h=i(159),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new a),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){var s=i(0),n=i(12),r=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once("destroy",this.destroy,this)},start:function(){this.systems.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},n.register("GameObjectCreator",r,"make"),t.exports=r},function(t,e,i){var s=i(302),n={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:new s};t.exports=n},function(t,e,i){var s=i(8),n=function(){var t,e,i,r,o,a,h=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},u=2),l===u&&(h=this,--u);u<l;u++)if(null!=(t=arguments[u]))for(e in t)i=h[e],h!==(r=t[e])&&(c&&r&&(s(r)||(o=Array.isArray(r)))?(o?(o=!1,a=i&&Array.isArray(i)?i:[]):a=i&&s(i)?i:{},h[e]=n(c,a,r)):void 0!==r&&(h[e]=r));return h};t.exports=n},function(t,e,i){t.exports={Alpha:i(592),Animation:i(307),BlendMode:i(591),ComputedSize:i(590),Depth:i(589),Flip:i(588),GetBounds:i(587),Mask:i(586),MatrixStack:i(585),Origin:i(584),Pipeline:i(296),ScaleMode:i(583),ScrollFactor:i(582),Size:i(581),Texture:i(580),TextureCrop:i(579),Tint:i(578),ToJSON:i(577),Transform:i(576),TransformMatrix:i(32),Visible:i(575)}},function(t,e){t.exports={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}},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){var s=i(0),n=i(18),r=i(1),o=i(108),a=i(107),h=i(174),u=i(74),l=new s({initialize:function(t,e){this.loader=t,this.cache=r(e,"cache",!1),this.type=r(e,"type",!1),this.key=r(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Error calling 'Loader."+this.type+"' invalid key provided.");this.url=r(e,"url"),void 0===this.url?this.url=t.path+i+"."+r(e,"extension",""):"function"!=typeof this.url&&(this.url=t.path+this.url),this.src="",this.xhrSettings=u(r(e,"responseType",void 0)),r(e,"xhrSettings",!1)&&(this.xhrSettings=a(this.xhrSettings,r(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?n.FILE_POPULATED:n.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=r(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.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===n.FILE_POPULATED?this.loader.nextFile(this,!0):(this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=h(this,this.loader.xhr))},onLoad:function(t,e){var i=!(e.target&&200!==e.target.status);4===t.readyState&&t.status>=400&&t.status<=599&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit("fileprogress",this,this.percentComplete))},onProcess:function(){this.state=n.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=n.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=n.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(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit("filecomplete",e,i,t),this.loader.emit("filecomplete-"+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});l.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},l.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=l},function(t,e){t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,s=0;s<t.length;++s){var n=t[s];n.type===e.FLOAT?i+=n.size:i+=1}return i}}},function(t,e,i){var s={VERSION:"3.11",BlendModes:i(52),ScaleModes:i(59),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},,function(t,e,i){var s,n,r,o=i(22),a=i(132),h=[],u=!1;t.exports={create2D:function(t,e,i){return s(t,e,i,o.CANVAS)},create:s=function(t,e,i,s,r){var l;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=o.CANVAS),void 0===r&&(r=!1);var c=n(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===o.CANVAS&&h.push(c),l=c.canvas):(c.parent=t,l=c.canvas),r&&(c.parent=l),l.width=e,l.height=i,u&&s===o.CANVAS&&a.disable(l.getContext("2d")),l},createWebGL:function(t,e,i){return s(t,e,i,o.WEBGL)},disableSmoothing:function(){u=!0},enableSmoothing:function(){u=!1},first:n=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e<h.length;e++){var i=h[e];if(!i.parent&&i.type===t)return i}return null},free:function(){return h.length-r()},pool:h,remove:function(t){var e=t instanceof HTMLCanvasElement;h.forEach(function(i){(e&&i.canvas===t||!e&&i.parent===t)&&(i.parent=null,i.canvas.width=1,i.canvas.height=1)})},total:r=function(){var t=0;return h.forEach(function(e){e.parent&&t++}),t}}},function(t,e,i){var s=i(52),n=i(10),r=i(59);t.exports=function(t,e,i){e.x=n(i,"x",0),e.y=n(i,"y",0),e.depth=n(i,"depth",0),e.flipX=n(i,"flipX",!1),e.flipY=n(i,"flipY",!1);var o=n(i,"scale",null);"number"==typeof o?e.setScale(o):null!==o&&(e.scaleX=n(o,"x",1),e.scaleY=n(o,"y",1));var a=n(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=n(a,"x",1),e.scrollFactorY=n(a,"y",1)),e.rotation=n(i,"rotation",0);var h=n(i,"angle",null);null!==h&&(e.angle=h),e.alpha=n(i,"alpha",1);var u=n(i,"origin",null);if("number"==typeof u)e.setOrigin(u);else if(null!==u){var l=n(u,"x",.5),c=n(u,"y",.5);e.setOrigin(l,c)}return e.scaleMode=n(i,"scaleMode",r.DEFAULT),e.blendMode=n(i,"blendMode",s.NORMAL),e.visible=n(i,"visible",!0),n(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},,,function(t,e,i){var s=i(0),n=i(18),r=i(20),o=i(7),a=i(1),h=i(4),u=i(8),l=new s({Extends:r,initialize:function(t,e,i,s,o){var l="json";if(u(e)){var c=e;e=a(c,"key"),i=a(c,"url"),s=a(c,"xhrSettings"),l=a(c,"extension",l),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:l,responseType:"text",key:e,url:i,xhrSettings:s,config:o};r.call(this,t,d),u(i)&&(this.data=o?h(i,o):i,this.state=n.FILE_POPULATED)},onProcess:function(){if(this.state!==n.FILE_POPULATED){this.state=n.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,s,i));return this}),t.exports=l},function(t,e){t.exports=function(t,e,i,s){var n=t.length;if(e<0||e>n||e>=i||i>n||e+i>n){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var s=i(0),n=i(155),r=i(278),o=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this.red=0,this.green=0,this.blue=0,this.alpha=0,this.update()},setTo:function(t,e,i,s){return void 0===s&&(s=255),this.red=t,this.green=e,this.blue=i,this.alpha=s,this.update()},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this.update()},setFromRGB:function(t){return this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this.update()},update:function(){return this._color=n(this.r,this.g,this.b),this._color32=r(this.r,this.g,this.b,this.a),this._rgba="rgba("+this.r+","+this.g+","+this.b+","+this.a/255+")",this},clone:function(){return new o(this.r,this.g,this.b,this.a)},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(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update()}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update()}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update()}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update()}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update()}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update()}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}}});t.exports=o},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var s=new(i(0))({initialize:function(t,e,i,s,n,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,s,n,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},scaleY:{get:function(){return Math.sqrt(this.b*this.b+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3];return s[0]=n*i+o*e,s[1]=r*i+a*e,s[2]=n*-e+o*i,s[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,n=i[0],r=i[1],o=i[2],a=i[3],h=i[4],u=i[5],l=s[0],c=s[1],d=s[2],f=s[3],p=s[4],g=s[5],m=void 0===e?this:e;return m.a=l*n+c*o,m.b=l*r+c*a,m.c=d*n+f*o,m.d=d*r+f*a,m.e=p*n+g*o+h,m.f=p*r+g*a+u,m},multiplyWithOffset:function(t,e,i){var s=this.matrix,n=t.matrix,r=s[0],o=s[1],a=s[2],h=s[3],u=e*r+i*a+s[4],l=e*o+i*h+s[5],c=n[0],d=n[1],f=n[2],p=n[3],g=n[4],m=n[5];return s[0]=c*r+d*a,s[1]=c*o+d*h,s[2]=f*r+p*a,s[3]=f*o+p*h,s[4]=g*r+m*a+u,s[5]=g*o+m*h+l,this},transform:function(t,e,i,s,n,r){var o=this.matrix,a=o[0],h=o[1],u=o[2],l=o[3],c=o[4],d=o[5];return o[0]=t*a+e*u,o[1]=t*h+e*l,o[2]=i*a+s*u,o[3]=i*h+s*l,o[4]=n*a+r*u+c,o[5]=n*h+r*l+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3],h=s[4],u=s[5];return i.x=t*n+e*o+h,i.y=t*r+e*a+u,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=e*n-i*s;return t[0]=n/a,t[1]=-i/a,t[2]=-s/a,t[3]=e/a,t[4]=(s*o-n*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},setTransform:function(t,e,i,s,n,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=s,o[4]=n,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*i,a=s*s,h=n*n,u=r*r,l=Math.sqrt(o+h),c=Math.sqrt(a+u);return t.translateX=e[4],t.translateY=e[5],t.scaleX=l,t.scaleY=c,t.rotation=Math.acos(i/l)*(Math.atan(-n/i)<0?-1:1),t},applyITRS:function(t,e,i,s,n){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*s,r[1]=o*s,r[2]=-o*n,r[3]=a*n,this},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=s},function(t,e){t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e,i){var s=i(0),n=i(17),r=i(2),o=i(526),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScaleMode,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,o){r.call(this,t,"Sprite"),this.anims=new n.Animation(this),this.setTexture(s,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return n.ToJSON(this)}});t.exports=a},,function(t,e,i){var s=new(i(0))({initialize:function(t,e,i,s){this.loader=t,this.type=e,this.key=i,this.files=s,this.complete=!1,this.pending=s.length,this.failed=0,this.config={};for(var n=0;n<s.length;n++)s[n].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),t.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&this.failed++}});t.exports=s},function(t,e,i){var s=i(0),n=i(18),r=i(20),o=i(7),a=i(1),h=i(8),u=new s({Extends:r,initialize:function t(e,i,s,n,o){var u,l="png";if(h(i)){var c=i;i=a(c,"key"),s=a(c,"url"),u=a(c,"normalMap"),n=a(c,"xhrSettings"),l=a(c,"extension",l),o=a(c,"frameConfig")}Array.isArray(s)&&(u=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:l,responseType:"blob",key:i,url:s,xhrSettings:n,config:o};if(r.call(this,e,d),u){var f=new t(e,this.key,u,n,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===n.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},function(t,e,i){var s=i(15);t.exports=function(t){return t*s.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},,,,,,,,,,,,function(t,e){t.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}},,,function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var s=(e-t.x)/t.width,n=(i-t.y)/t.height;return(s*=s)+(n*=n)<.25}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],n=e;n<i;n++)t[n]=t[n+1];return t.length=i,s}}},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!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};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var s=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!s||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(507))},function(t,e){t.exports=function(t,e,i,s){var n=t-i,r=e-s;return Math.sqrt(n*n+r*r)}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e){t.exports=function(t,e,i){var s=t.x3-t.x1,n=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,u=s*s+n*n,l=s*r+n*o,c=s*a+n*h,d=r*r+o*o,f=r*a+o*h,p=u*d-l*l,g=0===p?0:1/p,m=(d*c-l*f)*g,v=(u*f-l*c)*g;return m>=0&&v>=0&&m+v<1}},function(t,e){t.exports={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}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e,i){var s=i(123);t.exports=function(t,e){if("string"==typeof t&&s.hasOwnProperty(t)){if(e){var i=e.slice(0);return i.unshift(0),function(e){return i[0]=e,s[t].apply(this,i)}}return s[t]}return"function"==typeof t?t:(Array.isArray(t)&&t.length,s.Power0)}},function(t,e,i){var s=i(19);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))}},,,function(t,e,i){var s=i(0),n=i(60),r=i(232),o=i(231),a=i(96),h=i(158),u=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){var s=i(0),n=i(17),r=i(2),o=i(432),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScaleMode,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=a},function(t,e,i){var s=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e])},set:function(t){return-1===this.entries.indexOf(t)&&this.entries.push(t),this},get:function(t,e){for(var i=0;i<this.entries.length;i++){var s=this.entries[i];if(s[t]===e)return s}},getArray:function(){return this.entries.slice(0)},delete:function(t){var e=this.entries.indexOf(t);return e>-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t<this.entries.length;t++){var e=this.entries[t];console.log(e)}console.groupEnd()},each:function(t,e){var i,s=this.entries.slice(),n=s.length;if(e)for(i=0;i<n&&!1!==t.call(e,s[i],i);i++);else for(i=0;i<n&&!1!==t(s[i],i);i++);return this},iterate:function(t,e){var i,s=this.entries.length;if(e)for(i=0;i<s&&!1!==t.call(e,this.entries[i],i);i++);else for(i=0;i<s&&!1!==t(this.entries[i],i);i++);return this},iterateLocal:function(t){var e,i=[];for(e=1;e<arguments.length;e++)i.push(arguments[e]);var s=this.entries.length;for(e=0;e<s;e++){var n=this.entries[e];n[t].apply(n,i)}return this},clear:function(){return this.entries.length=0,this},contains:function(t){return this.entries.indexOf(t)>-1},union:function(t){var e=new s;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new s;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new s;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=s},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var s=i(100),n=i(10),r=i(62),o=i(63),a=i(72),h=i(168),u=i(102),l=i(4),c=i(101),d=i(99),f=i(98);t.exports=function(t,e,i){void 0===i&&(i=s);for(var p=i.targets?i.targets:u(e),g=h(e),m=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=l(e,"easeParams",i.easeParams),x=o(l(e,"ease",i.ease),y),w=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),S=r(e,"yoyo",i.yoyo),_=r(e,"flipX",i.flipX),A=r(e,"flipY",i.flipY),E=[],C=0;C<g.length;C++)for(var M=g[C].key,P=g[C].value,k=0;k<p.length;k++){var R=c(M,P),L=f(p[k],M,R.getEnd,R.getStart,o(l(P,"ease",x),y),a(P,"delay",m),a(P,"duration",v),r(P,"yoyo",S),a(P,"hold",w),a(P,"repeat",T),a(P,"repeatDelay",b),r(P,"flipX",_),r(P,"flipY",A));E.push(L)}var O=new d(t,E,p);O.offset=n(e,"offset",null),O.completeDelay=n(e,"completeDelay",0),O.loop=Math.round(n(e,"loop",0)),O.loopDelay=Math.round(n(e,"loopDelay",0)),O.paused=r(e,"paused",!1),O.useFrames=r(e,"useFrames",!1);for(var F=l(e,"callbackScope",O),D=[O,null],I=d.TYPES,B=0;B<I.length;B++){var U=I[B],N=l(e,U,!1);if(N){var Y=l(e,U+"Scope",F),z=l(e,U+"Params",[]);O.setCallback(U,N,D.concat(z),Y)}}return O}},function(t,e){t.exports=function(t,e,i){var s;s=t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,s,n){return t[e](i,s,n)}:function(){return t[e]}:"function"==typeof i?i:function(){return i};return s}},,function(t,e){t.exports=function(t,e,i,s,n){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===n&&(n=0),{responseType:t,async:e,user:i,password:s,timeout:n,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){var s=i(4),n={},r={register:function(t,e,i,s,r){n[t]={plugin:e,mapping:i,settingsKey:s,configKey:r}},getPlugin:function(t){return n[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in n){var a=n[o].plugin,h=n[o].mapping,u=n[o].settingsKey,l=n[o].configKey;s(i,u,r[l])&&(t[h]=new a(t))}},remove:function(t){n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},function(t,e,i){var s=i(116),n=i(186);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=n(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=n(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},function(t,e,i){var s=i(0),n=i(9),r=i(16),o=i(3),a=new s({Extends:n,initialize:function(t,e,i){n.call(this),this.manager=t,this.key=e,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},this.currentConfig=this.config,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(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},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit("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)}});t.exports=a},function(t,e,i){var s=i(0),n=i(34),r=i(9),o=i(3),a=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.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,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on("prestep",this.update,this),t.events.once("destroy",this.destroy,this)},add:o,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var s in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(s)){var r=n(e),o=i.spritemap[s];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:s,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var s=this.addAudioSprite(t);return s.once("ended",s.destroy,s),s.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:o,onBlur:o,onFocus:o,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(s,n){s.pendingRemove||t.call(e||i,s,n,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit("rate",this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit("detune",this,t)}}});t.exports=a},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var s,n=i(57),r={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};t.exports=(s=navigator.userAgent,/Edge\/\d+/.test(s)?r.edge=!0:/Chrome\/(\d+)/.test(s)&&!n.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(s)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(s)&&n.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(s)?r.opera=!0:/Safari/.test(s)&&!n.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(r.silk=!0),r)},function(t,e,i){var s=new(i(0))({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s<t.length;s++)i.push(e[t[s]]);return i}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var i in t)this.setValue(i,t[i]);return this},setValue:function(t,e){if(this._frozen)return this;if(this.has(t))this.values[t]=e;else{var i=this,s=this.list,n=this.events,r=this.parent;Object.defineProperty(this.values,t,{enumerable:!0,configurable:!0,get:function(){return s[t]},set:function(e){i._frozen||(s[t]=e,n.emit("changedata",r,t,e),n.emit("changedata_"+t,r,e))}}),s[t]=e,n.emit("setdata",r,t,e)}return this},each:function(t,e){for(var i=[this.parent,null,void 0],s=1;s<arguments.length;s++)i.push(arguments[s]);for(var n in this.list)i[1]=n,i[2]=this.list[n],t.apply(e,i);return this},merge:function(t,e){for(var i in void 0===e&&(e=!0),t)t.hasOwnProperty(i)&&(e||!e&&!this.has(i))&&this.setValue(i,t[i]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){if(this.has(t)){var e=this.list[t];delete this.list[t],delete this.values[t],this.events.emit("removedata",this.parent,t,e)}return this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit("removedata",this,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off("changedata"),this.events.off("setdata"),this.events.off("removedata"),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=s},,function(t,e,i){!function(){var e=function(t,e){return i(t.slice(),e)};function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var n=new Array(i),r=1;r<i;r*=2){s(t,e,r,n);var o=t;t=n,n=o}return t}e.inplace=function(t,e){var n=i(t,e);return n!==t&&s(n,null,t.length,t),t};var s=function(t,e,i,s){var n,r,o,a,h,u=t.length,l=0,c=2*i;for(n=0;n<u;n+=c)for(o=(r=n+i)+i,r>u&&(r=u),o>u&&(o=u),a=n,h=r;;)if(a<r&&h<o)e(t[a],t[h])<=0?s[l++]=t[a++]:s[l++]=t[h++];else if(a<r)s[l++]=t[a++];else{if(!(h<o))break;s[l++]=t[h++]}};t.exports=e}()},function(t,e,i){var s=i(0),n=i(21),r=new s({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=n.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,s,n){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:s,offset:n}),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,s=this.program,n=this.renderer,r=this.vertexSize;n.setProgram(s),n.setVertexBuffer(e);for(var o=0;o<i.length;++o){var a=i[o],h=t.getAttribLocation(s,a.name);h>=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,s=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*s)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,s){return this.renderer.setFloat3(this.program,t,e,i,s),this},setFloat4:function(t,e,i,s,n){return this.renderer.setFloat4(this.program,t,e,i,s,n),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,s){return this.renderer.setInt3(this.program,t,e,i,s),this},setInt4:function(t,e,i,s,n){return this.renderer.setInt4(this.program,t,e,i,s,n),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},,,function(t,e,i){var s=i(0),n=i(33),r=i(303),o=i(301),a=i(162),h=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},,,,,function(t,e,i){var s=i(150),n=i(0),r=i(3),o=i(83),a=new n({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t){return t&&(this._sortKey=t,o.inplace(this.list,this.sortHandler)),this},sortHandler:function(t,e){return t[this._sortKey]-e[this._sortKey]},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirstElement(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],s=2;s<arguments.length;s++)i.push(arguments[s]);for(s=0;s<this.list.length;s++)i[0]=this.list[s],t.apply(e,i)},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}}});t.exports=a},function(t,e,i){var s=i(34);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}},function(t,e){t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},function(t,e,i){var s=i(0),n=i(298),r=i(161),o=i(160),a=i(6),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new a),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new a),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=h},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t,e,i,s,n,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:s,ease:n,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var s=i(0),n=i(14),r=i(11),o=i(61),a=new s({initialize:function(t,e,i){this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=o.PENDING_ADD,this._pausedState=o.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,onRepeat:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(){return this.data[0].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},isPaused:function(){return this.state===o.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){for(var s=0;s<this.totalData;s++){var n=this.data[s];if(n.key===t){n.end=e,i&&(n.start=n.current);break}}return this},restart:function(){this.state===o.REMOVED?(this.seek(0),this.parent.makeActive(this)):(this.stop(),this.play())},calcDuration:function(){for(var t=0,e=this.data,i=0;i<this.totalData;i++){var s=e[i];s.t1=s.duration+s.hold,s.yoyo&&(s.t1+=s.duration),s.t2=s.t1+s.repeatDelay,s.totalDuration=s.delay+s.t1,-1===s.repeat?s.totalDuration+=999999999999*s.t2:s.repeat>0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?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(){for(var t=this.data,e=this.totalTargets,i=0;i<this.totalData;i++){var s=t[i],n=s.target,r=s.gen;s.delay=r.delay(i,e,n),s.duration=r.duration(i,e,n),s.hold=r.hold(i,e,n),s.repeat=r.repeat(i,e,n),s.repeatDelay=r.repeatDelay(i,e,n)}return this.calcDuration(),this.progress=0,this.totalProgress=0,this.elapsed=0,this.totalElapsed=0,this.paused&&!this.parentIsTimeline?(this.state=o.PENDING_ADD,this._pausedState=o.INIT,!1):(this.state=o.INIT,!0)},nextState:function(){if(this.loopCounter>0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.parent.makeActive(this))}},resetTweenData:function(t){for(var e=this.data,i=0;i<this.totalData;i++){var s=e[i];s.progress=0,s.elapsed=0,s.repeatCounter=-1===s.repeat?999999999999:s.repeat,t?(s.start=s.getStartValue(s.target,s.key,s.start),s.end=s.getEndValue(s.target,s.key,s.end),s.current=s.start,s.state=o.PLAYING_FORWARD):s.delay>0?(s.elapsed=s.delay,s.state=o.DELAY):s.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t){for(var e=this.data,i=0;i<this.totalData;i++){var s=this.totalDuration*t,n=e[i],r=0,o=0;s<=n.delay?(r=0,o=0):s>=n.totalDuration?(r=1,o=n.duration):s>n.delay&&s<=n.t1?(r=(s=Math.max(0,s-n.delay))/n.t1,o=n.duration*r):s>n.t1&&s<n.totalDuration&&(s-=n.delay,(s=(s-=n.t1)/n.t2%1*n.t2)>n.repeatDelay&&(r=s/n.t1,o=n.duration*r)),n.progress=r,n.elapsed=o;var a=n.ease(n.progress);n.current=n.start+(n.end-n.start)*a,n.target[n.key]=n.current}},setCallback:function(t,e,i,s){return this.callbacks[t]={func:e,scope:s,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},stop:function(t){this.state===o.ACTIVE&&void 0!==t&&this.seek(t),this.state!==o.REMOVED&&(this.state=o.PENDING_REMOVE)},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,s=0;s<this.totalData;s++)this.updateTweenData(this,this.data[s],e)&&(i=!0);i||this.nextState();break;case o.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=o.ACTIVE);break;case o.OFFSET_DELAY:if(this.countdown-=e,this.countdown<=0){var n=this.callbacks.onStart;n&&(n.params[1]=this.targets,n.func.apply(n.scope,n.params)),this.state=o.ACTIVE}break;case o.COMPLETE_DELAY:if(this.countdown-=e,this.countdown<=0){var r=this.callbacks.onComplete;r&&r.func.apply(r.scope,r.params),this.state=o.PENDING_REMOVE}}return this.state===o.PENDING_REMOVE},setStateFromEnd:function(t,e,i){if(e.yoyo){e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onYoyo;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),o.PLAYING_BACKWARD}if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var s=e.elapsed,n=e.duration,r=0;(s+=i)>n&&(r=s-n,s=n);var a,h=e.state===o.PLAYING_FORWARD,u=s/n;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=s,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),n.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e){function i(t){return!!t.getStart&&"function"==typeof t.getStart}function s(t){return!!t.getEnd&&"function"==typeof t.getEnd}var n=function(t,e){var r,o,a=function(t,e,i){return i},h=function(t,e,i){return i},u=typeof e;if("number"===u)a=function(){return e};else if("string"===u){var l=e[0],c=parseFloat(e.substr(2));switch(l){case"+":a=function(t,e,i){return i+c};break;case"-":a=function(t,e,i){return i-c};break;case"*":a=function(t,e,i){return i*c};break;case"/":a=function(t,e,i){return i/c};break;default:a=function(){return parseFloat(e)}}}else"function"===u?a=e:"object"===u&&(i(o=e)||s(o))?(s(e)&&(a=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=n(t,e.value));return r||(r={getEnd:a,getStart:h}),r};t.exports=n},function(t,e,i){var s=i(4);t.exports=function(t){var e=s(t,"targets",null);return null===e?e:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},,,,,function(t,e,i){var s=i(16),n=i(74);t.exports=function(t,e){var i=void 0===t?n():s({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports={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,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}},function(t,e,i){var s=i(131),n=i(24),r=i(0),o=i(17),a=i(22),h=i(2),u=i(421),l=i(4),c=i(263),d=i(420),f=i(417),p=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Tint,o.Transform,o.Visible,d],initialize:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Text"),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this.canvas=n.create(this),this.context=this.canvas.getContext("2d"),this.style=new f(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this.text="",this.resolution=1,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.canvasTexture=null,this.dirty=!1,this.initRTL(),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&(this._lineSpacing=r.lineSpacing),this.setText(s),t.sys.game.config.renderType===a.WEBGL&&t.sys.game.renderer.onContextRestored(function(){this.canvasTexture=null,this.dirty=!0},this)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,o=0;o<r;o++){var a=n[o],h="";if(a=a.replace(/^ *|\s*$/gi,""),e.measureText(a).width<i)s+=a+"\n";else{for(var u=i,l=a.split(" "),c=0;c<l.length;c++){var d=l[c],f=d+" ",p=e.measureText(f).width;if(p>u){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var m=d.substr(g.length);l[c]=m,h+=g}var v=l[c].length?c:c+1,y=l.slice(v).join(" ").replace(/[ \n]*$/gi,"");n[o+1]=y+" "+(n[o+1]||""),r=n.length;break}h+=f,u-=p}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",n=t.split(this.splitRegExp),r=0;r<n.length;r++){for(var o=i,a=n[r].split(" "),h=0;h<a.length;h++){var u=e.measureText(a[h]).width,l=u+e.measureText(" ").width;l>o?(h>0&&(s+="\n"),s+=a[h]+" ",o=i-u):(o-=l,s+=a[h],h<a.length-1&&(s+=" "))}r<n.length-1&&(s+="\n")}return s},getWrappedText:function(t){return void 0===t&&(t=this.text),this.style.syncFont(this.canvas,this.context),this.runWordWrap(t).split(this.splitRegExp)},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this.text=t.toString(),this.updateText()),this},setStyle:function(t){return this.style.setStyle(t)},setFont:function(t){return this.style.setFont(t)},setFontFamily:function(t){return this.style.setFontFamily(t)},setFontSize:function(t){return this.style.setFontSize(t)},setFontStyle:function(t){return this.style.setFontStyle(t)},setFixedSize:function(t,e){return this.style.setFixedSize(t,e)},setBackgroundColor:function(t){return this.style.setBackgroundColor(t)},setFill:function(t){return this.style.setFill(t)},setColor:function(t){return this.style.setColor(t)},setStroke:function(t,e){return this.style.setStroke(t,e)},setShadow:function(t,e,i,s,n,r){return this.style.setShadow(t,e,i,s,n,r)},setShadowOffset:function(t,e){return this.style.setShadowOffset(t,e)},setShadowColor:function(t){return this.style.setShadowColor(t)},setShadowBlur:function(t){return this.style.setShadowBlur(t)},setShadowStroke:function(t){return this.style.setShadowStroke(t)},setShadowFill:function(t){return this.style.setShadowFill(t)},setWordWrapWidth:function(t,e){return this.style.setWordWrapWidth(t,e)},setWordWrapCallback:function(t,e){return this.style.setWordWrapCallback(t,e)},setAlign:function(t){return this.style.setAlign(t)},setPadding:function(t,e,i,s){if("object"==typeof t){var n=t,r=l(n,"x",null);null!==r?(t=r,i=r):(t=l(n,"left",0),i=l(n,"right",t));var o=l(n,"y",null);null!==o?(e=o,s=o):(e=l(n,"top",0),s=l(n,"bottom",e))}else void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=e);return this.padding.left=t,this.padding.top=e,this.padding.right=i,this.padding.bottom=s,this.updateText()},setMaxLines:function(t){return this.style.setMaxLines(t)},updateText:function(){var t=this.canvas,e=this.context,i=this.style,s=this.resolution,n=i.metrics;i.syncFont(t,e);var r=this.text;(i.wordWrapWidth||i.wordWrapCallback)&&(r=this.runWordWrap(this.text));var o,a,h=r.split(this.splitRegExp),l=u(this,n,h),c=this.padding,d=l.width+c.left+c.right,f=l.height+c.top+c.bottom;0===i.fixedWidth&&(this.width=d),0===i.fixedHeight&&(this.height=f),this.updateDisplayOrigin(),d*=s,f*=s,d=Math.max(d,1),f=Math.max(f,1),t.width!==d||t.height!==f?(t.width=d,t.height=f,i.syncFont(t,e)):e.clearRect(0,0,d,f),e.save(),i.backgroundColor&&(e.fillStyle=i.backgroundColor,e.fillRect(0,0,d,f)),i.syncStyle(t,e),e.textBaseline="alphabetic",e.translate(c.left,c.top);for(var p=0;p<l.lines;p++)o=i.strokeThickness/2,a=i.strokeThickness/2+p*l.lineHeight+n.ascent,p>0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),n.remove(this.canvas)}});t.exports=p},,,function(t,e,i){var s=i(5);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var s=i(0),n=i(55),r=i(184),o=i(183),a=i(135),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,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(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var s=i(124),n=i(0),r=i(119),o=i(17),a=i(243),h=i(2),u=i(1),l=i(4),c=i(15),d=i(434),f=new n({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,d],initialize:function(t,e){var i=l(e,"x",0),s=l(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline("FlatTintPipeline"),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(e)},setDefaultStyles:function(t){return l(t,"lineStyle",null)&&(this.defaultStrokeWidth=l(t,"lineStyle.width",1),this.defaultStrokeColor=l(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(t,"fillStyle",null)&&(this.defaultFillColor=l(t,"fillStyle.color",16777215),this.defaultFillAlpha=l(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.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,i){return this.beginPath(),this.arc(t,e,i,0,c.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,c.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,i,s){return this.commandBuffer.push(r.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,o=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(o+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;return"number"!=typeof n&&(r=u(n,"tl",20),o=u(n,"tr",20),a=u(n,"bl",20),h=u(n,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-c.TAU,0),this.lineTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,c.TAU),this.lineTo(t+a,e+s),this.arc(t+a,e+s-a,a,c.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-c.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;return"number"!=typeof n&&(r=u(n,"tl",20),o=u(n,"tr",20),a=u(n,"bl",20),h=u(n,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-c.TAU,0),this.lineTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,c.TAU),this.lineTo(t+a,e+s),this.arc(t+a,e+s-a,a,c.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-c.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),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,i,s,n,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,s,n,o),this},strokeTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,s,n,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,s){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,s,1),this},moveFxTo:function(t,e,i,s){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,s,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s<i;s++)this.lineTo(t[s].x,t[s].y);return e&&this.lineTo(t[0].x,t[0].y),this.strokePath(),this},fillPoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s<i;s++)this.lineTo(t[s].x,t[s].y);return e&&this.lineTo(t[0].x,t[0].y),this.fillPath(),this},strokeEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.strokePoints(i,!0)},strokeEllipse:function(t,e,i,s,n){void 0===n&&(n=32);var r=new a(t,e,i,s).getPoints(n);return this.strokePoints(r,!0)},fillEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.fillPoints(i,!0)},fillEllipse:function(t,e,i,s,n){void 0===n&&(n=32);var r=new a(t,e,i,s).getPoints(n);return this.fillPoints(r,!0)},arc:function(t,e,i,s,n,o,a){void 0===o&&(o=!1),void 0===a&&(a=0);var h=2*Math.PI;return o?n<-h?n=-h-a:n>=0&&(n=n%h-h-a):(n-=s,(n+=a)>h+a?n=h+a:n<-a&&(n=h+n%h-a)),this.commandBuffer.push(r.ARC,t,e,i,s,n,o),this},slice:function(t,e,i,s,n,o,a){void 0===o&&(o=!1),void 0===a&&(a=0);var h=2*Math.PI;return o?n<-h?n=-h-a:n>=0&&(n=n%h-h-a):(n-=s,(n+=a)>h+a?n=h+a:n<=-a&&(n=h+n%h-a)),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,s,n,o),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translate:function(t,e){return this.commandBuffer.push(r.TRANSLATE,t,e),this},scale:function(t,e){return this.commandBuffer.push(r.SCALE,t,e),this},rotate:function(t){return this.commandBuffer.push(r.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,i){var s,n,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),f.TargetCamera.setViewport(0,0,e,i),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(s=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(n=o.getContext("2d"))}else n=(s=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(n=t.getContext("2d"));return n&&(this.renderCanvas(r.game.renderer,this,0,f.TargetCamera,null,n),r.game.renderer.gl&&s&&(s.source[0].glTexture=r.game.renderer.canvasToTexture(n.canvas,s.source[0].glTexture))),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new s(0,0,0,0),t.exports=f},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i<t.length;i++)if(t[i].length!==e)return!1;return!0}},function(t,e,i){var s=i(0),n=i(129),r=i(188),o=new s({initialize:function(t,e,i,s,n){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o<i.length;o++)this.source.push(new r(this,i[o],s,n))},add:function(t,e,i,s,r,o){var a=new n(this,t,e,i,s,r,o);return this.frames[t]=a,1===this.frameTotal&&(this.firstFrame=t),this.frameTotal++,a},has:function(t){return this.frames[t]},get:function(t){t||(t=this.firstFrame);var e=this.frames[t];return e||(console.warn("No Texture.frame found with name "+t),e=this.frames[this.firstFrame]),e},getTextureSourceIndex:function(t){for(var e=0;e<this.source.length;e++)if(this.source[e]===t)return e;return-1},getFramesFromTextureSource:function(t){var e=[];for(var i in this.frames)if("__BASE"!==i){var s=this.frames[i];s.sourceIndex===t&&e.push(s.name)}return e},getFrameNames:function(t){void 0===t&&(t=!1);var e=Object.keys(this.frames);if(!t){var i=e.indexOf("__BASE");-1!==i&&e.splice(i,1)}return e},getSourceImage:function(t){void 0!==t&&null!==t&&1!==this.frameTotal||(t="__BASE");var e=this.frames[t];return e?e.source.image:(console.warn("No Texture.frame found with name "+t),this.frames.__BASE.source.image)},getDataSourceImage:function(t){void 0!==t&&null!==t&&1!==this.frameTotal||(t="__BASE");var e,i=this.frames[t];return i?e=i.sourceIndex:(console.warn("No Texture.frame found with name "+t),e=this.frames.__BASE.sourceIndex),this.dataSource[e].image},setDataSource:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=this.source[e];this.dataSource.push(new r(this,t[e],i.width,i.height))}},setFilter:function(t){var e;for(e=0;e<this.source.length;e++)this.source[e].setFilter(t);for(e=0;e<this.dataSource.length;e++)this.dataSource[e].setFilter(t)},destroy:function(){var t;for(t=0;t<this.source.length;t++)this.source[t].destroy();for(t=0;t<this.dataSource.length;t++)this.dataSource[t].destroy();for(var e in this.frames){this.frames[e].destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager=null}});t.exports=o},function(t,e,i){var s=i(0),n=i(79),r=i(121),o=i(488),a=i(487),h=i(3),u=i(197),l=new s({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=h},init:function(t){this.settings.status=n.INIT,this.sceneUpdate=h,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,a(this),o(this)]),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.sceneUpdate.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){return this.settings.active&&(this.settings.status=n.PAUSED,this.settings.active=!1,this.events.emit("pause",this,t)),this},resume:function(t){return this.settings.active||(this.settings.status=n.RUNNING,this.settings.active=!0,this.events.emit("resume",this,t)),this},sleep:function(t){return this.settings.status=n.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this,t),this},wake:function(t){var e=this.settings;return e.status=n.RUNNING,e.active=!0,e.visible=!0,this.events.emit("wake",this,t),e.isTransition&&this.events.emit("transitionwake",e.transitionFrom,e.transitionDuration),this},isSleeping:function(){return this.settings.status===n.SLEEPING},isActive:function(){return this.settings.status===n.RUNNING},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=n.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this),this.events.emit("ready",this,t)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(t){this.events.off("transitioninit"),this.events.off("transitionstart"),this.events.off("transitioncomplete"),this.events.off("transitionout"),this.settings.status=n.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this,t)},destroy:function(){this.settings.status=n.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e<t.length;e++)this[t[e]]=null}});t.exports=l},function(t,e){t.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,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e,i){var s=i(57),n=i(80),r=i(24),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){o.canvas=!!window.CanvasRenderingContext2D||s.cocoonJS;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this);s.cocoonJS&&(t.screencanvas=!1);var e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),n=i.getContext("2d").createImageData(1,1);return a=n.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.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,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,n.firefox&&n.firefoxVersion<21&&(o.getUserMedia=!1),!s.iOS&&(n.ie||n.firefox||n.chrome)&&(o.canvasBitBltShift=!0),(n.safari||n.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},function(t,e){t.exports={Global:["anims","cache","plugins","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){var s=i(291),n=i(290),r=i(289),o=i(288),a=i(287),h=i(286),u=i(285),l=i(284),c=i(283),d=i(282),f=i(281),p=i(280);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:s.Out,Bounce:n.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":s.In,"Bounce.easeIn":n.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":s.Out,"Bounce.easeOut":n.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":s.InOut,"Bounce.easeInOut":n.InOut}},function(t,e,i){var s=i(156),n=i(19),r=i(0),o=i(39),a=i(209),h=i(9),u=i(122),l=i(13),c=i(32),d=i(133),f=i(6),p=new r({Extends:h,initialize:function(t,e,i,s){h.call(this),this.scene,this.id=0,this.name="",this.x=t,this.y=e,this._width=i,this._height=s,this.roundPixels=!1,this.visible=!0,this.useBounds=!1,this._bounds=new l,this.worldView=new l,this.dirty=!0,this.inputEnabled=!0,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new c,this.transparent=!0,this.backgroundColor=d("rgba(0,0,0,0)"),this.alpha=1,this.fadeEffect=new a.Fade(this),this.flashEffect=new a.Flash(this),this.shakeEffect=new a.Shake(this),this.panEffect=new a.Pan(this),this.zoomEffect=new a.Zoom(this),this.disableCull=!1,this.culledObjects=[],this.lerp=new f(1,1),this.followOffset=new f,this.midPoint=new f(i/2,s/2),this.originX=.5,this.originY=.5,this.deadzone=null,this._follow=null},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new l(0,0,t,e),this._follow){var i=this.width/2,n=this.height/2,r=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(r,o),this.scrollX=r-i,this.scrollY=o-n}s(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},getScroll:function(t,e,i){void 0===i&&(i=new f);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOn:function(t,e){var i=.5*this.width,s=.5*this.height;return this.midPoint.set(t,e),this.scrollX=t-i,this.scrollY=e-s,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(!o)return t;var a=e[4],h=e[5],u=this.scrollX,l=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;g<p;++g){var m=t[g];if(m.hasOwnProperty("width")&&!m.parentContainer){var v=m.width,y=m.height,x=m.x-u*m.scrollFactorX-v*m.originX,w=m.y-l*m.scrollFactorY-y*m.originY,T=x*i+w*n+a,b=x*s+w*r+h,S=(x+v)*i+(w+y)*n+a,_=(x+v)*s+(w+y)*r+h,A=c+v,E=d+y;T>-v&&b>-y&&T<A&&b<E&&S>-v&&_>-y&&S<A&&_<E&&f.push(m)}else f.push(m)}return f},fadeIn:function(t,e,i,s,n,r){return this.fadeEffect.start(!1,t,e,i,s,!0,n,r)},fadeOut:function(t,e,i,s,n,r){return this.fadeEffect.start(!0,t,e,i,s,!0,n,r)},fadeFrom:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!1,t,e,i,s,n,r,o)},fade:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!0,t,e,i,s,n,r,o)},flash:function(t,e,i,s,n,r,o){return this.flashEffect.start(t,e,i,s,n,r,o)},shake:function(t,e,i,s,n){return this.shakeEffect.start(t,e,i,s,n)},pan:function(t,e,i,s,n,r,o){return this.panEffect.start(t,e,i,s,n,r,o)},zoomTo:function(t,e,i,s,n,r){return this.zoomEffect.start(t,e,i,s,n,r)},getWorldPoint:function(t,e,i){void 0===i&&(i=new f);var s=this.matrix.matrix,n=s[0],r=s[1],o=s[2],a=s[3],h=s[4],u=s[5],l=n*a-r*o;if(!l)return i.x=t,i.y=e,i;var c=a*(l=1/l),d=-r*l,p=-o*l,g=n*l,m=(o*u-a*h)*l,v=(r*h-n*u)*l,y=Math.cos(this.rotation),x=Math.sin(this.rotation),w=this.zoom,T=this.scrollX,b=this.scrollY,S=t+(T*y-b*x)*w,_=e+(T*x+b*y)*w;return i.x=S*c+_*p+m,i.y=S*d+_*g+v,i},ignore:function(t){var e=this.id;if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i].cameraFilter|=e;else t.cameraFilter|=e;return this},preRender:function(t,e){var i=this.width,n=this.height,r=.5*i,o=.5*n,a=this.zoom*t,h=this.matrix,l=i*this.originX,c=n*this.originY,d=this._follow,f=this.deadzone,p=this.scrollX,g=this.scrollY;if(f&&s(f,this.midPoint.x,this.midPoint.y),d){var m=d.x-this.followOffset.x,v=d.y-this.followOffset.y;f?(m<f.x?p=u(p,p-(f.x-m),this.lerp.x):m>f.right&&(p=u(p,p+(m-f.right),this.lerp.x)),v<f.y?g=u(g,g-(f.y-v),this.lerp.y):v>f.bottom&&(g=u(g,g+(v-f.bottom),this.lerp.y))):(p=u(p,m-l,this.lerp.x),g=u(g,v-c,this.lerp.y))}this.useBounds&&(p=this.clampX(p),g=this.clampY(g)),this.roundPixels&&(l=Math.round(l),c=Math.round(c)),this.scrollX=p,this.scrollY=g;var y=p+r,x=g+o;this.midPoint.set(y,x);var w=i/a,T=n/a;this.worldView.setTo(y-w/2,x-T/2,w,T),h.loadIdentity(),h.scale(e,e),h.translate(this.x+l,this.y+c),h.rotate(this.rotation),h.scale(a,a),h.translate(-l,-c),this.shakeEffect.preRender()},clampX:function(t){var e=this._bounds,i=this.displayWidth,s=e.x+(i-this.width)/2,n=Math.max(s,s+e.width-i);return t<s?t=s:t>n&&(t=n),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,n=Math.max(s,s+e.height-i);return t<s?t=s:t>n&&(t=n),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=o(t),this},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=d(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,s,n){return this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,n?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setVisible:function(t){return this.visible=t,this},startFollow:function(t,e,i,s,r,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===r&&(r=0),void 0===o&&(o=r),this._follow=t,this.roundPixels=e,i=n(i,0,1),s=n(s,0,1),this.lerp.set(i,s),this.followOffset.set(r,o);var a=this.width/2,h=this.height/2,u=t.x-r,l=t.y-o;return this.midPoint.set(u,l),this.scrollX=u-a,this.scrollY=l-h,this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={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&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.resetFX(),this.matrix.destroy(),this.culledObjects=[],this._follow=null,this._bounds=null,this.scene=null,this.deadzone=null},width:{get:function(){return this._width},set:function(t){this._width=t,this.dirty=!0}},height:{get:function(){return this._height},set:function(t){this._height=t,this.dirty=!0}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,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.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=p},function(t,e,i){var s=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e][0],t[e][1])},set:function(t,e){return this.has(t)||(this.entries[t]=e,this.size++),this},get:function(t){if(this.has(t))return this.entries[t]},getArray:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},has:function(t){return this.entries.hasOwnProperty(t)},delete:function(t){return this.has(t)&&(delete this.entries[t],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(t){delete this.entries[t]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},dump:function(){var t=this.entries;for(var e in console.group("Map"),t)console.log(e,t[e]);console.groupEnd()},each:function(t){var e=this.entries;for(var i in e)if(!1===t(i,e[i]))break;return this},contains:function(t){var e=this.entries;for(var i in e)if(e[i]===t)return!0;return!1},merge:function(t,e){void 0===e&&(e=!1);var i=this.entries,s=t.entries;for(var n in s)i.hasOwnProperty(n)&&e?i[n]=s[n]:this.set(n,s[n]);return this}});t.exports=s},,,function(t,e,i){var s=i(10);t.exports=function(t,e){var i=s(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var n=t.anims,r=s(i,"key",void 0),o=s(i,"startFrame",void 0),a=s(i,"delay",0),h=s(i,"repeat",0),u=s(i,"repeatDelay",0),l=s(i,"yoyo",!1),c=s(i,"play",!1),d=s(i,"delayedPlay",0);n.setDelay(a),n.setRepeat(h),n.setRepeatDelay(u),n.setYoyo(l),c?n.play(r,o):d>0?n.delayedPlay(d,r,o):n.load(r)}return t}},function(t,e,i){var s=i(0),n=i(19),r=i(16),o=new s({initialize:function(t,e,i,s,n,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,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(r,o,s,n)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var n=this.data,r=n.cut;r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e);var o=n.drawImage;return o.x=i,o.y=s,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=s,a.w=n,a.h=r,a.r=i+n,a.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,s,r,o,a){var h=this.cutX,u=this.cutY,l=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=n(e,0,d)),g=u+(i=n(i,0,f)),m=s=n(s,0,d-e),v=r=n(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,w=e+s,T=i+r;if(!(x.r<e||x.b<i||x.x>w||x.y>T)){var b=Math.max(x.x,e),S=Math.max(x.y,i),_=Math.min(x.r,w)-b,A=Math.min(x.b,T)-S;m=_,v=A,p=o?h+(l-(b-x.x)-_):h+(b-x.x),g=a?u+(c-(S-x.y)-A):u+(S-x.y),e=b,i=S,s=_,r=A}else p=0,g=0,m=0,v=0}else o&&(p=h+(l-e-s)),a&&(g=u+(c-i-r));var E=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/E),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+m)/E),t.v1=Math.min(1,(g+v)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=m,t.ch=v,t.width=s,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,n=this.data.drawImage;n.width=i,n.height=s;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+s)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=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}}});t.exports=o},function(t,e,i){var s=i(0),n=i(1),r=i(207),o=i(32),a=i(496),h=i(495),u=i(21),l=i(84),c=new s({Extends:l,Mixins:[r],initialize:function(t){var e=t.renderer.config;l.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:n(t,"topology",t.renderer.gl.TRIANGLES),vertShader:n(t,"vertShader",h),fragShader:n(t,"fragShader",a),vertexCapacity:n(t,"vertexCapacity",6*e.batchSize),vertexSize:n(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new o,this._tempMatrix2=new o,this._tempMatrix3=new o,this._tempMatrix4=new o,this.mvpInit()},setTexture2D:function(t,e){if(!t)return this;var i=this.batches;0===i.length&&this.pushBatch();var s=i[i.length-1];return e>0?(s.textures[e-1]&&s.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==s.texture&&s.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,s=this.gl,n=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,u=0,l=null;if(0===h.length||0===r)return this.flushLocked=!1,this;s.bufferSubData(s.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c<h.length-1;++c){if(l=h[c],t=h[c+1],l.textures.length>0){for(e=0;e<l.textures.length;++e)(i=l.textures[e])&&n.setTexture2D(i,1+e);s.activeTexture(s.TEXTURE0)}u=t.first-l.first,null===l.texture||u<=0||(n.setTexture2D(l.texture,0),s.drawArrays(o,l.first,u))}if((l=h[h.length-1]).textures.length>0){for(e=0;e<l.textures.length;++e)(i=l.textures[e])&&n.setTexture2D(i,1+e);s.activeTexture(s.TEXTURE0)}return u=r-l.first,l.texture&&u>0&&(n.setTexture2D(l.texture,0),s.drawArrays(o,l.first,u)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return l.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.width,m=o.height,v=-t.displayOriginX+f,y=-t.displayOriginY+p;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,l=x.v0,c=x.u1,d=x.v1,g=x.width,m=x.height,f=x.x,p=x.y,v=-t.displayOriginX+f,y=-t.displayOriginY+p}t.flipX&&(v+=g,g*=-1),t.flipY&&(y+=m,m*=-1);var w=v+g,T=y+m;n.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=t.x,n.f=t.y,s.multiply(n,r)):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY,s.multiply(n,r));var b=v*r.a+y*r.c+r.e,S=v*r.b+y*r.d+r.f,_=v*r.a+T*r.c+r.e,A=v*r.b+T*r.d+r.f,E=w*r.a+T*r.c+r.e,C=w*r.b+T*r.d+r.f,M=w*r.a+y*r.c+r.e,P=w*r.b+y*r.d+r.f,k=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),R=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),L=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),O=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(b|=0,S|=0,_|=0,A|=0,E|=0,C|=0,M|=0,P|=0),this.setTexture2D(a,0);var F=t._isTinted&&t.tintFill;this.batchVertices(b,S,_,A,E,C,M,P,h,l,c,d,k,R,L,O,F)},batchVertices:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m){var v=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),v=!0);var y=this.vertexViewF32,x=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount-1;return y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=m,x[++w]=d,y[++w]=i,y[++w]=s,y[++w]=h,y[++w]=c,y[++w]=m,x[++w]=p,y[++w]=n,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=m,x[++w]=g,y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=m,x[++w]=d,y[++w]=n,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=m,x[++w]=g,y[++w]=o,y[++w]=a,y[++w]=l,y[++w]=u,y[++w]=m,x[++w]=f,this.vertexCount+=6,this.vertexCapacity-this.vertexCount<6&&(this.flush(),v=!0),v},batchTexture:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m,v,y,x,w,T,b,S,_,A,E,C,M,P){this.renderer.setPipeline(this,t);var k=this._tempMatrix1,R=this._tempMatrix2,L=this._tempMatrix3,O=o,F=a,D=-g,I=-m;d^=e.isRenderTexture?1:0,c&&(O*=-1,D+=o),d&&(F*=-1,I+=a),M.roundPixels&&(D|=0,I|=0);var B=D+O,U=I+F;R.applyITRS(n,r,l,h,u),k.copyFrom(M.matrix),P?(k.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),R.e=n,R.f=r,k.multiply(R,L)):(R.e-=M.scrollX*f,R.f-=M.scrollY*p,k.multiply(R,L));var N=D*L.a+I*L.c+L.e,Y=D*L.b+I*L.d+L.f,z=D*L.a+U*L.c+L.e,X=D*L.b+U*L.d+L.f,G=B*L.a+U*L.c+L.e,V=B*L.b+U*L.d+L.f,W=B*L.a+I*L.c+L.e,H=B*L.b+I*L.d+L.f;M.roundPixels&&(N|=0,Y|=0,z|=0,X|=0,G|=0,V|=0,W|=0,H|=0);var j=v/i+E,q=y/s+C,K=(v+x)/i+E,J=(y+w)/s+C;this.setTexture2D(e,0),this.batchVertices(N,Y,z,X,G,V,W,H,j,q,K,J,T,b,S,_,A)},drawTextureFrame:function(t,e,i,s,n,r,o){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var a=this._tempMatrix1.copyFromArray(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=e*h.a+i*h.c+h.e,f=e*h.b+i*h.d+h.f,p=e*h.a+c*h.c+h.e,g=e*h.b+c*h.d+h.f,m=l*h.a+c*h.c+h.e,v=l*h.b+c*h.d+h.f,y=l*h.a+i*h.c+h.e,x=l*h.b+i*h.d+h.f;this.renderer.config.roundPixels&&(d|=0,f|=0,p|=0,g|=0,m|=0,v|=0,y|=0,x|=0),this.setTexture2D(t.glTexture,0),s=u.getTintAppendFloatAlpha(s,n),this.batchVertices(d,f,p,g,m,v,y,x,t.u0,t.v0,t.u1,t.v1,s,s,s,s,0)||this.flush()}});t.exports=c},function(t,e){t.exports=function(t,e,i){var s;if(void 0===i&&(i=!0),e)"string"==typeof e?s=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(s=e);else if(t.parentElement)return t;return s||(s=document.body),i&&s.style&&(s.style.overflow="hidden"),s.appendChild(t),t}},function(t,e){var i,s="";t.exports={disable:function(t){return""===s&&(s=i(t)),s&&(t[s]=!1),t},enable:function(t){return""===s&&(s=i(t)),s&&(t[s]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i<e.length;i++){var s=e[i]+"mageSmoothingEnabled";if(s in t)return s}return null},isEnabled:function(t){return null!==s?t[s]:null}}},function(t,e,i){var s=i(279),n=i(277),r=i(275),o=i(274);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):s(t);case"number":return n(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var n=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},function(t,e,i){var s=i(97),n=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new n),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=s(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var s=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},,,,,,,function(t,e,i){var s=i(0),n=i(18),r=i(20),o=i(7),a=i(1),h=i(8),u=i(264),l=new s({Extends:r,initialize:function(t,e,i,s){var n="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var u={type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=u(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},,,,function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},function(t,e,i){t.exports={Matrix:i(473),Add:i(466),AddAt:i(465),BringToTop:i(464),CountAllMatching:i(463),Each:i(462),EachInRange:i(461),FindClosestInSorted:i(214),GetAll:i(460),GetFirst:i(459),GetRandom:i(149),MoveDown:i(458),MoveTo:i(457),MoveUp:i(456),NumberArray:i(455),NumberArrayStep:i(454),QuickSelect:i(185),Range:i(247),Remove:i(200),RemoveAt:i(453),RemoveBetween:i(452),RemoveRandomElement:i(451),Replace:i(450),RotateLeft:i(295),RotateRight:i(294),SafeRange:i(29),SendToBack:i(449),SetAll:i(448),Shuffle:i(95),SpliceOne:i(56),StableSort:i(83),Swap:i(447)}},function(t,e,i){var s=i(0),n=i(497),r=i(130),o=new s({Extends:r,initialize:function(t){t.fragShader=n.replace("%LIGHT_COUNT%",10..toString()),r.call(this,t),this.defaultNormalMap},boot:function(){this.defaultNormalMap=this.game.textures.getFrame("__DEFAULT")},onBind:function(t){r.prototype.onBind.call(this);var e=this.renderer,i=this.program;return this.mvpUpdate(),e.setInt1(i,"uNormSampler",1),e.setFloat2(i,"uResolution",this.width,this.height),t&&this.setNormalMap(t),this},onRender:function(t,e){this.active=!1;var i=t.sys.lights;if(!i||i.lights.length<=0||!i.active)return this;var s=i.cull(e),n=Math.min(s.length,10);if(0===n)return this;this.active=!0;var r,o=this.renderer,a=this.program,h=e.matrix,u={x:0,y:0},l=o.height;for(r=0;r<10;++r)o.setFloat1(a,"uLights["+r+"].radius",0);for(o.setFloat4(a,"uCamera",e.x,e.y,e.rotation,e.zoom),o.setFloat3(a,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),r=0;r<n;++r){var c=s[r],d="uLights["+r+"].";h.transformPoint(c.x,c.y,u),o.setFloat2(a,d+"position",u.x-e.scrollX*c.scrollFactorX*e.zoom,l-(u.y-e.scrollY*c.scrollFactorY*e.zoom)),o.setFloat3(a,d+"color",c.r,c.g,c.b),o.setFloat1(a,d+"intensity",c.intensity),o.setFloat1(a,d+"radius",c.radius)}return this},batchTexture:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m,v,y,x,w,T,b,S,_,A,E,C,M,P){if(this.active){var k;this.renderer.setPipeline(this),t.texture?k=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(k=t.tileset.image.dataSource[0]),k||(k=this.defaultNormalMap),this.setTexture2D(k.glTexture,1);var R=this._tempMatrix1,L=this._tempMatrix2,O=this._tempMatrix3,F=o,D=a,I=-g,B=-m;d^=e.isRenderTexture?1:0,c&&(F*=-1,I+=o),d&&(D*=-1,B+=a),M.roundPixels&&(I|=0,B|=0);var U=I+F,N=B+D;L.applyITRS(n,r,l,h,u),R.copyFrom(M.matrix),P?(R.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),L.e=n,L.f=r,R.multiply(L,O)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,O));var Y=I*O.a+B*O.c+O.e,z=I*O.b+B*O.d+O.f,X=I*O.a+N*O.c+O.e,G=I*O.b+N*O.d+O.f,V=U*O.a+N*O.c+O.e,W=U*O.b+N*O.d+O.f,H=U*O.a+B*O.c+O.e,j=U*O.b+B*O.d+O.f;M.roundPixels&&(Y|=0,z|=0,X|=0,G|=0,V|=0,W|=0,H|=0,j|=0);var q=v/i+E,K=y/s+C,J=(v+x)/i+E,Z=(y+w)/s+C;this.setTexture2D(e,0),this.batchVertices(Y,z,X,G,V,W,H,j,q,K,J,Z,T,b,S,_,A)}},setNormalMap:function(t){var e;this.active&&t&&(t.texture&&(e=t.texture.dataSource[t.frame.sourceIndex]),e||(e=this.defaultNormalMap),this.setTexture2D(e.glTexture,1),this.renderer.setPipeline(t.defaultPipeline))},batchSprite:function(t,e,i){if(this.active){var s=t.texture.dataSource[t.frame.sourceIndex];s&&(this.renderer.setPipeline(this),this.setTexture2D(s.glTexture,1),r.prototype.batchSprite.call(this,t,e,i))}}});o.LIGHT_COUNT=10,t.exports=o},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var s=i(15);t.exports=function(t){return t*s.RAD_TO_DEG}},,function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(n*a+o*h),e}},function(t,e,i){var s=i(5);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var s=i(70),n=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l<e;l++){var c=l/e,d=o+(h-o)*c,f=a+(u-a)*c;r.push(new n(d,f))}return r}},function(t,e,i){var s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),r=n>1?2-n:n,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},,function(t,e,i){var s=i(0),n=i(9),r=i(71),o=i(61),a=new s({Extends:n,initialize:function(t){n.call(this),this.manager=t,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=o.PENDING_ADD,this._pausedState=o.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},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},add:function(t){return this.queue(r(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"===typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],s=parseFloat(t.substr(2)),n=e;switch(i){case"+":n+=s;break;case"-":n-=s}return Math.max(0,n)},calcDuration:function(){for(var t=0,e=0,i=0,s=0;s<this.totalData;s++){var n=this.data[s];n.init(),this.hasOffset(n)?this.isOffsetAbsolute(n.offset)?(n.calculatedOffset=n.offset,0===n.offset&&(i=0)):this.isOffsetRelative(n.offset)&&(n.calculatedOffset=this.getRelativeOffset(n.offset,t)):n.calculatedOffset=i,t=n.totalDuration+n.calculatedOffset,e+=n.totalDuration,i+=n.totalDuration}this.duration=e,this.loopCounter=-1===this.loop?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=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e<this.totalData;e++){this.data[e].play(t)}},setCallback:function(t,e,i,s){return-1!==a.TYPES.indexOf(t)&&(this.callbacks[t]={func:e,scope:s,params:i}),this},makeActive:function(t){return this.manager.makeActive(t)},play:function(){if(this.state!==o.ACTIVE){if(this.paused)return this.paused=!1,void this.manager.makeActive(this);this.resetTweens(!1),this.state=o.ACTIVE;var t=this.callbacks.onStart;t&&t.func.apply(t.scope,t.params),this.emit("start",this)}},nextState:function(){if(this.loopCounter>0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var s=this.totalData,n=0;n<this.totalData;n++){this.data[n].update(t,i)&&s--}var r=this.callbacks.onUpdate;r&&r.func.apply(r.scope,r.params),this.emit("update",this),0===s&&this.nextState();break;case o.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=o.ACTIVE);break;case o.COMPLETE_DELAY:if(this.countdown-=e,this.countdown<=0){var a=this.callbacks.onComplete;a&&a.func.apply(a.scope,a.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}}return this.state===o.PENDING_REMOVE}},stop:function(){this.state=o.PENDING_REMOVE},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this.emit("pause",this),this},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this.emit("resume",this),this},hasTarget:function(t){for(var e=0;e<this.data.length;e++)if(this.data[e].hasTarget(t))return!0;return!1},destroy:function(){for(var t=0;t<this.data.length;t++)this.data[t].stop()}});a.TYPES=["onStart","onUpdate","onLoop","onComplete","onYoyo"],t.exports=a},function(t,e,i){var s=i(34),n=i(100),r=i(10),o=i(62),a=i(63),h=i(72),u=i(102),l=i(167),c=i(4),d=i(164),f=i(71);t.exports=function(t,e){var i=new d(t),p=l(e);if(0===p.length)return i.paused=!0,i;var g=s(n);g.targets=u(e);var m=r(e,"totalDuration",0);g.duration=m>0?Math.floor(m/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var v=0;v<p.length;v++)i.queue(f(i,p[v],g));i.completeDelay=r(e,"completeDelay",0),i.loop=Math.round(r(e,"loop",0)),i.loopDelay=Math.round(r(e,"loopDelay",0)),i.paused=o(e,"paused",!1),i.useFrames=o(e,"useFrames",!1);var y=c(e,"callbackScope",i),x=[i],w=c(e,"onStart",!1);if(w){var T=c(e,"onStartScope",y),b=c(e,"onStartParams",[]);i.setCallback("onStart",w,x.concat(b),T)}var S=c(e,"onUpdate",!1);if(S){var _=c(e,"onUpdateScope",y),A=c(e,"onUpdateParams",[]);i.setCallback("onUpdate",S,x.concat(A),_)}var E=c(e,"onLoop",!1);if(E){var C=c(e,"onLoopScope",y),M=c(e,"onLoopParams",[]);i.setCallback("onLoop",E,x.concat(M),C)}var P=c(e,"onYoyo",!1);if(P){var k=c(e,"onYoyoScope",y),R=c(e,"onYoyoParams",[]);i.setCallback("onYoyo",P,x.concat(null,R),k)}var L=c(e,"onComplete",!1);if(L){var O=c(e,"onCompleteScope",y),F=c(e,"onCompleteParams",[]);i.setCallback("onComplete",L,x.concat(F),O)}return i}},function(t,e,i){var s=i(100),n=i(10),r=i(62),o=i(63),a=i(72),h=i(4),u=i(101),l=i(99),c=i(98);t.exports=function(t,e,i){void 0===i&&(i=s);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),m=a(e,"duration",i.duration),v=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),v),x=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),T=a(e,"repeatDelay",i.repeatDelay),b=r(e,"yoyo",i.yoyo),S=[],_=u("value",f),A=c(p[0],"value",_.getEnd,_.getStart,y,g,m,b,x,w,T,!1,!1);A.start=d,A.current=d,A.to=f,S.push(A);var E=new l(t,S,p);E.offset=n(e,"offset",null),E.completeDelay=n(e,"completeDelay",0),E.loop=Math.round(n(e,"loop",0)),E.loopDelay=Math.round(n(e,"loopDelay",0)),E.paused=r(e,"paused",!1),E.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",E),M=[E,null],P=l.TYPES,k=0;k<P.length;k++){var R=P[k],L=h(e,R,!1);if(L){var O=h(e,R+"Scope",C),F=h(e,R+"Params",[]);E.setCallback(R,L,M.concat(F),O)}}return E}},function(t,e,i){var s=i(4);t.exports=function(t){var e=s(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var s=i(309);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===s.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var s=i(0),n=i(1),r=new s({initialize:function(t){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(t)},reset:function(t){return this.delay=n(t,"delay",0),this.repeat=n(t,"repeat",0),this.loop=n(t,"loop",!1),this.callback=n(t,"callback",void 0),this.callbackScope=n(t,"callbackScope",this.callback),this.args=n(t,"args",[]),this.timeScale=n(t,"timeScale",1),this.startAt=n(t,"startAt",0),this.paused=n(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var s=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},,function(t,e,i){var s=i(0),n=i(20),r=i(1),o=i(108),a=i(8),h=new s({Extends:n,initialize:function(t,e,i,s){if(a(e)){var o=e;e=r(o,"key"),s=r(o,"config",s)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};n.call(this,t,h),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 t=0;t<this.data.length;t++){var e=this.data[t];e.oncanplaythrough=null,e.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(t){var e=t.target;e.oncanplaythrough=null,e.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit("fileprogress",this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var t=this.config&&this.config.instances||1;this.filesTotal=t,this.filesLoaded=0,this.percentComplete=0;for(var e=0;e<t;e++){var i=new Audio;i.dataset.name=this.key+("0"+e).slice(-2),i.dataset.used="false",this.locked?i.dataset.locked="true":(i.dataset.locked="false",i.preload="auto",i.oncanplaythrough=this.onProgress.bind(this),i.onerror=this.onError.bind(this)),this.data.push(i)}for(e=0;e<this.data.length;e++)(i=this.data[e]).src=o(this,this.loader.baseURL),this.locked||i.load();this.locked&&setTimeout(this.onLoad.bind(this))}});t.exports=h},function(t,e,i){var s=i(0),n=i(22),r=i(20),o=i(7),a=i(1),h=i(172),u=i(8),l=new s({Extends:r,initialize:function(t,e,i,s,n){if(u(e)){var o=e;e=a(o,"key"),s=a(o,"xhrSettings"),n=a(o,"context",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:s,config:{context:n}};r.call(this,t,h)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(e){t.data=e,t.onProcessComplete()},function(e){console.error("Error decoding audio: "+this.key+" - ",e.message),t.onProcessError()}),this.config.context=null}});l.create=function(t,e,i,s,n){var r=t.systems.game,o=r.config.audio,c=r.device.audio;u(e)&&(i=a(e,"url",[]),s=a(e,"config",{}));var d=l.getAudioURL(r,i);return d?!c.webAudio||o&&o.disableWebAudio?new h(t,e,d,s):new l(t,e,d,n,r.sound.context):null},l.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var s=a(e[i],"url",e[i]);if(0===s.indexOf("blob:")||0===s.indexOf("data:"))return s;var n=s.match(/\.([a-zA-Z0-9]+)($|\?)/);if(n=a(e[i],"type",n?n[1]:"").toLowerCase(),t.device.audio[n])return{url:s,type:n}}return null},o.register("audio",function(t,e,i,s){var n,r=this.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return this;if(Array.isArray(t))for(var h=0;h<t.length;h++)(n=l.create(this,t[h]))&&this.addFile(n);else(n=l.create(this,t,e,i,s))&&this.addFile(n);return this}),t.exports=l},function(t,e,i){var s=i(107);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;return n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t),n.onprogress=t.onProgress.bind(t),n.send(),n}},function(t,e,i){var s=i(0),n=i(1),r=i(378),o=i(376),a=new s({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var s=0;s<e.length;s++){var a=e[s];"string"==typeof a?this.keyCodes.push(a.toUpperCase().charCodeAt(0)):"number"==typeof a?this.keyCodes.push(a):a.hasOwnProperty("keyCode")&&this.keyCodes.push(a.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=n(i,"resetOnWrongKey",!0),this.maxKeyDelay=n(i,"maxKeyDelay",0),this.resetOnMatch=n(i,"resetOnMatch",!1),this.deleteOnMatch=n(i,"deleteOnMatch",!1);var h=this,u=function(t){!h.matched&&h.enabled&&(r(t,h)&&(h.manager.emit("keycombomatch",h,t),h.resetOnMatch?o(h):h.deleteOnMatch&&h.destroy()))};this.onKeyDown=u,this.manager.on("keydown",u)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off("keydown",this.onKeyDown),this.manager=null}});t.exports=a},function(t,e,i){var s=new(i(0))({initialize:function(t){this.keyCode=t,this.originalEvent=void 0,this.preventDefault=!0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},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.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this}});t.exports=s},function(t,e,i){var s=i(179),n=i(178),r=i(0),o=i(9),a=i(6),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r<e.buttons.length;r++)i.push(new n(this,r));this.buttons=i;var h=[];for(r=0;r<e.axes.length;r++)h.push(new s(this,r));this.axes=h,this.vibration=e.vibrationActuator;var u={value:0,pressed:!1};this._LCLeft=i[14]?i[14]:u,this._LCRight=i[15]?i[15]:u,this._LCTop=i[12]?i[12]:u,this._LCBottom=i[13]?i[13]:u,this._RCLeft=i[2]?i[2]:u,this._RCRight=i[1]?i[1]:u,this._RCTop=i[3]?i[3]:u,this._RCBottom=i[0]?i[0]:u,this._FBLeftTop=i[4]?i[4]:u,this._FBLeftBottom=i[6]?i[6]:u,this._FBRightTop=i[5]?i[5]:u,this._FBRightBottom=i[7]?i[7]:u;var l={value:0};this._HAxisLeft=h[0]?h[0]:l,this._VAxisLeft=h[1]?h[1]:l,this._HAxisRight=h[2]?h[2]:l,this._VAxisRight=h[3]?h[3]:l,this.leftStick=new a,this.rightStick=new a},getAxisTotal:function(){return this.axes.length},getAxisValue:function(t){return this.axes[t].getValue()},setAxisThreshold:function(t){for(var e=0;e<this.axes.length;e++)this.axes[e].threshold=t},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(t){return this.buttons[t].value},isButtonDown:function(t){return this.buttons[t].pressed},update:function(t){var e,i=this.buttons,s=t.buttons,n=i.length;for(e=0;e<n;e++)i[e].update(s[e].value);var r=this.axes,o=t.axes;for(n=r.length,e=0;e<n;e++)r[e].update(o[e]);n>=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),n>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t<this.buttons.length;t++)this.buttons[t].destroy();for(t=0;t<this.axes.length;t++)this.axes[t].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}}});t.exports=h},function(t,e,i){var s=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",e,this,t),this.pad.emit("down",i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit("up",e,this,t),this.pad.emit("up",i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=s},function(t,e,i){var s=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});t.exports=s},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var s=i(119),n=i(2);t.exports=function(t,e,i,r,o,a,h){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&r.id)){var u=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,c=e.x,d=e.y,f=e.scaleX,p=e.scaleY,g=e.rotation,m=e.commandBuffer,v=a||t.currentContext,y=1,x=1,w=0,T=0,b=1,S=0,_=0,A=0,E=r.alpha*e.alpha;if(0!==E){if(t.currentAlpha!==E&&(t.currentAlpha=E,v.globalAlpha=E),t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),o){var C=o.matrix;v.transform(C[0],C[1],C[2],C[3],C[4],C[5])}v.translate(c-u,d-l),v.rotate(g),v.scale(f,p),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var M=0,P=m.length;M<P;++M)switch(m[M]){case s.ARC:v.arc(m[M+1],m[M+2],m[M+3],m[M+4],m[M+5],m[M+6]),M+=6;break;case s.LINE_STYLE:b=m[M+1],w=m[M+2],y=m[M+3],S=(16711680&w)>>>16,_=(65280&w)>>>8,A=255&w,v.strokeStyle="rgba("+S+","+_+","+A+","+y+")",v.lineWidth=b,M+=3;break;case s.FILL_STYLE:T=m[M+1],x=m[M+2],S=(16711680&T)>>>16,_=(65280&T)>>>8,A=255&T,v.fillStyle="rgba("+S+","+_+","+A+","+x+")",M+=2;break;case s.BEGIN_PATH:v.beginPath();break;case s.CLOSE_PATH:v.closePath();break;case s.FILL_PATH:h||v.fill();break;case s.STROKE_PATH:h||v.stroke();break;case s.FILL_RECT:h?v.rect(m[M+1],m[M+2],m[M+3],m[M+4]):v.fillRect(m[M+1],m[M+2],m[M+3],m[M+4]),M+=4;break;case s.FILL_TRIANGLE:v.beginPath(),v.moveTo(m[M+1],m[M+2]),v.lineTo(m[M+3],m[M+4]),v.lineTo(m[M+5],m[M+6]),v.closePath(),h||v.fill(),M+=6;break;case s.STROKE_TRIANGLE:v.beginPath(),v.moveTo(m[M+1],m[M+2]),v.lineTo(m[M+3],m[M+4]),v.lineTo(m[M+5],m[M+6]),v.closePath(),h||v.stroke(),M+=6;break;case s.LINE_TO:v.lineTo(m[M+1],m[M+2]),M+=2;break;case s.MOVE_TO:v.moveTo(m[M+1],m[M+2]),M+=2;break;case s.LINE_FX_TO:v.lineTo(m[M+1],m[M+2]),M+=5;break;case s.MOVE_FX_TO:v.moveTo(m[M+1],m[M+2]),M+=5;break;case s.SAVE:v.save();break;case s.RESTORE:v.restore();break;case s.TRANSLATE:v.translate(m[M+1],m[M+2]),M+=2;break;case s.SCALE:v.scale(m[M+1],m[M+2]),M+=2;break;case s.ROTATE:v.rotate(m[M+1]),M+=1}v.restore()}}}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},function(t,e,i){var s=i(182),n=i(113),r=i(64),o=i(15);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=s(t)/i);for(var h=0;h<e;h++){var u=r(h/e,0,o.PI2);a.push(n(t,u))}return a}},function(t,e,i){var s=i(113),n=i(64),r=i(15),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||n;o>r;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],m=r,v=o;for(s(t,r,e),a(t[o],g)>0&&s(t,r,o);m<v;){for(s(t,m,v),m++,v--;a(t[m],g)<0;)m++;for(;a(t[v],g)>0;)v--}0===a(t[r],g)?s(t,r,v):s(t,++v,o),v<=e&&(r=v+1),e<=v&&(o=v-1)}};function s(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function n(t,e){return t<e?-1:t>e?1:0}t.exports=i},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n<i;n++){s[n]=new Array(e);for(var r=e-1;r>-1;r--)s[n][r]=t[r][n]}return s}},function(t,e,i){t.exports={AtlasXML:i(484),Canvas:i(483),Image:i(482),JSONArray:i(481),JSONHash:i(480),SpriteSheet:i(479),SpriteSheetFromAtlas:i(478),UnityYAML:i(477)}},function(t,e,i){var s=i(24),n=i(0),r=i(85),o=i(59),a=new n({initialize:function(t,e,i,s){var n=t.manager.game;this.renderer=n.renderer,this.texture=t,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.width||0,this.height=s||e.naturalHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(n)},init:function(t){this.renderer&&this.renderer.gl&&(this.isCanvas?this.glTexture=this.renderer.canvasToTexture(this.image):this.glTexture=this.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t)},update:function(){this.renderer.gl&&this.isCanvas&&this.renderer.canvasToTexture(this.image,this.glTexture)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.image=null}});t.exports=a},function(t,e,i){var s=i(24),n=i(485),r=i(0),o=i(30),a=i(22),h=i(9),u=i(270),l=i(4),c=i(187),d=i(117),f=new r({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once("boot",this.boot,this)},boot:function(){this._pending=2,this.on("onload",this.updatePending,this),this.on("onerror",this.updatePending,this),this.addBase64("__DEFAULT",this.game.config.defaultImage),this.addBase64("__MISSING",this.game.config.missingImage),this.game.events.once("destroy",this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off("onload"),this.off("onerror"),this.game.events.emit("ready"))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(delete this.list[t.key],t.destroy(),this.emit("removetexture",t.key)),this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,s=new Image;s.onerror=function(){i.emit("onerror",t)},s.onload=function(){var e=i.create(t,s);c.Image(e,0),i.emit("addtexture",t,e),i.emit("onload",t,e)},s.src=e}},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),c.Image(s,0),i&&s.setDataSource(i),this.emit("addtexture",t,s)),s},generate:function(t,e){if(this.checkKey(t)){var i=s.create(this,1,1);return e.canvas=i,u(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var n=s.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,n)}return null},addCanvas:function(t,e){var i=null;return this.checkKey(t)&&(i=new n(this,t,e,e.width,e.height),this.list[t]=i,this.emit("addtexture",t,i)),i},addAtlas:function(t,e,i,s){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,s):this.addAtlasJSONHash(t,e,i,s)},addAtlasJSONArray:function(t,e,i,s){var n=null;if(this.checkKey(t)){if(n=this.create(t,e),Array.isArray(i))for(var r=1===i.length,o=0;o<n.source.length;o++){var a=r?i[0]:i[o];c.JSONArray(n,o,a)}else c.JSONArray(n,0,i);s&&n.setDataSource(s),this.emit("addtexture",t,n)}return n},addAtlasJSONHash:function(t,e,i,s){var n=null;if(this.checkKey(t)){if(n=this.create(t,e),Array.isArray(i))for(var r=0;r<i.length;r++)c.JSONHash(n,r,i[r]);else c.JSONHash(n,0,i);s&&n.setDataSource(s),this.emit("addtexture",t,n)}return n},addAtlasXML:function(t,e,i,s){var n=null;return this.checkKey(t)&&(n=this.create(t,e),c.AtlasXML(n,0,i),s&&n.setDataSource(s),this.emit("addtexture",t,n)),n},addUnityAtlas:function(t,e,i,s){var n=null;return this.checkKey(t)&&(n=this.create(t,e),c.UnityYAML(n,0,i),s&&n.setDataSource(s),this.emit("addtexture",t,n)),n},addSpriteSheet:function(t,e,i){var s=null;if(this.checkKey(t)){var n=(s=this.create(t,e)).source[0].width,r=s.source[0].height;c.SpriteSheet(s,0,0,0,n,r,i),this.emit("addtexture",t,s)}return s},addSpriteSheetFromAtlas:function(t,e){if(!this.checkKey(t))return null;var i=l(e,"atlas",null),s=l(e,"frame",null);if(i&&s){var n=this.get(i).get(s);if(n){var r=this.create(t,n.source.image);return n.trimmed?c.SpriteSheetFromAtlas(r,n,e):c.SpriteSheet(r,0,n.cutX,n.cutY,n.cutWidth,n.cutHeight,e),this.emit("addtexture",t,r),r}}},create:function(t,e,i,s){var n=null;return this.checkKey(t)&&(n=new d(this,t,e,i,s),this.list[t]=n),n},exists:function(t){return this.list.hasOwnProperty(t)},get:function(t){return void 0===t&&(t="__DEFAULT"),this.list[t]?this.list[t]:this.list.__MISSING},cloneFrame:function(t,e){if(this.list[t])return this.list[t].get(e).clone()},getFrame:function(t,e){if(this.list[t])return this.list[t].get(e)},getTextureKeys:function(){var t=[];for(var e in this.list)"__DEFAULT"!==e&&"__MISSING"!==e&&t.push(e);return t},getPixel:function(t,e,i,s){var n=this.getFrame(i,s);if(n){var r=n.source.image;if(t>=0&&t<=r.width&&e>=0&&e<=r.height){t+=n.cutX,e+=n.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(r,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,s){var n=this.getFrame(i,s);if(n){var r=n.source.image;if(t>=0&&t<=r.width&&e>=0&&e<=r.height){t+=n.cutX,e+=n.cutY;var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(r,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],s=1;s<arguments.length;s++)i.push(arguments[s]);for(var n in this.list)i[0]=this.list[n],t.apply(e,i)},destroy:function(){for(var t in this.list)this.list[t].destroy();this.list={},this.game=null,s.remove(this._tempCanvas)}});t.exports=f},function(t,e,i){var s=i(77),n=new(i(0))({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime<this.startTime)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit("pause",this),!0))},resume:function(){return!(this.manager.context.currentTime<this.startTime)&&(!!s.prototype.resume.call(this)&&(this.createAndStartBufferSource(),this.emit("resume",this),!0))},stop:function(){return!!s.prototype.stop.call(this)&&(this.stopAndRemoveBufferSource(),this.emit("stop",this),!0)},createAndStartBufferSource:function(){var t=this.currentConfig.seek,e=this.currentConfig.delay,i=this.manager.context.currentTime+e,s=(this.currentMarker?this.currentMarker.start:0)+t,n=this.duration-t;this.playTime=i-t,this.startTime=i,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,i),Math.max(0,s),Math.max(0,n)),this.resetConfig()},createAndStartLoopBufferSource:function(){var t=this.getLoopTime(),e=this.currentMarker?this.currentMarker.start:0,i=this.duration;this.loopTime=t,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,t),Math.max(0,e),Math.max(0,i))},createBufferSource:function(){var t=this,e=this.manager.context.createBufferSource();return e.buffer=this.audioBuffer,e.connect(this.muteNode),e.onended=function(e){e.target===t.source&&(t.currentConfig.loop?t.hasLooped=!0:t.hasEnded=!0)},e},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}),s.prototype.applyConfig.call(this)},update:function(t,e){this.hasEnded?(this.hasEnded=!1,s.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit("ended",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("looped",this))},destroy:function(){s.prototype.destroy.call(this),this.audioBuffer=null,this.stopAndRemoveBufferSource(),this.muteNode.disconnect(),this.muteNode=null,this.volumeNode.disconnect(),this.volumeNode=null,this.rateUpdates.length=0,this.rateUpdates=null},calculateRate:function(){s.prototype.calculateRate.call(this);var t=this.manager.context.currentTime;this.source&&"number"==typeof this.totalRate&&this.source.playbackRate.setValueAtTime(this.totalRate,t),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,t)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var t=0,e=0;e<this.rateUpdates.length;e++){t+=((e<this.rateUpdates.length-1?this.rateUpdates[e+1].time:this.manager.context.currentTime-this.playTime)-this.rateUpdates[e].time)*this.rateUpdates[e].rate}return t},getLoopTime:function(){for(var t=0,e=0;e<this.rateUpdates.length-1;e++)t+=(this.rateUpdates[e+1].time-this.rateUpdates[e].time)*this.rateUpdates[e].rate;var i=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+i.time+(this.duration-t)/i.rate},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.calculateRate(),this.emit("rate",this,t)}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.calculateRate(),this.emit("detune",this,t)}},setDetune:function(t){return this.detune=t,this},mute:{get:function(){return 0===this.muteNode.gain.value},set:function(t){this.currentConfig.mute=t,this.muteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(t){this.currentConfig.volume=t,this.volumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}},setVolume:function(t){return this.volume=t,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(t){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.currentConfig.seek=t,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit("seek",this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),t&&this.createAndStartLoopBufferSource()),this.emit("loop",this,t)}},setLoop:function(t){return this.loop=t,this}});t.exports=n},function(t,e,i){var s=i(78),n=i(0),r=i(190),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),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="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),document.body.removeEventListener("click",e),t.unlocked=!0})};document.body&&(document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1),document.body.addEventListener("click",e,!1))},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){if(this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio&&this.game.config.audio.context)this.context.suspend();else{var t=this;this.context.close().then(function(){t.context=null})}s.prototype.destroy.call(this)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}});t.exports=o},function(t,e,i){var s=i(77),n=i(0),r=i(9),o=i(16),a=new n({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),s.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var s=i(78),n=i(0),r=i(9),o=i(192),a=i(3),h=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return s.prototype.remove.call(this,t)},removeByKey:function(t){return s.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){s.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){s.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var s=i(77),n=new(i(0))({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),this.tags?(this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,s.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!s.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit("play",this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t<this.tags.length;t++){var e=this.tags[t];if("false"===e.dataset.used)return e.dataset.used="true",this.audio=e,!0}if(!this.manager.override)return!1;var i=[];this.manager.forEachActiveSound(function(t){t.key===this.key&&t.audio&&i.push(t)},this),i.sort(function(t,e){return t.loop===e.loop?e.seek/e.duration-t.seek/t.duration:t.loop?1:-1});var s=i[0];return this.audio=s.audio,s.reset(),s.audio=null,s.startTime=0,s.previousTime=0,!0},playCatchPromise:function(){var t=this.audio.play();t&&t.catch(function(t){console.warn(t)})},stopAndReleaseAudioTag:function(){this.audio.pause(),this.audio.dataset.used="false",this.audio=null,this.startTime=0,this.previousTime=0},reset:function(){s.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(t,e){if(this.isPlaying)if(this.startTime>0)this.startTime<t-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,t-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());else{var i=this.currentMarker?this.currentMarker.start:0,s=i+this.duration,n=this.audio.currentTime;if(this.currentConfig.loop)n>=s-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,n-s),n=this.audio.currentTime):n<i&&(this.audio.currentTime+=i,n=this.audio.currentTime),n<this.previousTime&&this.emit("looped",this);else if(n>=s)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=n}},destroy:function(){s.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=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){s.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||this.emit("mute",this,t)}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||this.emit("volume",this,t)}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||(this.calculateRate(),this.emit("rate",this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||(this.calculateRate(),this.emit("detune",this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=n},function(t,e,i){var s=i(78),n=i(0),r=i(194),o=new n({Extends:s,initialize:function(t){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,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(e,i){for(var s=0;s<i.length;s++)if("true"===i[s].dataset.locked)return t.locked=!0,!1;return!0}),this.locked){var e=!1,i=function(){e=!0},s=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",s);var n=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i<e.length;i++){var s=e[i];"true"===s.dataset.locked&&n.push(s)}return!0}),0!==n.length){var r=n[n.length-1];r.oncanplaythrough=function(){r.oncanplaythrough=null,n.forEach(function(t){t.dataset.locked="false"}),t.unlocked=!0},n.forEach(function(t){t.load()})}}};this.once("unlocked",function(){for(this.forEachActiveSound(function(t){null===t.currentMarker&&0===t.duration&&(t.duration=t.tags[0].duration),t.totalDuration=t.tags[0].duration});this.lockedActionsQueue.length;){var t=this.lockedActionsQueue.shift();t.sound[t.prop].apply?t.sound[t.prop].apply(t.sound,t.value||[]):t.sound[t.prop]=t.value}},this),document.body.addEventListener("touchmove",i,!1),document.body.addEventListener("touchend",s,!1)}},onBlur:function(){this.forEachActiveSound(function(t){t.isPlaying&&(this.onBlurPausedSounds.push(t),t.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(t){t.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){s.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(t,e,i){return"true"===t.tags[0].dataset.locked&&(this.lockedActionsQueue.push({sound:t,prop:e,value:i}),!0)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return this._mute},set:function(t){this._mute=t,this.forEachActiveSound(function(t){t.updateMute()}),this.emit("mute",this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this._volume},set:function(t){this._volume=t,this.forEachActiveSound(function(t){t.updateVolume()}),this.emit("volume",this,t)}}});t.exports=o},function(t,e,i){var s=i(195),n=i(193),r=i(191),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new n(t):!i.webAudio||e&&e.disableWebAudio?new s(t):new r(t)}};t.exports=o},function(t,e,i){var s=i(79),n=i(4),r=i(94),o=i(486),a={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:s.PENDING,key:n(t,"key",""),active:n(t,"active",!1),visible:n(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:n(t,"pack",!1),cameras:n(t,"cameras",null),map:n(t,"map",r(o,n(t,"mapAdd",{}))),physics:n(t,"physics",{}),loader:n(t,"loader",{}),plugins:n(t,"plugins",!1),input:n(t,"input",{})}}};t.exports=a},function(t,e,i){var s=i(0),n=i(118),r=new s({initialize:function(t){this.sys=new n(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.cameras3d,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.impact,this.matter},update:function(){}});t.exports=r},function(t,e,i){var s=i(0),n=i(79),r=i(4),o=i(3),a=i(198),h=i(118),u=new s({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)this._pending.push({key:"default",scene:e[i],autoStart:0===i,data:{}})}t.events.once("ready",this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){var t,e,i,s;for(t=0;t<this._pending.length;t++){var n;i=(e=this._pending[t]).key,(s=e.scene)instanceof a?n=this.createSceneFromInstance(i,s):"object"==typeof s?n=this.createSceneFromObject(i,s):"function"==typeof s&&(n=this.createSceneFromFunction(i,s)),i=n.sys.settings.key,this.keys[i]=n,this.scenes.push(n),this._data[i]&&(n.sys.settings.data=this._data[i].data,this._data[i].autoStart&&(e.autoStart=!0)),(e.autoStart||n.sys.settings.active)&&this._start.push(i)}for(this._pending.length=0,this._data={},this.isBooted=!0,t=0;t<this._start.length;t++)e=this._start[t],this.start(e);this._start.length=0}},processQueue:function(){var t=this._pending.length,e=this._queue.length;if(0!==t||0!==e){var i,s;if(t){for(i=0;i<t;i++)s=this._pending[i],this.add(s.key,s.scene,s.autoStart,s.data);for(i=0;i<this._start.length;i++)s=this._start[i],this.start(s);return this._start.length=0,void(this._pending.length=0)}for(i=0;i<this._queue.length;i++)this[(s=this._queue[i]).op](s.keyA,s.keyB);this._queue.length=0}},add:function(t,e,i,s){return void 0===i&&(i=!1),void 0===s&&(s={}),this.isProcessing||!this.isBooted?(this._pending.push({key:t,scene:e,autoStart:i,data:s}),this.isBooted||(this._data[t]={data:s}),null):(t=this.getKey(t,e),e instanceof a?n=this.createSceneFromInstance(t,e):"object"==typeof e?(e.key=t,n=this.createSceneFromObject(t,e)):"function"==typeof e&&(n=this.createSceneFromFunction(t,e)),n.sys.settings.data=s,t=n.sys.settings.key,this.keys[t]=n,this.scenes.push(n),(i||n.sys.settings.active)&&(this._pending.length?this._start.push(t):this.start(t)),n);var n},remove:function(t){if(this.isProcessing)this._queue.push({op:"remove",keyA:t,keyB:null});else{var e=this.getScene(t);if(!e||e.sys.isTransitioning())return this;var i=this.scenes.indexOf(e),s=e.sys.settings.key;i>-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;t.init&&(t.init.call(t,s.data),s.status=n.INIT,s.isTransition&&i.events.emit("transitioninit",s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(s.status=n.LOADING,e.once("complete",this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var s=this.scenes[i].sys;s.settings.status>n.START&&s.settings.status<=n.RUNNING&&s.step(t,e)}},resize:function(t,e){for(var i=0;i<this.scenes.length;i++){this.scenes[i].sys.resize(t,e)}},render:function(t){for(var e=0;e<this.scenes.length;e++){var i=this.scenes[e].sys;i.settings.visible&&i.settings.status>=n.LOADING&&i.settings.status<n.SLEEPING&&i.render(t)}this.isProcessing=!1},create:function(t){var e=t.sys,i=e.settings;t.create&&(i.status=n.CREATING,t.create.call(t,i.data),i.isTransition&&e.events.emit("transitionstart",i.transitionFrom,i.transitionDuration)),t.update&&(e.sceneUpdate=t.update),i.status=n.RUNNING},createSceneFromFunction:function(t,e){var i=new e;if(i instanceof a){var s=i.sys.settings.key;if(""!==s&&(t=s),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return this.createSceneFromInstance(t,i)}return i.sys=new h(i),i.sys.settings.key=t,i.sys.init(this.game),i},createSceneFromInstance:function(t,e){var i=e.sys.settings.key;return""!==i?t=i:e.sys.settings.key=t,e.sys.init(this.game),e},createSceneFromObject:function(t,e){var i=new a(e),s=i.sys.settings.key;""!==s?t=s:i.sys.settings.key=t,i.sys.init(this.game);for(var n=["init","preload","create","update","render"],o=0;o<n.length;o++){var h=r(e,n[o],null);h&&(i[n[o]]=h)}if(e.hasOwnProperty("extend"))for(var u in e.extend){var l=e.extend[u];"data"===u&&i.hasOwnProperty("data")&&"object"==typeof l?i.data.merge(l):"sys"!==u&&(i[u]=l)}return i},getKey:function(t,e){if(t||(t="default"),"function"==typeof e)return t;if(e instanceof a?t=e.sys.settings.key:"object"==typeof e&&e.hasOwnProperty("key")&&(t=e.key),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return t},getScene:function(t){if("string"==typeof t){if(this.keys[t])return this.keys[t]}else for(var e=0;e<this.scenes.length;e++)if(t===this.scenes[e])return t;return null},isActive:function(t){var e=this.getScene(t);return e?e.sys.isActive():null},isVisible:function(t){var e=this.getScene(t);return e?e.sys.isVisible():null},isSleeping:function(t){var e=this.getScene(t);return e?e.sys.isSleeping():null},pause:function(t,e){var i=this.getScene(t);return i&&i.sys.pause(e),this},resume:function(t,e){var i=this.getScene(t);return i&&i.sys.resume(e),this},sleep:function(t,e){var i=this.getScene(t);return i&&!i.sys.isTransitioning()&&i.sys.sleep(e),this},wake:function(t,e){var i=this.getScene(t);return i&&i.sys.wake(e),this},run:function(t,e){var i=this.getScene(t);if(!i){for(var s=0;s<this._pending.length;s++)if(this._pending[s].key===t){this.queueOp("start",t,e);break}return this}i.sys.isSleeping()?i.sys.wake(e):i.sys.isBooted&&!i.sys.isActive()?i.sys.resume(e):this.start(t,e)},start:function(t,e){if(!this.isBooted)return this._data[t]={autoStart:!0,data:e},this;var i=this.getScene(t);if(i){var s;if(i.sys.start(e),i.sys.load&&(s=i.sys.load),s&&i.sys.settings.hasOwnProperty("pack")&&(s.reset(),s.addPack({payload:i.sys.settings.pack})))return i.sys.settings.status=n.LOADING,s.once("complete",this.payloadComplete,this),s.start(),this;this.bootScene(i)}return this},stop:function(t){var e=this.getScene(t);return e&&!e.sys.isTransitioning()&&e.sys.shutdown(),this},switch:function(t,e){var i=this.getScene(t),s=this.getScene(e);return i&&s&&i!==s&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e<this.scenes.length){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.push(i)}}return this},sendToBack:function(t){if(this.isProcessing)this._queue.push({op:"sendToBack",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e>0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e<this.scenes.length-1){var i=e+1,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}return this},moveAbove:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveAbove",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s){var n=this.getAt(s);this.scenes.splice(s,1),this.scenes.splice(i+1,0,n)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s){var n=this.getAt(s);this.scenes.splice(s,1),0===i?this.scenes.unshift(n):this.scenes.splice(i,0,n)}}return this},queueOp:function(t,e,i){return this._queue.push({op:t,keyA:e,keyB:i}),this},swapPosition:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"swapPosition",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(i!==s&&-1!==i&&-1!==s){var n=this.getAt(i);this.scenes[i]=this.scenes[s],this.scenes[s]=n}}return this},dump:function(){for(var t=[],e=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],i=0;i<this.scenes.length;i++){var s=this.scenes[i].sys,r=!s.settings.visible||s.settings.status!==n.RUNNING&&s.settings.status!==n.PAUSED?"[-] ":"[*] ";r+=s.settings.key+" ("+e[s.settings.status]+")",t.push(r)}console.log(t.join("\n"))},destroy:function(){for(var t=this.scenes.length-1;t>=0;t--){this.scenes[t].sys.destroy()}this.update=o,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var s=i(56);t.exports=function(t,e,i,n){var r;if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(s(t,r),i&&i.call(n,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(s(t,r),i&&i.call(n,a)):e.pop(),o--}return e}},function(t,e,i){var s=i(0),n=i(9),r=i(7),o=i(14),a=i(11),h=i(1),u=i(12),l=i(200),c=new s({Extends:n,initialize:function(t){n.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once("boot",this.boot,this)},boot:function(){var t,e,i,s,n,r,o=this.game.config,a=o.installGlobalPlugins;for(a=a.concat(this._pendingGlobal),t=0;t<a.length;t++)e=a[t],i=h(e,"key",null),s=h(e,"plugin",null),n=h(e,"start",!1),r=h(e,"mapping",null),i&&s&&this.install(i,s,n,r);for(a=(a=o.installScenePlugins).concat(this._pendingScene),t=0;t<a.length;t++)e=a[t],i=h(e,"key",null),s=h(e,"plugin",null),r=h(e,"mapping",null),i&&s&&this.installScenePlugin(i,s,r);this._pendingGlobal=[],this._pendingScene=[],this.game.events.once("destroy",this.destroy,this)},addToScene:function(t,e,i){var s,n,r,o=this.game,a=t.scene,h=t.settings.map,l=t.settings.isBooted;for(s=0;s<e.length;s++)o[n=e[s]]&&(t[n]=o[n],h.hasOwnProperty(n)&&(a[h[n]]=t[n]));for(var c=0;c<i.length;c++)for(r=i[c],s=0;s<r.length;s++)if(n=r[s],u.hasCore(n)){var d=u.getCore(n),f=new d.plugin(a,this);t[d.mapping]=f,d.custom?a[d.mapping]=f:h.hasOwnProperty(d.mapping)&&(a[h[d.mapping]]=f),l&&f.boot()}for(r=this.plugins,s=0;s<r.length;s++){var p=r[s];p.mapping&&(a[p.mapping]=p.plugin)}},getDefaultScenePlugins:function(){var t=this.game.config.defaultPlugins;return t=t.concat(this.scenePlugins)},installScenePlugin:function(t,e,i,s){if("function"==typeof e){if(u.hasCore(t))console.warn("Scene Plugin key in use: "+t);else if(u.register(t,e,i,!0),this.scenePlugins.push(t),s){var n=new e(s,this);s.sys[t]=n,i&&""!==i&&(s[i]=n),n.boot()}}else console.warn("Invalid Scene Plugin: "+t)},install:function(t,e,i,s){if(void 0===i&&(i=!1),void 0===s&&(s=null),"function"==typeof e)if(u.hasCustom(t))console.warn("Plugin key in use: "+t);else if(null!==s&&(i=!0),this.game.isBooted){if(u.registerCustom(t,e,s),i)return this.start(t)}else this._pendingGlobal.push({key:t,plugin:e,start:i,mapping:s});else console.warn("Invalid Plugin: "+t)},getIndex:function(t){for(var e=this.plugins,i=0;i<e.length;i++){if(e[i].key===t)return i}return-1},getEntry:function(t){var e=this.getIndex(t);if(-1!==e)return this.plugins[e]},isActive:function(t){var e=this.getEntry(t);return e&&e.active},start:function(t,e){void 0===e&&(e=t);var i=this.getEntry(e);return i&&!i.active?(i.active=!0,i.plugin.start()):i||(i=this.createEntry(t,e)),i?i.plugin:null},createEntry:function(t,e){var i=u.getCustom(t);if(i){var s=new i.plugin(this);i={key:e,plugin:s,active:!0,mapping:i.mapping},this.plugins.push(i),s.init(),s.start()}return i},stop:function(t){var e=this.getEntry(t);return e&&e.active&&(e.active=!1,e.plugin.stop()),this},get:function(t,e){void 0===e&&(e=!0);var i=this.getEntry(t);if(i)return i.plugin;var s=this.getClass(t);return s&&e?(i=this.createEntry(t,t))?i.plugin:null:s||null},getClass:function(t){return u.getCustomClass(t)},removeGlobalPlugin:function(t){var e=this.getEntry(t);e&&l(this.plugins,e),u.removeCustom(t)},removeScenePlugin:function(t){l(this.scenePlugins,t),u.remove(t)},registerGameObject:function(t,e,i){return e&&a.register(t,e),i&&o.register(t,i),this},registerFileType:function(t,e,i){r.register(t,e),i&&i.sys.load&&(i.sys.load[t]=e)},destroy:function(){for(var t=0;t<this.plugins.length;t++)this.plugins[t].plugin.destroy();this.game=null,this.plugins=[],this.scenePlugins=[]}});t.exports=c},function(t,e,i){var s=new(i(0))({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,t.events.once("boot",this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),this.enabled&&this.startListeners()},onTouchStart:function(t){!t.defaultPrevented&&this.enabled&&(this.manager.queueTouchStart(t),this.capture&&t.preventDefault())},onTouchMove:function(t){!t.defaultPrevented&&this.enabled&&(this.manager.queueTouchMove(t),this.capture&&t.preventDefault())},onTouchEnd:function(t){!t.defaultPrevented&&this.enabled&&(this.manager.queueTouchEnd(t),this.capture&&t.preventDefault())},startListeners:function(){var t=this.target,e={passive:!0},i={passive:!1};this.capture?(t.addEventListener("touchstart",this.onTouchStart.bind(this),i),t.addEventListener("touchmove",this.onTouchMove.bind(this),i),t.addEventListener("touchend",this.onTouchEnd.bind(this),i)):(t.addEventListener("touchstart",this.onTouchStart.bind(this),e),t.addEventListener("touchmove",this.onTouchMove.bind(this),e),t.addEventListener("touchend",this.onTouchEnd.bind(this),e))},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd)},destroy:function(){this.stopListeners(),this.target=null,this.manager=null}});t.exports=s},function(t,e,i){var s=i(0),n=i(251),r=i(6),o=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.camera=null,this.buttons=0,this.position=new r,this.prevPosition=new r,this.worldX=0,this.worldY=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.dragState=0,this.isDown=!1,this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.wasTouch=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},reset:function(){this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.movementX=0,this.movementY=0},up:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e),this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!1},down:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e),this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!1},move:function(t){t.buttons&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY),this.manager.mouse.locked&&(this.movementX+=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY+=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.justMoved=!0,this.dirty=!0,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e,this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!0},touchmove:function(t){this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY),this.justMoved=!0,this.dirty=!0,this.wasTouch=!0},touchend:function(t,e){this.buttons=0,this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e,this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return 1&this.buttons},rightButtonDown:function(){return 2&this.buttons},middleButtonDown:function(){return 4&this.buttons},backButtonDown:function(){return 8&this.buttons},forwardButtonDown:function(){return 16&this.buttons},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,s=this.prevPosition.y,r=this.position.x,o=this.position.y,a=0;a<t;a++){var h=1/t*a;e[a]={x:n(h,i,r),y:n(h,s,o)}}return e},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}}});t.exports=o},function(t,e,i){var s=i(0),n=i(120),r=new s({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,t.events.once("boot",this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(n.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},pointerLockChange:function(t){var e=this.target;this.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,this.manager.queue.push(t)},releasePointerLock:function(){n.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},onMouseMove:function(t){!t.defaultPrevented&&this.enabled&&(this.manager.queueMouseMove(t),this.capture&&t.preventDefault())},onMouseDown:function(t){!t.defaultPrevented&&this.enabled&&(this.manager.queueMouseDown(t),this.capture&&t.preventDefault())},onMouseUp:function(t){!t.defaultPrevented&&this.enabled&&(this.manager.queueMouseUp(t),this.capture&&t.preventDefault())},startListeners:function(){var t=this.target,e={passive:!0},i={passive:!1};this.capture?(t.addEventListener("mousemove",this.onMouseMove.bind(this),i),t.addEventListener("mousedown",this.onMouseDown.bind(this),i),t.addEventListener("mouseup",this.onMouseUp.bind(this),i)):(t.addEventListener("mousemove",this.onMouseMove.bind(this),e),t.addEventListener("mousedown",this.onMouseDown.bind(this),e),t.addEventListener("mouseup",this.onMouseUp.bind(this),e)),n.pointerLock&&(this.pointerLockChange=this.pointerLockChange.bind(this),document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),n.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.manager=null}});t.exports=r},function(t,e){t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6}},function(t,e,i){var s=i(0),n=i(205),r=i(9),o=i(204),a=i(203),h=i(13),u=i(202),l=i(32),c=i(250),d=new s({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.queue=[],this.domCallbacks={up:[],down:[],move:[],upOnce:[],downOnce:[],moveOnce:[]},this._hasUpCallback=!1,this._hasDownCallback=!1,this._hasMoveCallback=!1,this._customCursor="",this._setCursor=0,this.defaultCursor="",this.mouse=e.inputMouse?new o(this):null,this.touch=e.inputTouch?new u(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++)this.pointers.push(new a(this,i));this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.dirty=!1,this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new h,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new l,t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.events.emit("boot"),this.game.events.on("prestep",this.update,this),this.game.events.on("poststep",this.postUpdate,this),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.bounds,e=this.canvas.getBoundingClientRect();t.x=e.left+window.pageXOffset-document.documentElement.clientLeft,t.y=e.top+window.pageYOffset-document.documentElement.clientTop,t.width=e.width,t.height=e.height},resize:function(){this.updateBounds();var t=this.game.config.width,e=this.game.config.height,i=this.bounds.width,s=this.bounds.height;this.scale.x=t/i,this.scale.y=e/s},update:function(t){var e;this._setCursor=0,this.events.emit("update"),this.ignoreEvents=!1,this.dirty=!1;var i=this.queue.length,s=this.pointers;for(e=0;e<this.pointersTotal;e++)s[e].reset();if(this.enabled&&0!==i){this.dirty=!0,this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;var r=this.queue.splice(0,i),o=this.mousePointer;for(e=0;e<i;e+=2){var a=r[e],h=r[e+1];switch(a){case n.MOUSE_DOWN:o.down(h,t);break;case n.MOUSE_MOVE:o.move(h,t);break;case n.MOUSE_UP:o.up(h,t);break;case n.TOUCH_START:this.startPointer(h,t);break;case n.TOUCH_MOVE:this.updatePointer(h,t);break;case n.TOUCH_END:this.stopPointer(h,t);break;case n.POINTER_LOCK_CHANGE:this.events.emit("pointerlockchange",h,this.mouse.locked)}}}},postUpdate:function(){1===this._setCursor?this.canvas.style.cursor=this._customCursor:2===this._setCursor&&(this.canvas.style.cursor=this.defaultCursor)},setDefaultCursor:function(t){this.defaultCursor=t,this.canvas.style.cursor!==t&&(this.canvas.style.cursor=t)},setCursor:function(t){t.cursor&&(this._setCursor=1,this._customCursor=t.cursor)},resetCursor:function(t){t.cursor&&(this._setCursor=2)},startPointer:function(t,e){for(var i=this.pointers,s=0;s<t.changedTouches.length;s++)for(var n=t.changedTouches[s],r=1;r<this.pointersTotal;r++){var o=i[r];if(!o.active){o.touchstart(n,e),this.activePointer=o;break}}},updatePointer:function(t,e){for(var i=this.pointers,s=0;s<t.changedTouches.length;s++)for(var n=t.changedTouches[s],r=1;r<this.pointersTotal;r++){var o=i[r];if(o.active&&o.identifier===n.identifier){o.touchmove(n,e),this.activePointer=o;break}}},stopPointer:function(t,e){for(var i=this.pointers,s=0;s<t.changedTouches.length;s++)for(var n=t.changedTouches[s],r=1;r<this.pointersTotal;r++){var o=i[r];if(o.active&&o.identifier===n.identifier){o.touchend(n,e);break}}},addPointer:function(t){void 0===t&&(t=1);var e=[];this.pointersTotal+t>10&&(t=10-this.pointersTotal);for(var i=0;i<t;i++){var s=this.pointers.length,n=new a(this,s);this.pointers.push(n),this.pointersTotal++,e.push(n)}return e},processDomCallbacks:function(t,e,i){var s=0;for(s=0;s<t.length;s++)t[s](i);for(s=0;s<e.length;s++)e[s](i);return t=[],e.length>0},queueTouchStart:function(t){if(this.queue.push(n.TOUCH_START,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueTouchMove:function(t){if(this.queue.push(n.TOUCH_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueTouchEnd:function(t){if(this.queue.push(n.TOUCH_END,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},queueMouseDown:function(t){if(this.queue.push(n.MOUSE_DOWN,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueMouseMove:function(t){if(this.queue.push(n.MOUSE_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueMouseUp:function(t){if(this.queue.push(n.MOUSE_UP,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},addUpCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.upOnce.push(t):this.domCallbacks.up.push(t),this._hasUpCallback=!0,this},addDownCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.downOnce.push(t):this.domCallbacks.down.push(t),this._hasDownCallback=!0,this},addMoveCallback:function(t,e){return void 0===e&&(e=!1),e?this.domCallbacks.moveOnce.push(t):this.domCallbacks.move.push(t),this._hasMoveCallback=!0,this},inputCandidate:function(t){var e=t.input;if(!e||!e.enabled||!t.willRender())return!1;var i=!0,s=t.parentContainer;if(s)do{if(!s.visible){i=!1;break}s=s.parentContainer}while(s);return i},hitTest:function(t,e,i,s){void 0===s&&(s=this._tempHitTest);var n=this._tempPoint,r=i.width,o=i.height;s.length=0;var a=t.x,h=t.y;if(!(a>=i.x&&h>=i.y&&a<=i.x+r&&h<=i.y+o))return s;i.getWorldPoint(a,h,n),t.worldX=n.x,t.worldY=n.y;for(var u={x:0,y:0},l=this.game.config.resolution,d=this._tempMatrix,f=0;f<e.length;f++){var p=e[f];if(this.inputCandidate(p)){var g=n.x*l+i.scrollX*p.scrollFactorX-i.scrollX,m=n.y*l+i.scrollY*p.scrollFactorY-i.scrollY;p.parentContainer?(p.getWorldTransformMatrix(d),c(g,m,d.tx,d.ty,d.rotation,d.scaleX,d.scaleY,u)):c(g,m,p.x,p.y,p.rotation,p.scaleX,p.scaleY,u),this.pointWithinHitArea(p,u.x,u.y)&&s.push(p)}}return s},pointWithinHitArea:function(t,e,i){e+=t.displayOriginX,i+=t.displayOriginY;var s=t.input;return!(!s||!s.hitAreaCallback(s.hitArea,e,i,t))&&(s.localX=e,s.localY=i,!0)},pointWithinInteractiveObject:function(t,e,i){return!!t.hitArea&&(e+=t.gameObject.displayOriginX,i+=t.gameObject.displayOriginY,t.localX=e,t.localY=i,t.hitAreaCallback(t.hitArea,e,i,t))},transformPointer:function(t,e,i){t.prevPosition.x=t.x,t.prevPosition.y=t.y,t.x=(e-this.bounds.left)*this.scale.x,t.y=(i-this.bounds.top)*this.scale.y},transformX:function(t){return(t-this.bounds.left)*this.scale.x},transformY:function(t){return(t-this.bounds.top)*this.scale.y},getOffsetX:function(){return this.bounds.left},getOffsetY:function(){return this.bounds.top},getScaleX:function(){return this.game.config.width/this.bounds.width},getScaleY:function(){return this.game.config.height/this.bounds.height},destroy:function(){this.events.removeAllListeners(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var t=0;t<this.pointers.length;t++)this.pointers[t].destroy();this.domCallbacks={},this.pointers=[],this.queue=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});t.exports=d},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),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},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var s=this.modelMatrix;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var s=this.modelMatrix;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),s=Math.cos(t),n=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=n*s+h*i,e[5]=r*s+u*i,e[6]=o*s+l*i,e[7]=a*s+c*i,e[8]=h*s-n*i,e[9]=u*s-r*i,e[10]=l*s-o*i,e[11]=c*s-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=n*s-h*i,e[1]=r*s-u*i,e[2]=o*s-l*i,e[3]=a*s-c*i,e[8]=n*i+h*s,e[9]=r*i+u*s,e[10]=o*i+l*s,e[11]=a*i+c*s,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=n*s+h*i,e[1]=r*s+u*i,e[2]=o*s+l*i,e[3]=a*s+c*i,e[4]=h*s-n*i,e[5]=u*s-r*i,e[6]=l*s-o*i,e[7]=c*s-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var s=this.viewMatrix;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var s=this.viewMatrix;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),s=Math.cos(t),n=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=n*s+h*i,e[5]=r*s+u*i,e[6]=o*s+l*i,e[7]=a*s+c*i,e[8]=h*s-n*i,e[9]=u*s-r*i,e[10]=l*s-o*i,e[11]=c*s-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=n*s-h*i,e[1]=r*s-u*i,e[2]=o*s-l*i,e[3]=a*s-c*i,e[8]=n*i+h*s,e[9]=r*i+u*s,e[10]=o*i+l*s,e[11]=a*i+c*s,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=n*s+h*i,e[1]=r*s+u*i,e[2]=o*s+l*i,e[3]=a*s+c*i,e[4]=h*s-n*i,e[5]=u*s-r*i,e[6]=l*s-o*i,e[7]=c*s-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,s,n,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-s),u=1/(n-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*u,o[11]=0,o[12]=(t+e)*a,o[13]=(s+i)*h,o[14]=(r+n)*u,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,s){var n=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-s);return n[0]=r/e,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=r,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=(s+i)*o,n[11]=-1,n[12]=0,n[13]=0,n[14]=2*s*i*o,n[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var s,n,r,o=i(24),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+n},r.src=s+"AP804Oa6"+n,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){t.exports={Fade:i(569),Flash:i(568),Pan:i(567),Shake:i(534),Zoom:i(533)}},function(t,e,i){var s=i(211),n=new(i(0))({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.text=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e<t.length;e++)this[t[e]].destroy(),this[t[e]]=null;for(var i in this.custom)this.custom[i].destroy();this.custom=null,this.game=null}});t.exports=n},function(t,e,i){var s=i(0),n=i(125),r=i(9),o=new s({initialize:function(){this.entries=new n,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var s=i(215),n=i(0),r=i(125),o=i(9),a=i(4),h=i(134),u=new n({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new s(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var s=0;s<t.anims.length;s++)i.push(this.create(t.anims[s]));t.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=t.globalTimeScale)}else t.hasOwnProperty("key")&&"frame"===t.type&&i.push(this.create(t));return i},generateFrameNames:function(t,e){var i=a(e,"prefix",""),s=a(e,"start",0),n=a(e,"end",0),r=a(e,"suffix",""),o=a(e,"zeroPad",0),u=a(e,"outputArray",[]),l=a(e,"frames",!1),c=this.textureManager.get(t);if(!c)return u;var d,f,p=s<n?1:-1;if(n+=p,e)if(Array.isArray(l))for(d=0;d<l.length;d++)f=i+h(l[d],o,"0",1)+r,c.has(f)&&u.push({key:t,frame:f});else for(d=s;d!==n;d+=p)f=i+h(d,o,"0",1)+r,c.has(f)&&u.push({key:t,frame:f});else for(l=c.getFrameNames(),d=0;d<l.length;d++)u.push({key:t,frame:l[d]});return u},generateFrameNumbers:function(t,e){var i,s=a(e,"start",0),n=a(e,"end",-1),r=a(e,"first",!1),o=a(e,"outputArray",[]),h=a(e,"frames",!1),u=this.textureManager.get(t);if(!u)return o;if(r&&u.has(r)&&o.push({key:t,frame:r}),Array.isArray(h))for(i=0;i<h.length;i++)u.has(h[i])&&o.push({key:t,frame:h[i]});else for(-1===n&&(n=u.frameTotal),i=s;i<=n;i++)u.has(i)&&o.push({key:t,frame:i});return o},get:function(t){return this.anims.get(t)},load:function(t,e,i){var s=this.get(e);return s&&s.load(t,i),t},pauseAll:function(){return this.paused||(this.paused=!0,this.emit("pauseall")),this},play:function(t,e){if(Array.isArray(e)||(e=[e]),this.get(t)){for(var i=0;i<e.length;i++)e[i].anims.play(t);return this}},remove:function(t){var e=this.get(t);return e&&(this.emit("remove",t,e),this.anims.delete(t)),e},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit("resumeall")),this},staggerPlay:function(t,e,i){if(void 0===i&&(i=0),Array.isArray(e)||(e=[e]),this.get(t)){for(var s=0;s<e.length;s++)e[s].anims.delayedPlay(i*s,t);return this}},toJSON:function(t){if(void 0!==t&&""!==t)return this.anims.get(t).toJSON();var e={anims:[],globalTimeScale:this.globalTimeScale};return this.anims.each(function(t,i){e.anims.push(i.toJSON())}),e},destroy:function(){this.anims.clear(),this.textureManager=null,this.game=null}});t.exports=u},function(t,e,i){var s=new(i(0))({initialize:function(t,e,i,s){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=s},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,n,r=1;if(i){if(t<e[0][i])return e[0];for(;e[r][i]<t;)r++}else for(;e[r]<t;)r++;return r>e.length&&(r=e.length),i?(s=e[r-1][i],(n=e[r][i])-t<=t-s?e[r]:e[r-1]):(s=e[r-1],(n=e[r])-t<=t-s?n:s)}},function(t,e,i){var s=i(19),n=i(0),r=i(214),o=i(213),a=i(4),h=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,a(i,"frames",[]),a(i,"defaultTextureKey",null)),this.frameRate=a(i,"frameRate",null),this.duration=a(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=a(i,"skipMissedFrames",!0),this.delay=a(i,"delay",0),this.repeat=a(i,"repeat",0),this.repeatDelay=a(i,"repeatDelay",0),this.yoyo=a(i,"yoyo",!1),this.showOnStart=a(i,"showOnStart",!1),this.hideOnComplete=a(i,"hideOnComplete",!1),this.paused=!1,this.manager.on("pauseall",this.pause,this),this.manager.on("resumeall",this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var s=this.frames.slice(0,t),n=this.frames.slice(t);this.frames=s.concat(i,n)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t<this.frames.length},completeAnimation:function(t){this.hideOnComplete&&(t.parent.visible=!1),t.stop()},getFirstTick:function(t,e){void 0===e&&(e=!0),t.accumulator=0,t.nextTick=t.msPerFrame+t.currentFrame.duration,e&&(t.nextTick+=t._delay)},getFrameAt:function(t){return this.frames[t]},getFrames:function(t,e,i){var s,n,r,h,u=[],l=1;if("string"==typeof e){h=e;var c=t.get(h).getFrameNames();e=[],c.forEach(function(t,i){e.push({key:h,frame:i})})}if(!Array.isArray(e)||0===e.length)return u;for(r=0;r<e.length;r++){var d=e[r],f=a(d,"key",i);if(f){var p=a(d,"frame",0),g=t.getFrame(f,p);(n=new o(f,p,l,g)).duration=a(d,"duration",0),n.isFirst=!s,s&&(s.nextFrame=n,n.prevFrame=s),u.push(n),s=n,l++}}if(u.length>0){n.isLast=!0,n.nextFrame=u[0],u[0].prevFrame=n;var m=1/(u.length-1);for(r=0;r<u.length;r++)u[r].progress=r*m}return u},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.msPerFrame+t.currentFrame.duration},load:function(t,e){e>=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._timeScale=1,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo),t.updateFrame(this.frames[e])},getFrameByProgress:function(t){return t=s(t,0,1),r(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),t.isPlaying&&(this.getNextTick(t),t.pendingRepeat=!1,t.parent.emit("animationrepeat",this,t.currentFrame,t.repeatCounter)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={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(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i<t;i++){var s=this.frames[i];s.index=i+1,s.isFirst=!1,s.isLast=!1,s.progress=i*e,0===i?(s.isFirst=!0,s.isLast=1===t,s.prevFrame=this.frames[t-1],s.nextFrame=this.frames[i+1]):i===t-1?(s.isLast=!0,s.prevFrame=this.frames[t-2],s.nextFrame=this.frames[0]):t>1&&(s.prevFrame=this.frames[i-1],s.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off("pauseall",this.pause,this),this.manager.off("resumeall",this.resume,this),this.manager.remove(this.key);for(var t=0;t<this.frames.length;t++)this.frames[t].destroy();this.frames=[],this.manager=null}});t.exports=h},function(t,e,i){var s=i(40);t.exports=function(t){return s(t,-180,180)}},function(t,e,i){var s=i(40);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},function(t,e,i){var s=new(i(0))({initialize:function(t,e){this.geometryMask=e},setShape:function(t){this.geometryMask=t},preRenderWebGL:function(t,e,i){var s=t.gl,n=this.geometryMask;t.flush(),s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),s.colorMask(!1,!1,!1,!1),s.stencilFunc(s.NOTEQUAL,1,1),s.stencilOp(s.REPLACE,s.REPLACE,s.REPLACE),n.renderWebGL(t,n,0,i),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilFunc(s.EQUAL,1,1),s.stencilOp(s.KEEP,s.KEEP,s.KEEP)},postRenderWebGL:function(t){var e=t.gl;t.flush(),e.disable(e.STENCIL_TEST)},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,0,i,void 0,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},function(t,e,i){var s=new(i(0))({initialize:function(t,e){var i=t.sys.game.renderer;if(this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,i&&i.gl){var s=i.width,n=i.height,r=0==(s&s-1)&&0==(n&n-1),o=i.gl,a=r?o.REPEAT:o.CLAMP_TO_EDGE,h=o.LINEAR;this.mainTexture=i.createTexture2D(0,h,h,a,a,o.RGBA,null,s,n),this.maskTexture=i.createTexture2D(0,h,h,a,a,o.RGBA,null,s,n),this.mainFramebuffer=i.createFramebuffer(s,n,this.mainTexture,!1),this.maskFramebuffer=i.createFramebuffer(s,n,this.maskTexture,!1),i.onContextRestored(function(t){var e=t.width,i=t.height,s=0==(e&e-1)&&0==(i&i-1),n=t.gl,r=s?n.REPEAT:n.CLAMP_TO_EDGE,o=n.LINEAR;this.mainTexture=t.createTexture2D(0,o,o,r,r,n.RGBA,null,e,i),this.maskTexture=t.createTexture2D(0,o,o,r,r,n.RGBA,null,e,i),this.mainFramebuffer=t.createFramebuffer(e,i,this.mainTexture,!1),this.maskFramebuffer=t.createFramebuffer(e,i,this.maskTexture,!1)},this)}},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BitmapMaskPipeline.beginMask(this,e,i)},postRenderWebGL:function(t){t.pipelines.BitmapMaskPipeline.endMask(this)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null;var t=this.renderer;t&&t.gl&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer)),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null,this.renderer=null}});t.exports=s},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},,,,,,,function(t,e,i){var s=i(185);function n(t){if(!(this instanceof n))return new n(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var s=0;s<e.length;s++)if(i(t,e[s]))return s;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,s,n){n||(n=g(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var r,o=e;o<i;o++)r=t.children[o],h(n,t.leaf?s(r):r);return n}function h(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function u(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function f(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(t,e,i,n,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=n||(o=e+Math.ceil((i-e)/n/2)*n,s(t,o,e,i,r),a.push(e,o,o,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!p(t,e))return i;for(var n,r,o,a,h=[];e;){for(n=0,r=e.children.length;n<r;n++)o=e.children[n],p(t,a=e.leaf?s(o):o)&&(e.leaf?i.push(o):f(t,a)?this._all(o,i):h.push(o));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!p(t,e))return!1;for(var s,n,r,o,a=[];e;){for(s=0,n=e.children.length;s<n;s++)if(r=e.children[s],p(t,o=e.leaf?i(r):r)){if(e.leaf||f(t,o))return!0;a.push(r)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}var s=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===s.height)this._splitRoot(this.data,s);else{if(this.data.height<s.height){var n=this.data;this.data=s,s=n}this._insert(s,this.data.height-s.height-1,!0)}else this.data=s;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=g([]),this},remove:function(t,e){if(!t)return this;for(var i,s,n,o,a=this.data,h=this.toBBox(t),u=[],l=[];a||u.length;){if(a||(a=u.pop(),s=u[u.length-1],i=l.pop(),o=!0),a.leaf&&-1!==(n=r(t,a.children,e)))return a.children.splice(n,1),u.push(a),this._condense(u),this;o||a.leaf||!f(a,h)?s?(i++,a=s.children[i],o=!1):a=null:(u.push(a),l.push(i),i=0,s=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:u,compareMinY:l,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},_build:function(t,e,i,s){var n,r=i-e+1,a=this._maxEntries;if(r<=a)return o(n=g(t.slice(e,i+1)),this.toBBox),n;s||(s=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,s-1))),(n=g([])).leaf=!1,n.height=s;var h,u,l,c,d=Math.ceil(r/a),f=d*Math.ceil(Math.sqrt(a));for(m(t,e,i,f,this.compareMinX),h=e;h<=i;h+=f)for(m(t,h,l=Math.min(h+f-1,i),d,this.compareMinY),u=h;u<=l;u+=d)c=Math.min(u+d-1,l),n.children.push(this._build(t,u,c,s-1));return o(n,this.toBBox),n},_chooseSubtree:function(t,e,i,s){for(var n,r,o,a,h,u,l,d,f,p;s.push(e),!e.leaf&&s.length-1!==i;){for(l=d=1/0,n=0,r=e.children.length;n<r;n++)h=c(o=e.children[n]),f=t,p=o,(u=(Math.max(p.maxX,f.maxX)-Math.min(p.minX,f.minX))*(Math.max(p.maxY,f.maxY)-Math.min(p.minY,f.minY))-h)<d?(d=u,l=h<l?h:l,a=o):u===d&&h<l&&(l=h,a=o);e=a||e.children[0]}return e},_insert:function(t,e,i){var s=this.toBBox,n=i?t:s(t),r=[],o=this._chooseSubtree(n,this.data,e,r);for(o.children.push(t),h(o,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);var r=this._chooseSplitIndex(i,n,s),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var s,n,r,o,h,u,l,d,f,p,g,m,v,y;for(u=l=1/0,s=e;s<=i-e;s++)n=a(t,0,s,this.toBBox),r=a(t,s,i,this.toBBox),f=n,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),m=Math.max(f.minY,p.minY),v=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,v-g)*Math.max(0,y-m),h=c(n)+c(r),o<u?(u=o,d=s,l=h<l?h:l):o===u&&h<l&&(l=h,d=s);return d},_chooseSplitAxis:function(t,e,i){var s=t.leaf?this.compareMinX:u,n=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,s)<this._allDistMargin(t,e,i,n)&&t.children.sort(s)},_allDistMargin:function(t,e,i,s){t.children.sort(s);var n,r,o=this.toBBox,u=a(t,0,e,o),l=a(t,i-e,i,o),c=d(u)+d(l);for(n=e;n<i-e;n++)r=t.children[n],h(u,t.leaf?o(r):r),c+=d(u);for(n=i-e-1;n>=e;n--)r=t.children[n],h(l,t.leaf?o(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=n},function(t,e,i){var s=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;t<i.length;t++){e=i[t];var n=s.indexOf(e);-1!==n&&s.splice(n,1)}for(i.length=0,i=this._pending,t=0;t<i.length;t++)e=i[t],this._active.push(e);return i.length=0,this._toProcess=0,this._active},getActive:function(){return this._active},destroy:function(){this._pending=[],this._active=[],this._destroy=[]}});t.exports=s},function(t,e,i){var s=i(0),n=i(18),r=i(20),o=i(7),a=i(1),h=i(8),u=new s({Extends:r,initialize:function(t,e,i,s){var n="txt";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var u={type:"text",cache:t.cacheManager.text,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},,function(t,e,i){var s=i(70),n=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),u=s(o),l=s(a),c=s(h),d=u+l+c;e||(e=d/i);for(var f=0;f<e;f++){var p=d*(f/e),g=0,m=new n;p<u?(g=p/u,m.x=o.x1+(o.x2-o.x1)*g,m.y=o.y1+(o.y2-o.y1)*g):p>u+l?(g=(p-=u+l)/c,m.x=h.x1+(h.x2-h.x1)*g,m.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,m.x=a.x1+(a.x2-a.x1)*g,m.y=a.y1+(a.y2-a.y1)*g),r.push(m)}return r}},function(t,e,i){var s=i(5),n=i(70);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=n(r),u=n(o),l=n(a),c=(h+u+l)*e,d=0;return c<h?(d=c/h,i.x=r.x1+(r.x2-r.x1)*d,i.y=r.y1+(r.y2-r.y1)*d):c>h+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},,,,,,,,,,function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){var s=i(114);s.Area=i(443),s.Circumference=i(182),s.CircumferencePoint=i(113),s.Clone=i(442),s.Contains=i(55),s.ContainsPoint=i(441),s.ContainsRect=i(440),s.CopyFrom=i(439),s.Equals=i(438),s.GetBounds=i(437),s.GetPoint=i(184),s.GetPoints=i(183),s.Offset=i(436),s.OffsetPoint=i(435),s.Random=i(135),t.exports=s},,,,function(t,e,i){var s=i(4),n=i(95),r=function(t,e,i){for(var s=[],n=0;n<t.length;n++)for(var r=0;r<e.length;r++)for(var o=0;o<i;o++)s.push({a:t[n],b:e[r]});return s};t.exports=function(t,e,i){var o=s(i,"max",0),a=s(i,"qty",1),h=s(i,"random",!1),u=s(i,"randomB",!1),l=s(i,"repeat",0),c=s(i,"yoyo",!1),d=[];if(u&&n(e),-1===l)if(0===o)l=0;else{var f=t.length*e.length*a;c&&(f*=2),l=Math.ceil(o/f)}for(var p=0;p<=l;p++){var g=r(t,e,a);h&&n(g),d=d.concat(g),c&&(g.reverse(),d=d.concat(g))}return o&&d.splice(o),d}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var s=i(6);t.exports=function(t,e,i,n,r,o,a,h){void 0===h&&(h=new s);var u=Math.sin(-r),l=Math.cos(-r),c=l*o,d=-u*o,f=u*a,p=l*a,g=c*p-d*f,m=p/g,v=-d/g,y=-f/g,x=c/g,w=(f*n-p*i)/g,T=-(c*n-d*i)/g;return h.x=t*m+e*y+w,h.y=t*v+e*x+T,h}},function(t,e,i){var s=i(157);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},function(t,e,i){"use strict";function s(t,e,i){i=i||2;var s,a,h,u,l,f,g,m=e&&e.length,v=m?e[0]*i:t.length,y=n(t,0,v,i,!0),x=[];if(!y)return x;if(m&&(y=function(t,e,i,s){var o,a,h,u,l,f=[];for(o=0,a=e.length;o<a;o++)h=e[o]*s,u=o<a-1?e[o+1]*s:t.length,(l=n(t,h,u,s,!1))===l.next&&(l.steiner=!0),f.push(p(l));for(f.sort(c),o=0;o<f.length;o++)d(f[o],i),i=r(i,i.next);return i}(t,e,y,i)),t.length>80*i){s=h=t[0],a=u=t[1];for(var w=i;w<v;w+=i)l=t[w],f=t[w+1],l<s&&(s=l),f<a&&(a=f),l>h&&(h=l),f>u&&(u=f);g=Math.max(h-s,u-a)}return o(y,x,i,s,a,g),x}function n(t,e,i,s,n){var r,o;if(n===A(t,e,i,s)>0)for(r=e;r<i;r+=s)o=b(r,t[r],t[r+1],o);else for(r=i-s;r>=e;r-=s)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!y(s,s.next)&&0!==v(s.prev,s,s.next))s=s.next;else{if(S(s),(s=e=s.prev)===s.next)return null;i=!0}}while(i||s!==e);return e}function o(t,e,i,s,n,c,d){if(t){!d&&c&&function(t,e,i,s){var n=t;do{null===n.z&&(n.z=f(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,s,n,r,o,a,h,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,s=i,a=0,e=0;e<u&&(a++,s=s.nextZ);e++);for(h=u;a>0||h>0&&s;)0!==a&&(0===h||!s||i.z<=s.z)?(n=i,i=i.nextZ,a--):(n=s,s=s.nextZ,h--),r?r.nextZ=n:t=n,n.prevZ=r,r=n;i=s}r.nextZ=null,u*=2}while(o>1)}(n)}(t,s,n,c);for(var p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,s,n,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,m=g.next;else if((t=g)===m){d?1===d?o(t=u(t,e,i),e,i,s,n,c,2):2===d&&l(t,e,i,s,n,c):o(r(t),e,i,s,n,c,1);break}}}function a(t){var e=t.prev,i=t,s=t.next;if(v(e,i,s)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(g(e.x,e.y,i.x,i.y,s.x,s.y,n.x,n.y)&&v(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function h(t,e,i,s){var n=t.prev,r=t,o=t.next;if(v(n,r,o)>=0)return!1;for(var a=n.x<r.x?n.x<o.x?n.x:o.x:r.x<o.x?r.x:o.x,h=n.y<r.y?n.y<o.y?n.y:o.y:r.y<o.y?r.y:o.y,u=n.x>r.x?n.x>o.x?n.x:o.x:r.x>o.x?r.x:o.x,l=n.y>r.y?n.y>o.y?n.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,s),d=f(u,l,e,i,s),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(n.x,n.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(n.x,n.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var s=t;do{var n=s.prev,r=s.next.next;!y(n,r)&&x(n,s,s.next,r)&&w(n,r)&&w(r,n)&&(e.push(n.i/i),e.push(s.i/i),e.push(r.i/i),S(s),S(s.next),s=t=r),s=s.next}while(s!==t);return s}function l(t,e,i,s,n,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&m(h,u)){var l=T(h,u);return h=r(h,h.next),l=r(l,l.next),o(h,e,i,s,n,a),void o(l,e,i,s,n,a)}u=u.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,s=e,n=t.x,r=t.y,o=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var a=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(a<=n&&a>o){if(o=a,a===n){if(r===s.y)return s;if(r===s.next.y)return s.next}i=s.x<s.next.x?s:s.next}}s=s.next}while(s!==e);if(!i)return null;if(n===o)return i.prev;var h,u=i,l=i.x,c=i.y,d=1/0;s=i.next;for(;s!==u;)n>=s.x&&s.x>=l&&n!==s.x&&g(r<c?n:o,r,l,c,r<c?o:n,r,s.x,s.y)&&((h=Math.abs(r-s.y)/(n-s.x))<d||h===d&&s.x>i.x)&&w(s,t)&&(i=s,d=h),s=s.next;return i}(t,e)){var i=T(e,t);r(i,i.next)}}function f(t,e,i,s,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-s)/n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x<i.x&&(i=e),e=e.next}while(e!==t);return i}function g(t,e,i,s,n,r,o,a){return(n-o)*(e-a)-(t-o)*(r-a)>=0&&(t-o)*(s-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(n-o)*(s-a)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,s){return!!(y(t,e)&&y(i,s)||y(t,s)&&y(i,e))||v(t,e,i)>0!=v(t,e,s)>0&&v(i,s,t)>0!=v(i,s,e)>0}function w(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function T(t,e){var i=new _(t.i,t.x,t.y),s=new _(e.i,e.x,e.y),n=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,r.next=s,s.prev=r,s}function b(t,e,i,s){var n=new _(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function _(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,s){for(var n=0,r=e,o=i-s;r<i;r+=s)n+=(t[o]-t[r])*(t[r+1]+t[o+1]),o=r;return n}t.exports=s,s.deviation=function(t,e,i,s){var n=e&&e.length,r=n?e[0]*i:t.length,o=Math.abs(A(t,0,r,i));if(n)for(var a=0,h=e.length;a<h;a++){var u=e[a]*i,l=a<h-1?e[a+1]*i:t.length;o-=Math.abs(A(t,u,l,i))}var c=0;for(a=0;a<s.length;a+=3){var d=s[a]*i,f=s[a+1]*i,p=s[a+2]*i;c+=Math.abs((t[d]-t[p])*(t[f+1]-t[d+1])-(t[d]-t[f])*(t[p+1]-t[d+1]))}return 0===o&&0===c?0:Math.abs((c-o)/o)},s.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},s=0,n=0;n<t.length;n++){for(var r=0;r<t[n].length;r++)for(var o=0;o<e;o++)i.vertices.push(t[n][r][o]);n>0&&(s+=t[n-1].length,i.holes.push(s))}return i}},function(t,e,i){var s=i(0),n=i(119),r=i(252),o=i(207),a=i(499),h=i(498),u=i(21),l=i(84),c=function(t,e,i,s,n){this.x=t,this.y=e,this.width=i,this.rgb=s,this.alpha=n},d=function(t,e,i,s,n){this.points=[],this.pointsLength=1,this.points[0]=new c(t,e,i,s,n)},f=new Float32Array([1,0,0,1,0,0]),p=new Float32Array(6e3),g=0,m=[],v=new s({Extends:l,Mixins:[o],initialize:function(t){l.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:h,fragShader:t.fragShader?t.fragShader:a,vertexCapacity:t.vertexCapcity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:2*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.tempTriangle=[{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1}],this.polygonCache=[],this.mvpInit()},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return l.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},batchFillRect:function(t,e,i,s,n,r,o,a,h,l,c,d,f,p,g,m,v,y){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var x=this.vertexViewF32,w=this.vertexViewU32,T=this.vertexCount*this.vertexComponentCount,b=r+a,S=o+h,_=y[0],A=y[1],E=y[2],C=y[3],M=d*_+f*E,P=d*A+f*C,k=p*_+g*E,R=p*A+g*C,L=m*_+v*E+y[4],O=m*A+v*C+y[5],F=r*M+o*k+L,D=r*P+o*R+O,I=r*M+S*k+L,B=r*P+S*R+O,U=b*M+S*k+L,N=b*P+S*R+O,Y=b*M+o*k+L,z=b*P+o*R+O,X=u.getTintAppendFloatAlphaAndSwap(l,c);x[T+0]=F,x[T+1]=D,w[T+2]=X,x[T+3]=I,x[T+4]=B,w[T+5]=X,x[T+6]=U,x[T+7]=N,w[T+8]=X,x[T+9]=F,x[T+10]=D,w[T+11]=X,x[T+12]=U,x[T+13]=N,w[T+14]=X,x[T+15]=Y,x[T+16]=z,w[T+17]=X,this.vertexCount+=6},batchFillTriangle:function(t,e,i,s,n,r,o,a,h,l,c,d,f,p,g,m,v,y,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var T=this.vertexViewF32,b=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,_=w[0],A=w[1],E=w[2],C=w[3],M=p*_+g*E,P=p*A+g*C,k=m*_+v*E,R=m*A+v*C,L=y*_+x*E+w[4],O=y*A+x*C+w[5],F=r*M+o*k+L,D=r*P+o*R+O,I=a*M+h*k+L,B=a*P+h*R+O,U=l*M+c*k+L,N=l*P+c*R+O,Y=u.getTintAppendFloatAlphaAndSwap(d,f);T[S+0]=F,T[S+1]=D,b[S+2]=Y,T[S+3]=I,T[S+4]=B,b[S+5]=Y,T[S+6]=U,T[S+7]=N,b[S+8]=Y,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m,v,y,x,w){var T=this.tempTriangle;T[0].x=r,T[0].y=o,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=a,T[1].y=h,T[1].width=c,T[1].rgb=d,T[1].alpha=f,T[2].x=u,T[2].y=l,T[2].width=c,T[2].rgb=d,T[2].alpha=f,T[3].x=r,T[3].y=o,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,s,n,T,c,d,f,p,g,m,v,y,x,!1,w)},batchFillPath:function(t,e,i,s,n,o,a,h,l,c,d,f,p,g,m){this.renderer.setPipeline(this);for(var v,y,x,w,T,b,S,_,A,E,C,M,P,k,R,L,O,F=o.length,D=this.polygonCache,I=this.vertexViewF32,B=this.vertexViewU32,U=0,N=m[0],Y=m[1],z=m[2],X=m[3],G=l*N+c*z,V=l*Y+c*X,W=d*N+f*z,H=d*Y+f*X,j=p*N+g*z+m[4],q=p*Y+g*X+m[5],K=u.getTintAppendFloatAlphaAndSwap(a,h),J=0;J<F;++J)y=o[J],D.push(y.x,y.y);F=(v=r(D)).length;for(var Z=0;Z<F;Z+=3)x=2*v[Z+0],w=2*v[Z+1],T=2*v[Z+2],this.vertexCount+3>this.vertexCapacity&&this.flush(),U=this.vertexCount*this.vertexComponentCount,M=(b=D[x+0])*G+(S=D[x+1])*W+j,P=b*V+S*H+q,k=(_=D[w+0])*G+(A=D[w+1])*W+j,R=_*V+A*H+q,L=(E=D[T+0])*G+(C=D[T+1])*W+j,O=E*V+C*H+q,I[U+0]=M,I[U+1]=P,B[U+2]=K,I[U+3]=k,I[U+4]=R,B[U+5]=K,I[U+6]=L,I[U+7]=O,B[U+8]=K,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,s,n,r,o,a,h,l,c,d,f,p,g,m,v){var y,x;this.renderer.setPipeline(this);for(var w,T,b,S,_=r.length,A=this.polygonCache,E=this.vertexViewF32,C=this.vertexViewU32,M=u.getTintAppendFloatAlphaAndSwap,P=0;P+1<_;P+=1)y=r[P],x=r[P+1],S=this.batchLine(t,e,i,s,n,y.x,y.y,x.x,x.y,y.width/2,x.width/2,y.rgb,x.rgb,h,l,c,d,f,p,g,v),A.push(S);for(var k=1,R=A.length;k<R;++k)this.vertexCount+6>this.vertexCapacity&&this.flush(),w=A[k-1]||A[R-1],T=A[k],E[(b=this.vertexCount*this.vertexComponentCount)+0]=w[6],E[b+1]=w[7],C[b+2]=M(w[8],h),E[b+3]=w[0],E[b+4]=w[1],C[b+5]=M(w[2],h),E[b+6]=T[9],E[b+7]=T[10],C[b+8]=M(T[11],h),E[b+9]=w[0],E[b+10]=w[1],C[b+11]=M(w[2],h),E[b+12]=w[6],E[b+13]=w[7],C[b+14]=M(w[8],h),E[b+15]=T[3],E[b+16]=T[4],C[b+17]=M(T[5],h),this.vertexCount+=6;A.length=0},batchLine:function(t,e,i,s,n,r,o,a,h,l,c,d,f,p,g,m,v,y,x,w,T){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var b=T[0],S=T[1],_=T[2],A=T[3],E=g*b+m*_,C=g*S+m*A,M=v*b+y*_,P=v*S+y*A,k=x*b+w*_+T[4],R=x*S+w*A+T[5],L=this.vertexViewF32,O=this.vertexViewU32,F=a-r,D=h-o,I=Math.sqrt(F*F+D*D),B=l*(h-o)/I,U=l*(r-a)/I,N=c*(h-o)/I,Y=c*(r-a)/I,z=a-N,X=h-Y,G=r-B,V=o-U,W=a+N,H=h+Y,j=r+B,q=o+U,K=z*E+X*M+k,J=z*C+X*P+R,Z=G*E+V*M+k,Q=G*C+V*P+R,$=W*E+H*M+k,tt=W*C+H*P+R,et=j*E+q*M+k,it=j*C+q*P+R,st=u.getTintAppendFloatAlphaAndSwap,nt=st(d,p),rt=st(f,p),ot=this.vertexCount*this.vertexComponentCount;return L[ot+0]=K,L[ot+1]=J,O[ot+2]=rt,L[ot+3]=Z,L[ot+4]=Q,O[ot+5]=nt,L[ot+6]=$,L[ot+7]=tt,O[ot+8]=rt,L[ot+9]=Z,L[ot+10]=Q,O[ot+11]=nt,L[ot+12]=et,L[ot+13]=it,O[ot+14]=nt,L[ot+15]=$,L[ot+16]=tt,O[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e,i){if(!(t.commandBuffer.length<=0)){var s=null;i&&(s=i.matrix),this.renderer.setPipeline(this);var r,o,a,h,u,l,v,y,x=e.scrollX*t.scrollFactorX,w=e.scrollY*t.scrollFactorY,T=t.x,b=t.y,S=t.scaleX,_=t.scaleY,A=t.rotation,E=t.commandBuffer,C=e.alpha*t.alpha,M=1,P=1,k=0,R=0,L=1,O=e.matrix.matrix,F=null,D=0,I=0,B=0,U=0,N=0,Y=0,z=0,X=0,G=0,V=null,W=Math.sin,H=Math.cos,j=W(A),q=H(A),K=q*S,J=j*S,Z=-j*_,Q=q*_,$=T,tt=b,et=O[0],it=O[1],st=O[2],nt=O[3],rt=O[4],ot=O[5];if(s){var at=s[0],ht=s[1],ut=s[2],lt=s[3],ct=s[4],dt=s[5],ft=-x,pt=-w,gt=at*et+ht*st,mt=at*it+ht*nt,vt=ut*et+lt*st,yt=ut*it+lt*nt;r=K*gt+J*vt,o=K*mt+J*yt,a=Z*gt+Q*vt,h=Z*mt+Q*yt,u=$*gt+tt*vt+(ct*et+dt*st+(ft*et+pt*st+rt)),l=$*mt+tt*yt+(ct*it+dt*nt+(ft*it+pt*nt+ot))}else r=K*et+J*st,o=K*it+J*nt,a=Z*et+Q*st,h=Z*it+Q*nt,u=($-=x)*et+(tt-=w)*st+rt,l=$*it+tt*nt+ot;m.length=0;for(var xt=0,wt=E.length;xt<wt;++xt)switch(nt=E[xt]){case n.ARC:for(D=0,N=E[xt+1],Y=E[xt+2],z=E[xt+3],X=E[xt+4],G=E[xt+5],null===F&&(F=new d(N+H(X)*z,Y+W(X)*z,L,k,M*C),m.push(F),D+=.01);D<1;)I=N+H(U=G*D+X)*z,B=Y+W(U)*z,F.points.push(new c(I,B,L,k,M*C)),D+=.01;I=N+H(U=G+X)*z,B=Y+W(U)*z,F.points.push(new c(I,B,L,k,M*C)),xt+=6;break;case n.LINE_STYLE:L=E[xt+1],k=E[xt+2],M=E[xt+3],xt+=3;break;case n.FILL_STYLE:R=E[xt+1],P=E[xt+2],xt+=2;break;case n.BEGIN_PATH:m.length=0,F=null;break;case n.CLOSE_PATH:F&&F.points.length&&F.points.push(F.points[0]);break;case n.FILL_PATH:for(v=0,y=m.length;v<y;++v)this.batchFillPath(T,b,S,_,A,m[v].points,R,P*C,r,o,a,h,u,l,f);break;case n.STROKE_PATH:for(v=0,y=m.length;v<y;++v)V=m[v],this.batchStrokePath(T,b,S,_,A,V.points,L,k,M*C,r,o,a,h,u,l,V===this._lastPath,f);break;case n.FILL_RECT:this.batchFillRect(T,b,S,_,A,E[xt+1],E[xt+2],E[xt+3],E[xt+4],R,P*C,r,o,a,h,u,l,f),xt+=4;break;case n.FILL_TRIANGLE:this.batchFillTriangle(T,b,S,_,A,E[xt+1],E[xt+2],E[xt+3],E[xt+4],E[xt+5],E[xt+6],R,P*C,r,o,a,h,u,l,f),xt+=6;break;case n.STROKE_TRIANGLE:this.batchStrokeTriangle(T,b,S,_,A,E[xt+1],E[xt+2],E[xt+3],E[xt+4],E[xt+5],E[xt+6],L,k,M*C,r,o,a,h,u,l,f),xt+=6;break;case n.LINE_TO:null!==F?F.points.push(new c(E[xt+1],E[xt+2],L,k,M*C)):(F=new d(E[xt+1],E[xt+2],L,k,M*C),m.push(F)),xt+=2;break;case n.MOVE_TO:F=new d(E[xt+1],E[xt+2],L,k,M*C),m.push(F),xt+=2;break;case n.LINE_FX_TO:null!==F?F.points.push(new c(E[xt+1],E[xt+2],E[xt+3],E[xt+4],E[xt+5]*C)):(F=new d(E[xt+1],E[xt+2],E[xt+3],E[xt+4],E[xt+5]*C),m.push(F)),xt+=5;break;case n.MOVE_FX_TO:F=new d(E[xt+1],E[xt+2],E[xt+3],E[xt+4],E[xt+5]*C),m.push(F),xt+=5;break;case n.SAVE:p[g+0]=f[0],p[g+1]=f[1],p[g+2]=f[2],p[g+3]=f[3],p[g+4]=f[4],p[g+5]=f[5],g+=6;break;case n.RESTORE:g-=6,f[0]=p[g+0],f[1]=p[g+1],f[2]=p[g+2],f[3]=p[g+3],f[4]=p[g+4],f[5]=p[g+5];break;case n.TRANSLATE:N=E[xt+1],Y=E[xt+2],f[4]=f[0]*N+f[2]*Y+f[4],f[5]=f[1]*N+f[3]*Y+f[5],xt+=2;break;case n.SCALE:N=E[xt+1],Y=E[xt+2],f[0]*=N,f[1]*=N,f[2]*=Y,f[3]*=Y,xt+=2;break;case n.ROTATE:N=W(Y=E[xt+1]),Y=H(Y),K=f[0],J=f[1],Z=f[2],Q=f[3],f[0]=Y*K+N*Z,f[1]=Y*J+N*Q,f[2]=-N*K+Y*Z,f[3]=-N*J+Y*Q,xt+=1;break;default:console.error("Phaser: Invalid Graphics Command ID "+nt)}}}});t.exports=v},function(t,e,i){var s=i(0),n=i(501),r=i(500),o=i(84),a=new s({Extends:o,initialize:function(t){o.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:r,fragShader:t.fragShader?t.fragShader:n,vertexCapacity:t.vertexCapacity?t.vertexCapacity:3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT,vertices:new Float32Array([-1,1,-1,-7,7,1]).buffer,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.maxQuads=1,this.resolutionDirty=!0},onBind:function(){o.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.resolutionDirty&&(t.setFloat2(e,"uResolution",this.width,this.height),t.setInt1(e,"uMainSampler",0),t.setInt1(e,"uMaskSampler",1),this.resolutionDirty=!1),this},resize:function(t,e,i){return o.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var s=t.bitmapMask,n=this.renderer,r=this.gl,o=s.visible;s&&r&&(n.setFramebuffer(t.maskFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),s.visible=!0,s.renderWebGL(n,s,0,i),s.visible=o,n.flush(),n.setFramebuffer(t.mainFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT))},endMask:function(t){var e=t.bitmapMask,i=this.renderer,s=this.gl;e&&(i.setFramebuffer(null),i.setPipeline(this),i.setTexture2D(t.maskTexture,1),i.setTexture2D(t.mainTexture,0),i.setInt1(this.program,"uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3))}});t.exports=a},function(t,e){t.exports=function(t,e,i){e||(e="image/png"),i||(i=.92);var s=t.getContext("experimental-webgl"),n=new Uint8Array(s.drawingBufferWidth*s.drawingBufferHeight*4);s.readPixels(0,0,s.drawingBufferWidth,s.drawingBufferHeight,s.RGBA,s.UNSIGNED_BYTE,n);var r,o=document.createElement("canvas"),a=o.getContext("2d");o.width=s.drawingBufferWidth,o.height=s.drawingBufferHeight;for(var h=(r=a.getImageData(0,0,o.width,o.height)).data,u=0;u<o.height;u+=1)for(var l=0;l<o.width;l+=1){var c=4*((o.height-u)*o.width+l),d=4*(u*o.width+l);h[d+0]=n[c+0],h[d+1]=n[c+1],h[d+2]=n[c+2],h[d+3]=n[c+3]}a.putImageData(r,0,0);var f=o.toDataURL(e,i),p=new Image;return p.src=f,p}},function(t,e,i){var s=i(0),n=i(22),r=i(85),o=i(56),a=i(21),h=i(255),u=i(254),l=i(253),c=i(151),d=i(130),f=new s({initialize:function(t){var e=this,i=t.config,s={alpha:i.transparent,depth:!1,antialias:i.antialias,premultipliedAlpha:i.premultipliedAlpha,stencil:!0,preserveDrawingBuffer:i.preserveDrawingBuffer,failIfMajorPerformanceCaveat:i.failIfMajorPerformanceCaveat,powerPreference:i.powerPreference};this.config={clearBeforeRender:i.clearBeforeRender,antialias:i.antialias,backgroundColor:i.backgroundColor,contextCreation:s,resolution:i.resolution,autoResize:i.autoResize,roundPixels:i.roundPixels,maxTextures:i.maxTextures,maxTextureSize:i.maxTextureSize,batchSize:i.batchSize},this.game=t,this.type=n.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i<e.lostContextCallbacks.length;++i){var s=e.lostContextCallbacks[i];s[0].call(s[1],e)}},!1),this.canvas.addEventListener("webglcontextrestored",function(){e.contextLost=!1,e.init(e.config);for(var t=0;t<e.restoredContextCallbacks.length;++t){var i=e.restoredContextCallbacks[t];i[0].call(i[1],e)}},!1),this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.init(this.config)},init:function(t){var e,i=this.canvas,s=t.backgroundColor;if(!(e=this.game.config.context?this.game.config.context:i.getContext("webgl",t.contextCreation)||i.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("This browser does not support WebGL. Try using the Canvas pipeline.");this.gl=e,this.game.context=e;for(var r=0;r<=16;r++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT;var o=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var a="WEBGL_compressed_texture_",h="WEBKIT_"+a;this.compression.ETC1=e.getExtension(a+"etc1")||e.getExtension(h+"etc1"),this.compression.PVRTC=e.getExtension(a+"pvrtc")||e.getExtension(h+"pvrtc"),this.compression.S3TC=e.getExtension(a+"s3tc")||e.getExtension(h+"s3tc"),this.supportedExtensions=o,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,1);for(var f=0;f<this.currentTextures.length;++f)this.currentTextures[f]=null;return this.pipelines={},this.addPipeline("TextureTintPipeline",new d({game:this.game,renderer:this})),this.addPipeline("FlatTintPipeline",new l({game:this.game,renderer:this})),this.addPipeline("BitmapMaskPipeline",new u({game:this.game,renderer:this})),this.addPipeline("Light2D",new c({game:this.game,renderer:this})),this.setBlendMode(n.BlendModes.NORMAL),this.resize(this.width,this.height),this.game.events.once("ready",this.boot,this),this},boot:function(){for(var t in this.pipelines)this.pipelines[t].boot()},resize:function(t,e){var i=this.gl,s=this.pipelines,n=this.config.resolution;for(var r in this.width=Math.floor(t*n),this.height=Math.floor(e*n),this.canvas.width=this.width,this.canvas.height=this.height,this.config.autoResize&&(this.canvas.style.width=this.width/n+"px",this.canvas.style.height=this.height/n+"px"),i.viewport(0,0,this.width,this.height),s)s[r].resize(t,e,n);return this.currentScissor.set([0,0,this.width,this.height]),this.drawingBufferHeight=i.drawingBufferHeight,this},onContextRestored:function(t,e){return this.restoredContextCallbacks.push([t,e]),this},onContextLost:function(t,e){return this.lostContextCallbacks.push([t,e]),this},hasExtension:function(t){return!!this.supportedExtensions&&this.supportedExtensions.indexOf(t)},getExtension:function(t){return this.hasExtension(t)?(t in this.extensions||(this.extensions[t]=this.gl.getExtension(t)),this.extensions[t]):null},flush:function(){this.currentPipeline&&this.currentPipeline.flush()},hasPipeline:function(t){return t in this.pipelines},getPipeline:function(t){return this.hasPipeline(t)?this.pipelines[t]:null},removePipeline:function(t){return delete this.pipelines[t],this},addPipeline:function(t,e){return this.hasPipeline(t)?console.warn("Pipeline",t," already exists."):this.pipelines[t]=e,e.name=t,this.pipelines[t].resize(this.width,this.height,this.config.resolution),e},setScissor:function(t,e,i,s){var n=this.gl,r=this.currentScissor,o=0===t&&0===e&&i===this.width&&s===this.height&&i>=0&&s>=0;return r[0]===t&&r[1]===e&&r[2]===i&&r[3]===s||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=s,this.currentScissorEnabled=o,o?(n.disable(n.SCISSOR_TEST),this):(n.enable(n.SCISSOR_TEST),n.scissor(t,this.drawingBufferHeight-e-s,i,s),this)},pushScissor:function(t,e,i,s){var n=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return n[r+0]=o[0],n[r+1]=o[1],n[r+2]=o[2],n[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,s),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],s=t[e+1],n=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,s,n,r),this},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,s){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),s===n.ScaleModes.LINEAR&&this.config.antialias&&(a=o.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,n,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=void 0===u||null===u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,n),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,s),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===o||void 0===o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,s){var n,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),s){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(n=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[n])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,s=i.createProgram(),n=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(n,t),i.shaderSource(r,e),i.compileShader(n),i.compileShader(r),!i.getShaderParameter(n,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(n));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(s,n),i.attachShader(s,r),i.linkProgram(s),!i.getProgramParameter(s,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(s));return s},createVertexBuffer:function(t,e){var i=this.gl,s=i.createBuffer();return this.setVertexBuffer(s),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),s},createIndexBuffer:function(t,e){var i=this.gl,s=i.createBuffer();return this.setIndexBuffer(s),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),s},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&o(this.nativeTextures,e),this.gl.deleteTexture(t),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=this.config.resolution,i=Math.floor(t.x*e),s=Math.floor(t.y*e),n=Math.floor(t.width*e),r=Math.floor(t.height*e);if(this.pushScissor(i,s,n,r),t.backgroundColor.alphaGL>0){var o=t.backgroundColor,h=this.pipelines.FlatTintPipeline;h.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,a.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),h.flush()}},postRenderCamera:function(t){var e=this.pipelines.FlatTintPipeline,i=t.flashEffect.postRenderWebGL(e,a.getTintFromFloats);(t.fadeEffect.postRenderWebGL(e,a.getTintFromFloats)||i)&&e.flush(),t.dirty=!1,this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var s in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[s].onPreRender()}},render:function(t,e,i,s){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,s);this.preRenderCamera(s);for(var u=0;u<o;++u){var l=r[u];l.willRender()&&(l.blendMode!==this.currentBlendMode&&this.setBlendMode(l.blendMode),l.mask&&l.mask.preRenderWebGL(this,l,s),l.renderWebGL(this,l,i,s),l.mask&&l.mask.postRenderWebGL(this,l))}this.flush(),this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(s)}},postRender:function(){if(!this.contextLost){this.snapshotState.callback&&(this.snapshotState.callback(h(this.canvas,this.snapshotState.type,this.snapshotState.encoder)),this.snapshotState.callback=null);var t=this.pipelines;for(var e in t)t[e].onPostRender()}},snapshot:function(t,e,i){return this.snapshotState.callback=t,this.snapshotState.type=e,this.snapshotState.encoder=i,this},canvasToTexture:function(t,e){var i=this.gl;if(e)this.setTexture2D(e,0),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,t),e.width=t.width,e.height=t.height,this.setTexture2D(null,0);else{var s=i.CLAMP_TO_EDGE;r(t.width,t.height)&&(s=i.REPEAT),e=this.createTexture2D(0,i.NEAREST,i.NEAREST,s,s,i.RGBA,t,t.width,t.height,!0)}return e},setTextureFilter:function(t,e){var i=this.gl,s=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,s),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,s){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,s),this},setFloat3:function(t,e,i,s,n){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,s,n),this},setFloat4:function(t,e,i,s,n,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,s,n,r),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,s){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,s),this},setInt3:function(t,e,i,s,n){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,s,n),this},setInt4:function(t,e,i,s,n,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,s,n,r),this},setMatrix2:function(t,e,i,s){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,s),this},setMatrix3:function(t,e,i,s){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,s),this},setMatrix4:function(t,e,i,s){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,s),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t in this.pipelines)this.pipelines[t].destroy(),delete this.pipelines[t];for(var e=0;e<this.nativeTextures.length;++e)this.deleteTexture(this.nativeTextures[e]),delete this.nativeTextures[e];delete this.gl,delete this.game,this.contextLost=!0,this.extensions={},this.nativeTextures.length=0}});t.exports=f},function(t,e,i){var s=i(52),n=i(208);t.exports=function(){var t=[],e=n.supportNewBlendModes;return t[s.NORMAL]="source-over",t[s.ADD]="lighter",t[s.MULTIPLY]=e?"multiply":"source-over",t[s.SCREEN]=e?"screen":"source-over",t[s.OVERLAY]=e?"overlay":"source-over",t[s.DARKEN]=e?"darken":"source-over",t[s.LIGHTEN]=e?"lighten":"source-over",t[s.COLOR_DODGE]=e?"color-dodge":"source-over",t[s.COLOR_BURN]=e?"color-burn":"source-over",t[s.HARD_LIGHT]=e?"hard-light":"source-over",t[s.SOFT_LIGHT]=e?"soft-light":"source-over",t[s.DIFFERENCE]=e?"difference":"source-over",t[s.EXCLUSION]=e?"exclusion":"source-over",t[s.HUE]=e?"hue":"source-over",t[s.SATURATION]=e?"saturation":"source-over",t[s.COLOR]=e?"color":"source-over",t[s.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var s=i(32),n=new s,r=new s;t.exports=function(t,e,i){var s=this.currentContext,o=e.alpha*t.alpha;if(0!==o){s.globalAlpha=o,this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,s.globalCompositeOperation=this.blendModes[t.blendMode]);var a=n,h=r;h.applyITRS(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY,t.rotation,t.scaleX,t.scaleY);var u,l=t.frame,c=l.canvasData,d=c.x,f=c.y,p=l.width,g=l.height,m=-t.displayOriginX+l.x,v=-t.displayOriginY+l.y,y=t.flipX?-1:1,x=t.flipY?-1:1;if(t.isCropped){var w=t._crop;w.flipX===t.flipX&&w.flipY===t.flipY||l.updateCropUVs(w,t.flipX,t.flipY),p=w.cw,g=w.ch,d=w.cx,f=w.cy,m=-t.displayOriginX+w.x,v=-t.displayOriginY+w.y,-1===y&&(m>=0?m=-(m+p):m<0&&(m=Math.abs(m)-p)),-1===x&&(v>=0?v=-(v+g):v<0&&(v=Math.abs(v)-g))}a.copyFrom(e.matrix),i?(a.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y,u=a.multiply(h)):u=h.multiply(a),s.save(),s.transform(u.a,u.b,u.c,u.d,u.e,u.f),s.scale(y,x),s.drawImage(l.source.image,d,f,p,g,m,v,p,g),s.restore()}}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var s=t.toDataURL(e,i),n=new Image;return n.src=s,n}},function(t,e){var i=!1,s=function(t,e,s){var n=this.currentContext,r=s.canvasData;i&&(t|=0,e|=0),n.drawImage(s.source.image,r.x,r.y,r.width,r.height,t,e,r.width,r.height)};t.exports=function(t){return i=t,s}},function(t,e,i){var s=i(260),n=i(259),r=i(0),o=i(22),a=i(258),h=i(257),u=i(59),l=i(132),c=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=t.config.width,this.height=t.config.height,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,autoResize:t.config.autoResize,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.scaleMode=t.config.antialias?u.LINEAR:u.NEAREST,this.gameCanvas=t.canvas,this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d"),this.currentContext=this.gameContext,this.drawImage=a,this.blitImage=s(this.config.roundPixels),this.blendModes=h(),this.currentAlpha=1,this.currentBlendMode=0,this.currentScaleMode=0,this.snapshotCallback=null,this.snapshotType=null,this.snapshotEncoder=null,this.init()},init:function(){this.resize(this.width,this.height)},resize:function(t,e){var i=this.config.resolution;this.width=t*i,this.height=e*i,this.gameCanvas.width=this.width,this.gameCanvas.height=this.height,this.config.autoResize&&(this.gameCanvas.style.width=this.width/i+"px",this.gameCanvas.style.height=this.height/i+"px"),this.scaleMode===u.NEAREST&&l.disable(this.gameContext)},onContextLost:function(){},onContextRestored:function(){},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentBlendMode!==t&&(this.currentContext.globalCompositeOperation=t,this.currentBlendMode=t),this.currentBlendMode},setAlpha:function(t){return this.currentAlpha!==t&&(this.currentContext.globalAlpha=t,this.currentAlpha=t),this.currentAlpha},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,s=this.height;e.clearBeforeRender&&t.clearRect(0,0,i,s),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,s)),this.drawCount=0},render:function(t,e,i,s){var n=t.sys.context,r=0!==s.x||0!==s.y||s.width!==n.canvas.width||s.height!==n.canvas.height,o=e.list,a=this.config.resolution;this.currentContext=n,s.transparent||(n.fillStyle=s.backgroundColor.rgba,n.fillRect(s.x,s.y,s.width,s.height)),n.globalAlpha=s.alpha,this.currentAlpha=s.alpha,0!==this.currentBlendMode&&(n.globalCompositeOperation="source-over",this.currentBlendMode=0),this.currentScaleMode=0,this.drawCount+=o.length,r&&(n.save(),n.beginPath(),n.rect(s.x*a,s.y*a,s.width*a,s.height*a),n.clip());var h=s.matrix.matrix;n.setTransform(h[0],h[1],h[2],h[3],h[4],h[5]);for(var u=0;u<o.length;u++){var l=o[u];l.mask&&l.mask.preRenderCanvas(this,l,s),l.renderCanvas(this,l,i,s),l.mask&&l.mask.postRenderCanvas(this,l,s)}n.setTransform(1,0,0,1,0,0),n.globalCompositeOperation="source-over",n.globalAlpha=1,s.flashEffect.postRenderCanvas(n),s.fadeEffect.postRenderCanvas(n),s.dirty=!1,r&&n.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(n(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e,i){var s=i(0),n=i(3),r=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),s=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,s)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?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=n}});t.exports=r},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){var s=i(57);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?s.cordova&&!s.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},,,function(t,e){t.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(t,e,i){var s=i(269),n=i(24),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",s),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),u=r(t,"resizeCanvas",!0),l=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=n.create2D(this,f,p),u=!1,l=!1),u&&(i.width=f,i.height=p);var g=i.getContext("2d");l&&g.clearRect(0,0,f,p),c&&c(i,g);for(var m=0;m<e.length;m++)for(var v=e[m],y=0;y<v.length;y++){var x=v[y];"."!==x&&" "!==x&&(g.fillStyle=o[x],g.fillRect(y*a,m*h,a,h))}return d&&d(i,g),i}},,,,function(t,e,i){var s=i(30);t.exports=function(t){var e=new s,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(n,r,o,255*a)}return e}},function(t,e,i){var s=i(30);t.exports=function(t){return new s(t.r,t.g,t.b,t.a)}},function(t,e){t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var s=i(30),n=i(276);t.exports=function(t){var e=n(t);return new s(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},function(t,e,i){var s=i(30);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,s){return e+e+i+i+s+s});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(n,r,o)}return e}},function(t,e,i){t.exports=i(535)},function(t,e,i){t.exports={In:i(538),Out:i(537),InOut:i(536)}},function(t,e,i){t.exports={In:i(541),Out:i(540),InOut:i(539)}},function(t,e,i){t.exports={In:i(544),Out:i(543),InOut:i(542)}},function(t,e,i){t.exports={In:i(547),Out:i(546),InOut:i(545)}},function(t,e,i){t.exports=i(548)},function(t,e,i){t.exports={In:i(551),Out:i(550),InOut:i(549)}},function(t,e,i){t.exports={In:i(554),Out:i(553),InOut:i(552)}},function(t,e,i){t.exports={In:i(557),Out:i(556),InOut:i(555)}},function(t,e,i){t.exports={In:i(560),Out:i(559),InOut:i(558)}},function(t,e,i){t.exports={In:i(563),Out:i(562),InOut:i(561)}},function(t,e,i){t.exports={In:i(566),Out:i(565),InOut:i(564)}},,,function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s<e;s++)i=t.pop(),t.unshift(i);return i}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s<e;s++)i=t.shift(),t.push(i);return i}},function(t,e){t.exports={defaultPipeline:null,pipeline:null,initPipeline:function(t){var e=this.scene.sys.game.renderer;return!!(e&&e.gl&&e.hasPipeline(t))&&(this.defaultPipeline=e.getPipeline(t),this.pipeline=this.defaultPipeline,!0)},setPipeline:function(t){var e=this.scene.sys.game.renderer;return e&&e.gl&&e.hasPipeline(t)&&(this.pipeline=e.getPipeline(t)),this},resetPipeline:function(){return this.pipeline=this.defaultPipeline,null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}}},function(t,e){t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x-e,a=t.y-i;return t.x=o*n-a*r+e,t.y=o*r+a*n+i,t}},function(t,e,i){var s=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var s=i(136),n=i(97);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=0;o<e;o++){var a=o/e;r.push(s(t,a))}return r}},function(t,e){t.exports=function(t){return Math.PI*t.radius*2}},function(t,e,i){var s=i(300),n=i(137),r=i(64),o=i(15);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=s(t)/i);for(var h=0;h<e;h++){var u=r(h/e,0,o.PI2);a.push(n(t,u))}return a}},function(t,e,i){var s=new(i(0))({initialize:function(t){this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s<t.length;s++)e=.02519603282416938*(i+=t.charCodeAt(s)),e-=i=e>>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e<t.length&&null!=t[e];e++){var i=t[e];this.s0-=this.hash(i),this.s0+=~~(this.s0<0),this.s1-=this.hash(i),this.s1+=~~(this.s1<0),this.s2-=this.hash(i),this.s2+=~~(this.s2<0)}},integer:function(){return 4294967296*this.rnd()},frac:function(){return this.rnd()+1.1102230246251565e-16*(2097152*this.rnd()|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){var t="",e="";for(e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-1)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1,i=e;i>0;i--){var s=Math.floor(this.frac()*(e+1)),n=t[s];t[s]=t[i],t[i]=n}return t}});t.exports=s},function(t,e,i){var s=i(137),n=i(64),r=i(15),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},,,,function(t,e,i){var s=new(i(0))({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.once("remove",this.remove,this),this.isPlaying=!1,this.currentAnim=null,this.currentFrame=null,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.forward=!0,this.accumulator=0,this.nextTick=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},setDelay:function(t){return void 0===t&&(t=0),this._delay=t,this.parent},getDelay:function(){return this._delay},delayedPlay:function(t,e,i){return this.play(e,!0,i),this.nextTick+=t,this.parent},getCurrentKey:function(){if(this.currentAnim)return this.currentAnim.key},load:function(t,e){return void 0===e&&(e=0),this.isPlaying&&this.stop(),this.animationManager.load(this,t,e),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.updateFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.updateFrame(t),this.parent},isPaused:{get:function(){return this._paused}},play:function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=0),e&&this.isPlaying&&this.currentAnim.key===t)return this.parent;this.load(t,i);var s=this.currentAnim,n=this.parent;return this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,s.getFirstTick(this),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,s.showOnStart&&(n.visible=!0),n.emit("animationstart",this.currentAnim,this.currentFrame),n},getProgress:function(){var t=this.currentFrame.progress;return this.forward||(t=1-t),t},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},remove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},getRepeat:function(){return this._repeat},setRepeat:function(t){return this._repeat=t,this.repeatCounter=0,this.parent},getRepeatDelay:function(){return this._repeatDelay},setRepeatDelay:function(t){return this._repeatDelay=t,this.parent},restart:function(t){return void 0===t&&(t=!1),this.currentAnim.getFirstTick(this,t),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,this._paused=!1,this.updateFrame(this.currentAnim.frames[0]),this.parent},stop:function(){this._pendingStop=0,this.isPlaying=!1;var t=this.parent;return t.emit("animationcomplete",this.currentAnim,this.currentFrame),t},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopOnRepeat:function(){return this._pendingStop=2,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},setTimeScale:function(t){return void 0===t&&(t=1),this._timeScale=t,this.parent},getTimeScale:function(){return this._timeScale},getTotalFrames:function(){return this.currentAnim.frames.length},update:function(t,e){if(this.currentAnim&&this.isPlaying&&!this.currentAnim.paused){if(this.accumulator+=e*this._timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.currentAnim.completeAnimation(this);this.accumulator>=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit("animationupdate",i,t),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off("remove",this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=s},function(t,e,i){var s=i(0),n=i(166),r=i(12),o=i(165),a=i(61),h=i(71),u=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.timeScale=1},createTimeline:function(t){return o(this,t)},timeline:function(t){var e=o(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return h(this,t)},add:function(t){var e=h(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=n(this,t);return this._add.push(e),this._toProcess++,e},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,s=this._active;for(t=0;t<i.length;t++){e=i[t];var n=s.indexOf(e);-1!==n&&(e.state=a.REMOVED,s.splice(n,1))}for(i.length=0,i=this._add,t=0;t<i.length;t++)(e=i[t]).state===a.PENDING_ADD&&(e.init()?(e.play(),this._active.push(e)):this._pending.push(e));i.length=0,this._toProcess=0}},update:function(t,e){var i,s=this._active;e*=this.timeScale;for(var n=0;n<s.length;n++)(i=s[n]).update(t,e)&&(this._destroy.push(i),this._toProcess++)},makeActive:function(t){if(-1===this._add.indexOf(t)&&-1===this._active.indexOf(t)){var e=this._pending.indexOf(t);return-1!==e&&this._pending.splice(e,1),this._add.push(t),t.state=a.PENDING_ADD,this._toProcess++,this}},each:function(t,e){for(var i=[null],s=1;s<arguments.length;s++)i.push(arguments[s]);for(var n in this.list)i[0]=this.list[n],t.apply(e,i)},getAllTweens:function(){for(var t=this._active,e=[],i=0;i<t.length;i++)e.push(t[i]);return e},getGlobalTimeScale:function(){return this.timeScale},getTweensOf:function(t){var e,i,s=this._active,n=[];if(Array.isArray(t))for(i=0;i<s.length;i++){e=s[i];for(var r=0;r<t.length;r++)e.hasTarget(t[r])&&n.push(e)}else for(i=0;i<s.length;i++)(e=s[i]).hasTarget(t)&&n.push(e);return n},isTweening:function(t){for(var e,i=this._active,s=0;s<i.length;s++)if((e=i[s]).hasTarget(t)&&e.isPlaying())return!0;return!1},killAll:function(){for(var t=this.getAllTweens(),e=0;e<t.length;e++)t[e].stop();return this},killTweensOf:function(t){for(var e=this.getTweensOf(t),i=0;i<e.length;i++)e[i].stop();return this},pauseAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].pause();return this},resumeAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].resume();return this},setGlobalTimeScale:function(t){return this.timeScale=t,this},shutdown:function(){this.killAll(),this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0;var t=this.systems.events;t.off("preupdate",this.preUpdate,this),t.off("update",this.update,this),t.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null}});r.register("TweenManager",u,"tweens"),t.exports=u},function(t,e){t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","loop","loopDelay","offset","onComplete","onCompleteParams","onCompleteScope","onLoop","onLoopParams","onLoopScope","onRepeat","onRepeatParams","onRepeatScope","onStart","onStartParams","onStartScope","onUpdate","onUpdateParams","onUpdateScope","onYoyo","onYoyoParams","onYoyoScope","paused","props","repeat","repeatDelay","targets","useFrames","yoyo"]},function(t,e,i){t.exports={GetBoolean:i(62),GetEaseFunction:i(63),GetNewValue:i(72),GetProps:i(168),GetTargets:i(102),GetTweens:i(167),GetValueOp:i(101),NumberTweenBuilder:i(166),TimelineBuilder:i(165),TweenBuilder:i(71)}},function(t,e,i){var s=i(61),n=i(16),r={Builders:i(310),TweenManager:i(308),Tween:i(99),TweenData:i(98),Timeline:i(164)};r=n(!1,r,s),t.exports=r},function(t,e,i){var s=i(0),n=i(12),r=i(169),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=Date.now(),this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this)},addEvent:function(t){var e=new r(t);return this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,s){return this.addEvent({delay:t,callback:e,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,s;for(i=0;i<t;i++){s=this._pendingRemoval[i];var n=this._active.indexOf(s);n>-1&&this._active.splice(n,1),s.destroy()}for(i=0;i<e;i++)s=this._pendingInsertion[i],this._active.push(s);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){if(this.now=t,!this.paused){e*=this.timeScale;for(var i=0;i<this._active.length;i++){var s=this._active[i];if(!s.paused&&(s.elapsed+=e*s.timeScale,s.elapsed>=s.delay)){var n=s.elapsed-s.delay;s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0?(s.repeatCount--,s.elapsed=n,s.hasDispatched=!1):this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t<this._pendingInsertion.length;t++)this._pendingInsertion[t].destroy();for(t=0;t<this._active.length;t++)this._active[t].destroy();for(t=0;t<this._pendingRemoval.length;t++)this._pendingRemoval[t].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var e=this.systems.events;e.off("preupdate",this.preUpdate,this),e.off("update",this.update,this),e.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null}});n.register("Clock",o,"time"),t.exports=o},function(t,e,i){t.exports={Clock:i(312),TimerEvent:i(169)}},,,,,,,,,,,,,,,function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){var s=i(16),n=i(328),r={FilterMode:n,Frame:i(129),Parsers:i(187),Texture:i(117),TextureManager:i(189),TextureSource:i(188)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={List:i(93),Map:i(125),ProcessQueue:i(228),RTree:i(227),Set:i(69)}},function(t,e,i){t.exports={SoundManagerCreator:i(196),BaseSound:i(77),BaseSoundManager:i(78),WebAudioSound:i(190),WebAudioSoundManager:i(191),HTML5AudioSound:i(194),HTML5AudioSoundManager:i(195),NoAudioSound:i(192),NoAudioSoundManager:i(193)}},function(t,e,i){var s=i(19),n=i(0),r=i(1),o=i(12),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.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,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.pluginStart,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once("shutdown",this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=r(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var s=r(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=s,this._willSleep=r(t,"sleep",!1),this._willRemove=r(t,"remove",!1);var n=r(t,"onUpdate",null);n&&(this._onUpdate=n,this._onUpdateScope=r(t,"onUpdateScope",this.scene));var o=r(t,"allowInput",!1);this.settings.transitionAllowInput=o;var a=i.sys.settings;return a.isTransition=!0,a.transitionFrom=this.scene,a.transitionDuration=s,a.transitionAllowInput=o,r(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):r(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake():this.manager.start(e,r(t,"data")),this.systems.events.emit("transitionout",i,s),this.systems.events.on("update",this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=s(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off("update",this.step,this),t.events.emit("transitioncomplete",this.scene),e.isTransition=!1,e.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(t,e,i){return this.manager.add(t,e,i),this},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off("shutdown",this.shutdown,this),t.off("postupdate",this.step,this),t.off("transitionout")},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",a,"scenePlugin"),t.exports=a},function(t,e,i){var s=i(79),n=i(16),r={SceneManager:i(199),ScenePlugin:i(332),Settings:i(197),Systems:i(118)};r=n(!1,r,s),t.exports=r},function(t,e,i){var s=i(170),n=new(i(0))({Extends:s,initialize:function(t,e){s.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this)},boot:function(){}});t.exports=n},function(t,e,i){t.exports={BasePlugin:i(170),DefaultPlugins:i(121),PluginCache:i(12),PluginManager:i(201),ScenePlugin:i(334)}},,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){var s=i(0),n=i(18),r=i(69),o=i(9),a=i(7),h=i(1),u=i(12),l=i(74),c=new s({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,a.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(h(i,"baseURL",e.loaderBaseURL)),this.setPath(h(i,"path",e.loaderPath)),this.setPrefix(h(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=h(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=l(h(i,"responseType",e.loaderResponseType),h(i,"async",e.loaderAsync),h(i,"user",e.loaderUser),h(i,"password",e.loaderPassword),h(i,"timeout",e.loaderTimeout)),this.crossOrigin=h(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.pluginStart,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},pluginStart:function(){this.systems.events.once("shutdown",this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];this.keyExists(i)||(this.list.set(i),this.emit("addfile",i.key,i.type,this,i),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(t){var e=t.hasCacheConflict();return e||this.list.iterate(function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1}),!e&&this.isLoading()&&(this.inflight.iterate(function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1}),this.queue.iterate(function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1})),e},addPack:function(t,e){e&&t.hasOwnProperty(e)&&(t={packKey:t[e]});var i=0,s=this.baseURL,n=this.path,r=this.prefix;for(var o in t){var a=t[o],u=h(a,"baseURL",s),l=h(a,"path",n),c=h(a,"prefix",r),d=h(a,"files",null),f=h(a,"defaultType","void");if(Array.isArray(d)){this.setBaseURL(u),this.setPath(l),this.setPrefix(c);for(var p=0;p<d.length;p++){var g=d[p],m=g.hasOwnProperty("type")?g.type:f;this[m]&&(this[m](g),i++)}}}return this.setBaseURL(s),this.setPath(n),this.setPrefix(r),i>0},isLoading:function(){return this.state===n.LOADER_LOADING||this.state===n.LOADER_PROCESSING},isReady:function(){return this.state===n.LOADER_IDLE||this.state===n.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit("start",this),0===this.list.size?this.loadComplete():(this.state=n.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on("update",this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit("progress",this.progress)},update:function(){this.state===n.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each(function(t){if((t.state===n.FILE_POPULATED||t.state===n.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(t),this.list.delete(t),t.crossOrigin||(t.crossOrigin=this.crossOrigin),t.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(t,e){this.inflight.delete(t),this.updateProgress(),e?(this.totalComplete++,this.queue.set(t),this.emit("load",t),t.onProcess()):(this.totalFailed++,this._deleteQueue.set(t),this.emit("loaderror",t),this.fileProcessComplete(t))},fileProcessComplete:function(t){t.state===n.FILE_ERRORED?t.multiFile&&t.multiFile.onFileFailed(t):t.state===n.FILE_COMPLETE&&(t.multiFile?t.multiFile.isReadyToProcess()&&t.multiFile.addToCache():t.addToCache()),this.queue.delete(t),0===this.list.size&&0===this.inflight.size&&0===this.queue.size&&this.loadComplete()},loadComplete:function(){this.emit("loadcomplete",this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=n.LOADER_COMPLETE,this.systems.events.off("update",this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit("complete",this,this.totalComplete,this.totalFailed)},flagForRemoval:function(t){this._deleteQueue.set(t)},saveJSON:function(t,e){return this.save(JSON.stringify(t),e)},save:function(t,e,i){void 0===e&&(e="file.json"),void 0===i&&(i="application/json");var s=new Blob([t],{type:i}),n=URL.createObjectURL(s),r=document.createElement("a");return r.download=e,r.textContent="Download "+e,r.href=n,r.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var t=this.systems.game.config,e=this.systems.settings.loader;this.setBaseURL(h(e,"baseURL",t.loaderBaseURL)),this.setPath(h(e,"path",t.loaderPath)),this.setPrefix(h(e,"prefix",t.loaderPrefix)),this.state=n.LOADER_IDLE},shutdown:function(){this.reset(),this.state=n.LOADER_SHUTDOWN,this.systems.events.off("update",this.update,this),this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.state=n.LOADER_DESTROYED,this.systems.events.off("update",this.update,this),this.systems.events.off("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}});u.register("Loader",c,"load"),t.exports=c},function(t,e,i){var s=i(0),n=i(7),r=i(38),o=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,n,s),this.type="spritesheet"},addToCache:function(){var t=this.cache.addSpriteSheet(this.key,this.data,this.config);this.pendingDestroy(t)}});n.register("spritesheet",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,i,s));return this}),t.exports=o},function(t,e,i){var s=i(0),n=i(18),r=i(20),o=i(7),a=i(1),h=i(8),u=new s({Extends:r,initialize:function(t,e,i,s){var n="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var u={type:"script",cache:!1,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u)},onProcess:function(){this.state=n.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()}});o.register("script",function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},function(t,e,i){var s=i(0),n=i(18),r=i(20),o=i(7),a=i(1),h=i(8),u=new s({Extends:r,initialize:function(t,e,i,s,o,u){var l="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),u=a(c,"xhrSettings"),l=a(c,"extension",l),s=a(c,"start"),o=a(c,"mapping")}var d={type:"plugin",cache:!1,extension:l,responseType:"text",key:e,url:i,xhrSettings:u,config:{start:s,mapping:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),s=a(e,"mapping",null);this.state===n.FILE_POPULATED?t.install(this.key,this.data,i,s):(this.state=n.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),t.install(this.key,window[this.key],i,s)),this.onProcessComplete()}});o.register("plugin",function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new u(this,t[r]));else this.addFile(new u(this,t,e,i,s,n));return this}),t.exports=u},function(t,e,i){var s=i(0),n=i(7),r=i(1),o=i(38),a=i(8),h=i(28),u=i(37),l=new s({Extends:u,initialize:function(t,e,i,s,n,o,l){if(a(e)){var c=e;e=r(c,"key"),i=r(c,"url"),o=r(c,"xhrSettings"),s=r(c,"path"),n=r(c,"baseURL"),l=r(c,"textureXhrSettings")}var d=new h(t,e,i,o);u.call(this,t,"multiatlas",e,[d]),this.config.path=s,this.config.baseURL=n,this.config.textureXhrSettings=l},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,s=this.loader,n=s.baseURL,a=s.path,h=s.prefix,u=r(i,"baseURL",n),l=r(i,"path",a),c=r(i,"prefix",h),d=r(i,"textureXhrSettings");s.setBaseURL(u),s.setPath(l),s.setPrefix(c);for(var f=0;f<e.length;f++){var p=e[f].image,g="_MA_"+p,m=new o(s,g,p,d);if(this.addToMultiFile(m),s.addFile(m),e[f].normalMap){var v=new o(s,g,e[f].normalMap,d);v.type="normalMap",m.setLink(v),this.addToMultiFile(v),s.addFile(v)}}s.setBaseURL(n),s.setPath(a),s.setPrefix(h)}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0];t.addToCache();for(var e=[],i=[],s=[],n=1;n<this.files.length;n++){var r=this.files[n];if("normalMap"!==r.type)for(var o=r.key.substr(4),a=r.data,h=0;h<t.data.textures.length;h++){var u=t.data.textures[h];if(u.image===o){i.push(a),e.push(u),r.linkFile&&s.push(r.linkFile.data);break}}}for(0===s.length&&(s=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,i,e,s),this.complete=!0,n=0;n<this.files.length;n++)this.files[n].pendingDestroy()}}});n.register("multiatlas",function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new l(this,t[o]),this.addFile(r.files);else r=new l(this,t,e,i,s,n),this.addFile(r.files);return this}),t.exports=l},function(t,e,i){var s=i(173),n=i(0),r=i(7),o=i(1),a=i(8),h=i(28),u=i(37),l=new n({Extends:u,initialize:function(t,e,i,n,r,l,c){if(a(e)){var d=e;e=o(d,"key"),i=o(d,"jsonURL"),n=o(d,"audioURL"),r=o(d,"audioConfig"),l=o(d,"audioXhrSettings"),c=o(d,"jsonXhrSettings")}var f;if(n){var p=s.create(t,e,n,r,l);p&&(f=new h(t,e,i,c),u.call(this,t,"audiosprite",e,[p,f]),this.config.resourceLoad=!1)}else f=new h(t,e,i,c),u.call(this,t,"audiosprite",e,[f]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=l},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),n=o(this.config,"audioXhrSettings"),r=s.create(this.loader,t.key,e,i,n);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",function(t,e,i,s,n,r){var o,a=this.systems.game,h=a.config.audio,u=a.device.audio;if(h&&h.noAudio||!u.webAudio&&!u.audioData)return this;if(Array.isArray(t))for(var c=0;c<t.length;c++)(o=new l(this,t[c])).files&&this.addFile(o.files);else(o=new l(this,t,e,i,s,n,r)).files&&this.addFile(o.files);return this})},function(t,e,i){var s=i(0),n=i(7),r=i(1),o=i(38),a=i(8),h=i(28),u=i(37),l=new s({Extends:u,initialize:function(t,e,i,s,n,l){var c,d;if(a(e)){var f=e;e=r(f,"key"),c=new o(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new h(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","json"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new h(t,e,s,l);c.linkFile?u.call(this,t,"atlasjson",e,[c,d,c.linkFile]):u.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});n.register("atlas",function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new l(this,t[o]),this.addFile(r.files);else r=new l(this,t,e,i,s,n),this.addFile(r.files);return this}),t.exports=l},function(t,e,i){var s=i(0),n=i(7),r=i(28),o=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.type="animationJSON"},onProcess:function(){this.loader.once("loadcomplete",this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data),this.pendingDestroy()}});n.register("animation",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,s,i));return this}),t.exports=o},function(t,e,i){t.exports={TouchManager:i(202)}},function(t,e,i){t.exports={MouseManager:i(204)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isUp&&t.duration<e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration<e}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t._tick=-1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,!1===t.isDown&&(t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t._justDown=!0,t._justUp=!1),t.repeats++,t}},function(t,e,i){var s=i(109),n={};for(var r in s)n[s[r]]=r;t.exports=n},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e,i){var s=i(377);t.exports=function(t,e){if(e.matched)return!0;var i=!1,n=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(n=!0,i=s(t,e))}else n=!0,i=s(t,e);return!n&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e,i){var s=i(0),n=i(9),r=i(4),o=i(75),a=i(176),h=i(109),u=i(175),l=i(375),c=i(374),d=i(373),f=i(145),p=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.keys=[],this.combos=[],this.queue=[],this.onKeyHandler,this.time=0,t.pluginEvents.once("boot",this.boot,this),t.pluginEvents.on("start",this.start,this)},boot:function(){var t=this.settings.input,e=this.scene.sys.game.config;this.enabled=r(t,"keyboard",e.inputKeyboard),this.target=r(t,"keyboard.target",e.inputKeyboardEventTarget),this.sceneInputPlugin.pluginEvents.once("destroy",this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once("shutdown",this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=function(e){if(!e.defaultPrevented&&t.isActive()){t.queue.push(e);var i=t.keys[e.keyCode];i&&i.preventDefault&&e.preventDefault()}};this.onKeyHandler=e,this.target.addEventListener("keydown",e,!1),this.target.addEventListener("keyup",e,!1),this.sceneInputPlugin.pluginEvents.on("update",this.update,this)},stopListeners:function(){this.target.removeEventListener("keydown",this.onKeyHandler),this.target.removeEventListener("keyup",this.onKeyHandler),this.sceneInputPlugin.pluginEvents.off("update",this.update)},createCursorKeys:function(){return this.addKeys({up:h.UP,down:h.DOWN,left:h.LEFT,right:h.RIGHT,space:h.SPACE,shift:h.SHIFT})},addKeys:function(t){var e={};if("string"==typeof t){t=t.split(",");for(var i=0;i<t.length;i++)e[t[i]]=this.addKey(t[i])}else for(var s in t)e[s]=this.addKey(t[s]);return e},addKey:function(t){var e=this.keys;if(t instanceof a){var i=e.indexOf(t);return i>-1?e[i]=t:e[t.keyCode]=t,t}return"string"==typeof t&&(t=h[t.toUpperCase()]),e[t]||(e[t]=new a(t)),e[t]},removeKey:function(t){var e=this.keys;if(t instanceof a){var i=e.indexOf(t);i>-1&&(this.keys[i]=void 0)}else"string"==typeof t&&(t=h[t.toUpperCase()]);e[t]&&(e[t]=void 0)},createCombo:function(t,e){return new u(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=f(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(t){this.time=t;var e=this.queue.length;if(this.enabled&&0!==e)for(var i=this.queue.splice(0,e),s=this.keys,n=0;n<e;n++){var r=i[n],o=r.keyCode;"keydown"===r.type?(!l[o]||void 0!==s[o]&&!1!==s[o].isDown||(this.emit(r.type,r),this.emit("keydown_"+l[o],r)),s[o]&&c(s[o],r)):(this.emit(r.type,r),this.emit("keyup_"+l[o],r),s[o]&&d(s[o],r))}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown(),this.keys=[],this.combos=[],this.queue=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.target=null}});o.register("KeyboardPlugin",p,"keyboard","keyboard","inputKeyboard"),t.exports=p},function(t,e,i){t.exports={KeyboardPlugin:i(379),Key:i(176),KeyCodes:i(109),KeyCombo:i(175),JustDown:i(372),JustUp:i(371),DownDuration:i(370),UpDuration:i(369)}},function(t,e){t.exports=function(t,e){return function(i,s,n,r){var o=t.getPixelAlpha(s,n,r.texture.key,r.frame.key);return o&&o>=e}}},function(t,e,i){var s=i(88),n=i(33),r=i(0),o=i(180),a=i(381),h=i(58),u=i(114),l=i(55),c=i(9),d=i(1),f=i(75),p=i(8),g=i(12),m=i(13),v=i(31),y=i(67),x=i(60),w=new r({Extends:c,initialize:function(t){c.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new c,this.enabled=!0,this.displayList,this.cameras,f.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0,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._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"],t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once("destroy",this.destroy,this),this.pluginEvents.emit("boot")},start:function(){var t=this.systems.events;t.on("transitionstart",this.transitionIn,this),t.on("transitionout",this.transitionOut,this),t.on("transitioncomplete",this.transitionComplete,this),t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.enabled=!0,this.pluginEvents.emit("start")},preUpdate:function(){this.pluginEvents.emit("preUpdate");var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r<i;r++){var o=t[r],a=n.indexOf(o);a>-1&&(n.splice(a,1),this.clear(o))}t.length=0,this._pendingRemoval.length=0,this._list=n.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},update:function(t,e){if(this.isActive()){this.pluginEvents.emit("update",t,e);var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var s=i.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s)for(var n=this.manager.pointers,r=0;r<this.manager.pointersTotal;r++){var o=n[r];this._tempZones=[],this._temp=this.hitTestPointer(o),this.sortGameObjects(this._temp),this.sortGameObjects(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1));var a=this.processDragEvents(o,t);o.wasTouch||(a+=this.processOverOutEvents(o)),o.justDown&&(a+=this.processDownEvents(o)),o.justUp&&(a+=this.processUpEvents(o)),o.justMoved&&(a+=this.processMoveEvents(o)),a>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}}},clear:function(t){var e=t.input;if(e){this.queueForRemoval(t),e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null;var i=this._draggable.indexOf(t);return i>-1&&this._draggable.splice(i,1),(i=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(i,1),(i=this._over[0].indexOf(t))>-1&&this._over[0].splice(i,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i<e.length;i++){for(var s=e[i],n=this.manager.hitTest(t,this._list,s),r=0;r<n.length;r++){var o=n[r];o.input.dropZone&&this._tempZones.push(o)}if(n.length>0)return t.camera=s,n}return t.camera=e[0],[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,s=0;s<e.length;s++){var n=e[s];n.input&&(i++,n.emit("pointerdown",t,n.input.localX,n.input.localY,t.camera),this.emit("gameobjectdown",t,n))}return i},processDragEvents:function(t,e){if(0===this._draggable.length)return 0;var i,s,n,r,o=this._temp;if(0===t.dragState&&t.primaryDown&&t.justDown&&o.length>0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var a=[];for(i=0;i<o.length;i++)(s=o[i]).input.draggable&&0===s.input.dragState&&a.push(s);if(0===a.length)return t.dragState=0,0;a.length>1&&(this.sortGameObjects(a),this.topOnly&&a.splice(1)),this._drag[t.id]=a,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&h(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3===t.dragState){for(n=this._drag[t.id],i=0;i<n.length;i++)(r=(s=n[i]).input).dragState=2,r.dragX=t.x-s.x,r.dragY=t.y-s.y,r.dragStartX=s.x,r.dragStartY=s.y,s.emit("dragstart",t,r.dragX,r.dragY),this.emit("dragstart",t,s);return t.dragState=4,n.length}if(4===t.dragState&&t.justMoved&&!t.justUp){var u=this._tempZones;for(n=this._drag[t.id],i=0;i<n.length;i++){if((r=(s=n[i]).input).target){var l=u.indexOf(r.target);0===l?(s.emit("dragover",t,r.target),this.emit("dragover",t,s,r.target)):l>0?(s.emit("dragleave",t,r.target),this.emit("dragleave",t,s,r.target),r.target=u[0],s.emit("dragenter",t,r.target),this.emit("dragenter",t,s,r.target)):(s.emit("dragleave",t,r.target),this.emit("dragleave",t,s,r.target),u[0]?(r.target=u[0],s.emit("dragenter",t,r.target),this.emit("dragenter",t,s,r.target)):r.target=null)}else!r.target&&u[0]&&(r.target=u[0],s.emit("dragenter",t,r.target),this.emit("dragenter",t,s,r.target));var c=t.x-s.input.dragX,d=t.y-s.input.dragY;s.emit("drag",t,c,d),this.emit("drag",t,s,c,d)}return n.length}if(5===t.dragState){for(n=this._drag[t.id],i=0;i<n.length;i++)if(2===(r=(s=n[i]).input).dragState){r.dragState=0,r.dragX=r.localX-s.displayOriginX,r.dragY=r.localY-s.displayOriginY;var f=!1;r.target&&(s.emit("drop",t,r.target),this.emit("drop",t,s,r.target),r.target=null,f=!0),s.emit("dragend",t,r.dragX,r.dragY,f),this.emit("dragend",t,s,f)}t.dragState=0,n.splice(0)}return 0},processMoveEvents:function(t){var e=this._temp;this.emit("pointermove",t,e);for(var i=0,s=0;s<e.length;s++){var n=e[s];if(n.input&&(i++,n.emit("pointermove",t,n.input.localX,n.input.localY),this.emit("gameobjectmove",t,n),this.topOnly))break}return i},processOverOutEvents:function(t){var e,i,s=this._temp,n=[],r=[],o=[],a=this._over[t.id],h=this._drag[t.id],u=this.manager;for(e=0;e<a.length;e++)i=a[e],-1===s.indexOf(i)&&-1===h.indexOf(i)?n.push(i):o.push(i);for(e=0;e<s.length;e++)i=s[e],-1===a.indexOf(i)&&r.push(i);var l=n.length,c=0;if(l>0)for(this.sortGameObjects(n),this.emit("pointerout",t,n),e=0;e<l;e++)(i=n[e]).input&&(this.emit("gameobjectout",t,i),i.emit("pointerout",t),u.resetCursor(i.input),c++);if((l=r.length)>0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e<l;e++)(i=r[e]).input&&(this.emit("gameobjectover",t,i),i.emit("pointerover",t,i.input.localX,i.input.localY),u.setCursor(i.input),c++);return a=o.concat(r),this._over[t.id]=this.sortGameObjects(a),c},processUpEvents:function(t){var e=this._temp;this.emit("pointerup",t,e);for(var i=0;i<e.length;i++){var s=e[i];s.input&&(s.emit("pointerup",t,s.input.localX,s.input.localY),this.emit("gameobjectup",t,s))}return e.length},queueForInsertion:function(t){return-1===this._pendingInsertion.indexOf(t)&&-1===this._list.indexOf(t)&&this._pendingInsertion.push(t),this},queueForRemoval:function(t){return this._pendingRemoval.push(t),this},setDraggable:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var s=t[i];s.input.draggable=e;var n=this._draggable.indexOf(s);e&&-1===n?this._draggable.push(s):!e&&n>-1&&this._draggable.splice(n,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return a(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,n=!1,r=!1,a=!1;if(p(e)){var h=e;e=d(h,"hitArea",null),i=d(h,"hitAreaCallback",null),s=d(h,"draggable",!1),n=d(h,"dropZone",!1),r=d(h,"cursor",!1),a=d(h,"useHandCursor",!1);var u=d(h,"pixelPerfect",!1),l=d(h,"alphaTolerance",1);u&&(e={},i=this.makePixelPerfect(l)),e&&i||this.setHitAreaFromTexture(t)}else"function"!=typeof e||i||(i=e,e={});for(var c=0;c<t.length;c++){var f=t[c],g=f.input?f.input:o(f,e,i);g.dropZone=n,g.cursor=a?"pointer":r,f.input=g,s&&this.setDraggable(f),this.queueForInsertion(f)}return this},setHitAreaCircle:function(t,e,i,r,o){void 0===o&&(o=n);var a=new s(e,i,r);return this.setHitArea(t,a,o)},setHitAreaEllipse:function(t,e,i,s,n,r){void 0===r&&(r=l);var o=new u(e,i,s,n);return this.setHitArea(t,o,r)},setHitAreaFromTexture:function(t,e){void 0===e&&(e=v),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var s=t[i],n=s.frame,r=0,a=0;n?(r=n.realWidth,a=n.realHeight):s.width&&(r=s.width,a=s.height),"Container"!==s.type||0!==r&&0!==a?0!==r&&0!==a&&(s.input=o(s,new m(0,0,r,a),e),this.queueForInsertion(s)):console.warn("Container.setInteractive() must specify a Shape or call setSize() first")}return this},setHitAreaRectangle:function(t,e,i,s,n,r){void 0===r&&(r=v);var o=new m(e,i,s,n);return this.setHitArea(t,o,r)},setHitAreaTriangle:function(t,e,i,s,n,r,o,a){void 0===a&&(a=x);var h=new y(e,i,s,n,r,o);return this.setHitArea(t,h,a)},setPollAlways:function(){return this.pollRate=0,this._pollTimer=0,this},setPollOnMove:function(){return this.pollRate=-1,this._pollTimer=0,this},setPollRate:function(t){return this.pollRate=t,this._pollTimer=0,this},setGlobalTopOnly:function(t){return this.manager.globalTopOnly=t,this},setTopOnly:function(t){return this.topOnly=t,this},sortGameObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerGO.bind(this)))},sortHandlerGO:function(t,e){if(!t.parentContainer&&!e.parentContainer)return this.displayList.getIndex(e)-this.displayList.getIndex(t);if(t.parentContainer===e.parentContainer)return e.parentContainer.getIndex(e)-t.parentContainer.getIndex(t);if(t.parentContainer===e)return-1;if(e.parentContainer===t)return 1;for(var i=t.getIndexList(),s=e.getIndexList(),n=Math.min(i.length,s.length),r=0;r<n;r++){var o=i[r],a=s[r];if(o!==a)return a-o}return 0},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},addUpCallback:function(t,e){return this.manager.addUpCallback(t,e),this},addDownCallback:function(t,e){return this.manager.addDownCallback(t,e),this},addMoveCallback:function(t,e){return this.manager.addMoveCallback(t,e),this},addPointer:function(t){return this.manager.addPointer(t)},setDefaultCursor:function(t){return this.manager.setDefaultCursor(t),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("shutdown"),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.systems.events;e.off("transitionstart",this.transitionIn,this),e.off("transitionout",this.transitionOut,this),e.off("transitioncomplete",this.transitionComplete,this),e.off("preupdate",this.preUpdate,this),e.off("update",this.update,this),e.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.pluginEvents.emit("destroy"),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off("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}},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]}}});g.register("InputPlugin",w,"input"),t.exports=w},function(t,e){t.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(t,e){t.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(t,e){t.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(t,e,i){t.exports={DUALSHOCK_4:i(385),SNES_USB:i(384),XBOX_360:i(383)}},function(t,e,i){var s=i(0),n=i(9),r=i(177),o=i(4),a=i(75),h=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once("boot",this.boot,this),t.pluginEvents.on("start",this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=o(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=o(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once("destroy",this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once("shutdown",this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on("update",this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off("update",this.update)},disconnectAll:function(){for(var t=0;t<this.gamepads.length;t++)this.gamepads.connected=!1},refreshPads:function(){var t=navigator.getGamepads();if(t)for(var e=this.gamepads,i=0;i<t.length;i++){var s=t[i];if(s){var n=s.id,o=s.index,a=e[o];if(a)a.id!==n?(a.destroy(),e[o]=new r(this,s)):a.update(s);else{var h=new r(this,s);e[o]=h,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=h):this._pad3=h:this._pad2=h:this._pad1=h}}}else this.disconnectAll()},getAll:function(){for(var t=[],e=this.gamepads,i=0;i<e.length;i++)e[i]&&t.push(e[i]);return t},getPad:function(t){for(var e=this.gamepads,i=0;i<e.length;i++)if(e[i]&&e[i].index===t)return e[i]},update:function(){if(this.enabled){this.refreshPads();var t=this.queue.length;if(0!==t)for(var e=this.queue.splice(0,t),i=0;i<t;i++){var s=e[i],n=this.getPad(s.gamepad.index);"gamepadconnected"===s.type?this.emit("connected",n,s):"gamepaddisconnected"===s.type&&this.emit("disconnected",n,s)}}},shutdown:function(){this.stopListeners(),this.disconnectAll(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var t=0;t<this.gamepads.length;t++)this.gamepads[t]&&this.gamepads[t].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}}});a.register("GamepadPlugin",h,"gamepad","gamepad","inputGamepad"),t.exports=h},function(t,e,i){t.exports={Axis:i(179),Button:i(178),Gamepad:i(177),GamepadPlugin:i(387),Configs:i(386)}},function(t,e,i){var s=i(205),n=i(16),r={CreateInteractiveObject:i(180),Gamepad:i(388),InputManager:i(206),InputPlugin:i(382),InputPluginCache:i(75),Keyboard:i(380),Mouse:i(368),Pointer:i(203),Touch:i(367)};r=n(!1,r,s),t.exports=r},,,,,,,,,,,,,,,,,,function(t,e,i){var s=i(25),n=i(14),r=i(10),o=i(110);n.register("text",function(t,e){void 0===t&&(t={});var i=r(t,"text",""),n=r(t,"style",null),a=r(t,"padding",null);null!==a&&(n.padding=a);var h=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h})},function(t,e,i){var s=i(25),n=i(128),r=i(14),o=i(10),a=i(35);r.register("sprite",function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,h,t),n(h,t),h})},function(t,e,i){var s=i(25),n=i(14),r=i(10),o=i(68);n.register("image",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),a=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,a,t),a})},function(t,e,i){var s=i(14),n=i(115);s.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new n(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var s=i(110);i(11).register("text",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},function(t,e,i){var s=i(11),n=i(35);s.register("sprite",function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var s=i(68);i(11).register("image",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},function(t,e,i){var s=i(115);i(11).register("graphics",function(t){return this.displayList.add(new s(this.scene,t))})},,function(t,e,i){var s=i(24);t.exports=function(t){var e=s.create(this),i=e.getContext("2d");t.syncFont(e,i);var n=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=n,o=2*r;r=r*t.baselineY|0,e.width=n,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,n,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,n,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,s.remove(e),a;var h,u,l=i.getImageData(0,0,n,o).data,c=l.length,d=4*n,f=0,p=!1;for(h=0;h<r;h++){for(u=0;u<d;u+=4)if(255!==l[f+u]){p=!0;break}if(p)break;f+=d}for(a.ascent=r-h,f=c-d,p=!1,h=o;h>r;h--){for(u=0;u<d;u+=4)if(255!==l[f+u]){p=!0;break}if(p)break;f-=d}return a.descent=h-r,a.fontSize=a.ascent+a.descent,s.remove(e),a}},function(t,e,i){var s=i(0),n=i(10),r=i(4),o=i(416),a={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],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new s({initialize:function(t,e){this.parent=t,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.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){for(var i in void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):n(t,a[i][0],a[i][1]);var s=r(t,"font",null);this._font=null===s?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):s;var o=r(t,"fill",null);return null!==o&&(this.color=o),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===s&&(s=0),void 0===n&&(n=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=n,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var s=i(2);t.exports=function(t,e,i,n,r){if(!(s.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&n.id||""===e.text)){var o=t.currentContext,a=n.alpha*e.alpha;if(0!==a){t.currentAlpha!==a&&(t.currentAlpha=a,o.globalAlpha=a),t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var h=e.canvas;if(o.save(),void 0!==r){var u=r.matrix;o.transform(u[0],u[1],u[2],u[3],u[4],u[5])}var l=e.x-n.scrollX*e.scrollFactorX,c=e.y-n.scrollY*e.scrollFactorY;n.roundPixels&&(l|=0,c|=0),o.translate(l,c),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY),o.translate(h.width*(e.flipX?1:0),h.height*(e.flipY?1:0)),o.scale(e.flipX?-1:1,e.flipY?-1:1),o.drawImage(h,0,0,h.width,h.height,-e.displayOriginX,-e.displayOriginY,h.width,h.height),o.restore()}}}},function(t,e,i){var s=i(2),n=i(21);t.exports=function(t,e,i,r,o){if(!(s.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&r.id||""===e.text)){e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture),e.dirty=!1);var a=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,e.canvasTexture,e.canvasTexture.width,e.canvasTexture.height,e.x,e.y,e.canvasTexture.width,e.canvasTexture.height,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,e.canvasTexture.width,e.canvasTexture.height,a(e._tintTL,r.alpha*e._alphaTL),a(e._tintTR,r.alpha*e._alphaTR),a(e._tintBL,r.alpha*e._alphaBL),a(e._tintBR,r.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,r,o)}}},function(t,e,i){var s=i(3),n=i(3);s=i(419),n=i(418),t.exports={renderWebGL:s,renderCanvas:n}},function(t,e){t.exports=function(t,e,i){var s=t.canvas,n=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLines<i.length&&(h=r.maxLines),r.syncFont(s,n);for(var u=0;u<h;u++){var l=r.strokeThickness;l+=n.measureText(i[u]).width,r.wordWrap&&(l-=n.measureText(" ").width),o[u]=Math.ceil(l),a=Math.max(a,o[u])}var c=e.fontSize+r.strokeThickness,d=c*h,f=t._lineSpacing||0;return f<0&&Math.abs(f)>c&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},,,,,,,,,function(t,e,i){var s=i(2);t.exports=function(t,e,i,n,r){s.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&n.id||t.drawImage(e,n,r)}},function(t,e,i){var s=i(2);t.exports=function(t,e,i,n,r){s.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&n.id||this.pipeline.batchSprite(e,n,r)}},function(t,e,i){var s=i(3),n=i(3);s=i(431),n=i(430),t.exports={renderWebGL:s,renderCanvas:n}},function(t,e,i){var s=i(2);t.exports=function(t,e,i,n,r){s.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&n._id||this.pipeline.batchGraphics(this,n,r)}},function(t,e,i){var s=i(3),n=i(3);s=i(433),n=i(181),n=i(181),t.exports={renderWebGL:s,renderCanvas:n}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e,i){var s=i(13);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e,i){var s=i(55);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},function(t,e,i){var s=i(55);t.exports=function(t,e){return s(t,e.x,e.y)}},function(t,e,i){var s=i(114);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},,,function(t,e,i){var s=i(0),n=i(12),r=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,s;for(i=0;i<t;i++){s=this._pendingRemoval[i];var n=this._list.indexOf(s);n>-1&&this._list.splice(n,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;i<this._list.length;i++){var s=this._list[i];s.active&&s.preUpdate.call(s,t,e)}},remove:function(t){var e=this._list.indexOf(t);return-1!==e&&this._list.splice(e,1),t},removeAll:function(){for(var t=this._list.length;t--;)this.remove(this._list[t]);return this},shutdown:function(){this.removeAll(),this._list.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var t=this.systems.events;t.off("preupdate",this.preUpdate,this),t.off("update",this.update,this),t.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null},length:{get:function(){return this._list.length}}});n.register("UpdateList",r,"updateList"),t.exports=r},function(t,e){t.exports=function(t,e,i){if(e!==i){var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[n]=e,t}}},function(t,e,i){var s=i(29);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o<r;o++){var a=t[o];a.hasOwnProperty(e)&&(a[e]=i)}return t}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e){t.exports=function(t,e,i){var s=t.indexOf(e),n=t.indexOf(i);return-1!==s&&-1===n&&(t[s]=i,!0)}},function(t,e,i){var s=i(56);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return s(t,n)}},function(t,e,i){var s=i(29);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),s(t,e,i)){var o=i-e,a=t.splice(e,o);if(n)for(var h=0;h<a.length;h++){var u=a[h];n.call(r,u)}return a}return[]}},function(t,e,i){var s=i(56);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},function(t,e,i){var s=i(248);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(s((e-t)/(i||1)),0),o=0;o<r;o++)n.push(t),t+=i;return n}},function(t,e){t.exports=function(t,e,i,s){for(var n=[],r=t;r<=e;r++)if(i||s){var o=i?i+r.toString():r.toString();s&&(o=o.concat(s)),n.push(o)}else n.push(r);return n}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i<t.length-2){var s=t[i+1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},function(t,e){t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},function(t,e,i){var s=i(29);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o<r;o++){var a=t[o];if(!e||e&&void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)return a}return null}},function(t,e,i){var s=i(29);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=[];if(s(t,n,r))for(var a=n;a<r;a++){var h=t[a];(!e||e&&void 0===i&&h.hasOwnProperty(e)||e&&void 0!==i&&h[e]===i)&&o.push(h)}return o}},function(t,e,i){var s=i(29);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r)){var o,a=[null];for(o=5;o<arguments.length;o++)a.push(arguments[o]);for(o=n;o<r;o++)a[0]=t[o],e.apply(i,a)}return t}},function(t,e){t.exports=function(t,e,i){var s,n=[null];for(s=3;s<arguments.length;s++)n.push(arguments[s]);for(s=0;s<t.length;s++)n[0]=t[s],e.apply(i,n);return t}},function(t,e,i){var s=i(29);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=0;if(s(t,n,r))for(var a=n;a<r;a++)t[a][e]===i&&o++;return o}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},function(t,e){t.exports=function(t,e,i,s,n,r){if(void 0===i&&(i=0),void 0===r&&(r=t),s>0){var o=s-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),n&&n.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;s>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var u=e[h];t.splice(i,0,u),n&&n.call(r,u)}return e}},function(t,e){t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a<o;a++){var h=e[a];t.push(h),s&&s.call(n,h)}return e}},function(t,e,i){var s=i(76);t.exports=function(t){return s(t,-90)}},function(t,e,i){var s=i(76);t.exports=function(t){return s(t,90)}},function(t,e,i){var s=i(76);t.exports=function(t){return s(t,180)}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e,i){var s=i(134),n=i(116);t.exports=function(t){var e="";if(!n(t))return e;for(var i=0;i<t.length;i++){for(var r=0;r<t[i].length;r++){var o=t[i][r].toString();e+="undefined"!==o?s(o,2):"?",r<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var a=0;a<t[i].length;a++)e+="---",a<t[i].length-1&&(e+="+");e+="\n"}}return e}},function(t,e,i){t.exports={CheckMatrix:i(116),MatrixToString:i(472),ReverseColumns:i(471),ReverseRows:i(470),Rotate180:i(469),RotateLeft:i(468),RotateMatrix:i(76),RotateRight:i(467),TransposeMatrix:i(186)}},function(t,e,i){var s=i(0),n=i(93),r=i(12),o=i(83),a=new s({Extends:n,initialize:function(t){n.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){this.systems.events.once("shutdown",this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]},shutdown:function(){this.removeAll(),this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e){t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit("hidden"):i.emit("visible")},!1),window.onblur=function(){i.emit("blur")},window.onfocus=function(){i.emit("focus")},window.focus&&t.config.autoFocus&&(window.focus(),t.canvas.addEventListener("mousedown",function(){window.focus()},{passive:!0})),t.canvas&&(t.canvas.onmouseout=function(){t.isOver=!1,i.emit("mouseout")},t.canvas.onmouseover=function(){t.isOver=!0,i.emit("mouseover")})}},function(t,e,i){var s=i(0),n=i(4),r=i(3),o=i(262),a=new s({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=n(e,"min",5),this.targetFps=n(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=n(e,"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=n(e,"deltaHistory",10),this.panicMax=n(e,"panicMax",120),this.rawDelta=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 t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0,this.frame=0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=Math.min(this._target,this.deltaHistory[e]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(t){if(this.started)return this;this.started=!0,this.running=!0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=t,this.raf.start(this.step.bind(this),this.forceSetTimeOut)},step:function(t){this.frame++;var e=t-this.lastTime;e<0&&(e=0),this.rawDelta=e;var i=this.deltaIndex,s=this.deltaHistory,n=this.deltaSmoothingMax,r=e;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=s[i],r=Math.min(r,this._min)),s[i]=r,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var o=0,a=0;a<n;a++)o+=s[a];o/=n,this.delta=o,this.time+=this.rawDelta,t>this.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){var i=0,s=function(t,e,s,n){var r=i-n.y-n.height;t.add(s,e,n.x,r,n.width,n.height)};t.exports=function(t,e,n){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var o=n.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",u="",l={x:0,y:0,width:0,height:0},c=0;c<o.length;c++){var d=o[c].match(a);if(d){var f="- "===d[1],p=d[2],g=d[3];if(f&&(u!==h&&(s(t,e,u,l),h=u),l={x:0,y:0,width:0,height:0}),"name"!==p)switch(p){case"x":case"y":case"width":case"height":l[p]=parseInt(g,10)}else u=g}}return u!==h&&s(t,e,u,l),t}},function(t,e,i){var s=i(1);t.exports=function(t,e,i){var n=s(i,"frameWidth",null),r=s(i,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=s(i,"startFrame",0),h=s(i,"endFrame",-1),u=s(i,"margin",0),l=s(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,m=e.realHeight,v=Math.floor((g-u+l)/(n+l)),y=Math.floor((m-u+l)/(r+l)),x=v*y,w=e.x,T=n-w,b=n-(g-f-w),S=e.y,_=r-S,A=r-(m-p-S);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var E=u,C=u,M=0,P=e.sourceIndex,k=0;k<y;k++){for(var R=0===k,L=k===y-1,O=0;O<v;O++){var F=0===O,D=O===v-1;if(o=t.add(M,P,c+E,d+C,n,r),F||R||D||L){var I=F?w:0,B=R?S:0,U=n,N=r;F?U=T:D&&(U=b),R?N=_:L&&(N=A),o.cutWidth=U,o.cutHeight=N,o.setTrim(n,r,I,B,U,N)}E+=l,E+=F?T:D||n,M++}E=u,C+=l,C+=R?_:L?A:r}return t}},function(t,e,i){var s=i(1);t.exports=function(t,e,i,n,r,o,a){var h=s(a,"frameWidth",null),u=s(a,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var l=t.source[e];t.add("__BASE",e,0,0,l.width,l.height);var c=s(a,"startFrame",0),d=s(a,"endFrame",-1),f=s(a,"margin",0),p=s(a,"spacing",0),g=Math.floor((r-f+p)/(h+p))*Math.floor((o-f+p)/(u+p));0===g&&console.warn("SpriteSheet frame dimensions will result in zero frames."),(c>g||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var m=f,v=f,y=0,x=0,w=0;w<g;w++){y=0,x=0;var T=m+h,b=v+u;T>r&&(y=T-r),b>o&&(x=b-o),t.add(w,e,i+m,n+v,h-y,u-x),(m+=h+p)+h>r&&(m=f,v+=u+p)}return t}},function(t,e,i){var s=i(34);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,o=i.frames;for(var a in o){var h=o[a];r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),r.customData=s(h)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){var s=i(34);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a<o.length;a++){var h=o[a];r=t.add(h.filename,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),h.anchor&&(r.customPivot=!0,r.pivotX=h.anchor.x,r.pivotY=h.anchor.y),r.customData=s(h)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Array")}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var n,r=i.getElementsByTagName("SubTexture"),o=0;o<r.length;o++){var a=r[o].attributes,h=a.name.value,u=parseInt(a.x.value,10),l=parseInt(a.y.value,10),c=parseInt(a.width.value,10),d=parseInt(a.height.value,10);if(n=t.add(h,e,u,l,c,d),a.frameX){var f=Math.abs(parseInt(a.frameX.value,10)),p=Math.abs(parseInt(a.frameY.value,10)),g=parseInt(a.frameWidth.value,10),m=parseInt(a.frameHeight.value,10);n.setTrim(c,d,f,p,g,m)}}return t}console.warn("Invalid Texture Atlas XML given")}},function(t,e,i){var s=i(0),n=i(85),r=i(117),o=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.add("__BASE",0,0,0,s,n),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d"),this.width=s,this.height=n},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(){return this.context.clearRect(0,0,this.width,this.height),this},setSize:function(t,e){return void 0===e&&(e=t),t===this.width&&e===this.height||(this.canvas.width=t,this.canvas.height=e,this._source.width=t,this._source.height=e,this._source.isPowerOf2=n(t,e),this.frames.__BASE.setSize(t,e,0,0),this.refresh()),this}});t.exports=o},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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"}},function(t,e,i){var s=i(1);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=s(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){var s=i(1),n=i(249);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=s(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(n(e+"Physics")),i)for(var o in i)o=n(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],s=document.createElement("div");for(t=0;t<e.length;t++)if(s[e[t]]){i.available=!0,i.request=e[t];break}var n=["cancelFullScreen","exitFullscreen","webkitCancelFullScreen","webkitExitFullscreen","msCancelFullScreen","msExitFullscreen","mozCancelFullScreen","mozExitFullscreen"];if(i.available)for(t=0;t<n.length;t++)if(document[n[t]]){i.cancel=n[t];break}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&(i.keyboard=!0),i}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e,i){var s=i(80),n={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){n.audioData=!!window.Audio,n.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(n.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(n.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(n.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(n.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(n.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(n.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(s.edge)n.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(n.dolby=!0)}}catch(t){}return n}()},function(t,e,i){var s=i(57),n=i(80),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),s.cocoonJS||("onwheel"in window||n.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){t.exports={os:i(57),browser:i(80),features:i(120),input:i(492),audio:i(491),video:i(490),fullscreen:i(489),canvasFeatures:i(208)}},function(t,e,i){var s=i(22);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var n,r=e.audio,o=t.device.audio;if(n=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+s.VERSION+" / https://phaser.io");else{var a,h="",u=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),u.push("background: "+t),a=t}),u[u.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),u.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),u.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+s.VERSION+" ("+i+" | "+n+")")),h=h.concat(" %c "+e.gameURL),u[0]=h,console.log.apply(console,u)}}}},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texel = texture2D(uMainSampler, outTexCoord);",""," if (outTintEffect == 1.0)"," {"," texel.rgb = mix(texel.rgb, outTint.rgb, texel.a);"," }"," else"," {"," texel *= vec4(outTint.rgb * outTint.a, outTint.a);"," }",""," gl_FragColor = texel;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_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];","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(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("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FLAT_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec4 inTint;","","varying vec4 outTint;","","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);"," outTint = inTint;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FLAT_TINT_FS","","precision mediump float;","","varying vec4 outTint;","","void main() {"," gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);","}",""].join("\n")},function(t,e){t.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("\n")},function(t,e){t.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("\n")},function(t,e,i){var s=i(266),n=i(24),r=i(22),o=i(120);t.exports=function(t){var e,a,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.antialias||n.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=n.create(t,h.width,h.height,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.antialias||s.setCrisp(t.canvas),1!==h.zoom&&(t.canvas.style.width=(h.width*h.zoom).toString()+"px",t.canvas.style.height=(h.height*h.zoom).toString()+"px"),h.renderType!==r.HEADLESS&&(e=i(261),a=i(256),h.renderType===r.WEBGL?(t.renderer=new a(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var s=i(0),n=i(22),r=i(1),o=i(4),a=i(8),h=i(15),u=i(3),l=i(121),c=i(133),d=new s({initialize:function(t){void 0===t&&(t={});this.width=o(t,"width",1024),this.height=o(t,"height",768),this.zoom=o(t,"zoom",1),this.resolution=o(t,"resolution",1),this.renderType=o(t,"type",n.AUTO),this.parent=o(t,"parent",null),this.canvas=o(t,"canvas",null),this.context=o(t,"context",null),this.canvasStyle=o(t,"canvasStyle",null),this.sceneConfig=o(t,"scene",null),this.seed=o(t,"seed",[(Date.now()*Math.random()).toString()]),h.RND.init(this.seed),this.gameTitle=o(t,"title",""),this.gameURL=o(t,"url","https://phaser.io"),this.gameVersion=o(t,"version",""),this.autoFocus=o(t,"autoFocus",!0),this.inputKeyboard=o(t,"input.keyboard",!0),this.inputKeyboardEventTarget=o(t,"input.keyboard.target",window),this.inputMouse=o(t,"input.mouse",!0),this.inputMouseEventTarget=o(t,"input.mouse.target",null),this.inputMouseCapture=o(t,"input.mouse.capture",!0),this.inputTouch=o(t,"input.touch",!0),this.inputTouchEventTarget=o(t,"input.touch.target",null),this.inputTouchCapture=o(t,"input.touch.capture",!0),this.inputActivePointers=o(t,"input.activePointers",1),this.inputGamepad=o(t,"input.gamepad",!1),this.inputGamepadEventTarget=o(t,"input.gamepad.target",window),this.disableContextMenu=o(t,"disableContextMenu",!1),this.audio=o(t,"audio"),this.hideBanner=!1===o(t,"banner",null),this.hidePhaser=o(t,"banner.hidePhaser",!1),this.bannerTextColor=o(t,"banner.text","#ffffff"),this.bannerBackgroundColor=o(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=o(t,"fps",null);var e=o(t,"render",t);this.autoResize=o(e,"autoResize",!1),this.antialias=o(e,"antialias",!0),this.roundPixels=o(e,"roundPixels",!1),this.pixelArt=o(e,"pixelArt",!1),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=o(e,"transparent",!1),this.clearBeforeRender=o(e,"clearBeforeRender",!0),this.premultipliedAlpha=o(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=o(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=o(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=o(e,"powerPreference","default"),this.batchSize=o(e,"batchSize",2e3);var i=o(t,"backgroundColor",0);this.backgroundColor=c(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=o(t,"callbacks.preBoot",u),this.postBoot=o(t,"callbacks.postBoot",u),this.physics=o(t,"physics",{}),this.defaultPhysicsSystem=o(this.physics,"default",!1),this.loaderBaseURL=o(t,"loader.baseURL",""),this.loaderPath=o(t,"loader.path",""),this.loaderMaxParallelDownloads=o(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=o(t,"loader.crossOrigin",void 0),this.loaderResponseType=o(t,"loader.responseType",""),this.loaderAsync=o(t,"loader.async",!0),this.loaderUser=o(t,"loader.user",""),this.loaderPassword=o(t,"loader.password",""),this.loaderTimeout=o(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=o(t,"plugins",null),d=l.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:a(s)&&(this.installGlobalPlugins=r(s,"global",[]),this.installScenePlugins=r(s,"scene",[]),Array.isArray(s.default)?d=s.default:Array.isArray(s.defaultMerge)&&(d=d.concat(s.defaultMerge)))),this.defaultPlugins=d;var f="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=o(t,"images.default",f+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=o(t,"images.missing",f+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==")}});t.exports=d},function(t,e,i){var s=i(131),n=i(212),r=i(210),o=i(24),a=i(0),h=i(503),u=i(502),l=i(81),c=i(494),d=i(493),f=i(265),p=i(9),g=i(206),m=i(201),v=i(199),y=i(196),x=i(189),w=i(476),T=i(475),b=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new n(this),this.textures=new x(this),this.cache=new r(this),this.registry=new l(this),this.input=new g(this,this.config),this.scene=new v(this,this.config.sceneConfig),this.device=d,this.sound=y.create(this),this.loop=new w(this,this.config.fps),this.plugins=new m(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.hasFocus=!1,this.isOver=!0,f(this.boot.bind(this))},boot:function(){this.isBooted=!0,this.config.preBoot(this),u(this),c(this),s(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("ready",this.start,this)},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)),T(this);var t=this.events;t.on("hidden",this.onHidden,this),t.on("visible",this.onVisible,this),t.on("blur",this.onBlur,this),t.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e);var s=this.renderer;s.preRender(),i.emit("prerender",s,t,e),this.scene.render(s),s.postRender(),i.emit("postrender",s,t,e)},headlessStep:function(t,e){var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e),i.emit("prerender"),i.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t){this.pendingDestroy=!0,this.removeCanvas=t},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=b},function(t,e,i){var s=i(0),n=i(9),r=i(12),o=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){t.exports={EventEmitter:i(505)}},function(t,e){var i,s,n=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{s="function"==typeof clearTimeout?clearTimeout:o}catch(t){s=o}}();var h,u=[],l=!1,c=-1;function d(){l&&h&&(l=!1,h.length?u=h.concat(u):c=-1,u.length&&f())}function f(){if(!l){var t=a(d);l=!0;for(var e=u.length;e;){for(h=u,u=[];++c<e;)h&&h[c].run();c=-1,e=u.length}h=null,l=!1,function(t){if(s===clearTimeout)return clearTimeout(t);if((s===o||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(t);try{s(t)}catch(e){try{return s.call(null,t)}catch(e){return s.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new p(t,e)),1!==u.length||l||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t,e,i){t.exports={BitmapMask:i(219),GeometryMask:i(218)}},,,,,function(t,e,i){var s=i(0),n=i(81),r=i(12),o=new s({Extends:n,initialize:function(t){n.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.events=this.systems.events,this.events.once("destroy",this.destroy,this)},start:function(){this.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){n.prototype.destroy.call(this),this.events.off("start",this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",o,"data"),t.exports=o},function(t,e,i){t.exports={DataManager:i(81),DataManagerPlugin:i(513)}},,,,,,,,,,function(t,e,i){var s=i(2);t.exports=function(t,e,i,n,r){s.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&n.id||t.drawImage(e,n,r)}},function(t,e,i){var s=i(2);t.exports=function(t,e,i,n,r){s.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&n.id||this.pipeline.batchSprite(e,n,r)}},function(t,e,i){var s=i(3),n=i(3);s=i(525),n=i(524),t.exports={renderWebGL:s,renderCanvas:n}},,,,,,function(t,e,i){var s=i(124),n=i(0),r=i(1),o=i(12),a=i(31),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.baseScale=1,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.systems.events.once("destroy",this.destroy,this)},start:function(){this.main||this.boot();var t=this.systems.events;t.on("update",this.update,this),t.once("shutdown",this.shutdown,this)},add:function(t,e,i,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new s(t,e,i,n);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var s=!1,n=0;n<t.length;n++){var r=t[n];r&&r.id===e&&(s=!0)}if(!s)return e;e<<=1}return 0},getTotal:function(t){void 0===t&&(t=!1);for(var e=0,i=this.cameras,s=0;s<i.length;s++){var n=i[s];(!t||t&&n.visible)&&e++}return e},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,s=0;s<t.length;s++){var n=t[s],o=r(n,"x",0),a=r(n,"y",0),h=r(n,"width",e),u=r(n,"height",i),l=this.add(o,a,h,u);l.name=r(n,"name",""),l.zoom=r(n,"zoom",1),l.rotation=r(n,"rotation",0),l.scrollX=r(n,"scrollX",0),l.scrollY=r(n,"scrollY",0),l.roundPixels=r(n,"roundPixels",!1),l.visible=r(n,"visible",!0);var c=r(n,"backgroundColor",!1);c&&l.setBackgroundColor(c);var d=r(n,"bounds",null);if(d){var f=r(d,"x",0),p=r(d,"y",0),g=r(d,"width",e),m=r(d,"height",i);l.setBounds(f,p,g,m)}}return this},getCamera:function(t){for(var e=this.cameras,i=0;i<e.length;i++)if(e[i].name===t)return e[i];return null},getCamerasBelowPointer:function(t){for(var e=this.cameras,i=t.x,s=t.y,n=[],r=0;r<e.length;r++){var o=e[r];o.visible&&o.inputEnabled&&a(o,i,s)&&n.unshift(o)}return n},remove:function(t){Array.isArray(t)||(t=[t]);for(var e=0,i=this.cameras,s=0;s<t.length;s++){var n=i.indexOf(t[s]);-1!==n&&(i.splice(n,1),e++)}return this.main||(this.main=i[0]),e},render:function(t,e,i){for(var s=this.scene,n=this.cameras,r=this.baseScale,o=t.config.resolution,a=0;a<this.cameras.length;a++){var h=n[a];h.visible&&h.alpha>0&&(h.preRender(r,o),t.render(s,e,i,h))}},resetAll:function(){for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].update(t,e)},resize:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].setSize(t,e)},shutdown:function(){this.main=void 0;for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();this.cameras=[];var e=this.systems.events;e.off("update",this.update,this),e.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null}});o.register("CameraManager",h,"cameras"),t.exports=h},function(t,e,i){var s=i(19),n=i(0),r=i(123),o=new n({initialize:function(t){this.camera=t,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(t,e,i,s,n,o){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===s&&(s=!1),void 0===n&&(n=null),void 0===o&&(o=this.camera.scene);var a=this.camera;return!s&&this.isRunning?a:(this.isRunning=!0,this.duration=e,this.progress=0,this.source=a.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=n,this._onUpdateScope=o,this.camera.emit("camerazoomstart",this.camera,this,e,t),a)},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(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("camerazoomcomplete",this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=o},function(t,e,i){var s=i(19),n=i(0),r=i(6),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===s&&(s=null),void 0===n&&(n=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=n,this.camera.emit("camerashakestart",this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var i=this.intensity,n=this.camera.width,r=this.camera.height,o=this.camera.zoom;this._offsetX=(Math.random()*i.x*n*2-i.x*n)*o,this._offsetY=(Math.random()*i.y*r*2-i.y*r)*o,this.camera.roundPixels&&(this._offsetX|=0,this._offsetY|=0)}else this.effectComplete()},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit("camerashakecomplete",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}});t.exports=o},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e,i){var s=i(19),n=i(0),r=i(6),o=i(123),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,r,a){void 0===i&&(i=1e3),void 0===s&&(s=o.Linear),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning?h:(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(h.scrollX,h.scrollY),this.destination.set(t,e),h.getScroll(t,e,this.current),"string"==typeof s&&o.hasOwnProperty(s)?this.ease=o[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit("camerapanstart",this.camera,this,i,t,e),h)},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed<this.duration){var r=this.ease(i);n.getScroll(this.destination.x,this.destination.y,this.current);var o=this.source.x+(this.current.x-this.source.x)*r,a=this.source.y+(this.current.y-this.source.y)*r;n.setScroll(o,a),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,o,a)}else n.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,n.scrollX,n.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit("camerapancomplete",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}});t.exports=a},function(t,e,i){var s=i(19),n=new(i(0))({initialize:function(t){this.camera=t,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(t,e,i,s,n,r,o){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===o&&(o=this.camera.scene),!n&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=s,this.alpha=1,this._elapsed=0,this._onUpdate=r,this._onUpdateScope=o,this.camera.emit("cameraflashstart",this.camera,this,t,e,i,s),this.camera)},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(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(t){if(!this.isRunning)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(t,e){if(!this.isRunning)return!1;var i=this.camera,s=this.red/255,n=this.blue/255,r=this.green/255;return t.batchFillRect(0,0,1,1,0,i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha,1,0,0,1,0,0,[1,0,0,1,0,0]),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit("cameraflashcomplete",this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=n},function(t,e,i){var s=i(19),n=new(i(0))({initialize:function(t){this.camera=t,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(t,e,i,s,n,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=s,this.blue=n,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?"camerafadeoutstart":"camerafadeinstart";return this.camera.emit(h,this.camera,this,e,i,s,n),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(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.effectComplete())},postRenderCanvas:function(t){if(!this.isRunning&&!this.isComplete)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(t,e){if(!this.isRunning&&!this.isComplete)return!1;var i=this.camera,s=this.red/255,n=this.blue/255,r=this.green/255;return t.batchFillRect(0,0,1,1,0,i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha,1,0,0,1,0,0,[1,0,0,1,0,0]),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var t=this.direction?"camerafadeoutcomplete":"camerafadeincomplete";this.camera.emit(t,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=n},function(t,e,i){t.exports={Camera:i(124),CameraManager:i(532),Effects:i(209)}},function(t,e,i){t.exports={BaseCache:i(211),CacheManager:i(210)}},function(t,e,i){t.exports={Animation:i(215),AnimationFrame:i(213),AnimationManager:i(212)}},,,function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e,i){var s=i(15),n=i(32),r=i(217),o=i(216),a={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=r(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new n),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t){void 0===t&&(t=new n);var e=this.parentContainer;if(!e)return this.getLocalTransformMatrix(t);for(var i=[];e;)i.unshift(e),e=e.parentContainer;t.loadIdentity();for(var s=i.length,r=0;r<s;++r)e=i[r],t.translate(e.x,e.y),t.rotate(e.rotation),t.scale(e.scaleX,e.scaleY);return t.translate(this.x,this.y),t.rotate(this._rotation),t.scale(this._scaleX,this._scaleY),t}};t.exports=a},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},s={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,s,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,s=t,n=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(s),this._tintBR=i(n),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=s},function(t,e){var i={texture:null,frame:null,isCropped:!1,_crop:{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},setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(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}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var s=i(59),n={_scaleMode:s.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==s.LINEAR&&t!==s.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=n},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e){var i={matrixStack:null,currentMatrix:null,currentMatrixIndex:0,initMatrixStack:function(){return this.matrixStack=new Float32Array(6e3),this.currentMatrix=new Float32Array([1,0,0,1,0,0]),this.currentMatrixIndex=0,this},save:function(){if(this.currentMatrixIndex>=this.matrixStack.length)return this;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return this.currentMatrixIndex+=6,t[i+0]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],this},restore:function(){if(this.currentMatrixIndex<=0)return this;this.currentMatrixIndex-=6;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return e[0]=t[i+0],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],this},loadIdentity:function(){return this.setTransform(1,0,0,1,0,0),this},transform:function(t,e,i,s,n,r){var o=this.currentMatrix,a=o[0],h=o[1],u=o[2],l=o[3],c=o[4],d=o[5];return o[0]=a*t+u*e,o[1]=h*t+l*e,o[2]=a*i+u*s,o[3]=h*i+l*s,o[4]=a*n+u*r+c,o[5]=h*n+l*r+d,this},setTransform:function(t,e,i,s,n,r){var o=this.currentMatrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=s,o[4]=n,o[5]=r,this},translate:function(t,e){var i=this.currentMatrix,s=i[0],n=i[1],r=i[2],o=i[3],a=i[4],h=i[5];return i[4]=s*t+r*e+a,i[5]=n*t+o*e+h,this},scale:function(t,e){var i=this.currentMatrix,s=i[0],n=i[1],r=i[2],o=i[3];return i[0]=s*t,i[1]=n*t,i[2]=r*e,i[3]=o*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],s=e[1],n=e[2],r=e[3],o=Math.sin(t),a=Math.cos(t);return e[0]=i*a+n*o,e[1]=s*a+r*o,e[2]=i*-o+n*a,e[3]=s*-o+r*a,this}};t.exports=i},function(t,e,i){var s=i(219),n=i(218),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&this.texture&&(t=this),new s(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new n(this.scene,t)}};t.exports=r},function(t,e,i){var s=i(13),n=i(297),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getTopRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBounds:function(t){var e,i,n,r,o,a,h,u;if(void 0===t&&(t=new s),this.parentContainer){var l=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t),h=t.x,u=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,u=t.y;return t.x=Math.min(e,n,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,n,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e,i){var s=i(52),n={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=n},function(t,e,i){var s=i(19),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=n},,,,,,,,,,,,,function(t,e){if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var i=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e<this.length;e++)this[e]=0}else{Array.call(this,t.length),this.length=t.length;for(e=0;e<this.length;e++)this[e]=t[e]}},window[t].prototype=e,window[t].constructor=window[t]};i("Float32Array"),i("Uint32Array"),i("Uint16Array"),i("Int16Array"),i("ArrayBuffer")}},function(t,e,i){(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var i=Date.now(),s=["ms","moz","webkit","o"],n=0;n<s.length&&!t.requestAnimationFrame;++n)t.requestAnimationFrame=t[s[n]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[s[n]+"CancelAnimationFrame"]||t[s[n]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),s=16+i-e;return s<0&&(s=0),i=e,setTimeout(function(){i=Date.now(),t(performance.now())},s)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}).call(this,i(220))},function(t,e){!function(){if("performance"in window==!1&&(window.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in window.performance==!1){var t=Date.now();performance.timing&&performance.timing.navigationStart&&(t=performance.timing.navigationStart),window.performance.now=function(){return Date.now()-t}}}()},function(t,e){Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)})},function(t,e){var i;Function.prototype.bind||(Function.prototype.bind=(i=Array.prototype.slice,function(t){var e=this,s=i.call(arguments,1);if("function"!=typeof e)throw new TypeError;function n(){var r=s.concat(i.call(arguments));e.apply(this instanceof n?this:t,r)}return n.prototype=function t(e){if(e&&(t.prototype=e),!(this instanceof t))return new t}(e.prototype),n}))},function(t,e){window.console||(window.console={},window.console.log=window.console.assert=function(){},window.console.warn=window.console.assert=function(){})},function(t,e){!function(){function t(t){t&&(t.setTargetAtTime||(t.setTargetAtTime=t.setTargetValueAtTime))}window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=webkitAudioContext,AudioContext.prototype.hasOwnProperty("createGain")||(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),AudioContext.prototype.hasOwnProperty("createDelay")||(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode),AudioContext.prototype.hasOwnProperty("createScriptProcessor")||(AudioContext.prototype.createScriptProcessor=AudioContext.prototype.createJavaScriptNode),AudioContext.prototype.hasOwnProperty("createPeriodicWave")||(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable),AudioContext.prototype.internal_createGain=AudioContext.prototype.createGain,AudioContext.prototype.createGain=function(){var e=this.internal_createGain();return t(e.gain),e},AudioContext.prototype.internal_createDelay=AudioContext.prototype.createDelay,AudioContext.prototype.createDelay=function(e){var i=e?this.internal_createDelay(e):this.internal_createDelay();return t(i.delayTime),i},AudioContext.prototype.internal_createBufferSource=AudioContext.prototype.createBufferSource,AudioContext.prototype.createBufferSource=function(){var e=this.internal_createBufferSource();return e.start?(e.internal_start=e.start,e.start=function(t,i,s){void 0!==s?e.internal_start(t||0,i,s):e.internal_start(t||0,i||0)}):e.start=function(t,e,i){e||i?this.noteGrainOn(t||0,e,i):this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},t(e.playbackRate),e},AudioContext.prototype.internal_createDynamicsCompressor=AudioContext.prototype.createDynamicsCompressor,AudioContext.prototype.createDynamicsCompressor=function(){var e=this.internal_createDynamicsCompressor();return t(e.threshold),t(e.knee),t(e.ratio),t(e.reduction),t(e.attack),t(e.release),e},AudioContext.prototype.internal_createBiquadFilter=AudioContext.prototype.createBiquadFilter,AudioContext.prototype.createBiquadFilter=function(){var e=this.internal_createBiquadFilter();return t(e.frequency),t(e.detune),t(e.Q),t(e.gain),e},AudioContext.prototype.hasOwnProperty("createOscillator")&&(AudioContext.prototype.internal_createOscillator=AudioContext.prototype.createOscillator,AudioContext.prototype.createOscillator=function(){var e=this.internal_createOscillator();return e.start?(e.internal_start=e.start,e.start=function(t){e.internal_start(t||0)}):e.start=function(t){this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},e.setPeriodicWave||(e.setPeriodicWave=e.setWaveTable),t(e.frequency),t(e.detune),e})),window.hasOwnProperty("webkitOfflineAudioContext")&&!window.hasOwnProperty("OfflineAudioContext")&&(window.OfflineAudioContext=webkitOfflineAudioContext)}()},function(t,e){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)})},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var s=arguments.length>=2?arguments[1]:void 0,n=0;n<i;n++)n in e&&t.call(s,e[n],n,e)})},function(t,e,i){i(613),i(612),i(611),i(610),i(609),i(608),i(607),i(606),i(605)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){t.exports={BitmapMaskPipeline:i(254),FlatTintPipeline:i(253),ForwardDiffuseLightPipeline:i(151),TextureTintPipeline:i(130)}},function(t,e,i){t.exports={Utils:i(21),WebGLPipeline:i(84),WebGLRenderer:i(256),Pipelines:i(674),BYTE:0,SHORT:1,UNSIGNED_BYTE:2,UNSIGNED_SHORT:3,FLOAT:4}},function(t,e,i){t.exports={Canvas:i(259),WebGL:i(255)}},function(t,e,i){t.exports={BlitImage:i(260),CanvasRenderer:i(261),DrawImage:i(258),GetBlendModes:i(257)}},function(t,e,i){t.exports={Canvas:i(677),Snapshot:i(676),WebGL:i(675)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){(function(e){i(614);var s=i(22),n=i(16),r={Animation:i(572),Cache:i(571),Cameras:{Scene2D:i(570)},Class:i(0),Data:i(514),Display:{Masks:i(508)},Events:i(506),Game:i(504),GameObjects:{DisplayList:i(474),GameObjectCreator:i(14),GameObjectFactory:i(11),UpdateList:i(446),Components:i(17),BuildGameObject:i(25),BuildGameObjectAnimation:i(128),GameObject:i(2),Graphics:i(115),Image:i(68),Sprite:i(35),Text:i(110),Factories:{Graphics:i(414),Image:i(413),Sprite:i(412),Text:i(411)},Creators:{Graphics:i(410),Image:i(409),Sprite:i(408),Text:i(407)}},Input:i(389),Loader:{FileTypes:{AnimationJSONFile:i(366),AtlasJSONFile:i(365),AudioFile:i(173),AudioSpriteFile:i(364),HTML5AudioFile:i(172),ImageFile:i(38),JSONFile:i(28),MultiAtlasFile:i(363),PluginFile:i(362),ScriptFile:i(361),SpriteSheetFile:i(360),TextFile:i(229),XMLFile:i(144)},File:i(20),FileTypesManager:i(7),GetURL:i(108),LoaderPlugin:i(359),MergeXHRSettings:i(107),MultiFile:i(37),XHRLoader:i(174),XHRSettings:i(74)},Math:{Between:i(152),DegToRad:i(39),FloatBetween:i(242),RadToDeg:i(153),Vector2:i(6)},Plugins:i(335),Renderer:i(678),Scene:i(198),Scenes:i(333),Sound:i(331),Structs:i(330),Textures:i(329),Time:i(313),Tweens:i(311)};r=n(!1,r,s),t.exports=r,e.Phaser=r}).call(this,i(220))}])}); |