From f4e3909059d3eb1a2d720a74cc779aec140ab938 Mon Sep 17 00:00:00 2001 From: j-tap Date: Wed, 15 Jun 2022 10:40:21 +0300 Subject: [PATCH] final version, fixes, readme --- README.md | 81 ++++++++++++++++++ dist/android-chrome-192x192.png | Bin 16539 -> 16539 bytes dist/android-chrome-512x512.png | Bin 13890 -> 13890 bytes dist/apple-touch-icon.png | Bin 12171 -> 12171 bytes dist/assets/img/315f4f40430c4367bf79.png | Bin 35670 -> 0 bytes dist/assets/img/7b4da64c18cb692bb83e.png | Bin 13054 -> 0 bytes dist/assets/img/bbdb3539cd5c788b358b.png | Bin 2689 -> 0 bytes dist/favicon-16x16.png | Bin 1217 -> 1217 bytes dist/favicon-32x32.png | Bin 2277 -> 2277 bytes dist/js/bundle.js | 4 +- dist/mstile-150x150.png | Bin 11207 -> 11207 bytes src/assets/img/game/icon-unknow.png | Bin 2689 -> 0 bytes src/assets/img/game/pause-btn.png | Bin 35670 -> 0 bytes src/assets/img/game/plus-btn.png | Bin 13054 -> 0 bytes src/configs/scenes.js | 13 +-- src/faviconData.json | 2 +- src/objects/Bonus.js | 7 ++ src/objects/SceneLevel.js | 21 +++-- .../bonusBlock/BonusBlockGameObject.js | 2 +- src/plugins/gridTiles/GridTilesGameObject.js | 1 - src/scenes/ScenePreload.js | 6 -- src/services/BonusesService.js | 21 ++++- 22 files changed, 125 insertions(+), 33 deletions(-) delete mode 100644 dist/assets/img/315f4f40430c4367bf79.png delete mode 100644 dist/assets/img/7b4da64c18cb692bb83e.png delete mode 100644 dist/assets/img/bbdb3539cd5c788b358b.png delete mode 100644 src/assets/img/game/icon-unknow.png delete mode 100644 src/assets/img/game/pause-btn.png delete mode 100644 src/assets/img/game/plus-btn.png diff --git a/README.md b/README.md index d321308..7267404 100644 --- a/README.md +++ b/README.md @@ -1 +1,82 @@ # BlastGame +Simple browser game +Demo on [blast-game.netlify.app](https://blast-game.netlify.app/) + +#### Used in the project +- [Phaser 3](https://github.com/photonstorm/phaser) + +#### Install + +Node.js 16 + +```sh +# clone repo +npm i # install dependencies +npm run favicon # generate favicon and meta +npm run build || npm run dev # build to dist or run dev server +``` + +
+ Task description + + ###### Задача + Реализовать _прототип игры_ в жанре “головоломка с механикой Blast”. + Описание общей механики игры + Игра состоит из игрового поля произвольного размера N*M. В каждой ячейке поля находится игровой объект (далее именуемый тайл) определенного цвета. Количество возможных вариантов цветов равно C. + + Начальное состояние поля задается случайно (вероятность цвета тайла является равновероятной). При клике на тайл сжигается (удаляется) область, состоящая из группы прилегающих тайлов того же цвета, размер группы не может быть меньше чем K (по умолчанию K=2). На месте удаленных должны образоваться пустые места. + + Далее происходит перемещение тайлов на пустые места сверху вниз. Если верхняя ячейка становится пустой, необходимо сгенерировать новый тайл и переместить его в эту ячейку. Процесс перемещения и добавление новых тайлов должен быть непрерывный и происходит до тех пор, пока поле снова не будет полностью заполнено. + + _На заполненном поле всегда можно сжечь тайлы. Если такой возможности нет, то необходимо перемешать тайлы на поле (количество перемешиваний S). Если же после перемешивания нет возможности сжечь тайлы, то такая ситуация является проигрышем для игрока._ + + Цель игры – набрать X очков за Y ходов, иначе проигрыш. Значение количества очков и ходов для выигрыша, а также формула начисления очков остается на усмотрение соискателя. + + **_Перед выполнением тестового задания советуем ознакомится со списком игр с механикой “Blast” (см. ниже) для лучшего понимания игрового процесса._** + + ###### Основное задание: + 1. **Выполнить реализацию на JavaScript + Canvas** + 1. Допустимо использование следующих фреймворков и игровых движков: **Pixi.js / Phaser.js / Cocos2d JS / CocosCreator** + 2. **Недопустимо** использование **React.js**, **Vue.js** и другие производные фреймворки для работы с DOM + 3. Использовать при разработке принципы **SOLID** + 4. Отделить логику игры и отображение + 5. Разбить игру на отдельные состояния (сцены) + 2. Реализовать анимации для перемещения и сжигания тайлов + 3. Отображение количества оставшихся ходов и набранных очков + 4. Обработать состояние выигрыша или проигрыша + 5. Использовать приложенный набор ассетов (см. ниже) + 6. Исходники выложить на **github.com / gitlab.com / bitbucket.com** + 7. **Предоставить ссылку на рабочий проект на общедоступном хостинге** (например [https://pages.github.com](https://pages.github.com) или подобные) + + ###### Дополнительные задания на выбор: + 1. Реализовать “бустер бомба” \ + _Описание:_ + При активации бустера и клика по полю, в данной клетке сжигаются тайлы в радиусе R клеток. + 2. Реализовать “бустер телепорт” + _Описание:_ + _Бустер позволяет поменять два тайла местами._ + 3. Реализовать механику “супер тайла” \ + _Описание:_ \ + Если при уничтожении размер группы тайлов больше чем L, то тогда на месте клетки, по которой был клик, появится новый тайл. По клику на него активизируется определенная логика, возможные варианты: + 1. Сжигается вся строка в которой находится тайл + 2. Сжигается весь столбец в котором находится тайл + 3. Сжигаются тайлы в радиусе R клеток + 4. Сжигается всё поле + + ###### Будет большим плюсом: + 1. _Применение модульного тестирования_ + 2. _Атомарные коммиты в репозитории_ + 3. _Использование ES6 + Babel_ + 4. _Сборка проекта gulp / webpack_ + + ###### Оценка задания: + **Необходимо выполнение основного задания, а также минимум одного дополнительного задания.** + + ###### Ассеты для игры: + * _[https://drive.google.com/file/d/1gkeMJy3u01oAisAzByzgQEYgW13RKzP2/view?usp=sharing](https://drive.google.com/file/d/1gkeMJy3u01oAisAzByzgQEYgW13RKzP2/view?usp=sharing)_ + + ###### Список игр с механикой “Blast”: + * [https://play.google.com/store/apps/details?id=com.rovio.blast](https://play.google.com/store/apps/details?id=com.rovio.blast) + * [https://play.google.com/store/apps/details?id=com.superbox.aos.jewelblast](https://play.google.com/store/apps/details?id=com.superbox.aos.jewelblast) + * [https://play.google.com/store/apps/details?id=toy.blast.pop.cubes.puzzle](https://play.google.com/store/apps/details?id=toy.blast.pop.cubes.puzzle) +
diff --git a/dist/android-chrome-192x192.png b/dist/android-chrome-192x192.png index e05319c09e915a4508922fa91f887a144d5444e4..a05bdfc1111baeaad12e78d46adf8eb33a39d330 100644 GIT binary patch delta 64 zcmbQ;$T+)^aY8jayE0QB({{#t;Fiie!uYfALZ0d$R IlXV>O0c(;Ing9R* delta 64 zcmbQ;$T+)^aY8jai-pL=W#yAMHf7ignpl~dSs58<8yHv_80@iPzBT!`y#lJ}+4S9M IlXV>O0kVM<(EtDd diff --git a/dist/android-chrome-512x512.png b/dist/android-chrome-512x512.png index e91007d56e85ee9e3f7eb9de5c84a3837b676719..435a63573d467127e106fca0a15aff5c3b5347b3 100644 GIT binary patch delta 91 zcmX?LsOI#yLQW8s2 jt#b2IGSey+rYrez+jIR^DPDj2GtVRh?11V ll2ohQ{FKbJN(LhXBO_e{GhIW|5CaqqXVZ75O}=cJ4*-j39aI1S diff --git a/dist/apple-touch-icon.png b/dist/apple-touch-icon.png index c82f95856392e75dd1345b8fefab66bfc37828fc..9bc8b42f512790ee1a7a4169c95c8ca16612f85f 100644 GIT binary patch delta 62 zcmeB3xbuGNAs=IHPJ4qU8B%z3q0F#qI2oVj>58Ge^CYj%0u)zil*q^awoCtn4hG##( znPAZKGe#H_O$Gr{I)kI@Pgyrth8F-&eP*`&L)i zsXAxX+H3E#D?n}Q)ziE)*5`ft zZ4?lyfolw_2StAy_8hI1b2`n(xmE`Cu*X@0RSz4kL$0plb2$?ne9(E`3-W#3bN6Jy zVej6xd*j)>d9oev=%wy<%qj(XFN;(__FQ6 z5$?Y8hxnsc-rbX#jRsO{6P#)=8qr2^yUIYuXFlL@U7^4KARKCY z1|XmQ@~9_`}f(;5ny};+s|85ITIF*6tNeIIySpTO!LWdTJ zvn&sF&^}ZHQgt?HSK;mW+%rV*dv`xcaw(GJBE;Q`aqCYm#@l{pPhp?KfYT_Tgo6M~ zH5irHFd+1&Zw>IH9}c!X0gw-TUVY9i&Uo^(5H+5q!RKep|ELdy0T2a1gO)H`=skT- zhZ^cmEc?qqr?Up5>TG~6Aa5LWtrC5GlLR2SyPN1G1!DT#15inF4U*(S#NDsr@(aF# z_rG(c@H+%fgS&G@=GDt41xhs-2^*FL4GKbK07Ulw&pjVAb1y|0{-X6cfeQmqla?r3 zC-C6As8IxXJ+-l=WM_NA+Dg&V9l>i_4(%G1ue-Rpumjc+JKBp~PVYWmXfI|KCM1W0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diff --git a/dist/favicon-16x16.png b/dist/favicon-16x16.png index 11c0da71dda19f28377b03a226eef45ccdb08a7f..ec43929460314d49b2afc14b56575222e0c51dfa 100644 GIT binary patch delta 64 zcmX@ed609%6DD?cCF>J1d>)%$GpRBPnp+v0SeaUC8yHv_7!R3xR8=H+OA*&7{gGXkuk*W@TumZD3$!U=WyU$UIq*MFCY*!J>2j IH-4h2+EL#~BWCzo;L F0{|%J5TF16 delta 62 zcmaDV_*8I0H9L!i;KDP_G8>yVu?w15nVMM{nrj;vSQ!|67qZ$u*_A^9RkY2&iF{var t={861:(t,e,i)=>{"use strict";i.r(e)},260:function(t){var e;e=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,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},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=1528)}([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 a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i0&&(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},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*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},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},function(t,e,i){var n=i(0),s=i(56),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,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=r},function(t,e,i){var n=i(0),s=i(24),r=i(20),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.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.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o=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){t.exports={Alpha:i(607),AlphaSingle:i(303),BlendMode:i(304),ComputedSize:i(608),Crop:i(609),Depth:i(305),Flip:i(610),GetBounds:i(611),Mask:i(309),Origin:i(632),PathFollower:i(633),Pipeline:i(167),ScrollFactor:i(312),Size:i(634),Texture:i(635),TextureCrop:i(636),Tint:i(637),ToJSON:i(176),Transform:i(313),TransformMatrix:i(25),Visible:i(314)}},function(t,e){function i(t){for(var e="",i=0;i0&&(e+="\nelse "),i>>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]},checkShaderMax:function(t,e){e&&-1!==e||(e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));for(var n=t.createShader(t.FRAGMENT_SHADER),s=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");;){var r=s.replace(/%forloop%/gi,i(e));if(t.shaderSource(n,r),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS))break;e=e/2|0}return e},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",n=0;n0&&(i+="\n\telse "),n=400&&t.status<=599&&(n=!1),this.state=s.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},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(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.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)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){var n=i(0),s=i(14),r=i(3),o=new n({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}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var 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],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],v=n[5],g=void 0===e?this:e;return g.a=u*s+c*o,g.b=u*r+c*a,g.c=d*s+f*o,g.d=d*r+f*a,g.e=p*s+v*o+h,g.f=p*r+v*a+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],v=s[4],g=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=v*r+g*a+l,n[5]=v*o+g*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+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],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height),r||(r={});var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n=i(35),s=i(13);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 r=s(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=s(r,"x",1),e.scaleY=s(r,"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 a=s(i,"angle",null);null!==a&&(e.angle=a),e.alpha=s(i,"alpha",1);var h=s(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=s(h,"x",.5),u=s(h,"y",.5);e.setOrigin(l,u)}return 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){t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},function(t,e,i){var n=i(19);t.exports=function(t,e,i,s,r){var o=s.alpha*i.alpha;if(o<=0)return!1;var a=n(i,s,r).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=o,e.save(),a.setToContext(e),e.imageSmoothingEnabled=!(!t.antialias||i.frame&&i.frame.source.scaleMode),!0}},function(t,e,i){var n,s,r,o=i(33),a=i(192),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[3]*i+s[6]*n,this.y=s[1]*e+s[4]*i+s[7]*n,this.z=s[2]*e+s[5]*i+s[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=1/(s[3]*e+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*e+s[4]*i+s[8]*n+s[12])*r,this.y=(s[1]*e+s[5]*i+s[9]*n+s[13])*r,this.z=(s[2]*e+s[6]*i+s[10]*n+s[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],v=s[10],g=s[11],y=s[12],m=s[13],x=s[14],b=1/(e*h+i*d+n*g+s[15]);return this.x=(e*r+i*l+n*f+y)*b,this.y=(e*o+i*u+n*p+m)*b,this.z=(e*a+i*c+n*v+x)*b,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n={};t.exports=n;var s=i(64),r=i(83),o=i(165),a=i(32),h=i(84),l=i(271);!function(){n._inertiaScale=4,n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,n.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=s.centre(e.vertices):e.hasOwnProperty("vertices")||(i.vertices=s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var n=a.extend(i,e);return t(n,e),n.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},n},n.nextGroup=function(t){return t?n._nextNonCollidingGroupId--:n._nextCollidingGroupId++},n.nextCategory=function(){return n._nextCategory=n._nextCategory<<1,n._nextCategory};var t=function(t,e){e=e||{},n.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||r.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t});var i=t.bounds;if(s.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(i,t.vertices,t.velocity),n.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var o=t.centerOfMass,a=t.centerOffset,u=i.max.x-i.min.x,c=i.max.y-i.min.y;o.x=-(i.min.x-t.position.x)/u,o.y=-(i.min.y-t.position.y)/c,a.x=u*o.x,a.y=c*o.y}};n.set=function(t,e,i){var s;for(s in"string"==typeof e&&(s=e,(e={})[s]=i),e)if(Object.prototype.hasOwnProperty.call(e,s))switch(i=e[s],s){case"isStatic":n.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":n.setMass(t,i);break;case"density":n.setDensity(t,i);break;case"inertia":n.setInertia(t,i);break;case"vertices":n.setVertices(t,i);break;case"position":n.setPosition(t,i);break;case"angle":n.setAngle(t,i);break;case"velocity":n.setVelocity(t,i);break;case"angularVelocity":n.setAngularVelocity(t,i);break;case"parts":n.setParts(t,i);break;case"centre":n.setCentre(t,i);break;default:t[s]=i}},n.setStatic=function(t,e){for(var i=0;i0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(0),s=i(307),r=i(172),o=i(56),a=i(173),h=i(3),l=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.type=o.LINE,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 h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),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=l},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){var s=[];n.forEach((function(t){t&&s.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var r=0;r=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(0),s=i(175),r=i(9),o=i(374),a=i(2),h=i(69),l=i(91),u=i(141),c=i(12),d=i(375),f=new n({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,n=i.gl;this.name=a(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=n,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.topology=a(t,"topology",n.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.currentUnit=0,this.forceZero=a(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1},boot:function(){var t,e=this.gl,i=this.config,n=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var s=this.renderTargets,r=a(i,"renderTarget",!1);"boolean"==typeof r&&r&&(r=1);var c=n.width,d=n.height;if("number"==typeof r)for(t=0;ty&&(y=g[t].vertexSize);var m=a(i,"batchSize",n.config.batchSize);this.vertexCapacity=6*m;var x=new ArrayBuffer(this.vertexCapacity*y);this.vertexData=x,this.bytes=new Uint8Array(x),this.vertexViewF32=new Float32Array(x),this.vertexViewU32=new Uint32Array(x);var b=a(i,"vertices",null);for(b?(this.vertexViewF32.set(b),this.vertexBuffer=n.createVertexBuffer(x,e.STATIC_DRAW)):this.vertexBuffer=n.createVertexBuffer(x.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=g.length-1;t>=0;t--)g[t].rebind();this.hasBooted=!0,n.on(l.RESIZE,this.resize,this),n.on(l.PRE_RENDER,this.onPreRender,this),n.on(l.RENDER,this.onRender,this),n.on(l.POST_RENDER,this.onPostRender,this),this.emit(o.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e){var i=this.renderer;return t===this.currentShader&&i.currentProgram===this.currentShader.program||(this.flush(),i.resetTextures(),this.setVertexBuffer()&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t),this},getShaderByName:function(t){for(var e=this.shaders,i=0;ithis.vertexCapacity},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,n=0;n=0;i--){var n=e[i].rebind();t&&n!==t||(this.currentShader=n)}return this.emit(o.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(){var t=this.gl,e=this.vertexBuffer;return t.getParameter(t.ARRAY_BUFFER_BINDING)!==e&&(t.bindBuffer(t.ARRAY_BUFFER,e),!0)},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(o.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,n=this.currentShader.vertexSize;this.active&&(this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*n)),e.drawArrays(this.topology,0,i)),this.vertexCount=0,this.emit(o.AFTER_FLUSH,this,t),this.onAfterFlush(t)}return this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(t,e,i,n,s,r,o){var a=this.vertexViewF32,h=this.vertexViewU32,l=this.vertexCount*this.currentShader.vertexComponentCount-1;a[++l]=t,a[++l]=e,a[++l]=i,a[++l]=n,a[++l]=s,a[++l]=r,h[++l]=o,this.vertexCount++},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,v,g,y,m,x){void 0===x&&(x=this.currentUnit);var b=!1;return this.shouldFlush(6)&&(this.flush(),b=!0,x=this.setTexture2D(m)),this.batchVert(e,i,l,u,x,y,f),this.batchVert(n,s,l,d,x,y,v),this.batchVert(r,o,c,d,x,y,g),this.batchVert(e,i,l,u,x,y,f),this.batchVert(r,o,c,d,x,y,g),this.batchVert(a,h,c,u,x,y,p),this.onBatch(t),b},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,v,g){void 0===g&&(g=this.currentUnit);var y=!1;return this.shouldFlush(3)&&(this.flush(),y=!0,g=this.setTexture2D(v)),this.batchVert(e,i,a,h,g,p,c),this.batchVert(n,s,a,u,g,p,d),this.batchVert(r,o,l,u,g,p,f),this.onBatch(t),y},drawFillRect:function(t,e,i,n,s,r,o,a){void 0===o&&(o=this.renderer.whiteTexture.glTexture),void 0===a&&(a=!0),t=Math.floor(t),e=Math.floor(e);var h=Math.floor(t+i),l=Math.floor(e+n),u=this.setTexture2D(o),d=c.getTintAppendFloatAlphaAndSwap(s,r),f=0,p=1;a&&(f=1,p=0),this.batchQuad(null,t,e,t,l,h,l,h,e,0,f,1,p,d,d,d,d,0,o,u)},setTexture2D:function(t){return void 0===t&&(t=this.renderer.whiteTexture.glTexture),this.currentUnit=this.renderer.setTexture2D(t),this.currentUnit},bindTexture:function(t,e){void 0===e&&(e=0);var i=this.gl;return i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,t),this},bindRenderTarget:function(t,e){return this.bindTexture(t.texture,e)},setTime:function(t){return this.set1f(t,this.game.loop.getDuration()),this},set1f:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1f(t,e),this},set2f:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.set2f(t,e,i),this},set3f:function(t,e,i,n,s){return void 0===s&&(s=this.currentShader),s.set3f(t,e,i,n),this},set4f:function(t,e,i,n,s,r){return void 0===r&&(r=this.currentShader),r.set4f(t,e,i,n,s),this},set1fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1fv(t,e),this},set2fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2fv(t,e),this},set3fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3fv(t,e),this},set4fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4fv(t,e),this},set1iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1iv(t,e),this},set2iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2iv(t,e),this},set3iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3iv(t,e),this},set4iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4iv(t,e),this},set1i:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1i(t,e),this},set2i:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.set2i(t,e,i),this},set3i:function(t,e,i,n,s){return void 0===s&&(s=this.currentShader),s.set3i(t,e,i,n),this},set4i:function(t,e,i,n,s,r){return void 0===r&&(r=this.currentShader),r.set4i(t,e,i,n,s),this},setMatrix2fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix2fv(t,e,i),this},setMatrix3fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix3fv(t,e,i),this},setMatrix4fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix4fv(t,e,i),this},destroy:function(){var t;this.emit(o.DESTROY,this);var e=this.shaders;for(t=0;t80*i){n=h=t[0],a=l=t[1];for(var b=i;bh&&(h=u),f>l&&(l=f);p=0!==(p=Math.max(h-n,l-a))?1/p:0}return o(m,x,i,n,a,p),x}function s(t,e,i,n,s){var r,o;if(s===O(t,e,i,n)>0)for(r=e;r=e;r-=n)o=_(r,t[r],t[r+1],o);return o&&x(o,o.next)&&(A(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!x(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(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=p(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,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var f,v,g=t;t.prev!==t.next;)if(f=t.prev,v=t.next,c?h(t,n,s,c):a(t))e.push(f.i/i),e.push(t.i/i),e.push(v.i/i),A(t),t=v.next,g=v.next;else if((t=v)===g){d?1===d?o(t=l(r(t),e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(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)&&m(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,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=p(a,h,e,i,n),d=p(l,u,e,i,n),f=t.prevZ,v=t.nextZ;f&&f.z>=c&&v&&v.z<=d;){if(f!==t.prev&&f!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&m(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&m(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,o=n.next.next;!x(s,o)&&b(s,n,n.next,o)&&E(s,o)&&E(o,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(o.i/i),A(n),A(n.next),n=t=o),n=n.next}while(n!==t);return r(n)}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&y(h,l)){var u=S(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.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,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x||n.x===i.x&&f(i,n)))&&(i=n,d=h)),n=n.next}while(n!==l);return i}(t,e),e){var i=S(e,t);r(e,e.next),r(i,i.next)}}function f(t,e){return m(t.prev,t,e.prev)<0&&m(e.next,t,t.next)<0}function p(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 v(t){var e=t,i=t;do{(e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function y(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&&b(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(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)&&(m(t.prev,t,e.prev)||m(t,e.prev,e))||x(t,e)&&m(t.prev,t,t.next)>0&&m(e.prev,e,e.next)>0)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,i,n){var s=w(m(t,e,i)),r=w(m(t,e,n)),o=w(m(i,n,t)),a=w(m(i,n,e));return s!==r&&o!==a||!(0!==s||!T(t,i,e))||!(0!==r||!T(t,n,e))||!(0!==o||!T(i,t,n))||!(0!==a||!T(i,e,n))}function T(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function w(t){return t>0?1:t<0?-1:0}function E(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function S(t,e){var i=new C(t.i,t.x,t.y),n=new C(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 _(t,e,i,n){var s=new C(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 C(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 O(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i},t.exports=n},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e,i){var n=i(0),s=i(21),r=i(23),o=i(8),a=i(2),h=i(6),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw console.warn("Invalid JSON: "+this.key),this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var s=0;s0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort((function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y})),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n=i(0),s=i(66),r=i(300),o=i(301),a=i(56),h=i(170),l=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,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 o(this,t,e,i)},getRandomPoint:function(t){return h(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=l},function(t,e){t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},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(39),r=1e-6,o=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new o(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=s,g[5]=r,g[6]=o,g[7]=a,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=f,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=a.fromQuat(i).val,s=e.x,r=e.y,o=e.z;return this.setValues(n[0]*s,n[1]*s,n[2]*s,0,n[4]*r,n[5]*r,n[6]*r,0,n[8]*o,n[9]*o,n[10]*o,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15],y=e*o-i*r,m=e*a-n*r,x=e*h-s*r,b=i*a-n*o,T=i*h-s*o,w=n*h-s*a,E=l*p-u*f,S=l*v-c*f,_=l*g-d*f,A=u*v-c*p,C=u*g-d*p,O=c*g-d*v,P=y*O-m*C+x*A+b*_-T*S+w*E;return P?(P=1/P,this.setValues((o*O-a*C+h*A)*P,(n*C-i*O-s*A)*P,(p*w-v*T+g*b)*P,(c*T-u*w-d*b)*P,(a*_-r*O-h*S)*P,(e*O-n*_+s*S)*P,(v*x-f*w-g*m)*P,(l*w-c*x+d*m)*P,(r*C-o*_+h*E)*P,(i*_-e*C-s*E)*P,(f*T-p*x+g*y)*P,(u*x-l*T-d*y)*P,(o*S-r*A-a*E)*P,(e*A-i*S+n*E)*P,(p*m-f*b-v*y)*P,(l*b-u*m+c*y)*P)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return this.setValues(o*(c*g-d*v)-u*(a*g-h*v)+p*(a*d-h*c),-(i*(c*g-d*v)-u*(n*g-s*v)+p*(n*d-s*c)),i*(a*g-h*v)-o*(n*g-s*v)+p*(n*h-s*a),-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),-(r*(c*g-d*v)-l*(a*g-h*v)+f*(a*d-h*c)),e*(c*g-d*v)-l*(n*g-s*v)+f*(n*d-s*c),-(e*(a*g-h*v)-r*(n*g-s*v)+f*(n*h-s*a)),e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),r*(u*g-d*p)-l*(o*g-h*p)+f*(o*d-h*u),-(e*(u*g-d*p)-l*(i*g-s*p)+f*(i*d-s*u)),e*(o*g-h*p)-r*(i*g-s*p)+f*(i*h-s*o),-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),-(r*(u*v-c*p)-l*(o*v-a*p)+f*(o*c-a*u)),e*(u*v-c*p)-l*(i*v-n*p)+f*(i*c-n*u),-(e*(o*v-a*p)-r*(i*v-n*p)+f*(i*a-n*o)),e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return(e*o-i*r)*(c*g-d*v)-(e*a-n*r)*(u*g-d*p)+(e*h-s*r)*(u*v-c*p)+(i*a-n*o)*(l*g-d*f)-(i*h-s*o)*(l*v-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],v=e[13],g=e[14],y=e[15],m=t.val,x=m[0],b=m[1],T=m[2],w=m[3];return e[0]=x*i+b*o+T*u+w*p,e[1]=x*n+b*a+T*c+w*v,e[2]=x*s+b*h+T*d+w*g,e[3]=x*r+b*l+T*f+w*y,x=m[4],b=m[5],T=m[6],w=m[7],e[4]=x*i+b*o+T*u+w*p,e[5]=x*n+b*a+T*c+w*v,e[6]=x*s+b*h+T*d+w*g,e[7]=x*r+b*l+T*f+w*y,x=m[8],b=m[9],T=m[10],w=m[11],e[8]=x*i+b*o+T*u+w*p,e[9]=x*n+b*a+T*c+w*v,e[10]=x*s+b*h+T*d+w*g,e[11]=x*r+b*l+T*f+w*y,x=m[12],b=m[13],T=m[14],w=m[15],e[12]=x*i+b*o+T*u+w*p,e[13]=x*n+b*a+T*c+w*v,e[14]=x*s+b*h+T*d+w*g,e[15]=x*r+b*l+T*f+w*y,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,s=i[0],r=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],f=i[6],p=i[10],v=i[14],g=i[3],y=i[7],m=i[11],x=i[15],b=n[0],T=n[4],w=n[8],E=n[12],S=n[1],_=n[5],A=n[9],C=n[13],O=n[2],P=n[6],R=n[10],M=n[14],L=n[3],k=n[7],D=n[11],F=n[15];return this.setValues(s*b+r*S+o*O+a*L,h*b+l*S+u*O+c*L,d*b+f*S+p*O+v*L,g*b+y*S+m*O+x*L,s*T+r*_+o*P+a*k,h*T+l*_+u*P+c*k,d*T+f*_+p*P+v*k,g*T+y*_+m*P+x*k,s*w+r*A+o*R+a*D,h*w+l*A+u*R+c*D,d*w+f*A+p*R+v*D,g*w+y*A+m*R+x*D,s*E+r*C+o*M+a*F,h*E+l*C+u*M+c*F,d*E+f*C+p*M+v*F,g*E+y*C+m*M+x*F)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;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},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;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},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.setValues(h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,o=e.z,a=Math.sqrt(n*n+s*s+o*o);if(Math.abs(a)=t.length)){for(var i=t.length-1,n=t[e],s=e;ss||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){function i(t,e){return String(t).localeCompare(e)}function n(t,e,i,n){var s,r,o,a,h,l=t.length,u=0,c=2*i;for(s=0;sl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a=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){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e,i){var n=i(29),s=i(0),r=i(11),o=i(502),a=new s({Mixins:[r.Alpha,r.Flip,r.Visible],initialize:function(t,e,i,n,s,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=s,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==o?o:s,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new o),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===n.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===n.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===n.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===n.HEXAGONAL){var e=this.layer.hexSideLength,i=(this.baseHeight-e)/2+e;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*i}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=a},function(t,e,i){var n={};t.exports=n;var s=i(64),r=i(32),o=i(41),a=i(84),h=i(83),l=i(1393);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(b)1?(d=o.create(r.extend({parts:f.slice(0)},a)),o.setPosition(d,{x:t,y:e}),d):f[0]},n.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i=0;){var h=e[o];-1!==(r=t.indexOf(h))&&(n(t,r),a.push(h),i&&i.call(s,h)),o--}return a}},function(t,e,i){var n=i(0),s=i(199),r=i(10),o=i(3),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++){var s=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(s))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=1e-4,n=t-i,s=t+i;return n<0&&(n=0),s>1&&(s=1),this.getPoint(n,this._tmpVec2A),this.getPoint(s,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(968),COMPLETE:i(969),FILE_COMPLETE:i(970),FILE_KEY_COMPLETE:i(971),FILE_LOAD_ERROR:i(972),FILE_LOAD:i(973),FILE_PROGRESS:i(974),POST_PROCESS:i(975),PROGRESS:i(976),START:i(977)}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(c-l)*(o-s)-(u-h)*(a-r);if(0===d)return!1;var f=((u-h)*(r-l)-(c-l)*(s-h))/d,p=((o-s)*(r-l)-(a-r)*(s-h))/d;return f>=0&&f<=1&&p>=0&&p<=1&&(i.x=s+f*(o-s),i.y=r+f*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(18);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},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,i){var n=i(0),s=i(315),r=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(s.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n2?(i.iOS=!0,i.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/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);return(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),"function"!=typeof importScripts&&(void 0!==window.cordova&&(i.cordova=!0),void 0!==window.ejecta&&(i.ejecta=!0)),void 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),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(807))},function(t,e,i){t.exports={ADD:i(861),ERROR:i(862),LOAD:i(863),READY:i(864),REMOVE:i(865)}},function(t,e){t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},function(t,e,i){var n=i(0),s=i(59),r=i(2),o=i(878),a=i(879),h=i(25),l=i(12),u=i(107),c=i(58),d=new n({Extends:c,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",o);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){c.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,u=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,v=o.cutWidth,g=o.cutHeight,y=o.customPivot,m=t.displayOriginX,x=t.displayOriginY,b=-m+f,T=-x+p;if(t.isCropped){var w=t._crop;w.flipX===t.flipX&&w.flipY===t.flipY||o.updateCropUVs(w,t.flipX,t.flipY),h=w.u0,u=w.v0,c=w.u1,d=w.v1,v=w.width,g=w.height,b=-m+(f=w.x),T=-x+(p=w.y)}var E=1,S=1;t.flipX&&(y||(b+=-o.realWidth+2*m),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(y||(T+=-o.realHeight+2*x),S=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*E,t.scaleY*S),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY),n.multiply(s,r);var _=b+v,A=T+g,C=e.roundPixels,O=r.getXRound(b,T,C),P=r.getYRound(b,T,C),R=r.getXRound(b,A,C),M=r.getYRound(b,A,C),L=r.getXRound(_,A,C),k=r.getYRound(_,A,C),D=r.getXRound(_,T,C),F=r.getYRound(_,T,C),I=l.getTintAppendFloatAlpha,B=e.alpha,N=I(t.tintTopLeft,B*t._alphaTL),Y=I(t.tintTopRight,B*t._alphaTR),X=I(t.tintBottomLeft,B*t._alphaBL),U=I(t.tintBottomRight,B*t._alphaBR);this.shouldFlush(6)&&this.flush();var z=this.setGameObject(t,o);this.manager.preBatch(t),this.batchQuad(t,O,P,R,M,L,k,D,F,h,u,c,d,N,Y,X,U,t.tintFill,a,z),this.manager.postBatch(t)},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,v,g,y,m,x,b,T,w,E,S,_,A,C,O,P,R,M){this.manager.set(this,t);var L=this._tempMatrix1,k=this._tempMatrix2,D=this._tempMatrix3,F=y/i+A,I=m/n+C,B=(y+x)/i+A,N=(m+b)/n+C,Y=o,X=a,U=-v,z=-g;if(t.isCropped){var G=t._crop,W=G.width,V=G.height;Y=W,X=V,o=W,a=V;var j=y=G.x,H=m=G.y;c&&(j=x-G.x-W),d&&(H=b-G.y-V),F=j/i+A,I=H/n+C,B=(j+W)/i+A,N=(H+V)/n+C,U=-v+y,z=-g+m}c&&(Y*=-1,U+=o),(d^=!R&&e.isRenderTexture?1:0)&&(X*=-1,z+=a);var K=U+Y,q=z+X;k.applyITRS(s,r,u,h,l),L.copyFrom(O.matrix),P?(L.multiplyWithOffset(P,-O.scrollX*f,-O.scrollY*p),k.e=s,k.f=r):(k.e-=O.scrollX*f,k.f-=O.scrollY*p),L.multiply(k,D);var Z=O.roundPixels,J=D.getXRound(U,z,Z),Q=D.getYRound(U,z,Z),$=D.getXRound(U,q,Z),tt=D.getYRound(U,q,Z),et=D.getXRound(K,q,Z),it=D.getYRound(K,q,Z),nt=D.getXRound(K,z,Z),st=D.getYRound(K,z,Z);void 0===M&&(M=this.renderer.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,J,Q,$,tt,et,it,nt,st,F,I,B,N,T,w,E,S,_,e,M),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,n,s,r,o){this.manager.set(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),v=h.getY(e,c),g=h.getX(u,c),y=h.getY(u,c),m=h.getX(u,i),x=h.getY(u,i),b=this.renderer.setTextureSource(t.source);n=l.getTintAppendFloatAlpha(n,s),this.batchQuad(null,d,f,p,v,g,y,m,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,b)},batchFillRect:function(t,e,i,n,s,r){this.renderer.pipelines.set(this);var o=this.calcMatrix;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),v=o.getX(a,e),g=o.getY(a,e),y=this.fillTint;this.batchQuad(null,l,u,c,d,f,p,v,g,0,0,1,1,y.TL,y.TR,y.BL,y.BR,2)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),v=this.fillTint;this.batchTri(null,l,u,c,d,f,p,0,0,1,1,v.TL,v.TR,v.BL,2)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&X[4]?this.batchQuad(null,k,D,P,R,X[0],X[1],X[2],X[3],0,0,1,1,I,B,N,Y,2):(U[0]=k,U[1]=D,U[2]=P,U[3]=R,U[4]=1),h&&U[4]?this.batchQuad(null,C,O,M,L,U[0],U[1],U[2],U[3],0,0,1,1,I,B,N,Y,2):(X[0]=C,X[1]=O,X[2]=M,X[3]=L,X[4]=1)}}});t.exports=d},function(t,e,i){var n=i(0),s=i(18),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+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()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),v=l+(i=s(i,0,f)),g=n=s(n,0,d-e),y=r=s(r,0,f-i),m=this.data;if(m.trim){var x=m.spriteSourceSize,b=e+(n=s(n,0,u-e)),T=i+(r=s(r,0,c-i));if(x.rb||x.y>T)p=0,v=0,g=0,y=0;else{var w=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,b)-w,_=Math.min(x.b,T)-E;g=S,y=_,p=o?h+(u-(w-x.x)-S):h+(w-x.x),v=a?l+(c-(E-x.y)-_):l+(E-x.y),e=w,i=E,n=S,r=_}}else o&&(p=h+(u-e-n)),a&&(v=l+(c-i-r));var A=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/A),t.v0=Math.max(0,v/C),t.u1=Math.min(1,(p+g)/A),t.v1=Math.min(1,(v+y)/C),t.x=e,t.y=i,t.cx=p,t.cy=v,t.cw=g,t.ch=y,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(208),s=i(0),r=i(1),o=i(79),a=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,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o(this.list,e),this):this},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.GetFirst(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)},moveAbove:function(t,e){return n.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return n.MoveBelow(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;n0?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.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(0),s=i(112),r=i(445),o=i(446),a=i(56),h=i(180),l=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.type=a.ELLIPSE,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 o(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.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=l},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,i){var n=i(275),s=i(0),r=i(75),o=i(9),a=i(207),h=i(2),l=i(6),u=i(7),c=i(437),d=i(149),f=i(73),p=new s({Extends:o,initialize:function(t,e,i){o.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?u(e[0])&&(i=e,e=null):u(e)&&(i=e,e=null),this.scene=t,this.children=new d,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",f),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return o.addToDisplayList(this.scene.sys.displayList),o.addToUpdateList(),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=0&&y>=0&&g+y<1}},function(t,e,i){var n=i(0),s=i(10),r=i(3);function o(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}var a=new n({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new s,this._inCenter=new r},getInCenter:function(t){void 0===t&&(t=!0);var e,i,n,s,r,a,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,n=l.x,s=l.y,r=u.x,a=u.y):(e=h.vx,i=h.vy,n=l.vx,s=l.vy,r=u.vx,a=u.vy);var c=o(r,a,n,s),d=o(e,i,r,a),f=o(n,s,e,i),p=c+d+f;return this._inCenter.set((e*c+n*d+r*f)/p,(i*c+s*d+a*f)/p)},contains:function(t,e,i){var n=this.vertex1,s=this.vertex2,r=this.vertex3,o=n.vx,a=n.vy,h=s.vx,l=s.vy,u=r.vx,c=r.vy;if(i){var d=i.a,f=i.b,p=i.c,v=i.d,g=i.e,y=i.f;o=n.vx*d+n.vy*p+g,a=n.vx*f+n.vy*v+y,h=s.vx*d+s.vy*p+g,l=s.vx*f+s.vy*v+y,u=r.vx*d+r.vy*p+g,c=r.vx*f+r.vy*v+y}var m=u-o,x=c-a,b=h-o,T=l-a,w=t-o,E=e-a,S=m*m+x*x,_=m*b+x*T,A=m*w+x*E,C=b*b+T*T,O=b*w+T*E,P=S*C-_*_,R=0===P?0:1/P,M=(C*A-_*O)*R,L=(S*O-_*A)*R;return M>=0&&L>=0&&M+L<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,n=this.vertex3,s=(i.vx-e.vx)*(n.vy-e.vy)-(i.vy-e.vy)*(n.vx-e.vx);return t<=0?s>=0:s<0},load:function(t,e,i,n,s){return i=this.vertex1.load(t,e,i,n,s),i=this.vertex2.load(t,e,i,n,s),i=this.vertex3.load(t,e,i,n,s)},transformCoordinatesLocal:function(t,e,i,n){return this.vertex1.transformCoordinatesLocal(t,e,i,n),this.vertex2.transformCoordinatesLocal(t,e,i,n),this.vertex3.transformCoordinatesLocal(t,e,i,n),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,n=this.bounds;return n.x=Math.min(t.vx,e.vx,i.vx),n.y=Math.min(t.vy,e.vy,i.vy),n.width=Math.max(t.vx,e.vx,i.vx)-n.x,n.height=Math.max(t.vy,e.vy,i.vy)-n.y,this},isInView:function(t,e,i,n,s,r,o,a,h,l,u){var c=this.vertex1.update(s,r,o,a,h,l,u,n),d=this.vertex2.update(s,r,o,a,h,l,u,n),f=this.vertex3.update(s,r,o,a,h,l,u,n);if(c.ta<=0&&d.ta<=0&&f.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var p=this.bounds;p.x=Math.min(c.tx,d.tx,f.tx),p.y=Math.min(c.ty,d.ty,f.ty),p.width=Math.max(c.tx,d.tx,f.tx)-p.x,p.height=Math.max(c.ty,d.ty,f.ty)-p.y;var v=t.x+t.width,g=t.y+t.height;return!(p.width<=0||p.height<=0||t.width<=0||t.height<=0||p.rightv||p.y>g)},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,n=this.vertex2,s=this.vertex3;return i.x+=t,i.y+=e,n.x+=t,n.y+=e,s.x+=t,s.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(12),r=i(39),o=new n({Extends:r,initialize:function(t,e,i,n,s,o,a,h,l,u){void 0===o&&(o=16777215),void 0===a&&(a=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),r.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=n,this.v=s,this.color=o,this.alpha=a,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,n){var s=this.x,r=this.y,o=this.z,a=t.val,h=s*a[0]+r*a[4]+o*a[8]+a[12],l=s*a[1]+r*a[5]+o*a[9]+a[13],u=s*a[2]+r*a[6]+o*a[10]+a[14],c=s*a[3]+r*a[7]+o*a[11]+a[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=n<=0?u/c:-u/c},update:function(t,e,i,n,s,r,o,a){var h=this.vx*t+this.vy*i+s,l=this.vx*e+this.vy*n+r;return o&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*a,this},load:function(t,e,i,n,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=n,t[++i]=r,e[++i]=s.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(166),r=i(32),o=i(84),a=i(41);n.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},t)},n.setModified=function(t,e,i,r){if(s.trigger(t,"compositeModified",t),t.isModified=e,i&&t.parent&&n.setModified(t.parent,e,i,r),r)for(var o=0;o=0&&t=0&&e=this.firstgid&&t0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}},n.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+t.pointA.x,y:(t.bodyA?t.bodyA.position.y:0)+t.pointA.y}},n.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+t.pointB.x,y:(t.bodyB?t.bodyB.position.y:0)+t.pointB.y}}},function(t,e,i){var n=i(35),s=i(65),r=i(66),o=i(0),a=i(11),h=i(15),l=i(10),u=i(57),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,r){void 0===s&&(s=1),void 0===r&&(r=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=r,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},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,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var n=this.input;return i&&n&&!n.customHitArea&&(n.hitArea.width=t,n.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},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){t.exports={ADD_ANIMATION:i(724),ANIMATION_COMPLETE:i(725),ANIMATION_COMPLETE_KEY:i(726),ANIMATION_REPEAT:i(727),ANIMATION_RESTART:i(728),ANIMATION_START:i(729),ANIMATION_STOP:i(730),ANIMATION_UPDATE:i(731),PAUSE_ALL:i(732),REMOVE_ANIMATION:i(733),RESUME_ALL:i(734)}},function(t,e,i){var n=i(0),s=i(11),r=i(36),o=i(9),a=i(37),h=i(10),l=i(25),u=i(187),c=i(3),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],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),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[]},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.y,p=f+d,v=this.x,g=v+c,y=this.culledObjects,m=t.length;o=1/o,y.length=0;for(var x=0;xv&&E*i+S*s+af&&E*n+S*r+hs&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(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,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},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){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;return this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras,this.updateSystem(),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,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=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},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=d},function(t,e,i){var n=i(334),s=i(335),r=i(336),o=i(337),a=i(338),h=i(339),l=i(340),u=i(341),c=i(342),d=i(343),f=i(344),p=i(345);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){var n,s=i(105),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){t.exports=function(t,e){return Math.random()*(e-t)+t}},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,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=i(0),s=i(91),r=new n({initialize:function(t,e,i,n,s,r,o){void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=!0),void 0===o&&(o=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=n,this.minFilter=s,this.autoClear=r,this.autoResize=!1,this.resize(e,i),o&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(s.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(s.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,n=e*this.scale;if(i!==this.width||n!==this.height){var s=this.renderer;s.deleteFramebuffer(this.framebuffer),s.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=s.createTextureFromSource(null,t,e,this.minFilter),this.framebuffer=s.createFramebuffer(t,e,this.texture,!1),this.width=t,this.height=e}return this},bind:function(t,e,i){if(void 0===t&&(t=!1),t&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear){var n=this.renderer.gl;n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)}},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(s.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=r},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(77),r=i(9),o=i(70),a=i(22),h=i(1),l=i(207),u=i(428),c=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return l(this.sounds,"key",t)},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,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(o.COMPLETE,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)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=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(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.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.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(n,s){n&&!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(o.GLOBAL_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(o.GLOBAL_DETUNE,this,t)}}});t.exports=c},function(t,e,i){var n=i(0),s=i(9),r=i(70),o=i(17),a=i(1),h=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,pan:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name||(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),1):(t=o(!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,pan: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]=o(!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=o(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,this.pan=this.currentConfig.pan},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(r.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=h},function(t,e,i){var n=i(209),s=i(435);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-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;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 to||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(6),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1323),ANY_KEY_UP:i(1324),COMBO_MATCH:i(1325),DOWN:i(1326),KEY_DOWN:i(1327),KEY_UP:i(1328),UP:i(1329)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(243),r=i(73),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Pushable,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){var n=i(119);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return r?-1===r.index?i?r:null:r:null}return null}},function(t,e){t.exports=function(t,e,i,n){var s,r,o,a=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),f=Math.max(0,e.top),p=Math.min(l,e.bottom);if(0===i)for(r=f;r=c;s--)(o=a[r][s])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(2===i)for(r=p;r>=f;r--)for(s=c;a[r]&&s=f;r--)for(s=d;a[r]&&s>=c;s--)(o=a[r][s])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);return u.tilesDrawn=n.length,u.tilesTotal=h*l,n}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var s=e.x+n(e,"startx",0)*t.tilewidth+n(e,"offsetx",0),r=e.y+n(e,"starty",0)*t.tileheight+n(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+s,y:i.y+r}}},function(t,e){t.exports=function(t,e,i){return t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,n,s,r,o,a){return t[e](i,n,s,r,o,a)}:function(){return t[e]}:"function"==typeof i?i:function(){return i}}},function(t,e,i){var n=i(265),s=i(13),r=i(99),o=i(80),a=i(162),h=i(583),l=i(263),u=i(6),c=i(264),d=i(266),f=i(268);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:l(e),v=h(e),g=a(e,"delay",i.delay),y=a(e,"duration",i.duration),m=u(e,"easeParams",i.easeParams),x=o(u(e,"ease",i.ease),m),b=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),E=r(e,"yoyo",i.yoyo),S=r(e,"flipX",i.flipX),_=r(e,"flipY",i.flipY),A=[],C=0;Cn.getTotalFrames()&&(h=0);var l=n.frames[h];0!==h||this.forward||(l=n.getLastFrame()),this.currentFrame=l}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,s="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===s)return n;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(r>0)return this.playAfterDelay(t,r)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter&&this.handleStart(),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim,n=this.currentFrame,s=this.parent,r=n.textureFrame;s.emit(t,i,n,s,r),e&&s.emit(e+i.key,i,n,s,r)},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(o.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):n},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var n=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),n++}while(this.isPlaying&&this.accumulator>this.nextTick&&n<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(o.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new a(this,e,t),this.anims||(this.anims=new s),this.anims.set(e,i))),i},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(o.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=h},function(t,e,i){var n={};t.exports=n;var s=i(166);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n={};t.exports=n;var s=i(32);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0){i||(i={}),n=e.split(" ");for(var l=0;l0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e=this.postPipelines,i=[],n=0;n=0;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),r(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=o},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(4);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,i){var n=i(4);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,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(130),s=i(4);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(67),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=i(18),s=i(0),r=i(132),o=i(318),a=i(319),h=i(6),l=i(320),u=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,n){null===i&&null===n?(t.frameRate=24,t.duration=24/e*1e3):i&&null===n?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=n,t.duration=e/n*1e3),t.msPerFrame=1e3/t.frameRate},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&&t0){r.isLast=!0,r.nextFrame=c[0],c[0].prevFrame=r;var m=1/(c.length-1);for(o=0;o0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),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){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},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,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t=(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(327),s=i(189),r=i(331),o=i(332);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e,i){var n=i(103);function s(t,e,i,n){var s=(t+6*e)%6,r=Math.min(s,4-s,1);return Math.round(255*(n-n*i*Math.max(0,r)))}t.exports=function(t,e,i,r){void 0===e&&(e=1),void 0===i&&(i=1);var o=s(5,t,e,i),a=s(3,t,e,i),h=s(1,t,e,i);return r?r.setTo?r.setTo(o,a,h,r.alpha,!1):(r.r=o,r.g=a,r.b=h,r.color=n(o,a,h),r):{r:o,g:a,b:h,color:n(o,a,h)}}},function(t,e,i){var n=i(38),s=i(330);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){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e,i){var n=i(105),s=i(136),r=i(31),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),n=i.getContext("2d").createImageData(1,1);return a=n.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(o.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},function(t,e){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;i0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=s.START,i.active=!0,i.visible=!0,e.emit(o.START,this),e.emit(o.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(o.TRANSITION_INIT),e.off(o.TRANSITION_START),e.off(o.TRANSITION_COMPLETE),e.off(o.TRANSITION_OUT),i.status=s.SHUTDOWN,i.active=!1,i.visible=!1,this.renderer===l.WEBGL&&this.renderer.resetTextures(!0),e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=s.DESTROYED,e.active=!1,e.visible=!1,t.emit(o.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],n=0;n0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(208),s=i(35),r=i(0),o=i(11),a=i(75),h=i(15),l=i(10),u=i(1052),c=i(441),d=i(3),f=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,s=!1;t.setEmpty();for(var r=0;r-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?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.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},function(t,e,i){var n=i(148),s=i(0),r=i(1057),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(133),s=i(0),r=i(217),o=i(303),a=i(304),h=i(305),l=i(309),u=i(167),c=i(312),d=i(313),f=i(314),p=i(111),v=i(15),g=i(2),y=i(6),m=i(14),x=i(1063),b=new s({Extends:v,Mixins:[o,a,h,l,u,d,f,c,x],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(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},fillGradientStyle:function(t,e,i,n,s,o,a,h){return void 0===s&&(s=1),void 0===o&&(o=s),void 0===a&&(a=s),void 0===h&&(h=s),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,o,a,h,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),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},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke: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,m.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,m.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,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,o=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(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=g(s,"tl",20),o=g(s,"tr",20),a=g(s,"bl",20),h=g(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-m.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,m.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,m.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-m.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=g(s,"tl",20),o=g(s,"tr",20),a=g(s,"bl",20),h=g(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),this.arc(t+i-o,e+o,o,-m.TAU,0),this.lineTo(t+i,e+n-h),this.moveTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,m.TAU),this.lineTo(t+a,e+n),this.moveTo(t+a,e+n),this.arc(t+a,e+n-a,a,m.TAU,Math.PI),this.lineTo(t,e+r),this.moveTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-m.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),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},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-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,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),b.TargetCamera.setScene(this.scene),b.TargetCamera.setViewport(0,0,e,i),b.TargetCamera.scrollX=this.x,b.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(o,this,b.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});b.TargetCamera=new n,t.exports=b},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,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(4);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(35),s=i(0),r=i(11),o=i(176),a=i(101),h=i(9),l=i(75),u=i(110),c=i(1071),d=i(20),f=i(79),p=new s({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},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.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},destroy:function(){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var t=this.list.length;t--;)this.list[t].destroy();this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=p},function(t,e,i){var n=i(0),s=i(11),r=i(15),o=i(450),a=i(110),h=i(452),l=i(1075),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;ss.width&&(t=s.width-i.cutX),i.cutY+e>s.height&&(e=s.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.frame,a=this.camera,h=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=o.cutWidth),void 0===r&&(r=o.cutHeight);var l=(t>>16&255)/255,u=(t>>8&255)/255,c=(255&t)/255,d=this.renderTarget;if(a.preRender(),d){d.bind(!0);var f=this.pipeline;f.manager.set(f);var p=d.width,g=d.height,y=h.width/p,m=h.height/g;f.drawFillRect(i*y,n*m,s*y,r*m,v.getTintFromFloats(c,u,l,1),e),d.unbind(!0)}else{var x=this.context;h.setContext(x),x.fillStyle="rgba("+l+","+u+","+c+","+e+")",x.fillRect(i+o.cutX,n+o.cutY,s,r),h.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.renderTarget;if(t)t.clear();else{var e=this.context;e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),e.restore()}this.dirty=!1}return this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i,1,16777215),this._eraseMode=!1,this},draw:function(t,e,i,n,s){return this.beginDraw(),this.batchDraw(t,e,i,n,s),this.endDraw(),this},drawFrame:function(t,e,i,n,s,r){return this.beginDraw(),this.batchDrawFrame(t,e,i,n,s,r),this.endDraw(),this},beginDraw:function(){var t=this.camera,e=this.renderer,i=this.renderTarget;return t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this},batchDraw:function(t,e,i,n,s){return void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]),this.batchList(t,e,i,n,s),this},batchDrawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.textureManager.getFrame(t,e);return o&&(this.renderTarget?this.pipeline.batchTextureFrame(o,i,n,r,s,this.camera.matrix,null):this.batchTextureFrame(o,i+this.frame.cutX,n+this.frame.cutY,s,r)),this},endDraw:function(t){void 0===t&&(t=this._eraseMode);var e=this.renderer,i=this.renderTarget;if(i){var n=e.endCapture();e.pipelines.setUtility().blitFrame(n,i,1,!1,!1,t),e.resetScissor(),e.resetViewport()}else e.setContext();return this.dirty=!0,this},batchList:function(t,e,i,n,s){for(var r=0;rr&&(o=t[r]),s[r]=o,t.length>r+1&&(o=t[r+1]),s[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,n=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var s=0;if(t.length===e)for(i=0;is&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;nl){if(0===c){for(var v=f;v.length&&(v=v.slice(0,-1),!((p=e.measureText(v).width)<=l)););if(!v.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var g=d.substr(v.length);u[c]=g,h+=v}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=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=s.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=s[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],f=e.measureText(d).width,p=f;ch&&c>0&&(n+="\n",h=i),n+=d,c0&&(d+=h.lineSpacing*v),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[v];else if("center"===i.align)c+=(o-h.lineWidths[v])/2;else if("justify"===i.align&&h.lineWidths[v]/h.width>=.85){var g=h.width-h.lineWidths[v],y=e.measureText(" ").width,m=a[v].trim(),x=m.split(" ");g+=(a[v].length-m.length)*y;for(var b=Math.floor(g/y),T=0;b>0;)x[T]+=" ",T=(T+1)%(x.length-1||1),--b;a[v]=x.join(" ")}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[v],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[v],c,d))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var w=this.input;return w&&!w.customHitArea&&(w.hitArea.width=this.width,w.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(31),s=i(0),r=i(11),o=i(22),a=i(15),h=i(361),l=i(192),u=i(1091),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,(function(t){if(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)}}),this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer&&this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(18),r=i(11),o=i(75),a=i(22),h=i(51),l=i(15),u=i(70),c=i(222),d=i(1094),f=i(14),p=new n({Extends:l,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,d],initialize:function(t,e,i,n){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=c(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=f.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(u.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(c(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0);try{n.srcObject=t}catch(e){n.src=window.URL.createObjectURL(t)}return n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=p},function(t,e,i){var n=i(0),s=i(228),r=i(470),o=i(56),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=0&&T<=1&&i.push(new n(r,o))}else if(b>0){var w=(-x-Math.sqrt(b))/(2*m);r=a+w*p,o=h+w*v,w>=0&&w<=1&&i.push(new n(r,o));var E=(-x+Math.sqrt(b))/(2*m);r=a+E*p,o=h+E*v,E>=0&&E<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(66),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(4),s=i(96),r=i(488);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,v=u*d+c*f,g=d*d+f*f,y=p*g-v*v,m=0===y?0:1/y,x=t.x1,b=t.y1,T=0;T=0&&r>=0&&s+r<1&&(n.push({x:e[T].x,y:e[T].y}),i)));T++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1310),BUTTON_UP:i(1311),CONNECTED:i(1312),DISCONNECTED:i(1313),GAMEPAD_BUTTON_DOWN:i(1314),GAMEPAD_BUTTON_UP:i(1315)}},function(t,e,i){var n=i(17),s=i(156);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,i){var n=i(0),s=i(21),r=i(23),o=i(8),a=i(2),h=i(7),l=i(408),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",(function(t,e,i){if(Array.isArray(t))for(var n=0;ne._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(62);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){t.exports={Bounce:i(1495),Collision:i(1496),Force:i(1497),Friction:i(1498),Gravity:i(1499),Mass:i(1500),Sensor:i(1501),SetBody:i(1502),Sleep:i(1503),Static:i(1520),Transform:i(1521),Velocity:i(1522)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED||(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED),this},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){void 0===e&&(e=16.6),this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,e.previous=e.current,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onStop","onUpdate","onYoyo"],a.register("tween",(function(t){return this.scene.sys.tweens.add(t)})),o.register("tween",(function(t){return this.scene.sys.tweens.create(t)})),t.exports=u},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1466),TIMELINE_LOOP:i(1467),TIMELINE_PAUSE:i(1468),TIMELINE_RESUME:i(1469),TIMELINE_START:i(1470),TIMELINE_UPDATE:i(1471),TWEEN_ACTIVE:i(1472),TWEEN_COMPLETE:i(1473),TWEEN_LOOP:i(1474),TWEEN_REPEAT:i(1475),TWEEN_START:i(1476),TWEEN_STOP:i(1477),TWEEN_UPDATE:i(1478),TWEEN_YOYO:i(1479)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e,i){var n=i(68);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(68);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={};t.exports=n;var s=i(83),r=i(32);n.fromVertices=function(t){for(var e={},i=0;i1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(64),r=i(83);n.collides=function(t,e,i){var o,a,h,l,u=!1;if(i){var c=t.parent,d=e.parent,f=c.speed*c.speed+c.angularSpeed*c.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;u=i&&i.collided&&f<.2,l=i}else l={collided:!1,bodyA:t,bodyB:e};if(i&&u){var p=l.axisBody,v=p===t?e:t,g=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,v.vertices,g),l.reused=!0,h.overlap<=0)return l.collided=!1,l}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return l.collided=!1,l;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return l.collided=!1,l;o.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))0&&(e=n(t)/i);for(var h=0;h=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(171),s=i(130);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-n),h=Math.abs(o-s),l=n-h&&(c-=h,n+=l),fe.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=new(i(0))({initialize:function(t,e,i,n,s){void 0===s&&(s=!1),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,this.isKeyFrame=s},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},function(t,e,i){var n=i(185),s=i(0),r=i(102),o=i(9),a=i(132),h=i(22),l=i(2),u=i(6),c=i(186),d=i(322),f=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var n=this.anims,s=this.mixes,r="string"==typeof t?t:t.key,o="string"==typeof e?e:e.key;if(n.has(r)&&n.has(o)){var a=s.get(r);a||(a={}),a[o]=i,s.set(r,a)}return this},removeMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s=i.get(n);if(s)if(e){var r="string"==typeof e?e:e.key;s.hasOwnProperty(r)&&delete s[r]}else e||i.delete(n);return this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s="string"==typeof e?e:e.key,r=i.get(n);return r&&r.hasOwnProperty(s)?r[s]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e){var i=[],n=this.game.cache.json.get(t);if(!n)return i;var s=this,r=u(n,"meta",null),o=u(n,"frames",null);return r&&o&&u(r,"frameTags",[]).forEach((function(n){var r=[],a=l(n,"name",null),h=l(n,"from",0),u=l(n,"to",0),c=l(n,"direction","forward");if(a&&(!e||e&&e.indexOf(a)>-1)){for(var d=[],f=Number.MAX_SAFE_INTEGER,p=h;p<=u;p++){var v=p.toString(),g=o[v];if(g){var y=l(g,"duration",Number.MAX_SAFE_INTEGER);y=e;s--)o?r.push(i+s.toString()+n):r.push(s);else for(s=t;s<=e;s++)o?r.push(i+s.toString()+n):r.push(s);return r}},function(t,e,i){var n=i(0),s=i(102),r=i(9),o=i(324),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(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},function(t,e,i){t.exports={ADD:i(736),REMOVE:i(737)}},function(t,e,i){var n=i(323),s=i(0),r=i(22),o=new s({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.video=new n,this.text=new n,this.html=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once(r.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","video","text","html","obj","tilemap","xml"],e=0;ed.right&&(f=u(f,f+(g-d.right),this.lerp.x)),yd.bottom&&(p=u(p,p+(y-d.bottom),this.lerp.y))):(f=u(f,g-a,this.lerp.x),p=u(p,y-h,this.lerp.y)),v=!0}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(a=Math.round(a),h=Math.round(h),f=Math.round(f),p=Math.round(p)),this.scrollX=f,this.scrollY=p;var m=f+i,x=p+n;this.midPoint.set(m,x);var b=t/r,T=e/r,w=m-b/2,E=x-T/2;this.roundPixels&&(w=Math.round(w),E=Math.round(E)),this.worldView.setTo(w,E,b,T),o.applyITRS(this.x+a,this.y+h,this.rotation,r,r),o.translate(-a,-h),this.shakeEffect.preRender(),v&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===o&&(o=s),this._follow=t,this.roundPixels=e,i=r(i,0,1),n=r(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,o);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-o;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(38);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),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{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(38);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(38);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),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(761),Flash:i(762),Pan:i(763),Shake:i(796),RotateTo:i(797),Zoom:i(798)}},function(t,e,i){t.exports={In:i(764),Out:i(765),InOut:i(766)}},function(t,e,i){t.exports={In:i(767),Out:i(768),InOut:i(769)}},function(t,e,i){t.exports={In:i(770),Out:i(771),InOut:i(772)}},function(t,e,i){t.exports={In:i(773),Out:i(774),InOut:i(775)}},function(t,e,i){t.exports={In:i(776),Out:i(777),InOut:i(778)}},function(t,e,i){t.exports={In:i(779),Out:i(780),InOut:i(781)}},function(t,e,i){t.exports=i(782)},function(t,e,i){t.exports={In:i(783),Out:i(784),InOut:i(785)}},function(t,e,i){t.exports={In:i(786),Out:i(787),InOut:i(788)}},function(t,e,i){t.exports={In:i(789),Out:i(790),InOut:i(791)}},function(t,e,i){t.exports={In:i(792),Out:i(793),InOut:i(794)}},function(t,e,i){t.exports=i(795)},function(t,e,i){var n=i(0),s=i(33),r=i(347),o=i(2),a=i(6),h=i(7),l=i(193),u=i(1),c=i(197),d=i(187),f=new n({initialize:function(t){void 0===t&&(t={}),this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.domPointerEvents=a(t,"dom.pointerEvents","none"),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=a(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=a(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=a(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=a(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio",{}),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.pipeline=a(i,"pipeline",null),this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.preserveDrawingBuffer=a(i,"preserveDrawingBuffer",!1),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",4096),this.maxTextures=a(i,"maxTextures",-1),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),this.transparent&&(this.backgroundColor=d(0),this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path","");var f=r.os.android?6:32;this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",f),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.loaderWithCredentials=a(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var p=a(t,"plugins",null),v=c.DefaultScene;p&&(Array.isArray(p)?this.defaultPlugins=p:h(p)&&(this.installGlobalPlugins=o(p,"global",[]),this.installScenePlugins=o(p,"scene",[]),Array.isArray(p.default)?v=p.default:Array.isArray(p.defaultMerge)&&(v=v.concat(p.defaultMerge)))),this.defaultPlugins=v;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=a(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(105),browser:i(136),features:i(191),input:i(808),audio:i(809),video:i(810),fullscreen:i(811),canvasFeatures:i(348)}},function(t,e,i){var n,s,r,o=i(31),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;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],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],v=c[3],g=c[4],y=c[5],m=c[6],x=c[7],b=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=v*i+g*r+y*h,e[4]=v*n+g*o+y*l,e[5]=v*s+g*a+y*u,e[6]=m*i+x*r+b*h,e[7]=m*n+x*o+b*l,e[8]=m*s+x*a+b*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,v=s*o,g=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+g,y[6]=u-v,y[1]=l-g,y[4]=1-(h+f),y[7]=d+p,y[2]=u+v,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],v=e[12],g=e[13],y=e[14],m=e[15],x=n*h-s*a,b=n*l-r*a,T=n*u-o*a,w=s*l-r*h,E=s*u-o*h,S=r*u-o*l,_=c*g-d*v,A=c*y-f*v,C=c*m-p*v,O=d*y-f*g,P=d*m-p*g,R=f*m-p*y,M=x*R-b*P+T*O+w*C-E*A+S*_;return M?(M=1/M,i[0]=(h*R-l*P+u*O)*M,i[1]=(l*C-a*R-u*A)*M,i[2]=(a*P-h*C+u*_)*M,i[3]=(r*P-s*R-o*O)*M,i[4]=(n*R-r*C+o*A)*M,i[5]=(s*C-n*P-o*_)*M,i[6]=(g*S-y*E+m*w)*M,i[7]=(y*T-v*S-m*b)*M,i[8]=(v*E-g*T+m*x)*M,this):null}});t.exports=n},function(t,e,i){var n=i(0),s=i(364),r=i(1),o=i(39),a=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new o(1,0,0),c=new o(0,1,0),d=new o,f=new s,p=new n({initialize:function(t,e,i,n){this.onChangeCallback=r,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,s){return void 0===s&&(s=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),s&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this._x=t*s,this._y=e*s,this._z=i*s,this._w=n*s),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),s+e*(t.z-s),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=f.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+s*r+i*a-n*o,i*h+s*o+n*r-e*a,n*h+s*a+e*o-i*r,s*h-e*r-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,h=t.y,l=t.z,u=t.w,c=i*o+n*h+s*l+r*u;c<0&&(c=-c,o=-o,h=-h,l=-l,u=-u);var d=1-e,f=e;if(1-c>a){var p=Math.acos(c),v=Math.sin(p);d=Math.sin((1-e)*p)/v,f=Math.sin(e*p)/v}return this.set(d*i+f*o,d*n+f*h,d*s+f*l,d*r+f*u)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.set(-t*r,-e*r,-i*r,n*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+s*r,i*o+n*r,n*o-i*r,s*o-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o-n*r,i*o+s*r,n*o+e*r,s*o-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*r,i*o-e*r,n*o+s*r,s*o-n*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,s=t.z/2,r=Math.cos(i),o=Math.cos(n),a=Math.cos(s),h=Math.sin(i),l=Math.sin(n),u=Math.sin(s);switch(t.order){case"XYZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],s=i[4],r=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=n+a+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(r-l)*e,(o-s)*e,.25/e)):n>a&&n>c?(e=2*Math.sqrt(1+n-a-c),this.set(.25*e,(s+o)/e,(r+l)/e,(u-h)/e)):a>c?(e=2*Math.sqrt(1+a-n-c),this.set((s+o)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+c-n-a),this.set((r+l)/e,(h+u)/e,.25*e,(o-s)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=h[s],o=h[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*o+o]+1),l[s]=.5*e,e=.5/e,l[r]=(i[3*r+s]+i[3*s+r])*e,l[o]=(i[3*o+s]+i[3*s+o])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*o+r]-i[3*r+o])*e}return this.onChangeCallback(this),this}});t.exports=p},function(t,e,i){var n=i(367),s=i(31),r=i(33),o=i(191);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(368),h=i(371),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","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,i){var n=i(37),s=i(369),r=i(0),o=i(33),a=i(9),h=i(91),l=i(370),u=i(104),c=i(106),d=i(25),f=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var s=e.length;this.emit(h.RENDER,t,i);var r=i.x,o=i.y,a=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(r,o,a,l),u.clip()),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(r,o,a,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=s,i.renderToTexture&&i.emit(n.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d=0?y=-(y+c):y<0&&(y=Math.abs(y)-c)),t.flipY&&(m>=0?m=-(m+d):m<0&&(m=Math.abs(m)-d))}var b=1,T=1;t.flipX&&(f||(y+=-e.realWidth+2*v),b=-1),t.flipY&&(f||(m+=-e.realHeight+2*g),T=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*b,t.scaleY*T),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY),o.multiply(a),r.save(),o.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),t.mask&&t.mask.preRenderCanvas(this,t,i),r.drawImage(e.source.image,l,u,c,d,y,m,c/p,d/p),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=f},function(t,e,i){var n=i(31),s=i(38),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var v=new Image;v.onerror=function(){i.call(null)},v.onload=function(){i.call(null,v)},v.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(35),s=i(348);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(93),s=i(37),r=i(0),o=i(33),a=i(9),h=i(91),l=i(22),u=i(138),c=i(69),d=i(1),f=i(372),p=i(141),v=i(104),g=i(106),y=i(12),m=i(383),x=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTexture=0,this.startActiveTexture=0,this.maxTextures=0,this.textureIndexes,this.tempTextures,this.textureZero,this.normalTexture,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=d,this.contextRestoredHandler=d,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.textureFlush=0,this.isTextureClean=!1,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(l.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(l.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var a=0;a<=27;a++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var h=e.getSupportedExtensions();t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",d="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(d+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(d+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(d+"s3tc"),this.supportedExtensions=h;var p="ANGLE_instanced_arrays";this.instancedArraysExtension=h.indexOf(p)>-1?e.getExtension(p):null;var v="OES_vertex_array_object";this.vaoExtension=h.indexOf(v)>-1?e.getExtension(v):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=y.checkShaderMax(e,t.maxTextures),this.textureIndexes=[];var m=this.tempTextures;if(Array.isArray(m))for(var x=0;a0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],n=e[1],s=e[2],r=e[3];s>0&&r>0&&t.scissor(i,this.drawingBufferHeight-n-r,s,r)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},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>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(){this.setTexture2D(this.blankTexture.glTexture)},setTextureSource:function(t){if(this.pipelines.forceZero())return this.setTextureZero(t.glTexture,!0),0;var e=this.gl,i=this.currentActiveTexture;return t.glIndexCounter0&&this.pipelines.setMulti().drawFillRect(e,i,n,r,y.getTintFromFloats(o.blueGL,o.greenGL,o.redGL,1),o.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var n=this.pipelines.setMulti();e.postRenderWebGL(n,y.getTintFromFloats),i.postRenderWebGL(n,y.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(s.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.textureFlush=0,this.emit(h.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var n=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===n)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var s=this.currentMask,r=0;r0&&(this.startActiveTexture++,this.currentActiveTexture=1)}},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,t,e,i)},snapshotArea:function(t,e,i,n,s,r,o){var a=this.snapshotState;return a.callback=s,a.type=r,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gl.drawingBufferWidth),a.height=Math.min(n,this.gl.drawingBufferHeight),this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(t,e,i,n,s,r,o,a,h,l,u){void 0===s&&(s=!1),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=e),void 0===h&&(h=i);var c=this.currentFramebuffer;this.snapshotArea(r,o,a,h,n,l,u);var d=this.snapshotState;return d.getPixel=s,d.isFramebuffer=!0,d.bufferWidth=e,d.bufferHeight=i,this.setFramebuffer(t),m(this.canvas,d),this.setFramebuffer(c),d.callback=null,d.isFramebuffer=!1,this},canvasToTexture:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n=!1),e?this.updateCanvasTexture(t,e,n):this.createCanvasTexture(t,i,n)},createCanvasTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.width,a=t.height,h=n.CLAMP_TO_EDGE,l=u(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(s=l?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,h,h,n.RGBA,t,o,a,!0,!1,i)},updateCanvasTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.width,r=t.height;if(s>0&&r>0){n.activeTexture(n.TEXTURE0);var o=n.getParameter(n.TEXTURE_BINDING_2D);n.bindTexture(n.TEXTURE_2D,e),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,o&&n.bindTexture(n.TEXTURE_2D,o)}return e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,h=n.CLAMP_TO_EDGE,l=u(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(s=l?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,h,h,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;if(s>0&&r>0){n.activeTexture(n.TEXTURE0);var o=n.getParameter(n.TEXTURE_BINDING_2D);n.bindTexture(n.TEXTURE_2D,e),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,o&&n.bindTexture(n.TEXTURE_2D,o)}return e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];i.activeTexture(i.TEXTURE0);var s=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),s&&i.bindTexture(i.TEXTURE_2D,s),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);for(var t=this.gl,e=this.tempTextures,i=0;i=0;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0?(e.enableVertexAttribArray(f),e.vertexAttribPointer(f,a,h,d,i,l),o.enabled=!0,o.location=f):-1!==f&&e.disableVertexAttribArray(f)}else u?e.vertexAttribPointer(c,a,h,d,i,l):!u&&c>-1&&(e.disableVertexAttribArray(c),o.location=-1)}return this},createUniforms:function(){var t,e,i,n=this.gl,s=this.program,r=this.uniforms,o=n.getProgramParameter(s,n.ACTIVE_UNIFORMS);for(t=0;t0&&(e=e.substr(0,h),r.hasOwnProperty(e)||null!==(i=n.getUniformLocation(s,e))&&(r[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null}))}}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,n){var s=this.uniforms[e];return s?((n||s.value1!==i)&&(s.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,s.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,n,s){var r=this.uniforms[e];return r?((s||r.value1!==i||r.value2!==n)&&(r.value1=i,r.value2=n,this.renderer.setProgram(this.program),t.call(this.gl,r.location,i,n),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,n,s,r){var o=this.uniforms[e];return o?((r||o.value1!==i||o.value2!==n||o.value3!==s)&&(o.value1=i,o.value2=n,o.value3=s,this.renderer.setProgram(this.program),t.call(this.gl,o.location,i,n,s),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,n,s,r,o){var a=this.uniforms[e];return a?((o||a.value1!==i||a.value2!==n||a.value3!==s||a.value4!==r)&&(a.value1=i,a.value2=n,a.value3=s,a.value4=r,this.renderer.setProgram(this.program),t.call(this.gl,a.location,i,n,s,r),this.pipeline.currentShader=this),this):this},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,n){return this.setUniform3(this.gl.uniform3f,t,e,i,n)},set4f:function(t,e,i,n,s){return this.setUniform4(this.gl.uniform4f,t,e,i,n,s)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,n){return this.setUniform3(this.gl.uniform3i,t,e,i,n)},set4i:function(t,e,i,n,s){return this.setUniform4(this.gl.uniform4i,t,e,i,n,s)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(59),r=i(2),o=i(875),a=i(876),h=i(25),l=i(107),u=i(58),c=new n({Extends:u,initialize:function(t){t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inColor",size:4,type:l.UNSIGNED_BYTE,normalized:!0}]),u.call(this,t),this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},batchFillRect:function(t,e,i,n,s,r){this.renderer.pipelines.set(this);var o=this.calcMatrix;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),v=o.getX(a,e),g=o.getY(a,e),y=this.fillTint;this.batchQuad(l,u,c,d,f,p,v,g,y.TL,y.TR,y.BL,y.BR)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),v=this.fillTint;this.batchTri(l,u,c,d,f,p,v.TL,v.TR,v.BL)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&X[4]?this.batchQuad(k,D,P,R,X[0],X[1],X[2],X[3],I,B,N,Y):(U[0]=k,U[1]=D,U[2]=P,U[3]=R,U[4]=1),h&&U[4]?this.batchQuad(C,O,M,L,U[0],U[1],U[2],U[3],I,B,N,Y):(X[0]=C,X[1]=O,X[2]=M,X[3]=L,X[4]=1)}},batchVert:function(t,e,i){var n=this.vertexViewF32,s=this.vertexViewU32,r=this.vertexCount*this.currentShader.vertexComponentCount-1;n[++r]=t,n[++r]=e,s[++r]=i,this.vertexCount++},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c){var d=!1;return this.shouldFlush(6)&&(this.flush(),d=!0),this.batchVert(t,e,h),this.batchVert(i,n,u),this.batchVert(s,r,c),this.batchVert(t,e,h),this.batchVert(s,r,c),this.batchVert(o,a,l),d},batchTri:function(t,e,i,n,s,r,o,a,h){var l=!1;return this.shouldFlush(3)&&(this.flush(),l=!0),this.batchVert(t,e,o),this.batchVert(i,n,a),this.batchVert(s,r,h),l},destroy:function(){return u.prototype.destroy.call(this),this.polygonCache=null,this}});t.exports=c},function(t,e,i){var n=i(0),s=i(2),r=i(877),o=i(108),a=i(3),h=i(58),l=10,u=new a,c=new n({Extends:o,initialize:function(t){l=t.game.renderer.config.maxLights;for(var e=s(t,"fragShader",r),i=[],n=1;n<=l;n++)i.push({name:"lights"+n,fragShader:e.replace("%LIGHT_COUNT%",n.toString())});t.shaders=i,o.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.lightsActive=!0},boot:function(){h.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e};for(var i=0;i0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.tempTextures[0]);var n=this.getNormalMap(e);i.isNewNormalMap(t,n)&&(this.flush(),i.setTextureZero(t),i.setNormalMap(n));var s=e?e.rotation:0;return this.setNormalMapRotation(s),this.currentUnit=0,0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=this.renderer,n=e.glTexture,s=this.getNormalMap(t);return i.isNewNormalMap()&&(this.flush(),i.setTextureZero(n),i.setNormalMap(s)),this.setNormalMapRotation(t.rotation),this.currentUnit=0,0},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]):e=this.defaultNormalMap,e||(e=this.defaultNormalMap),e.glTexture},batchSprite:function(t,e,i){this.lightsActive&&o.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,n,s,r,a,h,l,u,c,d,f,p,v,g,y,m,x,b,T,w,E,S,_,A,C,O,P,R,M,L){this.lightsActive&&o.prototype.batchTexture.call(this,t,e,i,n,s,r,a,h,l,u,c,d,f,p,v,g,y,m,x,b,T,w,E,S,_,A,C,O,P,R,M,L)},batchTextureFrame:function(t,e,i,n,s,r,a){this.lightsActive&&o.prototype.batchTextureFrame.call(this,t,e,i,n,s,r,a)}});c.LIGHT_COUNT=l,t.exports=c},function(t,e,i){var n=i(0),s=i(2),r=i(880),o=i(881),a=i(58),h=new n({Extends:a,initialize:function(t){t.vertShader=s(t,"vertShader",o),t.fragShader=s(t,"fragShader",r),t.attributes=s(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,n,s,r,o,a,h,l,u,c){var d=t.color,f=t.intensity,p=t.radius,v=t.attenuation,g=d.r*f,y=d.g*f,m=d.b*f,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.batchLightVert(i,n,u,c,p,v,g,y,m,x),this.batchLightVert(s,r,u,c,p,v,g,y,m,x),this.batchLightVert(o,a,u,c,p,v,g,y,m,x),this.batchLightVert(i,n,u,c,p,v,g,y,m,x),this.batchLightVert(o,a,u,c,p,v,g,y,m,x),this.batchLightVert(h,l,u,c,p,v,g,y,m,x)},batchLightVert:function(t,e,i,n,s,r,o,a,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=n,u[++c]=s,u[++c]=r,u[++c]=o,u[++c]=a,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},function(t,e,i){var n=i(0),s=i(2),r=i(108),o=new n({Extends:r,initialize:function(t){t.topology=5,t.batchSize=s(t,"batchSize",256),r.call(this,t)}});t.exports=o},function(t,e,i){var n=i(0),s=i(2),r=i(108),o=i(882),a=i(883),h=i(58),l=new n({Extends:r,initialize:function(t){t.fragShader=s(t,"fragShader",o),t.vertShader=s(t,"vertShader",a),t.forceZero=!0,r.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=l},function(t,e,i){var n=i(884),s=i(35),r=i(0),o=i(198),a=i(885),h=i(886),l=i(2),u=i(887),c=i(382),d=i(58),f=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:n},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:a}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,n,s){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===s&&(s=!0);var r=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),n&&(s?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blitFrame:function(t,e,i,n,r,o){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===o&&(o=!1);var a=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),t.height>e.height)a.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var h=e.height-t.height;a.viewport(0,h,t.width,t.height)}if(a.bindFramebuffer(a.FRAMEBUFFER,e.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e.texture,0),n&&(r?a.clearColor(0,0,0,0):a.clearColor(0,0,0,1),a.clear(a.COLOR_BUFFER_BIT)),o){var l=this.renderer.currentBlendMode;this.renderer.setBlendMode(s.ERASE)}a.bufferData(a.ARRAY_BUFFER,this.vertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),o&&this.renderer.setBlendMode(l),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindTexture(a.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,n,s,r,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,n,s,r),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6),this.renderer.resetTextures()},drawFrame:function(t,e,i,n){void 0===i&&(i=!0),void 0===n&&(n=this.colorMatrix);var s=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",n.getData()),this.set1f("uAlpha",n.alpha),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture,0)):s.viewport(0,0,t.width,t.height),i?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindTexture(s.TEXTURE_2D,null)},blendFrames:function(t,e,i,n,s,r){void 0===n&&(n=1),void 0===s&&(s=!0),void 0===r&&(r=this.linearShader);var o=this.gl;this.setShader(r),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",n),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),s?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,n,s){this.blendFrames(t,e,i,n,s,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var n=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,n)},setUVs:function(t,e,i,n,s,r,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=n,h[10]=s,h[11]=r,h[14]=t,h[15]=e,h[18]=s,h[19]=r,h[22]=o,h[23]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=f},function(t,e){t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},function(t,e,i){var n=i(31),s=i(38),r=i(2);t.exports=function(t,e){var i=t.getContext("experimental-webgl"),o=r(e,"callback"),a=r(e,"type","image/png"),h=r(e,"encoder",.92),l=r(e,"x",0),u=r(e,"y",0),c=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),f=d?r(e,"bufferWidth",1):i.drawingBufferWidth,p=d?r(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var v=new Uint8Array(4),g=d?u:p-u;i.readPixels(l,g,1,1,i.RGBA,i.UNSIGNED_BYTE,v),o.call(null,new s(v[0],v[1],v[2],v[3]/255))}else{var y=r(e,"width",f),m=r(e,"height",p),x=new Uint8Array(y*m*4);i.readPixels(l,p-u-m,y,m,i.RGBA,i.UNSIGNED_BYTE,x);for(var b=n.createWebGL(this,y,m),T=b.getContext("2d"),w=T.getImageData(0,0,y,m),E=w.data,S=0;S0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0),o=0;for(var a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();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.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,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,i){var n=i(22);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")})),e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)}),!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(389),s=i(31),r=i(6);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var v=i.getContext("2d");u&&v.clearRect(0,0,f,p),c&&c(i,v);for(var g=0;gi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(105);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?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){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e,i){var n=i(201);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return s&&"string"==typeof s.type?s.type:"string"==typeof s?s:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?n.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?n.ORIENTATION.LANDSCAPE:void 0:e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},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(0),s=i(203),r=i(9),o=i(51),a=i(22),h=i(410),l=i(411),u=i(412),c=i(413),d=i(25),f=i(177),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(191),r=i(51),o=i(1),a=new n({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&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()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,n=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===n&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===n&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===n&&t.preventDefault()};var o={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,o),t.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}s.pointerLock&&(this.pointerLockChange=function(t){var n=e.target;e.locked=document.pointerLockElement===n||document.mozPointerLockElement===n||document.webkitPointerLockElement===n,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),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.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(349),s=i(0),r=i(50),o=i(124),a=i(360),h=i(3),l=i(105),u=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.READY,this.refresh,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.zoom,o=t.autoRound;if("string"==typeof e){var a=this.parentSize.width;0===a&&(a=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(a*h)}if("string"==typeof i){var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=s,this.autoRound=o,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,o&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),r===n.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(e,i),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*r,t.minHeight*r),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*r,t.maxHeight*r),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,n=e.height;return(t.width!==i||t.height!==n)&&(t.setSize(i,n),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,s=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(n,s)},resize:function(t,e){var i=this.zoom,n=this.autoRound;n&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),n&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=t*i,h=e*i;return n&&(a=Math.floor(a),h=Math.floor(h)),a===t&&h===e||(o.width=a+"px",o.height=h+"px"),this.refresh(s,r)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o,r*o),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}return this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)),this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available&&(e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)},["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1))},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1),["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=g},function(t,e,i){var n=i(18),s=i(0),r=i(76),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(144),r=i(20),o=i(22),a=i(6),h=i(95),l=i(1),u=i(418),c=i(204),d=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,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;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;i.sceneUpdate=l,t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,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(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){this.create(t.scene)},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.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){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=r.x&&t=r.y&&e=r.x&&t=r.y&&e-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d0||!n.prototype.pause.call(this)||(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),0))},resume:function(){return!(this.manager.isLocked(this,"resume")||this.startTime>0||!n.prototype.resume.call(this)||!this.pickAndPlayAudioTag()||(this.emit(r.RESUME,this),0))},stop:function(){return!this.manager.isLocked(this,"stop")&&!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.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;t0)this.startTime=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,n-i),n=this.audio.currentTime):n=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=n}},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=o(this.currentConfig.volume*this.manager.volume,0,1))},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.updateMute(),this.emit(r.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.updateVolume(),this.emit(r.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,r.RATE,t)||(this.calculateRate(),this.emit(r.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,r.DETUNE,t)||(this.calculateRate(),this.emit(r.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(r.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(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=a},function(t,e,i){var n=i(145),s=i(0),r=i(9),o=i(431),a=i(1),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 o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(146),s=i(0),r=i(9),o=i(17),a=function(){return!1},h=function(){return this},l=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=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan: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.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:a,updateMarker:a,removeMarker:function(){return null},play:a,pause:a,resume:a,stop:a,destroy:function(){n.prototype.destroy.call(this)},setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h,setPan:h});t.exports=l},function(t,e,i){var n=i(433),s=i(145),r=i(0),o=i(70),a=i(22),h=i(434),l=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(a.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(146),s=i(0),r=i(70),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var v=t[e],g=r,y=o;for(i(t,r,e),a(t[o],v)>0&&i(t,r,o);g0;)y--}0===a(t[r],v)?i(t,r,y):i(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};t.exports=s},function(t,e,i){var n=i(6),s=i(131),r=function(t,e,i){for(var n=[],s=0;s0?s.playAfterDelay(f,d):s.load(f)}}return t}},function(t,e,i){var n=i(0),s=i(109),r=new n({initialize:function(t,e,i,n,s){this.parent=t,this.x=e,this.y=i,this.frame=n,this.data={},this.tint=16777215,this._visible=s,this._alpha=1,this.flipX=!1,this.flipY=!1},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof s&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,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},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){var n=i(10);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(11),r=i(1055),o=i(15),a=i(7),h=i(202),l=i(20),u=i(140),c=new n({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e0&&(e=n(t)/i);for(var h=0;h>>16,y=(65280&f)>>>8,m=255&f,u.strokeStyle="rgba("+g+","+y+","+m+","+c+")",u.lineWidth=v,x+=3;break;case n.FILL_STYLE:p=h[x+1],d=h[x+2],g=(16711680&p)>>>16,y=(65280&p)>>>8,m=255&p,u.fillStyle="rgba("+g+","+y+","+m+","+d+")",x+=2;break;case n.BEGIN_PATH:u.beginPath();break;case n.CLOSE_PATH:u.closePath();break;case n.FILL_PATH:a||u.fill();break;case n.STROKE_PATH:a||u.stroke();break;case n.FILL_RECT:a?u.rect(h[x+1],h[x+2],h[x+3],h[x+4]):u.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case n.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.fill(),x+=6;break;case n.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.stroke(),x+=6;break;case n.LINE_TO:u.lineTo(h[x+1],h[x+2]),x+=2;break;case n.MOVE_TO:u.moveTo(h[x+1],h[x+2]),x+=2;break;case n.LINE_FX_TO:u.lineTo(h[x+1],h[x+2]),x+=5;break;case n.MOVE_FX_TO:u.moveTo(h[x+1],h[x+2]),x+=5;break;case n.SAVE:u.save();break;case n.RESTORE:u.restore();break;case n.TRANSLATE:u.translate(h[x+1],h[x+2]),x+=2;break;case n.SCALE:u.scale(h[x+1],h[x+2]),x+=2;break;case n.ROTATE:u.rotate(h[x+1]),x+=1;break;case n.GRADIENT_FILL_STYLE:x+=5;break;case n.GRADIENT_LINE_STYLE:x+=6}u.restore()}}},function(t,e,i){var n=i(0),s=i(137),r=i(80),o=i(2),a=i(68),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if(this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,"number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&this.hasBoth(t,"start","end")){this.start=t.start,this.end=t.end;var i=this.has(t,"random");if(i&&(this.onEmit=this.randomRangedValueEmit),this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var n=this.has(t,"ease")?t.ease:"Linear";this.ease=r(n,t.easeParams),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else if("object"===e&&this.hasBoth(t,"min","max"))this.start=t.min,this.end=t.max,this.onEmit=this.randomRangedValueEmit;else if("object"===e&&this.has(t,"random")){var s=t.random;Array.isArray(s)&&(this.start=s[0],this.end=s[1]),this.onEmit=this.randomRangedValueEmit}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),this.x+=void 0===t?i.x.onEmit(this,"x"):t,this.y+=void 0===e?i.y.onEmit(this,"y"):e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(35),s=i(0),r=i(11),o=i(453),a=i(454),h=i(449),l=i(2),u=i(210),c=i(455),d=i(126),f=i(451),p=i(456),v=i(10),g=i(79),y=i(3),m=i(68),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",16777215),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new y,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(0),s=i(13),r=i(6),o=i(460),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",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.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),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(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},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)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},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 a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(31);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=i.measureText(t.testString);if("actualBoundingBoxAscent"in s){var r=s.actualBoundingBoxAscent,o=s.actualBoundingBoxDescent;return n.remove(e),{ascent:r,descent:o,fontSize:r+o}}var a=Math.ceil(s.width*t.baselineX),h=a,l=2*h;h=h*t.baselineY|0,e.width=a,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,a,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,a,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,n.remove(e),u;var d,f,p=c.data,v=p.length,g=4*a,y=0,m=!1;for(d=0;dh;d--){for(f=0;f0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(1100),r=i(59),o=i(10),a=i(34),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;s0&&(e=h/i);for(var l=0;lc+g)){var y=v.getPoint((u-c)/g);o.push(y);break}c+=g}return o}},function(t,e,i){var n=i(67),s=i(47);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(10),r=i(34),o=i(1121),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(1124),s=i(0),r=i(59),o=i(34),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(67),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var f=0;fl+u?(v=(p-=l+u)/c,g.x=h.x1+(h.x2-h.x1)*v,g.y=h.y1+(h.y2-h.y1)*v):(v=(p-=l)/u,g.x=a.x1+(a.x2-a.x1)*v,g.y=a.y1+(a.y2-a.y1)*v),r.push(g)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0)for(l=0;lthis.maxLights&&(u(s,this.sortByDistance),s=s.slice(0,this.maxLights)),this.visibleLights=s.length,s},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,n,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===n&&(n=16777215),void 0===s&&(s=1);var r=c.getFloatsFromUintRGB(n),a=new o(t,e,i,r[0],r[1],r[2],s);return this.lights.push(a),a},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},function(t,e,i){var n=i(56),s=i(17),r={Circle:i(1191),Ellipse:i(1201),Intersects:i(484),Line:i(1221),Mesh:i(1243),Point:i(1246),Polygon:i(1260),Rectangle:i(502),Triangle:i(1293)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(231),CircleToRectangle:i(151),GetCircleToCircle:i(1211),GetCircleToRectangle:i(1212),GetLineToCircle:i(232),GetLineToLine:i(485),GetLineToPoints:i(486),GetLineToPolygon:i(487),GetLineToRectangle:i(234),GetRaysFromPointToPolygon:i(1213),GetRectangleIntersection:i(1214),GetRectangleToRectangle:i(1215),GetRectangleToTriangle:i(1216),GetTriangleToCircle:i(1217),GetTriangleToLine:i(492),GetTriangleToTriangle:i(1218),LineToCircle:i(233),LineToLine:i(96),LineToRectangle:i(488),PointToLine:i(496),PointToLineSegment:i(1219),RectangleToRectangle:i(152),RectangleToTriangle:i(489),RectangleToValues:i(1220),TriangleToCircle:i(491),TriangleToLine:i(493),TriangleToTriangle:i(494)}},function(t,e,i){var n=i(39);t.exports=function(t,e,i){var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=o-s,c=a-r,d=e.x2-h,f=e.y2-l;if(0===u||0==f*u-d*c)return!1;var p=(u*(l-r)+c*(s-h))/(d*c-f*u),v=(h+d*p-s)/u;return v<0||p<0||p>1?null:(void 0===i&&(i=new n),i.set(s+u*v,r+c*v,v))}},function(t,e,i){var n=i(39),s=i(485),r=new(i(47)),o=new n;t.exports=function(t,e,i){void 0===i&&(i=new n);var a=!1;i.set(),o.set();for(var h=e[0],l=1;l=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(96),s=i(57),r=i(235),o=i(490);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(233),s=i(115);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(14),s=i(68),r=i(97);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){var i=!0,n="untitled",s="",r="";function o(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function a(t){return 0===t.models.length&&t.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),s="",t.models[t.models.length-1]}function h(t,e){var i=t.length>=2?t[1]:n;e.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),s=""}function l(t){2===t.length&&(s=t[1])}function u(t,e){var i=t.length,n=i>=2?parseFloat(t[1]):0,s=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;a(e).vertices.push({x:n,y:s,z:r})}function c(t,e){var n=t.length,s=n>=2?parseFloat(t[1]):0,r=n>=3?parseFloat(t[2]):0,o=n>=4?parseFloat(t[3]):0;isNaN(s)&&(s=0),isNaN(r)&&(r=0),isNaN(o)&&(o=0),i&&(r=1-r),a(e).textureCoords.push({u:s,v:r,w:o})}function d(t,e){var i=t.length,n=i>=2?parseFloat(t[1]):0,s=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;a(e).vertexNormals.push({x:n,y:s,z:r})}function f(t,e){var i=t.length-1;if(!(i<3)){for(var n={group:s,material:r,vertices:[]},o=0;o3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=a(e).vertices.length+1+u),c-=1,u-=1,d-=1,n.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}a(e).faces.push(n)}}function p(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function v(t){t.length>=2&&(r=t[1])}t.exports=function(t,e){void 0===e&&(e=!0),i=e;var n={materials:{},materialLibraries:[],models:[]};s="",r="";for(var a=t.split("\n"),g=0;g=2?Math.floor(255*a[2]):h,u=a.length>=3?Math.floor(255*a[3]):h;e[s]=n(h,l,u)}}}return e}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(10);n.Area=i(1267),n.Ceil=i(1268),n.CeilAll=i(1269),n.CenterOn=i(190),n.Clone=i(1270),n.Contains=i(57),n.ContainsPoint=i(1271),n.ContainsRect=i(503),n.CopyFrom=i(1272),n.Decompose=i(490),n.Equals=i(1273),n.FitInside=i(1274),n.FitOutside=i(1275),n.Floor=i(1276),n.FloorAll=i(1277),n.FromPoints=i(199),n.FromXY=i(1278),n.GetAspectRatio=i(237),n.GetCenter=i(1279),n.GetPoint=i(171),n.GetPoints=i(306),n.GetSize=i(1280),n.Inflate=i(1281),n.Intersection=i(1282),n.MarchingAnts=i(316),n.MergePoints=i(1283),n.MergeRect=i(1284),n.MergeXY=i(1285),n.Offset=i(1286),n.OffsetPoint=i(1287),n.Overlaps=i(1288),n.Perimeter=i(130),n.PerimeterPoint=i(1289),n.Random=i(174),n.RandomOutside=i(1290),n.SameDimensions=i(1291),n.Scale=i(1292),n.Union=i(441),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=e}}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,alwaysEnabled:!1,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},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?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(509),s=i(510),r=i(0),o=i(9),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t0&&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){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){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,i){var n=i(240);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;if(s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.headers)for(var r in i.headers)s.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.requestedWith&&s.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),i.withCredentials&&(s.withCredentials=!0),s.onload=t.onLoad.bind(t,s),s.onerror=t.onError.bind(t,s),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(21),r=i(23),o=i(8),a=i(2),h=i(519),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,s){if(l(e)){var o=e;e=a(o,"key"),n=a(o,"xhrSettings"),s=a(o,"context",s)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:n,config:{context:s}};r.call(this,t,h)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,c=r.device.audio;l(e)&&(i=a(e,"url",[]),n=a(e,"config",{}));var d=u.getAudioURL(r,i);return d?c.webAudio&&!o.disableWebAudio?new u(t,e,d,s,r.sound.context):new h(t,e,d,n):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i=r;for(this.fixedStep||(s=.001*e,a=!0,this._elapsed=0),i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=a.entries).length,t=0;t-1&&c>v&&(t.velocity.normalize().scale(v),c=v),t.speed=c},separate:function(t,e,i,n,s,r){if(!r&&!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var o=t.isCircle?e:t,a=t.isCircle?t:e,h={x:o.x,y:o.y,right:o.right,bottom:o.bottom},l=a.center;if((l.yh.bottom)&&(l.xh.right))return this.separateCircle(t,e,s)}var u=!1,d=!1;s?(u=_(t,e,s,this.OVERLAP_BIAS),d=A(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)o.right&&(r=l(a.x,a.y,o.right,o.y)-a.radius):a.y>o.bottom&&(a.xo.right&&(r=l(a.x,a.y,o.right,o.bottom)-a.radius)),r*=-1}else r=t.halfWidth+e.halfWidth-l(t.center.x,t.center.y,e.center.x,e.center.y);if(t.overlapR=r,e.overlapR=r,i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r&&(t.onOverlap||e.onOverlap)&&this.emit(c.OVERLAP,t.gameObject,e.gameObject,t,e),0!==r;var h=t.center.x-e.center.x,u=t.center.y-e.center.y,d=Math.sqrt(Math.pow(h,2)+Math.pow(u,2)),f=(e.center.x-t.center.x)/d||0,p=(e.center.y-t.center.y)/d||0,y=2*(t.velocity.x*f+t.velocity.y*p-e.velocity.x*f-e.velocity.y*p)/(t.mass+e.mass);(t.immovable||e.immovable)&&(y*=2),t.immovable||(t.velocity.x=t.velocity.x-y/t.mass*f,t.velocity.y=t.velocity.y-y/t.mass*p),e.immovable||(e.velocity.x=e.velocity.x+y/e.mass*f,e.velocity.y=e.velocity.y+y/e.mass*p),t.immovable||e.immovable||(r/=2);var m=n(t.center,e.center),b=(r+x.EPSILON)*Math.cos(m),T=(r+x.EPSILON)*Math.sin(m);return t.immovable||(t.x-=b,t.y-=T,t.updateCenter()),e.immovable||(e.x+=b,e.y+=T,e.updateCenter()),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(c.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?l(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=r(t.center.x,e.left,e.right),n=r(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body||(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),0))},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,a,l,u=t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none)if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(a=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=y(a,h,l,u,null,e.scene.cameras.main,e.layer);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,u={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1,this.updateCenter()),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=(n.width-t)/2,r=(n.height-e)/2;this.offset.set(s,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i,n){void 0===t&&(t=!0),this.collideWorldBounds=t;var s=void 0!==e,r=void 0!==i;return(s||r)&&(this.worldBounce||(this.worldBounce=new l),s&&(this.worldBounce.x=e),r&&(this.worldBounce.y=i)),void 0!==n&&(this.onWorldBounds=n),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,n){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);var s=this.blocked;i&&(s.left=!0),n&&(s.right=!0)},processY:function(t,e,i,n){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);var s=this.blocked;i&&(s.up=!0),n&&(s.down=!0)},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}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(26),s=i(3),r=new s,o=new s;t.exports=function(t,e,i,s,a,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,r,h,l);var c=r.x,d=r.y;u(t+i,e+s,!1,o,h,l);var f=Math.ceil(o.x),p=Math.ceil(o.y);return n(c,d,f-c,p-d,a,l)}},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(436);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=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,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,o,a,h=[];e;){for(s=0,r=e.children.length;s=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),a=v(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,v,g,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,v=void 0,g=void 0,y=void 0,m=void 0,v=Math.max(f.minX,p.minX),g=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-v)*Math.max(0,m-g),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);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():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e,i){var n=i(533),s=i(535),r=i(248);t.exports=function(t,e,i,o,a,h,l){var u=o.left,c=o.top,d=o.right,f=o.bottom,p=i.faceLeft||i.faceRight,v=i.faceTop||i.faceBottom;if(l||(p=!0,v=!0),!p&&!v)return!1;var g=0,y=0,m=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?m=-1:e.deltaAbsX()0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(536);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(246),s=i(1389);t.exports=function(t,e,i,r){var o=n(t,e,i,r),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateX||e.customSeparateX)return 0!==o||t.embedded&&e.embedded;var l=s.Set(t,e,o);return a||h?(a?s.RunImmovableBody1(l):h&&s.RunImmovableBody2(l),!0):l>0||s.Check()}},function(t,e,i){var n=i(247),s=i(1390);t.exports=function(t,e,i,r){var o=n(t,e,i,r),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateY||e.customSeparateY)return 0!==o||t.embedded&&e.embedded;var l=s.Set(t,e,o);return a||h?(a?s.RunImmovableBody1(l):h&&s.RunImmovableBody2(l),!0):l>0||s.Check()}},function(t,e,i){var n=i(66),s=i(0),r=i(62),o=i(57),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-i*e.originX,e.y-n*e.originY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n=new(i(3));t.exports=function(t,e,i,s){var r=i.tilemapLayer,o=r.cullPaddingX,a=r.cullPaddingY,h=r.tilemap.tileToWorldXY(t,e,n,s,r);return h.x>s.worldView.x+r.scaleX*i.tileWidth*(-o-.5)&&h.xs.worldView.y+r.scaleY*i.tileHeight*(-a-1)&&h.y=0;r--)if(n(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}}else if(2===s){for(o=f;o>=0;o--)for(r=0;l[o]&&r=0;o--)for(r=d;l[o]&&r>=0;r--)if(n(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},function(t,e,i){var n=i(549),s=i(159);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=n(t,e);s(t,a,r,i)}return i}},function(t,e,i){var n=i(139),s=i(76);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY);return{left:s(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:n(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:s(e.worldView.y-r.y,a/2,0,!0)-r.cullPaddingY,bottom:n(e.worldView.bottom-r.y,a/2,0,!0)+r.cullPaddingY}}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r){i||(i=new n);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(s||(s=h.scene.cameras.main),l=h.x+s.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+s.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=r.hexSideLength,d=l+t*o+e%2*(o/2),f=u+e*((a-c)/2+c);return i.set(d,f)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r){i||(i=new n);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(s||(s=h.scene.cameras.main),l=h.x+s.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+s.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+o/2*(t-e),d=u+(t+e)*(a/2);return i.set(c,d)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r){i||(i=new n);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(s||(s=h.scene.cameras.main),l=h.x+s.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+s.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+t*o+e%2*(o/2),d=u+e*(a/2);return i.set(c,d)}},function(t,e,i){var n=i(253),s=i(254),r=i(3);t.exports=function(t,e,i,o,a){return i||(i=new r(0,0)),i.x=n(t,o,a),i.y=s(e,o,a),i}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY);var o=s.tilemap.hexSideLength;return r+t*((n-o)/2+o)}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*(n/2)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o){s||(s=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=o.hexSideLength,c=(h-u)/2+u,d=i?Math.floor(e/c):e/c,f=i?Math.floor((t-d%2*.5*a)/a):(t-d%2*.5*a)/a;return s.set(f,d)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o){s||(s=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor((t/(a/2)+e/(h/2))/2):(t/(a/2)+e/(h/2))/2,c=i?Math.floor((e/(h/2)-t/(a/2))/2):(e/(h/2)-t/(a/2))/2;return s.set(u,c)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o){s||(s=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*a)/a):(t+u%2*.5*a)/a;return s.set(c,u)}},function(t,e,i){var n=i(255),s=i(256),r=i(3);t.exports=function(t,e,i,o,a,h){return void 0===i&&(i=!0),o||(o=new r(0,0)),o.x=n(t,i,a,h),o.y=s(e,i,a,h),o}},function(t,e){t.exports=function(t,e,i,n){var s=n.baseTileHeight,r=n.tilemapLayer;r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),s*=r.scaleY);var o=n.hexSideLength,a=(s-o)/2+o;return e?Math.floor(t/a):t/a}},function(t,e){t.exports=function(t,e,i,n){var s=n.baseTileHeight,r=n.tilemapLayer;return r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),s*=r.scaleY),e?Math.floor(t/(s/2)):t/(s/2)}},function(t,e,i){var n=i(119);t.exports=function(t,e,i){if(n(t,e,i)){var s=i.data[e][t];return null!==s&&s.index>-1}return!1}},function(t,e,i){var n=i(85),s=i(119),r=i(252);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,a.tileWidth,a.tileHeight),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(40),s=i(259),r=i(565),o=i(566),a=i(577);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(40),s=i(259);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map((function(t){return t.split(",")})),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(567),s=i(568),r=i(29),o=i(40),a=i(258),h=i(121),l=i(569),u=i(570),c=i(573),d=i(575);t.exports=function(t,e,i){var f=new h({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:a(e.orientation),format:o.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});f.orientation===r.HEXAGONAL&&(f.hexSideLength=e.hexsidelength),f.layers=c(e,i),f.images=l(e);var p=d(e);return f.tilesets=p.tilesets,f.imageCollections=p.imageCollections,f.objects=u(e),f.tiles=s(f),n(f),f}},function(t,e,i){var n=i(17);t.exports=function(t){for(var e,i,s,r,o,a=0;a0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){var n=i(2),s=i(260),r=i(572),o=i(161);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;d0;)if(f.i>=f.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}f=d.pop()}else{var p=f.layers[f.i];if(f.i++,"tilelayer"===p.type)if(p.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+p.name+"'");else{if(p.encoding&&"base64"===p.encoding){if(p.chunks)for(var v=0;v0?((m=new u(g,y.gid,L,k,t.tilewidth,t.tileheight)).rotation=y.rotation,m.flipX=y.flipped,b[k][L]=m):(x=e?null:new u(g,-1,L,k,t.tilewidth,t.tileheight),b[k][L]=x),++T===A.width&&(P++,T=0)}}else{(g=new h({name:f.name+p.name,x:f.x+a(p,"offsetx",0)+p.x,y:f.y+a(p,"offsety",0)+p.y,width:p.width,height:p.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:f.opacity*p.opacity,visible:f.visible&&p.visible,properties:a(p,"properties",[]),orientation:o(t.orientation)})).orientation===s.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var D=[],F=0,I=p.data.length;F0?((m=new u(g,y.gid,T,b.length,t.tilewidth,t.tileheight)).rotation=y.rotation,m.flipX=y.flipped,D.push(m)):(x=e?null:new u(g,-1,T,b.length,t.tilewidth,t.tileheight),D.push(x)),++T===p.width&&(b.push(D),T=0,D=[])}g.data=b,c.push(g)}else if("group"===p.type){var B=r(t,p,f);d.push(f),f=B}}return c}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(122),s=i(576),r=i(260),o=i(1453);t.exports=function(t){for(var e,i=[],a=[],h=null,l=0;l1){var d=void 0,f=void 0;if(Array.isArray(u.tiles)){d=d||{},f=f||{};for(var p=0;p=this.firstgid&&ta&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(120),s=i(85);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(122);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,o,a){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===r.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,o),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=0),(u=new v(t,a,i,n,s,o)).setImage(h),this.tilesets.push(u),u)},copy:function(t,e,i,n,s,r,o,a){return null!==(a=this.getLayer(a))?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankLayer:function(t,e,i,n,s,r,o,h){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===r&&(r=this.height),void 0===o&&(o=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new a({name:t,tileWidth:o,tileHeight:h,width:s,height:r,orientation:this.orientation}),c=0;c-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===h.ORTHOGONAL&&f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return o.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return o.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return o.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,a){return o.Copy(t,e,i,n,s,r,a,this.layer),this},fill:function(t,e,i,n,s,r){return o.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,a){return o.FilterTiles(t,e,i,n,s,r,a,this.layer)},findByIndex:function(t,e,i){return o.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,a){return o.FindTile(t,e,i,n,s,r,a,this.layer)},forEachTile:function(t,e,i,n,s,r,a){return o.ForEachTile(t,e,i,n,s,r,a,this.layer),this},getTileAt:function(t,e,i){return o.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return o.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return o.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return o.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return o.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return o.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return o.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return o.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return o.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return o.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return o.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return o.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return o.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return o.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return o.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return o.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return o.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return o.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return o.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return o.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return o.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return o.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return o.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return o.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,n){return this.tilemap.tileToWorldXY(t,e,i,n,this)},weightedRandomize:function(t,e,i,n,s){return o.WeightedRandomize(e,i,n,s,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,n,s){return this.tilemap.worldToTileXY(t,e,i,n,s,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});t.exports=h},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},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},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(1465);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(6);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(265),s=i(13),r=i(99),o=i(80),a=i(162),h=i(6),l=i(264),u=i(266),c=i(268);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}],v=a(e,"delay",i.delay),g=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),T=a(e,"repeatDelay",i.repeatDelay),w=r(e,"yoyo",i.yoyo),E=[],S=l("value",f),_=c(p[0],0,"value",S.getEnd,S.getStart,S.getActive,m,v,g,w,x,b,T,!1,!1);_.start=d,_.current=d,_.to=f,E.push(_);var A=new u(t,E,p);A.offset=s(e,"offset",null),A.completeDelay=s(e,"completeDelay",0),A.loop=Math.round(s(e,"loop",0)),A.loopDelay=Math.round(s(e,"loopDelay",0)),A.paused=r(e,"paused",!1),A.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",A),O=[A,null],P=u.TYPES,R=0;R_&&(_=O),S[A][C]=O}}}var P=a?n(a):null;return i=h?function(t,e,i,n){var s,r=0,a=n%m,h=Math.floor(n/m);if(a>=0&&a=0&&h0?Math.floor(k/M.length):h(e,"duration",L.duration),L.delay=h(e,"delay",L.delay),L.easeParams=c(e,"easeParams",L.easeParams),L.ease=a(c(e,"ease",L.ease),L.easeParams),L.hold=h(e,"hold",L.hold),L.repeat=h(e,"repeat",L.repeat),L.repeatDelay=h(e,"repeatDelay",L.repeatDelay),L.yoyo=o(e,"yoyo",L.yoyo),L.flipX=o(e,"flipX",L.flipX),L.flipY=o(e,"flipY",L.flipY);for(var D=0;D0?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;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){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 i=this.totalData,n=0;nv&&(v=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=v+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)}))},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;l1;if(!d||t!=d.x||e!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var s={x:f+t,y:p+e};!n&&d||(d=s),v.push(s),y=f+t,m=p+e}},b=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":y=t.x,m=t.y;break;case"H":y=t.x;break;case"V":m=t.y}x(y,m,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),a=this.tile.getCollisionGroup(),c=h(a,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});t.exports=c},function(t,e,i){var n=i(1399);n.Body=i(41),n.Composite=i(118),n.World=i(596),n.Detector=i(273),n.Grid=i(597),n.Pairs=i(598),n.Pair=i(250),n.Query=i(1400),n.Resolver=i(599),n.SAT=i(274),n.Constraint=i(128),n.Common=i(32),n.Engine=i(1401),n.Events=i(166),n.Sleeping=i(165),n.Plugin=i(595),n.Bodies=i(86),n.Composites=i(591),n.Axes=i(271),n.Bounds=i(84),n.Svg=i(592),n.Vector=i(83),n.Vertices=i(64),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,t.exports=n},function(t,e,i){var n={};t.exports=n;var s=i(32);n._registry={},n.register=function(t){if(n.isPlugin(t)||s.warn("Plugin.register:",n.toString(t),"does not implement all required fields."),t.name in n._registry){var e=n._registry[t.name],i=n.versionParse(t.version).number,r=n.versionParse(e.version).number;i>r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],(function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name}));for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(118),r=(i(128),i(32));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var n={};t.exports=n;var s=i(250),r=i(273),o=i(32);n.create=function(t){var e={controller:n,detector:r.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return o.extend(e,t)},n.update=function(t,e,i,s){var r,o,a,h,l,u=i.world,c=t.buckets,d=!1,f=i.metrics;for(f.broadphaseTests=0,r=0;ru.bounds.max.x||p.bounds.max.yu.bounds.max.y)){var v=n._getRegion(t,p);if(!p.region||v.id!==p.region.id||s){f.broadphaseTests+=1,p.region&&!s||(p.region=v);var g=n._regionUnion(v,p.region);for(o=g.startCol;o<=g.endCol;o++)for(a=g.startRow;a<=g.endRow;a++){h=c[l=n._getBucketId(o,a)];var y=o>=v.startCol&&o<=v.endCol&&a>=v.startRow&&a<=v.endRow,m=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!y&&m&&m&&h&&n._bucketRemoveBody(t,h,p),(p.region===v||y&&!m||s)&&(h||(h=n._createBucket(c,l)),n._bucketAddBody(t,h,p))}p.region=v,d=!0}}}d&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,s,r,o)},n._getRegion=function(t,e){var i=e.bounds,s=Math.floor(i.min.x/t.bucketWidth),r=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(s,r,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}},function(t,e,i){var n={};t.exports=n;var s=i(250),r=i(32);n._pairMaxIdleLife=1e3,n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;an._pairMaxIdleLife&&l.push(o);for(o=0;of.friction*f.frictionStatic*D*i&&(I=M,F=o.clamp(f.friction*L*i,-I,I));var B=r.cross(S,y),N=r.cross(_,y),Y=b/(v.inverseMass+g.inverseMass+v.inverseInertia*B*B+g.inverseInertia*N*N);if(k*=Y,F*=Y,P<0&&P*P>n._restingThresh*i)w.normalImpulse=0;else{var X=w.normalImpulse;w.normalImpulse=Math.min(w.normalImpulse+k,0),k=w.normalImpulse-X}if(R*R>n._restingThreshTangent*i)w.tangentImpulse=0;else{var U=w.tangentImpulse;w.tangentImpulse=o.clamp(w.tangentImpulse+F,-I,I),F=w.tangentImpulse-U}s.x=y.x*k+m.x*F,s.y=y.y*k+m.y*F,v.isStatic||v.isSleeping||(v.positionPrev.x+=s.x*v.inverseMass,v.positionPrev.y+=s.y*v.inverseMass,v.anglePrev+=r.cross(S,s)*v.inverseInertia),g.isStatic||g.isSleeping||(g.positionPrev.x-=s.x*g.inverseMass,g.positionPrev.y-=s.y*g.inverseMass,g.anglePrev-=r.cross(_,s)*g.inverseInertia)}}}}},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var n=i(276);t.exports=function(t,e,i,s){for(var r=t[0],o=1;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;hthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.minZoom=s(t,"minZoom",.001),this.maxZoom=s(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=s(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=s(t,"acceleration.x",0),this.accelY=s(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=s(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=s(t,"drag.x",0),this.dragY=s(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var n=s(t,"maxSpeed",null);"number"==typeof n?(this.maxSpeedX=n,this.maxSpeedY=n):(this.maxSpeedX=s(t,"maxSpeed.x",0),this.maxSpeedY=s(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(326),BaseCamera:i(133),CameraManager:i(799),Effects:i(333),Events:i(37)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="followupdate"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(18),s=i(0),r=i(37),o=new s({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,o,a,h){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===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&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=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,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=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(18),s=i(0),r=i(37),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,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.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(r.SHAKE_START,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._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(f=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>f&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?s.rotation+o*r:s.rotation-o*r,s.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,u)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},function(t,e,i){var n=i(18),s=i(0),r=i(134),o=i(37),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===n&&(n=!1),void 0===s&&(s=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._elapsed0){r.preRender();var o=this.getVisibleChildren(e.getChildren(),r);t.render(i,o,r)}}},getVisibleChildren:function(t,e){for(var i=[],n=0;n1)for(var i=1;i=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll")),s)},function(t,e,i){var n=i(136),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return s;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").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){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return i;var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return i;var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;tMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(137);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(137);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(351);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(14);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(183);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(361),IsSize:i(138),IsValue:i(836)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(139),Floor:i(76),To:i(838)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),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>>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;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i,n,s){return t.x=e+s*Math.cos(n),t.y=i+s*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t),s.set(r,o)}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(39),s=i(69),r=i(365),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports="pipelineafterflush"},function(t,e){t.exports="pipelinebeforeflush"},function(t,e){t.exports="pipelinebind"},function(t,e){t.exports="pipelineboot"},function(t,e){t.exports="pipelinedestroy"},function(t,e){t.exports="pipelinerebind"},function(t,e){t.exports="pipelineresize"},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_FS","","precision mediump float;","","varying vec4 outColor;","","void main ()","{"," gl_FragColor = vec4(outColor.bgr * outColor.a, outColor.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec4 inColor;","","varying vec4 outColor;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outColor = inColor;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.bgr * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","precision mediump float;","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(388),Palettes:i(889)}},function(t,e,i){t.exports={ARNE16:i(389),C64:i(890),CGA:i(891),JMP:i(892),MSX:i(893)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(895),MoveTo:i(393),CubicBezier:i(390),Curve:i(94),Ellipse:i(391),Line:i(392),QuadraticBezier:i(394),Spline:i(395)}},function(t,e,i){var n=i(0),s=i(390),r=i(391),o=i(5),a=i(392),h=i(393),l=i(394),u=i(10),c=i(395),d=i(3),f=i(14),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e=0;e--)i.push({r:e,g:o,b:a,color:n(e,o,a)});for(r=0,e=0;e<=s;e++,o--)i.push({r,g:o,b:e,color:n(r,o,e)});for(o=0,a=255,e=0;e<=s;e++,a--,r++)i.push({r,g:o,b:a,color:n(r,o,a)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(38),s=i(399);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){var n=i(188);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(135),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(195),s=i(38);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(398);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){t.exports={BitmapMask:i(310),GeometryMask:i(311)}},function(t,e,i){var n={AddToDOM:i(142),DOMContentLoaded:i(400),GetInnerHeight:i(401),GetScreenOrientation:i(402),GetTarget:i(407),ParseXML:i(408),RemoveFromDOM:i(202),RequestAnimationFrame:i(386)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(919)}},function(t,e,i){var n=i(0),s=i(9),r=i(24),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(142),s=i(321),r=i(325),o=i(31),a=i(0),h=i(346),l=i(921),u=i(366),c=i(101),d=i(384),f=i(347),p=i(400),v=i(9),g=i(22),y=i(409),m=i(24),x=i(414),b=i(415),T=i(417),w=i(106),E=i(422),S=i(385),_=i(387),A=i(426),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new y(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=f,this.scale=new b(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){m.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(w.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),_(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(g.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(g.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),i.emit(g.PRE_RENDER),i.emit(g.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(142);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;ov||c<-v)&&(c=0),c<0&&(c=v+c),-1!==d&&(v=c+(d+1));for(var g=f,y=f,m=0,x=0,b=0;br&&(m=T-r),w>o&&(x=w-o),t.add(b,e,i+g,s+y,h-m,l-x),(g+=h+p)+h>r&&(g=f,y+=l+p)}return t}},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 o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,v=e.cutHeight,g=e.realWidth,y=e.realHeight,m=Math.floor((g-u+c)/(s+c)),x=Math.floor((y-u+c)/(r+c)),b=m*x,T=e.x,w=s-T,E=s-(g-p-T),S=e.y,_=r-S,A=r-(y-v-S);(h>b||h<-b)&&(h=0),h<0&&(h=b+h),-1!==l&&(b=h+(l+1));for(var C=u,O=u,P=0,R=e.sourceIndex,M=0;M0){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 o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i0){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(-1!==i&&is||(t.splice(n,1),s===t.length-1?t.push(e):t.splice(s,0,e)),t}},function(t,e){t.exports=function(t,e,i){if(e===i)return t;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 nt.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(78);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 o=i-e,a=t.splice(e,o);if(s)for(var h=0;h0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var n=i(78);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 o=s;o0){for(s=0;su||V-U>u?(z.push(G.i-1),G.cr?(z.push(G.i+G.word.length),U=0,X=null):X=G):G.cr&&(z.push(G.i+G.word.length),U=0,X=null)}for(s=z.length-1;s>=0;s--)r=h,o=z[s],a="\n",h=r.substr(0,o)+a+r.substr(o+1);n.wrappedText=h,l=h.length,I=[],N=null}var j=0;for(s=0;sS&&(d=S),f>_&&(f=_);var K=S+w.xAdvance,q=_+y;pk&&(k=F),Fk&&(k=F),F0)for(var J=0;J0&&(o=(r=M.wrappedText).length);var L=e._bounds.lines;1===O?R=(L.longest-L.lengths[0])/2:2===O&&(R=L.longest-L.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);for(var k=i.roundPixels,D=0;D0||e.cropHeight>0;p&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var v,g,y=e.frame.glTexture,m=e.tintFill,x=r.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),b=r.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),T=r.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),w=r.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),E=l.setGameObject(e),S=0,_=0,A=0,C=0,O=e.letterSpacing,P=0,R=0,M=e.scrollX,L=e.scrollY,k=e.fontData,D=k.chars,F=k.lineHeight,I=e.fontSize/k.size,B=0,N=e._align,Y=0,X=0,U=e.getTextBounds(!1);e.maxWidth>0&&(h=(a=U.wrappedText).length);var z=e._bounds.lines;1===N?X=(z.longest-z.lengths[0])/2:2===N&&(X=z.longest-z.lengths[0]);var G=i.roundPixels,W=e.displayCallback,V=e.callbackData;t.pipelines.preBatch(e);for(var j=0;j0&&e.cropHeight>0&&(a.beginPath(),a.rect(0,0,e.cropWidth,e.cropHeight),a.clip());for(var B=0;B0&&(U=U%w-w):U>w?U=w:U<0&&(U=w+U%w),null===A&&(A=new h(B+Math.cos(X)*Y,N+Math.sin(X)*Y,g),E.push(A),I+=.01);I<1+G;)T=U*I+X,x=B+Math.cos(T)*Y,b=N+Math.sin(T)*Y,A.points.push(new a(x,b,g)),I+=.01;T=U+X,x=B+Math.cos(T)*Y,b=N+Math.sin(T)*Y,A.points.push(new a(x,b,g));break;case n.FILL_RECT:c.batchFillRect(p[++O],p[++O],p[++O],p[++O],f,d);break;case n.FILL_TRIANGLE:c.batchFillTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],f,d);break;case n.STROKE_TRIANGLE:c.batchStrokeTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],g,f,d);break;case n.LINE_TO:null!==A?A.points.push(new a(p[++O],p[++O],g)):(A=new h(p[++O],p[++O],g),E.push(A));break;case n.MOVE_TO:A=new h(p[++O],p[++O],g),E.push(A);break;case n.SAVE:l.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(l.pop());break;case n.TRANSLATE:B=p[++O],N=p[++O],f.translate(B,N);break;case n.SCALE:B=p[++O],N=p[++O],f.scale(B,N);break;case n.ROTATE:f.rotate(p[++O])}t.pipelines.postBatch(e)}}},function(t,e,i){var n=i(1),s=i(1);n=i(1066),s=i(1067),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),e.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){var n=i(1),s=i(1);n=i(1069),s=i(1070),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),this.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){var n=i(1),s=i(1);n=i(1072),s=i(1073),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=e.list,s=n.length;if(0!==s){e.depthSort(),t.pipelines.preBatch(e);var r=-1!==e.blendMode;r||t.setBlendMode(0);for(var o=e.alpha,a=0;a?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(6);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,f=l.source.height,p=n(e,"offset.x",0),v=n(e,"offset.y",0),g=n(e,"spacing.x",0),y=n(e,"spacing.y",0),m=n(e,"lineSpacing",0),x=n(e,"charsPerRow",null);null===x&&(x=d/i)>a.length&&(x=a.length);for(var b=p,T=v,w={retroFont:!0,font:h,size:i,lineHeight:s+m,chars:{}},E=0,S=0;S0)for(h=o.fillTint,l=s.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,_=0;_0)for(h=o.fillTint,l=s.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,_=0;_0){var P=o.strokeTint,R=s.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(P.TL=R,P.TR=R,P.BL=R,P.BR=R,S=1;S0)for(n(a,e),_=0;_0)for(n(a,e,e.altFillColor,e.altFillAlpha*u),_=0;_0){for(s(a,e,e.outlineFillColor,e.outlineFillAlpha*u),S=1;S0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(66);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(66);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){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(10);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(111);n.Area=i(1202),n.Circumference=i(447),n.CircumferencePoint=i(218),n.Clone=i(1203),n.Contains=i(112),n.ContainsPoint=i(1204),n.ContainsRect=i(1205),n.CopyFrom=i(1206),n.Equals=i(1207),n.GetBounds=i(1208),n.GetPoint=i(445),n.GetPoints=i(446),n.Offset=i(1209),n.OffsetPoint=i(1210),n.Random=i(180),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(111);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(112);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(112);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){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},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,i){var n=i(10);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,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(4),s=i(231);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var v=(l-d)/(u-f),g=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*v-2*g*v-2*l)*o-4*(r=v*v+1)*(l*l+u*u+g*g-c*c-2*u*g))?(h=-o/(2*r),i.push(new n(h,g-h*v))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,g-h*v)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,g-h*v)))}}return i}},function(t,e,i){var n=i(232),s=i(151);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){var n=i(140),s=i(487),r=new(i(47));function o(t,e,i,o,a){var h=Math.cos(t),l=Math.sin(t);r.setTo(e,i,e+h,i+l);var u=s(r,o);u&&a.push(new n(u.x,u.y,t,u.w))}function a(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var n=[],s=[],r=0;r=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s0){var y=u[0],m=[y];for(h=1;h=o&&(m.push(x),y=x)}var b=u[u.length-1];return n(y,b)i&&(i=h.x),h.xr&&(r=h.y),h.y1?(n=i.x,s=i.y):a>0&&(n+=r*a,s+=o*a)}return(r=t.x-n)*r+(o=t.y-s)*o}function n(t,e,s,r,o){for(var a,h=r,l=e+1;lh&&(a=l,h=u)}h>r&&(a-e>1&&n(t,e,a,r,o),o.push(t[a]),s-a>1&&n(t,a,s,r,o))}function s(t,e){var i=t.length-1,s=[t[0]];return n(t,0,i,e,s),s.push(t[i]),s}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var r=e*e;i||(n=function(t,e){for(var i,n,s,r,o,a=t[0],h=[a],l=1,u=t.length;le&&(h.push(i),a=i);return a!==i&&h.push(i),h}(n,r)),t.setTo(s(n,r))}return t}},function(t,e){t.exports=function(t,e,i){for(var n=t.points,s=0;sn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){return void 0===r&&(r=new n),r.setTo(Math.min(t,i),Math.min(e,s),Math.abs(t-i),Math.abs(e-s))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(190);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(10),s=i(152);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(4),s=i(36);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&(this._over[0].splice(n,1),this.manager.resetCursor(i)),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&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s||n>0&&e>=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.worldX-a.dragStartXGlobal,c=t.worldY-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),v=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,v*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=v+a.dragStartY}else s=t.worldX-a.dragX,r=t.worldY-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e,t);for(var h=0;h0){for(this.sortGameObjects(s,t),e=0;e0){for(this.sortGameObjects(r,t),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(y(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},removeAllKeys:function(t){for(var e=this.keys,i=0;it._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",(function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizei&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){var i={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=i},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e){t.exports="collide"},function(t,e){t.exports="overlap"},function(t,e){t.exports="pause"},function(t,e){t.exports="resume"},function(t,e){t.exports="tilecollide"},function(t,e){t.exports="tileoverlap"},function(t,e){t.exports="worldbounds"},function(t,e){t.exports="worldstep"},function(t,e){var i,n,s,r,o,a,h,l,u,c,d,f,p,v,g,y,m,x=function(){return c&&g&&n.blocked.right?(i.processX(-m,h,!1,!0),1):u&&y&&n.blocked.left?(i.processX(m,h,!0),1):p&&y&&i.blocked.right?(n.processX(-m,l,!1,!0),2):f&&g&&i.blocked.left?(n.processX(m,l,!0),2):0},b=function(t){if(s&&r)m*=.5,0===t||3===t?(i.processX(m,o),n.processX(-m,a)):(i.processX(-m,o),n.processX(m,a));else if(s&&!r)0===t||3===t?i.processX(m,h,!0):i.processX(-m,h,!1,!0);else if(!s&&r)0===t||3===t?n.processX(-m,l,!1,!0):n.processX(m,l,!0);else{var e=.5*m;0===t?v?(i.processX(m,0,!0),n.processX(0,null,!1,!0)):p?(i.processX(e,0,!0),n.processX(-e,0,!1,!0)):(i.processX(e,n.velocity.x,!0),n.processX(-e,null,!1,!0)):1===t?d?(i.processX(0,null,!1,!0),n.processX(m,0,!0)):c?(i.processX(-e,0,!1,!0),n.processX(e,0,!0)):(i.processX(-e,null,!1,!0),n.processX(e,i.velocity.x,!0)):2===t?v?(i.processX(-m,0,!1,!0),n.processX(0,null,!0)):f?(i.processX(-e,0,!1,!0),n.processX(e,0,!0)):(i.processX(-e,n.velocity.x,!1,!0),n.processX(e,null,!0)):3===t&&(d?(i.processX(0,null,!0),n.processX(-m,0,!1,!0)):u?(i.processX(e,0,!0),n.processX(-e,0,!1,!0)):(i.processX(e,n.velocity.y,!0),n.processX(-e,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=i.velocity.x,e=n.velocity.x,s=Math.sqrt(e*e*n.mass/i.mass)*(e>0?1:-1),r=Math.sqrt(t*t*i.mass/n.mass)*(t>0?1:-1),h=.5*(s+r);return r-=h,o=h+(s-=h)*i.bounce.x,a=h+r*n.bounce.x,u&&y?b(0):f&&g?b(1):c&&g?b(2):!(!p||!y)&&b(3)},Set:function(t,e,o){n=e;var a=(i=t).velocity.x,b=n.velocity.x;return s=i.pushable,u=i._dx<0,c=i._dx>0,d=0===i._dx,g=Math.abs(i.right-n.x)<=Math.abs(n.right-i.x),h=b-a*i.bounce.x,r=n.pushable,f=n._dx<0,p=n._dx>0,v=0===n._dx,y=!g,l=a-b*n.bounce.x,m=Math.abs(o),x()},Run:b,RunImmovableBody1:function(t){1===t?n.velocity.x=0:g?n.processX(m,l,!0):n.processX(-m,l,!1,!0),i.moves&&(n.y+=(i.y-i.prev.y)*i.friction.y,n._dy=n.y-n.prev.y)},RunImmovableBody2:function(t){2===t?i.velocity.x=0:y?i.processX(m,h,!0):i.processX(-m,h,!1,!0),n.moves&&(i.y+=(n.y-n.prev.y)*n.friction.y,i._dy=i.y-i.prev.y)}}},function(t,e){var i,n,s,r,o,a,h,l,u,c,d,f,p,v,g,y,m,x=function(){return c&&g&&n.blocked.down?(i.processY(-m,h,!1,!0),1):u&&y&&n.blocked.up?(i.processY(m,h,!0),1):p&&y&&i.blocked.down?(n.processY(-m,l,!1,!0),2):f&&g&&i.blocked.up?(n.processY(m,l,!0),2):0},b=function(t){if(s&&r)m*=.5,0===t||3===t?(i.processY(m,o),n.processY(-m,a)):(i.processY(-m,o),n.processY(m,a));else if(s&&!r)0===t||3===t?i.processY(m,h,!0):i.processY(-m,h,!1,!0);else if(!s&&r)0===t||3===t?n.processY(-m,l,!1,!0):n.processY(m,l,!0);else{var e=.5*m;0===t?v?(i.processY(m,0,!0),n.processY(0,null,!1,!0)):p?(i.processY(e,0,!0),n.processY(-e,0,!1,!0)):(i.processY(e,n.velocity.y,!0),n.processY(-e,null,!1,!0)):1===t?d?(i.processY(0,null,!1,!0),n.processY(m,0,!0)):c?(i.processY(-e,0,!1,!0),n.processY(e,0,!0)):(i.processY(-e,null,!1,!0),n.processY(e,i.velocity.y,!0)):2===t?v?(i.processY(-m,0,!1,!0),n.processY(0,null,!0)):f?(i.processY(-e,0,!1,!0),n.processY(e,0,!0)):(i.processY(-e,n.velocity.y,!1,!0),n.processY(e,null,!0)):3===t&&(d?(i.processY(0,null,!0),n.processY(-m,0,!1,!0)):u?(i.processY(e,0,!0),n.processY(-e,0,!1,!0)):(i.processY(e,n.velocity.y,!0),n.processY(-e,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=i.velocity.y,e=n.velocity.y,s=Math.sqrt(e*e*n.mass/i.mass)*(e>0?1:-1),r=Math.sqrt(t*t*i.mass/n.mass)*(t>0?1:-1),h=.5*(s+r);return r-=h,o=h+(s-=h)*i.bounce.y,a=h+r*n.bounce.y,u&&y?b(0):f&&g?b(1):c&&g?b(2):!(!p||!y)&&b(3)},Set:function(t,e,o){n=e;var a=(i=t).velocity.y,b=n.velocity.y;return s=i.pushable,u=i._dy<0,c=i._dy>0,d=0===i._dy,g=Math.abs(i.bottom-n.y)<=Math.abs(n.bottom-i.y),h=b-a*i.bounce.y,r=n.pushable,f=n._dy<0,p=n._dy>0,v=0===n._dy,y=!g,l=a-b*n.bounce.y,m=Math.abs(o),x()},Run:b,RunImmovableBody1:function(t){1===t?n.velocity.y=0:g?n.processY(m,l,!0):n.processY(-m,l,!1,!0),i.moves&&(n.x+=(i.x-i.prev.x)*i.friction.x,n._dx=n.x-n.prev.x)},RunImmovableBody2:function(t){2===t?i.velocity.y=0:y?i.processY(m,h,!0):i.processY(-m,h,!1,!0),n.moves&&(i.x+=(n.x-n.prev.x)*n.friction.x,i._dx=i.x-i.prev.x)}}},function(t,e,i){var n={ProcessTileCallbacks:i(530),ProcessTileSeparationX:i(534),ProcessTileSeparationY:i(536),SeparateTile:i(532),TileCheckX:i(533),TileCheckY:i(535),TileIntersectsBody:i(248)};t.exports=n},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.boundsCenter=new s,this.centerDiff=new s},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,n=t.bounds.max.x-t.bounds.min.x,s=t.bounds.max.y-t.bounds.min.y,r=n*t.centerOfMass.x,o=s*t.centerOfMass.y;return e.set(n/2,s/2),i.set(r-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+n.y+r.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i+n.y+r.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+n.y+r.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+r.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.centerDiff;return new s(e+n.x,i+n.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+r.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i-(n.y-r.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i-(n.y-r.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i-(n.y-r.y))}return!1}});t.exports=r},function(t,e){function i(t,e,i){i=i||0;var n,s,r,o,a,h,l,u=[0,0];return n=t[1][1]-t[0][1],s=t[0][0]-t[1][0],r=n*t[0][0]+s*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],S(l=n*a-o*s,0,i)||(u[0]=(a*r-s*h)/l,u[1]=(n*h-o*r)/l),u}function n(t,e,i,n){var s=e[0]-t[0],r=e[1]-t[1],o=n[0]-i[0],a=n[1]-i[1];if(o*r-a*s==0)return!1;var h=(s*(i[1]-t[1])+r*(t[0]-i[0]))/(o*r-a*s),l=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*s-o*r);return h>=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=T(t);return e.length>0?w(t,e):[t]},quickDecomp:function t(e,i,n,s,l,u,c){u=u||100,c=c||0,l=l||25,i=void 0!==i?i:[],n=n||[],s=s||[];var g=[0,0],y=[0,0],m=[0,0],b=0,T=0,w=0,S=0,_=0,A=0,C=0,O=[],P=[],R=e,M=e;if(M.length<3)return i;if(++c>u)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;L_&&(_+=e.length),S=Number.MAX_VALUE,_3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],s=i-1;s>=0;--s)_(n,t[s],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);return!r(f(t,e-1),f(t,e),f(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))1?1:0;s0&&u.trigger(t,"collisionStart",{pairs:b.collisionStart}),o.preSolvePosition(b.list),s=0;s0&&u.trigger(t,"collisionActive",{pairs:b.collisionActive}),b.collisionEnd.length>0&&u.trigger(t,"collisionEnd",{pairs:b.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(y),u.trigger(t,"afterUpdate",g),t},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_START,e,i,n)})),p.on(e,"collisionActive",(function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,n)})),p.on(e,"collisionEnd",(function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_END,e,i,n)}))},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e-s,s,n+2*s),this.updateWall(o,"right",t+i,e-s,s,n+2*s),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return g.add(this.localWorld,o),o},add:function(t){return g.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;in.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,t-n.counterTimestamp>=1e3&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),h.update(i,e,r)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=o.keys(t.buckets),r=0;r0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=0;s1?1:0;h1?1:0;a1?1:0;a1&&this.renderConvexHull(v,e,f,m)}}},renderBody:function(t,e,i,n,s,r,o,a){void 0===n&&(n=null),void 0===s&&(s=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,f=d>1?1:0;f1){var s=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(s[0].x,s[0].y);for(var r=1;r0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,this},shutdown:function(){p.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=m},function(t,e,i){t.exports={BasePlugin:i(540),DefaultPlugins:i(197),PluginCache:i(24),PluginManager:i(414),ScenePlugin:i(1404)}},function(t,e,i){var n=i(540),s=i(0),r=i(20),o=new s({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){t.exports={Canvas:i(1406),Events:i(91),Snapshot:i(1407),WebGL:i(1408)}},function(t,e,i){t.exports={CanvasRenderer:i(368),GetBlendModes:i(370),SetTransform:i(30)}},function(t,e,i){t.exports={Canvas:i(369),WebGL:i(383)}},function(t,e,i){var n=i(107),s=i(17),r={PipelineManager:i(372),Pipelines:i(1409),RenderTarget:i(141),Utils:i(12),WebGLPipeline:i(58),WebGLRenderer:i(371),WebGLShader:i(375)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(92),s=i(17),r={BitmapMaskPipeline:i(373),Events:i(374),GraphicsPipeline:i(376),LightPipeline:i(377),MultiPipeline:i(108),PointLightPipeline:i(378),PostFXPipeline:i(1410),RopePipeline:i(379),SinglePipeline:i(380),UtilityPipeline:i(381)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(0),s=i(198),r=i(2),o=i(1411),a=i(382),h=i(58),l=new n({Extends:h,initialize:function(t){t.renderTarget=r(t,"renderTarget",1),t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new s,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,n,s){this.manager.copyFrame(t,e,i,n,s)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,n,s){this.manager.blendFrames(t,e,i,n,s)},blendFramesAdditive:function(t,e,i,n,s){this.manager.blendFramesAdditive(t,e,i,n,s)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,n,s,r){this.manager.blitFrame(t,e,i,n,s,r)},copyFrameRect:function(t,e,i,n,s,r,o,a){this.manager.copyFrameRect(t,e,i,n,s,r,o,a)},bindAndDraw:function(t,e,i,n,s){void 0===i&&(i=!0),void 0===n&&(n=!0);var r=this.gl,o=this.renderer;this.bind(s),this.set1i("uMainSampler",0),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0),i&&(n?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1,!1),o.currentFramebuffer||r.viewport(0,0,o.width,o.height)),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),e?(r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null)):o.resetTextures()}});t.exports=l},function(t,e){t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},function(t,e,i){var n=i(17),s=i(201),r={Center:i(403),Events:i(104),Orientation:i(404),ScaleManager:i(415),ScaleModes:i(405),Zoom:i(406)};r=n(!1,r,s.CENTER),r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){var n=i(144),s=i(17),r={Events:i(20),GetPhysicsPlugins:i(419),GetScenePlugins:i(420),SceneManager:i(417),ScenePlugin:i(1414),Settings:i(421),Systems:i(204)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(18),s=i(0),r=i(20),o=i(2),a=i(24),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(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data")),this.systems.events.emit(r.TRANSITION_OUT,i,n),this.systems.events.on(r.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(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,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,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){t.exports={Events:i(438),List:i(110),Map:i(102),ProcessQueue:i(211),RTree:i(531),Set:i(149),Size:i(416)}},function(t,e,i){var n=i(17),s=i(1417),r={CanvasTexture:i(423),Events:i(106),FilterMode:s,Frame:i(109),Parsers:i(425),Texture:i(206),TextureManager:i(422),TextureSource:i(424)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(17),s=i(1419),r={Components:i(251),Parsers:i(1452),Formats:i(40),ImageCollection:i(576),ParseToTilemap:i(262),Tile:i(85),Tilemap:i(580),TilemapCreator:i(1459),TilemapFactory:i(1460),Tileset:i(122),TilemapLayer:i(581),Orientation:i(29),LayerData:i(120),MapData:i(121),ObjectLayer:i(572)};r=n(!1,r,s.ORIENTATION),t.exports=r},function(t,e,i){var n={ORIENTATION:i(29)};t.exports=n},function(t,e,i){var n=i(26),s=i(63);t.exports=function(t,e,i,r,o,a,h,l){void 0===h&&(h=!0),t<0&&(t=0),e<0&&(e=0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(72),s=i(63),r=i(160);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var r,o,a,h={},l={};if(Array.isArray(n.edgecolors))for(r=0;r1||e.scaleY>1)&&(f.imageSmoothingEnabled=!1);for(var v=0;v-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=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-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;t>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(77),DeepCopy:i(175),Extend:i(17),GetAdvancedValue:i(13),GetFastValue:i(2),GetMinMaxValue:i(1485),GetValue:i(6),HasAll:i(1486),HasAny:i(455),HasValue:i(126),IsPlainObject:i(7),Merge:i(127),MergeRight:i(1487),Pick:i(571),SetValue:i(478)}},function(t,e,i){var n=i(6),s=i(18);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var n=k.create(t,e),s=[];return O.point(i,n).forEach((function(t){-1===s.indexOf(t)&&s.push(t)})),s},intersectRect:function(t,e,i,n,s,r){void 0===s&&(s=!1),r=this.getMatterBodies(r);var o={min:{x:t,y:e},max:{x:t+i,y:e+n}},a=[];return O.region(r,o,s).forEach((function(t){-1===a.indexOf(t)&&a.push(t)})),a},intersectRay:function(t,e,i,n,s,r){void 0===s&&(s=1),r=this.getMatterBodies(r);for(var o=[],a=O.ray(r,k.create(t,e),k.create(i,n),s),h=0;h0)for(var o=0;oe.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t+"../"})(),(()=>{"use strict";var t={};i.r(t),i.d(t,{scene1:()=>ds,scene2:()=>fs});var e=i(260);const n={parent:"game",transparent:!0,antialias:!0,physics:{default:"arcade",arcade:{gravity:{y:600},debug:!1}},scale:{parent:"game",mode:Phaser.Scale.FIT,autoCenter:Phaser.Scale.CENTER_HORIZONTALLY,min:{width:320,height:320},max:{width:1980,height:1980}}};function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function r(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:0,i=this.progressObject.getByName("progress");e>0&&(this.progressObject.getByName("progressStart").setVisible(!0),i.setVisible(!0)),this.scene.tweens.add({targets:i,width:this.widthProgressMiddle*e,onComplete:function(){if(1===e){var n=t.progressObject.getByName("progressEnd").setX(i.x+i.displayWidth).setVisible(!0);t.scene.tweens.add({targets:n,width:t.widthProgressCap})}}})}}],i&&E(e.prototype,i),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}(e.GameObjects.Container);function I(){M(this,k,B).call(this),M(this,D,N).call(this),this.add([this.barObject,this.progressObject]),this.setScale(.4)}function B(){var t=this.width,e=this.scene.add.image(0,0,this.atlasName,"bar-left").setOrigin(0),i=t-2*e.displayWidth,n=e.x+e.displayWidth,s=this.scene.add.tileSprite(n,0,i,this.height,this.atlasName,"bar-middle").setOrigin(0),r=s.x+s.displayWidth,o=this.scene.add.image(r,0,this.atlasName,"bar-right").setOrigin(0);this.barObject=this.scene.add.container(-t/2,0,[e,s,o])}function N(){var t=this.width-2*this.padding.x,e=this.scene.add.image(0,0,this.atlasName,"progress-left").setOrigin(0).setName("progressStart").setVisible(!1);this.widthProgressMiddle=t-2*e.displayWidth;var i=e.x+e.displayWidth,n=this.scene.add.tileSprite(i,0,0,86,this.atlasName,"progress-middle").setOrigin(0).setVisible(!1).setName("progress"),s=this.scene.add.image(0,0,this.atlasName,"progress-right").setOrigin(0).setVisible(!1).setName("progressEnd");this.widthProgressCap=s.displayWidth,this.progressObject=this.scene.add.container(-t/2,this.padding.y,[e,n,s])}function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}function X(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i=["posOnGrid"];return Object.keys(this.model).forEach((function(n){i.includes(n)||void 0===e[n]||(t[n]=e[n])})),this}},{key:"clear",value:function(){var t=this.posOnGrid;return Object.assign(this,this.model,{posOnGrid:t}),this}},{key:"reset",value:function(){return Object.assign(this,this.model),this}},{key:"random",value:function(){this.empty=!1;var t=e.Math.Between(0,Z(this,$).length-1),i=Z(this,$)[t];if(!i)throw"Not found frame: ".concat(i);return Object.assign(this,H[i]),this.frame=i,this}}],n&&K(i.prototype,n),s&&K(i,s),Object.defineProperty(i,"prototype",{writable:!1}),t}();function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function it(t,e){for(var i=0;i=0;s--)for(var r=n-1;r>=0;r--)t(r,s)}},{key:"fallTiles",value:function(){var t=this;if(this.getGridTiles()){var e=[];this.eachGridReverse((function(i,n){var s=t.getTile(i,n);if(s&&s.empty){var r=st(t,at,yt).call(t,i,n);r?st(t,ut,bt).call(t,r,i,n):e.push({x:i,y:n})}})),e.forEach((function(e){var i=e.x,n=e.y;t.addToGridTiles(i,n,t.createTileRandom())}))}}},{key:"getNearestTilesByType",value:function(t){var e=t.type,i=t.posOnGrid,n=i.x,s=i.y;return st(this,ht,mt).call(this,n,s,(function(t){return t.type===e}))}},{key:"getNearestTilesRadius",value:function(t,e){t.type;var i=t.posOnGrid,n=i.x,s=i.y;return st(this,ht,mt).call(this,n,s,(function(t){return Math.abs(n-t.posOnGrid.x)<=e&&Math.abs(s-t.posOnGrid.y)<=e}))}},{key:"shuffle",value:function(){}},{key:"removeTiles",value:function(t){var e=this;t.forEach((function(t){var i=t.x,n=t.y;st(e,lt,xt).call(e,i,n)})),this.fallTiles()}}])&&it(e.prototype,i),n&&it(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vt(t,e){var i=e.x,n=e.y;this.posByName[t]={x:i,y:n}}function gt(t){if("string"==typeof t)delete this.posByName[t];else if("object"===et(t))for(var e in this.posByName){var i=this.posByName[e],n=i.x,s=i.y;n===t.x&&s===t.y&&delete this.posByName[e]}}function yt(t,e){var i=this,n=this.grid,s=n.w,r=n.h,o=null;return function t(e,n){if(!(e<0||n<0||e>=r||n>=s)){var a=i.getTile(e,n);a&&(a.empty?t(a.posOnGrid.x,a.posOnGrid.y-1):o=a)}}(t,e),o}function mt(t,e,i){var n=this,s=this.grid,r=s.w,o=s.h,a=[];return function t(e,s){if(!(e<0||s<0||e>=o||s>=r)){var h=n.getTile(e,s);h&&!h.empty&&!h.check&&i(h)&&(a.push({x:e,y:s}),st(n,dt,wt).call(n,e,s,{check:!0}),t(e-1,s),t(e+1,s),t(e,s-1),t(e,s+1))}}(t,e),st(this,ct,Tt).call(this,{check:!1}),a}function xt(t,e){st(this,ot,gt).call(this,{x:t,y:e}),this.getTile(t,e).clear()}function bt(t,e,i){var n=t.posOnGrid.x,s=t.posOnGrid.y;st(this,dt,wt).call(this,e,i,t),st(this,lt,xt).call(this,n,s)}function Tt(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.eachGrid((function(i,n){st(t,dt,wt).call(t,i,n,e)}))}function wt(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.getGridTiles()){var n=this.getTile(t,e);if(n)return i.name&&st(this,rt,vt).call(this,i.name,{x:t,y:e}),n.update(i)}return null}function Et(){var t=this;this.eachGrid((function(e,i){t.addToGridTiles(e,i,t.createTileRandom())}))}function St(t){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(t)}function _t(t,e){for(var i=0;i=this.minTilesTarget;n?this.scene.gridService.removeTiles(i):this.containerTiles.getByName(e.name).unposible();this.emit("clickOnTile",{tile:e,tilesTarget:i,isCondition:n})}function Yt(t){var e=this,i=this.scene.add.tileItem({tile:t}).on("click",(function(){for(var t,i=arguments.length,n=new Array(i),s=0;s3&&void 0!==arguments[3]?arguments[3]:{};return xe(this,r),Ae(Se(n=s.call(this,t,e,i)),Oe),n.options=o,n.imageBg="score-bg",Ce(Se(n),Oe,Re).call(Se(n)),n}return e=r,(i=[{key:"updateMove",value:function(t){this.getByName("movesText").setText("".concat(t))}},{key:"updateScore",value:function(t){this.getByName("scoresNumText").setText("".concat(t))}}])&&be(e.prototype,i),n&&be(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}(e.GameObjects.Container);function Re(){var t=this.scene.configGame,e=t.fontFamily,i=t.colorTextBar,n=this.scene.add.image(0,0,this.imageBg).setOrigin(0,0).setScale(.32),s=this.scene.make.text({x:n.displayWidth/2,y:50,style:{fontSize:80,fontFamily:e,color:i}}).setName("movesText").setOrigin(.5,0),r=this.scene.make.text({x:n.displayWidth/2,y:215,text:"Score:",style:{fontSize:24,fontFamily:e,color:i}}).setOrigin(.5,0),o=this.scene.make.text({x:n.displayWidth/2,y:245,text:"150",style:{fontSize:36,fontFamily:e,color:i}}).setName("scoresNumText").setOrigin(.5,0);this.add([n,s,r,o]),this.setSize(n.displayWidth,n.displayHeight)}function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Le(t,e){for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:{};return Ye(this,r),je(We(n=s.call(this,t,e,i)),Ke),n.options=o,n.widthProgress=1040,n.imageBg="top-bar-bg",He(We(n),Ke,Ze).call(We(n)),n}return e=r,(i=[{key:"updateProgress",value:function(t){this.progress.updateProgress(t)}}])&&Xe(e.prototype,i),n&&Xe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}(e.GameObjects.Container);function Ze(){var t=this.scene.cameras.main.centerX,e=this.scene.configGame,i=e.fontFamily,n=e.colorTextBar;this.setX(t);var s=this.scene.add.image(0,0,this.imageBg).setOrigin(.5,0).setScale(.32),r=this.scene.make.text({x:0,y:6,text:"Progress",style:{fontSize:16,fontFamily:i,color:n}}).setOrigin(.82,0);this.progress=this.scene.add.progressLoader(-32,35,{width:this.widthProgress}),this.add([s,r,this.progress])}function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Qe(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:0;return this.scores+=Mi(this,Li,Di).call(this,t),this}},{key:"resetScores",value:function(){return this.scores=0,this}},{key:"movesDown",value:function(){return this.moves=Math.max(this.moves-1,0),this}},{key:"resetMoves",value:function(){return this.moves=this.movesLimit,this}}],i&&Pi(e.prototype,i),n&&Pi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Di(t){var e=t;return Math.floor(Math.min(t*e,this.scoresTarget/3))}function Fi(t){return Fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fi(t)}function Ii(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.cameras.main,s=n.centerX,r=n.centerY,o={fontFamily:this.configGame.fontFamily,fontSize:50,textAlign:"center",color:this.configGame.colorTextTitle};this.add.text(e||s,i||r,t,o).setOrigin(.5)}}],i&&Bi(e.prototype,i),n&&Bi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}(e.Scene);const Gi=i.p+"assets/img/38f7842598622b0104a5.png",Wi=i.p+"assets/img/c8854cabf0e388da7689.png",Vi=i.p+"assets/img/fee34e44e04efe539b16.json";function ji(t){return ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(t)}function Hi(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};Pn(this,t),Mn(this,Fn),Mn(this,Dn),Ln(this,"emitter",void 0),this.scene=e,this.particlesSprite="particles-spr",this.options=On({scale:.2,maxSpeed:600,life:1e3,gravity:200,maxDelay:200,explosionForce:30},i),kn(this,Dn,Bn).call(this)}var i,n,s;return i=t,n=[{key:"run",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=this.options.maxDelay;this.scene.time.addEvent({delay:e.Math.Between(50,i),callback:kn(this,Fn,Nn),callbackScope:this,repeat:t})}}],n&&Rn(i.prototype,n),s&&Rn(i,s),Object.defineProperty(i,"prototype",{writable:!1}),t}();function Bn(){var t=this.options,e=t.maxSpeed,i=t.scale,n=t.life,s=t.gravity;this.emitter=this.scene.add.particles(this.particlesSprite).createEmitter({speed:{min:-100,max:e},angle:{min:0,max:360},scale:{start:i,end:0},alpha:{start:1,end:.1},lifespan:n,gravityY:s,active:!1,frame:["particle-1","particle-2","particle-3"],blendMode:"SCREEN"})}function Nn(){var t=this.scene.cameras.main,i=t.centerX,n=t.centerY,s=t.width,r=this.options.explosionForce,o=e.Math.Between(i/2,s/1.5),a=e.Math.Between(n/3,n/1.2);this.emitter.active=!0,this.emitter.explode(r,o,a)}function Yn(t){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(t)}function Xn(t,e){for(var i=0;i0}},{key:"activate",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.canAvailable&&(this.active=t),this}},{key:"accept",value:function(){if(this.active){(function(t,e,i){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return i})(this,Es,_s).call(this),this.active=!1;var t=function(t,e){return e.get?e.get.call(t):e.value}(e=this,Ts(e,ws,"get"));return gs(gs({},this),{},{params:t})}var e;return this}}],i&&ms(e.prototype,i),n&&ms(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function _s(){return this.amountLeft=Math.max(this.amountLeft-1,0),this}function As(t,e){for(var i=0;i=this.scoresService.scoresTarget?this.nextLevel():this.scoresService.moves<=0&&this.endDefeat()}},{key:"endDefeat",value:function(){this.stopScene(),this.scene.start("SceneDefeat",{nextScene:this.scene.key})}},{key:"nextLevel",value:function(){var t=this.scoresService.scores;this.stopScene(),"SceneWin"===this.nextScene?this.scene.start(this.nextScene):this.scene.start("SceneNextLevel",{scoreOnLevel:t,nextScene:this.nextScene})}},{key:"stopScene",value:function(){this.scoresService.resetScores().resetMoves(),this.scene.stop()}}],n&&Fs(i.prototype,n),s&&Fs(i,s),Object.defineProperty(i,"prototype",{writable:!1}),o}(zi);function Vs(t){return Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(t)}function js(t,e){for(var i=0;i{var t={861:(t,e,i)=>{"use strict";i.r(e)},260:function(t){var e;e=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,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},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=1528)}([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 a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i0&&(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},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*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},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},function(t,e,i){var n=i(0),s=i(56),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,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=r},function(t,e,i){var n=i(0),s=i(24),r=i(20),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.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.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o=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){t.exports={Alpha:i(607),AlphaSingle:i(303),BlendMode:i(304),ComputedSize:i(608),Crop:i(609),Depth:i(305),Flip:i(610),GetBounds:i(611),Mask:i(309),Origin:i(632),PathFollower:i(633),Pipeline:i(167),ScrollFactor:i(312),Size:i(634),Texture:i(635),TextureCrop:i(636),Tint:i(637),ToJSON:i(176),Transform:i(313),TransformMatrix:i(25),Visible:i(314)}},function(t,e){function i(t){for(var e="",i=0;i0&&(e+="\nelse "),i>>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]},checkShaderMax:function(t,e){e&&-1!==e||(e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));for(var n=t.createShader(t.FRAGMENT_SHADER),s=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");;){var r=s.replace(/%forloop%/gi,i(e));if(t.shaderSource(n,r),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS))break;e=e/2|0}return e},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",n=0;n0&&(i+="\n\telse "),n=400&&t.status<=599&&(n=!1),this.state=s.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},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(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.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)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){var n=i(0),s=i(14),r=i(3),o=new n({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}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var 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],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],v=n[5],g=void 0===e?this:e;return g.a=u*s+c*o,g.b=u*r+c*a,g.c=d*s+f*o,g.d=d*r+f*a,g.e=p*s+v*o+h,g.f=p*r+v*a+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],v=s[4],g=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=v*r+g*a+l,n[5]=v*o+g*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+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],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height),r||(r={});var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n=i(35),s=i(13);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 r=s(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=s(r,"x",1),e.scaleY=s(r,"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 a=s(i,"angle",null);null!==a&&(e.angle=a),e.alpha=s(i,"alpha",1);var h=s(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=s(h,"x",.5),u=s(h,"y",.5);e.setOrigin(l,u)}return 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){t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},function(t,e,i){var n=i(19);t.exports=function(t,e,i,s,r){var o=s.alpha*i.alpha;if(o<=0)return!1;var a=n(i,s,r).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=o,e.save(),a.setToContext(e),e.imageSmoothingEnabled=!(!t.antialias||i.frame&&i.frame.source.scaleMode),!0}},function(t,e,i){var n,s,r,o=i(33),a=i(192),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[3]*i+s[6]*n,this.y=s[1]*e+s[4]*i+s[7]*n,this.z=s[2]*e+s[5]*i+s[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=1/(s[3]*e+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*e+s[4]*i+s[8]*n+s[12])*r,this.y=(s[1]*e+s[5]*i+s[9]*n+s[13])*r,this.z=(s[2]*e+s[6]*i+s[10]*n+s[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],v=s[10],g=s[11],y=s[12],m=s[13],x=s[14],b=1/(e*h+i*d+n*g+s[15]);return this.x=(e*r+i*l+n*f+y)*b,this.y=(e*o+i*u+n*p+m)*b,this.z=(e*a+i*c+n*v+x)*b,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n={};t.exports=n;var s=i(64),r=i(83),o=i(165),a=i(32),h=i(84),l=i(271);!function(){n._inertiaScale=4,n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,n.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=s.centre(e.vertices):e.hasOwnProperty("vertices")||(i.vertices=s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var n=a.extend(i,e);return t(n,e),n.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},n},n.nextGroup=function(t){return t?n._nextNonCollidingGroupId--:n._nextCollidingGroupId++},n.nextCategory=function(){return n._nextCategory=n._nextCategory<<1,n._nextCategory};var t=function(t,e){e=e||{},n.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||r.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t});var i=t.bounds;if(s.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(i,t.vertices,t.velocity),n.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var o=t.centerOfMass,a=t.centerOffset,u=i.max.x-i.min.x,c=i.max.y-i.min.y;o.x=-(i.min.x-t.position.x)/u,o.y=-(i.min.y-t.position.y)/c,a.x=u*o.x,a.y=c*o.y}};n.set=function(t,e,i){var s;for(s in"string"==typeof e&&(s=e,(e={})[s]=i),e)if(Object.prototype.hasOwnProperty.call(e,s))switch(i=e[s],s){case"isStatic":n.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":n.setMass(t,i);break;case"density":n.setDensity(t,i);break;case"inertia":n.setInertia(t,i);break;case"vertices":n.setVertices(t,i);break;case"position":n.setPosition(t,i);break;case"angle":n.setAngle(t,i);break;case"velocity":n.setVelocity(t,i);break;case"angularVelocity":n.setAngularVelocity(t,i);break;case"parts":n.setParts(t,i);break;case"centre":n.setCentre(t,i);break;default:t[s]=i}},n.setStatic=function(t,e){for(var i=0;i0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(0),s=i(307),r=i(172),o=i(56),a=i(173),h=i(3),l=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.type=o.LINE,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 h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),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=l},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){var s=[];n.forEach((function(t){t&&s.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var r=0;r=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(0),s=i(175),r=i(9),o=i(374),a=i(2),h=i(69),l=i(91),u=i(141),c=i(12),d=i(375),f=new n({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,n=i.gl;this.name=a(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=n,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.topology=a(t,"topology",n.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.currentUnit=0,this.forceZero=a(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1},boot:function(){var t,e=this.gl,i=this.config,n=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var s=this.renderTargets,r=a(i,"renderTarget",!1);"boolean"==typeof r&&r&&(r=1);var c=n.width,d=n.height;if("number"==typeof r)for(t=0;ty&&(y=g[t].vertexSize);var m=a(i,"batchSize",n.config.batchSize);this.vertexCapacity=6*m;var x=new ArrayBuffer(this.vertexCapacity*y);this.vertexData=x,this.bytes=new Uint8Array(x),this.vertexViewF32=new Float32Array(x),this.vertexViewU32=new Uint32Array(x);var b=a(i,"vertices",null);for(b?(this.vertexViewF32.set(b),this.vertexBuffer=n.createVertexBuffer(x,e.STATIC_DRAW)):this.vertexBuffer=n.createVertexBuffer(x.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=g.length-1;t>=0;t--)g[t].rebind();this.hasBooted=!0,n.on(l.RESIZE,this.resize,this),n.on(l.PRE_RENDER,this.onPreRender,this),n.on(l.RENDER,this.onRender,this),n.on(l.POST_RENDER,this.onPostRender,this),this.emit(o.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e){var i=this.renderer;return t===this.currentShader&&i.currentProgram===this.currentShader.program||(this.flush(),i.resetTextures(),this.setVertexBuffer()&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t),this},getShaderByName:function(t){for(var e=this.shaders,i=0;ithis.vertexCapacity},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,n=0;n=0;i--){var n=e[i].rebind();t&&n!==t||(this.currentShader=n)}return this.emit(o.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(){var t=this.gl,e=this.vertexBuffer;return t.getParameter(t.ARRAY_BUFFER_BINDING)!==e&&(t.bindBuffer(t.ARRAY_BUFFER,e),!0)},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(o.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,n=this.currentShader.vertexSize;this.active&&(this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*n)),e.drawArrays(this.topology,0,i)),this.vertexCount=0,this.emit(o.AFTER_FLUSH,this,t),this.onAfterFlush(t)}return this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(t,e,i,n,s,r,o){var a=this.vertexViewF32,h=this.vertexViewU32,l=this.vertexCount*this.currentShader.vertexComponentCount-1;a[++l]=t,a[++l]=e,a[++l]=i,a[++l]=n,a[++l]=s,a[++l]=r,h[++l]=o,this.vertexCount++},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,v,g,y,m,x){void 0===x&&(x=this.currentUnit);var b=!1;return this.shouldFlush(6)&&(this.flush(),b=!0,x=this.setTexture2D(m)),this.batchVert(e,i,l,u,x,y,f),this.batchVert(n,s,l,d,x,y,v),this.batchVert(r,o,c,d,x,y,g),this.batchVert(e,i,l,u,x,y,f),this.batchVert(r,o,c,d,x,y,g),this.batchVert(a,h,c,u,x,y,p),this.onBatch(t),b},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,v,g){void 0===g&&(g=this.currentUnit);var y=!1;return this.shouldFlush(3)&&(this.flush(),y=!0,g=this.setTexture2D(v)),this.batchVert(e,i,a,h,g,p,c),this.batchVert(n,s,a,u,g,p,d),this.batchVert(r,o,l,u,g,p,f),this.onBatch(t),y},drawFillRect:function(t,e,i,n,s,r,o,a){void 0===o&&(o=this.renderer.whiteTexture.glTexture),void 0===a&&(a=!0),t=Math.floor(t),e=Math.floor(e);var h=Math.floor(t+i),l=Math.floor(e+n),u=this.setTexture2D(o),d=c.getTintAppendFloatAlphaAndSwap(s,r),f=0,p=1;a&&(f=1,p=0),this.batchQuad(null,t,e,t,l,h,l,h,e,0,f,1,p,d,d,d,d,0,o,u)},setTexture2D:function(t){return void 0===t&&(t=this.renderer.whiteTexture.glTexture),this.currentUnit=this.renderer.setTexture2D(t),this.currentUnit},bindTexture:function(t,e){void 0===e&&(e=0);var i=this.gl;return i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,t),this},bindRenderTarget:function(t,e){return this.bindTexture(t.texture,e)},setTime:function(t){return this.set1f(t,this.game.loop.getDuration()),this},set1f:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1f(t,e),this},set2f:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.set2f(t,e,i),this},set3f:function(t,e,i,n,s){return void 0===s&&(s=this.currentShader),s.set3f(t,e,i,n),this},set4f:function(t,e,i,n,s,r){return void 0===r&&(r=this.currentShader),r.set4f(t,e,i,n,s),this},set1fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1fv(t,e),this},set2fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2fv(t,e),this},set3fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3fv(t,e),this},set4fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4fv(t,e),this},set1iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1iv(t,e),this},set2iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2iv(t,e),this},set3iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3iv(t,e),this},set4iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4iv(t,e),this},set1i:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1i(t,e),this},set2i:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.set2i(t,e,i),this},set3i:function(t,e,i,n,s){return void 0===s&&(s=this.currentShader),s.set3i(t,e,i,n),this},set4i:function(t,e,i,n,s,r){return void 0===r&&(r=this.currentShader),r.set4i(t,e,i,n,s),this},setMatrix2fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix2fv(t,e,i),this},setMatrix3fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix3fv(t,e,i),this},setMatrix4fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix4fv(t,e,i),this},destroy:function(){var t;this.emit(o.DESTROY,this);var e=this.shaders;for(t=0;t80*i){n=h=t[0],a=l=t[1];for(var b=i;bh&&(h=u),f>l&&(l=f);p=0!==(p=Math.max(h-n,l-a))?1/p:0}return o(m,x,i,n,a,p),x}function s(t,e,i,n,s){var r,o;if(s===O(t,e,i,n)>0)for(r=e;r=e;r-=n)o=_(r,t[r],t[r+1],o);return o&&x(o,o.next)&&(A(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!x(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(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=p(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,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var f,v,g=t;t.prev!==t.next;)if(f=t.prev,v=t.next,c?h(t,n,s,c):a(t))e.push(f.i/i),e.push(t.i/i),e.push(v.i/i),A(t),t=v.next,g=v.next;else if((t=v)===g){d?1===d?o(t=l(r(t),e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(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)&&m(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,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=p(a,h,e,i,n),d=p(l,u,e,i,n),f=t.prevZ,v=t.nextZ;f&&f.z>=c&&v&&v.z<=d;){if(f!==t.prev&&f!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&m(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&m(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,o=n.next.next;!x(s,o)&&b(s,n,n.next,o)&&E(s,o)&&E(o,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(o.i/i),A(n),A(n.next),n=t=o),n=n.next}while(n!==t);return r(n)}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&y(h,l)){var u=S(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.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,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x||n.x===i.x&&f(i,n)))&&(i=n,d=h)),n=n.next}while(n!==l);return i}(t,e),e){var i=S(e,t);r(e,e.next),r(i,i.next)}}function f(t,e){return m(t.prev,t,e.prev)<0&&m(e.next,t,t.next)<0}function p(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 v(t){var e=t,i=t;do{(e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function y(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&&b(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(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)&&(m(t.prev,t,e.prev)||m(t,e.prev,e))||x(t,e)&&m(t.prev,t,t.next)>0&&m(e.prev,e,e.next)>0)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,i,n){var s=w(m(t,e,i)),r=w(m(t,e,n)),o=w(m(i,n,t)),a=w(m(i,n,e));return s!==r&&o!==a||!(0!==s||!T(t,i,e))||!(0!==r||!T(t,n,e))||!(0!==o||!T(i,t,n))||!(0!==a||!T(i,e,n))}function T(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function w(t){return t>0?1:t<0?-1:0}function E(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function S(t,e){var i=new C(t.i,t.x,t.y),n=new C(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 _(t,e,i,n){var s=new C(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 C(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 O(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i},t.exports=n},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e,i){var n=i(0),s=i(21),r=i(23),o=i(8),a=i(2),h=i(6),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw console.warn("Invalid JSON: "+this.key),this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var s=0;s0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort((function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y})),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n=i(0),s=i(66),r=i(300),o=i(301),a=i(56),h=i(170),l=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,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 o(this,t,e,i)},getRandomPoint:function(t){return h(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=l},function(t,e){t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},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(39),r=1e-6,o=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new o(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=s,g[5]=r,g[6]=o,g[7]=a,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=f,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=a.fromQuat(i).val,s=e.x,r=e.y,o=e.z;return this.setValues(n[0]*s,n[1]*s,n[2]*s,0,n[4]*r,n[5]*r,n[6]*r,0,n[8]*o,n[9]*o,n[10]*o,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15],y=e*o-i*r,m=e*a-n*r,x=e*h-s*r,b=i*a-n*o,T=i*h-s*o,w=n*h-s*a,E=l*p-u*f,S=l*v-c*f,_=l*g-d*f,A=u*v-c*p,C=u*g-d*p,O=c*g-d*v,P=y*O-m*C+x*A+b*_-T*S+w*E;return P?(P=1/P,this.setValues((o*O-a*C+h*A)*P,(n*C-i*O-s*A)*P,(p*w-v*T+g*b)*P,(c*T-u*w-d*b)*P,(a*_-r*O-h*S)*P,(e*O-n*_+s*S)*P,(v*x-f*w-g*m)*P,(l*w-c*x+d*m)*P,(r*C-o*_+h*E)*P,(i*_-e*C-s*E)*P,(f*T-p*x+g*y)*P,(u*x-l*T-d*y)*P,(o*S-r*A-a*E)*P,(e*A-i*S+n*E)*P,(p*m-f*b-v*y)*P,(l*b-u*m+c*y)*P)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return this.setValues(o*(c*g-d*v)-u*(a*g-h*v)+p*(a*d-h*c),-(i*(c*g-d*v)-u*(n*g-s*v)+p*(n*d-s*c)),i*(a*g-h*v)-o*(n*g-s*v)+p*(n*h-s*a),-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),-(r*(c*g-d*v)-l*(a*g-h*v)+f*(a*d-h*c)),e*(c*g-d*v)-l*(n*g-s*v)+f*(n*d-s*c),-(e*(a*g-h*v)-r*(n*g-s*v)+f*(n*h-s*a)),e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),r*(u*g-d*p)-l*(o*g-h*p)+f*(o*d-h*u),-(e*(u*g-d*p)-l*(i*g-s*p)+f*(i*d-s*u)),e*(o*g-h*p)-r*(i*g-s*p)+f*(i*h-s*o),-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),-(r*(u*v-c*p)-l*(o*v-a*p)+f*(o*c-a*u)),e*(u*v-c*p)-l*(i*v-n*p)+f*(i*c-n*u),-(e*(o*v-a*p)-r*(i*v-n*p)+f*(i*a-n*o)),e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return(e*o-i*r)*(c*g-d*v)-(e*a-n*r)*(u*g-d*p)+(e*h-s*r)*(u*v-c*p)+(i*a-n*o)*(l*g-d*f)-(i*h-s*o)*(l*v-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],v=e[13],g=e[14],y=e[15],m=t.val,x=m[0],b=m[1],T=m[2],w=m[3];return e[0]=x*i+b*o+T*u+w*p,e[1]=x*n+b*a+T*c+w*v,e[2]=x*s+b*h+T*d+w*g,e[3]=x*r+b*l+T*f+w*y,x=m[4],b=m[5],T=m[6],w=m[7],e[4]=x*i+b*o+T*u+w*p,e[5]=x*n+b*a+T*c+w*v,e[6]=x*s+b*h+T*d+w*g,e[7]=x*r+b*l+T*f+w*y,x=m[8],b=m[9],T=m[10],w=m[11],e[8]=x*i+b*o+T*u+w*p,e[9]=x*n+b*a+T*c+w*v,e[10]=x*s+b*h+T*d+w*g,e[11]=x*r+b*l+T*f+w*y,x=m[12],b=m[13],T=m[14],w=m[15],e[12]=x*i+b*o+T*u+w*p,e[13]=x*n+b*a+T*c+w*v,e[14]=x*s+b*h+T*d+w*g,e[15]=x*r+b*l+T*f+w*y,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,s=i[0],r=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],f=i[6],p=i[10],v=i[14],g=i[3],y=i[7],m=i[11],x=i[15],b=n[0],T=n[4],w=n[8],E=n[12],S=n[1],_=n[5],A=n[9],C=n[13],O=n[2],P=n[6],R=n[10],M=n[14],L=n[3],k=n[7],D=n[11],F=n[15];return this.setValues(s*b+r*S+o*O+a*L,h*b+l*S+u*O+c*L,d*b+f*S+p*O+v*L,g*b+y*S+m*O+x*L,s*T+r*_+o*P+a*k,h*T+l*_+u*P+c*k,d*T+f*_+p*P+v*k,g*T+y*_+m*P+x*k,s*w+r*A+o*R+a*D,h*w+l*A+u*R+c*D,d*w+f*A+p*R+v*D,g*w+y*A+m*R+x*D,s*E+r*C+o*M+a*F,h*E+l*C+u*M+c*F,d*E+f*C+p*M+v*F,g*E+y*C+m*M+x*F)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;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},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;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},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.setValues(h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,o=e.z,a=Math.sqrt(n*n+s*s+o*o);if(Math.abs(a)=t.length)){for(var i=t.length-1,n=t[e],s=e;ss||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){function i(t,e){return String(t).localeCompare(e)}function n(t,e,i,n){var s,r,o,a,h,l=t.length,u=0,c=2*i;for(s=0;sl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a=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){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e,i){var n=i(29),s=i(0),r=i(11),o=i(502),a=new s({Mixins:[r.Alpha,r.Flip,r.Visible],initialize:function(t,e,i,n,s,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=s,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==o?o:s,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new o),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===n.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===n.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===n.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===n.HEXAGONAL){var e=this.layer.hexSideLength,i=(this.baseHeight-e)/2+e;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*i}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=a},function(t,e,i){var n={};t.exports=n;var s=i(64),r=i(32),o=i(41),a=i(84),h=i(83),l=i(1393);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(b)1?(d=o.create(r.extend({parts:f.slice(0)},a)),o.setPosition(d,{x:t,y:e}),d):f[0]},n.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i=0;){var h=e[o];-1!==(r=t.indexOf(h))&&(n(t,r),a.push(h),i&&i.call(s,h)),o--}return a}},function(t,e,i){var n=i(0),s=i(199),r=i(10),o=i(3),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++){var s=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(s))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=1e-4,n=t-i,s=t+i;return n<0&&(n=0),s>1&&(s=1),this.getPoint(n,this._tmpVec2A),this.getPoint(s,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(968),COMPLETE:i(969),FILE_COMPLETE:i(970),FILE_KEY_COMPLETE:i(971),FILE_LOAD_ERROR:i(972),FILE_LOAD:i(973),FILE_PROGRESS:i(974),POST_PROCESS:i(975),PROGRESS:i(976),START:i(977)}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(c-l)*(o-s)-(u-h)*(a-r);if(0===d)return!1;var f=((u-h)*(r-l)-(c-l)*(s-h))/d,p=((o-s)*(r-l)-(a-r)*(s-h))/d;return f>=0&&f<=1&&p>=0&&p<=1&&(i.x=s+f*(o-s),i.y=r+f*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(18);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},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,i){var n=i(0),s=i(315),r=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(s.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n2?(i.iOS=!0,i.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/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);return(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),"function"!=typeof importScripts&&(void 0!==window.cordova&&(i.cordova=!0),void 0!==window.ejecta&&(i.ejecta=!0)),void 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),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(807))},function(t,e,i){t.exports={ADD:i(861),ERROR:i(862),LOAD:i(863),READY:i(864),REMOVE:i(865)}},function(t,e){t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},function(t,e,i){var n=i(0),s=i(59),r=i(2),o=i(878),a=i(879),h=i(25),l=i(12),u=i(107),c=i(58),d=new n({Extends:c,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",o);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){c.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,u=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,v=o.cutWidth,g=o.cutHeight,y=o.customPivot,m=t.displayOriginX,x=t.displayOriginY,b=-m+f,T=-x+p;if(t.isCropped){var w=t._crop;w.flipX===t.flipX&&w.flipY===t.flipY||o.updateCropUVs(w,t.flipX,t.flipY),h=w.u0,u=w.v0,c=w.u1,d=w.v1,v=w.width,g=w.height,b=-m+(f=w.x),T=-x+(p=w.y)}var E=1,S=1;t.flipX&&(y||(b+=-o.realWidth+2*m),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(y||(T+=-o.realHeight+2*x),S=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*E,t.scaleY*S),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY),n.multiply(s,r);var _=b+v,A=T+g,C=e.roundPixels,O=r.getXRound(b,T,C),P=r.getYRound(b,T,C),R=r.getXRound(b,A,C),M=r.getYRound(b,A,C),L=r.getXRound(_,A,C),k=r.getYRound(_,A,C),D=r.getXRound(_,T,C),F=r.getYRound(_,T,C),I=l.getTintAppendFloatAlpha,B=e.alpha,N=I(t.tintTopLeft,B*t._alphaTL),Y=I(t.tintTopRight,B*t._alphaTR),X=I(t.tintBottomLeft,B*t._alphaBL),U=I(t.tintBottomRight,B*t._alphaBR);this.shouldFlush(6)&&this.flush();var z=this.setGameObject(t,o);this.manager.preBatch(t),this.batchQuad(t,O,P,R,M,L,k,D,F,h,u,c,d,N,Y,X,U,t.tintFill,a,z),this.manager.postBatch(t)},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,v,g,y,m,x,b,T,w,E,S,_,A,C,O,P,R,M){this.manager.set(this,t);var L=this._tempMatrix1,k=this._tempMatrix2,D=this._tempMatrix3,F=y/i+A,I=m/n+C,B=(y+x)/i+A,N=(m+b)/n+C,Y=o,X=a,U=-v,z=-g;if(t.isCropped){var G=t._crop,W=G.width,V=G.height;Y=W,X=V,o=W,a=V;var j=y=G.x,H=m=G.y;c&&(j=x-G.x-W),d&&(H=b-G.y-V),F=j/i+A,I=H/n+C,B=(j+W)/i+A,N=(H+V)/n+C,U=-v+y,z=-g+m}c&&(Y*=-1,U+=o),(d^=!R&&e.isRenderTexture?1:0)&&(X*=-1,z+=a);var K=U+Y,q=z+X;k.applyITRS(s,r,u,h,l),L.copyFrom(O.matrix),P?(L.multiplyWithOffset(P,-O.scrollX*f,-O.scrollY*p),k.e=s,k.f=r):(k.e-=O.scrollX*f,k.f-=O.scrollY*p),L.multiply(k,D);var Z=O.roundPixels,J=D.getXRound(U,z,Z),Q=D.getYRound(U,z,Z),$=D.getXRound(U,q,Z),tt=D.getYRound(U,q,Z),et=D.getXRound(K,q,Z),it=D.getYRound(K,q,Z),nt=D.getXRound(K,z,Z),st=D.getYRound(K,z,Z);void 0===M&&(M=this.renderer.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,J,Q,$,tt,et,it,nt,st,F,I,B,N,T,w,E,S,_,e,M),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,n,s,r,o){this.manager.set(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),v=h.getY(e,c),g=h.getX(u,c),y=h.getY(u,c),m=h.getX(u,i),x=h.getY(u,i),b=this.renderer.setTextureSource(t.source);n=l.getTintAppendFloatAlpha(n,s),this.batchQuad(null,d,f,p,v,g,y,m,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,b)},batchFillRect:function(t,e,i,n,s,r){this.renderer.pipelines.set(this);var o=this.calcMatrix;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),v=o.getX(a,e),g=o.getY(a,e),y=this.fillTint;this.batchQuad(null,l,u,c,d,f,p,v,g,0,0,1,1,y.TL,y.TR,y.BL,y.BR,2)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),v=this.fillTint;this.batchTri(null,l,u,c,d,f,p,0,0,1,1,v.TL,v.TR,v.BL,2)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&X[4]?this.batchQuad(null,k,D,P,R,X[0],X[1],X[2],X[3],0,0,1,1,I,B,N,Y,2):(U[0]=k,U[1]=D,U[2]=P,U[3]=R,U[4]=1),h&&U[4]?this.batchQuad(null,C,O,M,L,U[0],U[1],U[2],U[3],0,0,1,1,I,B,N,Y,2):(X[0]=C,X[1]=O,X[2]=M,X[3]=L,X[4]=1)}}});t.exports=d},function(t,e,i){var n=i(0),s=i(18),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+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()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),v=l+(i=s(i,0,f)),g=n=s(n,0,d-e),y=r=s(r,0,f-i),m=this.data;if(m.trim){var x=m.spriteSourceSize,b=e+(n=s(n,0,u-e)),T=i+(r=s(r,0,c-i));if(x.rb||x.y>T)p=0,v=0,g=0,y=0;else{var w=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,b)-w,_=Math.min(x.b,T)-E;g=S,y=_,p=o?h+(u-(w-x.x)-S):h+(w-x.x),v=a?l+(c-(E-x.y)-_):l+(E-x.y),e=w,i=E,n=S,r=_}}else o&&(p=h+(u-e-n)),a&&(v=l+(c-i-r));var A=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/A),t.v0=Math.max(0,v/C),t.u1=Math.min(1,(p+g)/A),t.v1=Math.min(1,(v+y)/C),t.x=e,t.y=i,t.cx=p,t.cy=v,t.cw=g,t.ch=y,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(208),s=i(0),r=i(1),o=i(79),a=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,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o(this.list,e),this):this},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.GetFirst(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)},moveAbove:function(t,e){return n.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return n.MoveBelow(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;n0?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.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(0),s=i(112),r=i(445),o=i(446),a=i(56),h=i(180),l=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.type=a.ELLIPSE,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 o(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.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=l},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,i){var n=i(275),s=i(0),r=i(75),o=i(9),a=i(207),h=i(2),l=i(6),u=i(7),c=i(437),d=i(149),f=i(73),p=new s({Extends:o,initialize:function(t,e,i){o.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?u(e[0])&&(i=e,e=null):u(e)&&(i=e,e=null),this.scene=t,this.children=new d,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",f),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return o.addToDisplayList(this.scene.sys.displayList),o.addToUpdateList(),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=0&&y>=0&&g+y<1}},function(t,e,i){var n=i(0),s=i(10),r=i(3);function o(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}var a=new n({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new s,this._inCenter=new r},getInCenter:function(t){void 0===t&&(t=!0);var e,i,n,s,r,a,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,n=l.x,s=l.y,r=u.x,a=u.y):(e=h.vx,i=h.vy,n=l.vx,s=l.vy,r=u.vx,a=u.vy);var c=o(r,a,n,s),d=o(e,i,r,a),f=o(n,s,e,i),p=c+d+f;return this._inCenter.set((e*c+n*d+r*f)/p,(i*c+s*d+a*f)/p)},contains:function(t,e,i){var n=this.vertex1,s=this.vertex2,r=this.vertex3,o=n.vx,a=n.vy,h=s.vx,l=s.vy,u=r.vx,c=r.vy;if(i){var d=i.a,f=i.b,p=i.c,v=i.d,g=i.e,y=i.f;o=n.vx*d+n.vy*p+g,a=n.vx*f+n.vy*v+y,h=s.vx*d+s.vy*p+g,l=s.vx*f+s.vy*v+y,u=r.vx*d+r.vy*p+g,c=r.vx*f+r.vy*v+y}var m=u-o,x=c-a,b=h-o,T=l-a,w=t-o,E=e-a,S=m*m+x*x,_=m*b+x*T,A=m*w+x*E,C=b*b+T*T,O=b*w+T*E,P=S*C-_*_,R=0===P?0:1/P,M=(C*A-_*O)*R,L=(S*O-_*A)*R;return M>=0&&L>=0&&M+L<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,n=this.vertex3,s=(i.vx-e.vx)*(n.vy-e.vy)-(i.vy-e.vy)*(n.vx-e.vx);return t<=0?s>=0:s<0},load:function(t,e,i,n,s){return i=this.vertex1.load(t,e,i,n,s),i=this.vertex2.load(t,e,i,n,s),i=this.vertex3.load(t,e,i,n,s)},transformCoordinatesLocal:function(t,e,i,n){return this.vertex1.transformCoordinatesLocal(t,e,i,n),this.vertex2.transformCoordinatesLocal(t,e,i,n),this.vertex3.transformCoordinatesLocal(t,e,i,n),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,n=this.bounds;return n.x=Math.min(t.vx,e.vx,i.vx),n.y=Math.min(t.vy,e.vy,i.vy),n.width=Math.max(t.vx,e.vx,i.vx)-n.x,n.height=Math.max(t.vy,e.vy,i.vy)-n.y,this},isInView:function(t,e,i,n,s,r,o,a,h,l,u){var c=this.vertex1.update(s,r,o,a,h,l,u,n),d=this.vertex2.update(s,r,o,a,h,l,u,n),f=this.vertex3.update(s,r,o,a,h,l,u,n);if(c.ta<=0&&d.ta<=0&&f.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var p=this.bounds;p.x=Math.min(c.tx,d.tx,f.tx),p.y=Math.min(c.ty,d.ty,f.ty),p.width=Math.max(c.tx,d.tx,f.tx)-p.x,p.height=Math.max(c.ty,d.ty,f.ty)-p.y;var v=t.x+t.width,g=t.y+t.height;return!(p.width<=0||p.height<=0||t.width<=0||t.height<=0||p.rightv||p.y>g)},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,n=this.vertex2,s=this.vertex3;return i.x+=t,i.y+=e,n.x+=t,n.y+=e,s.x+=t,s.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(12),r=i(39),o=new n({Extends:r,initialize:function(t,e,i,n,s,o,a,h,l,u){void 0===o&&(o=16777215),void 0===a&&(a=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),r.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=n,this.v=s,this.color=o,this.alpha=a,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,n){var s=this.x,r=this.y,o=this.z,a=t.val,h=s*a[0]+r*a[4]+o*a[8]+a[12],l=s*a[1]+r*a[5]+o*a[9]+a[13],u=s*a[2]+r*a[6]+o*a[10]+a[14],c=s*a[3]+r*a[7]+o*a[11]+a[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=n<=0?u/c:-u/c},update:function(t,e,i,n,s,r,o,a){var h=this.vx*t+this.vy*i+s,l=this.vx*e+this.vy*n+r;return o&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*a,this},load:function(t,e,i,n,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=n,t[++i]=r,e[++i]=s.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(166),r=i(32),o=i(84),a=i(41);n.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},t)},n.setModified=function(t,e,i,r){if(s.trigger(t,"compositeModified",t),t.isModified=e,i&&t.parent&&n.setModified(t.parent,e,i,r),r)for(var o=0;o=0&&t=0&&e=this.firstgid&&t0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}},n.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+t.pointA.x,y:(t.bodyA?t.bodyA.position.y:0)+t.pointA.y}},n.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+t.pointB.x,y:(t.bodyB?t.bodyB.position.y:0)+t.pointB.y}}},function(t,e,i){var n=i(35),s=i(65),r=i(66),o=i(0),a=i(11),h=i(15),l=i(10),u=i(57),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,r){void 0===s&&(s=1),void 0===r&&(r=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=r,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},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,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var n=this.input;return i&&n&&!n.customHitArea&&(n.hitArea.width=t,n.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},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){t.exports={ADD_ANIMATION:i(724),ANIMATION_COMPLETE:i(725),ANIMATION_COMPLETE_KEY:i(726),ANIMATION_REPEAT:i(727),ANIMATION_RESTART:i(728),ANIMATION_START:i(729),ANIMATION_STOP:i(730),ANIMATION_UPDATE:i(731),PAUSE_ALL:i(732),REMOVE_ANIMATION:i(733),RESUME_ALL:i(734)}},function(t,e,i){var n=i(0),s=i(11),r=i(36),o=i(9),a=i(37),h=i(10),l=i(25),u=i(187),c=i(3),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],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),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[]},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.y,p=f+d,v=this.x,g=v+c,y=this.culledObjects,m=t.length;o=1/o,y.length=0;for(var x=0;xv&&E*i+S*s+af&&E*n+S*r+hs&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(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,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},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){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;return this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras,this.updateSystem(),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,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=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},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=d},function(t,e,i){var n=i(334),s=i(335),r=i(336),o=i(337),a=i(338),h=i(339),l=i(340),u=i(341),c=i(342),d=i(343),f=i(344),p=i(345);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){var n,s=i(105),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){t.exports=function(t,e){return Math.random()*(e-t)+t}},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,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=i(0),s=i(91),r=new n({initialize:function(t,e,i,n,s,r,o){void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=!0),void 0===o&&(o=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=n,this.minFilter=s,this.autoClear=r,this.autoResize=!1,this.resize(e,i),o&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(s.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(s.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,n=e*this.scale;if(i!==this.width||n!==this.height){var s=this.renderer;s.deleteFramebuffer(this.framebuffer),s.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=s.createTextureFromSource(null,t,e,this.minFilter),this.framebuffer=s.createFramebuffer(t,e,this.texture,!1),this.width=t,this.height=e}return this},bind:function(t,e,i){if(void 0===t&&(t=!1),t&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear){var n=this.renderer.gl;n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)}},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(s.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=r},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(77),r=i(9),o=i(70),a=i(22),h=i(1),l=i(207),u=i(428),c=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return l(this.sounds,"key",t)},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,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(o.COMPLETE,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)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=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(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.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.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(n,s){n&&!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(o.GLOBAL_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(o.GLOBAL_DETUNE,this,t)}}});t.exports=c},function(t,e,i){var n=i(0),s=i(9),r=i(70),o=i(17),a=i(1),h=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,pan:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name||(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),1):(t=o(!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,pan: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]=o(!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=o(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,this.pan=this.currentConfig.pan},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(r.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=h},function(t,e,i){var n=i(209),s=i(435);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-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;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 to||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(6),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1323),ANY_KEY_UP:i(1324),COMBO_MATCH:i(1325),DOWN:i(1326),KEY_DOWN:i(1327),KEY_UP:i(1328),UP:i(1329)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(243),r=i(73),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Pushable,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){var n=i(119);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return r?-1===r.index?i?r:null:r:null}return null}},function(t,e){t.exports=function(t,e,i,n){var s,r,o,a=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),f=Math.max(0,e.top),p=Math.min(l,e.bottom);if(0===i)for(r=f;r=c;s--)(o=a[r][s])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(2===i)for(r=p;r>=f;r--)for(s=c;a[r]&&s=f;r--)for(s=d;a[r]&&s>=c;s--)(o=a[r][s])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);return u.tilesDrawn=n.length,u.tilesTotal=h*l,n}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var s=e.x+n(e,"startx",0)*t.tilewidth+n(e,"offsetx",0),r=e.y+n(e,"starty",0)*t.tileheight+n(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+s,y:i.y+r}}},function(t,e){t.exports=function(t,e,i){return t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,n,s,r,o,a){return t[e](i,n,s,r,o,a)}:function(){return t[e]}:"function"==typeof i?i:function(){return i}}},function(t,e,i){var n=i(265),s=i(13),r=i(99),o=i(80),a=i(162),h=i(583),l=i(263),u=i(6),c=i(264),d=i(266),f=i(268);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:l(e),v=h(e),g=a(e,"delay",i.delay),y=a(e,"duration",i.duration),m=u(e,"easeParams",i.easeParams),x=o(u(e,"ease",i.ease),m),b=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),E=r(e,"yoyo",i.yoyo),S=r(e,"flipX",i.flipX),_=r(e,"flipY",i.flipY),A=[],C=0;Cn.getTotalFrames()&&(h=0);var l=n.frames[h];0!==h||this.forward||(l=n.getLastFrame()),this.currentFrame=l}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,s="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===s)return n;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(r>0)return this.playAfterDelay(t,r)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter&&this.handleStart(),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim,n=this.currentFrame,s=this.parent,r=n.textureFrame;s.emit(t,i,n,s,r),e&&s.emit(e+i.key,i,n,s,r)},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(o.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):n},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var n=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),n++}while(this.isPlaying&&this.accumulator>this.nextTick&&n<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(o.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new a(this,e,t),this.anims||(this.anims=new s),this.anims.set(e,i))),i},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(o.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=h},function(t,e,i){var n={};t.exports=n;var s=i(166);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n={};t.exports=n;var s=i(32);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0){i||(i={}),n=e.split(" ");for(var l=0;l0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e=this.postPipelines,i=[],n=0;n=0;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),r(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=o},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(4);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,i){var n=i(4);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,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(130),s=i(4);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(67),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=i(18),s=i(0),r=i(132),o=i(318),a=i(319),h=i(6),l=i(320),u=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,n){null===i&&null===n?(t.frameRate=24,t.duration=24/e*1e3):i&&null===n?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=n,t.duration=e/n*1e3),t.msPerFrame=1e3/t.frameRate},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&&t0){r.isLast=!0,r.nextFrame=c[0],c[0].prevFrame=r;var m=1/(c.length-1);for(o=0;o0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),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){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},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,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t=(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(327),s=i(189),r=i(331),o=i(332);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e,i){var n=i(103);function s(t,e,i,n){var s=(t+6*e)%6,r=Math.min(s,4-s,1);return Math.round(255*(n-n*i*Math.max(0,r)))}t.exports=function(t,e,i,r){void 0===e&&(e=1),void 0===i&&(i=1);var o=s(5,t,e,i),a=s(3,t,e,i),h=s(1,t,e,i);return r?r.setTo?r.setTo(o,a,h,r.alpha,!1):(r.r=o,r.g=a,r.b=h,r.color=n(o,a,h),r):{r:o,g:a,b:h,color:n(o,a,h)}}},function(t,e,i){var n=i(38),s=i(330);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){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e,i){var n=i(105),s=i(136),r=i(31),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),n=i.getContext("2d").createImageData(1,1);return a=n.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(o.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},function(t,e){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;i0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=s.START,i.active=!0,i.visible=!0,e.emit(o.START,this),e.emit(o.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(o.TRANSITION_INIT),e.off(o.TRANSITION_START),e.off(o.TRANSITION_COMPLETE),e.off(o.TRANSITION_OUT),i.status=s.SHUTDOWN,i.active=!1,i.visible=!1,this.renderer===l.WEBGL&&this.renderer.resetTextures(!0),e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=s.DESTROYED,e.active=!1,e.visible=!1,t.emit(o.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],n=0;n0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(208),s=i(35),r=i(0),o=i(11),a=i(75),h=i(15),l=i(10),u=i(1052),c=i(441),d=i(3),f=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,s=!1;t.setEmpty();for(var r=0;r-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?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.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},function(t,e,i){var n=i(148),s=i(0),r=i(1057),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(133),s=i(0),r=i(217),o=i(303),a=i(304),h=i(305),l=i(309),u=i(167),c=i(312),d=i(313),f=i(314),p=i(111),v=i(15),g=i(2),y=i(6),m=i(14),x=i(1063),b=new s({Extends:v,Mixins:[o,a,h,l,u,d,f,c,x],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(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},fillGradientStyle:function(t,e,i,n,s,o,a,h){return void 0===s&&(s=1),void 0===o&&(o=s),void 0===a&&(a=s),void 0===h&&(h=s),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,o,a,h,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),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},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke: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,m.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,m.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,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,o=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(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=g(s,"tl",20),o=g(s,"tr",20),a=g(s,"bl",20),h=g(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-m.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,m.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,m.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-m.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=g(s,"tl",20),o=g(s,"tr",20),a=g(s,"bl",20),h=g(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),this.arc(t+i-o,e+o,o,-m.TAU,0),this.lineTo(t+i,e+n-h),this.moveTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,m.TAU),this.lineTo(t+a,e+n),this.moveTo(t+a,e+n),this.arc(t+a,e+n-a,a,m.TAU,Math.PI),this.lineTo(t,e+r),this.moveTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-m.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),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},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-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,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),b.TargetCamera.setScene(this.scene),b.TargetCamera.setViewport(0,0,e,i),b.TargetCamera.scrollX=this.x,b.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(o,this,b.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});b.TargetCamera=new n,t.exports=b},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,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(4);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(35),s=i(0),r=i(11),o=i(176),a=i(101),h=i(9),l=i(75),u=i(110),c=i(1071),d=i(20),f=i(79),p=new s({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},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.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},destroy:function(){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var t=this.list.length;t--;)this.list[t].destroy();this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=p},function(t,e,i){var n=i(0),s=i(11),r=i(15),o=i(450),a=i(110),h=i(452),l=i(1075),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;ss.width&&(t=s.width-i.cutX),i.cutY+e>s.height&&(e=s.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.frame,a=this.camera,h=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=o.cutWidth),void 0===r&&(r=o.cutHeight);var l=(t>>16&255)/255,u=(t>>8&255)/255,c=(255&t)/255,d=this.renderTarget;if(a.preRender(),d){d.bind(!0);var f=this.pipeline;f.manager.set(f);var p=d.width,g=d.height,y=h.width/p,m=h.height/g;f.drawFillRect(i*y,n*m,s*y,r*m,v.getTintFromFloats(c,u,l,1),e),d.unbind(!0)}else{var x=this.context;h.setContext(x),x.fillStyle="rgba("+l+","+u+","+c+","+e+")",x.fillRect(i+o.cutX,n+o.cutY,s,r),h.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.renderTarget;if(t)t.clear();else{var e=this.context;e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),e.restore()}this.dirty=!1}return this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i,1,16777215),this._eraseMode=!1,this},draw:function(t,e,i,n,s){return this.beginDraw(),this.batchDraw(t,e,i,n,s),this.endDraw(),this},drawFrame:function(t,e,i,n,s,r){return this.beginDraw(),this.batchDrawFrame(t,e,i,n,s,r),this.endDraw(),this},beginDraw:function(){var t=this.camera,e=this.renderer,i=this.renderTarget;return t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this},batchDraw:function(t,e,i,n,s){return void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]),this.batchList(t,e,i,n,s),this},batchDrawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.textureManager.getFrame(t,e);return o&&(this.renderTarget?this.pipeline.batchTextureFrame(o,i,n,r,s,this.camera.matrix,null):this.batchTextureFrame(o,i+this.frame.cutX,n+this.frame.cutY,s,r)),this},endDraw:function(t){void 0===t&&(t=this._eraseMode);var e=this.renderer,i=this.renderTarget;if(i){var n=e.endCapture();e.pipelines.setUtility().blitFrame(n,i,1,!1,!1,t),e.resetScissor(),e.resetViewport()}else e.setContext();return this.dirty=!0,this},batchList:function(t,e,i,n,s){for(var r=0;rr&&(o=t[r]),s[r]=o,t.length>r+1&&(o=t[r+1]),s[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,n=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var s=0;if(t.length===e)for(i=0;is&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;nl){if(0===c){for(var v=f;v.length&&(v=v.slice(0,-1),!((p=e.measureText(v).width)<=l)););if(!v.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var g=d.substr(v.length);u[c]=g,h+=v}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=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=s.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=s[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],f=e.measureText(d).width,p=f;ch&&c>0&&(n+="\n",h=i),n+=d,c0&&(d+=h.lineSpacing*v),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[v];else if("center"===i.align)c+=(o-h.lineWidths[v])/2;else if("justify"===i.align&&h.lineWidths[v]/h.width>=.85){var g=h.width-h.lineWidths[v],y=e.measureText(" ").width,m=a[v].trim(),x=m.split(" ");g+=(a[v].length-m.length)*y;for(var b=Math.floor(g/y),T=0;b>0;)x[T]+=" ",T=(T+1)%(x.length-1||1),--b;a[v]=x.join(" ")}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[v],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[v],c,d))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var w=this.input;return w&&!w.customHitArea&&(w.hitArea.width=this.width,w.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(31),s=i(0),r=i(11),o=i(22),a=i(15),h=i(361),l=i(192),u=i(1091),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,(function(t){if(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)}}),this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer&&this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(18),r=i(11),o=i(75),a=i(22),h=i(51),l=i(15),u=i(70),c=i(222),d=i(1094),f=i(14),p=new n({Extends:l,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,d],initialize:function(t,e,i,n){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=c(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=f.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(u.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(c(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0);try{n.srcObject=t}catch(e){n.src=window.URL.createObjectURL(t)}return n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=p},function(t,e,i){var n=i(0),s=i(228),r=i(470),o=i(56),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=0&&T<=1&&i.push(new n(r,o))}else if(b>0){var w=(-x-Math.sqrt(b))/(2*m);r=a+w*p,o=h+w*v,w>=0&&w<=1&&i.push(new n(r,o));var E=(-x+Math.sqrt(b))/(2*m);r=a+E*p,o=h+E*v,E>=0&&E<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(66),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(4),s=i(96),r=i(488);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,v=u*d+c*f,g=d*d+f*f,y=p*g-v*v,m=0===y?0:1/y,x=t.x1,b=t.y1,T=0;T=0&&r>=0&&s+r<1&&(n.push({x:e[T].x,y:e[T].y}),i)));T++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1310),BUTTON_UP:i(1311),CONNECTED:i(1312),DISCONNECTED:i(1313),GAMEPAD_BUTTON_DOWN:i(1314),GAMEPAD_BUTTON_UP:i(1315)}},function(t,e,i){var n=i(17),s=i(156);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,i){var n=i(0),s=i(21),r=i(23),o=i(8),a=i(2),h=i(7),l=i(408),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",(function(t,e,i){if(Array.isArray(t))for(var n=0;ne._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(62);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){t.exports={Bounce:i(1495),Collision:i(1496),Force:i(1497),Friction:i(1498),Gravity:i(1499),Mass:i(1500),Sensor:i(1501),SetBody:i(1502),Sleep:i(1503),Static:i(1520),Transform:i(1521),Velocity:i(1522)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED||(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED),this},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){void 0===e&&(e=16.6),this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,e.previous=e.current,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onStop","onUpdate","onYoyo"],a.register("tween",(function(t){return this.scene.sys.tweens.add(t)})),o.register("tween",(function(t){return this.scene.sys.tweens.create(t)})),t.exports=u},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1466),TIMELINE_LOOP:i(1467),TIMELINE_PAUSE:i(1468),TIMELINE_RESUME:i(1469),TIMELINE_START:i(1470),TIMELINE_UPDATE:i(1471),TWEEN_ACTIVE:i(1472),TWEEN_COMPLETE:i(1473),TWEEN_LOOP:i(1474),TWEEN_REPEAT:i(1475),TWEEN_START:i(1476),TWEEN_STOP:i(1477),TWEEN_UPDATE:i(1478),TWEEN_YOYO:i(1479)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e,i){var n=i(68);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(68);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={};t.exports=n;var s=i(83),r=i(32);n.fromVertices=function(t){for(var e={},i=0;i1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(64),r=i(83);n.collides=function(t,e,i){var o,a,h,l,u=!1;if(i){var c=t.parent,d=e.parent,f=c.speed*c.speed+c.angularSpeed*c.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;u=i&&i.collided&&f<.2,l=i}else l={collided:!1,bodyA:t,bodyB:e};if(i&&u){var p=l.axisBody,v=p===t?e:t,g=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,v.vertices,g),l.reused=!0,h.overlap<=0)return l.collided=!1,l}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return l.collided=!1,l;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return l.collided=!1,l;o.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))0&&(e=n(t)/i);for(var h=0;h=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(171),s=i(130);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-n),h=Math.abs(o-s),l=n-h&&(c-=h,n+=l),fe.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=new(i(0))({initialize:function(t,e,i,n,s){void 0===s&&(s=!1),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,this.isKeyFrame=s},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},function(t,e,i){var n=i(185),s=i(0),r=i(102),o=i(9),a=i(132),h=i(22),l=i(2),u=i(6),c=i(186),d=i(322),f=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var n=this.anims,s=this.mixes,r="string"==typeof t?t:t.key,o="string"==typeof e?e:e.key;if(n.has(r)&&n.has(o)){var a=s.get(r);a||(a={}),a[o]=i,s.set(r,a)}return this},removeMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s=i.get(n);if(s)if(e){var r="string"==typeof e?e:e.key;s.hasOwnProperty(r)&&delete s[r]}else e||i.delete(n);return this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s="string"==typeof e?e:e.key,r=i.get(n);return r&&r.hasOwnProperty(s)?r[s]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e){var i=[],n=this.game.cache.json.get(t);if(!n)return i;var s=this,r=u(n,"meta",null),o=u(n,"frames",null);return r&&o&&u(r,"frameTags",[]).forEach((function(n){var r=[],a=l(n,"name",null),h=l(n,"from",0),u=l(n,"to",0),c=l(n,"direction","forward");if(a&&(!e||e&&e.indexOf(a)>-1)){for(var d=[],f=Number.MAX_SAFE_INTEGER,p=h;p<=u;p++){var v=p.toString(),g=o[v];if(g){var y=l(g,"duration",Number.MAX_SAFE_INTEGER);y=e;s--)o?r.push(i+s.toString()+n):r.push(s);else for(s=t;s<=e;s++)o?r.push(i+s.toString()+n):r.push(s);return r}},function(t,e,i){var n=i(0),s=i(102),r=i(9),o=i(324),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(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},function(t,e,i){t.exports={ADD:i(736),REMOVE:i(737)}},function(t,e,i){var n=i(323),s=i(0),r=i(22),o=new s({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.video=new n,this.text=new n,this.html=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once(r.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","video","text","html","obj","tilemap","xml"],e=0;ed.right&&(f=u(f,f+(g-d.right),this.lerp.x)),yd.bottom&&(p=u(p,p+(y-d.bottom),this.lerp.y))):(f=u(f,g-a,this.lerp.x),p=u(p,y-h,this.lerp.y)),v=!0}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(a=Math.round(a),h=Math.round(h),f=Math.round(f),p=Math.round(p)),this.scrollX=f,this.scrollY=p;var m=f+i,x=p+n;this.midPoint.set(m,x);var b=t/r,T=e/r,w=m-b/2,E=x-T/2;this.roundPixels&&(w=Math.round(w),E=Math.round(E)),this.worldView.setTo(w,E,b,T),o.applyITRS(this.x+a,this.y+h,this.rotation,r,r),o.translate(-a,-h),this.shakeEffect.preRender(),v&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===o&&(o=s),this._follow=t,this.roundPixels=e,i=r(i,0,1),n=r(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,o);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-o;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(38);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),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{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(38);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(38);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),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(761),Flash:i(762),Pan:i(763),Shake:i(796),RotateTo:i(797),Zoom:i(798)}},function(t,e,i){t.exports={In:i(764),Out:i(765),InOut:i(766)}},function(t,e,i){t.exports={In:i(767),Out:i(768),InOut:i(769)}},function(t,e,i){t.exports={In:i(770),Out:i(771),InOut:i(772)}},function(t,e,i){t.exports={In:i(773),Out:i(774),InOut:i(775)}},function(t,e,i){t.exports={In:i(776),Out:i(777),InOut:i(778)}},function(t,e,i){t.exports={In:i(779),Out:i(780),InOut:i(781)}},function(t,e,i){t.exports=i(782)},function(t,e,i){t.exports={In:i(783),Out:i(784),InOut:i(785)}},function(t,e,i){t.exports={In:i(786),Out:i(787),InOut:i(788)}},function(t,e,i){t.exports={In:i(789),Out:i(790),InOut:i(791)}},function(t,e,i){t.exports={In:i(792),Out:i(793),InOut:i(794)}},function(t,e,i){t.exports=i(795)},function(t,e,i){var n=i(0),s=i(33),r=i(347),o=i(2),a=i(6),h=i(7),l=i(193),u=i(1),c=i(197),d=i(187),f=new n({initialize:function(t){void 0===t&&(t={}),this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.domPointerEvents=a(t,"dom.pointerEvents","none"),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=a(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=a(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=a(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=a(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio",{}),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.pipeline=a(i,"pipeline",null),this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.preserveDrawingBuffer=a(i,"preserveDrawingBuffer",!1),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",4096),this.maxTextures=a(i,"maxTextures",-1),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),this.transparent&&(this.backgroundColor=d(0),this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path","");var f=r.os.android?6:32;this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",f),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.loaderWithCredentials=a(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var p=a(t,"plugins",null),v=c.DefaultScene;p&&(Array.isArray(p)?this.defaultPlugins=p:h(p)&&(this.installGlobalPlugins=o(p,"global",[]),this.installScenePlugins=o(p,"scene",[]),Array.isArray(p.default)?v=p.default:Array.isArray(p.defaultMerge)&&(v=v.concat(p.defaultMerge)))),this.defaultPlugins=v;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=a(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(105),browser:i(136),features:i(191),input:i(808),audio:i(809),video:i(810),fullscreen:i(811),canvasFeatures:i(348)}},function(t,e,i){var n,s,r,o=i(31),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;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],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],v=c[3],g=c[4],y=c[5],m=c[6],x=c[7],b=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=v*i+g*r+y*h,e[4]=v*n+g*o+y*l,e[5]=v*s+g*a+y*u,e[6]=m*i+x*r+b*h,e[7]=m*n+x*o+b*l,e[8]=m*s+x*a+b*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,v=s*o,g=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+g,y[6]=u-v,y[1]=l-g,y[4]=1-(h+f),y[7]=d+p,y[2]=u+v,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],v=e[12],g=e[13],y=e[14],m=e[15],x=n*h-s*a,b=n*l-r*a,T=n*u-o*a,w=s*l-r*h,E=s*u-o*h,S=r*u-o*l,_=c*g-d*v,A=c*y-f*v,C=c*m-p*v,O=d*y-f*g,P=d*m-p*g,R=f*m-p*y,M=x*R-b*P+T*O+w*C-E*A+S*_;return M?(M=1/M,i[0]=(h*R-l*P+u*O)*M,i[1]=(l*C-a*R-u*A)*M,i[2]=(a*P-h*C+u*_)*M,i[3]=(r*P-s*R-o*O)*M,i[4]=(n*R-r*C+o*A)*M,i[5]=(s*C-n*P-o*_)*M,i[6]=(g*S-y*E+m*w)*M,i[7]=(y*T-v*S-m*b)*M,i[8]=(v*E-g*T+m*x)*M,this):null}});t.exports=n},function(t,e,i){var n=i(0),s=i(364),r=i(1),o=i(39),a=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new o(1,0,0),c=new o(0,1,0),d=new o,f=new s,p=new n({initialize:function(t,e,i,n){this.onChangeCallback=r,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,s){return void 0===s&&(s=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),s&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this._x=t*s,this._y=e*s,this._z=i*s,this._w=n*s),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),s+e*(t.z-s),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=f.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+s*r+i*a-n*o,i*h+s*o+n*r-e*a,n*h+s*a+e*o-i*r,s*h-e*r-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,h=t.y,l=t.z,u=t.w,c=i*o+n*h+s*l+r*u;c<0&&(c=-c,o=-o,h=-h,l=-l,u=-u);var d=1-e,f=e;if(1-c>a){var p=Math.acos(c),v=Math.sin(p);d=Math.sin((1-e)*p)/v,f=Math.sin(e*p)/v}return this.set(d*i+f*o,d*n+f*h,d*s+f*l,d*r+f*u)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.set(-t*r,-e*r,-i*r,n*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+s*r,i*o+n*r,n*o-i*r,s*o-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o-n*r,i*o+s*r,n*o+e*r,s*o-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*r,i*o-e*r,n*o+s*r,s*o-n*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,s=t.z/2,r=Math.cos(i),o=Math.cos(n),a=Math.cos(s),h=Math.sin(i),l=Math.sin(n),u=Math.sin(s);switch(t.order){case"XYZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],s=i[4],r=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=n+a+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(r-l)*e,(o-s)*e,.25/e)):n>a&&n>c?(e=2*Math.sqrt(1+n-a-c),this.set(.25*e,(s+o)/e,(r+l)/e,(u-h)/e)):a>c?(e=2*Math.sqrt(1+a-n-c),this.set((s+o)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+c-n-a),this.set((r+l)/e,(h+u)/e,.25*e,(o-s)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=h[s],o=h[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*o+o]+1),l[s]=.5*e,e=.5/e,l[r]=(i[3*r+s]+i[3*s+r])*e,l[o]=(i[3*o+s]+i[3*s+o])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*o+r]-i[3*r+o])*e}return this.onChangeCallback(this),this}});t.exports=p},function(t,e,i){var n=i(367),s=i(31),r=i(33),o=i(191);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(368),h=i(371),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","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,i){var n=i(37),s=i(369),r=i(0),o=i(33),a=i(9),h=i(91),l=i(370),u=i(104),c=i(106),d=i(25),f=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var s=e.length;this.emit(h.RENDER,t,i);var r=i.x,o=i.y,a=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(r,o,a,l),u.clip()),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(r,o,a,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=s,i.renderToTexture&&i.emit(n.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d=0?y=-(y+c):y<0&&(y=Math.abs(y)-c)),t.flipY&&(m>=0?m=-(m+d):m<0&&(m=Math.abs(m)-d))}var b=1,T=1;t.flipX&&(f||(y+=-e.realWidth+2*v),b=-1),t.flipY&&(f||(m+=-e.realHeight+2*g),T=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*b,t.scaleY*T),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY),o.multiply(a),r.save(),o.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),t.mask&&t.mask.preRenderCanvas(this,t,i),r.drawImage(e.source.image,l,u,c,d,y,m,c/p,d/p),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=f},function(t,e,i){var n=i(31),s=i(38),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var v=new Image;v.onerror=function(){i.call(null)},v.onload=function(){i.call(null,v)},v.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(35),s=i(348);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(93),s=i(37),r=i(0),o=i(33),a=i(9),h=i(91),l=i(22),u=i(138),c=i(69),d=i(1),f=i(372),p=i(141),v=i(104),g=i(106),y=i(12),m=i(383),x=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTexture=0,this.startActiveTexture=0,this.maxTextures=0,this.textureIndexes,this.tempTextures,this.textureZero,this.normalTexture,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=d,this.contextRestoredHandler=d,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.textureFlush=0,this.isTextureClean=!1,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(l.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(l.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var a=0;a<=27;a++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var h=e.getSupportedExtensions();t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",d="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(d+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(d+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(d+"s3tc"),this.supportedExtensions=h;var p="ANGLE_instanced_arrays";this.instancedArraysExtension=h.indexOf(p)>-1?e.getExtension(p):null;var v="OES_vertex_array_object";this.vaoExtension=h.indexOf(v)>-1?e.getExtension(v):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=y.checkShaderMax(e,t.maxTextures),this.textureIndexes=[];var m=this.tempTextures;if(Array.isArray(m))for(var x=0;a0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],n=e[1],s=e[2],r=e[3];s>0&&r>0&&t.scissor(i,this.drawingBufferHeight-n-r,s,r)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},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>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(){this.setTexture2D(this.blankTexture.glTexture)},setTextureSource:function(t){if(this.pipelines.forceZero())return this.setTextureZero(t.glTexture,!0),0;var e=this.gl,i=this.currentActiveTexture;return t.glIndexCounter0&&this.pipelines.setMulti().drawFillRect(e,i,n,r,y.getTintFromFloats(o.blueGL,o.greenGL,o.redGL,1),o.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var n=this.pipelines.setMulti();e.postRenderWebGL(n,y.getTintFromFloats),i.postRenderWebGL(n,y.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(s.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.textureFlush=0,this.emit(h.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var n=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===n)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var s=this.currentMask,r=0;r0&&(this.startActiveTexture++,this.currentActiveTexture=1)}},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,t,e,i)},snapshotArea:function(t,e,i,n,s,r,o){var a=this.snapshotState;return a.callback=s,a.type=r,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gl.drawingBufferWidth),a.height=Math.min(n,this.gl.drawingBufferHeight),this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(t,e,i,n,s,r,o,a,h,l,u){void 0===s&&(s=!1),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=e),void 0===h&&(h=i);var c=this.currentFramebuffer;this.snapshotArea(r,o,a,h,n,l,u);var d=this.snapshotState;return d.getPixel=s,d.isFramebuffer=!0,d.bufferWidth=e,d.bufferHeight=i,this.setFramebuffer(t),m(this.canvas,d),this.setFramebuffer(c),d.callback=null,d.isFramebuffer=!1,this},canvasToTexture:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n=!1),e?this.updateCanvasTexture(t,e,n):this.createCanvasTexture(t,i,n)},createCanvasTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.width,a=t.height,h=n.CLAMP_TO_EDGE,l=u(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(s=l?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,h,h,n.RGBA,t,o,a,!0,!1,i)},updateCanvasTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.width,r=t.height;if(s>0&&r>0){n.activeTexture(n.TEXTURE0);var o=n.getParameter(n.TEXTURE_BINDING_2D);n.bindTexture(n.TEXTURE_2D,e),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,o&&n.bindTexture(n.TEXTURE_2D,o)}return e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,h=n.CLAMP_TO_EDGE,l=u(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(s=l?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,h,h,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;if(s>0&&r>0){n.activeTexture(n.TEXTURE0);var o=n.getParameter(n.TEXTURE_BINDING_2D);n.bindTexture(n.TEXTURE_2D,e),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,o&&n.bindTexture(n.TEXTURE_2D,o)}return e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];i.activeTexture(i.TEXTURE0);var s=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),s&&i.bindTexture(i.TEXTURE_2D,s),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);for(var t=this.gl,e=this.tempTextures,i=0;i=0;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0?(e.enableVertexAttribArray(f),e.vertexAttribPointer(f,a,h,d,i,l),o.enabled=!0,o.location=f):-1!==f&&e.disableVertexAttribArray(f)}else u?e.vertexAttribPointer(c,a,h,d,i,l):!u&&c>-1&&(e.disableVertexAttribArray(c),o.location=-1)}return this},createUniforms:function(){var t,e,i,n=this.gl,s=this.program,r=this.uniforms,o=n.getProgramParameter(s,n.ACTIVE_UNIFORMS);for(t=0;t0&&(e=e.substr(0,h),r.hasOwnProperty(e)||null!==(i=n.getUniformLocation(s,e))&&(r[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null}))}}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,n){var s=this.uniforms[e];return s?((n||s.value1!==i)&&(s.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,s.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,n,s){var r=this.uniforms[e];return r?((s||r.value1!==i||r.value2!==n)&&(r.value1=i,r.value2=n,this.renderer.setProgram(this.program),t.call(this.gl,r.location,i,n),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,n,s,r){var o=this.uniforms[e];return o?((r||o.value1!==i||o.value2!==n||o.value3!==s)&&(o.value1=i,o.value2=n,o.value3=s,this.renderer.setProgram(this.program),t.call(this.gl,o.location,i,n,s),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,n,s,r,o){var a=this.uniforms[e];return a?((o||a.value1!==i||a.value2!==n||a.value3!==s||a.value4!==r)&&(a.value1=i,a.value2=n,a.value3=s,a.value4=r,this.renderer.setProgram(this.program),t.call(this.gl,a.location,i,n,s,r),this.pipeline.currentShader=this),this):this},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,n){return this.setUniform3(this.gl.uniform3f,t,e,i,n)},set4f:function(t,e,i,n,s){return this.setUniform4(this.gl.uniform4f,t,e,i,n,s)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,n){return this.setUniform3(this.gl.uniform3i,t,e,i,n)},set4i:function(t,e,i,n,s){return this.setUniform4(this.gl.uniform4i,t,e,i,n,s)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(59),r=i(2),o=i(875),a=i(876),h=i(25),l=i(107),u=i(58),c=new n({Extends:u,initialize:function(t){t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inColor",size:4,type:l.UNSIGNED_BYTE,normalized:!0}]),u.call(this,t),this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},batchFillRect:function(t,e,i,n,s,r){this.renderer.pipelines.set(this);var o=this.calcMatrix;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),v=o.getX(a,e),g=o.getY(a,e),y=this.fillTint;this.batchQuad(l,u,c,d,f,p,v,g,y.TL,y.TR,y.BL,y.BR)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),v=this.fillTint;this.batchTri(l,u,c,d,f,p,v.TL,v.TR,v.BL)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&X[4]?this.batchQuad(k,D,P,R,X[0],X[1],X[2],X[3],I,B,N,Y):(U[0]=k,U[1]=D,U[2]=P,U[3]=R,U[4]=1),h&&U[4]?this.batchQuad(C,O,M,L,U[0],U[1],U[2],U[3],I,B,N,Y):(X[0]=C,X[1]=O,X[2]=M,X[3]=L,X[4]=1)}},batchVert:function(t,e,i){var n=this.vertexViewF32,s=this.vertexViewU32,r=this.vertexCount*this.currentShader.vertexComponentCount-1;n[++r]=t,n[++r]=e,s[++r]=i,this.vertexCount++},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c){var d=!1;return this.shouldFlush(6)&&(this.flush(),d=!0),this.batchVert(t,e,h),this.batchVert(i,n,u),this.batchVert(s,r,c),this.batchVert(t,e,h),this.batchVert(s,r,c),this.batchVert(o,a,l),d},batchTri:function(t,e,i,n,s,r,o,a,h){var l=!1;return this.shouldFlush(3)&&(this.flush(),l=!0),this.batchVert(t,e,o),this.batchVert(i,n,a),this.batchVert(s,r,h),l},destroy:function(){return u.prototype.destroy.call(this),this.polygonCache=null,this}});t.exports=c},function(t,e,i){var n=i(0),s=i(2),r=i(877),o=i(108),a=i(3),h=i(58),l=10,u=new a,c=new n({Extends:o,initialize:function(t){l=t.game.renderer.config.maxLights;for(var e=s(t,"fragShader",r),i=[],n=1;n<=l;n++)i.push({name:"lights"+n,fragShader:e.replace("%LIGHT_COUNT%",n.toString())});t.shaders=i,o.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.lightsActive=!0},boot:function(){h.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e};for(var i=0;i0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.tempTextures[0]);var n=this.getNormalMap(e);i.isNewNormalMap(t,n)&&(this.flush(),i.setTextureZero(t),i.setNormalMap(n));var s=e?e.rotation:0;return this.setNormalMapRotation(s),this.currentUnit=0,0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=this.renderer,n=e.glTexture,s=this.getNormalMap(t);return i.isNewNormalMap()&&(this.flush(),i.setTextureZero(n),i.setNormalMap(s)),this.setNormalMapRotation(t.rotation),this.currentUnit=0,0},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]):e=this.defaultNormalMap,e||(e=this.defaultNormalMap),e.glTexture},batchSprite:function(t,e,i){this.lightsActive&&o.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,n,s,r,a,h,l,u,c,d,f,p,v,g,y,m,x,b,T,w,E,S,_,A,C,O,P,R,M,L){this.lightsActive&&o.prototype.batchTexture.call(this,t,e,i,n,s,r,a,h,l,u,c,d,f,p,v,g,y,m,x,b,T,w,E,S,_,A,C,O,P,R,M,L)},batchTextureFrame:function(t,e,i,n,s,r,a){this.lightsActive&&o.prototype.batchTextureFrame.call(this,t,e,i,n,s,r,a)}});c.LIGHT_COUNT=l,t.exports=c},function(t,e,i){var n=i(0),s=i(2),r=i(880),o=i(881),a=i(58),h=new n({Extends:a,initialize:function(t){t.vertShader=s(t,"vertShader",o),t.fragShader=s(t,"fragShader",r),t.attributes=s(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,n,s,r,o,a,h,l,u,c){var d=t.color,f=t.intensity,p=t.radius,v=t.attenuation,g=d.r*f,y=d.g*f,m=d.b*f,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.batchLightVert(i,n,u,c,p,v,g,y,m,x),this.batchLightVert(s,r,u,c,p,v,g,y,m,x),this.batchLightVert(o,a,u,c,p,v,g,y,m,x),this.batchLightVert(i,n,u,c,p,v,g,y,m,x),this.batchLightVert(o,a,u,c,p,v,g,y,m,x),this.batchLightVert(h,l,u,c,p,v,g,y,m,x)},batchLightVert:function(t,e,i,n,s,r,o,a,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=n,u[++c]=s,u[++c]=r,u[++c]=o,u[++c]=a,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},function(t,e,i){var n=i(0),s=i(2),r=i(108),o=new n({Extends:r,initialize:function(t){t.topology=5,t.batchSize=s(t,"batchSize",256),r.call(this,t)}});t.exports=o},function(t,e,i){var n=i(0),s=i(2),r=i(108),o=i(882),a=i(883),h=i(58),l=new n({Extends:r,initialize:function(t){t.fragShader=s(t,"fragShader",o),t.vertShader=s(t,"vertShader",a),t.forceZero=!0,r.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=l},function(t,e,i){var n=i(884),s=i(35),r=i(0),o=i(198),a=i(885),h=i(886),l=i(2),u=i(887),c=i(382),d=i(58),f=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:n},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:a}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,n,s){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===s&&(s=!0);var r=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),n&&(s?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blitFrame:function(t,e,i,n,r,o){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===o&&(o=!1);var a=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),t.height>e.height)a.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var h=e.height-t.height;a.viewport(0,h,t.width,t.height)}if(a.bindFramebuffer(a.FRAMEBUFFER,e.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e.texture,0),n&&(r?a.clearColor(0,0,0,0):a.clearColor(0,0,0,1),a.clear(a.COLOR_BUFFER_BIT)),o){var l=this.renderer.currentBlendMode;this.renderer.setBlendMode(s.ERASE)}a.bufferData(a.ARRAY_BUFFER,this.vertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),o&&this.renderer.setBlendMode(l),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindTexture(a.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,n,s,r,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,n,s,r),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6),this.renderer.resetTextures()},drawFrame:function(t,e,i,n){void 0===i&&(i=!0),void 0===n&&(n=this.colorMatrix);var s=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",n.getData()),this.set1f("uAlpha",n.alpha),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture,0)):s.viewport(0,0,t.width,t.height),i?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindTexture(s.TEXTURE_2D,null)},blendFrames:function(t,e,i,n,s,r){void 0===n&&(n=1),void 0===s&&(s=!0),void 0===r&&(r=this.linearShader);var o=this.gl;this.setShader(r),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",n),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),s?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,n,s){this.blendFrames(t,e,i,n,s,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var n=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,n)},setUVs:function(t,e,i,n,s,r,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=n,h[10]=s,h[11]=r,h[14]=t,h[15]=e,h[18]=s,h[19]=r,h[22]=o,h[23]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=f},function(t,e){t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},function(t,e,i){var n=i(31),s=i(38),r=i(2);t.exports=function(t,e){var i=t.getContext("experimental-webgl"),o=r(e,"callback"),a=r(e,"type","image/png"),h=r(e,"encoder",.92),l=r(e,"x",0),u=r(e,"y",0),c=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),f=d?r(e,"bufferWidth",1):i.drawingBufferWidth,p=d?r(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var v=new Uint8Array(4),g=d?u:p-u;i.readPixels(l,g,1,1,i.RGBA,i.UNSIGNED_BYTE,v),o.call(null,new s(v[0],v[1],v[2],v[3]/255))}else{var y=r(e,"width",f),m=r(e,"height",p),x=new Uint8Array(y*m*4);i.readPixels(l,p-u-m,y,m,i.RGBA,i.UNSIGNED_BYTE,x);for(var b=n.createWebGL(this,y,m),T=b.getContext("2d"),w=T.getImageData(0,0,y,m),E=w.data,S=0;S0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0),o=0;for(var a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();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.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,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,i){var n=i(22);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")})),e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)}),!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(389),s=i(31),r=i(6);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var v=i.getContext("2d");u&&v.clearRect(0,0,f,p),c&&c(i,v);for(var g=0;gi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(105);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?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){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e,i){var n=i(201);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return s&&"string"==typeof s.type?s.type:"string"==typeof s?s:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?n.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?n.ORIENTATION.LANDSCAPE:void 0:e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},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(0),s=i(203),r=i(9),o=i(51),a=i(22),h=i(410),l=i(411),u=i(412),c=i(413),d=i(25),f=i(177),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(191),r=i(51),o=i(1),a=new n({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&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()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,n=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===n&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===n&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===n&&t.preventDefault()};var o={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,o),t.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}s.pointerLock&&(this.pointerLockChange=function(t){var n=e.target;e.locked=document.pointerLockElement===n||document.mozPointerLockElement===n||document.webkitPointerLockElement===n,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),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.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(349),s=i(0),r=i(50),o=i(124),a=i(360),h=i(3),l=i(105),u=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.READY,this.refresh,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.zoom,o=t.autoRound;if("string"==typeof e){var a=this.parentSize.width;0===a&&(a=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(a*h)}if("string"==typeof i){var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=s,this.autoRound=o,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,o&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),r===n.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(e,i),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*r,t.minHeight*r),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*r,t.maxHeight*r),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,n=e.height;return(t.width!==i||t.height!==n)&&(t.setSize(i,n),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,s=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(n,s)},resize:function(t,e){var i=this.zoom,n=this.autoRound;n&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),n&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=t*i,h=e*i;return n&&(a=Math.floor(a),h=Math.floor(h)),a===t&&h===e||(o.width=a+"px",o.height=h+"px"),this.refresh(s,r)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o,r*o),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}return this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)),this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available&&(e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)},["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1))},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1),["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=g},function(t,e,i){var n=i(18),s=i(0),r=i(76),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(144),r=i(20),o=i(22),a=i(6),h=i(95),l=i(1),u=i(418),c=i(204),d=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,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;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;i.sceneUpdate=l,t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,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(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){this.create(t.scene)},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.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){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=r.x&&t=r.y&&e=r.x&&t=r.y&&e-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d0||!n.prototype.pause.call(this)||(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),0))},resume:function(){return!(this.manager.isLocked(this,"resume")||this.startTime>0||!n.prototype.resume.call(this)||!this.pickAndPlayAudioTag()||(this.emit(r.RESUME,this),0))},stop:function(){return!this.manager.isLocked(this,"stop")&&!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.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;t0)this.startTime=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,n-i),n=this.audio.currentTime):n=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=n}},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=o(this.currentConfig.volume*this.manager.volume,0,1))},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.updateMute(),this.emit(r.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.updateVolume(),this.emit(r.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,r.RATE,t)||(this.calculateRate(),this.emit(r.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,r.DETUNE,t)||(this.calculateRate(),this.emit(r.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(r.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(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=a},function(t,e,i){var n=i(145),s=i(0),r=i(9),o=i(431),a=i(1),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 o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(146),s=i(0),r=i(9),o=i(17),a=function(){return!1},h=function(){return this},l=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=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan: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.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:a,updateMarker:a,removeMarker:function(){return null},play:a,pause:a,resume:a,stop:a,destroy:function(){n.prototype.destroy.call(this)},setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h,setPan:h});t.exports=l},function(t,e,i){var n=i(433),s=i(145),r=i(0),o=i(70),a=i(22),h=i(434),l=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(a.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(146),s=i(0),r=i(70),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var v=t[e],g=r,y=o;for(i(t,r,e),a(t[o],v)>0&&i(t,r,o);g0;)y--}0===a(t[r],v)?i(t,r,y):i(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};t.exports=s},function(t,e,i){var n=i(6),s=i(131),r=function(t,e,i){for(var n=[],s=0;s0?s.playAfterDelay(f,d):s.load(f)}}return t}},function(t,e,i){var n=i(0),s=i(109),r=new n({initialize:function(t,e,i,n,s){this.parent=t,this.x=e,this.y=i,this.frame=n,this.data={},this.tint=16777215,this._visible=s,this._alpha=1,this.flipX=!1,this.flipY=!1},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof s&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,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},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){var n=i(10);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(11),r=i(1055),o=i(15),a=i(7),h=i(202),l=i(20),u=i(140),c=new n({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e0&&(e=n(t)/i);for(var h=0;h>>16,y=(65280&f)>>>8,m=255&f,u.strokeStyle="rgba("+g+","+y+","+m+","+c+")",u.lineWidth=v,x+=3;break;case n.FILL_STYLE:p=h[x+1],d=h[x+2],g=(16711680&p)>>>16,y=(65280&p)>>>8,m=255&p,u.fillStyle="rgba("+g+","+y+","+m+","+d+")",x+=2;break;case n.BEGIN_PATH:u.beginPath();break;case n.CLOSE_PATH:u.closePath();break;case n.FILL_PATH:a||u.fill();break;case n.STROKE_PATH:a||u.stroke();break;case n.FILL_RECT:a?u.rect(h[x+1],h[x+2],h[x+3],h[x+4]):u.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case n.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.fill(),x+=6;break;case n.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.stroke(),x+=6;break;case n.LINE_TO:u.lineTo(h[x+1],h[x+2]),x+=2;break;case n.MOVE_TO:u.moveTo(h[x+1],h[x+2]),x+=2;break;case n.LINE_FX_TO:u.lineTo(h[x+1],h[x+2]),x+=5;break;case n.MOVE_FX_TO:u.moveTo(h[x+1],h[x+2]),x+=5;break;case n.SAVE:u.save();break;case n.RESTORE:u.restore();break;case n.TRANSLATE:u.translate(h[x+1],h[x+2]),x+=2;break;case n.SCALE:u.scale(h[x+1],h[x+2]),x+=2;break;case n.ROTATE:u.rotate(h[x+1]),x+=1;break;case n.GRADIENT_FILL_STYLE:x+=5;break;case n.GRADIENT_LINE_STYLE:x+=6}u.restore()}}},function(t,e,i){var n=i(0),s=i(137),r=i(80),o=i(2),a=i(68),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if(this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,"number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&this.hasBoth(t,"start","end")){this.start=t.start,this.end=t.end;var i=this.has(t,"random");if(i&&(this.onEmit=this.randomRangedValueEmit),this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var n=this.has(t,"ease")?t.ease:"Linear";this.ease=r(n,t.easeParams),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else if("object"===e&&this.hasBoth(t,"min","max"))this.start=t.min,this.end=t.max,this.onEmit=this.randomRangedValueEmit;else if("object"===e&&this.has(t,"random")){var s=t.random;Array.isArray(s)&&(this.start=s[0],this.end=s[1]),this.onEmit=this.randomRangedValueEmit}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),this.x+=void 0===t?i.x.onEmit(this,"x"):t,this.y+=void 0===e?i.y.onEmit(this,"y"):e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(35),s=i(0),r=i(11),o=i(453),a=i(454),h=i(449),l=i(2),u=i(210),c=i(455),d=i(126),f=i(451),p=i(456),v=i(10),g=i(79),y=i(3),m=i(68),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",16777215),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new y,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(0),s=i(13),r=i(6),o=i(460),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",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.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),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(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},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)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},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 a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(31);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=i.measureText(t.testString);if("actualBoundingBoxAscent"in s){var r=s.actualBoundingBoxAscent,o=s.actualBoundingBoxDescent;return n.remove(e),{ascent:r,descent:o,fontSize:r+o}}var a=Math.ceil(s.width*t.baselineX),h=a,l=2*h;h=h*t.baselineY|0,e.width=a,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,a,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,a,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,n.remove(e),u;var d,f,p=c.data,v=p.length,g=4*a,y=0,m=!1;for(d=0;dh;d--){for(f=0;f0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(1100),r=i(59),o=i(10),a=i(34),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;s0&&(e=h/i);for(var l=0;lc+g)){var y=v.getPoint((u-c)/g);o.push(y);break}c+=g}return o}},function(t,e,i){var n=i(67),s=i(47);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(10),r=i(34),o=i(1121),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(1124),s=i(0),r=i(59),o=i(34),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(67),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var f=0;fl+u?(v=(p-=l+u)/c,g.x=h.x1+(h.x2-h.x1)*v,g.y=h.y1+(h.y2-h.y1)*v):(v=(p-=l)/u,g.x=a.x1+(a.x2-a.x1)*v,g.y=a.y1+(a.y2-a.y1)*v),r.push(g)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0)for(l=0;lthis.maxLights&&(u(s,this.sortByDistance),s=s.slice(0,this.maxLights)),this.visibleLights=s.length,s},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,n,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===n&&(n=16777215),void 0===s&&(s=1);var r=c.getFloatsFromUintRGB(n),a=new o(t,e,i,r[0],r[1],r[2],s);return this.lights.push(a),a},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},function(t,e,i){var n=i(56),s=i(17),r={Circle:i(1191),Ellipse:i(1201),Intersects:i(484),Line:i(1221),Mesh:i(1243),Point:i(1246),Polygon:i(1260),Rectangle:i(502),Triangle:i(1293)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(231),CircleToRectangle:i(151),GetCircleToCircle:i(1211),GetCircleToRectangle:i(1212),GetLineToCircle:i(232),GetLineToLine:i(485),GetLineToPoints:i(486),GetLineToPolygon:i(487),GetLineToRectangle:i(234),GetRaysFromPointToPolygon:i(1213),GetRectangleIntersection:i(1214),GetRectangleToRectangle:i(1215),GetRectangleToTriangle:i(1216),GetTriangleToCircle:i(1217),GetTriangleToLine:i(492),GetTriangleToTriangle:i(1218),LineToCircle:i(233),LineToLine:i(96),LineToRectangle:i(488),PointToLine:i(496),PointToLineSegment:i(1219),RectangleToRectangle:i(152),RectangleToTriangle:i(489),RectangleToValues:i(1220),TriangleToCircle:i(491),TriangleToLine:i(493),TriangleToTriangle:i(494)}},function(t,e,i){var n=i(39);t.exports=function(t,e,i){var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=o-s,c=a-r,d=e.x2-h,f=e.y2-l;if(0===u||0==f*u-d*c)return!1;var p=(u*(l-r)+c*(s-h))/(d*c-f*u),v=(h+d*p-s)/u;return v<0||p<0||p>1?null:(void 0===i&&(i=new n),i.set(s+u*v,r+c*v,v))}},function(t,e,i){var n=i(39),s=i(485),r=new(i(47)),o=new n;t.exports=function(t,e,i){void 0===i&&(i=new n);var a=!1;i.set(),o.set();for(var h=e[0],l=1;l=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(96),s=i(57),r=i(235),o=i(490);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(233),s=i(115);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(14),s=i(68),r=i(97);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){var i=!0,n="untitled",s="",r="";function o(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function a(t){return 0===t.models.length&&t.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),s="",t.models[t.models.length-1]}function h(t,e){var i=t.length>=2?t[1]:n;e.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),s=""}function l(t){2===t.length&&(s=t[1])}function u(t,e){var i=t.length,n=i>=2?parseFloat(t[1]):0,s=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;a(e).vertices.push({x:n,y:s,z:r})}function c(t,e){var n=t.length,s=n>=2?parseFloat(t[1]):0,r=n>=3?parseFloat(t[2]):0,o=n>=4?parseFloat(t[3]):0;isNaN(s)&&(s=0),isNaN(r)&&(r=0),isNaN(o)&&(o=0),i&&(r=1-r),a(e).textureCoords.push({u:s,v:r,w:o})}function d(t,e){var i=t.length,n=i>=2?parseFloat(t[1]):0,s=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;a(e).vertexNormals.push({x:n,y:s,z:r})}function f(t,e){var i=t.length-1;if(!(i<3)){for(var n={group:s,material:r,vertices:[]},o=0;o3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=a(e).vertices.length+1+u),c-=1,u-=1,d-=1,n.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}a(e).faces.push(n)}}function p(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function v(t){t.length>=2&&(r=t[1])}t.exports=function(t,e){void 0===e&&(e=!0),i=e;var n={materials:{},materialLibraries:[],models:[]};s="",r="";for(var a=t.split("\n"),g=0;g=2?Math.floor(255*a[2]):h,u=a.length>=3?Math.floor(255*a[3]):h;e[s]=n(h,l,u)}}}return e}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(10);n.Area=i(1267),n.Ceil=i(1268),n.CeilAll=i(1269),n.CenterOn=i(190),n.Clone=i(1270),n.Contains=i(57),n.ContainsPoint=i(1271),n.ContainsRect=i(503),n.CopyFrom=i(1272),n.Decompose=i(490),n.Equals=i(1273),n.FitInside=i(1274),n.FitOutside=i(1275),n.Floor=i(1276),n.FloorAll=i(1277),n.FromPoints=i(199),n.FromXY=i(1278),n.GetAspectRatio=i(237),n.GetCenter=i(1279),n.GetPoint=i(171),n.GetPoints=i(306),n.GetSize=i(1280),n.Inflate=i(1281),n.Intersection=i(1282),n.MarchingAnts=i(316),n.MergePoints=i(1283),n.MergeRect=i(1284),n.MergeXY=i(1285),n.Offset=i(1286),n.OffsetPoint=i(1287),n.Overlaps=i(1288),n.Perimeter=i(130),n.PerimeterPoint=i(1289),n.Random=i(174),n.RandomOutside=i(1290),n.SameDimensions=i(1291),n.Scale=i(1292),n.Union=i(441),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=e}}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,alwaysEnabled:!1,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},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?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(509),s=i(510),r=i(0),o=i(9),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t0&&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){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){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,i){var n=i(240);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;if(s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.headers)for(var r in i.headers)s.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.requestedWith&&s.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),i.withCredentials&&(s.withCredentials=!0),s.onload=t.onLoad.bind(t,s),s.onerror=t.onError.bind(t,s),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(21),r=i(23),o=i(8),a=i(2),h=i(519),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,s){if(l(e)){var o=e;e=a(o,"key"),n=a(o,"xhrSettings"),s=a(o,"context",s)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:n,config:{context:s}};r.call(this,t,h)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,c=r.device.audio;l(e)&&(i=a(e,"url",[]),n=a(e,"config",{}));var d=u.getAudioURL(r,i);return d?c.webAudio&&!o.disableWebAudio?new u(t,e,d,s,r.sound.context):new h(t,e,d,n):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i=r;for(this.fixedStep||(s=.001*e,a=!0,this._elapsed=0),i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=a.entries).length,t=0;t-1&&c>v&&(t.velocity.normalize().scale(v),c=v),t.speed=c},separate:function(t,e,i,n,s,r){if(!r&&!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var o=t.isCircle?e:t,a=t.isCircle?t:e,h={x:o.x,y:o.y,right:o.right,bottom:o.bottom},l=a.center;if((l.yh.bottom)&&(l.xh.right))return this.separateCircle(t,e,s)}var u=!1,d=!1;s?(u=_(t,e,s,this.OVERLAP_BIAS),d=A(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)o.right&&(r=l(a.x,a.y,o.right,o.y)-a.radius):a.y>o.bottom&&(a.xo.right&&(r=l(a.x,a.y,o.right,o.bottom)-a.radius)),r*=-1}else r=t.halfWidth+e.halfWidth-l(t.center.x,t.center.y,e.center.x,e.center.y);if(t.overlapR=r,e.overlapR=r,i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r&&(t.onOverlap||e.onOverlap)&&this.emit(c.OVERLAP,t.gameObject,e.gameObject,t,e),0!==r;var h=t.center.x-e.center.x,u=t.center.y-e.center.y,d=Math.sqrt(Math.pow(h,2)+Math.pow(u,2)),f=(e.center.x-t.center.x)/d||0,p=(e.center.y-t.center.y)/d||0,y=2*(t.velocity.x*f+t.velocity.y*p-e.velocity.x*f-e.velocity.y*p)/(t.mass+e.mass);(t.immovable||e.immovable)&&(y*=2),t.immovable||(t.velocity.x=t.velocity.x-y/t.mass*f,t.velocity.y=t.velocity.y-y/t.mass*p),e.immovable||(e.velocity.x=e.velocity.x+y/e.mass*f,e.velocity.y=e.velocity.y+y/e.mass*p),t.immovable||e.immovable||(r/=2);var m=n(t.center,e.center),b=(r+x.EPSILON)*Math.cos(m),T=(r+x.EPSILON)*Math.sin(m);return t.immovable||(t.x-=b,t.y-=T,t.updateCenter()),e.immovable||(e.x+=b,e.y+=T,e.updateCenter()),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(c.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?l(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=r(t.center.x,e.left,e.right),n=r(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body||(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),0))},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,a,l,u=t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none)if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(a=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=y(a,h,l,u,null,e.scene.cameras.main,e.layer);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,u={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1,this.updateCenter()),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=(n.width-t)/2,r=(n.height-e)/2;this.offset.set(s,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i,n){void 0===t&&(t=!0),this.collideWorldBounds=t;var s=void 0!==e,r=void 0!==i;return(s||r)&&(this.worldBounce||(this.worldBounce=new l),s&&(this.worldBounce.x=e),r&&(this.worldBounce.y=i)),void 0!==n&&(this.onWorldBounds=n),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,n){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);var s=this.blocked;i&&(s.left=!0),n&&(s.right=!0)},processY:function(t,e,i,n){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);var s=this.blocked;i&&(s.up=!0),n&&(s.down=!0)},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}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(26),s=i(3),r=new s,o=new s;t.exports=function(t,e,i,s,a,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,r,h,l);var c=r.x,d=r.y;u(t+i,e+s,!1,o,h,l);var f=Math.ceil(o.x),p=Math.ceil(o.y);return n(c,d,f-c,p-d,a,l)}},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(436);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=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,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,o,a,h=[];e;){for(s=0,r=e.children.length;s=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),a=v(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,v,g,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,v=void 0,g=void 0,y=void 0,m=void 0,v=Math.max(f.minX,p.minX),g=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-v)*Math.max(0,m-g),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);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():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e,i){var n=i(533),s=i(535),r=i(248);t.exports=function(t,e,i,o,a,h,l){var u=o.left,c=o.top,d=o.right,f=o.bottom,p=i.faceLeft||i.faceRight,v=i.faceTop||i.faceBottom;if(l||(p=!0,v=!0),!p&&!v)return!1;var g=0,y=0,m=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?m=-1:e.deltaAbsX()0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(536);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(246),s=i(1389);t.exports=function(t,e,i,r){var o=n(t,e,i,r),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateX||e.customSeparateX)return 0!==o||t.embedded&&e.embedded;var l=s.Set(t,e,o);return a||h?(a?s.RunImmovableBody1(l):h&&s.RunImmovableBody2(l),!0):l>0||s.Check()}},function(t,e,i){var n=i(247),s=i(1390);t.exports=function(t,e,i,r){var o=n(t,e,i,r),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateY||e.customSeparateY)return 0!==o||t.embedded&&e.embedded;var l=s.Set(t,e,o);return a||h?(a?s.RunImmovableBody1(l):h&&s.RunImmovableBody2(l),!0):l>0||s.Check()}},function(t,e,i){var n=i(66),s=i(0),r=i(62),o=i(57),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-i*e.originX,e.y-n*e.originY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n=new(i(3));t.exports=function(t,e,i,s){var r=i.tilemapLayer,o=r.cullPaddingX,a=r.cullPaddingY,h=r.tilemap.tileToWorldXY(t,e,n,s,r);return h.x>s.worldView.x+r.scaleX*i.tileWidth*(-o-.5)&&h.xs.worldView.y+r.scaleY*i.tileHeight*(-a-1)&&h.y=0;r--)if(n(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}}else if(2===s){for(o=f;o>=0;o--)for(r=0;l[o]&&r=0;o--)for(r=d;l[o]&&r>=0;r--)if(n(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},function(t,e,i){var n=i(549),s=i(159);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=n(t,e);s(t,a,r,i)}return i}},function(t,e,i){var n=i(139),s=i(76);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY);return{left:s(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:n(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:s(e.worldView.y-r.y,a/2,0,!0)-r.cullPaddingY,bottom:n(e.worldView.bottom-r.y,a/2,0,!0)+r.cullPaddingY}}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r){i||(i=new n);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(s||(s=h.scene.cameras.main),l=h.x+s.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+s.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=r.hexSideLength,d=l+t*o+e%2*(o/2),f=u+e*((a-c)/2+c);return i.set(d,f)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r){i||(i=new n);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(s||(s=h.scene.cameras.main),l=h.x+s.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+s.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+o/2*(t-e),d=u+(t+e)*(a/2);return i.set(c,d)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r){i||(i=new n);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(s||(s=h.scene.cameras.main),l=h.x+s.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+s.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+t*o+e%2*(o/2),d=u+e*(a/2);return i.set(c,d)}},function(t,e,i){var n=i(253),s=i(254),r=i(3);t.exports=function(t,e,i,o,a){return i||(i=new r(0,0)),i.x=n(t,o,a),i.y=s(e,o,a),i}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY);var o=s.tilemap.hexSideLength;return r+t*((n-o)/2+o)}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*(n/2)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o){s||(s=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=o.hexSideLength,c=(h-u)/2+u,d=i?Math.floor(e/c):e/c,f=i?Math.floor((t-d%2*.5*a)/a):(t-d%2*.5*a)/a;return s.set(f,d)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o){s||(s=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor((t/(a/2)+e/(h/2))/2):(t/(a/2)+e/(h/2))/2,c=i?Math.floor((e/(h/2)-t/(a/2))/2):(e/(h/2)-t/(a/2))/2;return s.set(u,c)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o){s||(s=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*a)/a):(t+u%2*.5*a)/a;return s.set(c,u)}},function(t,e,i){var n=i(255),s=i(256),r=i(3);t.exports=function(t,e,i,o,a,h){return void 0===i&&(i=!0),o||(o=new r(0,0)),o.x=n(t,i,a,h),o.y=s(e,i,a,h),o}},function(t,e){t.exports=function(t,e,i,n){var s=n.baseTileHeight,r=n.tilemapLayer;r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),s*=r.scaleY);var o=n.hexSideLength,a=(s-o)/2+o;return e?Math.floor(t/a):t/a}},function(t,e){t.exports=function(t,e,i,n){var s=n.baseTileHeight,r=n.tilemapLayer;return r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),s*=r.scaleY),e?Math.floor(t/(s/2)):t/(s/2)}},function(t,e,i){var n=i(119);t.exports=function(t,e,i){if(n(t,e,i)){var s=i.data[e][t];return null!==s&&s.index>-1}return!1}},function(t,e,i){var n=i(85),s=i(119),r=i(252);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,a.tileWidth,a.tileHeight),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(40),s=i(259),r=i(565),o=i(566),a=i(577);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(40),s=i(259);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map((function(t){return t.split(",")})),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(567),s=i(568),r=i(29),o=i(40),a=i(258),h=i(121),l=i(569),u=i(570),c=i(573),d=i(575);t.exports=function(t,e,i){var f=new h({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:a(e.orientation),format:o.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});f.orientation===r.HEXAGONAL&&(f.hexSideLength=e.hexsidelength),f.layers=c(e,i),f.images=l(e);var p=d(e);return f.tilesets=p.tilesets,f.imageCollections=p.imageCollections,f.objects=u(e),f.tiles=s(f),n(f),f}},function(t,e,i){var n=i(17);t.exports=function(t){for(var e,i,s,r,o,a=0;a0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){var n=i(2),s=i(260),r=i(572),o=i(161);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;d0;)if(f.i>=f.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}f=d.pop()}else{var p=f.layers[f.i];if(f.i++,"tilelayer"===p.type)if(p.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+p.name+"'");else{if(p.encoding&&"base64"===p.encoding){if(p.chunks)for(var v=0;v0?((m=new u(g,y.gid,L,k,t.tilewidth,t.tileheight)).rotation=y.rotation,m.flipX=y.flipped,b[k][L]=m):(x=e?null:new u(g,-1,L,k,t.tilewidth,t.tileheight),b[k][L]=x),++T===A.width&&(P++,T=0)}}else{(g=new h({name:f.name+p.name,x:f.x+a(p,"offsetx",0)+p.x,y:f.y+a(p,"offsety",0)+p.y,width:p.width,height:p.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:f.opacity*p.opacity,visible:f.visible&&p.visible,properties:a(p,"properties",[]),orientation:o(t.orientation)})).orientation===s.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var D=[],F=0,I=p.data.length;F0?((m=new u(g,y.gid,T,b.length,t.tilewidth,t.tileheight)).rotation=y.rotation,m.flipX=y.flipped,D.push(m)):(x=e?null:new u(g,-1,T,b.length,t.tilewidth,t.tileheight),D.push(x)),++T===p.width&&(b.push(D),T=0,D=[])}g.data=b,c.push(g)}else if("group"===p.type){var B=r(t,p,f);d.push(f),f=B}}return c}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(122),s=i(576),r=i(260),o=i(1453);t.exports=function(t){for(var e,i=[],a=[],h=null,l=0;l1){var d=void 0,f=void 0;if(Array.isArray(u.tiles)){d=d||{},f=f||{};for(var p=0;p=this.firstgid&&ta&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(120),s=i(85);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(122);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,o,a){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===r.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,o),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=0),(u=new v(t,a,i,n,s,o)).setImage(h),this.tilesets.push(u),u)},copy:function(t,e,i,n,s,r,o,a){return null!==(a=this.getLayer(a))?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankLayer:function(t,e,i,n,s,r,o,h){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===r&&(r=this.height),void 0===o&&(o=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new a({name:t,tileWidth:o,tileHeight:h,width:s,height:r,orientation:this.orientation}),c=0;c-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===h.ORTHOGONAL&&f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return o.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return o.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return o.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,a){return o.Copy(t,e,i,n,s,r,a,this.layer),this},fill:function(t,e,i,n,s,r){return o.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,a){return o.FilterTiles(t,e,i,n,s,r,a,this.layer)},findByIndex:function(t,e,i){return o.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,a){return o.FindTile(t,e,i,n,s,r,a,this.layer)},forEachTile:function(t,e,i,n,s,r,a){return o.ForEachTile(t,e,i,n,s,r,a,this.layer),this},getTileAt:function(t,e,i){return o.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return o.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return o.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return o.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return o.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return o.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return o.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return o.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return o.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return o.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return o.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return o.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return o.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return o.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return o.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return o.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return o.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return o.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return o.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return o.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return o.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return o.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return o.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return o.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,n){return this.tilemap.tileToWorldXY(t,e,i,n,this)},weightedRandomize:function(t,e,i,n,s){return o.WeightedRandomize(e,i,n,s,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,n,s){return this.tilemap.worldToTileXY(t,e,i,n,s,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});t.exports=h},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},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},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(1465);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(6);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(265),s=i(13),r=i(99),o=i(80),a=i(162),h=i(6),l=i(264),u=i(266),c=i(268);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}],v=a(e,"delay",i.delay),g=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),T=a(e,"repeatDelay",i.repeatDelay),w=r(e,"yoyo",i.yoyo),E=[],S=l("value",f),_=c(p[0],0,"value",S.getEnd,S.getStart,S.getActive,m,v,g,w,x,b,T,!1,!1);_.start=d,_.current=d,_.to=f,E.push(_);var A=new u(t,E,p);A.offset=s(e,"offset",null),A.completeDelay=s(e,"completeDelay",0),A.loop=Math.round(s(e,"loop",0)),A.loopDelay=Math.round(s(e,"loopDelay",0)),A.paused=r(e,"paused",!1),A.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",A),O=[A,null],P=u.TYPES,R=0;R_&&(_=O),S[A][C]=O}}}var P=a?n(a):null;return i=h?function(t,e,i,n){var s,r=0,a=n%m,h=Math.floor(n/m);if(a>=0&&a=0&&h0?Math.floor(k/M.length):h(e,"duration",L.duration),L.delay=h(e,"delay",L.delay),L.easeParams=c(e,"easeParams",L.easeParams),L.ease=a(c(e,"ease",L.ease),L.easeParams),L.hold=h(e,"hold",L.hold),L.repeat=h(e,"repeat",L.repeat),L.repeatDelay=h(e,"repeatDelay",L.repeatDelay),L.yoyo=o(e,"yoyo",L.yoyo),L.flipX=o(e,"flipX",L.flipX),L.flipY=o(e,"flipY",L.flipY);for(var D=0;D0?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;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){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 i=this.totalData,n=0;nv&&(v=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=v+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)}))},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;l1;if(!d||t!=d.x||e!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var s={x:f+t,y:p+e};!n&&d||(d=s),v.push(s),y=f+t,m=p+e}},b=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":y=t.x,m=t.y;break;case"H":y=t.x;break;case"V":m=t.y}x(y,m,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),a=this.tile.getCollisionGroup(),c=h(a,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});t.exports=c},function(t,e,i){var n=i(1399);n.Body=i(41),n.Composite=i(118),n.World=i(596),n.Detector=i(273),n.Grid=i(597),n.Pairs=i(598),n.Pair=i(250),n.Query=i(1400),n.Resolver=i(599),n.SAT=i(274),n.Constraint=i(128),n.Common=i(32),n.Engine=i(1401),n.Events=i(166),n.Sleeping=i(165),n.Plugin=i(595),n.Bodies=i(86),n.Composites=i(591),n.Axes=i(271),n.Bounds=i(84),n.Svg=i(592),n.Vector=i(83),n.Vertices=i(64),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,t.exports=n},function(t,e,i){var n={};t.exports=n;var s=i(32);n._registry={},n.register=function(t){if(n.isPlugin(t)||s.warn("Plugin.register:",n.toString(t),"does not implement all required fields."),t.name in n._registry){var e=n._registry[t.name],i=n.versionParse(t.version).number,r=n.versionParse(e.version).number;i>r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],(function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name}));for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(118),r=(i(128),i(32));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var n={};t.exports=n;var s=i(250),r=i(273),o=i(32);n.create=function(t){var e={controller:n,detector:r.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return o.extend(e,t)},n.update=function(t,e,i,s){var r,o,a,h,l,u=i.world,c=t.buckets,d=!1,f=i.metrics;for(f.broadphaseTests=0,r=0;ru.bounds.max.x||p.bounds.max.yu.bounds.max.y)){var v=n._getRegion(t,p);if(!p.region||v.id!==p.region.id||s){f.broadphaseTests+=1,p.region&&!s||(p.region=v);var g=n._regionUnion(v,p.region);for(o=g.startCol;o<=g.endCol;o++)for(a=g.startRow;a<=g.endRow;a++){h=c[l=n._getBucketId(o,a)];var y=o>=v.startCol&&o<=v.endCol&&a>=v.startRow&&a<=v.endRow,m=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!y&&m&&m&&h&&n._bucketRemoveBody(t,h,p),(p.region===v||y&&!m||s)&&(h||(h=n._createBucket(c,l)),n._bucketAddBody(t,h,p))}p.region=v,d=!0}}}d&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,s,r,o)},n._getRegion=function(t,e){var i=e.bounds,s=Math.floor(i.min.x/t.bucketWidth),r=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(s,r,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}},function(t,e,i){var n={};t.exports=n;var s=i(250),r=i(32);n._pairMaxIdleLife=1e3,n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;an._pairMaxIdleLife&&l.push(o);for(o=0;of.friction*f.frictionStatic*D*i&&(I=M,F=o.clamp(f.friction*L*i,-I,I));var B=r.cross(S,y),N=r.cross(_,y),Y=b/(v.inverseMass+g.inverseMass+v.inverseInertia*B*B+g.inverseInertia*N*N);if(k*=Y,F*=Y,P<0&&P*P>n._restingThresh*i)w.normalImpulse=0;else{var X=w.normalImpulse;w.normalImpulse=Math.min(w.normalImpulse+k,0),k=w.normalImpulse-X}if(R*R>n._restingThreshTangent*i)w.tangentImpulse=0;else{var U=w.tangentImpulse;w.tangentImpulse=o.clamp(w.tangentImpulse+F,-I,I),F=w.tangentImpulse-U}s.x=y.x*k+m.x*F,s.y=y.y*k+m.y*F,v.isStatic||v.isSleeping||(v.positionPrev.x+=s.x*v.inverseMass,v.positionPrev.y+=s.y*v.inverseMass,v.anglePrev+=r.cross(S,s)*v.inverseInertia),g.isStatic||g.isSleeping||(g.positionPrev.x-=s.x*g.inverseMass,g.positionPrev.y-=s.y*g.inverseMass,g.anglePrev-=r.cross(_,s)*g.inverseInertia)}}}}},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var n=i(276);t.exports=function(t,e,i,s){for(var r=t[0],o=1;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;hthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.minZoom=s(t,"minZoom",.001),this.maxZoom=s(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=s(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=s(t,"acceleration.x",0),this.accelY=s(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=s(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=s(t,"drag.x",0),this.dragY=s(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var n=s(t,"maxSpeed",null);"number"==typeof n?(this.maxSpeedX=n,this.maxSpeedY=n):(this.maxSpeedX=s(t,"maxSpeed.x",0),this.maxSpeedY=s(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(326),BaseCamera:i(133),CameraManager:i(799),Effects:i(333),Events:i(37)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="followupdate"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(18),s=i(0),r=i(37),o=new s({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,o,a,h){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===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&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=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,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=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(18),s=i(0),r=i(37),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,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.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(r.SHAKE_START,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._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(f=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>f&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?s.rotation+o*r:s.rotation-o*r,s.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,u)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},function(t,e,i){var n=i(18),s=i(0),r=i(134),o=i(37),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===n&&(n=!1),void 0===s&&(s=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._elapsed0){r.preRender();var o=this.getVisibleChildren(e.getChildren(),r);t.render(i,o,r)}}},getVisibleChildren:function(t,e){for(var i=[],n=0;n1)for(var i=1;i=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll")),s)},function(t,e,i){var n=i(136),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return s;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").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){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return i;var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return i;var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;tMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(137);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(137);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(351);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(14);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(183);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(361),IsSize:i(138),IsValue:i(836)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(139),Floor:i(76),To:i(838)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),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>>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;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i,n,s){return t.x=e+s*Math.cos(n),t.y=i+s*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t),s.set(r,o)}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(39),s=i(69),r=i(365),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports="pipelineafterflush"},function(t,e){t.exports="pipelinebeforeflush"},function(t,e){t.exports="pipelinebind"},function(t,e){t.exports="pipelineboot"},function(t,e){t.exports="pipelinedestroy"},function(t,e){t.exports="pipelinerebind"},function(t,e){t.exports="pipelineresize"},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_FS","","precision mediump float;","","varying vec4 outColor;","","void main ()","{"," gl_FragColor = vec4(outColor.bgr * outColor.a, outColor.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec4 inColor;","","varying vec4 outColor;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outColor = inColor;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.bgr * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","precision mediump float;","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(388),Palettes:i(889)}},function(t,e,i){t.exports={ARNE16:i(389),C64:i(890),CGA:i(891),JMP:i(892),MSX:i(893)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(895),MoveTo:i(393),CubicBezier:i(390),Curve:i(94),Ellipse:i(391),Line:i(392),QuadraticBezier:i(394),Spline:i(395)}},function(t,e,i){var n=i(0),s=i(390),r=i(391),o=i(5),a=i(392),h=i(393),l=i(394),u=i(10),c=i(395),d=i(3),f=i(14),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e=0;e--)i.push({r:e,g:o,b:a,color:n(e,o,a)});for(r=0,e=0;e<=s;e++,o--)i.push({r,g:o,b:e,color:n(r,o,e)});for(o=0,a=255,e=0;e<=s;e++,a--,r++)i.push({r,g:o,b:a,color:n(r,o,a)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(38),s=i(399);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){var n=i(188);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(135),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(195),s=i(38);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(398);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){t.exports={BitmapMask:i(310),GeometryMask:i(311)}},function(t,e,i){var n={AddToDOM:i(142),DOMContentLoaded:i(400),GetInnerHeight:i(401),GetScreenOrientation:i(402),GetTarget:i(407),ParseXML:i(408),RemoveFromDOM:i(202),RequestAnimationFrame:i(386)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(919)}},function(t,e,i){var n=i(0),s=i(9),r=i(24),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(142),s=i(321),r=i(325),o=i(31),a=i(0),h=i(346),l=i(921),u=i(366),c=i(101),d=i(384),f=i(347),p=i(400),v=i(9),g=i(22),y=i(409),m=i(24),x=i(414),b=i(415),T=i(417),w=i(106),E=i(422),S=i(385),_=i(387),A=i(426),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new y(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=f,this.scale=new b(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){m.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(w.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),_(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(g.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(g.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),i.emit(g.PRE_RENDER),i.emit(g.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(142);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;ov||c<-v)&&(c=0),c<0&&(c=v+c),-1!==d&&(v=c+(d+1));for(var g=f,y=f,m=0,x=0,b=0;br&&(m=T-r),w>o&&(x=w-o),t.add(b,e,i+g,s+y,h-m,l-x),(g+=h+p)+h>r&&(g=f,y+=l+p)}return t}},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 o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,v=e.cutHeight,g=e.realWidth,y=e.realHeight,m=Math.floor((g-u+c)/(s+c)),x=Math.floor((y-u+c)/(r+c)),b=m*x,T=e.x,w=s-T,E=s-(g-p-T),S=e.y,_=r-S,A=r-(y-v-S);(h>b||h<-b)&&(h=0),h<0&&(h=b+h),-1!==l&&(b=h+(l+1));for(var C=u,O=u,P=0,R=e.sourceIndex,M=0;M0){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 o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i0){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(-1!==i&&is||(t.splice(n,1),s===t.length-1?t.push(e):t.splice(s,0,e)),t}},function(t,e){t.exports=function(t,e,i){if(e===i)return t;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 nt.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(78);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 o=i-e,a=t.splice(e,o);if(s)for(var h=0;h0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var n=i(78);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 o=s;o0){for(s=0;su||V-U>u?(z.push(G.i-1),G.cr?(z.push(G.i+G.word.length),U=0,X=null):X=G):G.cr&&(z.push(G.i+G.word.length),U=0,X=null)}for(s=z.length-1;s>=0;s--)r=h,o=z[s],a="\n",h=r.substr(0,o)+a+r.substr(o+1);n.wrappedText=h,l=h.length,I=[],N=null}var j=0;for(s=0;sS&&(d=S),f>_&&(f=_);var K=S+w.xAdvance,q=_+y;pk&&(k=F),Fk&&(k=F),F0)for(var J=0;J0&&(o=(r=M.wrappedText).length);var L=e._bounds.lines;1===O?R=(L.longest-L.lengths[0])/2:2===O&&(R=L.longest-L.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);for(var k=i.roundPixels,D=0;D0||e.cropHeight>0;p&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var v,g,y=e.frame.glTexture,m=e.tintFill,x=r.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),b=r.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),T=r.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),w=r.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),E=l.setGameObject(e),S=0,_=0,A=0,C=0,O=e.letterSpacing,P=0,R=0,M=e.scrollX,L=e.scrollY,k=e.fontData,D=k.chars,F=k.lineHeight,I=e.fontSize/k.size,B=0,N=e._align,Y=0,X=0,U=e.getTextBounds(!1);e.maxWidth>0&&(h=(a=U.wrappedText).length);var z=e._bounds.lines;1===N?X=(z.longest-z.lengths[0])/2:2===N&&(X=z.longest-z.lengths[0]);var G=i.roundPixels,W=e.displayCallback,V=e.callbackData;t.pipelines.preBatch(e);for(var j=0;j0&&e.cropHeight>0&&(a.beginPath(),a.rect(0,0,e.cropWidth,e.cropHeight),a.clip());for(var B=0;B0&&(U=U%w-w):U>w?U=w:U<0&&(U=w+U%w),null===A&&(A=new h(B+Math.cos(X)*Y,N+Math.sin(X)*Y,g),E.push(A),I+=.01);I<1+G;)T=U*I+X,x=B+Math.cos(T)*Y,b=N+Math.sin(T)*Y,A.points.push(new a(x,b,g)),I+=.01;T=U+X,x=B+Math.cos(T)*Y,b=N+Math.sin(T)*Y,A.points.push(new a(x,b,g));break;case n.FILL_RECT:c.batchFillRect(p[++O],p[++O],p[++O],p[++O],f,d);break;case n.FILL_TRIANGLE:c.batchFillTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],f,d);break;case n.STROKE_TRIANGLE:c.batchStrokeTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],g,f,d);break;case n.LINE_TO:null!==A?A.points.push(new a(p[++O],p[++O],g)):(A=new h(p[++O],p[++O],g),E.push(A));break;case n.MOVE_TO:A=new h(p[++O],p[++O],g),E.push(A);break;case n.SAVE:l.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(l.pop());break;case n.TRANSLATE:B=p[++O],N=p[++O],f.translate(B,N);break;case n.SCALE:B=p[++O],N=p[++O],f.scale(B,N);break;case n.ROTATE:f.rotate(p[++O])}t.pipelines.postBatch(e)}}},function(t,e,i){var n=i(1),s=i(1);n=i(1066),s=i(1067),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),e.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){var n=i(1),s=i(1);n=i(1069),s=i(1070),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),this.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){var n=i(1),s=i(1);n=i(1072),s=i(1073),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=e.list,s=n.length;if(0!==s){e.depthSort(),t.pipelines.preBatch(e);var r=-1!==e.blendMode;r||t.setBlendMode(0);for(var o=e.alpha,a=0;a?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(6);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,f=l.source.height,p=n(e,"offset.x",0),v=n(e,"offset.y",0),g=n(e,"spacing.x",0),y=n(e,"spacing.y",0),m=n(e,"lineSpacing",0),x=n(e,"charsPerRow",null);null===x&&(x=d/i)>a.length&&(x=a.length);for(var b=p,T=v,w={retroFont:!0,font:h,size:i,lineHeight:s+m,chars:{}},E=0,S=0;S0)for(h=o.fillTint,l=s.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,_=0;_0)for(h=o.fillTint,l=s.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,_=0;_0){var P=o.strokeTint,R=s.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(P.TL=R,P.TR=R,P.BL=R,P.BR=R,S=1;S0)for(n(a,e),_=0;_0)for(n(a,e,e.altFillColor,e.altFillAlpha*u),_=0;_0){for(s(a,e,e.outlineFillColor,e.outlineFillAlpha*u),S=1;S0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(66);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(66);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){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(10);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(111);n.Area=i(1202),n.Circumference=i(447),n.CircumferencePoint=i(218),n.Clone=i(1203),n.Contains=i(112),n.ContainsPoint=i(1204),n.ContainsRect=i(1205),n.CopyFrom=i(1206),n.Equals=i(1207),n.GetBounds=i(1208),n.GetPoint=i(445),n.GetPoints=i(446),n.Offset=i(1209),n.OffsetPoint=i(1210),n.Random=i(180),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(111);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(112);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(112);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){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},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,i){var n=i(10);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,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(4),s=i(231);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var v=(l-d)/(u-f),g=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*v-2*g*v-2*l)*o-4*(r=v*v+1)*(l*l+u*u+g*g-c*c-2*u*g))?(h=-o/(2*r),i.push(new n(h,g-h*v))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,g-h*v)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,g-h*v)))}}return i}},function(t,e,i){var n=i(232),s=i(151);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){var n=i(140),s=i(487),r=new(i(47));function o(t,e,i,o,a){var h=Math.cos(t),l=Math.sin(t);r.setTo(e,i,e+h,i+l);var u=s(r,o);u&&a.push(new n(u.x,u.y,t,u.w))}function a(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var n=[],s=[],r=0;r=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s0){var y=u[0],m=[y];for(h=1;h=o&&(m.push(x),y=x)}var b=u[u.length-1];return n(y,b)i&&(i=h.x),h.xr&&(r=h.y),h.y1?(n=i.x,s=i.y):a>0&&(n+=r*a,s+=o*a)}return(r=t.x-n)*r+(o=t.y-s)*o}function n(t,e,s,r,o){for(var a,h=r,l=e+1;lh&&(a=l,h=u)}h>r&&(a-e>1&&n(t,e,a,r,o),o.push(t[a]),s-a>1&&n(t,a,s,r,o))}function s(t,e){var i=t.length-1,s=[t[0]];return n(t,0,i,e,s),s.push(t[i]),s}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var r=e*e;i||(n=function(t,e){for(var i,n,s,r,o,a=t[0],h=[a],l=1,u=t.length;le&&(h.push(i),a=i);return a!==i&&h.push(i),h}(n,r)),t.setTo(s(n,r))}return t}},function(t,e){t.exports=function(t,e,i){for(var n=t.points,s=0;sn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){return void 0===r&&(r=new n),r.setTo(Math.min(t,i),Math.min(e,s),Math.abs(t-i),Math.abs(e-s))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(190);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(10),s=i(152);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(4),s=i(36);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&(this._over[0].splice(n,1),this.manager.resetCursor(i)),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&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s||n>0&&e>=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.worldX-a.dragStartXGlobal,c=t.worldY-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),v=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,v*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=v+a.dragStartY}else s=t.worldX-a.dragX,r=t.worldY-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e,t);for(var h=0;h0){for(this.sortGameObjects(s,t),e=0;e0){for(this.sortGameObjects(r,t),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(y(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},removeAllKeys:function(t){for(var e=this.keys,i=0;it._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",(function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizei&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){var i={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=i},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e){t.exports="collide"},function(t,e){t.exports="overlap"},function(t,e){t.exports="pause"},function(t,e){t.exports="resume"},function(t,e){t.exports="tilecollide"},function(t,e){t.exports="tileoverlap"},function(t,e){t.exports="worldbounds"},function(t,e){t.exports="worldstep"},function(t,e){var i,n,s,r,o,a,h,l,u,c,d,f,p,v,g,y,m,x=function(){return c&&g&&n.blocked.right?(i.processX(-m,h,!1,!0),1):u&&y&&n.blocked.left?(i.processX(m,h,!0),1):p&&y&&i.blocked.right?(n.processX(-m,l,!1,!0),2):f&&g&&i.blocked.left?(n.processX(m,l,!0),2):0},b=function(t){if(s&&r)m*=.5,0===t||3===t?(i.processX(m,o),n.processX(-m,a)):(i.processX(-m,o),n.processX(m,a));else if(s&&!r)0===t||3===t?i.processX(m,h,!0):i.processX(-m,h,!1,!0);else if(!s&&r)0===t||3===t?n.processX(-m,l,!1,!0):n.processX(m,l,!0);else{var e=.5*m;0===t?v?(i.processX(m,0,!0),n.processX(0,null,!1,!0)):p?(i.processX(e,0,!0),n.processX(-e,0,!1,!0)):(i.processX(e,n.velocity.x,!0),n.processX(-e,null,!1,!0)):1===t?d?(i.processX(0,null,!1,!0),n.processX(m,0,!0)):c?(i.processX(-e,0,!1,!0),n.processX(e,0,!0)):(i.processX(-e,null,!1,!0),n.processX(e,i.velocity.x,!0)):2===t?v?(i.processX(-m,0,!1,!0),n.processX(0,null,!0)):f?(i.processX(-e,0,!1,!0),n.processX(e,0,!0)):(i.processX(-e,n.velocity.x,!1,!0),n.processX(e,null,!0)):3===t&&(d?(i.processX(0,null,!0),n.processX(-m,0,!1,!0)):u?(i.processX(e,0,!0),n.processX(-e,0,!1,!0)):(i.processX(e,n.velocity.y,!0),n.processX(-e,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=i.velocity.x,e=n.velocity.x,s=Math.sqrt(e*e*n.mass/i.mass)*(e>0?1:-1),r=Math.sqrt(t*t*i.mass/n.mass)*(t>0?1:-1),h=.5*(s+r);return r-=h,o=h+(s-=h)*i.bounce.x,a=h+r*n.bounce.x,u&&y?b(0):f&&g?b(1):c&&g?b(2):!(!p||!y)&&b(3)},Set:function(t,e,o){n=e;var a=(i=t).velocity.x,b=n.velocity.x;return s=i.pushable,u=i._dx<0,c=i._dx>0,d=0===i._dx,g=Math.abs(i.right-n.x)<=Math.abs(n.right-i.x),h=b-a*i.bounce.x,r=n.pushable,f=n._dx<0,p=n._dx>0,v=0===n._dx,y=!g,l=a-b*n.bounce.x,m=Math.abs(o),x()},Run:b,RunImmovableBody1:function(t){1===t?n.velocity.x=0:g?n.processX(m,l,!0):n.processX(-m,l,!1,!0),i.moves&&(n.y+=(i.y-i.prev.y)*i.friction.y,n._dy=n.y-n.prev.y)},RunImmovableBody2:function(t){2===t?i.velocity.x=0:y?i.processX(m,h,!0):i.processX(-m,h,!1,!0),n.moves&&(i.y+=(n.y-n.prev.y)*n.friction.y,i._dy=i.y-i.prev.y)}}},function(t,e){var i,n,s,r,o,a,h,l,u,c,d,f,p,v,g,y,m,x=function(){return c&&g&&n.blocked.down?(i.processY(-m,h,!1,!0),1):u&&y&&n.blocked.up?(i.processY(m,h,!0),1):p&&y&&i.blocked.down?(n.processY(-m,l,!1,!0),2):f&&g&&i.blocked.up?(n.processY(m,l,!0),2):0},b=function(t){if(s&&r)m*=.5,0===t||3===t?(i.processY(m,o),n.processY(-m,a)):(i.processY(-m,o),n.processY(m,a));else if(s&&!r)0===t||3===t?i.processY(m,h,!0):i.processY(-m,h,!1,!0);else if(!s&&r)0===t||3===t?n.processY(-m,l,!1,!0):n.processY(m,l,!0);else{var e=.5*m;0===t?v?(i.processY(m,0,!0),n.processY(0,null,!1,!0)):p?(i.processY(e,0,!0),n.processY(-e,0,!1,!0)):(i.processY(e,n.velocity.y,!0),n.processY(-e,null,!1,!0)):1===t?d?(i.processY(0,null,!1,!0),n.processY(m,0,!0)):c?(i.processY(-e,0,!1,!0),n.processY(e,0,!0)):(i.processY(-e,null,!1,!0),n.processY(e,i.velocity.y,!0)):2===t?v?(i.processY(-m,0,!1,!0),n.processY(0,null,!0)):f?(i.processY(-e,0,!1,!0),n.processY(e,0,!0)):(i.processY(-e,n.velocity.y,!1,!0),n.processY(e,null,!0)):3===t&&(d?(i.processY(0,null,!0),n.processY(-m,0,!1,!0)):u?(i.processY(e,0,!0),n.processY(-e,0,!1,!0)):(i.processY(e,n.velocity.y,!0),n.processY(-e,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=i.velocity.y,e=n.velocity.y,s=Math.sqrt(e*e*n.mass/i.mass)*(e>0?1:-1),r=Math.sqrt(t*t*i.mass/n.mass)*(t>0?1:-1),h=.5*(s+r);return r-=h,o=h+(s-=h)*i.bounce.y,a=h+r*n.bounce.y,u&&y?b(0):f&&g?b(1):c&&g?b(2):!(!p||!y)&&b(3)},Set:function(t,e,o){n=e;var a=(i=t).velocity.y,b=n.velocity.y;return s=i.pushable,u=i._dy<0,c=i._dy>0,d=0===i._dy,g=Math.abs(i.bottom-n.y)<=Math.abs(n.bottom-i.y),h=b-a*i.bounce.y,r=n.pushable,f=n._dy<0,p=n._dy>0,v=0===n._dy,y=!g,l=a-b*n.bounce.y,m=Math.abs(o),x()},Run:b,RunImmovableBody1:function(t){1===t?n.velocity.y=0:g?n.processY(m,l,!0):n.processY(-m,l,!1,!0),i.moves&&(n.x+=(i.x-i.prev.x)*i.friction.x,n._dx=n.x-n.prev.x)},RunImmovableBody2:function(t){2===t?i.velocity.y=0:y?i.processY(m,h,!0):i.processY(-m,h,!1,!0),n.moves&&(i.x+=(n.x-n.prev.x)*n.friction.x,i._dx=i.x-i.prev.x)}}},function(t,e,i){var n={ProcessTileCallbacks:i(530),ProcessTileSeparationX:i(534),ProcessTileSeparationY:i(536),SeparateTile:i(532),TileCheckX:i(533),TileCheckY:i(535),TileIntersectsBody:i(248)};t.exports=n},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.boundsCenter=new s,this.centerDiff=new s},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,n=t.bounds.max.x-t.bounds.min.x,s=t.bounds.max.y-t.bounds.min.y,r=n*t.centerOfMass.x,o=s*t.centerOfMass.y;return e.set(n/2,s/2),i.set(r-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+n.y+r.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i+n.y+r.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+n.y+r.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+r.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.centerDiff;return new s(e+n.x,i+n.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+r.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i-(n.y-r.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i-(n.y-r.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i-(n.y-r.y))}return!1}});t.exports=r},function(t,e){function i(t,e,i){i=i||0;var n,s,r,o,a,h,l,u=[0,0];return n=t[1][1]-t[0][1],s=t[0][0]-t[1][0],r=n*t[0][0]+s*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],S(l=n*a-o*s,0,i)||(u[0]=(a*r-s*h)/l,u[1]=(n*h-o*r)/l),u}function n(t,e,i,n){var s=e[0]-t[0],r=e[1]-t[1],o=n[0]-i[0],a=n[1]-i[1];if(o*r-a*s==0)return!1;var h=(s*(i[1]-t[1])+r*(t[0]-i[0]))/(o*r-a*s),l=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*s-o*r);return h>=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=T(t);return e.length>0?w(t,e):[t]},quickDecomp:function t(e,i,n,s,l,u,c){u=u||100,c=c||0,l=l||25,i=void 0!==i?i:[],n=n||[],s=s||[];var g=[0,0],y=[0,0],m=[0,0],b=0,T=0,w=0,S=0,_=0,A=0,C=0,O=[],P=[],R=e,M=e;if(M.length<3)return i;if(++c>u)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;L_&&(_+=e.length),S=Number.MAX_VALUE,_3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],s=i-1;s>=0;--s)_(n,t[s],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);return!r(f(t,e-1),f(t,e),f(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))1?1:0;s0&&u.trigger(t,"collisionStart",{pairs:b.collisionStart}),o.preSolvePosition(b.list),s=0;s0&&u.trigger(t,"collisionActive",{pairs:b.collisionActive}),b.collisionEnd.length>0&&u.trigger(t,"collisionEnd",{pairs:b.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(y),u.trigger(t,"afterUpdate",g),t},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_START,e,i,n)})),p.on(e,"collisionActive",(function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,n)})),p.on(e,"collisionEnd",(function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_END,e,i,n)}))},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e-s,s,n+2*s),this.updateWall(o,"right",t+i,e-s,s,n+2*s),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return g.add(this.localWorld,o),o},add:function(t){return g.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;in.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,t-n.counterTimestamp>=1e3&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),h.update(i,e,r)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=o.keys(t.buckets),r=0;r0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=0;s1?1:0;h1?1:0;a1?1:0;a1&&this.renderConvexHull(v,e,f,m)}}},renderBody:function(t,e,i,n,s,r,o,a){void 0===n&&(n=null),void 0===s&&(s=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,f=d>1?1:0;f1){var s=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(s[0].x,s[0].y);for(var r=1;r0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,this},shutdown:function(){p.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=m},function(t,e,i){t.exports={BasePlugin:i(540),DefaultPlugins:i(197),PluginCache:i(24),PluginManager:i(414),ScenePlugin:i(1404)}},function(t,e,i){var n=i(540),s=i(0),r=i(20),o=new s({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){t.exports={Canvas:i(1406),Events:i(91),Snapshot:i(1407),WebGL:i(1408)}},function(t,e,i){t.exports={CanvasRenderer:i(368),GetBlendModes:i(370),SetTransform:i(30)}},function(t,e,i){t.exports={Canvas:i(369),WebGL:i(383)}},function(t,e,i){var n=i(107),s=i(17),r={PipelineManager:i(372),Pipelines:i(1409),RenderTarget:i(141),Utils:i(12),WebGLPipeline:i(58),WebGLRenderer:i(371),WebGLShader:i(375)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(92),s=i(17),r={BitmapMaskPipeline:i(373),Events:i(374),GraphicsPipeline:i(376),LightPipeline:i(377),MultiPipeline:i(108),PointLightPipeline:i(378),PostFXPipeline:i(1410),RopePipeline:i(379),SinglePipeline:i(380),UtilityPipeline:i(381)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(0),s=i(198),r=i(2),o=i(1411),a=i(382),h=i(58),l=new n({Extends:h,initialize:function(t){t.renderTarget=r(t,"renderTarget",1),t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new s,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,n,s){this.manager.copyFrame(t,e,i,n,s)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,n,s){this.manager.blendFrames(t,e,i,n,s)},blendFramesAdditive:function(t,e,i,n,s){this.manager.blendFramesAdditive(t,e,i,n,s)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,n,s,r){this.manager.blitFrame(t,e,i,n,s,r)},copyFrameRect:function(t,e,i,n,s,r,o,a){this.manager.copyFrameRect(t,e,i,n,s,r,o,a)},bindAndDraw:function(t,e,i,n,s){void 0===i&&(i=!0),void 0===n&&(n=!0);var r=this.gl,o=this.renderer;this.bind(s),this.set1i("uMainSampler",0),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0),i&&(n?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1,!1),o.currentFramebuffer||r.viewport(0,0,o.width,o.height)),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),e?(r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null)):o.resetTextures()}});t.exports=l},function(t,e){t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},function(t,e,i){var n=i(17),s=i(201),r={Center:i(403),Events:i(104),Orientation:i(404),ScaleManager:i(415),ScaleModes:i(405),Zoom:i(406)};r=n(!1,r,s.CENTER),r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){var n=i(144),s=i(17),r={Events:i(20),GetPhysicsPlugins:i(419),GetScenePlugins:i(420),SceneManager:i(417),ScenePlugin:i(1414),Settings:i(421),Systems:i(204)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(18),s=i(0),r=i(20),o=i(2),a=i(24),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(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data")),this.systems.events.emit(r.TRANSITION_OUT,i,n),this.systems.events.on(r.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(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,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,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){t.exports={Events:i(438),List:i(110),Map:i(102),ProcessQueue:i(211),RTree:i(531),Set:i(149),Size:i(416)}},function(t,e,i){var n=i(17),s=i(1417),r={CanvasTexture:i(423),Events:i(106),FilterMode:s,Frame:i(109),Parsers:i(425),Texture:i(206),TextureManager:i(422),TextureSource:i(424)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(17),s=i(1419),r={Components:i(251),Parsers:i(1452),Formats:i(40),ImageCollection:i(576),ParseToTilemap:i(262),Tile:i(85),Tilemap:i(580),TilemapCreator:i(1459),TilemapFactory:i(1460),Tileset:i(122),TilemapLayer:i(581),Orientation:i(29),LayerData:i(120),MapData:i(121),ObjectLayer:i(572)};r=n(!1,r,s.ORIENTATION),t.exports=r},function(t,e,i){var n={ORIENTATION:i(29)};t.exports=n},function(t,e,i){var n=i(26),s=i(63);t.exports=function(t,e,i,r,o,a,h,l){void 0===h&&(h=!0),t<0&&(t=0),e<0&&(e=0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(72),s=i(63),r=i(160);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var r,o,a,h={},l={};if(Array.isArray(n.edgecolors))for(r=0;r1||e.scaleY>1)&&(f.imageSmoothingEnabled=!1);for(var v=0;v-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=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-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;t>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(77),DeepCopy:i(175),Extend:i(17),GetAdvancedValue:i(13),GetFastValue:i(2),GetMinMaxValue:i(1485),GetValue:i(6),HasAll:i(1486),HasAny:i(455),HasValue:i(126),IsPlainObject:i(7),Merge:i(127),MergeRight:i(1487),Pick:i(571),SetValue:i(478)}},function(t,e,i){var n=i(6),s=i(18);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var n=k.create(t,e),s=[];return O.point(i,n).forEach((function(t){-1===s.indexOf(t)&&s.push(t)})),s},intersectRect:function(t,e,i,n,s,r){void 0===s&&(s=!1),r=this.getMatterBodies(r);var o={min:{x:t,y:e},max:{x:t+i,y:e+n}},a=[];return O.region(r,o,s).forEach((function(t){-1===a.indexOf(t)&&a.push(t)})),a},intersectRay:function(t,e,i,n,s,r){void 0===s&&(s=1),r=this.getMatterBodies(r);for(var o=[],a=O.ray(r,k.create(t,e),k.create(i,n),s),h=0;h0)for(var o=0;oe.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t+"../"})(),(()=>{"use strict";var t={};i.r(t),i.d(t,{scene1:()=>ls,scene2:()=>us});var e=i(260);const n={parent:"game",transparent:!0,antialias:!0,physics:{default:"arcade",arcade:{gravity:{y:600},debug:!1}},scale:{parent:"game",mode:Phaser.Scale.FIT,autoCenter:Phaser.Scale.CENTER_HORIZONTALLY,min:{width:320,height:320},max:{width:1980,height:1980}}};function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function r(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:0,i=this.progressObject.getByName("progress");e>0&&(this.progressObject.getByName("progressStart").setVisible(!0),i.setVisible(!0)),this.scene.tweens.add({targets:i,width:this.widthProgressMiddle*e,onComplete:function(){if(1===e){var n=t.progressObject.getByName("progressEnd").setX(i.x+i.displayWidth).setVisible(!0);t.scene.tweens.add({targets:n,width:t.widthProgressCap})}}})}}],i&&E(e.prototype,i),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}(e.GameObjects.Container);function I(){M(this,k,B).call(this),M(this,D,N).call(this),this.add([this.barObject,this.progressObject]),this.setScale(.4)}function B(){var t=this.width,e=this.scene.add.image(0,0,this.atlasName,"bar-left").setOrigin(0),i=t-2*e.displayWidth,n=e.x+e.displayWidth,s=this.scene.add.tileSprite(n,0,i,this.height,this.atlasName,"bar-middle").setOrigin(0),r=s.x+s.displayWidth,o=this.scene.add.image(r,0,this.atlasName,"bar-right").setOrigin(0);this.barObject=this.scene.add.container(-t/2,0,[e,s,o])}function N(){var t=this.width-2*this.padding.x,e=this.scene.add.image(0,0,this.atlasName,"progress-left").setOrigin(0).setName("progressStart").setVisible(!1);this.widthProgressMiddle=t-2*e.displayWidth;var i=e.x+e.displayWidth,n=this.scene.add.tileSprite(i,0,0,86,this.atlasName,"progress-middle").setOrigin(0).setVisible(!1).setName("progress"),s=this.scene.add.image(0,0,this.atlasName,"progress-right").setOrigin(0).setVisible(!1).setName("progressEnd");this.widthProgressCap=s.displayWidth,this.progressObject=this.scene.add.container(-t/2,this.padding.y,[e,n,s])}function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}function X(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i=["posOnGrid"];return Object.keys(this.model).forEach((function(n){i.includes(n)||void 0===e[n]||(t[n]=e[n])})),this}},{key:"clear",value:function(){var t=this.posOnGrid;return Object.assign(this,this.model,{posOnGrid:t}),this}},{key:"reset",value:function(){return Object.assign(this,this.model),this}},{key:"random",value:function(){this.empty=!1;var t=e.Math.Between(0,Z(this,$).length-1),i=Z(this,$)[t];if(!i)throw"Not found frame: ".concat(i);return Object.assign(this,H[i]),this.frame=i,this}}],n&&K(i.prototype,n),s&&K(i,s),Object.defineProperty(i,"prototype",{writable:!1}),t}();function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function it(t,e){for(var i=0;i=0;s--)for(var r=n-1;r>=0;r--)t(r,s)}},{key:"fallTiles",value:function(){var t=this;if(this.getGridTiles()){var e=[];this.eachGridReverse((function(i,n){var s=t.getTile(i,n);if(s&&s.empty){var r=st(t,at,yt).call(t,i,n);r?st(t,ut,bt).call(t,r,i,n):e.push({x:i,y:n})}})),e.forEach((function(e){var i=e.x,n=e.y;t.addToGridTiles(i,n,t.createTileRandom())}))}}},{key:"getNearestTilesByType",value:function(t){var e=t.type,i=t.posOnGrid,n=i.x,s=i.y;return st(this,ht,mt).call(this,n,s,(function(t){return t.type===e}))}},{key:"getNearestTilesRadius",value:function(t,e){t.type;var i=t.posOnGrid,n=i.x,s=i.y;return st(this,ht,mt).call(this,n,s,(function(t){return Math.abs(n-t.posOnGrid.x)<=e&&Math.abs(s-t.posOnGrid.y)<=e}))}},{key:"shuffle",value:function(){}},{key:"removeTiles",value:function(t){var e=this;t.forEach((function(t){var i=t.x,n=t.y;st(e,lt,xt).call(e,i,n)})),this.fallTiles()}}])&&it(e.prototype,i),n&&it(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vt(t,e){var i=e.x,n=e.y;this.posByName[t]={x:i,y:n}}function gt(t){if("string"==typeof t)delete this.posByName[t];else if("object"===et(t))for(var e in this.posByName){var i=this.posByName[e],n=i.x,s=i.y;n===t.x&&s===t.y&&delete this.posByName[e]}}function yt(t,e){var i=this,n=this.grid,s=n.w,r=n.h,o=null;return function t(e,n){if(!(e<0||n<0||e>=r||n>=s)){var a=i.getTile(e,n);a&&(a.empty?t(a.posOnGrid.x,a.posOnGrid.y-1):o=a)}}(t,e),o}function mt(t,e,i){var n=this,s=this.grid,r=s.w,o=s.h,a=[];return function t(e,s){if(!(e<0||s<0||e>=o||s>=r)){var h=n.getTile(e,s);h&&!h.empty&&!h.check&&i(h)&&(a.push({x:e,y:s}),st(n,dt,wt).call(n,e,s,{check:!0}),t(e-1,s),t(e+1,s),t(e,s-1),t(e,s+1))}}(t,e),st(this,ct,Tt).call(this,{check:!1}),a}function xt(t,e){st(this,ot,gt).call(this,{x:t,y:e}),this.getTile(t,e).clear()}function bt(t,e,i){var n=t.posOnGrid.x,s=t.posOnGrid.y;st(this,dt,wt).call(this,e,i,t),st(this,lt,xt).call(this,n,s)}function Tt(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.eachGrid((function(i,n){st(t,dt,wt).call(t,i,n,e)}))}function wt(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.getGridTiles()){var n=this.getTile(t,e);if(n)return i.name&&st(this,rt,vt).call(this,i.name,{x:t,y:e}),n.update(i)}return null}function Et(){var t=this;this.eachGrid((function(e,i){t.addToGridTiles(e,i,t.createTileRandom())}))}function St(t){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(t)}function _t(t,e){for(var i=0;i=this.minTilesTarget;n?this.scene.gridService.removeTiles(i):this.containerTiles.getByName(e.name).unposible();this.emit("clickOnTile",{tile:e,tilesTarget:i,isCondition:n})}function Yt(t){var e=this,i=this.scene.add.tileItem({tile:t}).on("click",(function(){for(var t,i=arguments.length,n=new Array(i),s=0;s3&&void 0!==arguments[3]?arguments[3]:{};return xe(this,r),Ae(Se(n=s.call(this,t,e,i)),Oe),n.options=o,n.imageBg="score-bg",Ce(Se(n),Oe,Re).call(Se(n)),n}return e=r,(i=[{key:"updateMove",value:function(t){this.getByName("movesText").setText("".concat(t))}},{key:"updateScore",value:function(t){this.getByName("scoresNumText").setText("".concat(t))}}])&&be(e.prototype,i),n&&be(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}(e.GameObjects.Container);function Re(){var t=this.scene.configGame,e=t.fontFamily,i=t.colorTextBar,n=this.scene.add.image(0,0,this.imageBg).setOrigin(0,0).setScale(.32),s=this.scene.make.text({x:n.displayWidth/2,y:50,style:{fontSize:80,fontFamily:e,color:i}}).setName("movesText").setOrigin(.5,0),r=this.scene.make.text({x:n.displayWidth/2,y:215,text:"Score:",style:{fontSize:24,fontFamily:e,color:i}}).setOrigin(.5,0),o=this.scene.make.text({x:n.displayWidth/2,y:245,text:"150",style:{fontSize:36,fontFamily:e,color:i}}).setName("scoresNumText").setOrigin(.5,0);this.add([n,s,r,o]),this.setSize(n.displayWidth,n.displayHeight)}function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Le(t,e){for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:{};return Ye(this,r),je(We(n=s.call(this,t,e,i)),Ke),n.options=o,n.widthProgress=1040,n.imageBg="top-bar-bg",He(We(n),Ke,Ze).call(We(n)),n}return e=r,(i=[{key:"updateProgress",value:function(t){this.progress.updateProgress(t)}}])&&Xe(e.prototype,i),n&&Xe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}(e.GameObjects.Container);function Ze(){var t=this.scene.cameras.main.centerX,e=this.scene.configGame,i=e.fontFamily,n=e.colorTextBar;this.setX(t);var s=this.scene.add.image(0,0,this.imageBg).setOrigin(.5,0).setScale(.32),r=this.scene.make.text({x:0,y:6,text:"Progress",style:{fontSize:16,fontFamily:i,color:n}}).setOrigin(.82,0);this.progress=this.scene.add.progressLoader(-32,35,{width:this.widthProgress}),this.add([s,r,this.progress])}function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Qe(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:0;return this.scores+=Mi(this,Li,Di).call(this,t),this}},{key:"resetScores",value:function(){return this.scores=0,this}},{key:"movesDown",value:function(){return this.moves=Math.max(this.moves-1,0),this}},{key:"resetMoves",value:function(){return this.moves=this.movesLimit,this}}],i&&Pi(e.prototype,i),n&&Pi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Di(t){var e=t;return Math.floor(Math.min(t*e,this.scoresTarget/3))}function Fi(t){return Fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fi(t)}function Ii(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.cameras.main,s=n.centerX,r=n.centerY,o={fontFamily:this.configGame.fontFamily,fontSize:50,textAlign:"center",color:this.configGame.colorTextTitle};this.add.text(e||s,i||r,t,o).setOrigin(.5)}}],i&&Bi(e.prototype,i),n&&Bi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}(e.Scene);const Gi=i.p+"assets/img/38f7842598622b0104a5.png",Wi=i.p+"assets/img/c8854cabf0e388da7689.png",Vi=i.p+"assets/img/fee34e44e04efe539b16.json";function ji(t){return ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(t)}function Hi(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};An(this,t),On(this,Ln),On(this,Mn),Pn(this,"emitter",void 0),this.scene=e,this.particlesSprite="particles-spr",this.options=_n({scale:.2,maxSpeed:600,life:1e3,gravity:200,maxDelay:200,explosionForce:30},i),Rn(this,Mn,Dn).call(this)}var i,n,s;return i=t,n=[{key:"run",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=this.options.maxDelay;this.scene.time.addEvent({delay:e.Math.Between(50,i),callback:Rn(this,Ln,Fn),callbackScope:this,repeat:t})}}],n&&Cn(i.prototype,n),s&&Cn(i,s),Object.defineProperty(i,"prototype",{writable:!1}),t}();function Dn(){var t=this.options,e=t.maxSpeed,i=t.scale,n=t.life,s=t.gravity;this.emitter=this.scene.add.particles(this.particlesSprite).createEmitter({speed:{min:-100,max:e},angle:{min:0,max:360},scale:{start:i,end:0},alpha:{start:1,end:.1},lifespan:n,gravityY:s,active:!1,frame:["particle-1","particle-2","particle-3"],blendMode:"SCREEN"})}function Fn(){var t=this.scene.cameras.main,i=t.centerX,n=t.centerY,s=t.width,r=this.options.explosionForce,o=e.Math.Between(i/2,s/1.5),a=e.Math.Between(n/3,n/1.2);this.emitter.active=!0,this.emitter.explode(r,o,a)}function In(t){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(t)}function Bn(t,e){for(var i=0;i0}},{key:"activate",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.canAvailable&&(this.active=t),this}},{key:"accept",value:function(){if(this.active){(function(t,e,i){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return i})(this,bs,ws).call(this),this.active=!1;var t=function(t,e){return e.get?e.get.call(t):e.value}(e=this,ms(e,xs,"get"));return fs(fs({},this),{},{params:t})}var e;return this}},{key:"reset",value:function(){return this.amountLeft=this.amount,this.active=!1,this}}],i&&vs(e.prototype,i),n&&vs(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ws(){return this.amountLeft=Math.max(this.amountLeft-1,0),this}function Es(t,e){for(var i=0;i=this.scoresService.scoresTarget?this.nextLevel():this.scoresService.moves<=0&&this.endDefeat()}},{key:"endDefeat",value:function(){this.stopScene(),this.scene.start("SceneDefeat",{nextScene:this.scene.key})}},{key:"nextLevel",value:function(){var t=this.scoresService.scores;this.stopScene(),"SceneWin"===this.nextScene?this.scene.start(this.nextScene):this.scene.start("SceneNextLevel",{scoreOnLevel:t,nextScene:this.nextScene})}},{key:"stopScene",value:function(){this.scoresService.resetScores().resetMoves(),this.bonusesService.reset(),this.scene.stop()}}],n&&Ls(i.prototype,n),s&&Ls(i,s),Object.defineProperty(i,"prototype",{writable:!1}),o}(zi);function zs(t){return zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zs(t)}function Gs(t,e){for(var i=0;ieems0aH9Na9qd51o-5Z;xXbGBI8Jk)e7-}0BSQ!{RQxKXvSzTKJRdjmoD#ghW G+W7!!91@@a delta 62 zcmX>eems0aH9L!iu>YY)1{<5EXbGBFnVMM{T51~@SQ!{B*L8d~SzTKJRrFfH&#=i6 G+W7#IvlKP} diff --git a/src/assets/img/game/icon-unknow.png b/src/assets/img/game/icon-unknow.png deleted file mode 100644 index 737f826aeecdea9618b0a2936644ece1d5e1f8d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2689 zcmV-{3V!v8P) zZLn2U8OMKI1r$+e*6G=IHiz@F&pB(az4kf(-^`wS=gz(R zuKldv*?X_Gp0(Dn!NEa9g^|DjFe7!G2TZCu93y~n_WcpygnfUg>evtLNgca^cNK0p zD}pi0zp3Dqj&Qola|xS+w`J3*fZb^$wq?Z7tRXjery1HB^N7+@YS zANVvdyP#`#Vqa{>b@sFOfE~b7z~jJX;8+1=3raVOHx;-RSO{DWjE(ZXOF5mgR}6Ly3xExF zcUWtW({8!8PXTw?wQaC#E&a8X`2x-XZnBo*MtiKb(>N##BkUSC+BM%~F(@Tv6wkf8 z-3GjDU#CYG>AmqEPoz)yh}ffW(A zPK#u;wTO3Htj5P);F!g8W&65)ns2tgIMJB1EmkgO%Yfmr#w%9wE(87!{2Vw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ny#lvpN3xGFsIJXGPn^u?J zU!n34&#?`-1~`_}`9=O5vpU?C$A8L8JZyE*h3$;viNbly>MpkxV)GOaEBNPu*K__q z!XK|&o#nbLao*x#8)|$O*dO43iO$$>b+tY3IEE0-hF{d`fg%j#%Hh(d-E&+!uQ z8B3`Waq)!J%}b$56;eE`1M&+R+l`7le0L6KA+&hdkjqNoE9rd?L~xE+YSYRhc4#j` zyoCGp-d7mO``mp+6`)A*u-*LT0C#E*M-Wcg3Se`J-mSA}@vtn`8*OMt2?qJ$VtW;E zLkx>B#UNgSYwcbH+@ne3UO8zoof*>(oiT}r4b?2Sru{P!l&9>t2|1TrOruKLh)ukN zt@a-BP2gZ0MJg2sEq0f*I>SE{v5JQ^@!fJ69|3Ly-j1M5vEyR2+G4h@h;EXs#4KLI zVaxL$unEN4%=t`?TWrn;ZZ1P2ZW+W&aN82C04}gkwGvJLAA{8v6BnERL{O$olu5jV zefFuIW?y@82co@IF(_R(R2jufNIvZYHvaoim+w01uI+brtpjDh>z@@t89K%FQ$1?O zWE%rs1k447mHW~vBMn<^0<|07IuJpbyfAEVaIgz5qbBY#bglK)yS}W^5tgwQZgY|+ z0aq~(cI#S%-7H?3F~B_FO3SdF8PRKoyJJ5GYzF>hN7rZVbi<=I3&&EAV@E%5Dewtk zHZTjgFhD$9zuNPb9pW;5|6#MZdTz7AUJ#WBYW00000NkvXXu0mjf%u^h- diff --git a/src/assets/img/game/pause-btn.png b/src/assets/img/game/pause-btn.png deleted file mode 100644 index 9a66fad285bcb388342f6b704d2ac79fa1340eb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35670 zcmV)vK$X9VP)3xbuGNAs=IHPJ4qU8B%z3q0F#qI2oVj>58Ge^CYj%0u)zil*q^awoCtn4hG##( znPAZKGe#H_O$Gr{I)kI@Pgyrth8F-&eP*`&L)i zsXAxX+H3E#D?n}Q)ziE)*5`ft zZ4?lyfolw_2StAy_8hI1b2`n(xmE`Cu*X@0RSz4kL$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=n=B19tzV66}&s{cW>v;=0BP(d~fkUR)N%i*>Lk~PQ zdekl7-|>>$p6brs-|%egHtiExA#QBj@XJ%k!v&69Lx8Lj7-68R9#raVL{MdV z`z~VFYd+vUeY=pvd0)WcX7MXJe{k5Q<;!Mod&yCQdsfWrj2u6x^un0{wrjHO`--8* zw{{mi@YvX*hkvwt>3Xd@{fs6F@Gb&(2leB3|MBDsU?o9l$bylebrLW$shd>;&~nOX z>Vs7qE{pYP3X}(!x64?pOVG;%;M&)6#CJCMet&wu6X$~@!jB-(4erOr5sOoIENL7yT`hEZ+WG#@0Qg)2`UnB|?1@US_0p%d4%@$()@_$x^xbuhoNF9eA=ao+eHA+C9vnydKO850eX*Y z1{lvhsRe<@>>VN3h-d%dkZ;3O@rOn^6oHndq)w7is#xv\n\n\n\n\n\n","compression":"false","overlapping_markups":["link[rel=\"apple-touch-icon\"]","link[rel=\"shortcut\"]","link[rel=\"shortcut icon\"]","link[rel=\"icon\",sizes=\"16x16\"]","link[rel=\"icon\",sizes=\"32x32\"]","meta[name=\"msapplication-TileColor\"]","link[rel=\"manifest\"]","meta[name=\"theme-color\"]","link[rel=\"mask-icon\"]"]},"files_location":{"type":"path","path":"/"},"preview_picture_url":"https://realfavicongenerator.net/files/817d14dc31f58896a4b18888c2d511c88d869ff3/favicon_preview.png","version":"0.16"} \ No newline at end of file +{"result":{"status":"success"},"favicon":{"package_url":"https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/favicon_package_v0.16.zip","files_urls":["https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/android-chrome-192x192.png","https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/android-chrome-512x512.png","https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/apple-touch-icon.png","https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/browserconfig.xml","https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/favicon-16x16.png","https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/favicon-32x32.png","https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/favicon.ico","https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/mstile-150x150.png","https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/safari-pinned-tab.svg","https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/package_files/site.webmanifest"],"html_code":"\n\n\n\n\n\n","compression":"false","overlapping_markups":["link[rel=\"apple-touch-icon\"]","link[rel=\"shortcut\"]","link[rel=\"shortcut icon\"]","link[rel=\"icon\",sizes=\"16x16\"]","link[rel=\"icon\",sizes=\"32x32\"]","meta[name=\"msapplication-TileColor\"]","link[rel=\"manifest\"]","meta[name=\"theme-color\"]","link[rel=\"mask-icon\"]"]},"files_location":{"type":"path","path":"/"},"preview_picture_url":"https://realfavicongenerator.net/files/55162896881f5ef7a68f8c0d4b004d004439dd31/favicon_preview.png","version":"0.16"} \ No newline at end of file diff --git a/src/objects/Bonus.js b/src/objects/Bonus.js index 5f5c072..4296b23 100644 --- a/src/objects/Bonus.js +++ b/src/objects/Bonus.js @@ -47,4 +47,11 @@ export default class Bonus } return this } + + reset () + { + this.amountLeft = this.amount + this.active = false + return this + } } diff --git a/src/objects/SceneLevel.js b/src/objects/SceneLevel.js index e0ce307..4194de9 100644 --- a/src/objects/SceneLevel.js +++ b/src/objects/SceneLevel.js @@ -66,10 +66,10 @@ export default class SceneLevel extends SceneGame draw () { + this.bonusesBlocks = [] const { fontFamily, colorTextBar } = this.configGame const { width } = this.cameras.main - this.bonusesBlocks = [] - const bonuses = this.bonusesService.getBonuses() + const bonuses = this.bonusesService.getBonusesList() const padding = 20 const styleText = { fontFamily, @@ -86,7 +86,7 @@ export default class SceneLevel extends SceneGame this.scoreBar = this.add.scoreBar(0, 160) this.scoreBar.setX(width - this.scoreBar.displayWidth - padding) - if (Object.keys(bonuses).length) + if (bonuses.length) { this.add.text( width - this.scoreBar.displayWidth / 2 - padding, @@ -97,12 +97,15 @@ export default class SceneLevel extends SceneGame .setOrigin(.5, 0) } - Object.keys(bonuses).forEach((name, i) => + bonuses.forEach((bonus, i) => { - const y = this.scoreBar.y + this.scoreBar.displayHeight + 60 - this.bonusesBlocks[name] = this.add.bonusBlock(0, y, bonuses[name]) - const x = width - this.scoreBar.displayWidth - 70 + this.bonusesBlocks[name].displayWidth * i - this.bonusesBlocks[name].setX(x) + const { displayWidth, displayHeight, y } = this.scoreBar + const bonusY = y + displayHeight + 60 + + this.bonusesBlocks[bonus.name] = this.add.bonusBlock(0, bonusY, bonus) + + const bonusX = width - displayWidth - 70 + this.bonusesBlocks[bonus.name].displayWidth * i + this.bonusesBlocks[bonus.name].setX(bonusX) }) } @@ -156,6 +159,8 @@ export default class SceneLevel extends SceneGame .resetScores() .resetMoves() + this.bonusesService.reset() + this.scene.stop() } diff --git a/src/plugins/bonusBlock/BonusBlockGameObject.js b/src/plugins/bonusBlock/BonusBlockGameObject.js index e221b4d..185416b 100644 --- a/src/plugins/bonusBlock/BonusBlockGameObject.js +++ b/src/plugins/bonusBlock/BonusBlockGameObject.js @@ -31,7 +31,7 @@ export default class BonusBlockGameObject extends GameObjects.Container const titleText = this.scene.make.text({ x: this.imageBg.displayWidth / 2, y: this.imageBg.displayHeight / 4, - text: this.title, + text: this.bonus.title, style: styleText, }) .setOrigin(.5, 0) diff --git a/src/plugins/gridTiles/GridTilesGameObject.js b/src/plugins/gridTiles/GridTilesGameObject.js index 8089b7c..11bf72d 100644 --- a/src/plugins/gridTiles/GridTilesGameObject.js +++ b/src/plugins/gridTiles/GridTilesGameObject.js @@ -8,7 +8,6 @@ export default class GridTilesGameObject extends GameObjects.Container { super(scene, x, y) - this.scene = scene this.imageBg = 'grid-bg' this.grid = grid this.tilesFrames = tiles diff --git a/src/scenes/ScenePreload.js b/src/scenes/ScenePreload.js index c31c8e9..c30e6f2 100644 --- a/src/scenes/ScenePreload.js +++ b/src/scenes/ScenePreload.js @@ -2,9 +2,6 @@ import SceneGame from '@/objects/SceneGame' import bonusBgImg from '@/assets/img/game/bonus-bg.png' import gridBgImg from '@/assets/img/game/grid-bg.png' -import iconUnknowImg from '@/assets/img/game/icon-unknow.png' -import pauseBtnImg from '@/assets/img/game/pause-btn.png' -import plusBtnImg from '@/assets/img/game/plus-btn.png' import purpleBtnImg from '@/assets/img/game/purple-btn.png' import redBtnImg from '@/assets/img/game/red-btn.png' import scoreBgImg from '@/assets/img/game/score-bg.png' @@ -36,9 +33,6 @@ export default class ScenePreload extends SceneGame this.load.image('bonus-bg', bonusBgImg) this.load.image('grid-bg', gridBgImg) - this.load.image('icon-unknow', iconUnknowImg) - this.load.image('pause-btn', pauseBtnImg) - this.load.image('plus-btn', plusBtnImg) this.load.image('purple-btn', purpleBtnImg) this.load.image('red-btn', redBtnImg) this.load.image('score-bg', scoreBgImg) diff --git a/src/services/BonusesService.js b/src/services/BonusesService.js index 98b9a05..5fcfe7d 100644 --- a/src/services/BonusesService.js +++ b/src/services/BonusesService.js @@ -19,6 +19,11 @@ export default class BonusesService return this.#bonuses } + getBonusesList () + { + return Object.values(this.#bonuses) + } + getBonus (name) { return this.#bonuses[name] @@ -26,14 +31,22 @@ export default class BonusesService getActive () { - const bonuses = this.getBonuses() - return Object.keys(bonuses).find(n => bonuses[n].active) + return this.getBonusesList() + .find(o => o.active) + ?.name } setActive (name) { - const bonuses = this.getBonuses() - Object.keys(bonuses).find(n => bonuses[n].activate(n === name)) + this.getBonusesList() + .map(o => o.activate(o.name === name)) + return this + } + + reset() + { + this.getBonusesList() + .find(o => o.reset()) return this } }