mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
1 line
No EOL
361 KiB
JavaScript
1 line
No EOL
361 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(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},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=1009)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var o in e)if(e.hasOwnProperty(o)){var h=i(e,o,s);if(!1!==h){if(n((r||t).prototype,o)){if(a.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=e[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)s(t,e[i].prototype||e[i])}}function a(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 n=t.Extends;e=function(){n.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 a=null;return t.Mixins&&(a=t.Mixins,delete t.Mixins),r(e,a),s(e,t,!0,i),e}a.extend=s,a.mixin=r,a.ignoreFinals=!1,t.exports=a},function(t,e,i){var n=i(0),s=i(14),r=i(76),a=i(9),o=new n({Extends:a,initialize:function(t,e){a.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},update:function(){},toJSON:function(){return s.ToJSON(this)},willRender:function(){return o.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()}}});o.RENDER_MASK=15,t.exports=o},function(t,e){t.exports=function(t,e,i){var n=typeof t;return t&&"number"!==n&&"string"!==n&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},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 n=e.split("."),s=t,r=i,a=0;a<n.length;a++){if(!s.hasOwnProperty(n[a])){r=i;break}r=s[n[a]],s=s[n[a]]}return r}return i}return i}},function(t,e,i){var n=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=n},function(t,e,i){var n=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 n(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,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(15),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function a(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,n||t,r),o=s?s+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],a]:t._events[o].push(a):(t._events[o]=a,t._eventsCount++),t}function o(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__||(s=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,a=new Array(r);n<r;n++)a[n]=i[n].fn;return a},h.prototype.listenerCount=function(t){var e=s?s+t:t,i=this._events[e];return i?i.fn?1:i.length:0},h.prototype.emit=function(t,e,i,n,r,a){var o=s?s+t:t;if(!this._events[o])return!1;var h,u,l=this._events[o],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,n),!0;case 5:return l.fn.call(l.context,e,i,n,r),!0;case 6:return l.fn.call(l.context,e,i,n,r,a),!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,n);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 a(this,t,e,i,!1)},h.prototype.once=function(t,e,i){return a(this,t,e,i,!0)},h.prototype.removeListener=function(t,e,i,n){var r=s?s+t:t;if(!this._events[r])return this;if(!e)return o(this,r),this;var a=this._events[r];if(a.fn)a.fn!==e||n&&!a.once||i&&a.context!==i||o(this,r);else{for(var h=0,u=[],l=a.length;h<l;h++)(a[h].fn!==e||n&&!a[h].once||i&&a[h].context!==i)&&u.push(a[h]);u.length?this._events[r]=1===u.length?u[0]:u:o(this,r)}return this},h.prototype.removeAllListeners=function(t){var e;return t?(e=s?s+t:t,this._events[e]&&o(this,e)):(this._events=new r,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=s,h.EventEmitter=h,t.exports=h},function(t,e,i){var n={},s=new(i(0))({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;r<e.length;r++){var a=e[r];i[a]&&(t[a]=i[a],s.hasOwnProperty(a)&&(n[s[a]]=t[a]))}},installLocal:function(t,e){for(var i=t.scene,s=t.settings.map,r=t.settings.isBooted,a=0;a<e.length;a++){var o=e[a];if(n[o]){var h=n[o],u=new h.plugin(i);t[h.mapping]=u,s.hasOwnProperty(h.mapping)&&(i[s[h.mapping]]=u),r&&u.boot()}}},remove:function(t){delete n[t]},destroy:function(){this.game=null}});s.register=function(t,e,i){n[t]={plugin:e,mapping:i}},t.exports=s},function(t,e,i){var n=i(0),s=i(10),r=new n({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)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(0),s=i(28),r=i(127),a=i(286),o=i(92),h=i(146),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,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 o),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new o),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new o),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new o),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 n=i(0),s=i(10),r=new n({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)},s.register("GameObjectCreator",r,"make"),t.exports=r},function(t,e,i){t.exports={Alpha:i(574),Animation:i(295),BlendMode:i(573),ComputedSize:i(572),Depth:i(571),Flip:i(570),GetBounds:i(569),MatrixStack:i(568),Origin:i(567),Pipeline:i(283),ScaleMode:i(566),ScrollFactor:i(565),Size:i(564),Texture:i(563),Tint:i(562),ToJSON:i(561),Transform:i(560),TransformMatrix:i(60),Visible:i(559)}},function(t,e,i){var n=i(289),s={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 n};t.exports=s},function(t,e,i){var n=i(292),s=function(){var t,e,i,r,a,o,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&&(n(r)||(a=Array.isArray(r)))?(a?(a=!1,o=i&&Array.isArray(i)?i:[]):o=i&&n(i)?i:{},h[e]=s(c,o,r)):void 0!==r&&(h[e]=r));return h};t.exports=s},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_WAITING_LINKFILE:15,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,TEXTURE_ATLAS_JSON_ARRAY:20,TEXTURE_ATLAS_JSON_HASH:21}},function(t,e,i){var n=i(0),s=i(17),r=i(2),a=i(117),o=i(116),h=i(216),u=i(88),l=new n({initialize:function(t){if(this.type=r(t,"type",!1),this.key=r(t,"key",!1),!this.type||!this.key)throw new Error("Error calling 'Loader."+this.type+"' invalid key provided.");this.url=r(t,"url"),void 0===this.url?this.url=r(t,"path","")+this.key+"."+r(t,"extension",""):"function"!=typeof this.url&&(this.url=r(t,"path","").concat(this.url)),this.src="",this.xhrSettings=u(r(t,"responseType",void 0)),r(t,"xhrSettings",!1)&&(this.xhrSettings=o(this.xhrSettings,r(t,"xhrSettings",{}))),this.loader=null,this.xhrLoader=null,this.state="function"==typeof this.url?s.FILE_POPULATED:s.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=r(t,"config",{}),this.linkFile=void 0,this.linkType="",this.linkParent=!1},setLinkFile:function(t,e){this.linkFile=t,t.linkFile=this,this.linkType=e,t.linkType=e,this.linkParent=!0},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(t){this.loader=t,this.state===s.FILE_POPULATED?(this.onComplete(),t.nextFile(this)):(this.src=a(this,t.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=h(this,t.xhr))},onLoad:function(t){this.resetXHR(),t.target&&200!==t.target.status?this.loader.nextFile(this,!1):this.loader.nextFile(this,!0)},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(t){this.state=s.FILE_PROCESSING,this.onComplete(),t(this)},onComplete:function(){this.linkFile?this.linkFile.state===s.FILE_WAITING_LINKFILE?(this.state=s.FILE_COMPLETE,this.linkFile.state=s.FILE_COMPLETE):this.state=s.FILE_WAITING_LINKFILE:this.state=s.FILE_COMPLETE}});l.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},l.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=l},function(t,e,i){var n={VERSION:"3.6.0",BlendModes:i(48),ScaleModes:i(55),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},,function(t,e,i){var n=i(48),s=i(8),r=i(55);t.exports=function(t,e,i){e.x=s(i,"x",0),e.y=s(i,"y",0),e.depth=s(i,"depth",0),e.flipX=s(i,"flipX",!1),e.flipY=s(i,"flipY",!1);var a=s(i,"scale",null);"number"==typeof a?e.setScale(a):null!==a&&(e.scaleX=s(a,"x",1),e.scaleY=s(a,"y",1));var o=s(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=s(o,"x",1),e.scrollFactorY=s(o,"y",1)),e.rotation=s(i,"rotation",0);var h=s(i,"angle",null);null!==h&&(e.angle=h),e.alpha=s(i,"alpha",1);var u=s(i,"origin",null);if("number"==typeof u)e.setOrigin(u);else if(null!==u){var l=s(u,"x",.5),c=s(u,"y",.5);e.setOrigin(l,c)}return e.scaleMode=s(i,"scaleMode",r.DEFAULT),e.blendMode=s(i,"blendMode",n.NORMAL),e.visible=s(i,"visible",!0),s(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,i){var n,s,r,a=i(19),o=i(123),h=[],u=!1;t.exports={create2D:function(t,e,i){return n(t,e,i,a.CANVAS)},create:n=function(t,e,i,n){var r;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=a.CANVAS);var l=s(n);return null===l?(l={parent:t,canvas:document.createElement("canvas"),type:n},n===a.CANVAS&&h.push(l),r=l.canvas):(l.parent=t,r=l.canvas),r.width=e,r.height=i,u&&n===a.CANVAS&&o.disable(r.getContext("2d")),r},createWebGL:function(t,e,i){return n(t,e,i,a.WEBGL)},disableSmoothing:function(){u=!0},enableSmoothing:function(){u=!1},first:s=function(t){if(void 0===t&&(t=a.CANVAS),t===a.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){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},,function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|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,n=0;n<t.length;++n){var s=t[n];s.type===e.FLOAT?i+=s.size:i+=1}return i}}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var n=i(0),s=i(144),r=i(278),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=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,n)},transparent:function(){return this.red=0,this.green=0,this.blue=0,this.alpha=0,this.update()},setTo:function(t,e,i,n){return void 0===n&&(n=255),this.red=t,this.green=e,this.blue=i,this.alpha=n,this.update()},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,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=s(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 a(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=a},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){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,i){var n=i(0),s=i(14),r=i(1),a=i(540),o=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,a],initialize:function(t,e,i,n,a){r.call(this,t,"Sprite"),this.anims=new s.Animation(this),this.setTexture(n,a),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 s.ToJSON(this)}});t.exports=o},,function(t,e,i){var n=i(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},,function(t,e,i){var n=i(0),s=i(17),r=i(18),a=i(7),o=i(2),h=new n({Extends:r,initialize:function(t,e,i,n){var a="string"==typeof t?t:o(t,"key",""),h={type:"json",extension:o(t,"extension","json"),responseType:"text",key:a,url:o(t,"file",e),path:i,xhrSettings:o(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});a.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new h(t[n],e,this.path,i));else this.addFile(new h(t,e,this.path,i));return this}),t.exports=h},,,,,,,,,,function(t,e,i){var n=i(0),s=i(17),r=i(18),a=i(7),o=i(2),h=new n({Extends:r,initialize:function(t,e,i,n,s){var a="string"==typeof t?t:o(t,"key",""),h={type:"image",extension:o(t,"extension","png"),responseType:"blob",key:a,url:o(t,"file",e),path:i,xhrSettings:o(t,"xhr",n),config:o(t,"config",s)};r.call(this,h)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var e=this;this.data.onload=function(){r.revokeObjectURL(e.data),e.onComplete(),t(e)},this.data.onerror=function(){r.revokeObjectURL(e.data),e.state=s.FILE_ERRORED,t(e)},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")}});a.register("image",function(t,e,i){var n,s,r;if(Array.isArray(t))for(var a=0;a<t.length;a++)n=o(t[a],"file",e),Array.isArray(n)&&2===n.length?(s=this.addFile(new h(t[a],n[0],this.path,i)),r=this.addFile(new h(t[a],n[1],this.path,i)),s.setLinkFile(r,"dataimage")):this.addFile(new h(t[a],e,this.path,i));else n=o(t,"file",e),Array.isArray(n)&&2===n.length?(s=this.addFile(new h(t,n[0],this.path,i)),r=this.addFile(new h(t,n[1],this.path,i)),s.setLinkFile(r,"dataimage")):this.addFile(new h(t,e,this.path,i));return this}),t.exports=h},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){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 n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},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){(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:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!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 n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||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(519))},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,a=t.y2-t.y1,o=e-t.x1,h=i-t.y1,u=n*n+s*s,l=n*r+s*a,c=n*o+s*h,d=r*r+a*a,f=r*o+a*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 n=i(430);t.exports=function(t,e){if("string"==typeof t&&n.hasOwnProperty(t)){if(e){var i=e.slice(0);return i.unshift(0),function(e){return i[0]=e,n[t].apply(this,i)}}return n[t]}return"function"==typeof t?t:(Array.isArray(t)&&t.length,n.Power0)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,n,s,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}},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),n=this.matrix,s=n[0],r=n[1],a=n[2],o=n[3];return n[0]=s*i+a*e,n[1]=r*i+o*e,n[2]=s*-e+a*i,n[3]=r*-e+o*i,this},multiply:function(t){var e=this.matrix,i=t.matrix,n=e[0],s=e[1],r=e[2],a=e[3],o=e[4],h=e[5],u=i[0],l=i[1],c=i[2],d=i[3],f=i[4],p=i[5];return e[0]=u*n+l*r,e[1]=u*s+l*a,e[2]=c*n+d*r,e[3]=c*s+d*a,e[4]=f*n+p*r+o,e[5]=f*s+p*a+h,this},transform:function(t,e,i,n,s,r){var a=this.matrix,o=a[0],h=a[1],u=a[2],l=a[3],c=a[4],d=a[5];return a[0]=t*o+e*u,a[1]=t*h+e*l,a[2]=i*o+n*u,a[3]=i*h+n*l,a[4]=s*o+r*u+c,a[5]=s*h+r*l+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],a=n[2],o=n[3],h=n[4],u=n[5];return i.x=t*s+e*a+h,i.y=t*r+e*o+u,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=e*s-i*n;return t[0]=s/o,t[1]=-i/o,t[2]=-n/o,t[3]=e/o,t[4]=(n*a-s*r)/o,t[5]=-(e*a-i*r)/o,this},setTransform:function(t,e,i,n,s,r){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=s,a[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],a=i*i,o=n*n,h=s*s,u=r*r,l=Math.sqrt(a+h),c=Math.sqrt(o+u);return t.translateX=e[4],t.translateY=e[5],t.scaleX=l,t.scaleY=c,t.rotation=Math.acos(i/l)*(Math.atan(-s/i)<0?-1:1),t},applyITRS:function(t,e,i,n,s){var r=this.matrix,a=Math.sin(i),o=Math.cos(i);return r[4]=t,r[5]=e,r[0]=o*n,r[1]=a*n,r[2]=-a*s,r[3]=o*s,this},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=n},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},,,,function(t,e,i){var n=i(0),s=i(56),r=i(219),a=i(218),o=i(92),h=i(145),u=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new o),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new o),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new o),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 n=i(0),s=i(14),r=i(1),a=i(438),o=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,a],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=o},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 n=i(96),s=i(8),r=i(58),a=i(59),o=i(69),h=i(155),u=i(98),l=i(4),c=i(97),d=i(95),f=i(94);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:u(e),g=h(e),m=o(e,"delay",i.delay),v=o(e,"duration",i.duration),y=l(e,"easeParams",i.easeParams),x=a(l(e,"ease",i.ease),y),w=o(e,"hold",i.hold),T=o(e,"repeat",i.repeat),S=o(e,"repeatDelay",i.repeatDelay),A=r(e,"yoyo",i.yoyo),b=r(e,"flipX",i.flipX),E=r(e,"flipY",i.flipY),_=[],C=0;C<g.length;C++)for(var M=g[C].key,k=g[C].value,P=0;P<p.length;P++){var L=c(M,k),F=f(p[P],M,L.getEnd,L.getStart,a(l(k,"ease",x),y),o(k,"delay",m),o(k,"duration",v),r(k,"yoyo",A),o(k,"hold",w),o(k,"repeat",T),o(k,"repeatDelay",S),r(k,"flipX",b),r(k,"flipY",E));_.push(F)}var R=new d(t,_,p);R.offset=s(e,"offset",null),R.completeDelay=s(e,"completeDelay",0),R.loop=Math.round(s(e,"loop",0)),R.loopDelay=Math.round(s(e,"loopDelay",0)),R.paused=r(e,"paused",!1),R.useFrames=r(e,"useFrames",!1);for(var O=l(e,"callbackScope",R),D=[R,null],I=d.TYPES,B=0;B<I.length;B++){var N=I[B],U=l(e,N,!1);if(U){var Y=l(e,N+"Scope",O),X=l(e,N+"Params",[]);R.setCallback(N,U,D.concat(X),Y)}}return R}},function(t,e){t.exports=function(t,e,i){var n;n=t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,n,s){return t[e](i,n,s)}:function(){return t[e]}:"function"==typeof i?i:function(){return i};return n}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;s<i;s++)t[s]=t[s+1];return t.length=i,n}}},function(t,e,i){var n=i(108),s=i(166);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(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 n=i(0),s=i(9),r=i(16),a=i(3),o=new n({Extends:s,initialize:function(t,e,i){s.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 - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!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:a,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=o},function(t,e,i){var n=i(0),s=i(9),r=i(3),a=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);for(var n in i.spritemap=this.game.cache.json.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}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 n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.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 n=this.sounds[i];n.key===t&&(n.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:r,onBlur:r,onFocus:r,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(n,s){n.pendingRemove||t.call(e||i,n,s,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,i){var n,s=i(53),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=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e,i){var n=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 n=this.entries[i];if(n[t]===e)return n}},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,n=this.entries.slice(),s=n.length;if(e)for(i=0;i<s&&!1!==t.call(e,n[i],i);i++);else for(i=0;i<s&&!1!==t(n[i],i);i++);return this},iterate:function(t,e){var i,n=this.entries.length;if(e)for(i=0;i<n&&!1!==t.call(e,this.entries[i],i);i++);else for(i=0;i<n&&!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 n=this.entries.length;for(e=0;e<n;e++){var s=this.entries[e];s[t].apply(s,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 n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;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=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.blockSet=!1,this._frozen=!1,this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){return this.list[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(this.events.listenerCount("changedata")>0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var s in this.list)i[1]=s,i[2]=this.list[s],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.list[i]=t[i]);return this},remove:function(t){if(!this._frozen&&this.has(t)){var e=this.list[t];delete this.list[t],this.events.emit("removedata",this,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],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];return this.blockSet=!1,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=n},,,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 s=new Array(i),r=1;r<i;r*=2){n(t,e,r,s);var a=t;t=s,s=a}return t}e.inplace=function(t,e){var s=i(t,e);return s!==t&&n(s,null,t.length,t),t};var n=function(t,e,i,n){var s,r,a,o,h,u=t.length,l=0,c=2*i;for(s=0;s<u;s+=c)for(a=(r=s+i)+i,r>u&&(r=u),a>u&&(a=u),o=s,h=r;;)if(o<r&&h<a)e(t[o],t[h])<=0?n[l++]=t[o++]:n[l++]=t[h++];else if(o<r)n[l++]=t[o++];else{if(!(h<a))break;n[l++]=t[h++]}};t.exports=e}()},function(t,e,i){var n=i(0),s=i(25),r=new n({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=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1},addAttribute:function(t,e,i,n,s){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:s}),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,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var a=0;a<i.length;++a){var o=i[a],h=t.getAttribLocation(n,o.name);h>=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,o.size,o.type,o.normalized,r,o.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,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),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,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),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,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),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,i){var n=i(0),s=i(30),r=i(290),a=i(288),o=i(149),h=new n({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 s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return o(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){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(140),s=i(0),r=i(3),a=i(79),o=new s({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?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.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,a.inplace(this.list,this.sortHandler)),this},sortHandler:function(t,e){return t[this._sortKey]-e[this._sortKey]},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirstElement(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.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 n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n<arguments.length;n++)i.push(arguments[n]);for(n=0;n<this.list.length;n++)i[0]=this.list[n],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=o},function(t,e,i){var n=i(47);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)||(i[s]=e[s]);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)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(285),r=i(148),a=i(147),o=i(6),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new o),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new o),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,n,s,r,a,o,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:o,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:a,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(0),s=i(13),r=i(11),a=i(57),o=new n({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=a.PENDING_ADD,this._pausedState=a.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===a.ACTIVE},isPaused:function(){return this.state===a.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){for(var n=0;n<this.totalData;n++){var s=this.data[n];if(s.key===t){s.end=e,i&&(s.start=s.current);break}}return this},restart:function(){this.state===a.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 n=e[i];n.t1=n.duration+n.hold,n.yoyo&&(n.t1+=n.duration),n.t2=n.t1+n.repeatDelay,n.totalDuration=n.delay+n.t1,-1===n.repeat?n.totalDuration+=999999999999*n.t2:n.repeat>0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.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 n=t[i],s=n.target,r=n.gen;n.delay=r.delay(i,e,s),n.duration=r.duration(i,e,s),n.hold=r.hold(i,e,s),n.repeat=r.repeat(i,e,s),n.repeatDelay=r.repeatDelay(i,e,s)}return this.calcDuration(),this.progress=0,this.totalProgress=0,this.elapsed=0,this.totalElapsed=0,this.paused&&!this.parentIsTimeline?(this.state=a.PENDING_ADD,this._pausedState=a.INIT,!1):(this.state=a.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=a.LOOP_DELAY):this.state=a.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=a.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=a.PENDING_REMOVE}},pause:function(){if(this.state!==a.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=a.PAUSED,this},play:function(t){if(this.state!==a.ACTIVE){this.state!==a.PENDING_REMOVE&&this.state!==a.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=a.ACTIVE):(this.countdown=this.calculatedOffset,this.state=a.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=a.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i<this.totalData;i++){var n=e[i];n.progress=0,n.elapsed=0,n.repeatCounter=-1===n.repeat?999999999999:n.repeat,t?(n.start=n.getStartValue(n.target,n.key,n.start),n.end=n.getEndValue(n.target,n.key,n.end),n.current=n.start,n.state=a.PLAYING_FORWARD):n.delay>0?(n.elapsed=n.delay,n.state=a.DELAY):n.state=a.PENDING_RENDER}},resume:function(){return this.state===a.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 n=this.totalDuration*t,s=e[i],r=0,a=0;n<=s.delay?(r=0,a=0):n>=s.totalDuration?(r=1,a=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,a=s.duration*r):n>s.t1&&n<s.totalDuration&&(n-=s.delay,(n=(n-=s.t1)/s.t2%1*s.t2)>s.repeatDelay&&(r=n/s.t1,a=s.duration*r)),s.progress=r,s.elapsed=a;var o=s.ease(s.progress);s.current=s.start+(s.end-s.start)*o,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=a.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=a.PENDING_REMOVE}},stop:function(t){this.state===a.ACTIVE&&void 0!==t&&this.seek(t),this.state!==a.REMOVED&&(this.state=a.PENDING_REMOVE)},update:function(t,e){if(this.state===a.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 a.ACTIVE:for(var i=!1,n=0;n<this.totalData;n++)this.updateTweenData(this,this.data[n],e)&&(i=!0);i||this.nextState();break;case a.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=a.ACTIVE);break;case a.OFFSET_DELAY:if(this.countdown-=e,this.countdown<=0){var s=this.callbacks.onStart;s&&(s.params[1]=this.targets,s.func.apply(s.scope,s.params)),this.state=a.ACTIVE}break;case a.COMPLETE_DELAY:if(this.countdown-=e,this.countdown<=0){var r=this.callbacks.onComplete;r&&r.func.apply(r.scope,r.params),this.state=a.PENDING_REMOVE}}return this.state===a.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 n=t.callbacks.onYoyo;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.start=e.getStartValue(e.target,e.key,e.start),a.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 s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.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,a.REPEAT_DELAY):a.PLAYING_FORWARD}return a.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 n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.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,a.REPEAT_DELAY):a.PLAYING_FORWARD}return a.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case a.PLAYING_FORWARD:case a.PLAYING_BACKWARD:if(!e.target){e.state=a.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var o,h=e.state===a.PLAYING_FORWARD,u=n/s;o=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*o,e.target[e.key]=e.current,e.elapsed=n,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=a.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case a.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=a.PENDING_RENDER);break;case a.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=a.PLAYING_FORWARD);break;case a.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case a.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=a.PLAYING_FORWARD):e.state=a.COMPLETE}return e.state!==a.COMPLETE}});o.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=o},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 n(t){return!!t.getEnd&&"function"==typeof t.getEnd}var s=function(t,e){var r,a,o=function(t,e,i){return i},h=function(t,e,i){return i},u=typeof e;if("number"===u)o=function(){return e};else if("string"===u){var l=e[0],c=parseFloat(e.substr(2));switch(l){case"+":o=function(t,e,i){return i+c};break;case"-":o=function(t,e,i){return i-c};break;case"*":o=function(t,e,i){return i*c};break;case"/":o=function(t,e,i){return i/c};break;default:o=function(){return parseFloat(e)}}}else"function"===u?o=e:"object"===u&&(i(a=e)||n(a))?(n(e)&&(o=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=s(t,e.value));return r||(r={getEnd:o,getStart:h}),r};t.exports=s},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"targets",null);return null===e?e:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},,,,function(t,e,i){var n=i(122),s=i(22),r=i(0),a=i(14),o=i(19),h=i(1),u=i(394),l=i(4),c=i(261),d=i(393),f=i(390),p=new r({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Depth,a.Flip,a.GetBounds,a.Origin,a.Pipeline,a.ScaleMode,a.ScrollFactor,a.Tint,a.Transform,a.Visible,d],initialize:function(t,e,i,n,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=s.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(n),t.sys.game.config.renderType===o.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",n(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 n="",s=t.replace(/ +/gi," ").split(this.splitRegExp),r=s.length,a=0;a<r;a++){var o=s[a],h="";if(o=o.replace(/^ *|\s*$/gi,""),e.measureText(o).width<i)n+=o+"\n";else{for(var u=i,l=o.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,"");s[a+1]=y+" "+(s[a+1]||""),r=s.length;break}h+=f,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;r<s.length;r++){for(var a=i,o=s[r].split(" "),h=0;h<o.length;h++){var u=e.measureText(o[h]).width,l=u+e.measureText(" ").width;l>a?(h>0&&(n+="\n"),n+=o[h]+" ",a=i-u):(a-=l,n+=o[h]+" ")}r<s.length-1&&(n+="\n")}return n},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,n,s,r){return this.style.setShadow(t,e,i,n,s,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,n){if("object"==typeof t){var s=t,r=l(s,"x",null);null!==r?(t=r,i=r):(t=l(s,"left",0),i=l(s,"right",t));var a=l(s,"y",null);null!==a?(e=a,n=a):(e=l(s,"top",0),n=l(s,"bottom",e))}else void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=e);return this.padding.left=t,this.padding.top=e,this.padding.right=i,this.padding.bottom=n,this.updateText()},setMaxLines:function(t){return this.style.setMaxLines(t)},updateText:function(){var t=this.canvas,e=this.context,i=this.style,n=this.resolution,s=i.metrics;i.syncFont(t,e);var r=this.text;(i.wordWrapWidth||i.wordWrapCallback)&&(r=this.runWordWrap(this.text));var a,o,h=r.split(this.splitRegExp),l=u(this,s,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*=n,f*=n,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++)a=i.strokeThickness/2,o=i.strokeThickness/2+p*l.lineHeight+s.ascent,p>0&&(o+=l.lineSpacing*p),i.rtl?a=d-a:"right"===i.align?a+=l.width-l.lineWidths[p]:"center"===i.align&&(a+=(l.width-l.lineWidths[p])/2),this.autoRound&&(a=Math.round(a),o=Math.round(o)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],a,o)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],a,o));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=a.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),s.remove(this.canvas)}});t.exports=p},,,function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(51),r=i(163),a=i(162),o=i(126),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,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 n=i(113),s=i(0),r=i(111),a=i(14),o=i(241),h=i(1),u=i(4),l=i(15),c=i(440),d=new s({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Pipeline,a.Transform,a.Visible,a.ScrollFactor,c],initialize:function(t,e){var i=u(e,"x",0),n=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),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 u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(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,l.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.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,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,a=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(a+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(a+i,e+n),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,n,s,a){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,a),this},strokeTriangle:function(t,e,i,n,s,a){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,a),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),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,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,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 n=1;n<i;n++)this.lineTo(t[n].x,t[n].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 n=1;n<i;n++)this.lineTo(t[n].x,t[n].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,n,s){void 0===s&&(s=32);var r=new o(t,e,i,n).getPoints(s);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,n,s){void 0===s&&(s=32);var r=new o(t,e,i,n).getPoints(s);return this.fillPoints(r,!0)},arc:function(t,e,i,n,s,a){return this.commandBuffer.push(r.ARC,t,e,i,n,s,a),this},slice:function(t,e,i,n,s,a){return void 0===a&&(a=!1),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,n,s,a),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 n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,null,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},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 n=i(0),s=i(52),r=i(495),a=i(494),o=i(194),h=i(178),u=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.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},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,o.Global),e.installLocal(this,o.CoreScene),e.installLocal(this,a(this)),e.installLocal(this,r(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.scene.update.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(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){var t=this.settings;return t.status=s.RUNNING,t.active=!0,t.visible=!0,this.events.emit("wake",this),t.isTransition&&this.events.emit("transitionwake",t.transitionFrom,t.transitionDuration),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.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){return t?this.resume():this.pause()},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(){this.events.off("transitioninit"),this.events.off("transitionstart"),this.events.off("transitioncomplete"),this.events.off("transitionout"),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.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=u},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,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){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 n=i(53),s=i(74),r=i(22),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){a.canvas=!!window.CanvasRenderingContext2D||n.cocoonJS;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this);n.cocoonJS&&(t.screencanvas=!1);var e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),s=i.getContext("2d").createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(a.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(a.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.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)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},function(t,e,i){var n=i(0),s=i(33),r=i(9),a=i(195),o=i(12),h=i(60),u=i(124),l=i(6),c=new n({Extends:r,initialize:function(t,e,i,n){r.call(this),this.scene,this.name="",this.x=t,this.y=e,this.width=i,this.height=n,this.roundPixels=!1,this.useBounds=!1,this._bounds=new o,this.inputEnabled=!0,this.scrollX=0,this.scrollY=0,this.zoom=1,this.rotation=0,this.matrix=new h(1,0,0,1,0,0),this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.fadeEffect=new a.Fade(this),this.flashEffect=new a.Flash(this),this.shakeEffect=new a.Shake(this),this.disableCull=!1,this.culledObjects=[],this._follow=null,this._id=0},centerToBounds:function(){return this.useBounds&&(this.scrollX=.5*this._bounds.width-.5*this.width,this.scrollY=.5*this._bounds.height-.5*this.height),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],n=e[1],s=e[2],r=e[3],a=i*r-n*s;if(!a)return t;var o=e[4],h=e[5],u=this.scrollX,l=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;a=1/a,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*s+o,S=x*n+w*r+h,A=(x+v)*i+(w+y)*s+o,b=(x+v)*n+(w+y)*r+h,E=c+v,_=d+y;(T>-v||S>-y||T<E||S<_||A>-v||b>-y||A<E||b<_)&&f.push(m)}else f.push(m)}return f},fadeIn:function(t,e,i,n,s,r){return this.fadeEffect.start(!1,t,e,i,n,!0,s,r)},fadeOut:function(t,e,i,n,s,r){return this.fadeEffect.start(!0,t,e,i,n,!0,s,r)},fadeFrom:function(t,e,i,n,s,r,a){return this.fadeEffect.start(!1,t,e,i,n,s,r,a)},fade:function(t,e,i,n,s,r,a){return this.fadeEffect.start(!0,t,e,i,n,s,r,a)},flash:function(t,e,i,n,s,r,a){return this.flashEffect.start(t,e,i,n,s,r,a)},shake:function(t,e,i,n,s){return this.shakeEffect.start(t,e,i,n,s)},getWorldPoint:function(t,e,i){void 0===i&&(i=new l);var n=this.matrix.matrix,s=n[0],r=n[1],a=n[2],o=n[3],h=n[4],u=n[5],c=s*o-r*a;if(!c)return i.x=t,i.y=e,i;var d=o*(c=1/c),f=-r*c,p=-a*c,g=s*c,m=(a*u-o*h)*c,v=(r*h-s*u)*c,y=Math.cos(this.rotation),x=Math.sin(this.rotation),w=this.zoom,T=this.scrollX,S=this.scrollY,A=t+(T*y-S*x)*w,b=e+(T*x+S*y)*w;return i.x=A*d+b*p+m,i.y=A*f+b*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,s=this.zoom*t,r=this.matrix,a=i/2,o=n/2,h=this._follow;if(null!==h&&(a=h.x,o=h.y,this.scrollX=(a-.5*i)/s,this.scrollY=(o-.5*n)/s),this.useBounds){var u=this._bounds,l=Math.max(0,u.right-i),c=Math.max(0,u.bottom-n);this.scrollX<u.x?this.scrollX=u.x:this.scrollX>l&&(this.scrollX=l),this.scrollY<u.y?this.scrollY=u.y:this.scrollY>c&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+a,this.y+o),r.rotate(this.rotation),r.scale(s,s),r.translate(-a,-o),this.shakeEffect.preRender()},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,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,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},startFollow:function(t,e){return void 0===e&&(e=!1),this._follow=t,this.roundPixels=e,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.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(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.target=void 0,this._bounds=void 0,this.scene=void 0}});t.exports=c},function(t,e,i){var n=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,n=t.entries;for(var s in n)i.hasOwnProperty(s)&&e?i[s]=n[s]:this.set(s,n[s]);return this}});t.exports=n},,function(t,e,i){var n=i(16),s=i(88);t.exports=function(t,e){var i=void 0===t?s():n({},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,i){var n=i(8);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var s=t.anims,r=n(i,"key",void 0),a=n(i,"startFrame",void 0),o=n(i,"delay",0),h=n(i,"repeat",0),u=n(i,"repeatDelay",0),l=n(i,"yoyo",!1),c=n(i,"play",!1),d=n(i,"delayedPlay",0);s.delay(o),s.repeat(h),s.repeatDelay(u),s.yoyo(l),c?s.play(r,a):d>0?s.delayedPlay(d,r,a):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(16),r=new n({initialize:function(t,e,i,n,s,r,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=a,this.x=0,this.y=0,this.width=r,this.height=a,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*a),this.centerX=Math.floor(r/2),this.centerY=Math.floor(a/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:a,r:n+r,b:s+a},trim:!1,sourceSize:{w:r,h:a},spriteSourceSize:{x:0,y:0,w:r,h:a},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+a*a),drawImage:{sx:n,sy:s,sWidth:r,sHeight:a,dWidth:r,dHeight:a}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=n,o.w=s,o.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,a=this.source.height,o=this.data.uvs;return o.x0=t/r,o.y0=e/a,o.x1=t/r,o.y1=(e+n)/a,o.x2=(t+i)/r,o.y2=(e+n)/a,o.x3=(t+i)/r,o.y3=e/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(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=s(!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}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(192),r=i(509),a=i(508),o=i(25),h=i(80),u=new n({Extends:h,Mixins:[s],initialize:function(t){h.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:a,fragShader:t.fragShader?t.fragShader:r,vertexCapacity:t.vertexCapacity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+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:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:4*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=2e3,this.batches=[],this.mvpInit()},setTexture2D:function(t,e){if(!t)return this;var i=this.batches;0===i.length&&this.pushBatch();var n=i[i.length-1];return e>0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.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,n=this.gl,s=this.renderer,r=this.vertexCount,a=this.topology,o=this.vertexSize,h=this.batches,u=0,l=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*o));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])&&s.setTexture2D(i,1+e);n.activeTexture(n.TEXTURE0)}u=t.first-l.first,null===l.texture||u<=0||(s.setTexture2D(l.texture,0),n.drawArrays(a,l.first,u))}if((l=h[h.length-1]).textures.length>0){for(e=0;e<l.textures.length;++e)(i=l.textures[e])&&s.setTexture2D(i,1+e);n.activeTexture(n.TEXTURE0)}return u=r-l.first,l.texture&&u>0&&(s.setTexture2D(l.texture,0),n.drawArrays(a,l.first,u)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setPipeline(this),n.setTexture2D(s.source.glTexture,0),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s,r,a,o,h,u,l,c,d,f,p=this.renderer.config.roundPixels,g=t.emitters.list,m=g.length,v=this.vertexViewF32,y=this.vertexViewU32,x=this.renderer,w=this.maxQuads,T=e.scrollX,S=e.scrollY,A=e.matrix.matrix,b=A[0],E=A[1],_=A[2],C=A[3],M=A[4],k=A[5],P=Math.sin,L=Math.cos,F=this.vertexComponentCount,R=this.vertexCapacity,O=t.defaultFrame.source.glTexture;n&&(h=n[0],u=n[1],l=n[2],c=n[3],d=n[4],f=n[5]),this.setTexture2D(O,0);for(var D=0;D<m;++D){var I=g[D],B=I.alive,N=B.length,U=Math.ceil(N/w),Y=0,X=T*I.scrollFactorX,G=S*I.scrollFactorY;if(n){var z=-X,W=-G;s=l*b+c*_,r=l*E+c*C,a=d*b+f*_+(z*b+W*_+M),o=d*E+f*C+(z*E+W*C+k),b=h*b+u*_,E=h*E+u*C,_=s,C=r,M=a,k=o,X=0,G=0}if(I.visible&&0!==N){x.setBlendMode(I.blendMode),this.vertexCount>=R&&(this.flush(),this.setTexture2D(O,0));for(var V=0;V<U;++V){for(var H=Math.min(N,w),j=0;j<H;++j){var K=B[Y+j];if(!(K.alpha<=0)){var q=K.frame,J=q.uvs,Z=-q.halfWidth,Q=-q.halfHeight,$=K.color,tt=Z+q.width,et=Q+q.height,it=P(K.rotation),nt=L(K.rotation),st=nt*K.scaleX,rt=it*K.scaleX,at=-it*K.scaleY,ot=nt*K.scaleY,ht=K.x-X,ut=K.y-G,lt=st*b+rt*_,ct=st*E+rt*C,dt=at*b+ot*_,ft=at*E+ot*C,pt=ht*b+ut*_+M,gt=ht*E+ut*C+k,mt=Z*lt+Q*dt+pt,vt=Z*ct+Q*ft+gt,yt=Z*lt+et*dt+pt,xt=Z*ct+et*ft+gt,wt=tt*lt+et*dt+pt,Tt=tt*ct+et*ft+gt,St=tt*lt+Q*dt+pt,At=tt*ct+Q*ft+gt,bt=this.vertexCount*F;p&&(mt|=0,vt|=0,yt|=0,xt|=0,wt|=0,Tt|=0,St|=0,At|=0),v[bt+0]=mt,v[bt+1]=vt,v[bt+2]=J.x0,v[bt+3]=J.y0,y[bt+4]=$,v[bt+5]=yt,v[bt+6]=xt,v[bt+7]=J.x1,v[bt+8]=J.y1,y[bt+9]=$,v[bt+10]=wt,v[bt+11]=Tt,v[bt+12]=J.x2,v[bt+13]=J.y2,y[bt+14]=$,v[bt+15]=mt,v[bt+16]=vt,v[bt+17]=J.x0,v[bt+18]=J.y0,y[bt+19]=$,v[bt+20]=wt,v[bt+21]=Tt,v[bt+22]=J.x2,v[bt+23]=J.y2,y[bt+24]=$,v[bt+25]=St,v[bt+26]=At,v[bt+27]=J.x3,v[bt+28]=J.y3,y[bt+29]=$,this.vertexCount+=6,this.vertexCount>=R&&(this.flush(),this.setTexture2D(O,0))}}Y+=H,N-=H,this.vertexCount>=R&&(this.flush(),this.setTexture2D(O,0))}}}this.setTexture2D(O,0)},drawBlitter:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s=this.renderer.config.roundPixels,r=o.getTintAppendFloatAlpha,a=this.vertexViewF32,h=this.vertexViewU32,u=t.getRenderList(),l=u.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],m=c[4],v=c[5],y=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(l/this.maxQuads),T=0;if(n){var S=n[0],A=n[1],b=n[2],E=n[3],_=n[4],C=n[5],M=-y,k=-x,P=b*d+E*p,L=b*f+E*g,F=_*d+C*p+(M*d+k*p+m),R=_*f+C*g+(M*f+k*g+v);d=S*d+A*p,f=S*f+A*g,p=P,g=L,m=F,v=R,y=0,x=0}for(var O=t.x-y,D=t.y-x,I=0;I<w;++I){for(var B=Math.min(l,this.maxQuads),N=0;N<B;++N){var U=u[T+N],Y=U.frame,X=r(16777215,U.alpha),G=Y.uvs,z=U.flipX,W=U.flipY,V=Y.width*(z?-1:1),H=Y.height*(W?-1:1),j=O+U.x+Y.x+Y.width*(z?1:0),K=D+U.y+Y.y+Y.height*(W?1:0),q=j+V,J=K+H,Z=j*d+K*p+m,Q=j*f+K*g+v,$=q*d+J*p+m,tt=q*f+J*g+v;this.setTexture2D(Y.texture.source[Y.sourceIndex].glTexture,0);var et=this.vertexCount*this.vertexComponentCount;s&&(Z|=0,Q|=0,$|=0,tt|=0),a[et+0]=Z,a[et+1]=Q,a[et+2]=G.x0,a[et+3]=G.y0,h[et+4]=X,a[et+5]=Z,a[et+6]=tt,a[et+7]=G.x1,a[et+8]=G.y1,h[et+9]=X,a[et+10]=$,a[et+11]=tt,a[et+12]=G.x2,a[et+13]=G.y2,h[et+14]=X,a[et+15]=Z,a[et+16]=Q,a[et+17]=G.x0,a[et+18]=G.y0,h[et+19]=X,a[et+20]=$,a[et+21]=tt,a[et+22]=G.x2,a[et+23]=G.y2,h[et+24]=X,a[et+25]=$,a[et+26]=Q,a[et+27]=G.x3,a[et+28]=G.y3,h[et+29]=X,this.vertexCount+=6,this.vertexCount>=this.vertexCapacity&&this.flush()}T+=B,l-=B,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,a,h,u,l,c=this.renderer.config.roundPixels,d=o.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=e.matrix.matrix,m=t.frame,v=m.texture.source[m.sourceIndex].glTexture,y=!!v.isRenderTexture,x=t.flipX,w=t.flipY^y,T=m.uvs,S=m.width*(x?-1:1),A=m.height*(w?-1:1),b=-t.displayOriginX+m.x+m.width*(x?1:0),E=-t.displayOriginY+m.y+m.height*(w?1:0),_=(c?0|b:b)+S,C=(c?0|E:E)+A,M=t.scaleX,k=t.scaleY,P=t.rotation,L=t._alphaTL,F=t._alphaTR,R=t._alphaBL,O=t._alphaBR,D=t._tintTL,I=t._tintTR,B=t._tintBL,N=t._tintBR,U=Math.sin(P),Y=Math.cos(P),X=Y*M,G=U*M,z=-U*k,W=Y*k,V=t.x,H=t.y,j=g[0],K=g[1],q=g[2],J=g[3],Z=g[4],Q=g[5];if(n){var $=n[0],tt=n[1],et=n[2],it=n[3],nt=n[4],st=n[5],rt=-e.scrollX*t.scrollFactorX,at=-e.scrollY*t.scrollFactorY,ot=$*j+tt*q,ht=$*K+tt*J,ut=et*j+it*q,lt=et*K+it*J;s=X*ot+G*ut,r=X*ht+G*lt,a=z*ot+W*ut,h=z*ht+W*lt,u=V*ot+H*ut+(nt*j+st*q+(rt*j+at*q+Z)),l=V*ht+H*lt+(nt*K+st*J+(rt*K+at*J+Q))}else s=X*j+G*q,r=X*K+G*J,a=z*j+W*q,h=z*K+W*J,u=(V-=e.scrollX*t.scrollFactorX)*j+(H-=e.scrollY*t.scrollFactorY)*q+Z,l=V*K+H*J+Q;var ct,dt=b*s+E*a+u,ft=b*r+E*h+l,pt=b*s+C*a+u,gt=b*r+C*h+l,mt=_*s+C*a+u,vt=_*r+C*h+l,yt=_*s+E*a+u,xt=_*r+E*h+l,wt=d(D,L),Tt=d(I,F),St=d(B,R),At=d(N,O);c&&(dt|=0,ft|=0,pt|=0,gt|=0,mt|=0,vt|=0,yt|=0,xt|=0),this.setTexture2D(v,0),f[(ct=this.vertexCount*this.vertexComponentCount)+0]=dt,f[ct+1]=ft,f[ct+2]=T.x0,f[ct+3]=T.y0,p[ct+4]=wt,f[ct+5]=pt,f[ct+6]=gt,f[ct+7]=T.x1,f[ct+8]=T.y1,p[ct+9]=St,f[ct+10]=mt,f[ct+11]=vt,f[ct+12]=T.x2,f[ct+13]=T.y2,p[ct+14]=At,f[ct+15]=dt,f[ct+16]=ft,f[ct+17]=T.x0,f[ct+18]=T.y0,p[ct+19]=wt,f[ct+20]=mt,f[ct+21]=vt,f[ct+22]=T.x2,f[ct+23]=T.y2,p[ct+24]=At,f[ct+25]=yt,f[ct+26]=xt,f[ct+27]=T.x3,f[ct+28]=T.y3,p[ct+29]=Tt,this.vertexCount+=6},batchMesh:function(t,e,i){var n=null;i&&(n=i.matrix);var s=t.vertices,r=s.length,a=r/2|0;this.renderer.setPipeline(this),this.vertexCount+a>this.vertexCapacity&&this.flush();var h,u,l,c,d,f,p=this.renderer.config.roundPixels,g=o.getTintAppendFloatAlpha,m=t.uv,v=t.colors,y=t.alphas,x=this.vertexViewF32,w=this.vertexViewU32,T=e.matrix.matrix,S=t.frame,A=t.texture.source[S.sourceIndex].glTexture,b=t.x,E=t.y,_=t.scaleX,C=t.scaleY,M=t.rotation,k=Math.sin(M),P=Math.cos(M),L=P*_,F=k*_,R=-k*C,O=P*C,D=b,I=E,B=T[0],N=T[1],U=T[2],Y=T[3],X=T[4],G=T[5],z=0;if(n){var W=n[0],V=n[1],H=n[2],j=n[3],K=n[4],q=n[5],J=-e.scrollX*t.scrollFactorX,Z=-e.scrollY*t.scrollFactorY,Q=W*B+V*U,$=W*N+V*Y,tt=H*B+j*U,et=H*N+j*Y;h=L*Q+F*tt,u=L*$+F*et,l=R*Q+O*tt,c=R*$+O*et,d=D*Q+I*tt+(K*B+q*U+(J*B+Z*U+X)),f=D*$+I*et+(K*N+q*Y+(J*N+Z*Y+G))}else h=L*B+F*U,u=L*N+F*Y,l=R*B+O*U,c=R*N+O*Y,d=(D-=e.scrollX*t.scrollFactorX)*B+(I-=e.scrollY*t.scrollFactorY)*U+X,f=D*N+I*Y+G;this.setTexture2D(A,0),z=this.vertexCount*this.vertexComponentCount;for(var it=0,nt=0;it<r;it+=2){var st=s[it+0],rt=s[it+1],at=st*h+rt*l+d,ot=st*u+rt*c+f;p&&(at|=0,ot|=0),x[z+0]=at,x[z+1]=ot,x[z+2]=m[it+0],x[z+3]=m[it+1],w[z+4]=g(v[nt],y[nt]),z+=5,nt+=1}this.vertexCount+=a},batchBitmapText:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,a,h,u,l,c,d,f,p,g,m,v,y,x=this.renderer.config.roundPixels,w=t.text,T=w.length,S=o.getTintAppendFloatAlpha,A=this.vertexViewF32,b=this.vertexViewU32,E=e.matrix.matrix,_=e.width+50,C=e.height+50,M=t.frame,k=t.texture.source[M.sourceIndex],P=e.scrollX*t.scrollFactorX,L=e.scrollY*t.scrollFactorY,F=t.fontData,R=F.lineHeight,O=t.fontSize/F.size,D=F.chars,I=t.alpha,B=S(t._tintTL,I),N=S(t._tintTR,I),U=S(t._tintBL,I),Y=S(t._tintBR,I),X=t.x,G=t.y,z=M.cutX,W=M.cutY,V=k.width,H=k.height,j=k.glTexture,K=0,q=0,J=0,Z=0,Q=null,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,at=0,ot=0,ht=0,ut=0,lt=0,ct=null,dt=0,ft=X+M.x,pt=G+M.y,gt=t.rotation,mt=t.scaleX,vt=t.scaleY,yt=t.letterSpacing,xt=Math.sin(gt),wt=Math.cos(gt),Tt=wt*mt,St=xt*mt,At=-xt*vt,bt=wt*vt,Et=ft,_t=pt,Ct=E[0],Mt=E[1],kt=E[2],Pt=E[3],Lt=E[4],Ft=E[5],Rt=0;if(n){var Ot=n[0],Dt=n[1],It=n[2],Bt=n[3],Nt=n[4],Ut=n[5],Yt=-P,Xt=-L,Gt=Ot*Ct+Dt*kt,zt=Ot*Mt+Dt*Pt,Wt=It*Ct+Bt*kt,Vt=It*Mt+Bt*Pt;f=Tt*Gt+St*Wt,p=Tt*zt+St*Vt,g=At*Gt+bt*Wt,m=At*zt+bt*Vt,v=Et*Gt+_t*Wt+(Nt*Ct+Ut*kt+(Yt*Ct+Xt*kt+Lt)),y=Et*zt+_t*Vt+(Nt*Mt+Ut*Pt+(Yt*Mt+Xt*Pt+Ft))}else f=Tt*Ct+St*kt,p=Tt*Mt+St*Pt,g=At*Ct+bt*kt,m=At*Mt+bt*Pt,v=(Et-=P)*Ct+(_t-=L)*kt+Lt,y=Et*Mt+_t*Pt+Ft;this.setTexture2D(j,0);for(var Ht=0;Ht<T;++Ht)if(10!==(Z=w.charCodeAt(Ht))){if(Q=D[Z]){if($=z+Q.x,tt=W+Q.y,et=Q.width,it=Q.height,nt=(J+Q.xOffset+K)*O,st=(Q.yOffset+q)*O,null!==ct){var jt=Q.kerning[dt];nt+=void 0!==jt?jt:0}K+=Q.xAdvance+yt,J+=1,ct=Q,dt=Z,0!==et&&0!==it&&32!==Z&&(r=(nt-=t.displayOriginX)*p+(st-=t.displayOriginY)*m+y,a=nt*f+(at=st+it*O)*g+v,h=nt*p+at*m+y,u=(rt=nt+et*O)*f+at*g+v,l=rt*p+at*m+y,c=rt*f+st*g+v,d=rt*p+st*m+y,ot=$/V,ht=($+et)/V,ut=tt/H,lt=(tt+it)/H,((s=nt*f+st*g+v)<-50||s>_||r<-50||r>C)&&(a<-50||a>_||h<-50||h>C)&&(u<-50||u>_||l<-50||l>C)&&(c<-50||c>_||d<-50||d>C)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Rt=this.vertexCount*this.vertexComponentCount,x&&(s|=0,r|=0,a|=0,h|=0,u|=0,l|=0,c|=0,d|=0),A[Rt+0]=s,A[Rt+1]=r,A[Rt+2]=ot,A[Rt+3]=ut,b[Rt+4]=B,A[Rt+5]=a,A[Rt+6]=h,A[Rt+7]=ot,A[Rt+8]=lt,b[Rt+9]=U,A[Rt+10]=u,A[Rt+11]=l,A[Rt+12]=ht,A[Rt+13]=lt,b[Rt+14]=Y,A[Rt+15]=s,A[Rt+16]=r,A[Rt+17]=ot,A[Rt+18]=ut,b[Rt+19]=B,A[Rt+20]=u,A[Rt+21]=l,A[Rt+22]=ht,A[Rt+23]=lt,b[Rt+24]=Y,A[Rt+25]=c,A[Rt+26]=d,A[Rt+27]=ht,A[Rt+28]=ut,b[Rt+29]=N,this.vertexCount+=6))}}else K=0,J=0,q+=R,ct=null},batchDynamicBitmapText:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,a,h,u,l,c,d,f,p,g,m,v,y,x,w,T,S,A,b,E=this.renderer.config.roundPixels,_=t.displayCallback,C=t.text,M=C.length,k=o.getTintAppendFloatAlpha,P=this.vertexViewF32,L=this.vertexViewU32,F=this.renderer,R=e.matrix.matrix,O=t.frame,D=t.texture.source[O.sourceIndex],I=e.scrollX*t.scrollFactorX,B=e.scrollY*t.scrollFactorY,N=t.scrollX,U=t.scrollY,Y=t.fontData,X=Y.lineHeight,G=t.fontSize/Y.size,z=Y.chars,W=t.alpha,V=k(t._tintTL,W),H=k(t._tintTR,W),j=k(t._tintBL,W),K=k(t._tintBR,W),q=t.x,J=t.y,Z=O.cutX,Q=O.cutY,$=D.width,tt=D.height,et=D.glTexture,it=0,nt=0,st=0,rt=0,at=null,ot=0,ht=0,ut=0,lt=0,ct=0,dt=0,ft=0,pt=0,gt=0,mt=0,vt=0,yt=0,xt=null,wt=0,Tt=q+O.x,St=J+O.y,At=t.rotation,bt=t.scaleX,Et=t.scaleY,_t=t.letterSpacing,Ct=Math.sin(At),Mt=Math.cos(At),kt=Mt*bt,Pt=Ct*bt,Lt=-Ct*Et,Ft=Mt*Et,Rt=Tt,Ot=St,Dt=R[0],It=R[1],Bt=R[2],Nt=R[3],Ut=R[4],Yt=R[5],Xt=t.cropWidth>0||t.cropHeight>0,Gt=0;if(n){var zt=n[0],Wt=n[1],Vt=n[2],Ht=n[3],jt=n[4],Kt=n[5],qt=-I,Jt=-B,Zt=zt*Dt+Wt*Bt,Qt=zt*It+Wt*Nt,$t=Vt*Dt+Ht*Bt,te=Vt*It+Ht*Nt;x=kt*Zt+Pt*$t,w=kt*Qt+Pt*te,T=Lt*Zt+Ft*$t,S=Lt*Qt+Ft*te,A=Rt*Zt+Ot*$t+(jt*Dt+Kt*Bt+(qt*Dt+Jt*Bt+Ut)),b=Rt*Qt+Ot*te+(jt*It+Kt*Nt+(qt*It+Jt*Nt+Yt))}else x=kt*Dt+Pt*Bt,w=kt*It+Pt*Nt,T=Lt*Dt+Ft*Bt,S=Lt*It+Ft*Nt,A=(Rt-=I)*Dt+(Ot-=B)*Bt+Ut,b=Rt*It+Ot*Nt+Yt;this.setTexture2D(et,0),Xt&&F.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var ee=0;ee<M;++ee)if(G=t.fontSize/t.fontData.size,At=0,10!==(rt=C.charCodeAt(ee))){if(at=z[rt]){if(ot=Z+at.x,ht=Q+at.y,ut=at.width,lt=at.height,ct=st+at.xOffset+it-N,dt=at.yOffset+nt-U,null!==xt){var ie=at.kerning[wt];ct+=void 0!==ie?ie:0}if(it+=at.xAdvance+_t,st+=1,xt=at,wt=rt,0!==ut&&0!==lt&&32!==rt){if(_){var ne=_({color:0,tint:{topLeft:V,topRight:H,bottomLeft:j,bottomRight:K},index:ee,charCode:rt,x:ct,y:dt,scale:G,rotation:0,data:at.data});ct=ne.x,dt=ne.y,G=ne.scale,At=ne.rotation,ne.color?(V=ne.color,H=ne.color,j=ne.color,K=ne.color):(V=ne.tint.topLeft,H=ne.tint.topRight,j=ne.tint.bottomLeft,K=ne.tint.bottomRight),V=k(V,W),H=k(H,W),j=k(j,W),K=k(K,W)}ct-=t.displayOriginX,dt-=t.displayOriginY,ct*=G,dt*=G,Ct=Math.sin(At),Mt=Math.cos(At),s=Rt=(v=ct)*x+(y=dt)*T+A,r=Ot=v*w+y*S+b,a=(pt=lt)*(Lt=(g=-Ct*G)*x+(m=Mt*G)*T)+Rt,h=pt*(Ft=g*w+m*S)+Ot,u=(ft=ut)*(kt=(f=Mt*G)*x+(p=Ct*G)*T)+pt*Lt+Rt,l=ft*(Pt=f*w+p*S)+pt*Ft+Ot,c=ft*kt+Rt,d=ft*Pt+Ot,gt=ot/$,mt=(ot+ut)/$,vt=ht/tt,yt=(ht+lt)/tt,this.vertexCount+6>this.vertexCapacity&&this.flush(),Gt=this.vertexCount*this.vertexComponentCount,E&&(s|=0,r|=0,a|=0,h|=0,u|=0,l|=0,c|=0,d|=0),P[Gt+0]=s,P[Gt+1]=r,P[Gt+2]=gt,P[Gt+3]=vt,L[Gt+4]=V,P[Gt+5]=a,P[Gt+6]=h,P[Gt+7]=gt,P[Gt+8]=yt,L[Gt+9]=j,P[Gt+10]=u,P[Gt+11]=l,P[Gt+12]=mt,P[Gt+13]=yt,L[Gt+14]=K,P[Gt+15]=s,P[Gt+16]=r,P[Gt+17]=gt,P[Gt+18]=vt,L[Gt+19]=V,P[Gt+20]=u,P[Gt+21]=l,P[Gt+22]=mt,P[Gt+23]=yt,L[Gt+24]=K,P[Gt+25]=c,P[Gt+26]=d,P[Gt+27]=mt,P[Gt+28]=vt,L[Gt+29]=H,this.vertexCount+=6}}}else it=0,st=0,nt+=X,xt=null;Xt&&F.popScissor()},batchText:function(t,e,i){var n=o.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,n(t._tintTL,t._alphaTL),n(t._tintTR,t._alphaTR),n(t._tintBL,t._alphaBL),n(t._tintBR,t._alphaBR),0,0,e,i)},batchDynamicTilemapLayer:function(t,e,i){for(var n=t.culledTiles,s=n.length,r=t.tileset.image.get().source.glTexture,a=t.tileset,h=t.scrollFactorX,u=t.scrollFactorY,l=t.alpha,c=t.x,d=t.y,f=t.scaleX,p=t.scaleY,g=o.getTintAppendFloatAlpha,m=0;m<s;++m){var v=n[m],y=a.getTileTextureCoordinates(v.index);if(null!==y){var x=v.width,w=v.height,T=y.x,S=y.y,A=g(v.tint,l*v.alpha);this.batchTexture(t,r,r.width,r.height,v.width/2+c+v.pixelX*f,v.height/2+d+v.pixelY*p,v.width*f,v.height*p,1,1,v.rotation,v.flipX,v.flipY,h,u,v.width/2,v.height/2,T,S,x,w,A,A,A,A,0,0,e,i)}}},batchTileSprite:function(t,e,i){var n=o.getTintAppendFloatAlpha;this.batchTexture(t,t.tileTexture,t.frame.width,t.frame.height,t.x,t.y,t.width,t.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.originX*t.width,t.originY*t.height,0,0,t.width,t.height,n(t._tintTL,t._alphaTL),n(t._tintTR,t._alphaTR),n(t._tintBL,t._alphaBL),n(t._tintBR,t._alphaBR),t.tilePositionX%t.frame.width/t.frame.width,t.tilePositionY%t.frame.height/t.frame.height,e,i)},batchTexture:function(t,e,i,n,s,r,a,o,h,u,l,c,d,f,p,g,m,v,y,x,w,T,S,A,b,E,_,C,M){var k=null;M&&(k=M.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0;var P,L,F,R,O,D,I=this.renderer.config.roundPixels,B=this.vertexViewF32,N=this.vertexViewU32,U=C.matrix.matrix,Y=a*(c?1:0)-g,X=o*(d?1:0)-m,G=Y+a*(c?-1:1),z=X+o*(d?-1:1),W=s,V=r,H=Math.sin(l),j=Math.cos(l),K=j*h,q=H*h,J=-H*u,Z=j*u,Q=W,$=V,tt=U[0],et=U[1],it=U[2],nt=U[3],st=U[4],rt=U[5];if(k){var at=k[0],ot=k[1],ht=k[2],ut=k[3],lt=k[4],ct=k[5],dt=-C.scrollX*f,ft=-C.scrollY*p,pt=at*tt+ot*it,gt=at*et+ot*nt,mt=ht*tt+ut*it,vt=ht*et+ut*nt;P=K*pt+q*mt,L=K*gt+q*vt,F=J*pt+Z*mt,R=J*gt+Z*vt,O=Q*pt+$*mt+(lt*tt+ct*it+(dt*tt+ft*it+st)),D=Q*gt+$*vt+(lt*et+ct*nt+(dt*et+ft*nt+rt))}else P=K*tt+q*it,L=K*et+q*nt,F=J*tt+Z*it,R=J*et+Z*nt,O=(Q-=C.scrollX*f)*tt+($-=C.scrollY*p)*it+st,D=Q*et+$*nt+rt;var yt,xt=Y*P+X*F+O,wt=Y*L+X*R+D,Tt=Y*P+z*F+O,St=Y*L+z*R+D,At=G*P+z*F+O,bt=G*L+z*R+D,Et=G*P+X*F+O,_t=G*L+X*R+D,Ct=v/i+E,Mt=y/n+_,kt=(v+x)/i+E,Pt=(y+w)/n+_;this.setTexture2D(e,0),yt=this.vertexCount*this.vertexComponentCount,I&&(xt|=0,wt|=0,Tt|=0,St|=0,At|=0,bt|=0,Et|=0,_t|=0),B[yt+0]=xt,B[yt+1]=wt,B[yt+2]=Ct,B[yt+3]=Mt,N[yt+4]=T,B[yt+5]=Tt,B[yt+6]=St,B[yt+7]=Ct,B[yt+8]=Pt,N[yt+9]=S,B[yt+10]=At,B[yt+11]=bt,B[yt+12]=kt,B[yt+13]=Pt,N[yt+14]=A,B[yt+15]=xt,B[yt+16]=wt,B[yt+17]=Ct,B[yt+18]=Mt,N[yt+19]=T,B[yt+20]=At,B[yt+21]=bt,B[yt+22]=kt,B[yt+23]=Pt,N[yt+24]=A,B[yt+25]=Et,B[yt+26]=_t,B[yt+27]=kt,B[yt+28]=Mt,N[yt+29]=b,this.vertexCount+=6},drawTexture:function(t,e,i,n,s,r,a,h,u,l,c){var d=null;c&&(d=c.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var f=this.renderer.config.roundPixels,p=this.vertexViewF32,g=this.vertexViewU32,m=e,v=i,y=m+h,x=v+u,w=l[0],T=l[1],S=l[2],A=l[3],b=l[4],E=l[5];if(d){var _=d[0],C=d[1],M=d[2],k=d[3],P=d[4],L=w*C+T*k,F=S*C+A*k,R=b*C+E*k+d[5];w=w*_+T*M,T=L,S=S*_+A*M,A=F,b=b*_+E*M+P,E=R}var O,D=m*w+v*S+b,I=m*T+v*A+E,B=m*w+x*S+b,N=m*T+x*A+E,U=y*w+x*S+b,Y=y*T+x*A+E,X=y*w+v*S+b,G=y*T+v*A+E,z=t.width,W=t.height,V=r/z,H=a/W,j=(r+h)/z,K=(a+u)/W;n=o.getTintAppendFloatAlpha(n,s),this.setTexture2D(t,0),O=this.vertexCount*this.vertexComponentCount,f&&(D|=0,I|=0,B|=0,N|=0,U|=0,Y|=0,X|=0,G|=0),p[O+0]=D,p[O+1]=I,p[O+2]=V,p[O+3]=H,g[O+4]=n,p[O+5]=B,p[O+6]=N,p[O+7]=V,p[O+8]=K,g[O+9]=n,p[O+10]=U,p[O+11]=Y,p[O+12]=j,p[O+13]=K,g[O+14]=n,p[O+15]=D,p[O+16]=I,p[O+17]=V,p[O+18]=H,g[O+19]=n,p[O+20]=U,p[O+21]=Y,p[O+22]=j,p[O+23]=K,g[O+24]=n,p[O+25]=X,p[O+26]=G,p[O+27]=j,p[O+28]=H,g[O+29]=n,this.vertexCount+=6,this.flush()},batchGraphics:function(){}});t.exports=u},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===i&&(i=!0),e&&("string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e)),n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i<e.length;i++){var n=e[i]+"mageSmoothingEnabled";if(n in t)return n}return null},isEnabled:function(t){return null!==n?t[n]:null}}},function(t,e,i){var n=i(279),s=i(277),r=i(275),a=i(274);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?a(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var s=0;if(e+1>=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-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 n=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,s=Math.sqrt(Math.random());return e.x=t.x+s*Math.cos(i)*t.width/2,e.y=t.y+s*Math.sin(i)*t.height/2,e}},function(t,e,i){var n=i(93),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(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 n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},,,,,,,,,,,function(t,e){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 void 0===t[n]?null:t[n]}},function(t,e,i){t.exports={Matrix:i(480),Add:i(473),AddAt:i(472),BringToTop:i(471),CountAllMatching:i(470),Each:i(469),EachInRange:i(468),FindClosestInSorted:i(200),GetAll:i(467),GetFirst:i(466),GetRandom:i(139),MoveDown:i(465),MoveTo:i(464),MoveUp:i(463),NumberArray:i(165),NumberArrayStep:i(462),QuickSelect:i(164),Range:i(246),Remove:i(461),RemoveAt:i(460),RemoveBetween:i(459),RemoveRandomElement:i(458),Replace:i(457),RotateLeft:i(282),RotateRight:i(281),SafeRange:i(26),SendToBack:i(456),SetAll:i(455),Shuffle:i(91),SpliceOne:i(70),StableSort:i(79),Swap:i(454)}},function(t,e,i){var n=i(0),s=i(510),r=i(120),a=new n({Extends:r,initialize:function(t){t.fragShader=s.replace("%LIGHT_COUNT%",10..toString()),r.call(this,t)},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.sys.lights;if(!i)return this;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;var n,s=this.renderer,r=this.program,a=i.cull(e),o=Math.min(a.length,10),h=e.matrix,u={x:0,y:0},l=s.height;for(n=0;n<10;++n)s.setFloat1(r,"uLights["+n+"].radius",0);if(o<=0)return this;for(s.setFloat4(r,"uCamera",e.x,e.y,e.rotation,e.zoom),s.setFloat3(r,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),n=0;n<o;++n){var c=a[n],d="uLights["+n+"].";h.transformPoint(c.x,c.y,u),s.setFloat2(r,d+"position",u.x-e.scrollX*c.scrollFactorX*e.zoom,l-(u.y-e.scrollY*c.scrollFactorY*e.zoom)),s.setFloat3(r,d+"color",c.r,c.g,c.b),s.setFloat1(r,d+"intensity",c.intensity),s.setFloat1(r,d+"radius",c.radius)}return this},drawStaticTilemapLayer:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.drawStaticTilemapLayer.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. StaticTilemapLayer rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.drawStaticTilemapLayer(t,e,i))},drawEmitterManager:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.drawEmitterManager.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. EmitterManager rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.drawEmitterManager(t,e,i))},drawBlitter:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.drawBlitter.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. Blitter rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.drawBlitter(t,e,i))},batchSprite:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.batchSprite.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. Sprite rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.batchSprite(t,e,i))},batchMesh:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.batchMesh.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. Mesh rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.batchMesh(t,e,i))},batchBitmapText:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.batchBitmapText.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. BitmapText rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.batchBitmapText(t,e,i))},batchDynamicBitmapText:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.batchDynamicBitmapText.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. DynamicBitmapText rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.batchDynamicBitmapText(t,e,i))},batchText:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.batchText.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. Text rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.batchText(t,e,i))},batchDynamicTilemapLayer:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.batchDynamicTilemapLayer.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. DynamicTilemapLayer rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.batchDynamicTilemapLayer(t,e,i))},batchTileSprite:function(t,e,i){var n=t.texture.dataSource[0];n?(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),r.prototype.batchTileSprite.call(this,t,e,i)):(console.warn("Normal map texture missing for using Light2D pipeline. TileSprite rendered with default pipeline."),this.renderer.pipelines.TextureTintPipeline.batchTileSprite(t,e,i))}});a.LIGHT_COUNT=10,t.exports=a},function(t,e,i){var n=i(15);t.exports=function(t){return t*n.RAD_TO_DEG}},,function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,s=t.y2-t.y1,r=t.x3-t.x1,a=t.y3-t.y1,o=Math.random(),h=Math.random();return o+h>=1&&(o=1-o,h=1-h),e.x=t.x1+(i*o+r*h),e.y=t.y1+(s*o+a*h),e}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(5);t.exports=function(t,e){void 0===e&&(e=new n);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 n=i(67),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,u=t.y2,l=0;l<e;l++){var c=l/e,d=a+(h-a)*c,f=o+(u-o)*c;r.push(new s(d,f))}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=2*Math.PI*Math.random(),s=Math.random()+Math.random(),r=s>1?2-s:s,a=r*Math.cos(i),o=r*Math.sin(i);return e.x=t.x+a*t.radius,e.y=t.y+o*t.radius,e}},,function(t,e,i){var n=i(0),s=i(9),r=i(68),a=i(57),o=new n({Extends:s,initialize:function(t){s.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=a.PENDING_ADD,this._pausedState=a.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===a.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],n=parseFloat(t.substr(2)),s=e;switch(i){case"+":s+=n;break;case"-":s-=n}return Math.max(0,s)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n<this.totalData;n++){var s=this.data[n];s.init(),this.hasOffset(s)?this.isOffsetAbsolute(s.offset)?(s.calculatedOffset=s.offset,0===s.offset&&(i=0)):this.isOffsetRelative(s.offset)&&(s.calculatedOffset=this.getRelativeOffset(s.offset,t)):s.calculatedOffset=i,t=s.totalDuration+s.calculatedOffset,e+=s.totalDuration,i+=s.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=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e<this.totalData;e++){this.data[e].play(t)}},setCallback:function(t,e,i,n){return-1!==o.TYPES.indexOf(t)&&(this.callbacks[t]={func:e,scope:n,params:i}),this},makeActive:function(t){return this.manager.makeActive(t)},play:function(){if(this.state!==a.ACTIVE){if(this.paused)return this.paused=!1,void this.manager.makeActive(this);this.resetTweens(!1),this.state=a.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=a.LOOP_DELAY):this.state=a.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=a.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=a.PENDING_REMOVE}},update:function(t,e){if(this.state!==a.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 a.ACTIVE:for(var n=this.totalData,s=0;s<this.totalData;s++){this.data[s].update(t,i)&&n--}var r=this.callbacks.onUpdate;r&&r.func.apply(r.scope,r.params),this.emit("update",this),0===n&&this.nextState();break;case a.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=a.ACTIVE);break;case a.COMPLETE_DELAY:if(this.countdown-=e,this.countdown<=0){var o=this.callbacks.onComplete;o&&o.func.apply(o.scope,o.params),this.emit("complete",this),this.state=a.PENDING_REMOVE}}return this.state===a.PENDING_REMOVE}},stop:function(){this.state=a.PENDING_REMOVE},pause:function(){if(this.state!==a.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=a.PAUSED,this.emit("pause",this),this},resume:function(){return this.state===a.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()}});o.TYPES=["onStart","onUpdate","onLoop","onComplete","onYoyo"],t.exports=o},function(t,e,i){var n=i(47),s=i(96),r=i(8),a=i(58),o=i(59),h=i(69),u=i(98),l=i(154),c=i(4),d=i(151),f=i(68);t.exports=function(t,e){var i=new d(t),p=l(e);if(0===p.length)return i.paused=!0,i;var g=n(s);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=o(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=a(e,"yoyo",g.yoyo),g.flipX=a(e,"flipX",g.flipX),g.flipY=a(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=a(e,"paused",!1),i.useFrames=a(e,"useFrames",!1);var y=c(e,"callbackScope",i),x=[i],w=c(e,"onStart",!1);if(w){var T=c(e,"onStartScope",y),S=c(e,"onStartParams",[]);i.setCallback("onStart",w,x.concat(S),T)}var A=c(e,"onUpdate",!1);if(A){var b=c(e,"onUpdateScope",y),E=c(e,"onUpdateParams",[]);i.setCallback("onUpdate",A,x.concat(E),b)}var _=c(e,"onLoop",!1);if(_){var C=c(e,"onLoopScope",y),M=c(e,"onLoopParams",[]);i.setCallback("onLoop",_,x.concat(M),C)}var k=c(e,"onYoyo",!1);if(k){var P=c(e,"onYoyoScope",y),L=c(e,"onYoyoParams",[]);i.setCallback("onYoyo",k,x.concat(null,L),P)}var F=c(e,"onComplete",!1);if(F){var R=c(e,"onCompleteScope",y),O=c(e,"onCompleteParams",[]);i.setCallback("onComplete",F,x.concat(O),R)}return i}},function(t,e,i){var n=i(96),s=i(8),r=i(58),a=i(59),o=i(69),h=i(4),u=i(97),l=i(95),c=i(94);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=o(e,"delay",i.delay),m=o(e,"duration",i.duration),v=h(e,"easeParams",i.easeParams),y=a(h(e,"ease",i.ease),v),x=o(e,"hold",i.hold),w=o(e,"repeat",i.repeat),T=o(e,"repeatDelay",i.repeatDelay),S=r(e,"yoyo",i.yoyo),A=[],b=u("value",f),E=c(p[0],"value",b.getEnd,b.getStart,y,g,m,S,x,w,T,!1,!1);E.start=d,E.current=d,E.to=f,A.push(E);var _=new l(t,A,p);_.offset=s(e,"offset",null),_.completeDelay=s(e,"completeDelay",0),_.loop=Math.round(s(e,"loop",0)),_.loopDelay=Math.round(s(e,"loopDelay",0)),_.paused=r(e,"paused",!1),_.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",_),M=[_,null],k=l.TYPES,P=0;P<k.length;P++){var L=k[P],F=h(e,L,!1);if(F){var R=h(e,L+"Scope",C),O=h(e,L+"Params",[]);_.setCallback(L,F,M.concat(O),R)}}return _}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(297);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===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(0),s=i(2),r=new n({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=s(t,"delay",0),this.repeat=s(t,"repeat",0),this.loop=s(t,"loop",!1),this.callback=s(t,"callback",void 0),this.callbackScope=s(t,"callbackScope",this.callback),this.args=s(t,"args",[]),this.timeScale=s(t,"timeScale",1),this.startAt=s(t,"startAt",0),this.paused=s(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 n=i(0),s=i(18),r=i(2),a=i(117),o=new n({Extends:s,initialize:function(t,e,i,n){this.locked="ontouchstart"in window,this.loaded=!1;var a={type:"audio",extension:r(e,"type",""),key:t,url:r(e,"uri",e),path:i,config:n};s.call(this,a)},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(t){this.loader=t,this.data=[];var e=this.config&&this.config.instances||1;this.filesTotal=e,this.filesLoaded=0,this.percentComplete=0;for(var i=0;i<e;i++){var n=new Audio;n.dataset.name=this.key+("0"+i).slice(-2),n.dataset.used="false",this.locked?n.dataset.locked="true":(n.dataset.locked="false",n.preload="auto",n.oncanplaythrough=this.onProgress.bind(this),n.onerror=this.onError.bind(this)),this.data.push(n)}for(i=0;i<this.data.length;i++)(n=this.data[i]).src=a(this,t.baseURL),this.locked||n.load();this.locked&&setTimeout(this.onLoad.bind(this))}});t.exports=o},function(t,e,i){var n=i(0),s=i(19),r=i(18),a=i(7),o=i(2),h=i(157),u=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var a={type:"audio",extension:o(e,"type",""),responseType:"arraybuffer",key:t,url:o(e,"uri",e),path:i,xhrSettings:n};r.call(this,a)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,a=r.config.audio,o=r.device.audio;if(a&&a.noAudio||!o.webAudio&&!o.audioData)return null;var l=u.findAudioURL(r,i);return l?!o.webAudio||a&&a.disableWebAudio?new h(e,l,t.path,n):new u(e,l,t.path,s,r.sound.context):null},a.register("audio",function(t,e,i,n){var s=u.create(this,t,e,i,n);return s&&this.addFile(s),this}),u.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i<e.length;i++){var n=o(e[i],"uri",e[i]);if(0===n.indexOf("blob:")||0===n.indexOf("data:"))return n;var s=n.match(/\.([a-zA-Z0-9]+)($|\?)/);if(s=o(e[i],"type",s?s[1]:"").toLowerCase(),t.device.audio[s])return{uri:n,type:s}}return null},t.exports=u},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!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 n=i(111),s=i(1);t.exports=function(t,e,i,r,a,o,h){if(!(s.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=o||t.currentContext,y=1,x=1,w=0,T=0,S=1,A=0,b=0,E=0;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),a){var _=a.matrix;v.transform(_[0],_[1],_[2],_[3],_[4],_[5])}v.translate(c-u,d-l),v.rotate(g),v.scale(f,p),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=m.length;C<M;++C)switch(m[C]){case n.ARC:v.arc(m[C+1],m[C+2],m[C+3],m[C+4],m[C+5],m[C+6]),C+=6;break;case n.LINE_STYLE:S=m[C+1],w=m[C+2],y=m[C+3],A=(16711680&w)>>>16,b=(65280&w)>>>8,E=255&w,v.strokeStyle="rgba("+A+","+b+","+E+","+y+")",v.lineWidth=S,C+=3;break;case n.FILL_STYLE:T=m[C+1],x=m[C+2],A=(16711680&T)>>>16,b=(65280&T)>>>8,E=255&T,v.fillStyle="rgba("+A+","+b+","+E+","+x+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:h||v.fill();break;case n.STROKE_PATH:h||v.stroke();break;case n.FILL_RECT:h?v.rect(m[C+1],m[C+2],m[C+3],m[C+4]):v.fillRect(m[C+1],m[C+2],m[C+3],m[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(m[C+1],m[C+2]),v.lineTo(m[C+3],m[C+4]),v.lineTo(m[C+5],m[C+6]),v.closePath(),h||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(m[C+1],m[C+2]),v.lineTo(m[C+3],m[C+4]),v.lineTo(m[C+5],m[C+6]),v.closePath(),h||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(m[C+1],m[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(m[C+1],m[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(m[C+1],m[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(m[C+1],m[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(m[C+1],m[C+2]),C+=2;break;case n.SCALE:v.scale(m[C+1],m[C+2]),C+=2;break;case n.ROTATE:v.rotate(m[C+1]),C+=1}v.restore()}}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,n=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*n/(10+Math.sqrt(4-3*n)))}},function(t,e,i){var n=i(161),s=i(105),r=i(61),a=i(15);t.exports=function(t,e,i,o){void 0===o&&(o=[]),e||(e=n(t)/i);for(var h=0;h<e;h++){var u=r(h/e,0,a.PI2);o.push(s(t,u))}return o}},function(t,e,i){var n=i(105),s=i(61),r=i(15),a=i(5);t.exports=function(t,e,i){void 0===i&&(i=new a);var o=s(e,0,r.PI2);return n(t,o,i)}},function(t,e){var i=function(t,e,r,a,o){for(r=r||0,a=a||t.length-1,o=o||s;a>r;){if(a-r>600){var h=a-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(a,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,o)}var g=t[e],m=r,v=a;for(n(t,r,e),o(t[a],g)>0&&n(t,r,a);m<v;){for(n(t,m,v),m++,v--;o(t[m],g)<0;)m++;for(;o(t[v],g)>0;)v--}0===o(t[r],g)?n(t,r,v):n(t,++v,a),v<=e&&(r=v+1),e<=v&&(a=v-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return t<e?-1:t>e?1:0}t.exports=i},function(t,e){t.exports=function(t,e,i,n){for(var s=[],r=t;r<=e;r++)if(i||n){var a=i?i+r.toString():r.toString();n&&(a=a.concat(n)),s.push(a)}else s.push(r);return s}},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),s=0;s<i;s++){n[s]=new Array(e);for(var r=e-1;r>-1;r--)n[s][r]=t[r][s]}return n}},function(t,e,i){var n=i(0),s=i(19),r=i(121),a=i(55),o=new n({initialize:function(t,e,i,n){var s=t.manager.game;this.texture=t,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.width||0,this.height=n||e.naturalHeight||e.height||0,this.scaleMode=a.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){t.config.renderType===s.WEBGL&&(this.glTexture=t.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode)),t.config.pixelArt&&this.setFilter(1)},setFilter:function(t){var e=this.texture.manager.game;e.config.renderType===s.WEBGL&&e.renderer.setTextureFilter(this.glTexture,t)},destroy:function(){this.texture=null,this.image=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(119),r=i(167),a=new n({initialize:function(t,e,i,n,s){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 a=0;a<i.length;a++)this.source.push(new r(this,i[a],n,s))},add:function(t,e,i,n,r,a){var o=new s(this,t,e,i,n,r,a);return this.frames[t]=o,1===this.frameTotal&&(this.firstFrame=t),this.frameTotal++,o},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 n=this.frames[i];n.sourceIndex===t&&e.push(n.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)},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={}}});t.exports=a},function(t,e,i){t.exports={Canvas:i(492),Image:i(491),JSONArray:i(490),JSONHash:i(489),Pyxel:i(488),SpriteSheet:i(487),SpriteSheetFromAtlas:i(486),StarlingXML:i(485),UnityYAML:i(484)}},function(t,e,i){var n=i(22),s=i(0),r=i(27),a=i(9),o=i(270),h=i(4),u=i(169),l=i(168),c=new s({Extends:a,initialize:function(t){a.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.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"))},addBase64:function(t,e){var i=this,n=new Image;n.onerror=function(){i.emit("onerror",t)},n.onload=function(){var e=i.create(t,n);u.Image(e,0),i.emit("onload",t,e)},n.src=e},addImage:function(t,e,i){var n=this.create(t,e);return u.Image(n,0),i&&n.setDataSource(i),n},generate:function(t,e){var i=n.create(this,1,1);return e.canvas=i,o(e),this.addCanvas(t,i)},createCanvas:function(t,e,i){void 0===e&&(e=256),void 0===i&&(i=256);var s=n.create(this,e,i);return this.addCanvas(t,s)},addCanvas:function(t,e){var i=this.create(t,e);return u.Canvas(i,0),i},addAtlas:function(t,e,i){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i):this.addAtlasJSONHash(t,e,i)},addAtlasJSONArray:function(t,e,i){var n=this.create(t,e);if(Array.isArray(i))for(var s=1===i.length,r=0;r<n.source.length;r++){var a=s?i[0]:i[r];u.JSONArray(n,r,a)}else u.JSONArray(n,0,i);return n},addAtlasJSONHash:function(t,e,i){var n=this.create(t,e);if(Array.isArray(i))for(var s=0;s<i.length;s++)u.JSONHash(n,s,i[s]);else u.JSONHash(n,0,i);return n},addUnityAtlas:function(t,e,i){var n=this.create(t,e);return u.UnityYAML(n,0,i),n},addSpriteSheet:function(t,e,i){var n=this.create(t,e),s=n.source[0].width,r=n.source[0].height;return u.SpriteSheet(n,0,0,0,s,r,i),n},addSpriteSheetFromAtlas:function(t,e){var i=h(e,"atlas",null),n=h(e,"frame",null);if(i&&n){var s=this.get(i).get(n);if(s){var r=this.create(t,s.source.image);return s.trimmed?u.SpriteSheetFromAtlas(r,s,e):u.SpriteSheet(r,0,s.cutX,s.cutY,s.cutWidth,s.cutHeight,e),r}}},addAtlasStarlingXML:function(t,e,i){var n=this.create(t,e);if(Array.isArray(i))for(var s=0;s<i.length;s++)u.StarlingXML(n,s,i[s]);else u.StarlingXML(n,0,i);return n},addAtlasPyxel:function(t,e,i){var n=this.create(t,e);if(Array.isArray(i))for(var s=0;s<i.length;s++)u.Pyxel(n,s,i[s]);else u.Pyxel(n,0,i);return n},create:function(t,e,i,n){var s=new l(this,t,e,i,n);return this.list[t]=s,s},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,n){var s=this.getFrame(i,n);if(s){var a=s.source.image;if(t>=0&&t<=a.width&&e>=0&&e<=a.height){t+=s.cutX,e+=s.cutY;var o=this._tempContext;o.clearRect(0,0,1,1),o.drawImage(a,t,e,1,1,0,0,1,1);var h=o.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.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],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var s in this.list)i[0]=this.list[s],t.apply(e,i)},destroy:function(){for(var t in this.list)this.list[t].destroy();this.list={},this.game=null}});t.exports=c},function(t,e,i){var n=i(72),s=new(i(0))({Extends:n,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,n.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime<this.startTime)&&(!!n.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)&&(!!n.prototype.resume.call(this)&&(this.createAndStartBufferSource(),this.emit("resume",this),!0))},stop:function(){return!!n.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,n=(this.currentMarker?this.currentMarker.start:0)+t,s=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,n),Math.max(0,s)),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}),n.prototype.applyConfig.call(this)},update:function(t,e){this.hasEnded?(this.hasEnded=!1,n.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(){n.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(){n.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=s},function(t,e,i){var n=i(73),s=i(0),r=i(171),a=new s({Extends:n,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,n.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),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){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():this.context.close(),this.context=null,n.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=a},function(t,e,i){var n=i(72),s=i(0),r=i(9),a=i(16),o=new s({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=a({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),n.prototype.destroy.call(this)}});t.exports=o},function(t,e,i){var n=i(73),s=i(0),r=i(9),a=i(173),o=i(3),h=new s({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 a(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 n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:o,resumeAll:o,stopAll:o,update:o,setRate:o,setDetune:o,setMute:o,setVolume:o,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(72),s=new(i(0))({Extends:n,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,n.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!n.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit("play",this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!n.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)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.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 n=i[0];return this.audio=n.audio,n.reset(),n.audio=null,n.startTime=0,n.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(){n.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,n=i+this.duration,s=this.audio.currentTime;if(this.currentConfig.loop)s>=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s<i&&(this.audio.currentTime+=i,s=this.audio.currentTime),s<this.previousTime&&this.emit("looped",this);else if(s>=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){n.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(){n.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=s},function(t,e,i){var n=i(73),s=i(0),r=i(175),a=new s({Extends:n,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=null,this._mute=!1,this._volume=1,n.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){if(this.locked="ontouchstart"in window,this.locked){this.lockedActionsQueue=[];var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i<e.length;i++){var n=e[i];"true"===n.dataset.locked&&s.push(n)}return!0}),0!==s.length){var r=s[s.length-1];r.oncanplaythrough=function(){r.oncanplaythrough=null,s.forEach(function(t){t.dataset.locked="false"}),t.unlocked=!0},s.forEach(function(t){t.load()})}}};this.once("unlocked",function(){this.forEachActiveSound(function(t){null===t.currentMarker&&0===t.duration&&(t.duration=t.tags[0].duration),t.totalDuration=t.tags[0].duration}),this.lockedActionsQueue.forEach(function(t){t.sound[t.prop].apply?t.sound[t.prop].apply(t.sound,t.value||[]):t.sound[t.prop]=t.value}),this.lockedActionsQueue.length=0,this.lockedActionsQueue=null},this),document.body.addEventListener("touchmove",i,!1),document.body.addEventListener("touchend",n,!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(){n.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=a},function(t,e,i){var n=i(176),s=i(174),r=i(172),a={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=a},function(t,e,i){var n=i(52),s=i(4),r=i(90),a=i(493),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r(a,s(t,"mapAdd",{}))),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(0),s=i(109),r=new n({initialize:function(t){this.sys=new s(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 n=i(0),s=i(52),r=i(4),a=i(3),o=i(179),h=i(109),u=new n({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,n;for(t=0;t<this._pending.length;t++){var s;i=(e=this._pending[t]).key,(n=e.scene)instanceof o?s=this.createSceneFromInstance(i,n):"object"==typeof n?s=this.createSceneFromObject(i,n):"function"==typeof n&&(s=this.createSceneFromFunction(i,n)),i=s.sys.settings.key,this.keys[i]=s,this.scenes.push(s),this._data[i]&&(s.sys.settings.data=this._data[i].data,this._data[i].autoStart&&(e.autoStart=!0)),(e.autoStart||s.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,n;if(t){for(i=0;i<t;i++)n=this._pending[i],this.add(n.key,n.scene,n.autoStart,n.data);for(i=0;i<this._start.length;i++)n=this._start[i],this.start(n);return this._start.length=0,void(this._pending.length=0)}for(i=0;i<this._queue.length;i++)this[(n=this._queue[i]).op](n.keyA,n.keyB);this._queue.length=0}},add:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n={}),this.isProcessing||!this.isBooted?(this._pending.push({key:t,scene:e,autoStart:i,data:n}),null):(t=this.getKey(t,e),e instanceof o?s=this.createSceneFromInstance(t,e):"object"==typeof e?(e.key=t,s=this.createSceneFromObject(t,e)):"function"==typeof e&&(s=this.createSceneFromFunction(t,e)),s.sys.settings.data=n,t=s.sys.settings.key,this.keys[t]=s,this.scenes.push(s),(i||s.sys.settings.active)&&(this._pending.length?this._start.push(t):this.start(t)),s);var s},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),n=e.sys.settings.key;i>-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.isTransition&&i.events.emit("transitioninit",n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.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 n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.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>=s.LOADING&&i.settings.status<s.SLEEPING&&i.render(t)}this.isProcessing=!1},create:function(t){var e=t.sys,i=e.settings;t.create&&(t.sys.settings.status=s.CREATING,t.create.call(t,t.sys.settings.data),i.isTransition&&e.events.emit("transitionstart",i.transitionFrom,i.transitionDuration)),i.status=s.RUNNING},createSceneFromFunction:function(t,e){var i=new e;if(i instanceof o){var n=i.sys.settings.key;if(""!==n&&(t=n),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.update||(i.update=a),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 o(e),n=i.sys.settings.key;""!==n?t=n:i.sys.settings.key=t,i.sys.init(this.game);for(var s=["init","preload","create","update","render"],h=0;h<s.length;h++){var u=r(e,s[h],null);"update"!==s[h]||u||(u=a),u&&(i[s[h]]=u)}if(e.hasOwnProperty("extend"))for(var l in e.extend){var c=e.extend[l];"data"===l&&i.hasOwnProperty("data")&&"object"==typeof c?i.data.merge(c):"sys"!==l&&(i[l]=c)}return i},getKey:function(t,e){if(t||(t="default"),"function"==typeof e)return t;if(e instanceof o?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){var e=this.getScene(t);return e&&e.sys.pause(),this},resume:function(t){var e=this.getScene(t);return e&&e.sys.resume(),this},sleep:function(t){var e=this.getScene(t);return e&&!e.sys.isTransitioning()&&e.sys.sleep(),this},wake:function(t){var e=this.getScene(t);return e&&e.sys.wake(),this},start:function(t,e){if(!this.isBooted)return this._data[t]={autoStart:!0,data:e},this;var i=this.getScene(t);if(i){var n;if(i.sys.start(e),i.sys.load&&(n=i.sys.load),n&&Array.isArray(i.sys.settings.files)&&(n.reset(),n.loadArray(i.sys.settings.files)))return i.sys.settings.status=s.LOADING,n.once("complete",this.payloadComplete,this),n.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),n=this.getScene(e);return i&&n&&i!==n&&(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,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}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,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}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),n=this.getIndex(e);if(i>n&&-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i,0,s)}}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),n=this.getIndex(e);if(i<n&&-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i,0,s)}}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),n=this.getIndex(e);if(i!==n&&-1!==i&&-1!==n){var s=this.getAt(i);this.scenes[i]=this.scenes[n],this.scenes[n]=s}}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 n=this.scenes[i].sys,r=!n.settings.visible||n.settings.status!==s.RUNNING&&n.settings.status!==s.PAUSED?"[-] ":"[*] ";r+=n.settings.key+" ("+e[n.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=a,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler},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()},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},s={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("touchstart",t,s),i.addEventListener("touchmove",t,s),i.addEventListener("touchend",t,s)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("touchstart",t,n),i.addEventListener("touchmove",t,n),i.addEventListener("touchend",t,n)),this.handler=t},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.handler),t.removeEventListener("touchmove",this.handler),t.removeEventListener("touchend",this.handler)},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.camera=null,this.buttons=0,this.position=new s,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},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},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}},reset:function(){this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.movementX=0,this.movementY=0},touchmove:function(t){this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.justMoved=!0,this.dirty=!0,this.wasTouch=!0},move:function(t){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(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},down:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(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},touchstart:function(t,e){this.buttons=1,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].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},up:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(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},touchend:function(t,e){this.buttons=0,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].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},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},destroy:function(){this.camera=null,this.manager=null,this.position=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(112),r=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler,this.locked=!1},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(s.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(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},r={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("mousemove",t,r),i.addEventListener("mousedown",t,r),i.addEventListener("mouseup",t,r)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("mousemove",t,n),i.addEventListener("mousedown",t,n),i.addEventListener("mouseup",t,n)),this.handler=t,s.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.handler),t.removeEventListener("mousedown",this.handler),t.removeEventListener("mouseup",this.handler),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(2),r=i(501),a=i(499),o=new n({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 n=0;n<e.length;n++){var o=e[n];"string"==typeof o?this.keyCodes.push(o.toUpperCase().charCodeAt(0)):"number"==typeof o?this.keyCodes.push(o):o.hasOwnProperty("keyCode")&&this.keyCodes.push(o.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=s(i,"resetOnWrongKey",!0),this.maxKeyDelay=s(i,"maxKeyDelay",0),this.resetOnMatch=s(i,"resetOnMatch",!1),this.deleteOnMatch=s(i,"deleteOnMatch",!1);var h=this,u=function(t){!h.matched&&h.enabled&&(r(t,h)&&(h.manager.emit("keycombomatch",h,t),h.resetOnMatch?a(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=void 0}});t.exports=o},function(t,e,i){var n=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},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}});t.exports=n},function(t,e,i){var n=i(0),s=i(9),r=i(185),a=i(110),o=i(184),h=i(498),u=i(497),l=i(496),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:a.UP,down:a.DOWN,left:a.LEFT,right:a.RIGHT,space:a.SPACE,shift:a.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)this.captures[t[e]]=!0},removeKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)this.captures[t[e]]=!1},createCombo:function(t,e){return new o(this,t,e)},update:function(){var t=this.queue.length;if(this.enabled&&0!==t)for(var e=this.queue.splice(0,t),i=this.keys,n=0;n<t;n++){var s=e[n],r=s.keyCode;"keydown"===s.type?(!h[r]||void 0!==i[r]&&!1!==i[r].isDown||(this.emit(s.type,s),this.emit("keydown_"+h[r],s)),i[r]&&u(i[r],s)):(this.emit(s.type,s),this.emit("keyup_"+h[r],s),i[r]&&l(i[r],s))}},shutdown:function(){this.removeAllListeners()},destroy:function(){this.stopListeners(),this.removeAllListeners(),this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler=void 0,this.manager=null}});t.exports=c},function(t,e,i){var n=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.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=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}});t.exports=n},function(t,e,i){var n=i(188),s=i(187),r=new(i(0))({initialize:function(t,e,i){this.manager=t,this.id=e,this.index=i,this.connected=!0,this.timestamp=0,this.buttons=[],this.axes=[]},update:function(t){var e;this.timestamp=t.timestamp,this.connected=t.connected;var i=this.axes,r=this.buttons;for(e=0;e<t.buttons.length;e++){var a=t.buttons[e];void 0===r[e]&&(r[e]=new s(this,e)),r[e].update(a)}for(e=0;e<t.axes.length;e++){var o=t.axes[e];void 0===i[e]?i[e]=new n(this,e):i[e].update(o)}}});t.exports=r},function(t,e,i){var n=i(0),s=i(9),r=i(189),a=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.handler,this.gamepads=[],this.queue=[]},boot:function(){var t=this.manager.config;this.enabled=t.inputGamepad&&this.manager.game.device.input.gamepads,this.target=window,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=function(e){e.defaultPrevented||t.push(e)};this.handler=e;var i=this.target;i.addEventListener("gamepadconnected",e,!1),i.addEventListener("gamepaddisconnected",e,!1),i.addEventListener("gamepadbuttondown",e,!1),i.addEventListener("gamepadbuttonup",e,!1),i.addEventListener("gamepadaxismove",e,!1)},stopListeners:function(){var t=this.target,e=this.handler;t.removeEventListener("gamepadconnected",e),t.removeEventListener("gamepaddisconnected",e),t.removeEventListener("gamepadbuttondown",e),t.removeEventListener("gamepadbuttonup",e),t.removeEventListener("gamepadaxismove",e)},disconnectAll:function(){for(var t=0;t<this.gamepads.length;t++)this.gamepads.connected=!1},addPad:function(t){var e=new r(this,t.id,t.index);return this.gamepads[t.index]=e,e},removePad:function(){},refreshPads:function(t){if(t)for(var e=0;e<t.length;e++){var i=t[e];i&&(void 0===this.gamepads[i.index]&&this.addPad(i),this.gamepads[i.index].update(i))}else this.disconnectAll()},getAll:function(){for(var t=[],e=0;e<this.gamepads.length;e++)this.gamepads[e]&&t.push(this.gamepads[e]);return t},getPad:function(t){for(var e=0;e<this.gamepads.length;e++)if(this.gamepads[e].index===t)return this.gamepads[e]},update:function(){if(this.enabled){this.refreshPads(navigator.getGamepads());var t=this.queue.length;if(0!==t)for(var e=this.queue.splice(0,t),i=0;i<t;i++){var n,s=e[i];switch(s.type){case"gamepadconnected":n=this.getPad(s.gamepad.index),this.emit("connected",n,s);break;case"gamepaddisconnected":n=this.getPad(s.gamepad.index),this.emit("disconnected",n,s)}}}},destroy:function(){this.stopListeners(),this.disconnectAll(),this.gamepads=[]},total:{get:function(){return this.gamepads.length}}});t.exports=a},function(t,e,i){var n=i(0),s=i(9),r=i(190),a=i(186),o=i(183),h=i(182),u=i(12),l=i(181),c=i(60),d=i(249),f=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new a(this),this.mouse=new o(this),this.touch=new l(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new u,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new c,t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),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,n=this.bounds.height;this.scale.x=t/i,this.scale.y=e/n},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s<e;s++){var r=n[s];switch(r.type){case"mousemove":i.move(r,t);break;case"mousedown":i.down(r,t);break;case"mouseup":i.up(r,t);break;case"touchmove":i.touchmove(r,t);break;case"touchstart":i.touchstart(r,t);break;case"touchend":i.touchend(r,t);break;case"pointerlockchange":this.events.emit("pointerlockchange",r,this.mouse.locked)}}}},hitTest:function(t,e,i,n,s){void 0===s&&(s=this._tempHitTest);var r=this._tempPoint,a=n.width,o=n.height;if(s.length=0,!(t>=n.x&&e>=n.y&&t<=n.x+a&&e<=n.y+o))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=this.game.config.resolution,c=this._tempMatrix,f=0;f<h.length;f++){var p=h[f];if(p.input&&p.input.enabled&&p.willRender()){var g=r.x*l+n.scrollX*p.scrollFactorX-n.scrollX,m=r.y*l+n.scrollY*p.scrollFactorY-n.scrollY;p.parentContainer?(p.getWorldTransformMatrix(c),d(g,m,c.tx,c.ty,c.rotation,c.scaleX,c.scaleY,u)):d(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){var n=t.input;return e+=t.displayOriginX,i+=t.displayOriginY,!!n.hitAreaCallback(n.hitArea,e,i,t)&&(n.localX=e,n.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))},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.keyboard.destroy(),this.mouse.destroy(),this.touch.destroy(),this.gamepad.destroy(),this.activePointer.destroy(),this.queue=[],this.game=null}});t.exports=f},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 n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],a=e[6],o=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=a*n+l*i,e[7]=o*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-a*i,e[11]=c*n-o*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],a=e[2],o=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=a*n-l*i,e[3]=o*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=a*i+l*n,e[11]=o*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],a=e[2],o=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=a*n+l*i,e[3]=o*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-a*i,e[7]=c*n-o*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 n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],a=e[6],o=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=a*n+l*i,e[7]=o*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-a*i,e[11]=c*n-o*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],a=e[2],o=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=a*n-l*i,e[3]=o*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=a*i+l*n,e[11]=o*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],a=e[2],o=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=a*n+l*i,e[3]=o*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-a*i,e[7]=c*n-o*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,n,s,r){var a=this.projectionMatrix,o=1/(t-e),h=1/(i-n),u=1/(s-r);return a[0]=-2*o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*h,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*u,a[11]=0,a[12]=(t+e)*o,a[13]=(n+i)*h,a[14]=(r+s)*u,a[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),a=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*a,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*a,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n,s,r,a=i(22),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(o.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.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;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),o.supportInverseAlpha=function(){var t=a.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]}()),o)},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){t.exports={Fade:i(549),Flash:i(548),Shake:i(547)}},function(t,e,i){var n=i(197),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),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=s},function(t,e,i){var n=i(0),s=i(114),r=i(9),a=new n({initialize:function(){this.entries=new s,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)},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=a},function(t,e,i){var n=i(201),s=i(0),r=i(114),a=i(9),o=i(4),h=i(125),u=new s({Extends:a,initialize:function(t){a.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 n(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 n=0;n<t.anims.length;n++)i.push(this.create(t.anims[n]));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=o(e,"prefix",""),n=o(e,"start",0),s=o(e,"end",0),r=o(e,"suffix",""),a=o(e,"zeroPad",0),u=o(e,"outputArray",[]),l=o(e,"frames",!1),c=this.textureManager.get(t);if(!c)return u;var d,f,p=n<s?1:-1;if(s+=p,Array.isArray(l))for(d=0;d<l.length;d++)f=i+h(l[d],a,"0",1)+r,c.has(f)&&u.push({key:t,frame:f});else for(d=n;d!==s;d+=p)f=i+h(d,a,"0",1)+r,c.has(f)&&u.push({key:t,frame:f});return u},generateFrameNumbers:function(t,e){var i,n=o(e,"start",0),s=o(e,"end",-1),r=o(e,"first",!1),a=o(e,"outputArray",[]),h=o(e,"frames",!1),u=this.textureManager.get(t);if(!u)return a;if(r&&u.has(r)&&a.push({key:t,frame:r}),Array.isArray(h))for(i=0;i<h.length;i++)u.has(h[i])&&a.push({key:t,frame:h[i]});else for(-1===s&&(s=u.frameTotal),i=n;i<=s;i++)u.has(i)&&a.push({key:t,frame:i});return a},get:function(t){return this.anims.get(t)},load:function(t,e,i){var n=this.get(e);return n&&n.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 n=0;n<e.length;n++)e[n].anims.delayedPlay(i*n,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 n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,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=n},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,s,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?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=i(23),s=i(0),r=i(200),a=i(199),o=i(4),h=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,o(i,"frames",[]),o(i,"defaultTextureKey",null)),this.frameRate=o(i,"frameRate",null),this.duration=o(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=o(i,"skipMissedFrames",!0),this.delay=o(i,"delay",0),this.repeat=o(i,"repeat",0),this.repeatDelay=o(i,"repeatDelay",0),this.yoyo=o(i,"yoyo",!1),this.showOnStart=o(i,"showOnStart",!1),this.hideOnComplete=o(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 n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}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 n,s,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=o(d,"key",i);if(f){var p=o(d,"frame",0),g=t.getFrame(f,p);(s=new a(f,p,l,g)).duration=o(d,"duration",0),s.isFirst=!n,n&&(n.nextFrame=s,s.prevFrame=n),u.push(s),n=s,l++}}if(u.length>0){s.isLast=!0,s.nextFrame=u[0],u[0].prevFrame=s;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=n(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 n=this.frames[i];n.index=i+1,n.isFirst=!1,n.isLast=!1,n.progress=i*e,0===i?(n.isFirst=!0,n.isLast=1===t,n.prevFrame=this.frames[t-1],n.nextFrame=this.frames[i+1]):i===t-1?(n.isLast=!0,n.prevFrame=this.frames[t-2],n.nextFrame=this.frames[0]):t>1&&(n.prevFrame=this.frames[i-1],n.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 n=i(34);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n=i(34);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},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 n=i(164);function s(t){if(!(this instanceof s))return new s(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 n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function a(t,e){o(t,0,t.children.length,e,t)}function o(t,e,i,n,s){s||(s=g(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var r,a=e;a<i;a++)r=t.children[a],h(s,t.leaf?n(r):r);return s}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,s,r){for(var a,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=s||(a=e+Math.ceil((i-e)/s/2)*s,n(t,a,e,i,r),o.push(e,a,a,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,a,o,h=[];e;){for(s=0,r=e.children.length;s<r;s++)a=e.children[s],p(t,o=e.leaf?n(a):a)&&(e.leaf?i.push(a):f(t,o)?this._all(a,i):h.push(a));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!p(t,e))return!1;for(var n,s,r,a,o=[];e;){for(n=0,s=e.children.length;n<s;n++)if(r=e.children[n],p(t,a=e.leaf?i(r):r)){if(e.leaf||f(t,a))return!0;o.push(r)}e=o.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var s=this.data;this.data=n,n=s}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;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,n,s,a,o=this.data,h=this.toBBox(t),u=[],l=[];o||u.length;){if(o||(o=u.pop(),n=u[u.length-1],i=l.pop(),a=!0),o.leaf&&-1!==(s=r(t,o.children,e)))return o.children.splice(s,1),u.push(o),this._condense(u),this;a||o.leaf||!f(o,h)?n?(i++,o=n.children[i],a=!1):o=null:(u.push(o),l.push(i),i=0,n=o,o=o.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,n){var s,r=i-e+1,o=this._maxEntries;if(r<=o)return a(s=g(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/Math.pow(o,n-1))),(s=g([])).leaf=!1,s.height=n;var h,u,l,c,d=Math.ceil(r/o),f=d*Math.ceil(Math.sqrt(o));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),s.children.push(this._build(t,u,c,n-1));return a(s,this.toBBox),s},_chooseSubtree:function(t,e,i,n){for(var s,r,a,o,h,u,l,d,f,p;n.push(e),!e.leaf&&n.length-1!==i;){for(l=d=1/0,s=0,r=e.children.length;s<r;s++)h=c(a=e.children[s]),f=t,p=a,(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,o=a):u===d&&h<l&&(l=h,o=a);e=o||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,s=i?t:n(t),r=[],a=this._chooseSubtree(s,this.data,e,r);for(a.children.push(t),h(a,s);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=g(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,a(i,this.toBBox),a(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,a,h,u,l,d,f,p,g,m,v,y;for(u=l=1/0,n=e;n<=i-e;n++)s=o(t,0,n,this.toBBox),r=o(t,n,i,this.toBBox),f=s,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),a=Math.max(0,v-g)*Math.max(0,y-m),h=c(s)+c(r),a<u?(u=a,d=n,l=h<l?h:l):a===u&&h<l&&(l=h,d=n);return d},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:u,s=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);var s,r,a=this.toBBox,u=o(t,0,e,a),l=o(t,i-e,i,a),c=d(u)+d(l);for(s=e;s<i-e;s++)r=t.children[s],h(u,t.leaf?a(r):r),c+=d(u);for(s=i-e-1;s>=e;s--)r=t.children[s],h(l,t.leaf?a(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],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():a(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=s},function(t,e,i){var n=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,n=this._active;for(t=0;t<i.length;t++){e=i[t];var s=n.indexOf(e);-1!==s&&n.splice(s,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=n},function(t,e,i){var n=i(0),s=i(17),r=i(18),a=i(7),o=new n({Extends:r,initialize:function(t,e,i,n){var s={type:"text",extension:"txt",responseType:"text",key:t,url:e,path:i,xhrSettings:n};r.call(this,s)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onComplete(),t(this)}});a.register("text",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(t[n],e,this.path,i));else this.addFile(new o(t,e,this.path,i));return this}),t.exports=o},function(t,e,i){var n=i(0),s=i(17),r=i(18),a=i(7),o=i(2),h=i(262),u=new n({Extends:r,initialize:function(t,e,i,n){var s="string"==typeof t?t:o(t,"key",""),a={type:"xml",extension:o(t,"extension","xml"),responseType:"text",key:s,url:o(t,"file",e),path:i,xhrSettings:o(t,"xhr",n)};r.call(this,a)},onProcess:function(t){if(this.state=s.FILE_PROCESSING,this.data=h(this.xhrLoader.responseText),null===this.data)throw new Error("XMLFile: Invalid XML");this.onComplete(),t(this)}});a.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(t[n],e,this.path,i));else this.addFile(new u(t,e,this.path,i));return this}),t.exports=u},function(t,e,i){var n=i(116);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},,function(t,e,i){var n=i(67),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var a=t.getLineA(),o=t.getLineB(),h=t.getLineC(),u=n(a),l=n(o),c=n(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 s;p<u?(g=p/u,m.x=a.x1+(a.x2-a.x1)*g,m.y=a.y1+(a.y2-a.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=o.x1+(o.x2-o.x1)*g,m.y=o.y1+(o.y2-o.y1)*g),r.push(m)}return r}},function(t,e,i){var n=i(5),s=i(67);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),a=t.getLineB(),o=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(a),l=s(o),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=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d):(d=(c-=h)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d),i}},,,,,,,,,function(t,e,i){t.exports=i(398)},function(t,e,i){t.exports={In:i(401),Out:i(400),InOut:i(399)}},function(t,e,i){t.exports={In:i(404),Out:i(403),InOut:i(402)}},function(t,e,i){t.exports={In:i(407),Out:i(406),InOut:i(405)}},function(t,e,i){t.exports={In:i(410),Out:i(409),InOut:i(408)}},function(t,e,i){t.exports=i(411)},function(t,e,i){t.exports={In:i(414),Out:i(413),InOut:i(412)}},function(t,e,i){t.exports={In:i(417),Out:i(416),InOut:i(415)}},function(t,e,i){t.exports={In:i(420),Out:i(419),InOut:i(418)}},function(t,e,i){t.exports={In:i(423),Out:i(422),InOut:i(421)}},function(t,e,i){t.exports={In:i(426),Out:i(425),InOut:i(424)}},function(t,e,i){t.exports={In:i(429),Out:i(428),InOut:i(427)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){var n=i(106);n.Area=i(449),n.Circumference=i(161),n.CircumferencePoint=i(105),n.Clone=i(448),n.Contains=i(51),n.ContainsPoint=i(447),n.ContainsRect=i(446),n.CopyFrom=i(445),n.Equals=i(444),n.GetBounds=i(443),n.GetPoint=i(163),n.GetPoints=i(162),n.Offset=i(442),n.OffsetPoint=i(441),n.Random=i(126),t.exports=n},,,,,function(t,e,i){var n=i(4),s=i(91),r=function(t,e,i){for(var n=[],s=0;s<t.length;s++)for(var r=0;r<e.length;r++)for(var a=0;a<i;a++)n.push({a:t[s],b:e[r]});return n};t.exports=function(t,e,i){var a=n(i,"max",0),o=n(i,"qty",1),h=n(i,"random",!1),u=n(i,"randomB",!1),l=n(i,"repeat",0),c=n(i,"yoyo",!1),d=[];if(u&&s(e),-1===l)if(0===a)l=0;else{var f=t.length*e.length*o;c&&(f*=2),l=Math.ceil(a/f)}for(var p=0;p<=l;p++){var g=r(t,e,o);h&&s(g),d=d.concat(g),c&&(g.reverse(),d=d.concat(g))}return a&&d.splice(a),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 n=i(6);t.exports=function(t,e,i,s,r,a,o,h){void 0===h&&(h=new n);var u=Math.sin(-r),l=Math.cos(-r),c=l*a,d=-u*a,f=u*o,p=l*o,g=c*p-d*f,m=p/g,v=-d/g,y=-f/g,x=c/g,w=(f*s-p*i)/g,T=-(c*s-d*i)/g;return h.x=t*m+e*y+w,h.y=t*v+e*x+T,h}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,o,h,u,l,f,g,m=e&&e.length,v=m?e[0]*i:t.length,y=s(t,0,v,i,!0),x=[];if(!y)return x;if(m&&(y=function(t,e,i,n){var a,o,h,u,l,f=[];for(a=0,o=e.length;a<o;a++)h=e[a]*n,u=a<o-1?e[a+1]*n:t.length,(l=s(t,h,u,n,!1))===l.next&&(l.steiner=!0),f.push(p(l));for(f.sort(c),a=0;a<f.length;a++)d(f[a],i),i=r(i,i.next);return i}(t,e,y,i)),t.length>80*i){n=h=t[0],o=u=t[1];for(var w=i;w<v;w+=i)l=t[w],f=t[w+1],l<n&&(n=l),f<o&&(o=f),l>h&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-o)}return a(y,x,i,n,o,g),x}function s(t,e,i,n,s){var r,a;if(s===E(t,e,i,n)>0)for(r=e;r<i;r+=n)a=S(r,t[r],t[r+1],a);else for(r=i-n;r>=e;r-=n)a=S(r,t[r],t[r+1],a);return a&&y(a,a.next)&&(A(a),a=a.next),a}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function a(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,a,o,h,u=1;do{for(i=t,t=null,r=null,a=0;i;){for(a++,n=i,o=0,e=0;e<u&&(o++,n=n.nextZ);e++);for(h=u;o>0||h>0&&n;)0!==o&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,o--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,u*=2}while(a>1)}(s)}(t,n,s,c);for(var p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):o(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),A(t),t=g.next,m=g.next;else if((t=g)===m){d?1===d?a(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(t,e,i,n,s,c):a(r(t),e,i,n,s,c,1);break}}}function o(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,a=t.next;if(v(s,r,a)>=0)return!1;for(var o=s.x<r.x?s.x<a.x?s.x:a.x:r.x<a.x?r.x:a.x,h=s.y<r.y?s.y<a.y?s.y:a.y:r.y<a.y?r.y:a.y,u=s.x>r.x?s.x>a.x?s.x:a.x:r.x>a.x?r.x:a.x,l=s.y>r.y?s.y>a.y?s.y:a.y:r.y>a.y?r.y:a.y,c=f(o,h,e,i,n),d=f(u,l,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,a.x,a.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(s.x,s.y,r.x,r.y,a.x,a.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 n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&w(s,r)&&w(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),A(n),A(n.next),n=t=r),n=n.next}while(n!==t);return n}function l(t,e,i,n,s,o){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),a(h,e,i,n,s,o),void a(l,e,i,n,s,o)}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,n=e,s=t.x,r=t.y,a=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var o=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(o<=s&&o>a){if(a=o,o===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!i)return null;if(s===a)return i.prev;var h,u=i,l=i.x,c=i.y,d=1/0;n=i.next;for(;n!==u;)s>=n.x&&n.x>=l&&s!==n.x&&g(r<c?s:a,r,l,c,r<c?a:s,r,n.x,n.y)&&((h=Math.abs(r-n.y)/(s-n.x))<d||h===d&&n.x>i.x)&&w(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=T(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|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,n,s,r,a,o){return(s-a)*(e-o)-(t-a)*(r-o)>=0&&(t-a)*(n-o)-(i-a)*(e-o)>=0&&(i-a)*(r-o)-(s-a)*(n-o)>=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,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(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,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,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 b(t.i,t.x,t.y),n=new b(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function S(t,e,i,n){var s=new b(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function A(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 b(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 E(t,e,i,n){for(var s=0,r=e,a=i-n;r<i;r+=n)s+=(t[a]-t[r])*(t[r+1]+t[a+1]),a=r;return s}t.exports=n,n.deviation=function(t,e,i,n){var s=e&&e.length,r=s?e[0]*i:t.length,a=Math.abs(E(t,0,r,i));if(s)for(var o=0,h=e.length;o<h;o++){var u=e[o]*i,l=o<h-1?e[o+1]*i:t.length;a-=Math.abs(E(t,u,l,i))}var c=0;for(o=0;o<n.length;o+=3){var d=n[o]*i,f=n[o+1]*i,p=n[o+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===a&&0===c?0:Math.abs((c-a)/a)},n.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},n=0,s=0;s<t.length;s++){for(var r=0;r<t[s].length;r++)for(var a=0;a<e;a++)i.vertices.push(t[s][r][a]);s>0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e,i){var n=i(0),s=i(111),r=i(250),a=i(192),o=i(512),h=i(511),u=i(25),l=i(80),c=function(t,e,i,n,s){this.x=t,this.y=e,this.width=i,this.rgb=n,this.alpha=s},d=function(t,e,i,n,s){this.points=[],this.pointsLength=1,this.points[0]=new c(t,e,i,n,s)},f=new Float32Array([1,0,0,1,0,0]),p=new Float32Array(6e3),g=0,m=[],v=new n({Extends:l,Mixins:[a],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:o,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,n,s,r,a,o,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,S=r+o,A=a+h,b=y[0],E=y[1],_=y[2],C=y[3],M=d*b+f*_,k=d*E+f*C,P=p*b+g*_,L=p*E+g*C,F=m*b+v*_+y[4],R=m*E+v*C+y[5],O=r*M+a*P+F,D=r*k+a*L+R,I=r*M+A*P+F,B=r*k+A*L+R,N=S*M+A*P+F,U=S*k+A*L+R,Y=S*M+a*P+F,X=S*k+a*L+R,G=u.getTintAppendFloatAlphaAndSwap(l,c);x[T+0]=O,x[T+1]=D,w[T+2]=G,x[T+3]=I,x[T+4]=B,w[T+5]=G,x[T+6]=N,x[T+7]=U,w[T+8]=G,x[T+9]=O,x[T+10]=D,w[T+11]=G,x[T+12]=N,x[T+13]=U,w[T+14]=G,x[T+15]=Y,x[T+16]=X,w[T+17]=G,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,a,o,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,S=this.vertexViewU32,A=this.vertexCount*this.vertexComponentCount,b=w[0],E=w[1],_=w[2],C=w[3],M=p*b+g*_,k=p*E+g*C,P=m*b+v*_,L=m*E+v*C,F=y*b+x*_+w[4],R=y*E+x*C+w[5],O=r*M+a*P+F,D=r*k+a*L+R,I=o*M+h*P+F,B=o*k+h*L+R,N=l*M+c*P+F,U=l*k+c*L+R,Y=u.getTintAppendFloatAlphaAndSwap(d,f);T[A+0]=O,T[A+1]=D,S[A+2]=Y,T[A+3]=I,T[A+4]=B,S[A+5]=Y,T[A+6]=N,T[A+7]=U,S[A+8]=Y,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,a,o,h,u,l,c,d,f,p,g,m,v,y,x,w){var T=this.tempTriangle;T[0].x=r,T[0].y=a,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=o,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=a,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,n,s,T,c,d,f,p,g,m,v,y,x,!1,w)},batchFillPath:function(t,e,i,n,s,a,o,h,l,c,d,f,p,g,m){this.renderer.setPipeline(this);for(var v,y,x,w,T,S,A,b,E,_,C,M,k,P,L,F,R,O=a.length,D=this.polygonCache,I=this.vertexViewF32,B=this.vertexViewU32,N=0,U=m[0],Y=m[1],X=m[2],G=m[3],z=l*U+c*X,W=l*Y+c*G,V=d*U+f*X,H=d*Y+f*G,j=p*U+g*X+m[4],K=p*Y+g*G+m[5],q=u.getTintAppendFloatAlphaAndSwap(o,h),J=0;J<O;++J)y=a[J],D.push(y.x,y.y);O=(v=r(D)).length;for(var Z=0;Z<O;Z+=3)x=2*v[Z+0],w=2*v[Z+1],T=2*v[Z+2],this.vertexCount+3>this.vertexCapacity&&this.flush(),N=this.vertexCount*this.vertexComponentCount,M=(S=D[x+0])*z+(A=D[x+1])*V+j,k=S*W+A*H+K,P=(b=D[w+0])*z+(E=D[w+1])*V+j,L=b*W+E*H+K,F=(_=D[T+0])*z+(C=D[T+1])*V+j,R=_*W+C*H+K,I[N+0]=M,I[N+1]=k,B[N+2]=q,I[N+3]=P,I[N+4]=L,B[N+5]=q,I[N+6]=F,I[N+7]=R,B[N+8]=q,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,n,s,r,a,o,h,l,c,d,f,p,g,m,v){var y,x;this.renderer.setPipeline(this);for(var w,T,S,A,b=r.length,E=this.polygonCache,_=this.vertexViewF32,C=this.vertexViewU32,M=u.getTintAppendFloatAlphaAndSwap,k=0;k+1<b;k+=1)y=r[k],x=r[k+1],A=this.batchLine(t,e,i,n,s,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),E.push(A);for(var P=1,L=E.length;P<L;++P)this.vertexCount+6>this.vertexCapacity&&this.flush(),w=E[P-1]||E[L-1],T=E[P],_[(S=this.vertexCount*this.vertexComponentCount)+0]=w[6],_[S+1]=w[7],C[S+2]=M(w[8],h),_[S+3]=w[0],_[S+4]=w[1],C[S+5]=M(w[2],h),_[S+6]=T[9],_[S+7]=T[10],C[S+8]=M(T[11],h),_[S+9]=w[0],_[S+10]=w[1],C[S+11]=M(w[2],h),_[S+12]=w[6],_[S+13]=w[7],C[S+14]=M(w[8],h),_[S+15]=T[3],_[S+16]=T[4],C[S+17]=M(T[5],h),this.vertexCount+=6;E.length=0},batchLine:function(t,e,i,n,s,r,a,o,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 S=T[0],A=T[1],b=T[2],E=T[3],_=g*S+m*b,C=g*A+m*E,M=v*S+y*b,k=v*A+y*E,P=x*S+w*b+T[4],L=x*A+w*E+T[5],F=this.vertexViewF32,R=this.vertexViewU32,O=o-r,D=h-a,I=Math.sqrt(O*O+D*D),B=l*(h-a)/I,N=l*(r-o)/I,U=c*(h-a)/I,Y=c*(r-o)/I,X=o-U,G=h-Y,z=r-B,W=a-N,V=o+U,H=h+Y,j=r+B,K=a+N,q=X*_+G*M+P,J=X*C+G*k+L,Z=z*_+W*M+P,Q=z*C+W*k+L,$=V*_+H*M+P,tt=V*C+H*k+L,et=j*_+K*M+P,it=j*C+K*k+L,nt=u.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),at=this.vertexCount*this.vertexComponentCount;return F[at+0]=q,F[at+1]=J,R[at+2]=rt,F[at+3]=Z,F[at+4]=Q,R[at+5]=st,F[at+6]=$,F[at+7]=tt,R[at+8]=rt,F[at+9]=Z,F[at+10]=Q,R[at+11]=st,F[at+12]=et,F[at+13]=it,R[at+14]=st,F[at+15]=$,F[at+16]=tt,R[at+17]=rt,this.vertexCount+=6,[q,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e,i){if(!(t.commandBuffer.length<=0)){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var r,a,o,h,u,l,v,y,x=e.scrollX*t.scrollFactorX,w=e.scrollY*t.scrollFactorY,T=t.x,S=t.y,A=t.scaleX,b=t.scaleY,E=t.rotation,_=t.commandBuffer,C=t.alpha,M=1,k=1,P=0,L=0,F=1,R=e.matrix.matrix,O=null,D=0,I=0,B=0,N=0,U=0,Y=0,X=0,G=0,z=0,W=0,V=null,H=Math.sin,j=Math.cos,K=2*Math.PI,q=H(E),J=j(E),Z=J*A,Q=q*A,$=-q*b,tt=J*b,et=T,it=S,nt=R[0],st=R[1],rt=R[2],at=R[3],ot=R[4],ht=R[5];if(n){var ut=n[0],lt=n[1],ct=n[2],dt=n[3],ft=n[4],pt=n[5],gt=-x,mt=-w,vt=ut*nt+lt*rt,yt=ut*st+lt*at,xt=ct*nt+dt*rt,wt=ct*st+dt*at;r=Z*vt+Q*xt,a=Z*yt+Q*wt,o=$*vt+tt*xt,h=$*yt+tt*wt,u=et*vt+it*xt+(ft*nt+pt*rt+(gt*nt+mt*rt+ot)),l=et*yt+it*wt+(ft*st+pt*at+(gt*st+mt*at+ht))}else r=Z*nt+Q*rt,a=Z*st+Q*at,o=$*nt+tt*rt,h=$*st+tt*at,u=(et-=x)*nt+(it-=w)*rt+ot,l=et*st+it*at+ht;m.length=0;for(var Tt=0,St=_.length;Tt<St;++Tt)switch(at=_[Tt]){case s.ARC:for(D=0,U=_[Tt+1],Y=_[Tt+2],X=_[Tt+3],G=_[Tt+4],z=_[Tt+5],W=_[Tt+6],null===O&&(O=new d(U+j(G)*X,Y+H(G)*X,F,P,M*C),m.push(O),D+=.01),z-=G,W?z<-K?z=-K:z>0&&(z=z%K-K):z>K?z=K:z<0&&(z=K+z%K);D<1;)I=U+j(N=z*D+G)*X,B=Y+H(N)*X,O.points.push(new c(I,B,F,P,M*C)),D+=.01;I=U+j(N=z+G)*X,B=Y+H(N)*X,O.points.push(new c(I,B,F,P,M*C)),Tt+=6;break;case s.LINE_STYLE:F=_[Tt+1],P=_[Tt+2],M=_[Tt+3],Tt+=3;break;case s.FILL_STYLE:L=_[Tt+1],k=_[Tt+2],Tt+=2;break;case s.BEGIN_PATH:m.length=0,O=null;break;case s.CLOSE_PATH:O&&O.points.length&&O.points.push(O.points[0]);break;case s.FILL_PATH:for(v=0,y=m.length;v<y;++v)this.batchFillPath(T,S,A,b,E,m[v].points,L,k*C,r,a,o,h,u,l,f);break;case s.STROKE_PATH:for(v=0,y=m.length;v<y;++v)V=m[v],this.batchStrokePath(T,S,A,b,E,V.points,F,P,M*C,r,a,o,h,u,l,V===this._lastPath,f);break;case s.FILL_RECT:this.batchFillRect(T,S,A,b,E,_[Tt+1],_[Tt+2],_[Tt+3],_[Tt+4],L,k*C,r,a,o,h,u,l,f),Tt+=4;break;case s.FILL_TRIANGLE:this.batchFillTriangle(T,S,A,b,E,_[Tt+1],_[Tt+2],_[Tt+3],_[Tt+4],_[Tt+5],_[Tt+6],L,k*C,r,a,o,h,u,l,f),Tt+=6;break;case s.STROKE_TRIANGLE:this.batchStrokeTriangle(T,S,A,b,E,_[Tt+1],_[Tt+2],_[Tt+3],_[Tt+4],_[Tt+5],_[Tt+6],F,P,M*C,r,a,o,h,u,l,f),Tt+=6;break;case s.LINE_TO:null!==O?O.points.push(new c(_[Tt+1],_[Tt+2],F,P,M*C)):(O=new d(_[Tt+1],_[Tt+2],F,P,M*C),m.push(O)),Tt+=2;break;case s.MOVE_TO:O=new d(_[Tt+1],_[Tt+2],F,P,M*C),m.push(O),Tt+=2;break;case s.LINE_FX_TO:null!==O?O.points.push(new c(_[Tt+1],_[Tt+2],_[Tt+3],_[Tt+4],_[Tt+5]*C)):(O=new d(_[Tt+1],_[Tt+2],_[Tt+3],_[Tt+4],_[Tt+5]*C),m.push(O)),Tt+=5;break;case s.MOVE_FX_TO:O=new d(_[Tt+1],_[Tt+2],_[Tt+3],_[Tt+4],_[Tt+5]*C),m.push(O),Tt+=5;break;case s.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 s.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 s.TRANSLATE:U=_[Tt+1],Y=_[Tt+2],f[4]=f[0]*U+f[2]*Y+f[4],f[5]=f[1]*U+f[3]*Y+f[5],Tt+=2;break;case s.SCALE:U=_[Tt+1],Y=_[Tt+2],f[0]*=U,f[1]*=U,f[2]*=Y,f[3]*=Y,Tt+=2;break;case s.ROTATE:U=H(Y=_[Tt+1]),Y=j(Y),Z=f[0],Q=f[1],$=f[2],tt=f[3],f[0]=Y*Z+U*$,f[1]=Y*Q+U*tt,f[2]=-U*Z+Y*$,f[3]=-U*Q+Y*tt,Tt+=1;break;default:console.error("Phaser: Invalid Graphics Command ID "+at)}}},drawStaticTilemapLayer:function(){},drawEmitterManager:function(){},drawBlitter:function(){},batchSprite:function(){},batchMesh:function(){},batchBitmapText:function(){},batchDynamicBitmapText:function(){},batchText:function(){},batchDynamicTilemapLayer:function(){},batchTileSprite:function(){}});t.exports=v},function(t,e,i){var n=i(0),s=i(514),r=i(513),a=i(80),o=new n({Extends:a,initialize:function(t){a.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:s,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(){a.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 a.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var n=t.bitmapMask,s=this.renderer,r=this.gl,a=n.visible;n&&r&&(s.setFramebuffer(t.maskFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),n.visible=!0,n.renderWebGL(s,n,0,i),n.visible=a,s.flush(),s.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,n=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),n.drawArrays(this.topology,0,3))}});t.exports=o},function(t,e){t.exports=function(t,e,i){e||(e="image/png"),i||(i=.92);var n=t.getContext("experimental-webgl"),s=new Uint8Array(n.drawingBufferWidth*n.drawingBufferHeight*4);n.readPixels(0,0,n.drawingBufferWidth,n.drawingBufferHeight,n.RGBA,n.UNSIGNED_BYTE,s);var r,a=document.createElement("canvas"),o=a.getContext("2d");a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;for(var h=(r=o.getImageData(0,0,a.width,a.height)).data,u=0;u<a.height;u+=1)for(var l=0;l<a.width;l+=1){var c=4*((a.height-u)*a.width+l),d=4*(u*a.width+l);h[d+0]=s[c+0],h[d+1]=s[c+1],h[d+2]=s[c+2],h[d+3]=s[c+3]}o.putImageData(r,0,0);var f=a.toDataURL(e,i),p=new Image;return p.src=f,p}},function(t,e,i){var n=i(0),s=i(19),r=i(121),a=i(25),o=i(253),h=i(252),u=i(251),l=i(141),c=i(120),d=new n({initialize:function(t){var e=this,i=t.config,n={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,pixelArt:i.pixelArt,backgroundColor:i.backgroundColor,contextCreation:n,resolution:i.resolution,autoResize:i.autoResize,roundPixels:i.roundPixels},this.game=t,this.type=s.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 n=e.lostContextCallbacks[i];n[0].call(n[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.init(this.config)},init:function(t){var e=this.canvas,i=t.backgroundColor,n=e.getContext("webgl",t.contextCreation)||e.getContext("experimental-webgl",t.contextCreation);if(!n||n.isContextLost())throw this.contextLost=!0,new Error("This browser does not support WebGL. Try using the Canvas pipeline.");this.gl=n;for(var r=0;r<=16;r++)this.blendModes.push({func:[n.ONE,n.ONE_MINUS_SRC_ALPHA],equation:n.FUNC_ADD});this.blendModes[1].func=[n.ONE,n.DST_ALPHA],this.blendModes[2].func=[n.DST_COLOR,n.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[n.ONE,n.ONE_MINUS_SRC_COLOR],this.glFormats[0]=n.BYTE,this.glFormats[1]=n.SHORT,this.glFormats[2]=n.UNSIGNED_BYTE,this.glFormats[3]=n.UNSIGNED_SHORT,this.glFormats[4]=n.FLOAT,this.supportedExtensions=n.getSupportedExtensions(),n.disable(n.DEPTH_TEST),n.disable(n.CULL_FACE),n.disable(n.SCISSOR_TEST),n.enable(n.BLEND),n.clearColor(i.redGL,i.greenGL,i.blueGL,1);for(var a=0;a<this.currentTextures.length;++a)this.currentTextures[a]=null;return this.pipelines={},this.addPipeline("TextureTintPipeline",new c({game:this.game,renderer:this})),this.addPipeline("FlatTintPipeline",new u({game:this.game,renderer:this})),this.addPipeline("BitmapMaskPipeline",new h({game:this.game,renderer:this})),this.addPipeline("Light2D",new l({game:this.game,renderer:this})),this.setBlendMode(s.BlendModes.NORMAL),this.resize(this.width,this.height),this},resize:function(t,e){var i=this.gl,n=this.pipelines,s=this.config.resolution;for(var r in this.width=Math.floor(t*s),this.height=Math.floor(e*s),this.canvas.width=this.width,this.canvas.height=this.height,this.config.autoResize&&(this.canvas.style.width=this.width/s+"px",this.canvas.style.height=this.height/s+"px"),i.viewport(0,0,this.width,this.height),n)n[r].resize(t,e,s);return this.currentScissor.set([0,0,this.width,this.height]),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,n){var s=this.gl,r=this.currentScissor,a=0===t&&0===e&&i===s.canvas.width&&n===s.canvas.height&&i>=0&&n>=0;return r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=a,a?(s.disable(s.SCISSOR_TEST),this):(s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,a=this.currentScissor;return s[r+0]=a[0],s[r+1]=a[1],s[r+2]=a[2],s[r+3]=a[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){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(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.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,n){var a=this.gl,o=a.NEAREST,h=a.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=a.REPEAT),n===s.ScaleModes.LINEAR?o=a.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(o=a.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,o,o,h,h,a.RGBA,t):this.createTexture2D(0,o,o,h,h,a.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,a,o,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,s),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===a||void 0===a?l.texImage2D(l.TEXTURE_2D,t,r,o,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,a),o=a.width,h=a.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=o,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,a=r.createFramebuffer();if(this.setFramebuffer(a),n){var o=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,o),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,o)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=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"}[s])}return a.renderTexture=i,this.setFramebuffer(null),a},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){return 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),n=Math.floor(t.y*e),s=Math.floor(t.width*e),r=Math.floor(t.height*e);if(this.pushScissor(i,n,s,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(),this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var n 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[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,a=r.length,o=this.pipelines;for(var h in o)o[h].onRender(t,n);this.preRenderCamera(n);for(var u=0;u<a;++u){var l=r[u];l.willRender()&&(l.blendMode!==this.currentBlendMode&&this.setBlendMode(l.blendMode),l.mask&&l.mask.preRenderWebGL(this,l,n),l.renderWebGL(this,l,i,n),l.mask&&l.mask.postRenderWebGL(this,l))}this.flush(),this.setBlendMode(s.BlendModes.NORMAL),this.postRenderCamera(n)}},postRender:function(){if(!this.contextLost){this.snapshotState.callback&&(this.snapshotState.callback(o(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 n=i.CLAMP_TO_EDGE;r(t.width,t.height)&&(n=i.REPEAT),e=this.createTexture2D(0,i.NEAREST,i.NEAREST,n,n,i.RGBA,t,t.width,t.height,!0)}return e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),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,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,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,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},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=d},function(t,e,i){var n=i(48),s=i(193);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e){var i=!1,n=function(t,e,n){var s=this.currentContext,r=t.frame,a=r.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,s.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,s.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var o=r.x,h=r.y,u=1,l=1;t.flipX?(u=-1,o-=a.dWidth-t.displayOriginX):o-=t.displayOriginX,t.flipY?(l=-1,h-=a.dHeight-t.displayOriginY):h-=t.displayOriginY;var c=t.x-e.scrollX*t.scrollFactorX,d=t.y-e.scrollY*t.scrollFactorY;if(i&&(c|=0,d|=0,o|=0,h|=0),s.save(),n){var f=n.matrix;s.transform(f[0],f[1],f[2],f[3],f[4],f[5])}s.translate(c,d),s.rotate(t.rotation),s.scale(t.scaleX,t.scaleY),s.scale(u,l),s.drawImage(r.source.image,a.sx,a.sy,a.sWidth,a.sHeight,o,h,a.dWidth,a.dHeight),s.restore()};t.exports=function(t){return i=t,n}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){var i=!1,n=function(t,e,n){var s=this.currentContext,r=n.canvasData;i&&(t|=0,e|=0),s.drawImage(n.source.image,r.sx,r.sy,r.sWidth,r.sHeight,t,e,r.dWidth,r.dHeight)};t.exports=function(t){return i=t,n}},function(t,e,i){var n=i(258),s=i(257),r=i(0),a=i(19),o=i(256),h=i(255),u=i(55),l=i(123),c=new r({initialize:function(t){this.game=t,this.type=a.CANVAS,this.drawCount=0,this.width=t.config.width,this.height=t.config.height,this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,autoResize:t.config.autoResize,roundPixels:t.config.roundPixels},this.scaleMode=t.config.pixelArt?u.NEAREST:u.LINEAR,this.gameCanvas=t.canvas,this.gameContext=this.gameCanvas.getContext("2d"),this.currentContext=this.gameContext,this.drawImage=o(this.config.roundPixels),this.blitImage=n(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,n=this.height;e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),this.drawCount=0},render:function(t,e,i,n){var s=t.sys.context,r=0!==n.x||0!==n.y||n.width!==s.canvas.width||n.height!==s.canvas.height,a=e.list,o=this.config.resolution;this.currentContext=s,n.transparent||(s.fillStyle=n.backgroundColor.rgba,s.fillRect(n.x,n.y,n.width,n.height)),1!==this.currentAlpha&&(s.globalAlpha=1,this.currentAlpha=1),0!==this.currentBlendMode&&(s.globalCompositeOperation="source-over",this.currentBlendMode=0),this.currentScaleMode=0,this.drawCount+=a.length,r&&(s.save(),s.beginPath(),s.rect(n.x*o,n.y*o,n.width*o,n.height*o),s.clip());var h=n.matrix.matrix;s.setTransform(h[0],h[1],h[2],h[3],h[4],h[5]);for(var u=0;u<a.length;u++){var l=a[u];l.mask&&l.mask.preRenderCanvas(this,l,n),l.renderCanvas(this,l,i,n),l.mask&&l.mask.postRenderCanvas(this,l,n)}s.setTransform(1,0,0,1,0,0),s.globalCompositeOperation="source-over",n.flashEffect.postRenderCanvas(s),n.fadeEffect.postRenderCanvas(s),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(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 n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,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(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},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=s}});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 n=i(53);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?n.cordova&&!n.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=function(t,e){return Math.floor(Math.random()*(e-t+1)+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 n=i(269),s=i(22),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),a=r(t,"palette",n),o=r(t,"pixelWidth",1),h=r(t,"pixelHeight",o),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*o)),p=Math.floor(Math.abs(e.length*h));i||(i=s.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=a[x],g.fillRect(y*o,m*h,o,h))}return d&&d(i,g),i}},,,,function(t,e,i){var n=i(27);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),a=parseInt(i[3],10),o=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,a,255*o)}return e}},function(t,e,i){var n=i(27);t.exports=function(t){return new n(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 n=i(27),s=i(276);t.exports=function(t){var e=s(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e,i){var n=i(27);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),a=parseInt(i[3],16);e.setTo(s,r,a)}return e}},,function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)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,n=0;n<e;n++)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),!0)},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,n){var s=Math.cos(n),r=Math.sin(n),a=t.x-e,o=t.y-i;return t.x=a*s-o*r+e,t.y=a*r+o*s+i,t}},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(127),s=i(93);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var a=0;a<e;a++){var o=a/e;r.push(n(t,o))}return r}},function(t,e){t.exports=function(t){return Math.PI*t.radius*2}},function(t,e,i){var n=i(287),s=i(128),r=i(61),a=i(15);t.exports=function(t,e,i,o){void 0===o&&(o=[]),e||(e=n(t)/i);for(var h=0;h<e;h++){var u=r(h/e,0,a.PI2);o.push(s(t,u))}return o}},function(t,e,i){var n=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 n=0;n<t.length;n++)e=.02519603282416938*(i+=t.charCodeAt(n)),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(",")}});t.exports=n},function(t,e,i){var n=i(128),s=i(61),r=i(15),a=i(5);t.exports=function(t,e,i){void 0===i&&(i=new a);var o=s(e,0,r.PI2);return n(t,o,i)}},,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){var n=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 n=this.currentAnim,s=this.parent;return this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,n.getFirstTick(this),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,n.showOnStart&&(s.visible=!0),s.emit("animationstart",this.currentAnim,this.currentFrame),s},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.animationManager.getFrameByProgress(t)),this.parent},remove:function(t){void 0===t&&(t=this.currentAnim),this.isPlaying&&t.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=n},function(t,e,i){var n=i(0),s=i(153),r=i(10),a=i(152),o=i(57),h=i(68),u=new n({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 a(this,t)},timeline:function(t){var e=a(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=s(this,t);return this._add.push(e),this._toProcess++,e},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,n=this._active;for(t=0;t<i.length;t++){e=i[t];var s=n.indexOf(e);-1!==s&&(e.state=o.REMOVED,n.splice(s,1))}for(i.length=0,i=this._add,t=0;t<i.length;t++)(e=i[t]).state===o.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,n=this._active;e*=this.timeScale;for(var s=0;s<n.length;s++)(i=n[s]).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=o.PENDING_ADD,this._toProcess++,this}},each:function(t,e){for(var i=[null],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var s in this.list)i[0]=this.list[s],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,n=this._active,s=[];if(Array.isArray(t))for(i=0;i<n.length;i++){e=n[i];for(;0<t.length;i++)e.hasTarget(t[0])&&s.push(e)}else for(i=0;i<n.length;i++)(e=n[i]).hasTarget(t)&&s.push(e);return s},isTweening:function(t){for(var e,i=this._active,n=0;n<i.length;n++)if((e=i[n]).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(58),GetEaseFunction:i(59),GetNewValue:i(69),GetProps:i(155),GetTargets:i(98),GetTweens:i(154),GetValueOp:i(97),NumberTweenBuilder:i(153),TimelineBuilder:i(152),TweenBuilder:i(68)}},function(t,e,i){var n=i(57),s=i(16),r={Builders:i(298),TweenManager:i(296),Tween:i(95),TweenData:i(94),Timeline:i(151)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(0),s=i(10),r=i(156),a=new n({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,n){return this.addEvent({delay:t,callback:e,args:i,callbackScope:n})},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,n;for(i=0;i<t;i++){n=this._pendingRemoval[i];var s=this._active.indexOf(n);s>-1&&this._active.splice(s,1),n.destroy()}for(i=0;i<e;i++)n=this._pendingInsertion[i],this._active.push(n);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 n=this._active[i];if(!n.paused&&(n.elapsed+=e*n.timeScale,n.elapsed>=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},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}});s.register("Clock",a,"time"),t.exports=a},function(t,e,i){t.exports={Clock:i(300),TimerEvent:i(156)}},,,,,,,,,,,,,,,function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(16),s=i(316),r={FilterMode:s,Frame:i(119),Parsers:i(169),Texture:i(168),TextureManager:i(170),TextureSource:i(167)};r=n(!1,r,s),t.exports=r},function(t,e,i){t.exports={List:i(89),Map:i(114),ProcessQueue:i(213),RTree:i(212),Set:i(75)}},function(t,e,i){t.exports={SoundManagerCreator:i(177),BaseSound:i(72),BaseSoundManager:i(73),WebAudioSound:i(171),WebAudioSoundManager:i(172),HTML5AudioSound:i(175),HTML5AudioSoundManager:i(176),NoAudioSound:i(173),NoAudioSoundManager:i(174)}},function(t,e,i){var n=i(23),s=i(0),r=i(52),a=i(2),o=i(10),h=new s({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.settings.status!==r.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e)):(this.manager.stop(this.key),this.manager.start(t,e)),this},restart:function(t){var e=this.key;return this.settings.status!==r.RUNNING?(this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t)):(this.manager.stop(e),this.manager.start(e,t)),this},transition:function(t){void 0===t&&(t={});var e=a(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=a(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=a(t,"sleep",!1),this._willRemove=a(t,"remove",!1);var s=a(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=a(t,"onUpdateScope",this.scene));var r=a(t,"allowInput",!1);this.settings.transitionAllowInput=r;var o=i.sys.settings;return o.isTransition=!0,o.transitionFrom=this.scene,o.transitionDuration=n,o.transitionAllowInput=r,a(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):a(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake():this.manager.start(e,a(t,"data")),this.systems.events.emit("transitionout",i,n),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=n(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.settings.status!==r.RUNNING?this.manager.queueOp("start",t,e):this.manager.start(t,e)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==r.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=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)},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",h,"scenePlugin"),t.exports=h},function(t,e,i){var n=i(52),s=i(16),r={SceneManager:i(180),ScenePlugin:i(320),Settings:i(178),Systems:i(109)};r=s(!1,r,n),t.exports=r},,,,,,,,,,,,,,,,,,,,function(t,e,i){var n=i(7),s=i(46),r=function(t,e,i,n,r){var a=new s(t,e,n,r,i);return a.type="spritesheet",a};n.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new r(t[s],e,null,this.path,n));else this.addFile(new r(t,e,i,this.path,n));return this}),t.exports=r},function(t,e,i){var n=i(0),s=i(17),r=i(18),a=i(7),o=i(2),h=new n({Extends:r,initialize:function(t,e,i,n){var s="string"==typeof t?t:o(t,"key",""),a={type:"script",extension:o(t,"extension","js"),responseType:"text",key:s,url:o(t,"file",e),path:i,xhrSettings:o(t,"xhr",n)};r.call(this,a)},onProcess:function(t){this.state=s.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.onComplete(),t(this)}});a.register("script",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new h(t[n],e,this.path,i));else this.addFile(new h(t,e,this.path,i));return this}),t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),a=i(7),o=i(2),h=i(10),u=new n({Extends:r,initialize:function(t,e,i,n){"function"==typeof e&&(this.key=t,window[t]=e,window[t].register(h));var s="string"==typeof t?t:o(t,"key",""),a={type:"script",extension:o(t,"extension","js"),responseType:"text",key:s,url:o(t,"file",e),path:i,xhrSettings:o(t,"xhr",n)};r.call(this,a)},onProcess:function(t){this.state=s.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),window[this.key].register(h),this.onComplete(),t(this)}});a.register("plugin",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(t[n],e,this.path,i));else this.addFile(new u(t,e,this.path,i));return this}),t.exports=u},function(t,e,i){var n=i(7),s=i(46),r=i(36),a=i(165);n.register("multiatlas",function(t,e,i,n,o){if("number"==typeof e){var h=e,u=void 0===i?"":i;e=a(0,h,t+u,".png"),i=a(0,h,t+u,".json")}else Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);var l,c,d=0;for(this._multilist[t]=[],d=0;d<e.length;d++)c="_MA_IMG_"+t+"_"+d.toString(),l=new s(c,e[d],this.path,n),this.addFile(l),this._multilist[t].push(c);for(d=0;d<i.length;d++)c="_MA_JSON_"+t+"_"+d.toString(),l=new r(c,i[d],this.path,o),this.addFile(l),this._multilist[t].push(c);return this})},function(t,e,i){var n=i(158),s=i(17),r=i(7),a=i(36);r.register("audioSprite",function(t,e,i,r,o,h){var u,l=n.create(this,t,e,r,o);l&&("string"==typeof i?(u=new a(t,i,this.path,h),this.addFile(u)):u={type:"json",key:t,data:i,state:s.FILE_WAITING_LINKFILE},l.linkFile=u,u.linkFile=l,l.linkType="audioSprite",u.linkType="audioSprite",this.addFile(l));return this})},function(t,e,i){var n=i(7),s=i(46),r=i(36),a=function(t,e,i,n,a,o){var h=new s(t,e,n,a),u=new r(t,i,n,o);return h.linkFile=u,u.linkFile=h,h.linkType="atlasjson",u.linkType="atlasjson",{texture:h,data:u}};n.register("atlas",function(t,e,i,n,s){var r;return r="object"==typeof t&&null!==t?new a(t.key,t.texture,t.data,this.path,n,s):new a(t,e,i,this.path,n,s),this.addFile(r.texture),this.addFile(r.data),this}),t.exports=a},function(t,e,i){var n=i(7),s=i(36),r=function(t,e,i,n){var r=new s(t,e,i,n);return r.type="animationJSON",r};n.register("animation",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new r(t[n],e,this.path,i));else this.addFile(new r(t,e,this.path,i));return this}),t.exports=r},function(t,e,i){t.exports={TouchManager:i(181)}},function(t,e,i){t.exports={MouseManager:i(183)}},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,i){t.exports={KeyboardManager:i(186),Key:i(185),KeyCodes:i(110),KeyCombo:i(184),JustDown:i(353),JustUp:i(352),DownDuration:i(351),UpDuration:i(350)}},function(t,e,i){var n=i(83),s=i(30),r=i(0),a=i(54),o=i(106),h=i(51),u=i(9),l=i(159),c=i(10),d=i(12),f=i(28),p=i(65),g=i(56),m=new r({Extends:u,initialize:function(t){u.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.enabled=!0,this.displayList,this.cameras,this.keyboard=this.manager.keyboard,this.mouse=this.manager.mouse,this.gamepad=this.manager.gamepad,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:[]},this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},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)},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},preUpdate:function(){var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var s=this._list,r=0;r<i;r++){var a=t[r],o=s.indexOf(a);o>-1&&(s.splice(o,1),this.clear(a))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;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,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&(t.input.dropZone=n),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);if(e){t.camera=e;for(var i=this.manager.hitTest(t.x,t.y,this._list,e),n=0;n<i.length;n++){var s=i[n];s.input.dropZone&&this._tempZones.push(s)}return i}return[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n<e.length;n++){var s=e[n];s.input&&(i++,s.emit("pointerdown",t,s.input.localX,s.input.localY,t.camera),this.emit("gameobjectdown",t,s))}return i},processDragEvents:function(t,e){if(0===this._draggable.length)return 0;var i,n,s,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 h=[];for(i=0;i<o.length;i++)(n=o[i]).input.draggable&&h.push(n);if(0===h.length)return t.dragState=0,0;h.length>1&&(this.sortGameObjects(h),this.topOnly&&h.splice(1)),this._drag[t.id]=h,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&a(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(s=this._drag[t.id],i=0;i<s.length;i++)(r=(n=s[i]).input).dragState=2,r.dragX=t.x-n.x,r.dragY=t.y-n.y,r.dragStartX=n.x,r.dragStartY=n.y,n.emit("dragstart",t,r.dragX,r.dragY),this.emit("dragstart",t,n);return t.dragState=4,s.length}if(4===t.dragState&&t.justMoved){var u=this._tempZones;for(s=this._drag[t.id],i=0;i<s.length;i++){if((r=(n=s[i]).input).target){var l=u.indexOf(r.target);0===l?(n.emit("dragover",t,r.target),this.emit("dragover",t,n,r.target)):l>0?(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),r.target=u[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),u[0]?(r.target=u[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):r.target=null)}else!r.target&&u[0]&&(r.target=u[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target));var c=t.x-n.input.dragX,d=t.y-n.input.dragY;n.emit("drag",t,c,d),this.emit("drag",t,n,c,d)}return s.length}if(5===t.dragState){for(s=this._drag[t.id],i=0;i<s.length;i++){(r=(n=s[i]).input).dragState=0,r.dragX=r.localX-n.displayOriginX,r.dragY=r.localY-n.displayOriginY;var f=!1;r.target&&(n.emit("drop",t,r.target),this.emit("drop",t,n,r.target),r.target=null,f=!0),n.emit("dragend",t,r.dragX,r.dragY,f),this.emit("dragend",t,n,f)}t.dragState=0,s.splice(0)}return 0},processMoveEvents:function(t){var e=this._temp;this.emit("pointermove",t,e);for(var i=0,n=0;n<e.length;n++){var s=e[n];if(s.input&&(i++,s.emit("pointermove",t,s.input.localX,s.input.localY),this.emit("gameobjectmove",t,s),this.topOnly))break}return i},processOverOutEvents:function(t){var e,i,n=this._temp,s=[],r=[],a=[],o=this._over[t.id],h=this._drag[t.id];for(e=0;e<o.length;e++)i=o[e],-1===n.indexOf(i)&&-1===h.indexOf(i)?s.push(i):a.push(i);for(e=0;e<n.length;e++)i=n[e],-1===o.indexOf(i)&&r.push(i);var u=s.length,l=0;if(u>0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e<u;e++)(i=s[e]).input&&(this.emit("gameobjectout",t,i),i.emit("pointerout",t),l++);if((u=r.length)>0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e<u;e++)(i=r[e]).input&&(this.emit("gameobjectover",t,i),i.emit("pointerover",t,i.input.localX,i.input.localY),l++);return o=a.concat(r),this._over[t.id]=this.sortGameObjects(o),l},processUpEvents:function(t){var e=this._temp;this.emit("pointerup",t,e);for(var i=0;i<e.length;i++){var n=e[i];n.input&&(n.emit("pointerup",t,n.input.localX,n.input.localY),this.emit("gameobjectup",t,n))}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 n=t[i];n.input.draggable=e;var s=this._draggable.indexOf(n);e&&-1===s?this._draggable.push(n):!e&&s>-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;n<t.length;n++){var s=t[n];s.input=l(s,e,i),this.queueForInsertion(s)}return this},setHitAreaCircle:function(t,e,i,r,a){void 0===a&&(a=s);var o=new n(e,i,r);return this.setHitArea(t,o,a)},setHitAreaEllipse:function(t,e,i,n,s,r){void 0===r&&(r=h);var a=new o(e,i,n,s);return this.setHitArea(t,a,r)},setHitAreaFromTexture:function(t,e){void 0===e&&(e=f),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];if("Container"!==n.type){var s=n.frame,r=0,a=0;s?(r=s.realWidth,a=s.realHeight):n.width&&(r=n.width,a=n.height),0!==r&&0!==a&&(n.input=l(n,new d(0,0,r,a),e),this.queueForInsertion(n))}else console.warn("Container.setInteractive() must specify a Shape")}return this},setHitAreaRectangle:function(t,e,i,n,s,r){void 0===r&&(r=f);var a=new d(e,i,n,s);return this.setHitArea(t,a,r)},setHitAreaTriangle:function(t,e,i,n,s,r,a,o){void 0===o&&(o=g);var h=new p(e,i,n,s,r,a);return this.setHitArea(t,h,o)},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);for(var i=t.getIndexList(),n=e.getIndexList(),s=Math.min(i.length,n.length),r=0;r<s;r++){var a=i[r],o=n[r];if(a!==o)return o-a}return 0},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!(!this.enabled||i.globalTopOnly&&i.ignoreEvents)){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._tempZones=[],this._temp=this.hitTestPointer(n),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 r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&(r+=this.processUpEvents(n)),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},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._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.scene.sys.events.off("start",this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.keyboard=null,this.mouse=null,this.gamepad=null},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",m,"input"),t.exports=m},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(358),SNES_USB:i(357),XBOX_360:i(356)}},function(t,e,i){t.exports={Axis:i(188),Button:i(187),Gamepad:i(189),GamepadManager:i(190),Configs:i(359)}},function(t,e,i){t.exports={CreateInteractiveObject:i(159),Gamepad:i(360),InputManager:i(191),InputPlugin:i(355),Keyboard:i(354),Mouse:i(349),Pointer:i(182),Touch:i(348)}},,,,,,,,,,,,,,,,,,,function(t,e,i){var n=i(21),s=i(13),r=i(8),a=i(102);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var o=new a(this.scene,0,0,e,i);return n(this.scene,o,t),o.autoRound=r(t,"autoRound",!0),o.resolution=r(t,"resolution",1),o})},function(t,e,i){var n=i(21),s=i(118),r=i(13),a=i(8),o=i(31);r.register("sprite",function(t){var e=a(t,"key",null),i=a(t,"frame",null),r=new o(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),a=i(66);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new a(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(8),s=i(13),r=i(107);s.register("graphics",function(t){var e=n(t,"add",!0),i=new r(this.scene,t);return e&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(102);i(11).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(11),s=i(31);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(66);i(11).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(107);i(11).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},,function(t,e,i){var n=i(22);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,a=2*r;r=r*t.baselineY|0,e.width=s,e.height=a,i.fillStyle="#f00",i.fillRect(0,0,s,a),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var o={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,a))return o.ascent=r,o.descent=r+6,o.fontSize=o.ascent+o.descent,n.remove(e),o;var h,u,l=i.getImageData(0,0,s,a).data,c=l.length,d=4*s,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(o.ascent=r-h,f=c-d,p=!1,h=a;h>r;h--){for(u=0;u<d;u+=4)if(255!==l[f+u]){p=!0;break}if(p)break;f-=d}return o.descent=h-r,o.fontSize=o.ascent+o.descent,n.remove(e),o}},function(t,e,i){var n=i(0),s=i(8),r=i(4),a=i(389),o={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 n({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)}:a(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"),o)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,o[i][0],o[i][1]):s(t,o[i][0],o[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var a=r(t,"fill",null);return null!==a&&(this.color=a),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=a(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,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,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 o)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var a=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,a.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,a.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;if(a.save(),void 0!==r){var h=r.matrix;a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY;t.config.roundPixels&&(u|=0,l|=0),a.translate(u,l),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),a.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(392),s=i(391),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,a=[],o=0,h=i.length;r.maxLines>0&&r.maxLines<i.length&&(h=r.maxLines),r.syncFont(n,s);for(var u=0;u<h;u++){var l=r.strokeThickness;l+=s.measureText(i[u]).width,r.wordWrap&&(l-=s.measureText(" ").width),a[u]=Math.ceil(l),o=Math.max(o,a[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:o,height:d,lines:h,lineWidths:a,lineSpacing:f,lineHeight:c}}},,,,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 n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(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 n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(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 n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(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 n=i(239),s=i(238),r=i(237),a=i(236),o=i(235),h=i(234),u=i(233),l=i(232),c=i(231),d=i(230),f=i(229),p=i(228);t.exports={Power0:u,Power1:l.Out,Power2:a.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:a.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:o.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":a.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":o.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":a.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":o.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":a.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":o.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},,,,,,function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(437),s=i(436),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(439),s=i(160),s=i(160),t.exports={renderWebGL:n,renderCanvas:s}},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 n=i(12);t.exports=function(t,e){return void 0===e&&(e=new n),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 n=i(51);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e,i){var n=i(51);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(106);t.exports=function(t){return new n(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 n=i(0),s=i(10),r=new n({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,n;for(i=0;i<t;i++){n=this._pendingRemoval[i];var s=this._list.indexOf(n);s>-1&&this._list.splice(s,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 n=this._list[i];n.active&&n.preUpdate.call(n,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}});s.register("UpdateList",r,"updateList"),t.exports=r},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),s=t.indexOf(i);if(n<0||s<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[s]=e,t}}},function(t,e,i){var n=i(26);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var a=s;a<r;a++){var o=t[a];o.hasOwnProperty(e)&&(o[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 n=t.indexOf(e),s=t.indexOf(i);return-1!==n&&-1===s&&(t[n]=i,!0)}},function(t,e,i){var n=i(70);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 n(t,s)}},function(t,e,i){var n=i(26);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var a=i-e,o=t.splice(e,a);if(s)for(var h=0;h<o.length;h++){var u=o[h];s.call(r,u)}return o}return[]}},function(t,e,i){var n=i(70);t.exports=function(t,e,i,s){if(void 0===s&&(s=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){var n=i(70);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var a=e.length-1;a>=0;){var o=e[a];-1!==(r=t.indexOf(o))?(n(t,r),i&&i.call(s,o)):e.pop(),a--}return e}},function(t,e,i){var n=i(247);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 s=[],r=Math.max(n((e-t)/(i||1)),0),a=0;a<r;a++)s.push(t),t+=i;return s}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i<t.length-2){var n=t[i+1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e,i){var n=i(26);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var a=s;a<r;a++){var o=t[a];if(!e||e&&void 0===i&&o.hasOwnProperty(e)||e&&void 0!==i&&o[e]===i)return o}return null}},function(t,e,i){var n=i(26);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var a=[];if(n(t,s,r))for(var o=s;o<r;o++){var h=t[o];(!e||e&&void 0===i&&h.hasOwnProperty(e)||e&&void 0!==i&&h[e]===i)&&a.push(h)}return a}},function(t,e,i){var n=i(26);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r)){var a,o=[null];for(a=5;a<arguments.length;a++)o.push(arguments[a]);for(a=s;a<r;a++)o[0]=t[a],e.apply(i,o)}return t}},function(t,e){t.exports=function(t,e,i){var n,s=[null];for(n=2;n<arguments.length;n++)s.push(arguments[n]);for(n=0;n<t.length;n++)s[0]=t[n],e.apply(i,s);return t}},function(t,e,i){var n=i(26);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var a=0;if(n(t,s,r))for(var o=s;o<r;o++)t[o][e]===i&&a++;return a}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length-2&&(t.splice(i,1),t.push(e)),e}},function(t,e){t.exports=function(t,e,i,n,s,r){if(void 0===i&&(i=0),void 0===r&&(r=t),n>0){var a=n-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,u),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;n>0&&o>a&&(e.splice(a),o=a);for(var h=o;h>0;h--){var u=e[h];t.splice(i,0,u),s&&s.call(r,u)}return e}},function(t,e){t.exports=function(t,e,i,n,s){if(void 0===s&&(s=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),n&&n.call(s,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;i>0&&a>r&&(e.splice(r),a=r);for(var o=0;o<a;o++){var h=e[o];t.push(h),n&&n.call(s,h)}return e}},function(t,e,i){var n=i(71);t.exports=function(t){return n(t,-90)}},function(t,e,i){var n=i(71);t.exports=function(t){return n(t,90)}},function(t,e,i){var n=i(71);t.exports=function(t){return n(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 n=i(125),s=i(108);t.exports=function(t){var e="";if(!s(t))return e;for(var i=0;i<t.length;i++){for(var r=0;r<t[i].length;r++){var a=t[i][r].toString();e+="undefined"!==a?n(a,2):"?",r<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var o=0;o<t[i].length;o++)e+="---",o<t[i].length-1&&(e+="+");e+="\n"}}return e}},function(t,e,i){t.exports={CheckMatrix:i(108),MatrixToString:i(479),ReverseColumns:i(478),ReverseRows:i(477),Rotate180:i(476),RotateLeft:i(475),RotateMatrix:i(71),RotateRight:i(474),TransposeMatrix:i(166)}},function(t,e,i){var n=i(0),s=i(89),r=i(10),a=i(79),o=new n({Extends:s,initialize:function(t){s.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&&(a.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",o,"displayList"),t.exports=o},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n=i(0),s=i(4),r=i(3),a=i(260),o=new n({initialize:function(t,e){this.game=t,this.raf=new a,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(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=s(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=s(e,"deltaHistory",10),this.panicMax=s(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++,this.rawDelta=t-this.lastTime;var e=this.deltaIndex,i=this.deltaHistory,n=this.deltaSmoothingMax,s=t-this.lastTime;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,a=0;a<n;a++)r+=i[a];r/=n,this.delta=r,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 o=r/this._target;this.callback(t,r,o),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=o},function(t,e){var i=0,n=function(t,e,n,s){var r=i-s.y-s.height;t.add(n,e,s.x,r,s.width,s.height)};t.exports=function(t,e,s){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var a=s.split("\n"),o=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",u="",l={x:0,y:0,width:0,height:0},c=0;c<a.length;c++){var d=a[c].match(o);if(d){var f="- "===d[1],p=d[2],g=d[3];if(f&&(u!==h&&(n(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&&n(t,e,u,l),t}},function(t,e){t.exports=function(t,e){if(e.getElementsByTagName("TextureAtlas")){for(var i,n,s,r,a,o,h,u,l,c,d,f=new Phaser.FrameData,p=e.getElementsByTagName("SubTexture"),g=0;g<p.length;g++)n=(s=p[g].attributes).name.value,r=parseInt(s.x.value,10),a=parseInt(s.y.value,10),o=parseInt(s.width.value,10),h=parseInt(s.height.value,10),u=null,l=null,s.frameX&&(u=Math.abs(parseInt(s.frameX.value,10)),l=Math.abs(parseInt(s.frameY.value,10)),c=parseInt(s.frameWidth.value,10),d=parseInt(s.frameHeight.value,10)),i=f.addFrame(new Phaser.Frame(g,r,a,o,h,n)),null===u&&null===l||i.setTrim(!0,o,h,u,l,c,d);return f}}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var a,o=n(i,"startFrame",0),h=n(i,"endFrame",-1),u=n(i,"margin",0),l=n(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)/(s+l)),y=Math.floor((m-u+l)/(r+l)),x=v*y,w=e.x,T=s-w,S=s-(g-f-w),A=e.y,b=r-A,E=r-(m-p-A);(o>x||o<-x)&&(o=0),o<0&&(o=x+o),-1!==h&&(x=o+(h+1));for(var _=u,C=u,M=0,k=e.sourceIndex,P=0;P<y;P++){for(var L=0===P,F=P===y-1,R=0;R<v;R++){var O=0===R,D=R===v-1;if(a=t.add(M,k,c+_,d+C,s,r),O||L||D||F){var I=O?w:0,B=L?A:0,N=s,U=r;O?N=T:D&&(N=S),L?U=b:F&&(U=E),a.cutWidth=N,a.cutHeight=U,a.setTrim(s,r,I,B,N,U)}_+=l,_+=O?T:D||s,M++}_=u,C+=l,C+=L?b:F?E:r}return t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,a,o){var h=n(o,"frameWidth",null),u=n(o,"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=n(o,"startFrame",0),d=n(o,"endFrame",-1),f=n(o,"margin",0),p=n(o,"spacing",0),g=Math.floor((r-f+p)/(h+p))*Math.floor((a-f+p)/(u+p));(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,S=v+u;T>r&&(y=T-r),S>a&&(x=S-a),t.add(w,e,i+m,s+v,h-y,u-x),(m+=h+p)+h>r&&(m=f,v+=u+p)}return t}},function(t,e){t.exports=function(t,e){if(["layers","tilewidth","tileheight","tileswide","tileshigh"].forEach(function(t){e[t]}),1===e.layers.length){for(var i=new Phaser.FrameData,n=e.tileheight,s=e.tilewidth,r=e.layers[0].tiles,a=0;a<r.length;a++)i.addFrame(new Phaser.Frame(a,r[a].x,r[a].y,s,n,"frame_"+a)).setTrim(!1);return i}}},function(t,e,i){var n=i(47);t.exports=function(t,e,i){if(i.frames){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);var r,a=i.frames;for(var o in a){var h=a[o];r=t.add(o,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=n(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 n=i(47);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,a=Array.isArray(i.textures)?i.textures[e].frames:i.frames,o=0;o<a.length;o++){var h=a[o];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=n(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 given, missing 'frames' and 'textures' 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={game:"game",anims:"anims",cache:"cache",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 n=i(2);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){var n=i(2),s=i(248);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var a in i)a=s(a.concat("Physics")),-1===r.indexOf(a)&&r.push(a);return r}}},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}},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 n=i(110),s={};for(var r in n)s[n[r]]=r;t.exports=s},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 n=i(500);t.exports=function(t,e){if(e.matched)return!0;var i=!1,s=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&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){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t<e.length;t++)if(n[e[t]]){i.available=!0,i.request=e[t];break}var s=["cancelFullScreen","exitFullscreen","webkitCancelFullScreen","webkitExitFullscreen","msCancelFullScreen","msExitFullscreen","mozCancelFullScreen","mozExitFullscreen"];if(i.available)for(t=0;t<s.length;t++)if(document[s[t]]){i.cancel=s[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 n=i(74),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.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)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e,i){var n=i(53),s=i(74),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),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){t.exports={os:i(53),browser:i(74),features:i(112),input:i(505),audio:i(504),video:i(503),fullscreen:i(502),canvasFeatures:i(193)}},function(t,e,i){var n=i(19);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,a=t.device.audio;if(s=!a.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!a.webAudio&&!a.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var o,h="",u=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),u.push("background: "+t),o=t}),u[u.length-1]="color: "+e.bannerTextColor+"; background: "+o):(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"+n.VERSION+" ("+i+" | "+s+")")),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\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\nuniform bool uInvertMaskAlpha;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = mainColor.a;\r\n\r\n if (!uInvertMaskAlpha)\r\n {\r\n alpha *= (maskColor.a);\r\n }\r\n else\r\n {\r\n alpha *= (1.0 - maskColor.a);\r\n }\r\n \r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n"},function(t,e,i){var n=i(266),s=i(22),r=i(19),a=i(112);t.exports=function(t){var e,o,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!a.webGL){if(!a.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.pixelArt&&s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width,h.height,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.pixelArt&&n.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(259),o=i(254),h.renderType===r.WEBGL?(t.renderer=new o(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var n=i(0),s=i(19),r=i(4),a=i(15),o=i(3),h=i(194),u=i(124),l=new n({initialize:function(t){void 0===t&&(t={});this.width=r(t,"width",1024),this.height=r(t,"height",768),this.zoom=r(t,"zoom",1),this.resolution=r(t,"resolution",1),this.renderType=r(t,"type",s.AUTO),this.parent=r(t,"parent",null),this.canvas=r(t,"canvas",null),this.canvasStyle=r(t,"canvasStyle",null),this.sceneConfig=r(t,"scene",null),this.seed=r(t,"seed",[(Date.now()*Math.random()).toString()]),a.RND.init(this.seed),this.gameTitle=r(t,"title",""),this.gameURL=r(t,"url","https://phaser.io"),this.gameVersion=r(t,"version",""),this.inputKeyboard=r(t,"input.keyboard",!0),this.inputKeyboardEventTarget=r(t,"input.keyboard.target",window),this.inputMouse=r(t,"input.mouse",!0),this.inputMouseEventTarget=r(t,"input.mouse.target",null),this.inputMouseCapture=r(t,"input.mouse.capture",!0),this.inputTouch=r(t,"input.touch",!0),this.inputTouchEventTarget=r(t,"input.touch.target",null),this.inputTouchCapture=r(t,"input.touch.capture",!0),this.inputGamepad=r(t,"input.gamepad",!1),this.disableContextMenu=r(t,"disableContextMenu",!1),this.audio=r(t,"audio"),this.hideBanner=!1===r(t,"banner",null),this.hidePhaser=r(t,"banner.hidePhaser",!1),this.bannerTextColor=r(t,"banner.text","#ffffff"),this.bannerBackgroundColor=r(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=r(t,"fps",null);var e=r(t,"render",t);this.antialias=r(e,"antialias",!0),this.pixelArt=r(e,"pixelArt",!1),this.autoResize=r(e,"autoResize",!1),this.roundPixels=r(e,"roundPixels",!1),this.transparent=r(e,"transparent",!1),this.clearBeforeRender=r(e,"clearBeforeRender",!0),this.premultipliedAlpha=r(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=r(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=r(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=r(e,"powerPreference","default");var i=r(t,"backgroundColor",0);this.backgroundColor=u(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=r(t,"callbacks.preBoot",o),this.postBoot=r(t,"callbacks.postBoot",o),this.physics=r(t,"physics",{}),this.defaultPhysicsSystem=r(this.physics,"default",!1),this.loaderBaseURL=r(t,"loader.baseURL",""),this.loaderPath=r(t,"loader.path",""),this.loaderEnableParallel=r(t,"loader.enableParallel",!0),this.loaderMaxParallelDownloads=r(t,"loader.maxParallelDownloads",4),this.loaderCrossOrigin=r(t,"loader.crossOrigin",void 0),this.loaderResponseType=r(t,"loader.responseType",""),this.loaderAsync=r(t,"loader.async",!0),this.loaderUser=r(t,"loader.user",""),this.loaderPassword=r(t,"loader.password",""),this.loaderTimeout=r(t,"loader.timeout",0),this.defaultPlugins=r(t,"plugins",h.DefaultScene);var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=r(t,"images.default",n+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=r(t,"images.missing",n+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==")}});t.exports=l},function(t,e,i){var n=i(122),s=i(198),r=i(196),a=i(22),o=i(0),h=i(516),u=i(515),l=i(76),c=i(507),d=i(506),f=i(263),p=i(9),g=i(191),m=i(3),v=i(10),y=i(180),x=i(177),w=i(170),T=i(483),S=i(482),A=new o({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 s(this),this.textures=new w(this),this.cache=new r(this),this.registry=new l(this),this.input=new g(this,this.config),this.scene=new y(this,this.config.sceneConfig),this.device=d,this.sound=x.create(this),this.loop=new T(this,this.config.fps),this.plugins=new v(this,this.config),this.onStepCallback=m,this.pendingDestroy=!1,this.removeCanvas=!1,f(this.boot.bind(this))},boot:function(){this.isBooted=!0,this.config.preBoot(this),u(this),c(this),n(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)),S(this.events),this.events.on("hidden",this.onHidden,this),this.events.on("visible",this.onVisible,this),this.events.on("blur",this.onBlur,this),this.events.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e);var i=this.renderer;i.preRender(),this.events.emit("prerender",i),this.scene.render(i),i.postRender(),this.events.emit("postrender",i)},headlessStep:function(t,e){this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e),this.events.emit("prerender"),this.events.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.loop.blur()},onFocus:function(){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.onStepCallback=null,this.removeCanvas&&this.canvas&&(a.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=A},function(t,e,i){var n=i(0),s=i(9),r=i(10),a=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",a,"events"),t.exports=a},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(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{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();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=o(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(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}s.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||o(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=g,s.addListener=g,s.once=g,s.off=g,s.removeListener=g,s.removeAllListeners=g,s.emit=g,s.prependListener=g,s.prependOnceListener=g,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.geometryMask=e},setShape:function(t){this.geometryMask=t},preRenderWebGL:function(t,e,i){var n=t.gl,s=this.geometryMask;t.flush(),n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),n.colorMask(!1,!1,!1,!1),n.stencilFunc(n.NOTEQUAL,1,1),n.stencilOp(n.REPLACE,n.REPLACE,n.REPLACE),s.renderWebGL(t,s,0,i),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilFunc(n.EQUAL,1,1),n.stencilOp(n.INVERT,n.INVERT,n.INVERT)},postRenderWebGL:function(t){var e=t.gl;t.flush(),e.disable(e.STENCIL_TEST)},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,0,i,void 0,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){var i=t.sys.game.renderer;if(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 n=i.width,s=i.height,r=0==(n&n-1)&&0==(s&s-1),a=i.gl,o=r?a.REPEAT:a.CLAMP_TO_EDGE,h=a.LINEAR;this.mainTexture=i.createTexture2D(0,h,h,o,o,a.RGBA,null,n,s),this.maskTexture=i.createTexture2D(0,h,h,o,o,a.RGBA,null,n,s),this.mainFramebuffer=i.createFramebuffer(n,s,this.mainTexture,!1),this.maskFramebuffer=i.createFramebuffer(n,s,this.maskTexture,!1),i.onContextRestored(function(t){var e=t.width,i=t.height,n=0==(e&e-1)&&0==(i&i-1),s=t.gl,r=n?s.REPEAT:s.CLAMP_TO_EDGE,a=s.LINEAR;this.mainTexture=t.createTexture2D(0,a,a,r,r,s.RGBA,null,e,i),this.maskTexture=t.createTexture2D(0,a,a,r,r,s.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(){}});t.exports=n},function(t,e,i){t.exports={BitmapMask:i(521),GeometryMask:i(520)}},,,,,function(t,e,i){var n=i(0),s=i(76),r=i(10),a=new n({Extends:s,initialize:function(t){s.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&&this.events.off("destroy",this.destroy,this),this.events=this.systems.events,this.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){s.prototype.destroy.call(this),this.systems.events.off("start",this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",a,"data"),t.exports=a},function(t,e,i){t.exports={DataManager:i(76),DataManagerPlugin:i(527)}},,,,,,,,,,function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(539),s=i(538),t.exports={renderWebGL:n,renderCanvas:s}},,,,,,function(t,e,i){var n=i(113),s=i(0),r=i(2),a=i(10),o=i(28),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.currentCameraId=1,this.cameras=[],this.cameraPool=[],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,s,r,a){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),void 0===r&&(r=!1),void 0===a&&(a="");var o=null;return this.cameraPool.length>0?(o=this.cameraPool.pop()).setViewport(t,e,i,s):o=new n(t,e,i,s),o.setName(a),o.setScene(this.scene),this.cameras.push(o),r&&(this.main=o),o._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,o},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n<t.length;n++){var s=t[n],a=r(s,"x",0),o=r(s,"y",0),h=r(s,"width",e),u=r(s,"height",i),l=this.add(a,o,h,u);l.name=r(s,"name",""),l.zoom=r(s,"zoom",1),l.rotation=r(s,"rotation",0),l.scrollX=r(s,"scrollX",0),l.scrollY=r(s,"scrollY",0),l.roundPixels=r(s,"roundPixels",!1);var c=r(s,"backgroundColor",!1);c&&l.setBackgroundColor(c);var d=r(s,"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=0;e<this.cameras.length;e++)if(this.cameras[e].name===t)return this.cameras[e];return null},getCameraBelowPointer:function(t){for(var e=this.cameras,i=e.length-1;i>=0;i--){var n=e[i];if(n.inputEnabled&&o(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,a=n.length;r<a;++r){var o=n[r];o.preRender(s,t.config.resolution),t.render(this.scene,e,i,o)}},resetAll:function(){for(;this.cameras.length>0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i<n;++i)this.cameras[i].update(t,e)},resize:function(t,e){for(var i=0,n=this.cameras.length;i<n;++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();for(t=0;t<this.cameraPool.length;t++)this.cameraPool[t].destroy();this.cameras=[],this.cameraPool=[];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}});a.register("CameraManager",h,"cameras"),t.exports=h},function(t,e,i){var n=i(23),s=i(0),r=i(6),a=new s({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,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=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=n,this._onUpdateScope=s,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=n(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,s=this.camera.width,r=this.camera.height,a=this.camera.zoom;this._offsetX=(Math.random()*i.x*s*2-i.x*s)*a,this._offsetY=(Math.random()*i.y*r*2-i.y*r)*a,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=a},function(t,e,i){var n=i(23),s=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,n,s,r,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===n&&(n=255),void 0===s&&(s=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene),!s&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=n,this.alpha=1,this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit("cameraflashstart",this.camera,this,t,e,i,n),this.camera)},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(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,n=this.red/255,s=this.blue/255,r=this.green/255;return t.batchFillRect(0,0,1,1,0,i.x,i.y,i.width,i.height,e(n,r,s,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=s},function(t,e,i){var n=i(23),s=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,n,s,r,a,o){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===a&&(a=null),void 0===o&&(o=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=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=o;var h=t?"camerafadeoutstart":"camerafadeinstart";return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(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,n=this.red/255,s=this.blue/255,r=this.green/255;return t.batchFillRect(0,0,1,1,0,i.x,i.y,i.width,i.height,e(n,r,s,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=s},function(t,e,i){t.exports={Camera:i(113),CameraManager:i(546),Effects:i(195)}},,,function(t,e,i){t.exports={BaseCache:i(197),CacheManager:i(196)}},function(t,e,i){t.exports={Animation:i(201),AnimationFrame:i(199),AnimationManager:i(198)}},,,,,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 n=i(15),s=i(60),r=i(203),a=i(202),o={_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 a(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=r(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,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 s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t){void 0===t&&(t=new s);var e=this.parentContainer;if(!e)return this.getLocalTransformMatrix(t);for(var i=[];e;)i.unshift(e),e=e.parentContainer;t.loadIdentity();for(var n=i.length,r=0;r<n;++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=o},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)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){var i={texture:null,frame:null,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 n=i(55),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},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,n,s,r){var a=this.currentMatrix,o=a[0],h=a[1],u=a[2],l=a[3],c=a[4],d=a[5];return a[0]=o*t+u*e,a[1]=h*t+l*e,a[2]=o*i+u*n,a[3]=h*i+l*n,a[4]=o*s+u*r+c,a[5]=h*s+l*r+d,this},setTransform:function(t,e,i,n,s,r){var a=this.currentMatrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=s,a[5]=r,this},translate:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],a=i[3],o=i[4],h=i[5];return i[4]=n*t+r*e+o,i[5]=s*t+a*e+h,this},scale:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],a=i[3];return i[0]=n*t,i[1]=s*t,i[2]=r*e,i[3]=a*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],n=e[1],s=e[2],r=e[3],a=Math.sin(t),o=Math.cos(t);return e[0]=i*o+s*a,e[1]=n*o+r*a,e[2]=i*-a+s*o,e[3]=n*-a+r*o,this}};t.exports=i},function(t,e,i){var n=i(12),s=i(284),r=i(6),a={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&&s(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&&s(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&&s(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&&s(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,s,r,a,o,h,u;if(void 0===t&&(t=new n),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),s=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),a=t.x,o=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),s=t.x,r=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,u=t.y;return t.x=Math.min(e,s,a,h),t.y=Math.min(i,r,o,u),t.width=Math.max(e,s,a,h)-t.x,t.height=Math.max(i,r,o,u)-t.y,t}};t.exports=a},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 n=i(48),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e,i){var n=i(23),s={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(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=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=s},,,,,,,,,,,,,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(),n=["ms","moz","webkit","o"],s=0;s<n.length&&!t.requestAnimationFrame;++s)t.requestAnimationFrame=t[n[s]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[n[s]+"CancelAnimationFrame"]||t[n[s]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),n=16+i-e;return n<0&&(n=0),i=e,setTimeout(function(){i=Date.now(),t(performance.now())},n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}).call(this,i(204))},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,n=i.call(arguments,1);if("function"!=typeof e)throw new TypeError;function s(){var r=n.concat(i.call(arguments));e.apply(this instanceof s?this:t,r)}return s.prototype=function t(e){if(e&&(t.prototype=e),!(this instanceof t))return new t}(e.prototype),s}))},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(t,e,i){"use strict";function n(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 t=this.internal_createGain();return n(t.gain),t},AudioContext.prototype.internal_createDelay=AudioContext.prototype.createDelay,AudioContext.prototype.createDelay=function(t){var e=t?this.internal_createDelay(t):this.internal_createDelay();return n(e.delayTime),e},AudioContext.prototype.internal_createBufferSource=AudioContext.prototype.createBufferSource,AudioContext.prototype.createBufferSource=function(){var t=this.internal_createBufferSource();return t.start?(t.internal_start=t.start,t.start=function(e,i,n){void 0!==n?t.internal_start(e||0,i,n):t.internal_start(e||0,i||0)}):t.start=function(t,e,i){e||i?this.noteGrainOn(t||0,e,i):this.noteOn(t||0)},t.stop?(t.internal_stop=t.stop,t.stop=function(e){t.internal_stop(e||0)}):t.stop=function(t){this.noteOff(t||0)},n(t.playbackRate),t},AudioContext.prototype.internal_createDynamicsCompressor=AudioContext.prototype.createDynamicsCompressor,AudioContext.prototype.createDynamicsCompressor=function(){var t=this.internal_createDynamicsCompressor();return n(t.threshold),n(t.knee),n(t.ratio),n(t.reduction),n(t.attack),n(t.release),t},AudioContext.prototype.internal_createBiquadFilter=AudioContext.prototype.createBiquadFilter,AudioContext.prototype.createBiquadFilter=function(){var t=this.internal_createBiquadFilter();return n(t.frequency),n(t.detune),n(t.Q),n(t.gain),t},AudioContext.prototype.hasOwnProperty("createOscillator")&&(AudioContext.prototype.internal_createOscillator=AudioContext.prototype.createOscillator,AudioContext.prototype.createOscillator=function(){var t=this.internal_createOscillator();return t.start?(t.internal_start=t.start,t.start=function(e){t.internal_start(e||0)}):t.start=function(t){this.noteOn(t||0)},t.stop?(t.internal_stop=t.stop,t.stop=function(e){t.internal_stop(e||0)}):t.stop=function(t){this.noteOff(t||0)},t.setPeriodicWave||(t.setPeriodicWave=t.setWaveTable),n(t.frequency),n(t.detune),t})),window.hasOwnProperty("webkitOfflineAudioContext")&&!window.hasOwnProperty("OfflineAudioContext")&&(window.OfflineAudioContext=webkitOfflineAudioContext)}(window)},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 n=arguments.length>=2?arguments[1]:void 0,s=0;s<i;s++)s in e&&t.call(n,e[s],s,e)})},function(t,e,i){i(595),i(594),i(593),i(592),i(591),i(590),i(589),i(588),i(587)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){t.exports={BitmapMaskPipeline:i(252),FlatTintPipeline:i(251),ForwardDiffuseLightPipeline:i(141),TextureTintPipeline:i(120)}},function(t,e,i){t.exports={Utils:i(25),WebGLPipeline:i(80),WebGLRenderer:i(254),Pipelines:i(656),BYTE:0,SHORT:1,UNSIGNED_BYTE:2,UNSIGNED_SHORT:3,FLOAT:4}},function(t,e,i){t.exports={Canvas:i(257),WebGL:i(253)}},function(t,e,i){t.exports={BlitImage:i(258),CanvasRenderer:i(259),DrawImage:i(256),GetBlendModes:i(255)}},function(t,e,i){t.exports={Canvas:i(659),Snapshot:i(658),WebGL:i(657)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){(function(e){i(596);var n=i(19),s=i(16),r={Animation:i(554),Cache:i(553),Cameras:{Scene2D:i(550)},Class:i(0),Data:i(528),Display:{Masks:i(522)},EventEmitter:i(518),Game:i(517),GameObjects:{DisplayList:i(481),GameObjectCreator:i(13),GameObjectFactory:i(11),UpdateList:i(453),Components:i(14),BuildGameObject:i(21),BuildGameObjectAnimation:i(118),GameObject:i(1),Graphics:i(107),Image:i(66),Sprite:i(31),Text:i(102),Factories:{Graphics:i(387),Image:i(386),Sprite:i(385),Text:i(384)},Creators:{Graphics:i(383),Image:i(382),Sprite:i(381),Text:i(380)}},Input:i(361),Loader:{FileTypes:{AnimationJSONFile:i(347),AtlasJSONFile:i(346),AudioFile:i(158),AudioSprite:i(345),HTML5AudioFile:i(157),ImageFile:i(46),JSONFile:i(36),MultiAtlas:i(344),PluginFile:i(343),ScriptFile:i(342),SpriteSheetFile:i(341),TextFile:i(214),XMLFile:i(215)}},Math:{Between:i(264),DegToRad:i(33),FloatBetween:i(240),RadToDeg:i(142),Vector2:i(6)},Renderer:i(660),Scene:i(179),Scenes:i(321),Sound:i(319),Structs:i(318),Textures:i(317),Time:i(301),Tweens:i(299)};r=s(!1,r,n),t.exports=r,e.Phaser=r}).call(this,i(204))}])}); |